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
77087ac39914ffbad3c07ff59b502e63716b0a70
186
py
Python
stacs/scan/output/__init__.py
H1d3r/stacs
bc6063a0973655ff14627fc4b23a187faac12c88
[ "BSD-3-Clause" ]
60
2021-08-18T22:53:59.000Z
2022-03-26T23:14:47.000Z
stacs/scan/output/__init__.py
H1d3r/stacs
bc6063a0973655ff14627fc4b23a187faac12c88
[ "BSD-3-Clause" ]
4
2021-08-29T16:35:04.000Z
2022-03-09T21:23:27.000Z
stacs/scan/output/__init__.py
H1d3r/stacs
bc6063a0973655ff14627fc4b23a187faac12c88
[ "BSD-3-Clause" ]
13
2021-08-18T23:08:15.000Z
2022-03-25T08:05:33.000Z
"""Defines outputs supported by STACS. SPDX-License-Identifier: BSD-3-Clause """ from stacs.scan.output import markdown # noqa: F401 from stacs.scan.output import sarif # noqa: F401
23.25
52
0.752688
27
186
5.185185
0.703704
0.128571
0.185714
0.271429
0.357143
0
0
0
0
0
0
0.04375
0.139785
186
7
53
26.571429
0.83125
0.521505
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
7726361c7407ca91017c86577699eb62a8db86db
127
py
Python
gbmgeometry/utils/plotting/__init__.py
drJfunk/gbmgeometry
ca11005c349546ed962bb1bbc4f66d8022ea79a1
[ "MIT" ]
4
2019-10-31T06:28:13.000Z
2020-03-28T14:31:07.000Z
gbmgeometry/utils/plotting/__init__.py
drJfunk/gbmgeometry
ca11005c349546ed962bb1bbc4f66d8022ea79a1
[ "MIT" ]
4
2020-03-04T16:16:39.000Z
2020-04-08T11:28:03.000Z
gbmgeometry/utils/plotting/__init__.py
drJfunk/gbmgeometry
ca11005c349546ed962bb1bbc4f66d8022ea79a1
[ "MIT" ]
7
2017-10-26T09:32:37.000Z
2022-03-21T16:32:20.000Z
from gbmgeometry.utils.plotting.spherical_circle import SphericalCircle from gbmgeometry.utils.plotting.skyplot import skyplot
42.333333
71
0.889764
15
127
7.466667
0.6
0.267857
0.357143
0.5
0
0
0
0
0
0
0
0
0.062992
127
2
72
63.5
0.941176
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
7748fbeab08ac5318541452bd346acb374acb489
20,616
py
Python
sdk/python/pulumi_rabbitmq/binding.py
pulumi/pulumi-rabbitmq
f380f679fa512a40106ac1ae0d8bbf1766ff4ecf
[ "ECL-2.0", "Apache-2.0" ]
3
2020-04-14T15:37:05.000Z
2021-12-01T20:57:40.000Z
sdk/python/pulumi_rabbitmq/binding.py
pulumi/pulumi-rabbitmq
f380f679fa512a40106ac1ae0d8bbf1766ff4ecf
[ "ECL-2.0", "Apache-2.0" ]
25
2019-12-06T13:36:32.000Z
2022-03-31T15:41:19.000Z
sdk/python/pulumi_rabbitmq/binding.py
pulumi/pulumi-rabbitmq
f380f679fa512a40106ac1ae0d8bbf1766ff4ecf
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['BindingArgs', 'Binding'] @pulumi.input_type class BindingArgs: def __init__(__self__, *, destination: pulumi.Input[str], destination_type: pulumi.Input[str], source: pulumi.Input[str], vhost: pulumi.Input[str], arguments: Optional[pulumi.Input[Mapping[str, Any]]] = None, arguments_json: Optional[pulumi.Input[str]] = None, routing_key: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a Binding resource. :param pulumi.Input[str] destination: The destination queue or exchange. :param pulumi.Input[str] destination_type: The type of destination (queue or exchange). :param pulumi.Input[str] source: The source exchange. :param pulumi.Input[str] vhost: The vhost to create the resource in. :param pulumi.Input[Mapping[str, Any]] arguments: Additional key/value arguments for the binding. :param pulumi.Input[str] routing_key: A routing key for the binding. """ pulumi.set(__self__, "destination", destination) pulumi.set(__self__, "destination_type", destination_type) pulumi.set(__self__, "source", source) pulumi.set(__self__, "vhost", vhost) if arguments is not None: pulumi.set(__self__, "arguments", arguments) if arguments_json is not None: pulumi.set(__self__, "arguments_json", arguments_json) if routing_key is not None: pulumi.set(__self__, "routing_key", routing_key) @property @pulumi.getter def destination(self) -> pulumi.Input[str]: """ The destination queue or exchange. """ return pulumi.get(self, "destination") @destination.setter def destination(self, value: pulumi.Input[str]): pulumi.set(self, "destination", value) @property @pulumi.getter(name="destinationType") def destination_type(self) -> pulumi.Input[str]: """ The type of destination (queue or exchange). """ return pulumi.get(self, "destination_type") @destination_type.setter def destination_type(self, value: pulumi.Input[str]): pulumi.set(self, "destination_type", value) @property @pulumi.getter def source(self) -> pulumi.Input[str]: """ The source exchange. """ return pulumi.get(self, "source") @source.setter def source(self, value: pulumi.Input[str]): pulumi.set(self, "source", value) @property @pulumi.getter def vhost(self) -> pulumi.Input[str]: """ The vhost to create the resource in. """ return pulumi.get(self, "vhost") @vhost.setter def vhost(self, value: pulumi.Input[str]): pulumi.set(self, "vhost", value) @property @pulumi.getter def arguments(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: """ Additional key/value arguments for the binding. """ return pulumi.get(self, "arguments") @arguments.setter def arguments(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): pulumi.set(self, "arguments", value) @property @pulumi.getter(name="argumentsJson") def arguments_json(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "arguments_json") @arguments_json.setter def arguments_json(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "arguments_json", value) @property @pulumi.getter(name="routingKey") def routing_key(self) -> Optional[pulumi.Input[str]]: """ A routing key for the binding. """ return pulumi.get(self, "routing_key") @routing_key.setter def routing_key(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "routing_key", value) @pulumi.input_type class _BindingState: def __init__(__self__, *, arguments: Optional[pulumi.Input[Mapping[str, Any]]] = None, arguments_json: Optional[pulumi.Input[str]] = None, destination: Optional[pulumi.Input[str]] = None, destination_type: Optional[pulumi.Input[str]] = None, properties_key: Optional[pulumi.Input[str]] = None, routing_key: Optional[pulumi.Input[str]] = None, source: Optional[pulumi.Input[str]] = None, vhost: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering Binding resources. :param pulumi.Input[Mapping[str, Any]] arguments: Additional key/value arguments for the binding. :param pulumi.Input[str] destination: The destination queue or exchange. :param pulumi.Input[str] destination_type: The type of destination (queue or exchange). :param pulumi.Input[str] properties_key: A unique key to refer to the binding. :param pulumi.Input[str] routing_key: A routing key for the binding. :param pulumi.Input[str] source: The source exchange. :param pulumi.Input[str] vhost: The vhost to create the resource in. """ if arguments is not None: pulumi.set(__self__, "arguments", arguments) if arguments_json is not None: pulumi.set(__self__, "arguments_json", arguments_json) if destination is not None: pulumi.set(__self__, "destination", destination) if destination_type is not None: pulumi.set(__self__, "destination_type", destination_type) if properties_key is not None: pulumi.set(__self__, "properties_key", properties_key) if routing_key is not None: pulumi.set(__self__, "routing_key", routing_key) if source is not None: pulumi.set(__self__, "source", source) if vhost is not None: pulumi.set(__self__, "vhost", vhost) @property @pulumi.getter def arguments(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: """ Additional key/value arguments for the binding. """ return pulumi.get(self, "arguments") @arguments.setter def arguments(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): pulumi.set(self, "arguments", value) @property @pulumi.getter(name="argumentsJson") def arguments_json(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "arguments_json") @arguments_json.setter def arguments_json(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "arguments_json", value) @property @pulumi.getter def destination(self) -> Optional[pulumi.Input[str]]: """ The destination queue or exchange. """ return pulumi.get(self, "destination") @destination.setter def destination(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "destination", value) @property @pulumi.getter(name="destinationType") def destination_type(self) -> Optional[pulumi.Input[str]]: """ The type of destination (queue or exchange). """ return pulumi.get(self, "destination_type") @destination_type.setter def destination_type(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "destination_type", value) @property @pulumi.getter(name="propertiesKey") def properties_key(self) -> Optional[pulumi.Input[str]]: """ A unique key to refer to the binding. """ return pulumi.get(self, "properties_key") @properties_key.setter def properties_key(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "properties_key", value) @property @pulumi.getter(name="routingKey") def routing_key(self) -> Optional[pulumi.Input[str]]: """ A routing key for the binding. """ return pulumi.get(self, "routing_key") @routing_key.setter def routing_key(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "routing_key", value) @property @pulumi.getter def source(self) -> Optional[pulumi.Input[str]]: """ The source exchange. """ return pulumi.get(self, "source") @source.setter def source(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "source", value) @property @pulumi.getter def vhost(self) -> Optional[pulumi.Input[str]]: """ The vhost to create the resource in. """ return pulumi.get(self, "vhost") @vhost.setter def vhost(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "vhost", value) class Binding(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, arguments: Optional[pulumi.Input[Mapping[str, Any]]] = None, arguments_json: Optional[pulumi.Input[str]] = None, destination: Optional[pulumi.Input[str]] = None, destination_type: Optional[pulumi.Input[str]] = None, routing_key: Optional[pulumi.Input[str]] = None, source: Optional[pulumi.Input[str]] = None, vhost: Optional[pulumi.Input[str]] = None, __props__=None): """ The ``Binding`` resource creates and manages a binding relationship between a queue an exchange. ## Example Usage ```python import pulumi import pulumi_rabbitmq as rabbitmq test_v_host = rabbitmq.VHost("testVHost") guest = rabbitmq.Permissions("guest", permissions=rabbitmq.PermissionsPermissionsArgs( configure=".*", read=".*", write=".*", ), user="guest", vhost=test_v_host.name) test_exchange = rabbitmq.Exchange("testExchange", settings=rabbitmq.ExchangeSettingsArgs( auto_delete=True, durable=False, type="fanout", ), vhost=guest.vhost) test_queue = rabbitmq.Queue("testQueue", settings=rabbitmq.QueueSettingsArgs( auto_delete=False, durable=True, ), vhost=guest.vhost) test_binding = rabbitmq.Binding("testBinding", destination=test_queue.name, destination_type="queue", routing_key="#", source=test_exchange.name, vhost=test_v_host.name) ``` ## Import Bindings can be imported using the `id` which is composed of `vhost/source/destination/destination_type/properties_key`. E.g. ```sh $ pulumi import rabbitmq:index/binding:Binding test test/test/test/queue/%23 ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Mapping[str, Any]] arguments: Additional key/value arguments for the binding. :param pulumi.Input[str] destination: The destination queue or exchange. :param pulumi.Input[str] destination_type: The type of destination (queue or exchange). :param pulumi.Input[str] routing_key: A routing key for the binding. :param pulumi.Input[str] source: The source exchange. :param pulumi.Input[str] vhost: The vhost to create the resource in. """ ... @overload def __init__(__self__, resource_name: str, args: BindingArgs, opts: Optional[pulumi.ResourceOptions] = None): """ The ``Binding`` resource creates and manages a binding relationship between a queue an exchange. ## Example Usage ```python import pulumi import pulumi_rabbitmq as rabbitmq test_v_host = rabbitmq.VHost("testVHost") guest = rabbitmq.Permissions("guest", permissions=rabbitmq.PermissionsPermissionsArgs( configure=".*", read=".*", write=".*", ), user="guest", vhost=test_v_host.name) test_exchange = rabbitmq.Exchange("testExchange", settings=rabbitmq.ExchangeSettingsArgs( auto_delete=True, durable=False, type="fanout", ), vhost=guest.vhost) test_queue = rabbitmq.Queue("testQueue", settings=rabbitmq.QueueSettingsArgs( auto_delete=False, durable=True, ), vhost=guest.vhost) test_binding = rabbitmq.Binding("testBinding", destination=test_queue.name, destination_type="queue", routing_key="#", source=test_exchange.name, vhost=test_v_host.name) ``` ## Import Bindings can be imported using the `id` which is composed of `vhost/source/destination/destination_type/properties_key`. E.g. ```sh $ pulumi import rabbitmq:index/binding:Binding test test/test/test/queue/%23 ``` :param str resource_name: The name of the resource. :param BindingArgs 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(BindingArgs, 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, arguments: Optional[pulumi.Input[Mapping[str, Any]]] = None, arguments_json: Optional[pulumi.Input[str]] = None, destination: Optional[pulumi.Input[str]] = None, destination_type: Optional[pulumi.Input[str]] = None, routing_key: Optional[pulumi.Input[str]] = None, source: Optional[pulumi.Input[str]] = None, vhost: 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__ = BindingArgs.__new__(BindingArgs) __props__.__dict__["arguments"] = arguments __props__.__dict__["arguments_json"] = arguments_json if destination is None and not opts.urn: raise TypeError("Missing required property 'destination'") __props__.__dict__["destination"] = destination if destination_type is None and not opts.urn: raise TypeError("Missing required property 'destination_type'") __props__.__dict__["destination_type"] = destination_type __props__.__dict__["routing_key"] = routing_key if source is None and not opts.urn: raise TypeError("Missing required property 'source'") __props__.__dict__["source"] = source if vhost is None and not opts.urn: raise TypeError("Missing required property 'vhost'") __props__.__dict__["vhost"] = vhost __props__.__dict__["properties_key"] = None super(Binding, __self__).__init__( 'rabbitmq:index/binding:Binding', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, arguments: Optional[pulumi.Input[Mapping[str, Any]]] = None, arguments_json: Optional[pulumi.Input[str]] = None, destination: Optional[pulumi.Input[str]] = None, destination_type: Optional[pulumi.Input[str]] = None, properties_key: Optional[pulumi.Input[str]] = None, routing_key: Optional[pulumi.Input[str]] = None, source: Optional[pulumi.Input[str]] = None, vhost: Optional[pulumi.Input[str]] = None) -> 'Binding': """ Get an existing Binding 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[Mapping[str, Any]] arguments: Additional key/value arguments for the binding. :param pulumi.Input[str] destination: The destination queue or exchange. :param pulumi.Input[str] destination_type: The type of destination (queue or exchange). :param pulumi.Input[str] properties_key: A unique key to refer to the binding. :param pulumi.Input[str] routing_key: A routing key for the binding. :param pulumi.Input[str] source: The source exchange. :param pulumi.Input[str] vhost: The vhost to create the resource in. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _BindingState.__new__(_BindingState) __props__.__dict__["arguments"] = arguments __props__.__dict__["arguments_json"] = arguments_json __props__.__dict__["destination"] = destination __props__.__dict__["destination_type"] = destination_type __props__.__dict__["properties_key"] = properties_key __props__.__dict__["routing_key"] = routing_key __props__.__dict__["source"] = source __props__.__dict__["vhost"] = vhost return Binding(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter def arguments(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: """ Additional key/value arguments for the binding. """ return pulumi.get(self, "arguments") @property @pulumi.getter(name="argumentsJson") def arguments_json(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "arguments_json") @property @pulumi.getter def destination(self) -> pulumi.Output[str]: """ The destination queue or exchange. """ return pulumi.get(self, "destination") @property @pulumi.getter(name="destinationType") def destination_type(self) -> pulumi.Output[str]: """ The type of destination (queue or exchange). """ return pulumi.get(self, "destination_type") @property @pulumi.getter(name="propertiesKey") def properties_key(self) -> pulumi.Output[str]: """ A unique key to refer to the binding. """ return pulumi.get(self, "properties_key") @property @pulumi.getter(name="routingKey") def routing_key(self) -> pulumi.Output[Optional[str]]: """ A routing key for the binding. """ return pulumi.get(self, "routing_key") @property @pulumi.getter def source(self) -> pulumi.Output[str]: """ The source exchange. """ return pulumi.get(self, "source") @property @pulumi.getter def vhost(self) -> pulumi.Output[str]: """ The vhost to create the resource in. """ return pulumi.get(self, "vhost")
37.966851
134
0.615638
2,255
20,616
5.417295
0.080266
0.087344
0.093975
0.082842
0.85388
0.819253
0.800917
0.755648
0.739768
0.716028
0
0.000335
0.276145
20,616
542
135
38.0369
0.818267
0.293752
0
0.679715
1
0
0.09448
0.002297
0
0
0
0
0
1
0.160142
false
0.003559
0.017794
0.010676
0.274021
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
775fb9d8d71cfa43e8e0f5c171dbbf040bf961ee
152
py
Python
app/auth/views/index.py
by46/coffee
f12e1e95f12da7e322a432a6386a1147c5549c3b
[ "MIT" ]
null
null
null
app/auth/views/index.py
by46/coffee
f12e1e95f12da7e322a432a6386a1147c5549c3b
[ "MIT" ]
null
null
null
app/auth/views/index.py
by46/coffee
f12e1e95f12da7e322a432a6386a1147c5549c3b
[ "MIT" ]
null
null
null
from flask import render_template from app.auth import auth @auth.route('/demo1') def demo1(): return render_template('auth/demo1.html')
16.888889
46
0.703947
21
152
5
0.571429
0.266667
0
0
0
0
0
0
0
0
0
0.024194
0.184211
152
8
47
19
0.822581
0
0
0
0
0
0.145833
0
0
0
0
0
0
1
0.2
true
0
0.4
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
0
1
0
1
1
1
0
0
7
624b1581bd970283dee6a2c6baef0a206136f40c
2,698
py
Python
rest_api/bookshop/views.py
JimBob3000/django_rest_framework
0ea2ef6348286ddc753c29eaa1c119a036fa0b9f
[ "MIT" ]
null
null
null
rest_api/bookshop/views.py
JimBob3000/django_rest_framework
0ea2ef6348286ddc753c29eaa1c119a036fa0b9f
[ "MIT" ]
null
null
null
rest_api/bookshop/views.py
JimBob3000/django_rest_framework
0ea2ef6348286ddc753c29eaa1c119a036fa0b9f
[ "MIT" ]
null
null
null
from rest_framework import generics from rest_framework import mixins from .models import Book, Author, Publisher from .serializers import AuthorSerializer, BookSerializer, PublisherSerializer class AuthorView( generics.GenericAPIView, mixins.ListModelMixin, mixins.CreateModelMixin, mixins.UpdateModelMixin, mixins.RetrieveModelMixin, mixins.DestroyModelMixin): serializer_class = AuthorSerializer queryset = Author.objects.all() lookup_field = 'id' def get(self, request, id): return self.retrieve(request) def post(self, request): return self.create(request) def put(self, request, id): return self.update(request, id) def delete(self, request, id): return self.destroy(request, id) class AuthorsView( generics.GenericAPIView, mixins.ListModelMixin): serializer_class = AuthorSerializer queryset = Author.objects.all() def get(self, request): return self.list(request) class PublisherView( generics.GenericAPIView, mixins.ListModelMixin, mixins.CreateModelMixin, mixins.UpdateModelMixin, mixins.RetrieveModelMixin, mixins.DestroyModelMixin): serializer_class = PublisherSerializer queryset = Publisher.objects.all() lookup_field = 'id' def get(self, request, id): return self.retrieve(request) def post(self, request): return self.create(request) def put(self, request, id): return self.update(request, id) def delete(self, request, id): return self.destroy(request, id) class PublishersView( generics.GenericAPIView, mixins.ListModelMixin): serializer_class = PublisherSerializer queryset = Publisher.objects.all() def get(self, request): return self.list(request) class BookView( generics.GenericAPIView, mixins.ListModelMixin, mixins.CreateModelMixin, mixins.UpdateModelMixin, mixins.RetrieveModelMixin, mixins.DestroyModelMixin): serializer_class = BookSerializer queryset = Book.objects.all() lookup_field = 'id' def get(self, request, id): return self.retrieve(request) def post(self, request): return self.create(request) def put(self, request, id): return self.update(request, id) def delete(self, request, id): return self.destroy(request, id) class BooksView( generics.GenericAPIView, mixins.ListModelMixin): serializer_class = BookSerializer queryset = Book.objects.all() def get(self, request): return self.list(request)
24.527273
78
0.67235
268
2,698
6.727612
0.175373
0.091514
0.064892
0.094842
0.869662
0.869662
0.799778
0.672768
0.672768
0.672768
0
0
0.242031
2,698
109
79
24.752294
0.881663
0
0
0.873418
0
0
0.002224
0
0
0
0
0
0
1
0.189873
false
0
0.050633
0.189873
0.696203
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
7
6251ea83fe7c10fb708ee29b7fdd70e2c92f35be
1,301
py
Python
tests/charger_test.py
ltowarek/arinna
20fc3f028af9bbb7f98c3390fa94fb6e6f0c10c2
[ "MIT" ]
null
null
null
tests/charger_test.py
ltowarek/arinna
20fc3f028af9bbb7f98c3390fa94fb6e6f0c10c2
[ "MIT" ]
2
2021-03-25T21:58:09.000Z
2021-03-28T07:48:59.000Z
tests/charger_test.py
ltowarek/arinna
20fc3f028af9bbb7f98c3390fa94fb6e6f0c10c2
[ "MIT" ]
null
null
null
from datetime import time from arinna.charger import ChargingManager def test_charging_manager_is_in_cheap_day_rate(): assert False is ChargingManager.is_in_cheap_day_rate(time(12, 59)) assert True is ChargingManager.is_in_cheap_day_rate(time(13, 0)) assert True is ChargingManager.is_in_cheap_day_rate(time(14, 0)) assert True is ChargingManager.is_in_cheap_day_rate(time(14, 59)) assert False is ChargingManager.is_in_cheap_day_rate(time(15, 0)) def test_charging_manager_is_in_cheap_night_rate(): assert False is ChargingManager.is_in_cheap_night_rate(time(21, 59)) assert True is ChargingManager.is_in_cheap_night_rate(time(22, 0)) assert True is ChargingManager.is_in_cheap_night_rate(time(23, 0)) assert True is ChargingManager.is_in_cheap_night_rate(time(0, 0)) assert True is ChargingManager.is_in_cheap_night_rate(time(1, 0)) assert True is ChargingManager.is_in_cheap_night_rate(time(2, 0)) assert True is ChargingManager.is_in_cheap_night_rate(time(3, 0)) assert True is ChargingManager.is_in_cheap_night_rate(time(4, 0)) assert True is ChargingManager.is_in_cheap_night_rate(time(5, 0)) assert True is ChargingManager.is_in_cheap_night_rate(time(5, 59)) assert False is ChargingManager.is_in_cheap_night_rate(time(6, 0))
52.04
72
0.797848
219
1,301
4.383562
0.159817
0.075
0.16875
0.35
0.916667
0.908333
0.908333
0.84375
0.827083
0.827083
0
0.038563
0.122982
1,301
24
73
54.208333
0.802805
0
0
0
0
0
0
0
0
0
0
0
0.8
1
0.1
true
0
0.1
0
0.2
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
9
6272d2bab2d6724950c2a2ee072c31e12c97865a
5,617
py
Python
d7a/alp/test/command_factory.py
christophevg/pyd7a
a785b50c1853988ae6770b94f12422b21a088523
[ "Apache-2.0" ]
3
2017-03-14T15:32:02.000Z
2021-08-15T18:17:42.000Z
d7a/alp/test/command_factory.py
christophevg/pyd7a
a785b50c1853988ae6770b94f12422b21a088523
[ "Apache-2.0" ]
null
null
null
d7a/alp/test/command_factory.py
christophevg/pyd7a
a785b50c1853988ae6770b94f12422b21a088523
[ "Apache-2.0" ]
1
2015-11-24T08:00:14.000Z
2015-11-24T08:00:14.000Z
import unittest import binascii from d7a.alp.command import Command from d7a.alp.interface import InterfaceType from d7a.alp.operands.file import DataRequest, Offset, Data from d7a.alp.operands.interface_configuration import InterfaceConfiguration from d7a.alp.operations.forward import Forward from d7a.alp.operations.requests import ReadFileData from d7a.alp.operations.responses import ReturnFileData from d7a.alp.operations.write_operations import WriteFileData from d7a.alp.regular_action import RegularAction from d7a.sp.configuration import Configuration class TestCommandFactory(unittest.TestCase): def test_create_with_read_file_action(self): c = Command.create_with_read_file_action(file_id=1, length=10) self.assertEqual(len(c.actions), 1) self.assertEqual(type(c.actions[0]), RegularAction) self.assertEqual(type(c.actions[0].operation), ReadFileData) self.assertEqual(type(c.actions[0].operand), DataRequest) self.assertEqual(c.actions[0].operand.offset.id, 1) self.assertEqual(c.actions[0].operand.offset.size, 1) self.assertEqual(c.actions[0].operand.offset.offset, 0) self.assertEqual(c.actions[0].operand.length, 10) def test_create_with_write_file_action(self): data = [0, 1, 2, 3, 4, 5] c = Command.create_with_write_file_action(file_id=1, data=data) self.assertEqual(len(c.actions), 1) self.assertEqual(type(c.actions[0]), RegularAction) self.assertEqual(type(c.actions[0].operation), WriteFileData) self.assertEqual(type(c.actions[0].operand), Data) self.assertEqual(c.actions[0].operand.offset.id, 1) self.assertEqual(c.actions[0].operand.offset.size, 1) self.assertEqual(c.actions[0].operand.offset.offset, 0) self.assertEqual(c.actions[0].operand.length, 6) self.assertEqual(c.actions[0].operand.data, data) def test_create_with_return_file_data_action(self): data = [ 1 ] c = Command.create_with_return_file_data_action(file_id=0x40, data=data) self.assertEqual(len(c.actions), 1) self.assertEqual(type(c.actions[0]), RegularAction) self.assertEqual(type(c.actions[0].operation), ReturnFileData) self.assertEqual(type(c.actions[0].operand), Data) self.assertEqual(c.actions[0].operand.offset.id, 0x40) self.assertEqual(c.actions[0].operand.offset.size, 1) self.assertEqual(c.actions[0].operand.offset.offset, 0) self.assertEqual(c.actions[0].operand.length, 1) self.assertEqual(c.actions[0].operand.data, data) def test_create_with_read_file_action_d7asp(self): c = Command.create_with_read_file_action(file_id=1, length=10, interface_type=InterfaceType.D7ASP) self.assertEqual(len(c.actions), 2) self.assertEqual(type(c.actions[0]), RegularAction) self.assertEqual(type(c.actions[0].operation), Forward) self.assertEqual(type(c.actions[0].operand), InterfaceConfiguration) self.assertEqual(c.actions[0].operand.interface_id, 0xD7) self.assertEqual(type(c.actions[0].operand.interface_configuration), Configuration) # TODO configuration properties self.assertEqual(type(c.actions[1].operation), ReadFileData) self.assertEqual(type(c.actions[1].operand), DataRequest) self.assertEqual(type(c.actions[1]), RegularAction) self.assertEqual(type(c.actions[1].operation), ReadFileData) self.assertEqual(type(c.actions[1].operand), DataRequest) self.assertEqual(c.actions[1].operand.offset.id, 1) self.assertEqual(c.actions[1].operand.offset.size, 1) self.assertEqual(c.actions[1].operand.offset.offset, 0) self.assertEqual(c.actions[1].operand.length, 10) def test_create_with_write_file_action_d7asp(self): data = [0, 1, 2, 3, 4, 5] c = Command.create_with_write_file_action(file_id=1, data=data, interface_type=InterfaceType.D7ASP) self.assertEqual(len(c.actions), 2) self.assertEqual(type(c.actions[0]), RegularAction) self.assertEqual(type(c.actions[0].operation), Forward) self.assertEqual(type(c.actions[0].operand), InterfaceConfiguration) self.assertEqual(c.actions[0].operand.interface_id, 0xD7) self.assertEqual(type(c.actions[0].operand.interface_configuration), Configuration) # TODO configuration properties self.assertEqual(type(c.actions[1].operation), WriteFileData) self.assertEqual(type(c.actions[1].operand), Data) self.assertEqual(c.actions[1].operand.offset.id, 1) self.assertEqual(c.actions[1].operand.offset.size, 1) self.assertEqual(c.actions[1].operand.offset.offset, 0) self.assertEqual(c.actions[1].operand.length, 6) self.assertEqual(c.actions[1].operand.data, data) def test_create_with_return_file_data_action_d7asp(self): data = [1] c = Command.create_with_return_file_data_action(file_id=0x40, data=data, interface_type=InterfaceType.D7ASP) self.assertEqual(len(c.actions), 2) self.assertEqual(type(c.actions[0]), RegularAction) self.assertEqual(type(c.actions[0].operation), Forward) self.assertEqual(type(c.actions[0].operand), InterfaceConfiguration) self.assertEqual(c.actions[0].operand.interface_id, 0xD7) self.assertEqual(type(c.actions[0].operand.interface_configuration), Configuration) self.assertEqual(type(c.actions[1]), RegularAction) self.assertEqual(type(c.actions[1].operation), ReturnFileData) self.assertEqual(type(c.actions[1].operand), Data) self.assertEqual(c.actions[1].operand.offset.id, 0x40) self.assertEqual(c.actions[1].operand.offset.size, 1) self.assertEqual(c.actions[1].operand.offset.offset, 0) self.assertEqual(c.actions[1].operand.length, 1) self.assertEqual(c.actions[1].operand.data, data)
52.009259
112
0.757166
793
5,617
5.263556
0.076923
0.24437
0.081936
0.148539
0.870867
0.870867
0.868232
0.832295
0.815285
0.815285
0
0.02947
0.105928
5,617
107
113
52.495327
0.801673
0.010504
0
0.597938
0
0
0
0
0
0
0.005041
0.009346
0.701031
1
0.061856
false
0
0.123711
0
0.195876
0
0
0
0
null
1
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
8
656781ee9577d8d3e4500cad3c8580d1f5b156f7
5,968
py
Python
abelfunctions/riemann_theta/tests/test_radius.py
RParini/abelfunctions
9263cd865e33cbd3ff4ffc1d59c14d77ff27f155
[ "MIT" ]
15
2016-03-22T14:08:44.000Z
2022-03-04T18:35:49.000Z
abelfunctions/riemann_theta/tests/test_radius.py
RParini/abelfunctions
9263cd865e33cbd3ff4ffc1d59c14d77ff27f155
[ "MIT" ]
101
2016-02-25T21:59:50.000Z
2021-06-26T11:05:29.000Z
abelfunctions/riemann_theta/tests/test_radius.py
RParini/abelfunctions
9263cd865e33cbd3ff4ffc1d59c14d77ff27f155
[ "MIT" ]
9
2016-03-22T13:27:41.000Z
2021-03-15T01:05:31.000Z
import unittest import numpy from abelfunctions.riemann_theta.radius import ( radius, radius0, radius1, radius2, radiusN, ) class TestRadiusN(unittest.TestCase): def test_vs_radius1_1e8(self): # genus 3 example z = numpy.array([0.2+0.5j, 0.3-0.1j, -0.1+0.2j], dtype=numpy.complex) T = numpy.diag([1,2,3]) + numpy.diag([4,5], k=1) + numpy.diag([6], k=2) rho = 0.9 # any rho is fine eps = 1e-8 deriv = [1,0,0] R1 = radius1(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, [deriv]) self.assertAlmostEqual(R1, R2) deriv = [0,1,0] R1 = radius1(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, [deriv]) self.assertAlmostEqual(R1, R2) deriv = [0,0,1] R1 = radius1(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, [deriv]) self.assertAlmostEqual(R1, R2) deriv = [0.1 + 0.2j, 0.3+0.4j, 0.5+0.6j] R1 = radius1(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, [deriv]) self.assertAlmostEqual(R1, R2) def test_vs_radius1_1e14(self): # genus 3 example z = numpy.array([0.2+0.5j, 0.3-0.1j, -0.1+0.2j], dtype=numpy.complex) T = numpy.diag([1,2,3]) + numpy.diag([4,5], k=1) + numpy.diag([6], k=2) rho = 0.9 # any rho is fine eps = 1e-14 deriv = [1,0,0] R1 = radius1(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, [deriv]) self.assertAlmostEqual(R1, R2) deriv = [0,1,0] R1 = radius1(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, [deriv]) self.assertAlmostEqual(R1, R2) deriv = [0,0,1] R1 = radius1(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, [deriv]) self.assertAlmostEqual(R1, R2) deriv = [0.1 + 0.2j, 0.3+0.4j, 0.5+0.6j] R1 = radius1(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, [deriv]) self.assertAlmostEqual(R1, R2) def test_vs_radius2_1e8(self): # genus 3 example z = numpy.array([0.2+0.5j, 0.3-0.1j, -0.1+0.2j], dtype=numpy.complex) T = numpy.diag([1,2,3]) + numpy.diag([4,5], k=1) + numpy.diag([6], k=2) rho = 0.9 # any rho is fine eps = 1e-8 deriv = [[1,0,0], [1,0,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,1,0], [1,0,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,0,1], [1,0,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[1,0,0], [0,1,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,1,0], [0,1,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,0,1], [0,1,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[1,0,0], [0,0,1]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,1,0], [0,0,1]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,0,1], [0,0,1]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0.1 + 0.2j, 0.3+0.4j, 0.5+0.6j], [0.7 + 0.8j, 0.9+1.0j, 1.1+1.2j]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) def test_vs_radius2_1e14(self): # genus 3 example z = numpy.array([0.2+0.5j, 0.3-0.1j, -0.1+0.2j], dtype=numpy.complex) T = numpy.diag([1,2,3]) + numpy.diag([4,5], k=1) + numpy.diag([6], k=2) rho = 0.9 # any rho is fine eps = 1e-14 deriv = [[1,0,0], [1,0,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,1,0], [1,0,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,0,1], [1,0,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[1,0,0], [0,1,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,1,0], [0,1,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,0,1], [0,1,0]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[1,0,0], [0,0,1]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,1,0], [0,0,1]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0,0,1], [0,0,1]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2) deriv = [[0.1 + 0.2j, 0.3+0.4j, 0.5+0.6j], [0.7 + 0.8j, 0.9+1.0j, 1.1+1.2j]] R1 = radius2(eps, rho, 3, T, deriv) R2 = radiusN(eps, rho, 3, T, deriv) self.assertAlmostEqual(R1, R2)
32.612022
79
0.502178
965
5,968
3.092228
0.060104
0.112601
0.131367
0.150134
0.948056
0.948056
0.948056
0.948056
0.948056
0.948056
0
0.125612
0.315684
5,968
182
80
32.791209
0.605044
0.02128
0
0.902778
0
0
0
0
0
0
0
0
0.194444
1
0.027778
false
0
0.020833
0
0.055556
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
6578e17ba9e6251a15a33e8e805d7a371c22337c
80,545
py
Python
boto3_type_annotations_with_docs/boto3_type_annotations/mediaconnect/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
119
2018-12-01T18:20:57.000Z
2022-02-02T10:31:29.000Z
boto3_type_annotations_with_docs/boto3_type_annotations/mediaconnect/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
15
2018-11-16T00:16:44.000Z
2021-11-13T03:44:18.000Z
boto3_type_annotations_with_docs/boto3_type_annotations/mediaconnect/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
11
2019-05-06T05:26:51.000Z
2021-09-28T15:27:59.000Z
from typing import Optional from botocore.client import BaseClient from typing import Dict from botocore.paginate import Paginator from botocore.waiter import Waiter from typing import Union from typing import List class Client(BaseClient): def add_flow_outputs(self, FlowArn: str, Outputs: List) -> Dict: """ Adds outputs to an existing flow. You can create up to 20 outputs per flow. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowOutputs>`_ **Request Syntax** :: response = client.add_flow_outputs( FlowArn='string', Outputs=[ { 'Description': 'string', 'Destination': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'MaxLatency': 123, 'Name': 'string', 'Port': 123, 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'SmoothingLatency': 123, 'StreamId': 'string' }, ] ) **Response Syntax** :: { 'FlowArn': 'string', 'Outputs': [ { 'Description': 'string', 'Destination': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'EntitlementArn': 'string', 'MediaLiveInputArn': 'string', 'Name': 'string', 'OutputArn': 'string', 'Port': 123, 'Transport': { 'MaxBitrate': 123, 'MaxLatency': 123, 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'SmoothingLatency': 123, 'StreamId': 'string' } }, ] } **Response Structure** - *(dict) --* AWS Elemental MediaConnect added the outputs successfully. - **FlowArn** *(string) --* The ARN of the flow that these outputs were added to. - **Outputs** *(list) --* The details of the newly added outputs. - *(dict) --* The settings for an output. - **Description** *(string) --* A description of the output. - **Destination** *(string) --* The address where you want to send the output. - **Encryption** *(dict) --* The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **EntitlementArn** *(string) --* The ARN of the entitlement on the originator''s flow. This value is relevant only on entitled flows. - **MediaLiveInputArn** *(string) --* The input ARN of the AWS Elemental MediaLive channel. This parameter is relevant only for outputs that were added by creating a MediaLive input. - **Name** *(string) --* The name of the output. This value must be unique within the current flow. - **OutputArn** *(string) --* The ARN of the output. - **Port** *(integer) --* The port to use when content is distributed to this output. - **Transport** *(dict) --* Attributes related to the transport stream that are used in the output. - **MaxBitrate** *(integer) --* The smoothing max bitrate for RTP and RTP-FEC streams. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Protocol** *(string) --* The protocol that is used by the source or output. - **SmoothingLatency** *(integer) --* The smoothing latency in milliseconds for RTP and RTP-FEC streams. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. :type FlowArn: string :param FlowArn: **[REQUIRED]** The flow that you want to add outputs to. :type Outputs: list :param Outputs: **[REQUIRED]** A list of outputs that you want to add. - *(dict) --* The output that you want to add to this flow. - **Description** *(string) --* A description of the output. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the end user. - **Destination** *(string) --* **[REQUIRED]** The IP address from which video will be sent to output destinations. - **Encryption** *(dict) --* The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **Algorithm** *(string) --* **[REQUIRED]** The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* **[REQUIRED]** The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* **[REQUIRED]** The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Name** *(string) --* The name of the output. This value must be unique within the current flow. - **Port** *(integer) --* **[REQUIRED]** The port to use when content is distributed to this output. - **Protocol** *(string) --* **[REQUIRED]** The protocol to use for the output. - **SmoothingLatency** *(integer) --* The smoothing latency in milliseconds for RTP and RTP-FEC streams. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. :rtype: dict :returns: """ pass def can_paginate(self, operation_name: str = None): """ Check if an operation can be paginated. :type operation_name: string :param operation_name: The operation name. This is the same name as the method name on the client. For example, if the method name is ``create_foo``, and you\'d normally invoke the operation as ``client.create_foo(**kwargs)``, if the ``create_foo`` operation can be paginated, you can use the call ``client.get_paginator(\"create_foo\")``. :return: ``True`` if the operation can be paginated, ``False`` otherwise. """ pass def create_flow(self, Name: str, Source: Dict, AvailabilityZone: str = None, Entitlements: List = None, Outputs: List = None) -> Dict: """ Creates a new flow. The request must include one source. The request optionally can include outputs (up to 20) and entitlements (up to 50). See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/CreateFlow>`_ **Request Syntax** :: response = client.create_flow( AvailabilityZone='string', Entitlements=[ { 'Description': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'Name': 'string', 'Subscribers': [ 'string', ] }, ], Name='string', Outputs=[ { 'Description': 'string', 'Destination': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'MaxLatency': 123, 'Name': 'string', 'Port': 123, 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'SmoothingLatency': 123, 'StreamId': 'string' }, ], Source={ 'Decryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'Description': 'string', 'EntitlementArn': 'string', 'IngestPort': 123, 'MaxBitrate': 123, 'MaxLatency': 123, 'Name': 'string', 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'StreamId': 'string', 'WhitelistCidr': 'string' } ) **Response Syntax** :: { 'Flow': { 'AvailabilityZone': 'string', 'Description': 'string', 'EgressIp': 'string', 'Entitlements': [ { 'Description': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'EntitlementArn': 'string', 'Name': 'string', 'Subscribers': [ 'string', ] }, ], 'FlowArn': 'string', 'Name': 'string', 'Outputs': [ { 'Description': 'string', 'Destination': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'EntitlementArn': 'string', 'MediaLiveInputArn': 'string', 'Name': 'string', 'OutputArn': 'string', 'Port': 123, 'Transport': { 'MaxBitrate': 123, 'MaxLatency': 123, 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'SmoothingLatency': 123, 'StreamId': 'string' } }, ], 'Source': { 'Decryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'Description': 'string', 'EntitlementArn': 'string', 'IngestIp': 'string', 'IngestPort': 123, 'Name': 'string', 'SourceArn': 'string', 'Transport': { 'MaxBitrate': 123, 'MaxLatency': 123, 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'SmoothingLatency': 123, 'StreamId': 'string' }, 'WhitelistCidr': 'string' }, 'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR' } } **Response Structure** - *(dict) --* AWS Elemental MediaConnect created the new flow successfully. - **Flow** *(dict) --* The settings for a flow, including its source, outputs, and entitlements. - **AvailabilityZone** *(string) --* The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current AWS. - **Description** *(string) --* A description of the flow. This value is not used or seen outside of the current AWS Elemental MediaConnect account. - **EgressIp** *(string) --* The IP address from which video will be sent to output destinations. - **Entitlements** *(list) --* The entitlements in this flow. - *(dict) --* The settings for a flow entitlement. - **Description** *(string) --* A description of the entitlement. - **Encryption** *(dict) --* The type of encryption that will be used on the output that is associated with this entitlement. - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **EntitlementArn** *(string) --* The ARN of the entitlement. - **Name** *(string) --* The name of the entitlement. - **Subscribers** *(list) --* The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source. - *(string) --* - **FlowArn** *(string) --* The Amazon Resource Name (ARN), a unique identifier for any AWS resource, of the flow. - **Name** *(string) --* The name of the flow. - **Outputs** *(list) --* The outputs in this flow. - *(dict) --* The settings for an output. - **Description** *(string) --* A description of the output. - **Destination** *(string) --* The address where you want to send the output. - **Encryption** *(dict) --* The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **EntitlementArn** *(string) --* The ARN of the entitlement on the originator''s flow. This value is relevant only on entitled flows. - **MediaLiveInputArn** *(string) --* The input ARN of the AWS Elemental MediaLive channel. This parameter is relevant only for outputs that were added by creating a MediaLive input. - **Name** *(string) --* The name of the output. This value must be unique within the current flow. - **OutputArn** *(string) --* The ARN of the output. - **Port** *(integer) --* The port to use when content is distributed to this output. - **Transport** *(dict) --* Attributes related to the transport stream that are used in the output. - **MaxBitrate** *(integer) --* The smoothing max bitrate for RTP and RTP-FEC streams. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Protocol** *(string) --* The protocol that is used by the source or output. - **SmoothingLatency** *(integer) --* The smoothing latency in milliseconds for RTP and RTP-FEC streams. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. - **Source** *(dict) --* The settings for the source of the flow. - **Decryption** *(dict) --* The type of encryption that is used on the content ingested from this source. - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **Description** *(string) --* A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account. - **EntitlementArn** *(string) --* The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow. - **IngestIp** *(string) --* The IP address that the flow will be listening on for incoming content. - **IngestPort** *(integer) --* The port that the flow will be listening on for incoming content. - **Name** *(string) --* The name of the source. - **SourceArn** *(string) --* The ARN of the source. - **Transport** *(dict) --* Attributes related to the transport stream that are used in the source. - **MaxBitrate** *(integer) --* The smoothing max bitrate for RTP and RTP-FEC streams. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Protocol** *(string) --* The protocol that is used by the source or output. - **SmoothingLatency** *(integer) --* The smoothing latency in milliseconds for RTP and RTP-FEC streams. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. - **WhitelistCidr** *(string) --* The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16. - **Status** *(string) --* The current status of the flow. :type AvailabilityZone: string :param AvailabilityZone: The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current AWS Region. :type Entitlements: list :param Entitlements: The entitlements that you want to grant on a flow. - *(dict) --* The entitlements that you want to grant on a flow. - **Description** *(string) --* A description of the entitlement. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the subscriber or end user. - **Encryption** *(dict) --* The type of encryption that will be used on the output that is associated with this entitlement. - **Algorithm** *(string) --* **[REQUIRED]** The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* **[REQUIRED]** The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* **[REQUIRED]** The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **Name** *(string) --* The name of the entitlement. This value must be unique within the current flow. - **Subscribers** *(list) --* **[REQUIRED]** The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flows using your content as the source. - *(string) --* :type Name: string :param Name: **[REQUIRED]** The name of the flow. :type Outputs: list :param Outputs: The outputs that you want to add to this flow. - *(dict) --* The output that you want to add to this flow. - **Description** *(string) --* A description of the output. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the end user. - **Destination** *(string) --* **[REQUIRED]** The IP address from which video will be sent to output destinations. - **Encryption** *(dict) --* The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **Algorithm** *(string) --* **[REQUIRED]** The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* **[REQUIRED]** The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* **[REQUIRED]** The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Name** *(string) --* The name of the output. This value must be unique within the current flow. - **Port** *(integer) --* **[REQUIRED]** The port to use when content is distributed to this output. - **Protocol** *(string) --* **[REQUIRED]** The protocol to use for the output. - **SmoothingLatency** *(integer) --* The smoothing latency in milliseconds for RTP and RTP-FEC streams. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. :type Source: dict :param Source: **[REQUIRED]** The settings for the source of the flow. - **Decryption** *(dict) --* The type of encryption that is used on the content ingested from this source. - **Algorithm** *(string) --* **[REQUIRED]** The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* **[REQUIRED]** The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* **[REQUIRED]** The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **Description** *(string) --* A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account. - **EntitlementArn** *(string) --* The ARN of the entitlement that allows you to subscribe to this flow. The entitlement is set by the flow originator, and the ARN is generated as part of the originator\'s flow. - **IngestPort** *(integer) --* The port that the flow will be listening on for incoming content. - **MaxBitrate** *(integer) --* The smoothing max bitrate for RTP and RTP-FEC streams. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Name** *(string) --* The name of the source. - **Protocol** *(string) --* The protocol that is used by the source. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. - **WhitelistCidr** *(string) --* The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16. :rtype: dict :returns: """ pass def delete_flow(self, FlowArn: str) -> Dict: """ Deletes a flow. Before you can delete a flow, you must stop the flow. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DeleteFlow>`_ **Request Syntax** :: response = client.delete_flow( FlowArn='string' ) **Response Syntax** :: { 'FlowArn': 'string', 'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR' } **Response Structure** - *(dict) --* AWS Elemental MediaConnect is deleting the flow. - **FlowArn** *(string) --* The ARN of the flow that was deleted. - **Status** *(string) --* The status of the flow when the DeleteFlow process begins. :type FlowArn: string :param FlowArn: **[REQUIRED]** The ARN of the flow that you want to delete. :rtype: dict :returns: """ pass def describe_flow(self, FlowArn: str) -> Dict: """ Displays the details of a flow. The response includes the flow ARN, name, and Availability Zone, as well as details about the source, outputs, and entitlements. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DescribeFlow>`_ **Request Syntax** :: response = client.describe_flow( FlowArn='string' ) **Response Syntax** :: { 'Flow': { 'AvailabilityZone': 'string', 'Description': 'string', 'EgressIp': 'string', 'Entitlements': [ { 'Description': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'EntitlementArn': 'string', 'Name': 'string', 'Subscribers': [ 'string', ] }, ], 'FlowArn': 'string', 'Name': 'string', 'Outputs': [ { 'Description': 'string', 'Destination': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'EntitlementArn': 'string', 'MediaLiveInputArn': 'string', 'Name': 'string', 'OutputArn': 'string', 'Port': 123, 'Transport': { 'MaxBitrate': 123, 'MaxLatency': 123, 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'SmoothingLatency': 123, 'StreamId': 'string' } }, ], 'Source': { 'Decryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'Description': 'string', 'EntitlementArn': 'string', 'IngestIp': 'string', 'IngestPort': 123, 'Name': 'string', 'SourceArn': 'string', 'Transport': { 'MaxBitrate': 123, 'MaxLatency': 123, 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'SmoothingLatency': 123, 'StreamId': 'string' }, 'WhitelistCidr': 'string' }, 'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR' }, 'Messages': { 'Errors': [ 'string', ] } } **Response Structure** - *(dict) --* AWS Elemental MediaConnect returned the flow details successfully. - **Flow** *(dict) --* The settings for a flow, including its source, outputs, and entitlements. - **AvailabilityZone** *(string) --* The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current AWS. - **Description** *(string) --* A description of the flow. This value is not used or seen outside of the current AWS Elemental MediaConnect account. - **EgressIp** *(string) --* The IP address from which video will be sent to output destinations. - **Entitlements** *(list) --* The entitlements in this flow. - *(dict) --* The settings for a flow entitlement. - **Description** *(string) --* A description of the entitlement. - **Encryption** *(dict) --* The type of encryption that will be used on the output that is associated with this entitlement. - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **EntitlementArn** *(string) --* The ARN of the entitlement. - **Name** *(string) --* The name of the entitlement. - **Subscribers** *(list) --* The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source. - *(string) --* - **FlowArn** *(string) --* The Amazon Resource Name (ARN), a unique identifier for any AWS resource, of the flow. - **Name** *(string) --* The name of the flow. - **Outputs** *(list) --* The outputs in this flow. - *(dict) --* The settings for an output. - **Description** *(string) --* A description of the output. - **Destination** *(string) --* The address where you want to send the output. - **Encryption** *(dict) --* The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **EntitlementArn** *(string) --* The ARN of the entitlement on the originator''s flow. This value is relevant only on entitled flows. - **MediaLiveInputArn** *(string) --* The input ARN of the AWS Elemental MediaLive channel. This parameter is relevant only for outputs that were added by creating a MediaLive input. - **Name** *(string) --* The name of the output. This value must be unique within the current flow. - **OutputArn** *(string) --* The ARN of the output. - **Port** *(integer) --* The port to use when content is distributed to this output. - **Transport** *(dict) --* Attributes related to the transport stream that are used in the output. - **MaxBitrate** *(integer) --* The smoothing max bitrate for RTP and RTP-FEC streams. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Protocol** *(string) --* The protocol that is used by the source or output. - **SmoothingLatency** *(integer) --* The smoothing latency in milliseconds for RTP and RTP-FEC streams. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. - **Source** *(dict) --* The settings for the source of the flow. - **Decryption** *(dict) --* The type of encryption that is used on the content ingested from this source. - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **Description** *(string) --* A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account. - **EntitlementArn** *(string) --* The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow. - **IngestIp** *(string) --* The IP address that the flow will be listening on for incoming content. - **IngestPort** *(integer) --* The port that the flow will be listening on for incoming content. - **Name** *(string) --* The name of the source. - **SourceArn** *(string) --* The ARN of the source. - **Transport** *(dict) --* Attributes related to the transport stream that are used in the source. - **MaxBitrate** *(integer) --* The smoothing max bitrate for RTP and RTP-FEC streams. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Protocol** *(string) --* The protocol that is used by the source or output. - **SmoothingLatency** *(integer) --* The smoothing latency in milliseconds for RTP and RTP-FEC streams. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. - **WhitelistCidr** *(string) --* The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16. - **Status** *(string) --* The current status of the flow. - **Messages** *(dict) --* Messages that provide the state of the flow. - **Errors** *(list) --* A list of errors that might have been generated from processes on this flow. - *(string) --* :type FlowArn: string :param FlowArn: **[REQUIRED]** The ARN of the flow that you want to describe. :rtype: dict :returns: """ pass def generate_presigned_url(self, ClientMethod: str = None, Params: Dict = None, ExpiresIn: int = None, HttpMethod: str = None): """ Generate a presigned url given a client, its method, and arguments :type ClientMethod: string :param ClientMethod: The client method to presign for :type Params: dict :param Params: The parameters normally passed to ``ClientMethod``. :type ExpiresIn: int :param ExpiresIn: The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds) :type HttpMethod: string :param HttpMethod: The http method to use on the generated url. By default, the http method is whatever is used in the method\'s model. :returns: The presigned url """ pass def get_paginator(self, operation_name: str = None) -> Paginator: """ Create a paginator for an operation. :type operation_name: string :param operation_name: The operation name. This is the same name as the method name on the client. For example, if the method name is ``create_foo``, and you\'d normally invoke the operation as ``client.create_foo(**kwargs)``, if the ``create_foo`` operation can be paginated, you can use the call ``client.get_paginator(\"create_foo\")``. :raise OperationNotPageableError: Raised if the operation is not pageable. You can use the ``client.can_paginate`` method to check if an operation is pageable. :rtype: L{botocore.paginate.Paginator} :return: A paginator object. """ pass def get_waiter(self, waiter_name: str = None) -> Waiter: """ Returns an object that can wait for some condition. :type waiter_name: str :param waiter_name: The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. :returns: The specified waiter object. :rtype: botocore.waiter.Waiter """ pass def grant_flow_entitlements(self, Entitlements: List, FlowArn: str) -> Dict: """ Grants entitlements to an existing flow. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/GrantFlowEntitlements>`_ **Request Syntax** :: response = client.grant_flow_entitlements( Entitlements=[ { 'Description': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'Name': 'string', 'Subscribers': [ 'string', ] }, ], FlowArn='string' ) **Response Syntax** :: { 'Entitlements': [ { 'Description': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'EntitlementArn': 'string', 'Name': 'string', 'Subscribers': [ 'string', ] }, ], 'FlowArn': 'string' } **Response Structure** - *(dict) --* AWS Elemental MediaConnect granted the entitlements successfully. - **Entitlements** *(list) --* The entitlements that were just granted. - *(dict) --* The settings for a flow entitlement. - **Description** *(string) --* A description of the entitlement. - **Encryption** *(dict) --* The type of encryption that will be used on the output that is associated with this entitlement. - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **EntitlementArn** *(string) --* The ARN of the entitlement. - **Name** *(string) --* The name of the entitlement. - **Subscribers** *(list) --* The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source. - *(string) --* - **FlowArn** *(string) --* The ARN of the flow that these entitlements were granted to. :type Entitlements: list :param Entitlements: **[REQUIRED]** The list of entitlements that you want to grant. - *(dict) --* The entitlements that you want to grant on a flow. - **Description** *(string) --* A description of the entitlement. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the subscriber or end user. - **Encryption** *(dict) --* The type of encryption that will be used on the output that is associated with this entitlement. - **Algorithm** *(string) --* **[REQUIRED]** The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* **[REQUIRED]** The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* **[REQUIRED]** The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **Name** *(string) --* The name of the entitlement. This value must be unique within the current flow. - **Subscribers** *(list) --* **[REQUIRED]** The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flows using your content as the source. - *(string) --* :type FlowArn: string :param FlowArn: **[REQUIRED]** The flow that you want to grant entitlements on. :rtype: dict :returns: """ pass def list_entitlements(self, MaxResults: int = None, NextToken: str = None) -> Dict: """ Displays a list of all entitlements that have been granted to this account. This request returns 20 results per page. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListEntitlements>`_ **Request Syntax** :: response = client.list_entitlements( MaxResults=123, NextToken='string' ) **Response Syntax** :: { 'Entitlements': [ { 'EntitlementArn': 'string', 'EntitlementName': 'string' }, ], 'NextToken': 'string' } **Response Structure** - *(dict) --* AWS Elemental MediaConnect returned the list of entitlements successfully. - **Entitlements** *(list) --* A list of entitlements that have been granted to you from other AWS accounts. - *(dict) --* An entitlement that has been granted to you from other AWS accounts. - **EntitlementArn** *(string) --* The ARN of the entitlement. - **EntitlementName** *(string) --* The name of the entitlement. - **NextToken** *(string) --* The token that identifies which batch of results that you want to see. For example, you submit a ListEntitlements request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListEntitlements request a second time and specify the NextToken value. :type MaxResults: integer :param MaxResults: The maximum number of results to return per API request. For example, you submit a ListEntitlements request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 20 results per page. :type NextToken: string :param NextToken: The token that identifies which batch of results that you want to see. For example, you submit a ListEntitlements request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListEntitlements request a second time and specify the NextToken value. :rtype: dict :returns: """ pass def list_flows(self, MaxResults: int = None, NextToken: str = None) -> Dict: """ Displays a list of flows that are associated with this account. This request returns a paginated result. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListFlows>`_ **Request Syntax** :: response = client.list_flows( MaxResults=123, NextToken='string' ) **Response Syntax** :: { 'Flows': [ { 'AvailabilityZone': 'string', 'Description': 'string', 'FlowArn': 'string', 'Name': 'string', 'SourceType': 'OWNED'|'ENTITLED', 'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR' }, ], 'NextToken': 'string' } **Response Structure** - *(dict) --* AWS Elemental MediaConnect returned the list of flows successfully. - **Flows** *(list) --* A list of flow summaries. - *(dict) --* Provides a summary of a flow, including its ARN, Availability Zone, and source type. - **AvailabilityZone** *(string) --* The Availability Zone that the flow was created in. - **Description** *(string) --* A description of the flow. - **FlowArn** *(string) --* The ARN of the flow. - **Name** *(string) --* The name of the flow. - **SourceType** *(string) --* The type of source. This value is either owned (originated somewhere other than an AWS Elemental MediaConnect flow owned by another AWS account) or entitled (originated at an AWS Elemental MediaConnect flow owned by another AWS account). - **Status** *(string) --* The current status of the flow. - **NextToken** *(string) --* The token that identifies which batch of results that you want to see. For example, you submit a ListFlows request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListFlows request a second time and specify the NextToken value. :type MaxResults: integer :param MaxResults: The maximum number of results to return per API request. For example, you submit a ListFlows request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page. :type NextToken: string :param NextToken: The token that identifies which batch of results that you want to see. For example, you submit a ListFlows request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListFlows request a second time and specify the NextToken value. :rtype: dict :returns: """ pass def list_tags_for_resource(self, ResourceArn: str) -> Dict: """ List all tags on an AWS Elemental MediaConnect resource See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListTagsForResource>`_ **Request Syntax** :: response = client.list_tags_for_resource( ResourceArn='string' ) **Response Syntax** :: { 'Tags': { 'string': 'string' } } **Response Structure** - *(dict) --* The tags for the resource - **Tags** *(dict) --* A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. - *(string) --* - *(string) --* :type ResourceArn: string :param ResourceArn: **[REQUIRED]** The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect resource for which to list the tags. :rtype: dict :returns: """ pass def remove_flow_output(self, FlowArn: str, OutputArn: str) -> Dict: """ Removes an output from an existing flow. This request can be made only on an output that does not have an entitlement associated with it. If the output has an entitlement, you must revoke the entitlement instead. When an entitlement is revoked from a flow, the service automatically removes the associated output. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowOutput>`_ **Request Syntax** :: response = client.remove_flow_output( FlowArn='string', OutputArn='string' ) **Response Syntax** :: { 'FlowArn': 'string', 'OutputArn': 'string' } **Response Structure** - *(dict) --* output successfully removed from flow configuration. - **FlowArn** *(string) --* The ARN of the flow that is associated with the output you removed. - **OutputArn** *(string) --* The ARN of the output that was removed. :type FlowArn: string :param FlowArn: **[REQUIRED]** The flow that you want to remove an output from. :type OutputArn: string :param OutputArn: **[REQUIRED]** The ARN of the output that you want to remove. :rtype: dict :returns: """ pass def revoke_flow_entitlement(self, EntitlementArn: str, FlowArn: str) -> Dict: """ Revokes an entitlement from a flow. Once an entitlement is revoked, the content becomes unavailable to the subscriber and the associated output is removed. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement>`_ **Request Syntax** :: response = client.revoke_flow_entitlement( EntitlementArn='string', FlowArn='string' ) **Response Syntax** :: { 'EntitlementArn': 'string', 'FlowArn': 'string' } **Response Structure** - *(dict) --* AWS Elemental MediaConnect revoked the entitlement successfully. - **EntitlementArn** *(string) --* The ARN of the entitlement that was revoked. - **FlowArn** *(string) --* The ARN of the flow that the entitlement was revoked from. :type EntitlementArn: string :param EntitlementArn: **[REQUIRED]** The ARN of the entitlement that you want to revoke. :type FlowArn: string :param FlowArn: **[REQUIRED]** The flow that you want to revoke an entitlement from. :rtype: dict :returns: """ pass def start_flow(self, FlowArn: str) -> Dict: """ Starts a flow. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow>`_ **Request Syntax** :: response = client.start_flow( FlowArn='string' ) **Response Syntax** :: { 'FlowArn': 'string', 'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR' } **Response Structure** - *(dict) --* AWS Elemental MediaConnect is starting the flow. - **FlowArn** *(string) --* The ARN of the flow that you started. - **Status** *(string) --* The status of the flow when the StartFlow process begins. :type FlowArn: string :param FlowArn: **[REQUIRED]** The ARN of the flow that you want to start. :rtype: dict :returns: """ pass def stop_flow(self, FlowArn: str) -> Dict: """ Stops a flow. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow>`_ **Request Syntax** :: response = client.stop_flow( FlowArn='string' ) **Response Syntax** :: { 'FlowArn': 'string', 'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR' } **Response Structure** - *(dict) --* AWS Elemental MediaConnect is stopping the flow. - **FlowArn** *(string) --* The ARN of the flow that you stopped. - **Status** *(string) --* The status of the flow when the StopFlow process begins. :type FlowArn: string :param FlowArn: **[REQUIRED]** The ARN of the flow that you want to stop. :rtype: dict :returns: """ pass def tag_resource(self, ResourceArn: str, Tags: Dict): """ Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/TagResource>`_ **Request Syntax** :: response = client.tag_resource( ResourceArn='string', Tags={ 'string': 'string' } ) :type ResourceArn: string :param ResourceArn: **[REQUIRED]** The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect resource to which to add tags. :type Tags: dict :param Tags: **[REQUIRED]** A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. - *(string) --* - *(string) --* :returns: None """ pass def untag_resource(self, ResourceArn: str, TagKeys: List): """ Deletes specified tags from a resource. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UntagResource>`_ **Request Syntax** :: response = client.untag_resource( ResourceArn='string', TagKeys=[ 'string', ] ) :type ResourceArn: string :param ResourceArn: **[REQUIRED]** The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect resource from which to delete tags. :type TagKeys: list :param TagKeys: **[REQUIRED]** The keys of the tags to be removed. - *(string) --* :returns: None """ pass def update_flow_entitlement(self, EntitlementArn: str, FlowArn: str, Description: str = None, Encryption: Dict = None, Subscribers: List = None) -> Dict: """ You can change an entitlement's description, subscribers, and encryption. If you change the subscribers, the service will remove the outputs that are are used by the subscribers that are removed. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowEntitlement>`_ **Request Syntax** :: response = client.update_flow_entitlement( Description='string', Encryption={ 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, EntitlementArn='string', FlowArn='string', Subscribers=[ 'string', ] ) **Response Syntax** :: { 'Entitlement': { 'Description': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'EntitlementArn': 'string', 'Name': 'string', 'Subscribers': [ 'string', ] }, 'FlowArn': 'string' } **Response Structure** - *(dict) --* AWS Elemental MediaConnect updated the entitlement successfully. - **Entitlement** *(dict) --* The settings for a flow entitlement. - **Description** *(string) --* A description of the entitlement. - **Encryption** *(dict) --* The type of encryption that will be used on the output that is associated with this entitlement. - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **EntitlementArn** *(string) --* The ARN of the entitlement. - **Name** *(string) --* The name of the entitlement. - **Subscribers** *(list) --* The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source. - *(string) --* - **FlowArn** *(string) --* The ARN of the flow that this entitlement was granted on. :type Description: string :param Description: A description of the entitlement. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the subscriber or end user. :type Encryption: dict :param Encryption: The type of encryption that will be used on the output associated with this entitlement. - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. :type EntitlementArn: string :param EntitlementArn: **[REQUIRED]** The ARN of the entitlement that you want to update. :type FlowArn: string :param FlowArn: **[REQUIRED]** The flow that is associated with the entitlement that you want to update. :type Subscribers: list :param Subscribers: The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source. - *(string) --* :rtype: dict :returns: """ pass def update_flow_output(self, FlowArn: str, OutputArn: str, Description: str = None, Destination: str = None, Encryption: Dict = None, MaxLatency: int = None, Port: int = None, Protocol: str = None, SmoothingLatency: int = None, StreamId: str = None) -> Dict: """ Updates an existing flow output. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowOutput>`_ **Request Syntax** :: response = client.update_flow_output( Description='string', Destination='string', Encryption={ 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, FlowArn='string', MaxLatency=123, OutputArn='string', Port=123, Protocol='zixi-push'|'rtp-fec'|'rtp', SmoothingLatency=123, StreamId='string' ) **Response Syntax** :: { 'FlowArn': 'string', 'Output': { 'Description': 'string', 'Destination': 'string', 'Encryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'EntitlementArn': 'string', 'MediaLiveInputArn': 'string', 'Name': 'string', 'OutputArn': 'string', 'Port': 123, 'Transport': { 'MaxBitrate': 123, 'MaxLatency': 123, 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'SmoothingLatency': 123, 'StreamId': 'string' } } } **Response Structure** - *(dict) --* AWS Elemental MediaConnect updated the output successfully. - **FlowArn** *(string) --* The ARN of the flow that is associated with the updated output. - **Output** *(dict) --* The settings for an output. - **Description** *(string) --* A description of the output. - **Destination** *(string) --* The address where you want to send the output. - **Encryption** *(dict) --* The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **EntitlementArn** *(string) --* The ARN of the entitlement on the originator''s flow. This value is relevant only on entitled flows. - **MediaLiveInputArn** *(string) --* The input ARN of the AWS Elemental MediaLive channel. This parameter is relevant only for outputs that were added by creating a MediaLive input. - **Name** *(string) --* The name of the output. This value must be unique within the current flow. - **OutputArn** *(string) --* The ARN of the output. - **Port** *(integer) --* The port to use when content is distributed to this output. - **Transport** *(dict) --* Attributes related to the transport stream that are used in the output. - **MaxBitrate** *(integer) --* The smoothing max bitrate for RTP and RTP-FEC streams. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Protocol** *(string) --* The protocol that is used by the source or output. - **SmoothingLatency** *(integer) --* The smoothing latency in milliseconds for RTP and RTP-FEC streams. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. :type Description: string :param Description: A description of the output. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the end user. :type Destination: string :param Destination: The IP address where you want to send the output. :type Encryption: dict :param Encryption: The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. :type FlowArn: string :param FlowArn: **[REQUIRED]** The flow that is associated with the output that you want to update. :type MaxLatency: integer :param MaxLatency: The maximum latency in milliseconds for Zixi-based streams. :type OutputArn: string :param OutputArn: **[REQUIRED]** The ARN of the output that you want to update. :type Port: integer :param Port: The port to use when content is distributed to this output. :type Protocol: string :param Protocol: The protocol to use for the output. :type SmoothingLatency: integer :param SmoothingLatency: The smoothing latency in milliseconds for RTP and RTP-FEC streams. :type StreamId: string :param StreamId: The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. :rtype: dict :returns: """ pass def update_flow_source(self, FlowArn: str, SourceArn: str, Decryption: Dict = None, Description: str = None, EntitlementArn: str = None, IngestPort: int = None, MaxBitrate: int = None, MaxLatency: int = None, Protocol: str = None, StreamId: str = None, WhitelistCidr: str = None) -> Dict: """ Updates the source of a flow. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowSource>`_ **Request Syntax** :: response = client.update_flow_source( Decryption={ 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, Description='string', EntitlementArn='string', FlowArn='string', IngestPort=123, MaxBitrate=123, MaxLatency=123, Protocol='zixi-push'|'rtp-fec'|'rtp', SourceArn='string', StreamId='string', WhitelistCidr='string' ) **Response Syntax** :: { 'FlowArn': 'string', 'Source': { 'Decryption': { 'Algorithm': 'aes128'|'aes192'|'aes256', 'KeyType': 'static-key', 'RoleArn': 'string', 'SecretArn': 'string' }, 'Description': 'string', 'EntitlementArn': 'string', 'IngestIp': 'string', 'IngestPort': 123, 'Name': 'string', 'SourceArn': 'string', 'Transport': { 'MaxBitrate': 123, 'MaxLatency': 123, 'Protocol': 'zixi-push'|'rtp-fec'|'rtp', 'SmoothingLatency': 123, 'StreamId': 'string' }, 'WhitelistCidr': 'string' } } **Response Structure** - *(dict) --* AWS Elemental MediaConnect updated the flow successfully. - **FlowArn** *(string) --* The ARN of the flow that you want to update. - **Source** *(dict) --* The settings for the source of the flow. - **Decryption** *(dict) --* The type of encryption that is used on the content ingested from this source. - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. - **Description** *(string) --* A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account. - **EntitlementArn** *(string) --* The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow. - **IngestIp** *(string) --* The IP address that the flow will be listening on for incoming content. - **IngestPort** *(integer) --* The port that the flow will be listening on for incoming content. - **Name** *(string) --* The name of the source. - **SourceArn** *(string) --* The ARN of the source. - **Transport** *(dict) --* Attributes related to the transport stream that are used in the source. - **MaxBitrate** *(integer) --* The smoothing max bitrate for RTP and RTP-FEC streams. - **MaxLatency** *(integer) --* The maximum latency in milliseconds for Zixi-based streams. - **Protocol** *(string) --* The protocol that is used by the source or output. - **SmoothingLatency** *(integer) --* The smoothing latency in milliseconds for RTP and RTP-FEC streams. - **StreamId** *(string) --* The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. - **WhitelistCidr** *(string) --* The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16. :type Decryption: dict :param Decryption: The type of encryption used on the content ingested from this source. - **Algorithm** *(string) --* The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256). - **KeyType** *(string) --* The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key). - **RoleArn** *(string) --* The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity). - **SecretArn** *(string) --* The ARN that was assigned to the secret that you created in AWS Secrets Manager to store the encryption key. :type Description: string :param Description: A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account. :type EntitlementArn: string :param EntitlementArn: The ARN of the entitlement that allows you to subscribe to this flow. The entitlement is set by the flow originator, and the ARN is generated as part of the originator\'s flow. :type FlowArn: string :param FlowArn: **[REQUIRED]** The flow that is associated with the source that you want to update. :type IngestPort: integer :param IngestPort: The port that the flow will be listening on for incoming content. :type MaxBitrate: integer :param MaxBitrate: The smoothing max bitrate for RTP and RTP-FEC streams. :type MaxLatency: integer :param MaxLatency: The maximum latency in milliseconds for Zixi-based streams. :type Protocol: string :param Protocol: The protocol that is used by the source. :type SourceArn: string :param SourceArn: **[REQUIRED]** The ARN of the source that you want to update. :type StreamId: string :param StreamId: The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams. :type WhitelistCidr: string :param WhitelistCidr: The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16. :rtype: dict :returns: """ pass
63.321541
534
0.557254
8,731
80,545
5.129997
0.048906
0.032753
0.011788
0.015227
0.864791
0.841572
0.830141
0.819178
0.806542
0.794776
0
0.013023
0.340307
80,545
1,271
535
63.371361
0.829924
0.846905
0
0.42
0
0
0
0
0
0
0
0
0
1
0.42
false
0.42
0.14
0
0.58
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
10
65b332e489c7e16a04acfdd999d494c895fe699f
115,233
py
Python
src/testes/testeee.py
brunoadriano17/eye-tracking-data
f7209a2e5c8b143e340b7b9fd235e59dd8e9daec
[ "MIT" ]
null
null
null
src/testes/testeee.py
brunoadriano17/eye-tracking-data
f7209a2e5c8b143e340b7b9fd235e59dd8e9daec
[ "MIT" ]
null
null
null
src/testes/testeee.py
brunoadriano17/eye-tracking-data
f7209a2e5c8b143e340b7b9fd235e59dd8e9daec
[ "MIT" ]
null
null
null
import cv2 as cv import matplotlib.pyplot as plt import numpy as np import os, os.path import random import pygame import ctypes import time # vet = [[[3.52625625, 5.65624626]], [[1.08089428, 5.95952864]], [[3.06282096, 8.19661217]], [[3.67186725, 8.86494112]], [[2.13712397, 7.25919361]], [[4.48783541, 6.46264601]], [[3.93641071, 7.67810726]], [[1.58168745, 7.63433313]], [[2.41893469, 8.11789317]], [[0.75610791, 8.6446355 ]], [[2.20640978, 8.38431938]], [[0.03815652, 7.10716458]], [[1.71612161, 7.3317596 ]], [[-1.75014918, 4.47272139]], [[-1.00157106, 5.49700185]], [[-3.60355266, 5.78943821]], [[-2.73193713, 5.23952238]], [[-2.48165423, 6.27646033]], [[-1.64774206, 4.82670069]], [[-2.05111197, 6.52558827]], [[-1.42057368, 3.90044485]], [[-1.66283632, 4.81951731]], [[-0.85239222, 4.98911169]], [[-1.79580205, 4.83288305]], [[-1.07461049, 5.80498394]], [[-2.24173062, 6.32123933]], [[-1.16269516, 7.40534151]], [[0.126876 , 6.83107341]], [[-0.49922069, 7.52228489]], [[0.34630793, 7.64973999]], [[0.35296107, 7.56545907]], [[0.1613654 , 8.39196813]], [[-0.62497378, 8.27184056]], [[-0.42093561, 7.63471911]], [[-0.36607145, 7.23626108]], [[-0.5802558 , 7.57467936]], [[-0.46641694, 7.6037292 ]], [[-0.49776484, 7.651459 ]], [[-1.18518701, 7.41675411]], [[-0.5599551 , 7.61716217]], [[-0.41016971, 6.86783273]], [[-0.39142297, 6.71599006]], [[-0.38082803, 6.79547418]], [[-0.42165447, 6.68642123]], [[-1.3704013 , 7.40333281]], [[-1.21993717, 7.37120481]], [[-1.45792717, 7.35260321]], [[-1.50770906, 6.37090599]], [[-2.91837232, 6.24930657]], [[-2.4430754 , 6.35760964]], [[-1.85978252, 7.23956087]], [[-1.12753901, 7.46717044]], [[-0.39308982, 8.21320079]], [[-1.65934686, 7.35866494]], [[-1.17905947, 7.39450908]], [[-1.13054614, 8.05682762]], [[-0.54598512, 8.22723075]], [[-2.08293007, 7.08180845]], [[-1.71231985, 7.14234777]], [[-1.53454256, 4.69545846]], [[-1.21297338, 2.96232374]], [[-1.06715722, 2.25897899]], [[-2.2615181 , 2.86027491]], [[-2.33679485, 7.1099803 ]], [[-1.05803223, 7.10351372]], [[-1.01667881, 7.3640902 ]], [[-0.93348627, 7.39740171]], [[-3.41541011, 5.8317987 ]], [[-2.53790721, 5.23610226]], [[-6.19925387, 5.63623283]], [[-7.71496803, 4.08582186]], [[-7.74248538, 5.16610846]], [[-7.49023548, 5.07152269]], [[-8.06104224, 5.97366996]], [[-6.3428569, 5.6185693]], [[-7.70705469, 6.7935417 ]], [[-8.24008097, 6.87514386]], [[-8.61987812, 6.71962371]], [[-8.06341096, 7.00351563]], [[-7.8365779 , 6.43227634]], [[-6.0700366 , 6.52321695]], [[-6.17484592, 5.54710351]], [[-5.2679984 , 5.75078974]], [[-5.32413702, 4.79299593]], [[-4.53456891, 4.91914916]], [[-3.97712182, 5.00966011]], [[-3.12588449, 5.15437507]], [[-3.09505663, 5.25854433]], [[-3.1080882 , 5.27854153]], [[-3.09605571, 5.41042365]], [[-3.53708402, 5.32308821]], [[-3.97290667, 5.21486769]], [[-3.42659959, 5.23734192]], [[-2.8686767 , 4.47519794]], [[-2.91138527, 5.35412881]], [[-2.8509927 , 4.56934114]], [[-2.98414851, 4.81629595]], [[-3.15963015, 6.24378988]], [[-3.12110229, 6.25004766]], [[-4.02582921, 6.14486217]], [[-4.7508067 , 5.98173237]], [[-4.22221759, 6.160274 ]], [[-4.11874906, 5.83994699]], [[-3.68172927, 5.25886685]], [[-3.80658154, 5.33972218]], [[-3.9267671 , 5.40492123]], [[-4.64480876, 5.27565662]], [[-3.7405536 , 5.35635208]], [[-3.80487541, 5.30428696]], [[-3.91588865, 6.0591618 ]], [[-3.57341818, 6.08692262]], [[-3.87047239, 6.03879451]], [[-3.8067292 , 6.03061319]], [[-3.03768652, 6.18985295]], [[-2.93637605, 5.83723573]], [[-2.21772541, 5.40832812]], [[-3.7617563 , 5.42896941]], [[-3.72596576, 5.29706606]], [[-3.67228408, 5.2603379 ]], [[-2.8127924 , 4.88741055]], [[-2.8181659 , 4.36971726]], [[-2.66538825, 5.3957495 ]], [[-2.77912021, 6.04453683]], [[-3.65954328, 6.15223861]], [[-4.80051279, 6.01100206]], [[-3.90964267, 5.93744235]], [[-2.76170521, 5.27650328]], [[-8.19084847, 2.84775722]], [[-8.15500904, 2.69978687]], [[-9.5904695 , 2.57412128]], [[-8.59483786, 2.67901074]], [[-10.39799221, 1.59484177]], [[-9.45202434, 2.8110786 ]], [[-11.16622135, 2.96183677]], [[-9.58470908, 3.91264481]], [[-10.60276985, 4.22600979]], [[-9.67616262, 4.32117663]], [[-12.74692771, 5.31136916]], [[-11.1280201, 7.1945232]], [[-13.90327952, 7.40141773]], [[-12.91997808, 7.76756543]], [[-12.58891284, 7.97830287]], [[-9.87652609, 8.14801198]], [[-10.7091423 , 8.66699498]], [[-10.84220748, 9.20115795]], [[-12.81327783, 9.50013347]], [[-10.79663737, 9.36719742]], [[-11.02068736, 8.87458881]], [[-9.34717553, 9.16613159]], [[-8.6636036, 9.2200985]], [[-8.60886012, 9.53093982]], [[-9.56075839, 9.23738287]], [[-9.68841496, 9.25097205]], [[-7.68666405, 10.03589349]], [[-8.29946022, 9.18352018]], [[-8.5271731 , 9.22447075]], [[-9.38701168, 9.26886926]], [[-8.69891748, 9.43695541]], [[-9.57198531, 9.37944852]], [[-8.74882097, 9.30524041]], [[-8.64676268, 9.40268416]], [[-9.64307744, 10.43935985]], [[-9.58535822, 10.51692553]], [[-9.53120022, 9.32016985]], [[-8.91652851, 10.02882367]], [[-9.70910858, 9.76326468]], [[-9.36647512, 10.05840405]], [[-9.41032093, 10.19449086]], [[-8.52200758, 9.36787163]], [[-8.61847557, 10.29734112]], [[-9.59532692, 9.56156844]], [[-7.67188067, 9.11702027]], [[-9.38956643, 9.2535422 ]], [[-9.44563773, 9.40206413]], [[-9.5915243 , 9.33348455]], [[-9.69716175, 9.16648482]], [[-10.72072122, 9.76771955]], [[-9.51972244, 9.62176919]], [[-10.14379949, 9.61465127]], [[-14.83092499, 3.65337753]], [[-7.45381169, 3.11079035]], [[-6.22690697, 4.87035618]], [[-7.68114548, 8.15238609]], [[-9.44222274, 7.39499288]], [[-7.65059395, 8.22766628]], [[-11.01277976, 10.04922113]], [[-9.77901459, 9.5170723 ]], [[-9.78177452, 7.59693766]], [[-10.62707269, 7.53286935]], [[-11.45876384, 7.37639097]], [[-11.41069596, 8.36017754]], [[-10.07591435, 6.51061778]], [[-9.63468847, 7.14467765]], [[-7.88587498, 7.6105751 ]], [[-10.01593581, 7.28870503]], [[-10.87146704, 6.61579177]], [[-10.97470939, 6.70377199]], [[-9.97777143, 5.66931388]], [[-9.225865 , 5.69443596]], [[-11.00324408, 5.87192313]], [[-10.10299879, 5.93534278]], [[-10.09755017, 5.69826558]], [[-10.27550603, 5.58277039]], [[-10.00171811, 4.63759771]], [[-10.05082902, 5.72979635]], [[-10.14942233, 5.59244472]], [[-9.13389035, 4.81680881]], [[-9.09541013, 3.69149732]], [[-10.67484759, 0.93942536]], [[-11.66038715, 1.88113457]], [[-11.86773642, 1.97354797]], [[-11.6630624 , 1.26090142]], [[-11.54331795, 6.30201572]], [[-11.76841984, 5.23019901]], [[-10.73030116, 6.77367471]], [[-10.40171436, 6.67823048]], [[-9.90424145, 6.97483924]], [[-9.88395892, 6.66985986]], [[-9.90643419, 7.30835881]], [[-10.79012752, 5.7879889 ]], [[-10.79261767, 5.71944375]], [[-9.90459174, 6.86621971]], [[-10.83715403, 7.34864712]], [[-8.96946534, 6.69915853]], [[-9.01866207, 7.65353559]], [[-10.49371543, 6.72375692]], [[-9.22344037, 7.35040999]], [[-10.12487706, 6.63909973]], [[-8.69588226, 6.70038817]], [[-8.07192718, 5.79418756]], [[-10.24306711, 7.5688082 ]], [[-11.1997735 , 6.62972184]], [[-10.31859448, 7.87508373]], [[-10.98978303, 6.67788876]], [[-10.30156442, 6.52196719]], [[-9.1142834 , 6.72788876]], [[-9.24163034, 7.31818518]], [[-9.32884337, 7.37047773]], [[-9.99034391, 6.53895964]], [[-5.95078411, 5.04495449]], [[-20.97639196, 7.98339179]], [[-10.83600597, 1.00744786]], [[-7.05000954, 2.70009193]], [[-7.22630682, 8.19759293]], [[-10.96732914, 8.93505676]], [[-13.5748601 , 5.77558541]], [[-9.90044973, 6.70588119]], [[-7.25715418, 5.44327836]], [[-6.14500007, 4.74556005]], [[-4.52524916, 6.78236617]], [[-3.79592972, 7.50228018]], [[-3.70349212, 5.86184711]], [[-2.98775178, 6.87907062]], [[-3.86192599, 6.72662258]], [[-4.88021199, 7.38595472]], [[-5.81205566, 6.10060623]], [[-5.95938751, 7.03991172]], [[-7.75694266, 5.76793427]], [[-7.06861346, 6.73503741]], [[-8.78534103, 6.50701426]], [[-7.75427184, 5.30457291]], [[-7.76095293, 5.5593311 ]], [[-9.68134069, 5.18092591]], [[-8.06165489, 6.25915267]], [[-9.68864917, 5.78074934]], [[-10.02608998, 5.81925797]], [[-10.80454102, 4.62152431]], [[-11.03254494, 4.4817915 ]], [[-10.54585793, 4.52219048]], [[-11.51821336, 3.743065 ]], [[-10.65617624, 3.67041155]], [[-10.81352679, 4.73514557]], [[-11.87009566, 4.35560111]], [[-11.71284088, 4.30912731]], [[-11.5930582 , 3.52917677]], [[-11.62555503, 4.33200361]], [[-11.51250066, 4.56204511]], [[-10.8637919 , 4.68348962]], [[-11.30041907, 6.46267937]], [[-11.30071729, 5.51297853]], [[-12.08833625, 6.27038355]], [[-12.16872944, 6.22469774]], [[-11.18248718, 6.32612283]], [[-12.10732943, 5.42323368]], [[-11.04299904, 5.47147103]], [[-12.02182702, 6.31804984]], [[-11.39167747, 7.19336436]], [[-12.0104379 , 6.05792174]], [[-11.92921357, 5.76560332]], [[-10.98171323, 6.35545609]], [[-10.95844344, 6.40680841]], [[-10.87200275, 6.16449375]], [[-11.72490666, 5.75048199]], [[-10.91771553, 6.52007223]], [[-10.93360946, 6.18857492]], [[-11.07461244, 6.4114306 ]], [[-11.94213759, 6.10387385]], [[-11.07876861, 6.26332584]], [[-12.04788078, 6.16837133]], [[-4.76720431, 3.00472217]], [[-3.61398649, 3.45280313]], [[-4.97837746, 4.19876564]], [[-5.9395822 , 4.83582318]], [[-8.75156937, 3.24957199]], [[-10.0124352 , 3.71282444]], [[-8.51670895, 3.83294277]], [[-10.51938362, 4.50156407]], [[-7.08040395, 3.48953848]], [[-5.40286771, 4.83570271]], [[-5.46811912, 4.83236085]], [[-6.32579789, 4.52849903]], [[-5.45162191, 4.7731125 ]], [[-8.98602309, 3.12179995]], [[-7.49961154, 4.36319843]], [[-9.46512244, 4.80612906]], [[-9.50913595, 4.45885218]], [[-9.42480437, 3.89549221]], [[-10.61186175, 4.52694656]], [[-11.66838238, 4.28712093]], [[-9.95264029, 4.93637824]], [[-10.65963833, 3.86798857]], [[-9.72305649, 4.69887727]], [[-11.78947426, 4.21911951]], [[-9.68488629, 4.54033181]], [[-10.87270778, 4.48899109]], [[-11.55971952, 4.173991 ]], [[-9.74882861, 3.69399966]], [[-10.34530361, 2.45717786]], [[-10.75111032, 3.47515522]], [[-10.41850831, 3.60298757]], [[-9.61302959, 3.64941201]], [[-9.33541681, 3.85533409]], [[-10.54705029, 4.55305198]], [[-9.75088032, 4.74710567]], [[-8.43900684, 3.60900088]], [[-9.63964645, 4.40534906]], [[-9.01458646, 2.11875131]], [[-10.00395182, 2.33575603]], [[-10.95780409, 1.30515382]], [[-10.49418231, 3.4588501 ]], [[-9.04519722, 2.54760006]], [[-9.27359114, 2.46092967]], [[-9.00405909, 1.54799605]], [[-11.23714811, 3.00175055]], [[-11.1414827 , 2.02168624]], [[-10.89756929, 1.30730649]], [[-10.32599237, 2.39487809]], [[-11.12355013, 2.23198952]], [[-10.78709435, 3.35919985]], [[-10.88157003, 3.34308647]], [[-10.89082622, 3.13397176]], [[-10.73338824, 3.26817624]], [[-11.48958133, 3.18480551]], [[-10.75216679, 4.47145539]], [[-10.79165356, 4.40114777]], [[-9.70997271, 4.83669039]], [[-9.25939174, 2.69751057]], [[-9.57663202, 3.22723411]], [[-10.58358508, 3.32629362]], [[-2.11511178, 4.67545567]], [[-4.01952558, 4.758921 ]], [[-8.4079916 , 5.92717535]], [[-10.32826488, 3.17099819]], [[-11.40325711, 2.36173587]], [[-11.35596721, 2.3753406 ]], [[-8.56383705, 4.13712349]], [[-12.03739829, 4.23820696]], [[-13.02169812, 3.20166743]], [[-11.95899638, 2.63774083]], [[-11.80767244, 2.08522352]], [[-11.15440039, 2.44630145]], [[-10.63746432, 1.39316572]], [[-10.70692625, 0.8600075 ]], [[-10.42787853, 0.61198582]], [[-10.18912932, 1.68568339]], [[-9.58152111, -0.27442641]], [[-9.64654856, -0.25358643]], [[-9.29127492, -1.15188903]], [[-8.68857996, -0.15812207]], [[-8.75857789, -0.16725663]], [[-9.45772882, -0.38140646]], [[-9.72593736, -0.35192329]], [[-10.64941967, 0.44979703]], [[-10.56224804, 0.51662419]], [[-9.96091706, 0.81315481]], [[-11.1288122 , 1.36808348]], [[-10.81478113, 1.40697896]], [[-10.01375436, 1.47979052]], [[-9.74404319, 0.59742012]], [[-10.21436312, 1.56972666]], [[-9.11111057, 1.68035542]], [[-9.52441878, 3.40838493]], [[-9.49725432, 3.51420647]], [[-9.25823674, 4.51253686]], [[-10.40766599, 4.19534767]], [[-10.86251974, 1.136758 ]], [[-8.99275252, 0.68862386]], [[-9.77982196, 0.52530645]], [[-9.80148406, 1.67663492]], [[-10.56113374, 2.22293912]], [[-10.85089739, 2.11280727]], [[-10.53849626, 3.30030623]], [[-10.61611465, 2.06064139]], [[-10.30853566, 1.20795583]], [[-10.42071219, 1.29111512]], [[-10.06158952, 0.31888967]], [[-9.73526019, -0.63069115]], [[-9.17409282, -0.37162225]], [[-9.91937671, 0.49243508]], [[-9.83644483, 0.56314867]], [[-10.4309222 , 3.41551632]], [[-10.87566261, 2.19884364]], [[-9.98919218, 1.40983865]], [[-10.77707982, 1.081908 ]], [[-10.85477577, 1.12894652]], [[-10.81892368, 3.1960024 ]], [[-10.08454789, 1.11412968]], [[-11.0274785 , 0.17368704]], [[-10.77933243, 0.27230974]], [[-1.14446588, 3.36104121]], [[-4.50894618, 1.13752782]], [[-11.78678861, 1.72822115]], [[-10.96186819, 0.19502902]], [[-11.69284525, -1.08063235]], [[-11.99484949, -0.13127723]], [[-13.92250414, -1.62029192]], [[-15.21393726, 1.07757218]], [[-13.44679399, 3.80647945]], [[-15.89851577, 1.11279521]], [[-13.45090715, 1.53951793]], [[-13.47190931, 2.53222058]], [[-12.65437557, 2.90303217]], [[-12.90694689, 3.86702078]], [[-11.72734615, 3.37925234]], [[-11.06231453, 5.25873986]], [[-11.16051353, 5.48577162]], [[-11.85942263, 4.42842808]], [[-11.15623265, 5.54307999]], [[-11.24884673, 5.52498856]], [[-11.51786316, 3.53128008]], [[-10.22261382, 2.67703691]], [[-12.55373415, 4.13191133]], [[-12.8373081 , 5.01681837]], [[-11.89554264, 5.46352981]], [[-11.14757448, 5.60255184]], [[-11.83262906, 4.46838771]], [[-11.83265321, 4.46460038]], [[-11.88728248, 5.26528862]], [[-11.73609063, 4.78396272]], [[-11.86121073, 5.60290008]], [[-11.8629297 , 5.68815397]], [[-11.86154788, 5.72457324]], [[-12.58399192, 5.35190822]], [[-12.90249144, 5.89165108]], [[-12.56911403, 5.11127087]], [[-12.22477045, 4.25990573]], [[-12.53748714, 4.38102059]], [[-12.65940771, 5.20198215]], [[-12.54986697, 4.51805886]], [[-13.71406951, 4.2896814 ]], [[-13.42446333, 4.28115439]], [[-15.28849325, 5.80495174]], [[-13.70612317, 4.94309255]], [[-14.02318653, 4.85250728]], [[-13.56002319, 4.10095407]], [[-11.91387728, 5.26569172]], [[-11.84375932, 5.20050772]], [[-12.66698964, 4.97272605]], [[-11.9531548 , 5.95101922]], [[-11.91136538, 5.24223158]], [[-12.93677267, 6.11677661]], [[-12.97416903, 5.96474191]], [[-14.01245554, 6.57652257]], [[-13.82463931, 6.76671267]], [[-0.15580012, -1.43974176]], [[-16.07016588, 0.10272213]], [[-17.10838197, -1.30786417]], [[-14.35520141, -1.23023344]], [[-15.63856962, 1.26688831]], [[-12.83514481, 1.40435312]], [[-9.8592135 , 1.03743939]], [[-7.4908252 , 2.51732345]], [[-12.50803494, 7.08218975]], [[-9.53678331, 5.98400764]], [[-7.36756444, 5.81417203]], [[-8.94978559, 5.5533179 ]], [[-6.90342565, 5.4086791 ]], [[-9.07814155, 4.90062468]], [[-9.10059713, 5.72013994]], [[-9.02730819, 5.64783637]], [[-9.03281396, 6.39807228]], [[-9.60405134, 7.09135432]], [[-9.79242722, 6.09908686]], [[-9.80512256, 6.27253185]], [[-8.65966516, 6.55591191]], [[-8.89051378, 7.23282729]], [[-9.74799764, 6.15842292]], [[-9.56802971, 6.34440625]], [[-10.70305217, 7.24349792]], [[-10.70101367, 7.13418983]], [[-9.47617812, 7.10690633]], [[-9.55756852, 7.29013944]], [[-9.61986293, 7.03163177]], [[-9.74629448, 5.92925957]], [[-9.7171232 , 5.11487325]], [[-8.7242835, 6.0699412]], [[-9.55171131, 6.1770681 ]], [[-7.78219353, 5.99615554]], [[-7.68285594, 5.92170879]], [[-9.64009245, 6.17801852]], [[-9.59737588, 6.23089847]], [[-9.83885452, 6.44288518]], [[-9.98402149, 6.16523394]], [[-10.55411513, 6.22961522]], [[-9.66249799, 6.24740609]], [[-10.0661772 , 6.40941273]], [[-10.28696848, 6.93011975]], [[-8.88672558, 6.08849245]], [[-8.58135626, 6.37807814]], [[-8.80526015, 6.40658296]], [[-8.91293129, 6.87664061]], [[-8.84821159, 6.98962164]], [[-8.8178992 , 6.97559349]], [[-9.7263417 , 6.17445892]], [[-9.16508752, 4.66836421]], [[-9.02389855, 5.6270389 ]], [[-9.78370325, 5.83028601]], [[-9.79245869, 6.42313185]], [[-8.9261985, 6.0583472]], [[-9.7000333, 6.9470377]], [[-9.64975136, 6.0515064 ]], [[-8.02626129, 5.82008142]], [[-9.8219921 , 6.92334532]], [[-11.6869763 , 6.23404649]], [[-11.59773843, 6.12926944]], [[-9.87528721, 4.2617788 ]], [[-9.92865342, 4.2684056 ]], [[-8.96797096, 4.92093758]], [[-9.04777929, 5.16157401]], [[-11.20490236, 5.43480692]]] # # vetMediaFinal = [] # j = 0 # pmX = 0 # pmY = 0 # for i in range(540): # pmX += vet[i][0][0] # pmY += vet[i][0][1] # j += 1 # if j == 60: # j = 0 # auxPmX = pmX/60; # auxPmY = pmY/60; # vetMediaFinal.append([auxPmX, auxPmY]) # pmX = 0 # pmY = 0 # # print(len(vetMediaFinal)) # captura = cv.VideoCapture(0) # ret, frame = captura.read() # if ret: # cv.imwrite('./capturedFrames/image.jpg', frame) # vetMedia = [[3.605045427870536, 7.516328844679964], [-2.40508915899165, 8.211047498004842], [-9.099528482988857, 7.9248603166338345], [-8.552198885658276, 7.174983629018177], [-3.2721205699785645, 6.929330241250926], [0.7458104318351236, 6.028940642313912], [0.7209548534815601, 5.7731080319167525], [-6.008123696852519, 6.745721516222318], [-8.407867800726027, 7.412472299068989]] # vetMedia = [[263.27309106038115, 211.57907918781248], [296.5984580694593, 214.15974662501907], [329.11976424549255, 216.57972060991204], [327.8349799895341, 226.86968297305495], [306.62229565191944, 226.77448669982138], [268.0389022236594, 228.7696256995822], [273.00006950187236, 238.62145324713174], [304.16152850322163, 238.38680547666266], [335.4623025665772, 235.69532250004465]] # vetPontos = [[628.03736458, 359.47860293], [623.04888334, 358.82350893], [623.48818879, 358.06202199], [619.51046569, 354.58929014], [628.79243679, 361.13230028], [628.70378425, 361.10340149], [628.7359385 , 361.36112742], [627.74197617, 361.3817255 ], [628.81483745, 361.29986115], [628.70920626, 361.20789244], [625.68992004, 361.37640726], [624.97594568, 361.51126823], [625.34796733, 361.97609384], [623.40059365, 362.52897399], [624.16974122, 362.87527191], [624.71236681, 362.46431514], [623.21073766, 362.50514075], [623.51978053, 362.4942961 ], [621.90185994, 362.38488715], [621.70659269, 362.51314231]] # vetMedia = [[5.266869886596568, 6.29682149568067], [-1.7460205754735825, 6.792560959957291], [-7.3489786087161475, 5.6898388685858485], [-6.046706723458374, 5.2971316490250295], [-1.4615270465117145, 5.330117572752651], [2.9228617839399162, 4.966593398830721], [2.16031465728068, 4.295619581171417], [-4.3117421933590085, 4.0696507648040425], [-8.602370477170188, 4.858439576599414]] # vetMedia = [[242.46767048315604, 198.16530356218965], [257.7766821019939, 200.05663142195078], [269.11626589278745, 200.57189350417713], [268.2975526351644, 206.63073019266903], [260.02331338587544, 207.34866930339342], [249.3924891275332, 209.02646274076722], [250.55429948261946, 213.85669917498208], [260.61760978892903, 214.16651606057715], [267.0500475549118, 210.724108298021]] # vetPontos = [[[241.67514477, 196.83483543]], [[241.68334827, 196.66243896]], [[241.67791729, 196.82756305]], [[241.75991287, 197.78065171]], [[242.12603426, 197.09756041]], [[241.68152332, 197.00112119]], [[241.91894274, 196.87562335]], [[241.67366638, 197.82417088]], [[241.20385323, 197.50334236]], [[241.11973136, 197.11903531]], [[240.91670868, 197.51113505]], [[241.11575493, 197.59684645]], [[240.98693732, 197.7893654 ]], [[240.2237589, 198.1681022]], [[240.64526539, 197.37920189]], [[239.53624659, 197.61112233]], [[239.70521927, 198.48399991]], [[240.1852089 , 198.18258401]], [[239.51875307, 198.70315907]], [[240.38122733, 198.70497285]], [[239.69463861, 198.76497973]], [[239.93799308, 198.74011826]], [[240.76481464, 198.81429519]], [[240.99021099, 198.40850171]], [[241.11579448, 198.63011971]], [[241.20560907, 198.80206548]], [[241.4347181 , 198.13144771]], [[241.76608913, 197.72461853]], [[241.65193428, 198.41130854]], [[242.1106097 , 198.73176557]], [[242.28884967, 198.72045881]], [[241.75345449, 198.12596352]], [[242.66493441, 198.14623065]], [[241.98653258, 198.84118329]], [[242.29899276, 197.76671497]], [[242.49035923, 198.71532402]], [[242.33456739, 198.97441625]], [[242.47780454, 198.42695846]], [[242.82308484, 198.80680015]], [[242.96887696, 198.68435432]], [[243.47335637, 198.05750867]], [[243.34088634, 197.83001056]], [[243.46160965, 197.73361458]], [[243.79335117, 198.77571463]], [[243.92627863, 198.07159228]], [[244.11740555, 198.38342152]], [[243.94882468, 198.59203043]], [[243.59135183, 198.2847559 ]], [[244.16189227, 197.83215522]], [[244.2130556 , 198.84728634]], [[243.54043651, 198.67407648]], [[244.10289346, 198.71398335]], [[244.29302145, 198.79996147]], [[244.54154482, 197.88903364]], [[244.03967026, 198.77913355]], [[244.52052326, 198.12413511]], [[244.77925863, 198.23280221]], [[245.12959192, 197.87199603]], [[244.67251687, 197.77085448]], [[255.91773591, 200.6296906 ]], [[256.02489367, 199.70988684]], [[255.76373367, 199.55563126]], [[256.00573454, 199.82260365]], [[255.98310223, 199.71027343]], [[255.921366 , 200.05315454]], [[256.2547143 , 199.71127634]], [[256.35497241, 200.24560752]], [[256.31682351, 200.25039561]], [[255.91236846, 200.26751906]], [[255.95845493, 199.99074539]], [[256.20689994, 200.09277147]], [[255.82327793, 200.18430162]], [[256.2160229 , 199.85258958]], [[256.75906236, 200.22739627]], [[257.05802414, 200.24316975]], [[257.21749395, 199.98503287]], [[257.10553885, 200.16690836]], [[257.56887415, 200.25855608]], [[257.52481959, 200.15447424]], [[257.64229816, 199.92358783]], [[257.72017552, 199.79292369]], [[257.9991851 , 199.73450444]], [[258.17275949, 199.98067071]], [[258.28749016, 199.96708148]], [[258.32990538, 200.12379145]], [[258.34831016, 200.21728424]], [[258.49982237, 200.02238981]], [[258.65143849, 200.04905758]], [[257.83597986, 199.73054206]], [[258.19818126, 200.11193022]], [[258.28269385, 200.20584486]], [[258.31776814, 200.260485 ]], [[258.30105307, 200.47199209]], [[258.54443817, 199.98267776]], [[258.46795293, 199.7750593 ]], [[258.42557331, 199.94103701]], [[258.16735407, 200.23019618]], [[258.25092941, 200.20466007]], [[258.02620431, 200.03250204]], [[257.75035397, 200.214864 ]], [[257.73431827, 200.23603273]], [[257.73339641, 200.17018321]], [[257.73993238, 200.34038232]], [[257.57152806, 200.26867367]], [[257.46867886, 200.28673356]], [[257.63754926, 199.56088296]], [[257.70216812, 200.34786007]], [[257.98562996, 200.37716429]], [[258.19971319, 200.52215973]], [[258.27640708, 199.62280212]], [[258.23134481, 199.56145869]], [[258.1993131 , 199.55115958]], [[258.17658811, 199.62991211]], [[258.23336985, 199.60629724]], [[257.95720242, 200.47508175]], [[258.1614738 , 200.49044425]], [[258.37697467, 200.31501597]], [[258.51324502, 200.30971397]], [[258.50099912, 200.37886338]], [[270.00504892, 199.89168801]], [[270.58585749, 199.67660456]], [[270.39105039, 200.02869263]], [[269.77086272, 199.53218741]], [[270.33531651, 200.02144547]], [[269.56927347, 200.06313562]], [[269.7150084 , 200.13701289]], [[269.93060699, 200.55662336]], [[269.71351252, 200.13787088]], [[269.32414053, 200.33328445]], [[269.4376562 , 200.40054196]], [[269.83118508, 200.34209399]], [[269.7251152 , 200.40270842]], [[269.35897506, 200.35555448]], [[269.43177683, 200.37603322]], [[269.03664549, 200.40755528]], [[268.96482647, 200.35252889]], [[268.84647272, 200.30699259]], [[269.07105342, 200.30601295]], [[268.89313214, 200.20435778]], [[268.76967999, 200.32301395]], [[268.5596316 , 200.31936104]], [[268.14582427, 200.37257044]], [[268.19678195, 200.34037535]], [[267.88934811, 200.60260764]], [[267.5808355 , 200.49401175]], [[267.84169569, 200.89487196]], [[268.07558532, 200.16658328]], [[267.97806137, 201.07685311]], [[268.19629923, 201.02068906]], [[267.97499061, 200.54319022]], [[267.84216404, 200.58725354]], [[268.58648564, 200.52543301]], [[268.50202293, 200.41309477]], [[268.17162986, 200.36102103]], [[268.85105027, 200.42475822]], [[268.66923857, 200.61973495]], [[268.71647431, 200.33538422]], [[269.06155469, 200.67043025]], [[268.89850061, 200.69730189]], [[269.08241222, 200.61186285]], [[268.84825875, 200.51431225]], [[268.82337243, 200.91847855]], [[268.65102511, 201.00133883]], [[269.66914869, 200.89564355]], [[269.53460386, 201.07207264]], [[269.74044386, 201.03601275]], [[269.69510646, 200.72951822]], [[269.74087967, 200.58181389]], [[269.68893719, 200.50373544]], [[269.96591462, 200.40947989]], [[270.13816558, 200.36547581]], [[270.21452357, 200.33559571]], [[269.76508143, 200.54796695]], [[269.5977452 , 200.69600715]], [[269.51178336, 200.85110698]], [[269.41136547, 201.05556906]], [[269.48819799, 200.75338617]], [[268.8524718 , 200.77443043]], [[269.08168375, 200.53441132]], [[269.03451033, 205.39561534]], [[268.83757038, 206.11007686]], [[266.60665751, 215.33853674]], [[266.92420225, 215.6579586 ]], [[262.99644985, 216.09838333]], [[247.9825891 , 213.67001505]], [[267.75806408, 211.74805603]], [[270.60855658, 207.65506582]], [[269.33493066, 204.59078317]], [[268.99443261, 206.91017357]], [[269.39803534, 205.10385381]], [[269.17895268, 205.15407105]], [[269.13988074, 205.84455327]], [[268.92762782, 205.62360468]], [[268.82249654, 206.01563413]], [[268.7635027 , 206.06154986]], [[268.71730376, 205.24466603]], [[268.57963176, 206.28649204]], [[268.47674147, 205.17056697]], [[268.21469989, 206.28581458]], [[267.53389156, 206.32482707]], [[268.46170901, 206.20230139]], [[268.4087764 , 205.11128091]], [[268.05767507, 205.25746433]], [[267.74897815, 206.29189064]], [[267.56431617, 205.21210356]], [[268.00446983, 206.30205839]], [[267.83579504, 205.33241823]], [[268.1238438 , 206.36698336]], [[268.25100695, 206.3581611 ]], [[268.35181167, 206.35128982]], [[268.37233511, 205.49392166]], [[268.41379052, 206.35063363]], [[268.40285869, 205.60431447]], [[268.54738106, 205.21917075]], [[268.97620044, 205.15739794]], [[269.01819198, 206.22264318]], [[269.22321163, 205.84511033]], [[269.61985577, 205.79559715]], [[269.91003233, 205.8622803 ]], [[269.9887009 , 206.10343921]], [[269.72032361, 205.73629547]], [[269.66339531, 206.31558275]], [[269.567801 , 205.97758016]], [[269.14999495, 206.18507322]], [[269.81154781, 205.95795503]], [[270.12204818, 206.1390289 ]], [[269.78272986, 206.07413386]], [[270.08972466, 206.15018493]], [[269.73839079, 205.23546977]], [[269.58280164, 205.40175096]], [[269.62962611, 205.21252434]], [[269.67692809, 206.07113857]], [[269.66324037, 205.30960539]], [[269.66684967, 205.94631952]], [[269.55910616, 206.37909239]], [[269.43419965, 206.36699644]], [[268.88418216, 206.37161219]], [[268.7514417 , 206.36876349]], [[268.88034733, 206.21633901]], [[259.40132122, 207.09322219]], [[260.25900259, 206.88966718]], [[259.33226204, 206.89446208]], [[259.91125112, 207.23338833]], [[259.26368556, 206.83152878]], [[259.28176255, 206.87934003]], [[259.26981628, 207.3361026 ]], [[259.15678349, 207.12061424]], [[259.27907543, 207.31456389]], [[259.55935468, 207.1480884 ]], [[260.09980452, 207.23638255]], [[260.42889998, 207.29125552]], [[260.37420348, 207.41401623]], [[260.66924623, 208.2603385 ]], [[260.20489852, 208.48199511]], [[259.84165164, 208.13685722]], [[259.76186006, 206.39276105]], [[260.58742386, 207.55540341]], [[259.85370623, 207.12801288]], [[260.52443415, 207.23934566]], [[260.55212133, 207.19484878]], [[259.602428 , 207.93809288]], [[259.6573476 , 208.18049669]], [[259.4624849 , 208.07716011]], [[259.96681686, 208.00206609]], [[259.04725824, 207.16084262]], [[259.46942505, 207.11635142]], [[259.16773831, 207.13407339]], [[259.78525051, 207.37086871]], [[259.29658505, 207.0016925 ]], [[259.38420585, 206.95592216]], [[259.31301257, 207.19792111]], [[260.38219028, 208.26197385]], [[259.98122002, 207.27526521]], [[259.14562931, 207.0377633 ]], [[259.71185456, 207.30082721]], [[259.20010731, 207.23394122]], [[259.43911559, 207.29782681]], [[259.43297009, 207.30281684]], [[259.26371528, 207.6792315 ]], [[259.25859267, 207.87439488]], [[259.24907903, 207.16975819]], [[260.28880445, 207.26562001]], [[259.72584391, 207.08027526]], [[260.00285314, 206.98080811]], [[260.77690401, 207.1660749 ]], [[260.51527876, 206.98423585]], [[260.81461093, 206.0178996 ]], [[261.03483755, 207.03312474]], [[261.15882001, 206.99220999]], [[261.20959289, 207.09773763]], [[262.05888799, 207.77022166]], [[261.77611238, 207.75946663]], [[261.73796023, 206.93122869]], [[262.00112393, 208.07462516]], [[261.92702641, 207.51948108]], [[262.08308729, 206.90563771]], [[262.00100749, 207.04140665]], [[261.87170157, 206.82330862]], [[262.04353724, 208.03340785]], [[250.94254217, 208.89512892]], [[250.56153631, 208.87749445]], [[250.47591867, 208.43901186]], [[249.75696898, 207.72023079]], [[250.36727028, 208.86949697]], [[250.32199757, 209.48935363]], [[249.7113574 , 208.84083509]], [[248.37990379, 208.88719857]], [[250.46783257, 208.4720583 ]], [[249.80833199, 208.48620347]], [[250.62610963, 208.67186574]], [[250.596319 , 208.7885261]], [[250.58193551, 208.83874098]], [[250.56647856, 208.86060903]], [[250.5265255 , 208.58434575]], [[250.64169515, 209.16281313]], [[249.36704434, 208.72838603]], [[250.54068979, 208.89948485]], [[250.50427219, 209.03025294]], [[249.53274378, 209.793883 ]], [[250.31526486, 209.26538537]], [[250.44769553, 208.84075201]], [[249.28086234, 209.42964083]], [[249.9746077 , 209.42512591]], [[249.98865154, 209.43291319]], [[250.21782508, 209.46779771]], [[249.85810448, 209.40644168]], [[249.81978897, 208.98774004]], [[249.4903999 , 209.02821324]], [[249.59221645, 209.23918251]], [[248.8129634 , 209.37661141]], [[249.28288584, 209.20858967]], [[249.24772801, 209.08822135]], [[249.16295183, 209.05692089]], [[247.95090732, 208.83962023]], [[247.95110993, 208.79439402]], [[248.65846481, 209.01436072]], [[247.84113241, 208.8723334 ]], [[248.52093687, 208.76790147]], [[248.41331898, 208.98583384]], [[248.81994286, 208.55316253]], [[247.94726664, 208.79528731]], [[249.18928074, 208.82393682]], [[249.22679909, 208.9602043 ]], [[249.25555145, 207.86567769]], [[249.17429373, 208.08514282]], [[249.03885415, 208.89031689]], [[249.06480807, 207.82321476]], [[249.18043284, 208.60239536]], [[248.94012872, 208.66669806]], [[248.71669752, 208.45931364]], [[248.84821631, 208.54058698]], [[248.33813966, 208.79329412]], [[248.27012702, 208.92812262]], [[248.29191942, 209.1942084 ]], [[247.93803986, 209.33384339]], [[248.04665897, 209.40557804]], [[249.05613401, 208.74578029]], [[248.90794124, 210.26267697]], [[249.39902901, 211.26539142]], [[249.73633904, 213.62416186]], [[250.15249991, 213.27099347]], [[249.73788002, 213.6643899 ]], [[250.09676423, 213.22125239]], [[250.15439072, 213.20358677]], [[249.99579988, 213.25064521]], [[249.46596994, 213.18572721]], [[249.0628077 , 213.68146505]], [[250.37184215, 213.10770202]], [[249.74459094, 213.23336536]], [[251.00241979, 213.28078589]], [[249.9315293 , 213.28665539]], [[251.33068896, 213.187229 ]], [[251.23415087, 213.17287105]], [[250.78054901, 213.22626079]], [[250.83363117, 213.24217268]], [[251.16641834, 213.2380782 ]], [[250.68096243, 213.71587202]], [[250.92353996, 214.58329256]], [[251.40649336, 214.21334122]], [[251.99818101, 213.81307225]], [[251.14465285, 213.94673145]], [[251.28571666, 213.98855238]], [[251.574638 , 214.44997631]], [[251.5224503 , 213.73717968]], [[251.67513641, 213.80335051]], [[251.55545444, 213.93775777]], [[251.54036731, 214.06037169]], [[251.86084131, 213.65694947]], [[251.38477627, 213.67604776]], [[251.55272935, 214.03641183]], [[252.10095854, 214.65975878]], [[250.79916693, 214.07367897]], [[250.62076175, 214.04538496]], [[249.39317064, 214.17457287]], [[249.31786068, 214.20420878]], [[251.15300916, 213.87329743]], [[249.90206356, 214.07354232]], [[250.20604453, 214.0390326 ]], [[249.62661613, 214.0925007 ]], [[250.33029699, 214.18542316]], [[249.748409 , 213.70205652]], [[249.83641033, 213.97411732]], [[249.73100825, 214.1201043 ]], [[249.4555018 , 213.80078557]], [[250.27200751, 213.66992318]], [[249.94159562, 213.74995352]], [[249.62055285, 213.97189791]], [[250.61716951, 214.0296837 ]], [[249.49920199, 214.13137081]], [[249.22267302, 214.19223417]], [[249.39339709, 214.37169881]], [[249.49340057, 213.91857474]], [[249.5294316 , 214.53136654]], [[249.25323873, 214.27337456]], [[249.38661906, 214.03495184]], [[249.55017548, 214.32099116]], [[250.12768527, 214.88283435]], [[250.61985593, 214.53859413]], [[250.88835792, 214.61651632]], [[258.45345592, 213.0774332 ]], [[259.99194841, 212.76173582]], [[258.62322311, 213.48232994]], [[258.59884367, 213.88539109]], [[259.73772469, 214.26430206]], [[259.6532815 , 213.83740058]], [[259.72370033, 214.01063137]], [[260.04941034, 213.89897299]], [[259.63789978, 213.83851089]], [[259.89497357, 213.81269656]], [[260.01177294, 214.17379367]], [[259.87051161, 213.98464366]], [[259.97135666, 214.18185649]], [[259.78392312, 214.3536002 ]], [[260.92674239, 214.05444358]], [[259.66882878, 214.00735937]], [[259.29222123, 214.59496978]], [[260.66537203, 214.14861859]], [[261.55911793, 214.24925186]], [[259.85427972, 214.41110994]], [[259.7043856 , 214.44484855]], [[260.40816557, 214.4286235 ]], [[260.03586523, 214.14380314]], [[260.6115433, 214.242414 ]], [[259.65928203, 214.52797146]], [[260.95178237, 214.06981473]], [[260.80338153, 213.13367348]], [[259.59129341, 214.1077396 ]], [[260.83356801, 213.97707007]], [[260.88109599, 214.18724233]], [[260.53966845, 213.6745402 ]], [[260.62202674, 214.4016749 ]], [[261.84556744, 214.40761713]], [[260.70266761, 214.44144314]], [[260.68124315, 214.14036082]], [[260.80952698, 213.27191148]], [[260.79660385, 214.09644998]], [[260.61238409, 214.45626878]], [[261.85327386, 214.38986393]], [[261.67892279, 214.42037688]], [[260.71048341, 214.45065388]], [[260.71665874, 214.46045763]], [[260.72207157, 214.45031892]], [[261.42114811, 214.15933323]], [[262.1343966 , 214.00054111]], [[261.15329585, 214.21360931]], [[260.80780887, 215.30519461]], [[260.24787262, 214.61564056]], [[260.37816587, 214.98225803]], [[261.07474263, 214.46569619]], [[261.03966855, 214.48476804]], [[261.69443514, 214.45480915]], [[260.79565641, 214.65129242]], [[260.91043942, 214.58711644]], [[259.68701231, 214.54430442]], [[260.75795869, 214.68074908]], [[260.73914043, 214.55986386]], [[261.15996867, 214.33183894]], [[261.23454406, 214.46742861]], [[261.45810044, 214.58955619]], [[267.07563915, 210.62020645]], [[267.54906392, 210.42497134]], [[267.69181767, 211.38963909]], [[267.39766812, 209.77460742]], [[267.50886264, 210.50112767]], [[267.5673068 , 210.92502489]], [[267.46323755, 209.72100978]], [[268.70426159, 209.41566792]], [[268.15521405, 210.00540836]], [[268.60262202, 210.03813351]], [[268.41866531, 209.7916335 ]], [[268.42317858, 210.70474467]], [[268.45531712, 209.47608266]], [[267.99301721, 209.49266721]], [[268.40947008, 209.98279387]], [[268.35590197, 210.76605967]], [[268.17807063, 209.83199919]], [[268.27641932, 209.58502903]], [[268.32134097, 210.58112429]], [[268.08935026, 210.81725891]], [[267.41503161, 210.51410015]], [[268.21911952, 209.32828698]], [[267.92442432, 210.25002567]], [[266.49181132, 210.68539807]], [[266.58681957, 210.90902172]], [[266.26196681, 208.95182157]], [[266.70238777, 210.2579997 ]], [[266.43098904, 210.90783636]], [[266.74699607, 211.20975378]], [[265.58644025, 211.07522757]], [[265.98042741, 210.75728028]], [[266.46292359, 211.14818207]], [[266.20611266, 211.33581374]], [[266.03162782, 210.59724859]], [[265.70795117, 210.45623961]], [[267.22826027, 210.69153152]], [[265.93350261, 210.03250559]], [[265.85973404, 210.45360455]], [[266.09210165, 209.41029394]], [[266.16206183, 211.55913991]], [[266.87053377, 211.48736548]], [[265.9748045 , 211.54545147]], [[266.62541425, 210.38807457]], [[266.5086559 , 210.36297575]], [[266.14724416, 210.36409312]], [[266.31542886, 211.53100702]], [[267.38663505, 211.48237009]], [[267.34436325, 211.4713741 ]], [[266.97522653, 211.5139521 ]], [[266.02744563, 211.88400107]], [[267.24174314, 212.21657912]], [[266.27605171, 212.14954422]], [[266.79725487, 211.18799975]], [[266.5757432 , 211.67271616]], [[266.06927548, 212.10558964]], [[266.90694507, 211.78027325]], [[266.7169224 , 211.85459555]], [[266.7310245 , 209.98119215]], [[265.99179388, 211.85333975]], [[267.34955538, 211.60756087]], [[266.57931662, 211.2501483 ]]] # vetMedia = [[-10.31637866698091, -6.192146286081903], [-9.038411685608997, 3.8894112291542693], [-14.37533702621012, 4.24080789069742], [-10.035359980356175, 3.9080208302080215], [-3.4601882813993776, 5.20841324108787], [0.31078331067415094, 4.457015486149262], [-0.02841968291160602, 3.5744219008436686], [-4.877565891378743, 4.693357054812779], [-9.987402548737146, 5.11037793802804]] #ROSTO PARADO CALIBRACAO PM-IRIS # vetMedia = [[5.422233957529999, 5.280699524344585], [-2.9922543530232675, 6.409367344746496], [-11.960713982886237, 5.805235849834105], [-12.131095844460225, 4.308702545560665], [-3.7265020381580856, 4.44667221419273], [3.8487961883477264, 4.139905586259381], [1.0871408941513474, 2.0755868352519924], [-6.44207980669916, 3.1933789599070033], [-11.79969719563412, 4.758244175255282]] # vetPontos = [[[5.38489523, 4.18169055]], [[5.06348698, 5.27601686]], [[5.30817223, 4.215135 ]], [[5.30817223, 4.215135 ]], [[6.17880211, 4.81473117]], [[5.29143095, 5.10759964]], [[5.29135475, 5.23584969]], [[5.43698139, 5.15893626]], [[5.25590873, 4.32459152]], [[5.27544615, 4.06551369]], [[5.40033377, 4.54969039]], [[5.48255406, 4.79777086]], [[5.33512356, 4.78555634]], [[5.35578538, 5.20273311]], [[5.49328902, 5.19124636]], [[6.07583777, 5.16542039]], [[5.77933484, 5.11429369]], [[6.03747374, 5.06239362]], [[6.28367391, 5.07582914]], [[5.303491 , 4.99564298]], [[5.28998338, 5.19734579]], [[5.76635703, 5.18047928]], [[5.68372482, 5.1589249 ]], [[6.06306768, 5.15904812]], [[5.64150221, 5.21297626]], [[5.52345165, 5.2515206 ]], [[5.4768927 , 5.04441081]], [[6.28384437, 5.31468322]], [[5.37876767, 5.31482226]], [[5.71095158, 5.2989 ]], [[5.24316531, 5.24171797]], [[5.62705379, 5.32762356]], [[6.39502799, 5.12856628]], [[5.25462366, 5.95485523]], [[5.79131291, 6.05989292]], [[5.35746133, 5.98272599]], [[5.38375621, 6.31065661]], [[5.41725629, 5.64862223]], [[5.30676092, 6.15941059]], [[5.38350453, 5.25705816]], [[5.4313109 , 5.13850563]], [[5.44142406, 5.27333544]], [[5.43386786, 5.18655517]], [[5.30340806, 5.13733726]], [[5.34959389, 5.28406423]], [[5.58049819, 5.28098978]], [[5.34586659, 5.45136588]], [[5.38837985, 5.97568524]], [[5.39166484, 5.23084164]], [[5.34347202, 5.91007427]], [[5.31884921, 6.41891582]], [[5.34337251, 6.00672839]], [[5.32851189, 5.90095312]], [[5.47174904, 5.39404414]], [[5.50244033, 5.31473123]], [[6.35381266, 5.39022133]], [[6.28344302, 5.33512445]], [[5.99212983, 5.34205995]], [[5.57984006, 5.75021362]], [[-2.16961117, 6.38020782]], [[-2.07758899, 6.52104826]], [[-2.07758899, 6.52104826]], [[-3.19598951, 6.4745388 ]], [[-3.19598951, 6.4745388 ]], [[-2.0752336 , 6.47057199]], [[-2.0752336 , 6.47057199]], [[-2.12216153, 6.4764924 ]], [[-2.12216153, 6.4764924 ]], [[-2.10808309, 6.44958437]], [[-2.14505701, 6.47818496]], [[-2.69788636, 6.44313997]], [[-2.76241776, 6.44248909]], [[-2.34824156, 6.42147637]], [[-2.14348068, 6.40773298]], [[-2.39296025, 6.45784041]], [[-2.09802632, 6.4968634 ]], [[-2.10659418, 5.67188942]], [[-2.15272749, 5.407376 ]], [[-2.53305967, 6.40734883]], [[-3.16495968, 6.4468927 ]], [[-3.05397398, 6.39545215]], [[-2.77353907, 6.3957733 ]], [[-3.18848431, 6.43602981]], [[-3.05084866, 6.45657406]], [[-3.13773144, 6.30159747]], [[-2.94145565, 6.19841772]], [[-3.18179228, 6.40648677]], [[-2.54282837, 6.46388931]], [[-3.19256474, 6.47629801]], [[-3.1373227, 6.3868015]], [[-3.1373798 , 6.49001775]], [[-3.13793535, 6.50969828]], [[-3.10465505, 6.44959176]], [[-3.12210463, 6.47876662]], [[-3.19252145, 6.48535008]], [[-3.20310225, 6.40794899]], [[-3.20969938, 6.36662783]], [[-3.24099072, 6.38708699]], [[-3.19480923, 6.47458885]], [[-3.23195017, 6.47183683]], [[-3.22650527, 6.4075272 ]], [[-3.28022764, 6.51244712]], [[-3.21049346, 6.52498106]], [[-3.24174889, 6.50535099]], [[-3.13960794, 6.03208157]], [[-2.20381073, 6.46784009]], [[-3.21611753, 6.438929 ]], [[-3.29158538, 6.46106509]], [[-3.30515411, 6.5354976 ]], [[-3.2966879, 6.5066086]], [[-2.92539037, 6.47694037]], [[-2.8704682 , 6.54195626]], [[-2.23644828, 6.59315945]], [[-2.67491551, 6.49437368]], [[-3.32017345, 6.45561214]], [[-3.38310604, 6.43610065]], [[-3.45744365, 6.61867878]], [[-3.3551876 , 6.48780772]], [[-3.38504338, 6.52399801]], [[-10.94401531, 5.68612978]], [[-12.1265342 , 6.01954381]], [[-12.92384663, 5.73145084]], [[-11.86617961, 5.18430202]], [[-12.18233104, 5.62241533]], [[-12.04213345, 6.02483785]], [[-12.40399203, 5.96891601]], [[-11.74960661, 5.04822803]], [[-11.98919947, 5.09765766]], [[-11.75479337, 6.2286955 ]], [[-11.65024074, 6.29200162]], [[-11.76825775, 5.94210959]], [[-11.84335082, 6.18845918]], [[-11.9705813 , 5.60422096]], [[-11.93215508, 5.69562905]], [[-12.0502076 , 6.25501502]], [[-11.86029319, 6.18891044]], [[-11.93748011, 5.81763826]], [[-11.98105384, 6.31174758]], [[-11.91338246, 5.34865358]], [[-11.9789792 , 5.47641706]], [[-11.94683956, 5.44449849]], [[-11.98390885, 5.50748725]], [[-12.00504905, 5.96636579]], [[-12.02328404, 6.08308899]], [[-12.07623993, 6.15860337]], [[-12.06866812, 6.18628302]], [[-11.03244257, 6.0540847 ]], [[-11.86164557, 5.71050367]], [[-11.94730906, 5.6604307 ]], [[-11.98745916, 5.61941421]], [[-12.02906765, 6.0099997 ]], [[-12.56536457, 5.7411736 ]], [[-11.89417671, 5.88097921]], [[-11.99457364, 6.02171872]], [[-12.01257121, 6.02555666]], [[-11.95891197, 6.1182411 ]], [[-12.00257056, 6.04416083]], [[-11.86554214, 5.73072613]], [[-12.02766072, 6.16498111]], [[-12.08698056, 6.23457446]], [[-12.23552764, 5.31856515]], [[-12.01976619, 5.99139723]], [[-11.96875642, 6.17282027]], [[-11.94060234, 6.22364563]], [[-12.00260457, 6.18295667]], [[-11.93882553, 6.17755809]], [[-12.01488405, 5.76024697]], [[-12.07161785, 5.81078635]], [[-11.84527659, 5.30135815]], [[-11.83222837, 5.06095114]], [[-11.88205581, 5.81038591]], [[-11.88201481, 6.02322049]], [[-11.88655519, 6.04511007]], [[-10.77036899, 6.20513123]], [[-11.93995798, 6.04106734]], [[-11.85205138, 5.05248579]], [[-11.98950381, 5.08378792]], [[-11.8332645 , 5.65568507]], [[-11.98628008, 5.9378403 ]], [[-12.45583272, 4.04943013]], [[-12.22568736, 3.89539752]], [[-11.81276565, 3.81235693]], [[-11.8092927, 3.8132792]], [[-11.8092927, 3.8132792]], [[-12.69234099, 4.12928343]], [[-11.7423166 , 4.05002878]], [[-10.76113248, 5.02531421]], [[-11.96238127, 4.12440796]], [[-11.80542903, 4.02858062]], [[-11.98374644, 4.0375948 ]], [[-11.94858016, 3.96772697]], [[-12.13674144, 4.96329894]], [[-12.1202659 , 4.65028356]], [[-12.1796399 , 4.87993531]], [[-12.18883647, 4.74318542]], [[-12.06284963, 4.34298066]], [[-11.35988304, 4.07783359]], [[-11.89007596, 4.13709016]], [[-11.8841491 , 4.91343975]], [[-11.87494566, 5.01216766]], [[-11.78077072, 4.00848914]], [[-11.80835609, 4.23882701]], [[-11.9813643 , 3.94860395]], [[-12.12360805, 3.92217032]], [[-12.0099336 , 5.21897302]], [[-11.99833235, 5.26545421]], [[-11.97720958, 4.24603318]], [[-12.7339854 , 3.99883557]], [[-11.90426571, 4.07121595]], [[-11.94346396, 4.10349938]], [[-12.58878788, 4.76643882]], [[-12.96513221, 4.43948345]], [[-12.97937032, 4.57043389]], [[-12.99035123, 4.6118599 ]], [[-12.30800679, 4.27021899]], [[-11.8709588 , 4.05934516]], [[-13.02923338, 4.1272228 ]], [[-13.07876373, 4.10512649]], [[-12.62698144, 3.86839311]], [[-11.92162789, 3.85167387]], [[-13.15874183, 4.93010085]], [[-13.15709962, 4.04484218]], [[-13.18957299, 4.46395928]], [[-13.13990369, 4.29030406]], [[-12.87600552, 4.21600413]], [[-12.6467706 , 4.20848777]], [[-12.9516313 , 4.13728806]], [[-12.91684293, 4.08797292]], [[-12.86440399, 3.93885727]], [[-11.97192162, 4.00277285]], [[-13.03284352, 4.3241327 ]], [[-12.55310619, 4.24500191]], [[-11.7964679 , 4.07902154]], [[-11.98016959, 4.08988873]], [[-11.86251008, 4.50690624]], [[-11.91220125, 4.54027662]], [[-11.83713477, 4.08446619]], [[-12.04353103, 4.12389205]], [[-12.90726144, 4.7840821 ]], [[-4.19677486, 5.3141324 ]], [[-4.39513063, 5.19006624]], [[-4.47429361, 4.40041142]], [[-3.52486789, 4.22900779]], [[-2.54631481, 4.23647861]], [[-4.36478825, 5.20050755]], [[-3.15004048, 5.17763486]], [[-3.36958933, 5.36840558]], [[-3.91225009, 4.22588801]], [[-3.98058314, 5.29108059]], [[-3.71617305, 4.3848728 ]], [[-3.32032808, 4.24194809]], [[-3.19433733, 4.22563883]], [[-4.34917535, 4.86393828]], [[-4.2882432 , 4.52393224]], [[-4.03650498, 4.23939665]], [[-4.08255481, 4.26277269]], [[-3.27796252, 4.2490037 ]], [[-3.14565204, 4.24414453]], [[-3.14417831, 4.23082135]], [[-4.36842994, 4.22593467]], [[-3.19560728, 4.19587807]], [[-4.11582563, 4.190858 ]], [[-4.0009835 , 4.19983343]], [[-4.33097041, 4.25472696]], [[-3.21981278, 4.17652127]], [[-3.23117124, 4.17587275]], [[-3.18635127, 4.19603921]], [[-3.62298123, 4.24666422]], [[-3.18228791, 4.2533896 ]], [[-3.24929443, 4.25172408]], [[-4.08570354, 4.21073084]], [[-4.34097071, 4.22952504]], [[-3.47697815, 4.57140984]], [[-3.50159739, 4.42283182]], [[-4.33034376, 4.85069751]], [[-4.29001603, 5.20872211]], [[-4.2602184 , 4.33399208]], [[-3.82248101, 4.31749948]], [[-4.10420062, 4.23705581]], [[-4.34418253, 4.21726654]], [[-4.38045266, 4.20891722]], [[-4.40766896, 4.24726737]], [[-3.17290905, 4.27218266]], [[-3.76132501, 4.2696137 ]], [[-4.07628298, 5.23434879]], [[-3.93481124, 5.12783746]], [[-3.79105381, 4.36140576]], [[-3.76511055, 4.27160831]], [[-4.39008059, 5.16420376]], [[-4.40429336, 5.1143216 ]], [[-4.20756408, 4.21063382]], [[-4.36409109, 4.20478011]], [[-4.20230592, 5.04827384]], [[-4.19205563, 4.66709882]], [[-4.07750792, 4.51355216]], [[-3.63606796, 4.56807311]], [[-3.65796214, 4.19690039]], [[-4.09510034, 4.18781098]], [[-4.36392372, 4.19237967]], [[3.8238204 , 2.98600016]], [[4.13346376, 4.1135299 ]], [[4.13346376, 4.1135299 ]], [[3.91364565, 3.85356483]], [[3.1244421 , 4.36091304]], [[4.28590183, 4.24068818]], [[3.11265068, 4.29081316]], [[3.11265068, 4.29081316]], [[4.29082358, 4.30681567]], [[4.2893583 , 4.36370931]], [[3.03643117, 4.29467299]], [[3.81001674, 4.30008276]], [[3.94689591, 3.11202161]], [[3.70792147, 3.13719576]], [[2.98168828, 5.12395646]], [[2.97173672, 5.17817128]], [[4.31616753, 4.36545585]], [[3.06936119, 4.38267233]], [[3.64419234, 4.33895404]], [[3.06614592, 4.31178915]], [[3.09302851, 4.34321632]], [[4.38843015, 4.01308262]], [[4.31825044, 3.18646199]], [[4.65920526, 4.35985924]], [[5.3455654 , 4.32313336]], [[3.46745294, 3.81406588]], [[4.03695258, 3.61790676]], [[4.27669528, 3.1552212 ]], [[4.26318739, 3.14103555]], [[4.32074117, 3.14061523]], [[4.21298254, 4.33794601]], [[3.68542384, 4.40622778]], [[4.19798995, 4.19487684]], [[3.77091742, 4.03757217]], [[4.19251011, 5.51543609]], [[4.30830158, 4.5640332 ]], [[4.31459862, 3.51907431]], [[3.071784 , 4.13231153]], [[4.34263856, 4.12548008]], [[4.19800158, 4.35298909]], [[4.21076291, 4.33256264]], [[4.20634086, 4.36551012]], [[4.20482782, 4.36787231]], [[4.12782329, 4.370958 ]], [[3.91284864, 4.36418328]], [[4.1890126 , 5.01456122]], [[4.19546052, 4.51554658]], [[4.28504709, 4.36455112]], [[4.28519897, 4.18467491]], [[3.68393645, 4.34501268]], [[3.87773398, 4.32899905]], [[3.04714105, 4.34398035]], [[3.08005757, 4.40636716]], [[4.32293508, 4.4063656 ]], [[4.35052282, 4.1341592 ]], [[4.32740251, 4.30109437]], [[3.05488485, 4.1527556 ]], [[3.03950054, 3.91955287]], [[3.11249975, 3.1429124 ]], [[3.07926623, 3.21263001]], [[2.92295284, 3.06019106]], [[0.60703492, 1.83744159]], [[0.60188527, 1.83749065]], [[0.61192756, 1.83687615]], [[0.61254907, 1.83728271]], [[0.59372635, 1.80372162]], [[0.55007801, 1.83766122]], [[0.38583984, 1.80293884]], [[-0.57542901, 1.84993863]], [[1.83567154, 1.82246863]], [[0.91338915, 1.83235534]], [[0.62696134, 1.81037412]], [[0.62010141, 1.82398671]], [[0.61639197, 1.8311493 ]], [[0.61437089, 1.8341188 ]], [[0.61457114, 2.12748863]], [[0.61377938, 1.83788518]], [[0.62396336, 1.84506563]], [[0.85152959, 1.85621893]], [[0.61267493, 1.83450276]], [[0.61268795, 1.83556093]], [[0.61313319, 1.83799534]], [[0.61265187, 1.83809581]], [[1.83928388, 1.97619126]], [[1.83756249, 1.8395089 ]], [[1.47100541, 1.8339226 ]], [[1.75444107, 1.96683026]], [[1.61169749, 1.86762193]], [[1.75358204, 1.86103715]], [[1.10608414, 1.83777734]], [[1.82697029, 1.98163032]], [[1.93718801, 3.04289556]], [[1.86681096, 3.05294834]], [[3.10228391, 3.02254997]], [[1.8587624 , 3.05060246]], [[2.94741885, 1.9028069 ]], [[3.04894071, 2.80163145]], [[1.84299345, 2.03364302]], [[1.86364795, 2.17407897]], [[1.90667986, 2.77983956]], [[2.18006314, 3.03399834]], [[1.33527529, 1.81670277]], [[0.64456434, 1.82598346]], [[1.86402311, 3.02743601]], [[1.85074524, 3.05333671]], [[1.7828849 , 2.08541952]], [[1.77118064, 1.85499135]], [[0.65566629, 1.82693824]], [[0.6487917 , 1.82575543]], [[0.65525283, 1.8498874 ]], [[0.66350063, 1.83933632]], [[0.61814324, 1.8359298 ]], [[0.61196189, 1.86130025]], [[1.82906947, 1.86056247]], [[1.83327157, 1.84256963]], [[1.85318877, 1.89080467]], [[1.71875397, 1.87205552]], [[1.8510374 , 1.85469475]], [[1.27663622, 1.84473645]], [[0.78645094, 1.82511157]], [[-8.54685059, 4.17152596]], [[-8.27747917, 3.1137243 ]], [[-6.72171926, 3.55336754]], [[-5.5394165 , 4.26279032]], [[-7.34650927, 3.062007 ]], [[-5.96179066, 2.49981422]], [[-5.66219325, 2.94934955]], [[-6.73354664, 3.0618084 ]], [[-6.73354664, 3.0618084 ]], [[-5.55428621, 2.9986063 ]], [[-5.5638958 , 2.97309384]], [[-5.47576682, 3.35672083]], [[-5.5286871 , 2.99646076]], [[-5.56675384, 3.08531165]], [[-5.62633687, 3.19992232]], [[-6.75829276, 2.99573876]], [[-6.58593488, 3.02398198]], [[-5.56474586, 2.99013214]], [[-6.47319378, 2.98803419]], [[-5.55761709, 2.5191073 ]], [[-5.5303419 , 2.98661824]], [[-6.6988435 , 3.01806406]], [[-6.56470823, 3.0423888 ]], [[-6.05879692, 3.51812185]], [[-6.62023415, 3.27241167]], [[-6.02170299, 3.67725824]], [[-6.11792311, 3.92391782]], [[-6.66504641, 3.03107892]], [[-6.6389793 , 3.01312796]], [[-5.21201756, 2.9764425 ]], [[-4.61723717, 2.9604427 ]], [[-5.68824651, 2.94683616]], [[-5.58276884, 2.89062456]], [[-7.52561397, 2.99089075]], [[-6.78698331, 2.959668 ]], [[-6.49186338, 3.06708628]], [[-6.78615023, 3.12942768]], [[-6.69016696, 3.97964441]], [[-5.61184368, 4.31346669]], [[-6.79731517, 3.01600066]], [[-6.76899991, 3.21028914]], [[-6.39692131, 3.0014995 ]], [[-5.48283946, 4.16929136]], [[-5.52234827, 3.09642596]], [[-6.11670241, 3.08729708]], [[-6.71568732, 3.06843398]], [[-6.66084742, 3.05355475]], [[-6.73119997, 3.05780352]], [[-6.65271335, 2.91823177]], [[-5.98584782, 2.99332452]], [[-5.88000428, 3.06695622]], [[-6.70400873, 3.07748463]], [[-7.85865302, 3.17779865]], [[-7.01801892, 3.10731986]], [[-7.77599355, 3.0856754 ]], [[-6.67307458, 3.11697671]], [[-6.72168563, 3.1262044 ]], [[-6.81821482, 3.0794999 ]], [[-6.73685157, 3.07177242]], [[-6.76700789, 3.23175912]], [[-12.59867249, 5.39984093]], [[-11.95259023, 5.18758173]], [[-11.78929 , 4.81693892]], [[-12.71671357, 4.07783113]], [[-12.18947556, 4.10912697]], [[-11.9994504, 4.0746459]], [[-11.9994504, 4.0746459]], [[-11.7339695 , 4.28953509]], [[-12.32091284, 4.28211787]], [[-12.97477746, 5.23389878]], [[-12.14427636, 4.35932129]], [[-11.72385388, 4.28575528]], [[-11.41931878, 4.41604951]], [[-11.21942123, 4.60503935]], [[-11.63870973, 4.3082071 ]], [[-11.77197732, 4.57132593]], [[-11.68497902, 4.16897944]], [[-11.71697435, 4.22753744]], [[-12.46081867, 4.29983272]], [[-11.82152943, 4.20901439]], [[-11.73936292, 4.14624266]], [[-11.84231364, 5.23610799]], [[-12.16783001, 5.34239995]], [[-12.42428667, 5.21138122]], [[-12.22368416, 5.3356566 ]], [[-11.77595375, 5.28791993]], [[-11.75394436, 4.3135543 ]], [[-11.60619343, 5.22876137]], [[-11.78497659, 5.33255258]], [[-11.75304973, 5.26911751]], [[-11.73391719, 5.25835271]], [[-11.48026332, 4.01235349]], [[-11.62946949, 5.36296875]], [[-11.65488139, 5.43885891]], [[-11.40820808, 4.55145559]], [[-11.32761517, 4.16190517]], [[-11.68201631, 5.19762188]], [[-11.73878108, 5.35054209]], [[-11.70425216, 5.41842415]], [[-11.74485808, 5.46886175]], [[-10.93329592, 4.22011194]], [[-11.38636362, 4.27783376]], [[-12.77904248, 5.41178202]], [[-11.7261947, 5.3869065]], [[-11.67337486, 4.25627983]], [[-11.65091948, 4.23251339]], [[-11.64390706, 4.33852342]], [[-11.64332081, 4.30137781]], [[-11.65648745, 5.46031387]], [[-11.64548391, 5.31305061]], [[-12.12600697, 4.4554837 ]], [[-12.84224222, 5.4964896 ]], [[-11.69266071, 5.39277433]], [[-11.50729776, 5.40003005]], [[-11.47640544, 4.23685142]], [[-11.64170966, 4.32790505]], [[-11.62539874, 4.97754162]], [[-11.62519121, 4.28198789]], [[-11.31980474, 5.44329405]], [[-11.54347394, 4.26517871]], [[-11.38890381, 5.49599762]]] #ROSTO MOVENDO CALIBRACAO PM-IRIS # vetPontos = [[[3.15792046, 4.95180159]], [[2.33072166, 5.09043579]], [[3.15016136, 5.77781553]], [[4.04905586, 5.84853315]], [[3.76894569, 5.63308182]], [[3.47275429, 5.8447094 ]], [[3.22517109, 5.99588208]], [[3.23770113, 5.1043164 ]], [[3.76422067, 5.55316176]], [[3.23968361, 5.04647142]], [[3.22418612, 5.0689577 ]], [[3.38898627, 5.15467835]], [[3.21234836, 5.04784246]], [[3.24533534, 4.99919777]], [[4.05759396, 5.81957967]], [[3.50864729, 5.97260135]], [[3.96704056, 5.39625622]], [[3.95456808, 5.71989091]], [[3.27227704, 5.85551458]], [[3.27147349, 5.85061526]], [[3.20002997, 5.87595963]], [[3.28690232, 4.97963939]], [[3.26515632, 5.07798393]], [[3.27070863, 5.91692812]], [[3.72035215, 5.99602603]], [[3.22371014, 6.00821267]], [[3.23918503, 5.98755622]], [[3.57595879, 5.10707596]], [[3.21518624, 5.97170693]], [[3.42480815, 5.97784114]], [[3.19691202, 5.81076849]], [[3.23584343, 5.88549285]], [[3.25603477, 5.84979424]], [[3.57092949, 5.70716325]], [[3.58136724, 5.88797467]], [[3.50623895, 5.86515739]], [[3.43854015, 5.69775114]], [[3.22134543, 5.05790117]], [[3.18430557, 5.91332524]], [[3.32494786, 5.86417284]], [[3.2273419, 5.9878946]], [[3.23122386, 5.99862167]], [[3.31684174, 6.00565924]], [[3.19338677, 5.92805247]], [[3.33979658, 5.97042056]], [[3.23034483, 5.99159555]], [[3.24857939, 6.0026625 ]], [[3.24162974, 6.00751983]], [[3.23626903, 6.00991701]], [[3.26982223, 5.92973537]], [[3.21538063, 5.97113858]], [[3.18410035, 5.9312272 ]], [[3.22022162, 5.96153038]], [[3.22607054, 5.98728483]], [[3.47895741, 5.99997274]], [[3.17963824, 6.01896473]], [[3.1954199 , 6.03136605]], [[3.21992745, 6.02312694]], [[3.22694094, 6.01747629]], [[-2.72039151, 7.003478 ]], [[-2.70120347, 6.11377406]], [[-2.53621776, 6.1166924 ]], [[-2.37252846, 6.47240229]], [[-2.63224699, 7.25002725]], [[-2.6003258 , 6.28335168]], [[-2.43935966, 7.31326153]], [[-2.59202309, 7.27292881]], [[-2.4224144 , 6.91364744]], [[-2.2805045 , 6.24869098]], [[-2.14997406, 6.20443635]], [[-2.35514699, 6.2106564 ]], [[-1.82549389, 7.1085071 ]], [[-2.44344257, 7.28647897]], [[-2.46624027, 6.84159158]], [[-2.51895891, 7.11774175]], [[-2.47773764, 7.21535256]], [[-2.55392837, 7.2321461 ]], [[-2.50183463, 7.23288983]], [[-2.5294212 , 7.34201845]], [[-2.57865887, 7.20978086]], [[-2.6017644 , 7.23000968]], [[-2.61175937, 7.230266 ]], [[-2.15935458, 7.23174972]], [[-2.51748564, 7.09536085]], [[-2.57096858, 7.06973893]], [[-2.84788906, 7.31228175]], [[-2.4979053 , 7.16946398]], [[-2.55968674, 6.95423548]], [[-2.56012314, 7.12994031]], [[-1.702282 , 7.11659112]], [[-1.85039138, 7.0972385 ]], [[-2.66803001, 7.10084138]], [[-2.52963501, 7.17636878]], [[-2.47460628, 7.11023188]], [[-2.59122889, 7.17937713]], [[-2.59775433, 7.21758686]], [[-2.71603386, 7.52107089]], [[-2.40235774, 7.12546063]], [[-2.60306863, 7.11873471]], [[-2.62757499, 7.20661002]], [[-2.62735457, 7.22887157]], [[-2.62303274, 7.22124302]], [[-2.58516042, 7.16447327]], [[-1.90131742, 7.12546745]], [[-2.51835446, 7.20994497]], [[-2.48613379, 6.18359269]], [[-2.44541417, 7.07221295]], [[-1.62960781, 7.10508574]], [[-1.8203282 , 7.07146789]], [[-2.55759438, 7.14062152]], [[-2.50421237, 7.13350448]], [[-2.56803333, 7.19304606]], [[-2.61280789, 7.9605759 ]], [[-2.56467133, 7.42101741]], [[-2.601092 , 7.19885006]], [[-2.5903105 , 7.41301481]], [[-2.46827406, 7.13429544]], [[-2.51907218, 7.10026744]], [[-2.55694679, 7.21548241]], [[-5.69197187, 6.36204948]], [[-5.80214863, 6.66314106]], [[-5.80289693, 6.52523255]], [[-5.8082268 , 6.85492003]], [[-5.80564308, 6.52473717]], [[-5.65883241, 6.37046442]], [[-6.63993411, 6.33905468]], [[-5.80279233, 6.52367113]], [[-6.66148193, 6.33708553]], [[-5.77260626, 6.46811194]], [[-5.77836353, 6.50059637]], [[-5.78719863, 6.46288904]], [[-5.92605423, 6.43027737]], [[-5.69209402, 6.35489936]], [[-5.67721762, 6.37428267]], [[-5.68121613, 6.7261604 ]], [[-5.73194291, 6.41174757]], [[-5.52074974, 6.49455043]], [[-5.71539815, 6.42388853]], [[-5.75806647, 6.47400882]], [[-5.79270243, 6.4996214 ]], [[-5.80189147, 6.36265394]], [[-5.65168895, 6.36343908]], [[-5.35537358, 6.37154154]], [[-5.75253967, 6.44017495]], [[-5.74557483, 6.45104046]], [[-5.7198407 , 6.42331176]], [[-6.77240154, 6.4153364 ]], [[-6.48742951, 6.38999666]], [[-5.7605461 , 6.47157843]], [[-5.96222248, 6.5135402 ]], [[-6.81931501, 6.55187757]], [[-6.73340025, 7.39584822]], [[-5.9684925 , 6.46858527]], [[-6.72615187, 6.39396059]], [[-6.52885512, 6.37460479]], [[-5.68116323, 6.38925716]], [[-5.78703402, 6.44970623]], [[-5.85236473, 6.58941168]], [[-6.31097053, 6.54790966]], [[-6.00882165, 6.36891398]], [[-6.12209496, 6.35639134]], [[-5.75741791, 6.36396907]], [[-5.66877857, 6.36497695]], [[-5.66427139, 6.37767195]], [[-5.66279724, 6.36334377]], [[-5.55917832, 6.36589697]], [[-5.7455606, 6.4514102]], [[-6.22737106, 6.38534767]], [[-5.71580218, 6.39074135]], [[-6.65949523, 6.0468356 ]], [[-6.4258523, 6.3543164]], [[-5.93740988, 6.35994836]], [[-6.32243251, 6.42382541]], [[-6.24652928, 7.29041657]], [[-6.61381757, 7.30721425]], [[-6.30737041, 6.33499972]], [[-5.79278188, 6.42278168]], [[-5.69669005, 6.68328879]], [[-6.54684159, 6.34557784]], [[-5.88407547, 5.8685365 ]], [[-5.9489043 , 5.57436912]], [[-5.80059097, 5.49984043]], [[-5.80267723, 6.52199943]], [[-6.54174805, 5.4993763 ]], [[-5.78850589, 5.05937209]], [[-5.61374226, 4.63617659]], [[-6.69722221, 5.5359843 ]], [[-6.07733765, 5.51699619]], [[-6.00145466, 5.48447458]], [[-5.85353965, 6.13316696]], [[-6.67664228, 6.14973773]], [[-5.81909547, 6.522201 ]], [[-5.82412397, 6.52324599]], [[-6.7161743 , 6.32024441]], [[-6.05409047, 6.23976477]], [[-5.77500698, 5.58222069]], [[-5.79145104, 6.50293843]], [[-5.7955339 , 6.41040648]], [[-6.5980418, 6.2339596]], [[-6.37630793, 5.60976613]], [[-6.61771068, 5.53865529]], [[-6.64406961, 5.57239423]], [[-6.3305022 , 5.54497785]], [[-5.94559146, 5.52288804]], [[-6.57526294, 5.47287856]], [[-6.61797653, 5.88424235]], [[-6.64091542, 5.58745 ]], [[-6.65931062, 5.61741873]], [[-6.29266209, 5.62722803]], [[-6.55912718, 5.56288878]], [[-6.37399382, 6.4116029 ]], [[-6.60447096, 5.40232114]], [[-5.71824743, 6.53681313]], [[-6.64219845, 5.57634591]], [[-6.5433019 , 5.59100035]], [[-6.38164739, 6.11063425]], [[-6.64101876, 5.61775681]], [[-6.65234199, 5.76990441]], [[-6.7265872 , 5.60767517]], [[-6.60812533, 5.53030047]], [[-6.63837065, 5.58036963]], [[-6.63282198, 5.46591798]], [[-5.82822516, 5.56659069]], [[-5.74438811, 5.55851684]], [[-5.76035512, 6.53674593]], [[-5.70533215, 5.45835969]], [[-5.76548907, 6.41510763]], [[-5.74987076, 5.78580102]], [[-5.66231903, 5.59233369]], [[-5.71971893, 6.02905614]], [[-5.69855121, 5.55574009]], [[-5.87419196, 5.86013273]], [[-6.57771966, 6.54184534]], [[-5.65175408, 6.25611165]], [[-5.70218129, 5.51238718]], [[-5.6696704 , 5.57412191]], [[-5.69009989, 5.61846105]], [[-6.27451712, 6.42741288]], [[-5.7012711 , 5.61753231]], [[-2.72061377, 5.3980454 ]], [[-2.7559037 , 6.39076748]], [[-2.71461391, 6.43518181]], [[-2.63372328, 6.43857918]], [[-2.66606877, 6.43733921]], [[-2.64915748, 6.34413757]], [[-2.65356185, 6.10486155]], [[-2.66395912, 6.47906971]], [[-3.44950907, 5.42320118]], [[-3.39870386, 6.41817477]], [[-2.63319856, 6.41409544]], [[-3.32611836, 6.0810409 ]], [[-2.65992269, 6.31927886]], [[-2.67819373, 6.37626523]], [[-2.92180987, 6.40276108]], [[-2.67781993, 6.9282358 ]], [[-2.688636 , 7.42314848]], [[-2.66144083, 6.34659113]], [[-2.560162 , 6.38638599]], [[-2.60554276, 6.36800672]], [[-3.12982522, 6.40798044]], [[-2.7273264 , 5.50317181]], [[-2.84238295, 6.39072727]], [[-3.47171851, 5.40068387]], [[-3.08500285, 6.37890745]], [[-2.63965514, 5.63530884]], [[-2.61575187, 5.60326104]], [[-2.67390778, 5.50978134]], [[-2.62491412, 5.39535391]], [[-2.67914621, 5.97208383]], [[-2.64431199, 6.37959368]], [[-2.63064904, 5.55549195]], [[-2.66401879, 5.36526891]], [[-2.62085551, 5.49654005]], [[-3.22439923, 6.42148689]], [[-3.14503432, 5.4294444 ]], [[-2.68033612, 6.10338415]], [[-2.67712331, 6.41883231]], [[-1.68765096, 6.11435336]], [[-2.64165718, 6.42826877]], [[-2.66812673, 6.43296001]], [[-2.62609798, 5.43830951]], [[-2.66152775, 6.39046153]], [[-2.66350259, 6.43851815]], [[-2.66274483, 6.43507862]], [[-2.66268032, 6.43753653]], [[-2.66499527, 6.43531818]], [[-2.66054142, 6.35457611]], [[-2.63853843, 5.47292995]], [[-2.69614975, 5.7103569 ]], [[-2.96328359, 5.43335762]], [[-2.77769797, 6.13527784]], [[-2.71904747, 5.46665769]], [[-2.53510417, 5.48415433]], [[-2.5598444 , 5.54204293]], [[-2.63075426, 6.40860699]], [[-2.54995301, 5.61227712]], [[-2.58510398, 6.44451274]], [[-2.53934257, 5.47440828]], [[-2.51963127, 4.74028671]], [[0.16860557, 6.03169925]], [[0.30031374, 6.00692446]], [[0.55580816, 5.52434368]], [[1.27431209, 6.20324149]], [[1.26092463, 6.21221194]], [[1.27292464, 6.24900551]], [[0.30573945, 6.1873239 ]], [[1.25512774, 6.1891283 ]], [[0.2998889, 6.0383872]], [[0.41779824, 6.05186541]], [[0.32957734, 5.11911649]], [[0.34512796, 6.1131767 ]], [[0.9192658 , 5.32937734]], [[1.2583648 , 6.23604515]], [[1.26038038, 6.20304878]], [[2.22241702, 5.79399585]], [[1.25407747, 6.21003984]], [[1.21317825, 5.28272852]], [[0.50430071, 5.31517053]], [[1.21516947, 6.22186504]], [[1.29038827, 5.92051952]], [[1.26223161, 5.56979384]], [[0.32974785, 5.22710019]], [[1.24683324, 6.19425747]], [[1.21777601, 6.2050424 ]], [[1.25894705, 6.20819828]], [[1.25912312, 6.20993447]], [[1.25093229, 6.20856315]], [[1.2803489, 5.6625786]], [[0.33893941, 5.20433266]], [[1.17783217, 6.21051929]], [[1.23441201, 6.20723511]], [[1.20109539, 5.46469463]], [[1.18364039, 6.14010019]], [[1.25588522, 5.24756804]], [[1.24656138, 6.12681936]], [[1.15678985, 6.11067308]], [[1.04124094, 5.95801278]], [[1.7042971, 5.2345292]], [[1.45360168, 6.19798186]], [[1.25385931, 6.19637481]], [[1.30175261, 5.34762698]], [[0.90043812, 5.74124453]], [[1.27653622, 5.35327533]], [[1.27050963, 6.16475293]], [[1.32796884, 6.14812128]], [[1.336096 , 6.15985313]], [[1.32924286, 6.1802179 ]], [[0.9776326, 6.1929885]], [[1.28920771, 6.27799962]], [[0.38412161, 5.33951214]], [[1.29915761, 5.47811272]], [[2.22247176, 6.26676741]], [[1.32117646, 6.22874713]], [[0.43333281, 5.46249299]], [[3.18200651, 5.59291813]], [[1.44162181, 5.27676509]], [[1.25593292, 5.81015807]], [[1.27789313, 5.24248219]], [[1.28631512, 5.26060834]], [[0.1858639 , 3.51346927]], [[0.32285962, 3.10328667]], [[-0.13853102, 4.36589327]], [[0.34026461, 2.51813593]], [[0.13752525, 4.3121109 ]], [[0.29718828, 3.41119032]], [[-0.55945354, 4.12194965]], [[-0.55990386, 3.23616376]], [[1.21957726, 3.50467513]], [[0.25390744, 3.41337997]], [[0.17008532, 4.26027775]], [[0.27372448, 3.3897578 ]], [[0.24972848, 4.25696366]], [[0.27834907, 3.68816742]], [[0.22924135, 3.41607662]], [[0.23679721, 3.388935 ]], [[0.22812297, 3.3758386 ]], [[0.26687667, 3.40809232]], [[-0.6795149, 3.3776139]], [[-0.66410554, 3.3234069 ]], [[-0.6150162 , 3.31932078]], [[0.13368132, 3.41207359]], [[0.18621367, 4.31043583]], [[0.71276738, 3.72266511]], [[0.28252779, 3.42258942]], [[0.57125291, 3.42518006]], [[0.29616209, 3.42138077]], [[0.31564271, 2.71476552]], [[-0.43844472, 3.29102569]], [[0.26890969, 3.32659114]], [[0.28748556, 3.42908495]], [[0.29351993, 3.38913078]], [[0.30051011, 3.41336865]], [[0.30166827, 3.38201276]], [[0.30913723, 3.41078412]], [[0.23242844, 4.33651977]], [[0.20830339, 3.5186289 ]], [[0.30435465, 3.45513232]], [[0.2303838 , 3.90737843]], [[0.28688835, 3.41149303]], [[0.28035223, 3.38123841]], [[0.17888347, 4.24638021]], [[0.24872854, 3.46039513]], [[1.12979363, 4.24692917]], [[0.20256526, 3.66862822]], [[1.14520355, 3.54062423]], [[2.12739685, 2.84122023]], [[1.2180114 , 2.58315168]], [[1.21520151, 2.58577503]], [[1.2024998 , 2.69681277]], [[1.21161484, 2.59870423]], [[1.24174691, 2.59417167]], [[1.23483823, 2.57910423]], [[2.73953938, 2.66680136]], [[1.9353869 , 3.58070846]], [[2.08632635, 3.34890555]], [[1.23617192, 2.54730026]], [[1.17781159, 3.487806 ]], [[1.17184852, 3.61088872]], [[1.76881586, 3.5581832 ]], [[-2.84298842, 5.06629136]], [[-2.8194437 , 4.47650981]], [[-3.51865497, 4.45360644]], [[-3.68652039, 4.4885973 ]], [[-3.93901668, 3.92997117]], [[-3.78659792, 4.42988811]], [[-3.87711582, 4.22126884]], [[-3.75173478, 3.32518349]], [[-3.74791412, 3.47914901]], [[-3.73168283, 3.39420322]], [[-2.86989304, 3.4657822 ]], [[-3.7758211 , 3.36933444]], [[-3.71560005, 4.42412742]], [[-3.78740004, 4.31767239]], [[-3.68000328, 4.34836501]], [[-3.68352452, 4.16485521]], [[-2.81153005, 4.38214097]], [[-3.04692518, 4.41530709]], [[-3.4541481 , 4.42448987]], [[-3.0795921 , 4.40133536]], [[-3.20843971, 4.37660841]], [[-2.82336767, 4.4102057 ]], [[-2.87335798, 4.44561741]], [[-2.888139 , 3.5108624]], [[-2.71542089, 4.4217266 ]], [[-1.90956722, 4.41969127]], [[-1.80691645, 4.259202 ]], [[-2.16412364, 4.21238082]], [[-2.10864879, 4.34743459]], [[-1.69360835, 3.4390706 ]], [[-1.98040008, 4.33244554]], [[-2.84407449, 4.35875104]], [[-2.45256535, 4.18331377]], [[-1.84154574, 4.37085109]], [[-2.05123183, 3.73667284]], [[-2.80806668, 3.90798205]], [[-2.86067259, 4.08180112]], [[-2.78860183, 4.23723265]], [[-2.77614598, 3.38345907]], [[-2.78590021, 3.45839872]], [[-2.7656799 , 3.35170522]], [[-2.77002243, 3.32497057]], [[-3.43658397, 3.61954836]], [[-3.21557613, 4.28567927]], [[-2.76499096, 3.31908908]], [[-2.79442471, 3.37417245]], [[-2.80923679, 3.37728092]], [[-2.78171268, 3.42565496]], [[-2.78140744, 4.38789778]], [[-2.707472 , 3.53148456]], [[-2.71789485, 3.96388162]], [[-2.70259701, 3.74345099]], [[-2.68134877, 3.38596031]], [[-2.73045771, 3.41915063]], [[-2.69093542, 3.39854161]], [[-2.72607342, 3.66394915]], [[-3.66934061, 3.35802717]], [[-2.89391029, 4.41999691]], [[-3.10887812, 4.45443793]], [[-3.4261001 , 4.22256911]], [[-6.84708102, 4.00884581]], [[-5.9089994 , 5.01121016]], [[-5.79355774, 4.2665451 ]], [[-6.895121 , 4.28962488]], [[-6.48643584, 4.30736492]], [[-6.35735307, 3.97267263]], [[-6.70626364, 4.17489471]], [[-5.9282249 , 4.29057293]], [[-5.71040306, 3.5422245 ]], [[-5.79506719, 4.29663228]], [[-5.82295335, 4.14556081]], [[-5.90779242, 4.25585985]], [[-6.51118011, 4.26903299]], [[-5.87307132, 4.31389145]], [[-5.90147 , 4.24589628]], [[-5.85665343, 4.16367464]], [[-5.84920091, 4.02179068]], [[-5.86438422, 4.23568066]], [[-6.8187324 , 4.15168227]], [[-5.85771812, 4.26527366]], [[-5.84129001, 3.28559193]], [[-6.90480635, 4.9064433 ]], [[-5.9659801 , 4.93535338]], [[-5.98848726, 4.28502657]], [[-6.19216582, 4.14951865]], [[-5.8687675 , 4.16059091]], [[-6.15348301, 5.09388583]], [[-5.94000034, 5.36090684]], [[-5.81070608, 5.1703819 ]], [[-5.89305579, 5.12685923]], [[-6.15186962, 5.47057264]], [[-6.23537851, 5.10835617]], [[-5.82449661, 5.17317048]], [[-5.84761118, 5.9181291 ]], [[-6.13503799, 4.9584262 ]], [[-5.8514356 , 5.23920163]], [[-5.86594373, 5.16422644]], [[-5.87605805, 5.14098364]], [[-5.82058977, 4.24466227]], [[-5.83459417, 5.24453047]], [[-5.81649015, 4.32231007]], [[-5.87994697, 4.70037161]], [[-5.77858137, 4.21415302]], [[-5.82202487, 4.27238733]], [[-5.88932041, 4.52190337]], [[-5.83040827, 4.76182387]], [[-5.82286566, 4.30180757]], [[-5.83809496, 4.32057573]], [[-6.11735423, 5.23783453]], [[-5.81109166, 4.56118622]], [[-5.77636288, 5.27265019]], [[-5.8860454 , 5.30376525]], [[-5.84877844, 4.3572093 ]], [[-5.82461446, 5.14940024]], [[-6.03318283, 5.2730206 ]], [[-5.91025052, 5.29723948]], [[-6.59297285, 5.31792908]], [[-6.65625672, 5.31591087]], [[-5.86814064, 4.3393201 ]], [[-5.91517194, 5.35603623]], [[-6.73556147, 5.1786871 ]]] # vetMedia = [[3.2399792775885605, 5.749123650783435], [-2.5089875286598047, 7.050576992910434], [-5.979970207400023, 6.472491990780745], [-6.101578573236324, 5.799870123043633], [-2.6819962571684104, 6.062439555847986], [1.1234743034342471, 5.820498978873343], [0.4713477311005363, 3.4463582882682315], [-3.0194272910756297, 3.964029824011644], [-6.024997604593623, 4.662207079209501]] #new calib pm # vetMedia = [[5.659876581898499, 2.8772734539828906], [-2.823735117600769, 5.3733525049041635], [-10.075519538201513, 4.997190599506009], [-7.842864086655539, 3.860996710192929], [-3.102908853695852, 2.8214431380996365], [4.7054141544254735, 0.8291959819423919], [0.9167078470655525, -0.11503259872139514], [-6.539971893990847, 1.4233652397602772], [-7.229212357631212, 1.5802003804341576]] # vetPontos =[[4.94742408, 2.93795133], [4.67818742, 2.9201221 ], [4.88918223, 2.86292658], [4.82309382, 2.86100159], [5.00007455, 2.93072617], [4.88737504, 2.8622715 ], [4.90210962, 2.86197138], [4.83028064, 2.97825174], [4.82976693, 2.86162664], [4.85777661, 2.8599973 ], [4.21076743, 2.40256017], [17.18171212, 2.79494634], [17.34883298, 1.48040408], [18.70045818, -1.07351148], [14.29191712, -0.86451991], [20.08749727, 1.15428886], [4.10321001, 1.58133945], [5.56394225, 2.63625171], [5.0715194 , 2.83812509], [4.9634361 , 2.77822903], [4.91139157, 2.77602947], [4.90666706, 2.8107654 ], [4.90316328, 2.91453644], [4.86798725, 3.26720612], [4.89117225, 2.8631597 ], [4.88443366, 3.09322606], [4.89282702, 3.12857258], [4.88512097, 2.94981384], [4.90219943, 2.86657779], [4.93783512, 2.9022523 ], [4.92098812, 2.90453764], [4.90295911, 2.89122911], [4.90740278, 2.90762645], [4.91795948, 2.93189703], [4.93463903, 2.82972838], [4.92946209, 3.8158328 ], [4.89887338, 3.78567511], [4.96503299, 2.84754162], [4.92816165, 2.85285104], [4.90792374, 2.85722165], [4.89904099, 2.85548602], [4.91402686, 2.94896357], [4.37855376, 2.9220201 ], [4.15134859, 3.92199366], [3.84149033, 3.8729769 ], [4.16299648, 3.89734778], [3.80091016, 3.53396226], [3.77589852, 3.86685073], [3.98783038, 3.88126745], [4.71178046, 3.90991383], [3.81880301, 2.94105691], [4.9171935 , 2.87467202], [4.89526933, 3.07537447], [4.87376821, 2.90509967], [4.0424756 , 3.42321503], [4.86671049, 3.41076184], [4.95502462, 2.8963076 ], [4.94676352, 2.90294935], [4.89780716, 2.91832238], [-3.60986085, 4.8166255 ], [-2.92278087, 4.99230249], [-3.08169551, 5.92125642], [-2.95191221, 5.83565388], [-3.67489295, 5.14865949], [-2.86743042, 4.8694663 ], [-2.47668424, 4.96382372], [-3.17686319, 5.98035679], [-2.94907293, 6.11438951], [-2.95626155, 5.77538971], [-2.90878018, 5.56556805], [-2.90154702, 5.82946456], [-2.92841315, 5.97904389], [-2.91748866, 5.00362884], [-2.93035367, 4.98811259], [-2.97918454, 4.97653191], [-3.00983964, 4.96903747], [-3.05143756, 4.94631579], [-3.32651531, 4.94790513], [-3.0020694, 5.6741595], [-2.95437316, 5.05036916], [-2.96918858, 6.05652834], [-2.99375077, 6.17312648], [-3.14923049, 5.51680994], [-2.93955564, 5.1436044 ], [-2.99451225, 6.01161661], [-2.97445432, 5.06109043], [-2.94389401, 5.13035155], [-2.8590444 , 5.15245422], [-2.401575 , 5.04869469], [-1.86479983, 5.56034654], [-1.89094639, 5.04329746], [-1.90190787, 5.00987577], [-1.91701552, 4.97815573], [-2.23205983, 4.94470728], [-1.89681136, 4.4540459 ], [-2.86471945, 5.78072061], [-2.89649975, 6.0324791 ], [-2.63998075, 5.05663804], [-2.88782613, 5.3583207 ], [-2.92075166, 4.99970699], [-2.97700582, 5.04001311], [-2.94845272, 4.99775011], [-2.93782544, 5.51971679], [-2.35582521, 5.97231967], [-3.00327042, 5.98075932], [-3.02562954, 5.12921211], [-2.92305423, 6.08310976], [-2.2618999 , 4.98961102], [-2.03103262, 5.04332708], [-1.92801228, 5.01900787], [-1.86707098, 5.15746219], [-2.36005 , 6.06412467], [-1.84860039, 5.49065555], [-1.92719836, 5.09624141], [-2.85311128, 6.13495749], [-2.94193131, 5.59598114], [-2.2821328 , 6.14429986], [-1.83501544, 5.17340402], [-1.86207289, 5.00589328], [-11.14879527, 4.71929784], [-11.02999597, 4.82630825], [-9.88444886, 4.79085426], [-9.99793577, 4.77490282], [-9.95145063, 4.51121788], [-10.7200408, 4.4446682], [-10.20874372, 4.86022942], [-9.97272754, 4.93003392], [-10.33309464, 5.26152244], [-10.07021537, 5.17141317], [-9.97335782, 4.95390761], [-10.07144291, 4.99969421], [-10.19237313, 4.92169333], [-10.45485021, 4.84959791], [-11.21687049, 4.82294883], [-11.20211172, 4.92156892], [-10.37207264, 5.01192097], [-10.15439659, 5.04193574], [-10.10541799, 5.05896743], [-10.16017273, 4.91767444], [-10.17599147, 4.85197745], [-10.10750521, 4.96210044], [-11.21636615, 5.00096785], [-11.16996053, 5.09664566], [-10.57656847, 4.99987252], [-10.04686866, 5.18297357], [-10.06609942, 5.04539238], [-9.44947076, 4.92280892], [-8.89002749, 4.97764458], [-9.92865077, 4.7993911 ], [-9.95630749, 4.94477481], [-8.95147083, 5.1005826 ], [-10.05473622, 5.00537884], [-10.12071136, 4.92342783], [-10.12057522, 5.11847792], [-10.16966925, 5.05221689], [-10.18868976, 4.89391952], [-10.01290162, 4.83357842], [-10.05585185, 4.8462482 ], [-9.08210311, 4.99509408], [-9.03540496, 4.9754387 ], [-9.64363629, 4.81888792], [-10.06514247, 5.13416017], [-10.0830969 , 5.04348412], [-10.11512158, 6.12914656], [-10.11376382, 5.45885952], [-10.02894344, 4.87003306], [-10.0882175 , 4.96550672], [-10.1457825 , 4.94585152], [-9.91504342, 5.05763412], [-10.26325209, 4.98774261], [-10.22610713, 4.9445242 ], [-10.21890923, 5.87597736], [-9.52401421, 5.76452897], [-10.17353638, 5.12788579], [-10.11995365, 5.08180076], [-10.10401221, 5.02155409], [-10.16278321, 4.92951122], [-10.10520285, 5.25775639], [-10.17290407, 4.99807866], [-7.81409926, 3.81854022], [-8.06338534, 3.87990952], [-7.72374139, 3.7041101 ], [-7.97487063, 3.8781683 ], [-8.04480143, 3.96447101], [-8.5283473 , 3.79507422], [-7.84436579, 4.55534034], [-7.8082438 , 4.55024402], [-7.8027885 , 3.57257569], [-7.89490343, 3.83862098], [-7.8565325 , 3.81654147], [-7.91468538, 3.84160084], [-7.95701759, 3.85923662], [-8.0325885 , 3.85854837], [-7.96996512, 3.86324972], [-8.02058267, 3.87986872], [-8.28108487, 3.94071478], [-7.99155519, 3.91760922], [-7.92363769, 4.0246238 ], [-8.03253577, 3.98499276], [-8.3212084 , 3.92637771], [-8.13060708, 3.85213648], [-8.75944242, 3.79202076], [-7.7894545 , 3.90233417], [-8.86808342, 3.95614585], [-7.7770074 , 3.80969382], [-7.82889858, 3.81181524], [-7.77924423, 3.98543492], [-7.79337628, 4.01855859], [-7.84565802, 4.09087107], [-7.94897894, 5.11030166], [-7.9030773 , 4.92607533], [-7.83653848, 3.82847042], [-7.75367323, 3.08396689], [-7.7496423 , 3.80306108], [-7.7390756 , 3.93308745], [-7.80767967, 3.93486446], [-7.89446868, 3.91779843], [-7.80894558, 3.93486776], [-7.84856743, 3.9799239 ], [-7.85598632, 2.81612878], [-8.09743197, 2.82150641], [-8.25175351, 3.78482331], [-7.94906544, 3.85052172], [-7.96482303, 3.79591455], [-7.88778575, 3.84043922], [-7.80651177, 3.90022512], [-7.8911872 , 3.68575908], [-7.90068912, 3.9567252 ], [-7.82266304, 3.9545565 ], [-7.81010326, 3.87175901], [-7.85450289, 3.95377098], [-7.84022865, 2.84362195], [-7.80862924, 3.95442988], [-7.88901956, 3.92400946], [-7.80591517, 3.95641441], [-7.76458544, 3.94209674], [-7.8749606 , 3.90723132], [-7.92711102, 3.90973505], [-7.90994391, 3.96705869], [-1.80968785, 2.69976876], [-0.58616905, 2.81382904], [-1.79703436, 1.72861691], [-1.43743687, 2.90181105], [-2.85972366, 2.93733976], [-1.78784363, 2.84583707], [-1.80815003, 3.77074518], [-1.68747633, 2.90256617], [-1.78906291, 2.84922957], [-1.86391993, 3.93030645], [-1.83257662, 2.84226565], [-1.79386318, 1.93031425], [-1.77672535, 2.8764328 ], [-1.7377039 , 1.70976325], [-19.25810649, 9.89178259], [-18.73061596, 11.14283968], [-18.18348769, 11.12810776], [-16.20404074, 13.93003979], [-12.53647943, -1.47228152], [-9.06158903, -4.1105279 ], [-8.92029306, -0.66571236], [-4.88738578, 0.56861199], [-2.87375194, 0.78641152], [-1.74006457, 1.72958263], [-1.73219462, 1.7889119 ], [-1.7298033, 2.0063339], [-1.73710625, 1.70678876], [-1.74550658, 1.73752076], [-0.65039186, 1.92959954], [-1.21294755, 2.12748398], [-1.74449318, 1.95518702], [-1.08836148, 2.13109645], [-1.79359919, 2.82316977], [-1.73638845, 2.75623855], [-0.68940018, 2.86258605], [-1.50980669, 2.86588843], [-1.4585813 , 2.84241737], [-1.75118384, 1.92676639], [-0.94320689, 2.49191782], [-1.04459577, 2.85057383], [-1.77136076, 2.67926068], [-1.74996635, 2.85912556], [-1.76111562, 2.35562059], [-1.77920678, 2.84306654], [-1.80254053, 2.85073785], [-1.45586193, 2.41471511], [-1.79591734, 3.96942814], [-1.28706464, 2.75647013], [-1.76253453, 2.80765692], [-1.77487318, 2.8333434 ], [-1.77734342, 2.36798397], [-1.76984078, 2.59207886], [-1.76006643, 2.46368422], [-1.75213355, 1.93552571], [-1.76355085, 1.82386456], [-1.78816106, 2.80804768], [-1.10673179, 2.85731722], [-1.72993717, 2.85548909], [-1.5852681, 1.8916551], [-1.78787839, 2.75502632], [5.30788956, 0.7960988 ], [4.91549349, 0.56214809], [5.09604692, 0.76900005], [5.07006168, 0.54264736], [4.27345419, 0.55995727], [5.04459386, 0.99981284], [5.04646821, 0.6753015 ], [4.39229221, 0.66871109], [3.92299819, 0.64965711], [3.94651294, 0.65609057], [5.06335024, 1.54679969], [5.05935074, 0.63978201], [3.93359149, 0.63110215], [3.93689487, 1.10115528], [4.12488716, 0.62934831], [5.02934462, 0.66419848], [5.05334144, 0.66010924], [4.24775087, 0.63594569], [4.77435241, 0.61416108], [5.03713636, 0.63645778], [4.58225808, 0.22837221], [5.02732526, 0.66938161], [5.00482178, 1.07584377], [3.9364456 , 0.60297846], [4.61354783, 0.63015254], [3.9502187 , 0.61758477], [5.04449465, 0.62010081], [5.05193159, 0.66469166], [5.00225253, 0.61863056], [4.09905589, 0.59094147], [4.58865371, 0.58581352], [5.05782738, 1.01871766], [5.1137603 , 1.63646881], [5.08840153, 1.12681598], [5.08511084, 1.77378665], [5.08883352, 0.65582408], [4.02643073, 0.62650199], [4.0295551 , 0.65482155], [3.98442752, 0.61239125], [4.86979763, 0.64765057], [5.07643101, 0.60521348], [5.04803397, 0.63522347], [4.07941011, 0.64764196], [3.90969671, 1.73719521], [5.10718138, 0.62124994], [3.93476806, 1.73450425], [5.06501729, 0.67610072], [4.04265131, 0.61710667], [5.09893065, 0.58012746], [5.00610941, 0.62828374], [5.45460223, 0.81544212], [4.737973 , 0.65371699], [5.11502281, 0.65144188], [5.73570086, 1.70616084], [6.14657053, 1.7640948 ], [5.20100571, 1.52541079], [4.12205618, 1.77152395], [5.14010379, 1.6004313 ], [5.05934888, 0.91050838], [5.10650963, 0.75760068], [ 2.92465367, -0.38707523], [2.8139205 , 0.43512297], [ 1.70070243, -0.5204782 ], [-0.61694536, 1.6149085 ], [1.7016315 , 0.59970517], [1.65629539, 0.60006523], [0.56559153, 0.2522748 ], [ 2.94028759, -0.51175623], [ 2.89122987, -0.51105175], [ 1.73327144, -0.53735851], [ 1.40993958, -0.50141073], [ 1.73669533, -0.53600221], [0.40624908, 0.54148981], [ 2.86537778, -0.54226847], [ 1.36137542, -0.36693663], [ 2.85053481, -0.395157 ], [ 1.76002209, -0.49888589], [ 1.8870247 , -0.43565287], [ 1.205733 , -0.53823512], [ 2.88668536, -0.57989536], [1.72022376, 0.57656751], [ 1.70831714, -0.44114816], [1.75897029, 0.47693704], [0.54184849, 0.56813927], [-0.6332421 , 0.56443319], [0.57661491, 0.52307243], [0.55815229, 0.56908833], [0.55124123, 0.80583891], [0.40232398, 0.57033509], [0.56334819, 0.5650295 ], [-0.45770877, -0.11162823], [-1.72682445, 0.5158074 ], [-0.63459879, 0.56157251], [-0.55806489, -0.56665939], [ 0.53315802, -0.5459602 ], [ 0.66640877, -0.59538254], [ 0.96064599, -1.63985188], [ 0.9316085 , -0.54722612], [-0.58272456, 0.55234054], [ 1.48428437, -0.53244172], [ 0.28364057, -0.55388039], [ 1.20699498, -0.53713117], [ 0.51257679, -0.57189006], [ 1.68418879, -0.54170366], [ 2.85855536, -1.43488698], [ 1.50985935, -0.55335299], [ 1.74862953, -0.57055401], [-0.56790887, -0.567931 ], [0.70166176, 0.13936905], [-0.54217041, 0.23480258], [-0.58204306, -0.57852248], [ 0.61056101, -0.5409338 ], [ 1.7602212 , -0.42455077], [ 0.80659984, -0.63263542], [ 1.71006575, -0.50994982], [ 2.84675911, -0.48480091], [ 0.57524716, -0.64498198], [1.70093632, 0.26992936], [-0.21920044, 0.56367639], [ 0.59101841, -0.55244567], [-6.31332674, 2.15307684], [-6.23300872, 0.73919401], [-6.28922462, 1.534132 ], [-6.18692689, 0.97996111], [-6.49697075, 1.62446804], [-5.32890496, 1.64764113], [-4.93443341, 0.53081865], [-7.70469999, 1.25694346], [-6.94150043, 1.60850549], [-6.55430351, 1.52217999], [-5.23845211, 0.52696731], [-6.38684378, 1.00862522], [-6.39921733, 1.51352199], [-6.55408975, 1.55877713], [-6.40556446, 1.57689738], [-6.14918847, 1.54929046], [-5.27548464, 1.55151617], [-6.3766296 , 1.54039232], [-5.21113518, 0.96207661], [-7.50501205, 1.48344779], [-6.65449981, 0.77765698], [-6.4657332 , 1.49383724], [-7.23189548, 1.48668423], [-5.84532532, 1.26013504], [-6.38120775, 1.56911449], [-7.48316116, 1.32289585], [-7.46490461, 1.92528268], [-5.48430169, 1.32113111], [-6.56233351, 2.27039712], [-7.64792719, 1.54825006], [-5.27090698, 1.60718395], [-6.36075822, 0.43472376], [-6.23897756, 0.44591111], [-6.34134835, 1.42036148], [-5.22879387, 1.57617634], [-6.46173895, 0.78516204], [-6.43177422, 1.51044488], [-7.64058152, 1.45909865], [-7.5816331 , 1.51033415], [-6.49007743, 1.57945591], [-5.66009086, 1.39723432], [-6.44944434, 2.62939712], [-6.44852305, 1.57314801], [-6.4561465 , 2.52421825], [-6.45284396, 2.35823984], [-6.40566584, 1.46950619], [-6.33323774, 1.46690899], [-7.50832279, 1.4895201 ], [-6.4334242 , 1.48550826], [-7.50729559, 1.2972149 ], [-8.66217183, 1.48683759], [-6.47006621, 1.52561486], [-6.34804127, 0.91390655], [-5.76612878, 1.54306979], [-6.72200956, 1.47462011], [-6.40012166, 1.43293013], [-7.56611607, 1.45431188], [-6.49936982, 1.6884616 ], [-6.46518835, 1.49973322], [-7.628668 , 1.47036101], [-8.77596664, 1.20157833], [-8.03142786, 1.46674194], [-8.8808856 , 1.38844829], [-8.87652788, 1.39040518], [-7.00249453, 1.44712234], [-6.92754116, 1.47181854], [-6.1703516 , 1.44799023], [-6.74710751, 1.53994808], [-5.37992334, 1.53287215], [-6.49277958, 1.48930635], [-6.62104485, 1.48464597], [-6.63398839, 1.51485654], [-6.68183845, 2.66200898], [-6.87141433, 1.54169703], [-4.31195131, 1.62362203], [-6.2581145 , 2.39398276], [-7.88916079, 1.32099746], [-8.26039877, 2.10908029], [-7.69155394, 1.51846386], [-8.91095974, 1.77993997], [-5.93552449, 1.52801768], [-5.36474017, 1.51785005], [-7.70037203, 1.52649272], [-7.72252882, 1.4460509 ], [-8.90173699, 1.51129511], [-7.5657362 , 1.42867868], [-8.75925998, 1.3770478 ], [-7.8064288 , 1.48984425], [-7.85498586, 1.42761324], [-6.64218654, 1.493526 ], [-6.73389478, 1.48610991], [-6.74688406, 1.99637321], [-5.38911741, 1.55866568], [-7.35442938, 2.20955856], [-7.7479735 , 1.56617331], [-7.83655309, 2.64351706], [-8.10834376, 1.49537795], [-6.96232093, 1.45126018], [-6.51306432, 1.52313049], [-7.71148014, 2.3881692 ], [-6.60149463, 1.41834987], [-7.66933701, 1.43731608], [-7.21210536, 1.41445179], [-7.82611499, 1.36393177], [-7.03920022, 0.94004075], [-5.54641128, 1.53374782], [-7.7085175 , 1.49410113], [-7.8027686, 1.5022516], [-6.70755736, 1.48533168], [-6.58422388, 1.49948268], [-6.73474632, 1.42767844], [-6.5866091 , 1.39871618], [-8.88933264, 1.3953734 ], [-6.72981517, 1.50680789], [-6.97504199, 1.45129995], [-6.23756864, 1.46479922], [-6.4068882 , 1.46029517], [-8.87169355, 1.51606346], [-8.97504499, 1.44549621], [-7.72817821, 2.26832595], [-8.92306643, 1.19946184]] # # x = np.asarray([vetMedia[0][0], vetMedia[1][0], vetMedia[2][0], vetMedia[3][0], vetMedia[4][0], vetMedia[5][0], vetMedia[6][0], vetMedia[7][0], vetMedia[8][0]]) # y = np.asarray([vetMedia[0][1], vetMedia[1][1], vetMedia[2][1], vetMedia[3][1], vetMedia[4][1], vetMedia[5][1], vetMedia[6][1], vetMedia[7][1], vetMedia[8][1]]) # plt.plot(x, y) # for x in vetPontos: # plt.plot(x[0], x[1], 'o') # plt.show() # print(targets[:, 0]) # print(targets[:, 1]) # targets = np.array([[20, 20], # [960, 20], # [1900, 20], # [1900, 540], # [960, 540], # [20, 540], # [20, 1060], # [960, 1060], # [1900, 1060]], np.float64) # targets = np.array([[20, 20], # [960, 20], # [1900, 20], # [1900, 540], # [960, 540], # [20, 540], # [20, 1060], # [960, 1060], # [1900, 1060]], np.float64) # eyes = np.array([[0.0, 0.0], # [0.5, 0.0], # [1.0, 0.0], # [1.0, 0.5], # [0.5, 0.5], # [0.0, 0.5], # [0.0, 1.0], # [0.5, 1.0], # [1.0, 1.0]], np.float64) # # coeffsX = np.linalg.pinv(eyes).dot(targets[:, 0]) # coeffsY = np.linalg.pinv(eyes).dot(targets[:, 1]) # matrix = np.vstack((coeffsX, coeffsY)) # # matrix = np.array([[1920.0, 40.0], [40.0, 1080.0]], np.float64) # pm = np.array([0.5, 0], np.float64) # # print('coeffsX: ', coeffsX) # print('coeffsY: ', coeffsY) # print('matrix: ', matrix) # print('pm: ', pm) # # gaze = matrix.T.dot(pm) # print('result: ', gaze) # def get_equation(x, y): # return np.array([x*x, y*y, x*y, x, y, 1]) # eyes = np.array([[0.0, 0.0], # [0.5, 0.0], # [1.0, 0.0], # [1.0, 0.5], # [0.5, 0.5], # [0.0, 0.5], # [0.0, 1.0], # [0.5, 1.0], # [1.0, 1.0]]) # eyes = np.array([[3.29094594, 6.01488458], # [-4.23217415, 5.97621546], # [-12.64338757, 5.4388204], # [-11.06943859, 3.83121719], # [-4.90428572, 4.33292053], # [1.64777518, 4.79836256], # [0.19614697, 3.1447778], # [-11.25516758, 4.29846204], # [-13.01463917, 5.56702358]]) # # targets = np.array([[20, 20], # [960, 20], # [1900, 20], # [1900, 540], # [960, 540], # [20, 540], # [20, 1060], # [960, 1060], # [1900, 1060]]) # # for x in targets: # print(str(x[0])+','+str(x[1])) # plt.plot(x[0], x[1], 'o','m') # plt.show() # # # poly = [] # for eye in eyes: # poly.append(get_equation(eye[0], eye[1])) # poly = np.asarray(poly) # # coeffsX = np.linalg.pinv(poly).dot(targets[:, 0]) # coeffsY = np.linalg.pinv(poly).dot(targets[:, 1]) # matrix = np.vstack((coeffsX, coeffsY)) # # print(matrix.dot(get_equation(-4.23217415, 5.97621546))) # # plt.hist2d(eyes[:, 0],eyes[:, 1], normed='false', cmap='plasma') # plt.show() # vet = [1, 2, 3] # print(vet) # vet.pop(0) # print(vet) # for x in range(10): # print(x) # import ctypes # user32 = ctypes.windll.user32 # sizeX = user32.GetSystemMetrics(0) # sizeY = user32.GetSystemMetrics(1) # vetTargets = [[20, 20], [(sizeX/2), 20], [sizeX, 20], [sizeX, (sizeY/2)], [(sizeX/2), (sizeY/2)], [20, (sizeY/2)], [20, sizeY], [(sizeX/2), sizeY], [sizeX, sizeY]] # print(vetTargets) # dp = [[4.129266369186453, 12.247612297977895], [4.129266369186453, 12.247612297977895], [74.88391567643659, 54.00744399852397], [71.74545776434316, 49.130539348644305], [10.914580901666127, 6.451857461347771], [7.746763164623232, 12.48296061870522], [7.746763164623232, 12.48296061870522], [25.621601562019293, 12.89620055536318], [11.99361486154227, 13.371795595852916], [20.40853966631866, 20.940660672003986], [24.86831296126377, 21.7776152954317], [63.35513114789583, 24.45139652758334], [22.675144244524333, 16.140265030165835], [19.916381927626816, 17.794388213689018], [26.642433993978983, 29.314816762780623], [18.84751745197515, 15.34167217718965], [19.689133167528553, 15.066055354110546], [20.095745070371734, 18.389344632235236], [26.49291638372833, 10.819249971773672], [20.26261435623374, 18.268358993192976], [18.700185469328773, 20.998731176470898], [21.507620166289342, 21.592309417441612], [14.541915986514084, 16.98662962048047], [33.67369231349397, 33.03608998096527], [16.277643833192485, 12.842262453871882], [17.283296469739398, 12.604386925304595], [19.43169271201755, 17.164512521827447], [23.885553313094967, 20.177408402982337], [18.927605637295358, 13.917528652313422], [12.286824082878596, 12.825796216337721], [7.789239845888474, 12.22768686385632], [8.527131911569995, 12.805257357206614], [13.907492631243187, 13.21553366291883], [8.909337918274218, 8.329261076774742], [6.380971894635749, 5.930817741900569], [12.484496802135709, 8.164216054925873], [8.118152788802547, 5.045538077131312], [6.862221620927315, 8.397183807606183], [80.72142558861593, 78.57228040707949], [83.03379084805461, 81.06126670203619], [51.14813677053915, 49.30520072064442], [6.359727037340278, 7.461473537025313], [12.561000047841759, 9.800210114665418], [60.25250046043401, 61.65907665783644], [6.131967675290056, 8.233221691248247], [9.325144375879063, 5.33679739886108], [10.535951007833205, 8.378431091927467], [7.0156554357673855, 5.250515308225403], [2.386187643119925, 2.2757740706261416], [20.23509117458103, 10.607416101259645], [23.705021624916398, 11.35382828399716], [27.75868925226711, 17.142282582633158], [26.084722283122026, 19.685836398393832], [74.5810111107371, 76.557557954555], [99.17159439110775, 95.6740411614849], [5.769307376122299, 4.693567520606251], [15.495604777381814, 14.268393186665122], [6.315064876759578, 2.4997465617426826], [13.507111014183565, 9.162741544943628], [93.234846233234, 61.760908282324976], [36.77303825125139, 18.323238938602174], [72.67030141821981, 75.6685283393725], [72.67030141821981, 75.6685283393725], [0.9061142303304024, 4.6913953687513015], [89.74265984002058, 60.690266728260156], [22.192346019299734, 22.228360149380393], [7.369855726706902, 3.2424417538894943], [379.4334499759244, 33.107453056065694], [414.45617190834776, 32.76453965379399], [592.9564408511663, 133.50839038950244], [595.7765785507207, 134.05614996084688], [534.6106065666673, 35.70463437716384], [518.0051248479226, 9.525828778766694], [529.3160084419114, 127.83360279555062], [537.751090066738, 134.05695821525126], [589.7605809411514, 138.06558108898287], [598.7334713842212, 140.02381224178998], [539.5235186577595, 139.45311585975986], [534.2203587709529, 131.41158118403803], [536.6046877545656, 137.8992725818919], [534.575426872018, 142.80966099097583], [484.6218782894425, 69.0682733067222], [512.2043109290236, 120.45250517938858], [533.3898131142893, 137.38514403510686], [535.2865724679303, 139.83940081222391], [535.0283976979479, 132.54520669923568], [521.2888475345139, 109.83996503810161], [518.3313830983886, 112.95920057382035], [488.82030911359215, 73.50523577465154], [513.0329311914555, 103.504790009048], [531.1215149120324, 131.3776069361138], [505.26569136123794, 96.12350139811119], [494.26319882157554, 79.7054050970631], [499.18113778178144, 86.8683377440159], [493.22199579039597, 78.06789401676288], [525.6645921870701, 125.65755342487743], [522.1788221792218, 120.70299283529653], [446.24214528149287, 0.7376130058074466], [444.4600609029079, 3.475873468864961], [441.9328479095759, 3.4553671834900967], [445.3976053499908, 2.262865208189254], [431.0514481013587, 20.236320295008937], [430.5464281730404, 21.11030324666936], [523.9427795967543, 112.53168044245706], [529.605022407239, 121.29030566232434], [536.3794277074489, 139.85479414609222], [536.6060804303887, 139.89740097356673], [559.679188034679, 138.82093631034002], [557.2463851207359, 138.75029060072777], [534.9547673341622, 138.49579171102488], [534.6177674083028, 138.07411786670912], [542.8821928002749, 138.650077345355], [542.7367825505779, 138.6718907056207], [536.2517836324502, 140.0720151573469], [536.2517836324502, 140.0720151573469], [535.5313457694348, 139.99435793790036], [535.5313457694348, 139.99435793790036], [508.301039109149, 94.01498485133095], [533.5534952452207, 133.68352535224204], [531.0599996084901, 120.82346213050825], [535.904635206944, 140.00777937084524], [537.465308517974, 140.12412542928752], [537.465308517974, 140.12412542928752], [413.3463598567063, 44.34270553531519], [449.2191455672131, 26.445786857340238], [416.73260602850667, 38.7021889775271], [425.821243658488, 23.265748041520155], [595.032763030085, 131.23040283618514], [512.545791416674, 98.08922864491115], [704.8134657086891, 307.40171836082845], [697.346067484163, 320.6709347796781], [1003.371321775904, 137.08613265047538], [987.9621435249969, 142.32433482282258], [1071.283800088535, 146.05965453389095], [1042.4083951285872, 38.10958019976832], [1031.9882570786392, 64.60764662304635], [1041.0008952616217, 110.93268844950026], [1002.7516638947724, 117.20548594603949], [1006.5009509605877, 117.15399302805318], [1004.8616586863355, 121.52856504799885], [1025.6934243008902, 85.77171992206686], [1014.8740231247688, 104.86352274955075], [1012.4413981932536, 114.97059914656543], [997.6266434081937, 118.32042180441502], [1008.0386866117682, 122.9915102387977], [993.1062215330957, 135.79849127904734], [999.1943716741782, 128.6936301199664], [1016.9550904681511, 116.73381057273932], [984.1107091850471, 204.58531566611717], [1009.754960068503, 141.1875739355116], [993.9367692153754, 130.87157797125369], [970.0020270704061, 147.46133886921817], [1014.14393737699, 119.44686646131422], [998.848041783028, 149.41134895815995], [998.4389084501696, 140.29279864915716], [888.339859322868, 270.8873165718654], [1014.0973986732221, 110.55896550094835], [1002.0444235141956, 136.3042033878693], [947.5048189421221, 123.52981326990763], [979.092639519244, 144.8729536444831], [991.2199344213838, 159.31921169729648], [981.8616756553312, 156.38360770374297], [922.9515917406816, 173.41563113871118], [987.182869896927, 137.82366867468252], [1066.5029719856907, 6.796282713039801], [995.0222091346039, 171.58257613682983], [977.123828143836, 137.04163591299002], [1012.3800518247255, 151.93009523389273], [1003.4380307105723, 165.6061424933698], [997.6185301293219, 171.4525741653034], [1003.3544065381558, 147.13241327950485], [1016.8764835772232, 100.04988277611224], [1012.0581749903398, 125.95490134003987], [989.6756874815397, 166.41771774533223], [999.8606870691973, 146.24041313180365], [937.0148335205307, 128.9688841436392], [933.5042828815181, 118.61845465779774], [958.4352558757843, 88.9991147806459], [952.3316705809362, 91.88701886117198], [851.4554809267458, 408.5862176356703], [942.9817703984808, 341.33325637311395], [995.5488916477332, 176.66007485769958], [1007.3392412525114, 123.96943129130327], [1013.3001682055955, 79.64159038283478], [1108.4431337359645, 87.11298667535752], [935.6929951969544, 108.75363734567284], [1047.6131958576777, 41.595245141350205], [931.6601713677284, 114.09801850600851], [929.2898656862532, 272.48321242573616], [870.233716023004, 553.6692233293243], [917.0889255107977, 475.57863653937534], [889.9416304825799, 487.7530325967703], [933.070166510783, 336.4979591883299], [1011.5003735428467, 324.1114493180522], [947.0288461275012, 271.23453765795915], [1008.7868711947268, 221.0122897967423], [1024.26590189921, 264.3122749758798], [1029.413824861388, 245.64473612671256], [1123.5850947044294, 42.50988290952213], [1119.9048276810547, 50.81637767881293], [1137.370238858862, 27.466134911247735], [1134.5427918968653, 40.05494486749282], [1116.3995037226277, 65.80411412761825], [1094.2250771839074, 107.65014898474348], [1083.3591728198826, 155.79045083317052], [1084.409242087344, 137.46485800419518], [1053.1303507480836, 207.8359051890885], [1032.724328563062, 204.54473333045323], [1081.2255761225738, 106.36661661148426], [1097.4560004182033, 95.7366815424617], [1090.0316101405945, 109.07096679497269], [1041.875439289418, 60.28150166658659], [1043.2556037288743, 55.68232537388619], [1040.8774834411101, 269.43125582245983], [1116.9799824754843, 60.70349847434622], [1108.78877632785, 70.45605149741252], [1009.1887851676626, 303.0367584260838], [951.9162608190063, 291.9963282448174], [959.7420795888731, 291.3674897441007], [1021.0413146125351, 310.7239374563505], [1058.6710743277295, 210.15429827876883], [976.1967519095626, 272.6863774621409], [1011.3231710409626, 309.92608920425573], [946.1596215052114, 290.57322187271274], [935.8813339497733, 299.34997949752994], [946.0958051380562, 253.56996101367284], [1015.5077647026202, 126.09620323569746], [1033.909245091692, 113.30406932768679], [1022.4173717469649, 148.97804191398743], [1005.7670369365861, 319.4038057932073], [1004.0158839669931, 291.56037131073253], [1012.854365436897, 308.86508233831904], [1030.3475228312966, 257.8146975424459], [1030.6541488882604, 282.6078150123443], [980.425714296744, 300.3846585484403], [951.0912867405149, 289.447701915098], [950.0570858603274, 291.3132820645824], [937.4142943420728, 329.1443380271178], [1033.1687841885484, 307.6554189656872], [947.1790182080897, 395.38239445830084], [941.7660497296214, 292.2770604495669], [1029.747778037542, 245.30896089992277], [951.7817672049189, 289.6932762402661], [951.796151766738, 289.63234961498614], [953.3667285723501, 290.02143534622184], [953.3667285723501, 290.02143534622184], [988.3029719847909, 299.9542796704636], [520.9794631071005, 588.5289206881253], [640.3909446887556, 446.5137250337689], [376.4228505157311, 327.7314630931114], [393.1476435682266, 247.9622956368265], [378.25475506297795, 271.87479118276434], [399.82822166688595, 215.122480030233], [479.5802423719174, 204.77620322078045], [488.50613256826773, 193.73498189341572], [436.9161119858146, 185.54917095761226], [421.2720262830802, 189.0307265093182], [489.9663964880011, 165.14001627748448], [485.3309291888643, 196.1403952203176], [447.57279940472574, 194.2626284656676], [412.06557324032804, 184.3785691221676], [411.99250706634575, 183.76734941344938], [434.56171185944675, 153.7409567698699], [411.32805818833094, 200.71415251698613], [416.35330531408533, 197.33516511866233], [415.44990130250153, 200.55365597250017], [413.6668905399603, 203.37152457997095], [410.02949079427924, 196.26175799696475], [430.7169386086749, 195.71026656565527], [426.9306236811407, 234.6838073574988], [462.6429663345923, 222.54233848306987], [481.2685560284382, 212.28025161017092], [419.44679166686643, 181.93574302374768], [417.0584724395824, 192.42233127666492], [419.13218364773434, 191.09014165406592], [450.0467991900109, 208.41230640500936], [415.01995583659016, 251.23732172893264], [426.5128021255541, 207.5418807721359], [436.64838212720895, 208.04065043683195], [402.75924216670194, 212.06233501798735], [397.21442644677074, 191.73326971755873], [403.2692259815284, 191.0226442167635], [363.2002654070495, 182.66362527217913], [459.89351706687347, 83.93203491970479], [476.0765166550307, 53.14199840989052], [424.288603324168, 18.159015062552612], [423.7441835820223, 19.028222178083], [493.282817508461, 22.08825396494548], [418.5191440880051, 184.5123877855164], [497.1313078181222, 15.582487277440535], [497.52162101800013, 18.207000533067756], [411.52747085786905, 190.22589223109168], [413.2999793374114, 191.11577370415995], [486.1842694234599, 194.50965332417405], [479.2084199906261, 188.84737807511735], [480.08433155045805, 193.3263011188297], [435.4088111187625, 197.36209636417217], [415.6107016727069, 189.35611737781184], [417.7615900781424, 179.32570841296274], [408.93280822219754, 204.80596472207907], [408.80610519202367, 205.484708828896], [361.213890818643, 193.49282220170565], [361.213890818643, 193.49282220170565], [429.5315329872918, 155.68560481013878], [343.86766348676997, 171.671572545555], [421.4374066357976, 188.581095051481], [412.51014450097114, 193.28932557497714], [498.3730879767696, 37.34693007729456], [417.6926285861431, 183.01739552520075], [24.071033028626932, 240.38573786174473], [22.389104880162456, 255.64063846957836], [47.493695709783765, 235.22685542282338], [37.970238266673825, 233.85768328018443], [13.727466500518773, 127.66807326747815], [14.694279019309121, 135.67943391256577], [35.44212860975908, 237.3849921260335], [37.456356376265624, 240.39376103316206], [38.430243188645505, 241.70546484976919], [38.39234858805985, 241.18696381689418], [37.57720614000826, 236.80437507992005], [40.967491930758996, 235.03487170425458], [66.45855650738574, 231.91941266167842], [110.60263062098338, 236.77105503670842], [107.56848902161828, 221.60144397249329], [159.68936912712115, 218.9464850353115], [97.02211676762826, 335.77863236873134], [74.03985064530086, 341.97118225758965], [46.2251795626336, 234.7757179845448], [44.12312921207229, 233.66612471350672], [60.2009508852658, 233.65098312685305], [66.50830136143495, 234.52218169283512], [111.19132746644219, 267.0617486860145], [102.6737758323148, 236.72309570957046], [69.30720474147891, 233.5489280106551], [81.80450116917116, 223.04014919190772], [39.55585944761566, 242.50566121014268], [42.293833329191415, 236.5853030359908], [53.86733482134404, 237.54466597838697], [44.60754687183595, 242.63067210946312], [104.93037240364319, 236.2757608340623], [100.9727810298318, 220.31453828754732], [99.07161719099031, 217.9515945447948], [103.85483940137922, 214.92945272840086], [122.54296594011713, 271.20076465539086], [129.90469746784626, 290.99119838436485], [166.68230109768876, 249.12517569126865], [138.42602884417548, 308.29043460274664], [143.24138670329734, 308.50412194526615], [113.99904944492303, 239.7124677902713], [123.05010639504414, 211.0011401866596], [116.84584919465068, 216.1147262825818], [98.37055718049005, 219.09249967836232], [103.47949545682634, 216.69684899089256], [114.37004702242866, 216.63094187044564], [148.6246178114995, 216.80590647517997], [190.5747157715259, 281.5967695245973], [185.56554705215925, 267.2477364412417], [103.58351668744776, 223.9779618418548], [100.33058059190107, 218.89136453457346], [110.07041655570374, 261.85217163263377], [104.12317087024196, 215.56763520227852], [176.9766651285171, 254.5113085308823], [164.59040961341643, 218.09843085674558], [126.06477408455238, 293.59264543594395], [97.88770378743286, 245.28566980465584], [98.87035277815498, 217.69278236277225], [98.87035277815498, 217.69278236277225], [174.3961044345467, 298.50540795265687], [154.0173806577016, 307.0506272200744], [57.80299868761883, 463.29149778492723], [133.9477827112764, 315.9880160913287], [28.98567650079832, 465.6771223185787], [32.31920429098597, 519.9328392370294], [42.12478192912137, 419.8672786536736], [32.80434175327403, 514.0886800035282], [93.3900557583786, 588.2524000009794], [39.75985839306106, 526.3137122415561], [93.85794011838, 557.8885870144948], [94.38859192677383, 559.072235690755], [31.729981600585944, 519.4284731087512], [31.25054295489953, 518.7755035793178], [30.85140685845235, 521.4591974483249], [28.4010755501085, 518.0829291736036], [37.27457373366986, 521.5680315842378], [32.92167340281, 518.510194503343], [41.59434229861958, 472.9655707830012], [58.44221182917345, 462.7908768306306], [31.65242924839513, 518.0989092784015], [31.948211807530697, 527.7518164985695], [28.364785906798147, 484.78615600940515], [32.43965038072725, 521.0224184610793], [31.512171468559444, 519.606829920443], [31.89825150181977, 527.7376839363808], [93.51525087481481, 555.249288496358], [18.42324818674888, 510.31334250697097], [130.24566733405783, 423.936719345763], [89.07374598562144, 450.71786080702253], [51.505235825905196, 480.8703687862198], [75.91207372248547, 541.693234859468], [90.5832474626561, 563.197423776948], [83.3365945180288, 554.3826142453665], [40.158311182580874, 633.5442657075207], [41.62870950014401, 638.6195966828539], [28.807744478698346, 484.71536909054254], [28.842660650513665, 518.9504862461517], [93.4605641496627, 557.9790484129253], [93.51280290365834, 576.6459959493093], [93.4005497234157, 556.1579880474726], [32.05510821547778, 519.3775152705678], [28.689713312549863, 482.55803163091537], [25.90123715497247, 483.3751719514045], [82.888747400573, 550.6061678605373], [68.59789752199754, 542.8887466315266], [32.775299632245904, 519.5632176505281], [32.66510668172748, 518.7520687329626], [94.58422387300276, 558.0080067506651], [94.82742065532527, 549.7810764680048], [46.203033760474625, 526.181426317035], [32.62793663712585, 518.7011499329261], [26.432273979831614, 478.02647135117286], [26.54052579419919, 485.2191441632689], [55.13618032305901, 560.4609288213167], [95.71180547109711, 552.2707684487663], [30.63407264820944, 519.9034781408345], [32.64622820281366, 514.3832491285361], [27.444064682702013, 514.8715206532515], [47.552086200332774, 395.3227671740942], [101.37471831766987, 683.6532662315151], [502.7370285443511, 811.0561166970067], [471.5734702309032, 748.3675105409914], [593.010363222782, 858.5159733298653], [478.19094460925396, 839.8287887683377], [608.4542297617559, 464.63141783936805], [513.4519261690463, 614.5841219969489], [630.7158922492797, 453.1770514728427], [704.8577880799711, 475.4868956989671], [530.8693374078001, 540.9116391599143], [715.7083782201794, 474.3546711650171], [718.4373632388224, 471.0997086416614], [744.9825103542248, 450.3664409732871], [723.5396807552004, 468.0539963098299], [485.66498779865776, 597.5356480701498], [450.7785284564303, 599.8912699884975], [523.1052546460453, 561.0311871544152], [555.2747249431313, 462.08678236822385], [550.9118711194419, 481.04674504933587], [511.12066943776165, 631.6617114948913], [403.5474127991213, 544.3919876760147], [445.57288400603636, 584.7095829331606], [448.63818480750774, 582.3651493578262], [509.32013329928145, 610.2023654630557], [576.138190086487, 477.50585793539125], [453.49429981146204, 585.0057170256231], [447.02110122850974, 585.475712196963], [507.5614062344363, 611.0541178775441], [451.1039710944554, 586.7686526565569], [495.4688570318037, 608.5492192288896], [509.03731137454963, 615.9789577054755], [446.4041151754311, 581.1820860519026], [515.2104311202867, 607.5374108688261], [566.5821992643865, 433.7401545948149], [603.9874122334314, 568.0458953200548], [642.596489095897, 462.4677073657896], [527.2178141415444, 607.062203269179], [715.8625979004479, 491.05075322689936], [528.6848482383073, 605.2976559950384], [550.4729690592859, 640.8692562590388], [640.2304036699126, 460.3267204125125], [640.5393700924429, 469.22981674039784], [524.4073132272903, 633.1013372291768], [501.5404256304246, 626.0490472888323], [451.6444952136461, 601.2427438204045], [633.1378060034967, 482.64287695412645], [637.1941007335694, 462.38537140140306], [621.8060532205524, 642.7494755804717], [594.9894770886312, 578.7074427574576], [516.6698037915316, 618.5235789626295], [506.10880984165476, 604.3352209350642], [680.946900402622, 678.9891156476208], [627.368394224769, 675.7989786809005], [476.63489365848284, 560.2208885276157], [570.2837205845143, 447.42436325943623], [566.6391958492254, 445.55573498392266], [522.4106419219735, 641.1475588992557], [524.683500061472, 615.0630330446503], [523.1834386306625, 580.3766748836911], [523.1834386306625, 580.3766748836911], [624.1918711115826, 667.1477618660188], [712.188198259737, 471.3305583656088], [892.5888473211553, 524.6979250618547], [900.5968743782845, 551.5075799768935], [1030.6393022886818, 591.851210286683], [1082.0257198835545, 196.60852366269975], [1147.202837337127, 213.0991031413134], [1030.2896435594748, 348.37711406010743], [960.2807103826938, 334.12603806098616], [1068.5508900419968, 241.37437529897792], [1091.553027268044, 173.02579596345376], [1031.489653183833, 336.54845987592194], [1031.7733987595857, 327.35033004647204], [1003.4344537486496, 402.1201510314336], [1027.7329682393454, 328.76145457388674], [1033.9804724743535, 311.9881095281361], [1062.2146375158106, 206.3441387148433], [958.4274659048315, 296.3224412655711], [1029.4095972447105, 313.17257072200744], [995.619021859089, 300.24759146988237], [969.8958849980997, 302.2127527501275], [957.279676662197, 292.3636415942061], [889.2247904591983, 475.8355233077933], [932.0092576363198, 333.61506644020295], [828.5997915000559, 454.0624906691382], [909.5915240470878, 415.11120692050326], [908.7037893153191, 420.5438022890123], [951.4027962431823, 293.4754688722265], [1036.1605748024015, 298.1607980286666], [1055.3986981382186, 236.38889763073902], [995.9450411520259, 301.08086757861923], [950.763139930471, 288.17791987139566], [951.19616599432, 290.9745083463657], [952.0125291067777, 289.9085698727853], [1022.3446653432248, 232.87023504971629], [1033.951310582583, 308.90750609724216], [999.4369345829504, 172.54956767851982], [1030.318930904845, 94.83029324939898], [841.5706347117934, 455.9524906621099], [808.9099353558126, 504.3667652318013], [875.2035462004143, 271.00388481371243], [874.3599139274603, 270.1008084537725], [916.2623686178313, 281.2492222565295], [1043.125335585132, 238.3089670180792], [803.3080443181477, 496.27102910143276], [790.6332704236851, 504.05931783147065], [803.7058927493628, 504.9803617692481], [789.355043213294, 533.1230275837302], [871.2444910431046, 525.2605510856529], [930.4872529885536, 360.92979541475944], [890.1450288936268, 529.5980247620306], [868.4797298296943, 534.1919290470466], [957.6289864601778, 340.56537924574974]] # medx = np.mean(dp[:60][0]) # medy = np.mean(dp[0][:60][0]) # print(dp[0:60]) # for x in range(540): # if (x % 60) == 0: # print(x) # vet = np.array([1,1]) # vet2 = np.array([3,3]) # vetMed = np.vstack((vet, vet2)) # gaze = np.array([[1, 3], [3, 2]]) # target = np.array([[5,5]]) # print(np.asarray(vet)) # print('x: ', np.mean(vet[:, 0])) # print('x: ', np.mean(vet[:, 1])) # dEuc = np.linalg.norm(gaze[0][0]-target[0][0]) # dEucY = np.linalg.norm(gaze[0][1]-target[0][1]) # vet = [dEuc, dEucY] # dP = np.std([vet, target[0]]) # print(vet) # print('dp: ', dP) # # print(vet) # for x in vetPontoMedio: # # calcula distancia euclidiana # gaze = matrix.dot(get_equation(x[0], x[1])) # # calcula a distancia x e y do ponto ao target # dEucX = np.linalg.norm(gaze[0] - targets[j][0]) # dEucY = np.linalg.norm(gaze[1] - targets[j][1]) # # adiciona ao vetor # gazeVec.append([dEucX, dEucY]) # if (i % 60) == 0: # # converte array para nparray # aux = np.asarray(gazeVec) # # calcula media # medX = np.mean(aux[:, 0]) # medY = np.mean(aux[:, 1]) # # dP = np.std([[medX, medY], targets[j]]) # vetDp.append(dP) # gazeVec = [] # j = j + 1 # i = i + 1 # print('Desvio padrão: ', vetDp) # # print(targets[0][1]) # # path, dirs, files = next(os.walk("./calib_out")) # file_count = len(files) # # for x in range(10): # plt.plot(x, x, 'o') # # fileName = './calib_out/'+str(file_count+1) # plt.savefig(fileName+'.png') # # for x in range(5): # plt.plot(x, 1, 'o') # plt.savefig(fileName+'-2.png') # # # text_file = open(fileName+'_output.txt', 'w') # n = text_file.write(str(targets)+'\n'+'teste') # text_file.close() # f = open("./calib_out/1_data.txt", "r") # var = f.read() # var = var.split('Media DP:',1)[1] # x = float(var)+5 # print(str(x)) # path, dirs, files = next(os.walk("./calib_out/data")) # arr = [] # for f in files: # aux = open('./calib_out/data/'+f) # media = aux.read() # media = media.split('Media DP:',1)[1] # arr.append(float(media)) # plt.hist(arr, density=True, bins=10) # plt.show() # img = cv.imread('logo.png') # cimg = cv.cvtColor(img,cv.COLOR_BGR2GRAY) # # circles = cv.HoughCircles(cimg,cv.HOUGH_GRADIENT,1,20, # param1=50,param2=30,minRadius=0,maxRadius=0) # # circles = np.uint16(np.around(circles)) # for i in circles[0,:]: # # draw the outer circle # cv.circle(img,(i[0],i[1]),i[2],(0,255,0),2) # # draw the center of the circle # cv.circle(img,(i[0],i[1]),2,(0,0,255),3) # # cv.imshow('detected circles',img) # cv.waitKey(0) # cv.destroyAllWindows() # outputVet = [] # captura = cv.VideoCapture(0) # # Inicia sessão # pygame.init() # ## calibracao ## # # tela cheia # os.environ['SDL_VIDEO_CENTERED'] = '1' # # Define algumas cores colors # BLACK = (0, 0, 0) # WHITE = (255, 255, 255) # # Seta a largura e a altura da tela utilizada [width, height](só funciona para windows) # user32 = ctypes.windll.user32 # # 1366 768- tamanho da minha tela # sizeX = user32.GetSystemMetrics(0) # sizeY = user32.GetSystemMetrics(1) # size = sizeX, sizeY # screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) # run = True # k = 0 # while run: # pygame.event.pump() # global vet # global pause # i = 0 # done = False # screen.fill(BLACK) # px = random.randint(0, sizeX) # py = random.randint(0, sizeY) # pygame.draw.rect(screen, (255, 255, 0), [px, py, 40, 40]) # pygame.display.flip() # time.sleep(1) # ready = False # #CAPTURA 60 POSIÇÕES NO PONTO ATUAL DA ANIMAÇÃO # for x in range(60): # ret, frame = captura.read() # outputVet.append(frame) # # if len(outputVet) == 360: # run = False # # pygame.quit() # print('vetSize ', len(outputVet)) # # Finaliza captura da camera # # captura.release() vet = np.array([[1,2], [3, 4]]) print(np.mean(vet[:, 0]))
355.657407
21,958
0.654448
14,530
115,233
5.188782
0.51404
0.000849
0.000438
0.000318
0.013582
0.010319
0.009205
0.008091
0.004191
0.004191
0
0.694481
0.103529
115,233
324
21,959
355.657407
0.035343
0.990064
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0.1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
7
02e3a768683052a9710141c994fdd0efb6b2330b
1,877
py
Python
tests/test_set_difference.py
koodaa-team/redis-natives-py
dbe3ee65527a7a1b0b1dc35ae968588635732718
[ "MIT" ]
1
2022-02-17T20:02:51.000Z
2022-02-17T20:02:51.000Z
tests/test_set_difference.py
koodaa-team/redis-natives-py
dbe3ee65527a7a1b0b1dc35ae968588635732718
[ "MIT" ]
null
null
null
tests/test_set_difference.py
koodaa-team/redis-natives-py
dbe3ee65527a7a1b0b1dc35ae968588635732718
[ "MIT" ]
null
null
null
from tests import IntegerSetTestCase, SetTestCase class TestSetDifference(SetTestCase): def test_difference(self): self.set.add(1) self.set.add(2) self.set.add(3) assert self.set.difference(set(['1', '2'])) == set(['3']) def test_substraction_operator(self): self.set.add(1) self.set.add(2) self.set.add(3) assert self.set - set(['1', '2']) == set(['3']) def test_difference_update(self): self.set.add(1) self.set.add(2) self.set.add(3) self.set.difference_update(set(['1', '2'])) assert self.set.data == set(['3']) def test_substraction_assignment_operator(self): self.set.add(1) self.set.add(2) self.set.add(3) self.set -= set(['1', '2']) assert self.set.data == set(['3']) class TestIntegerSetDifference(IntegerSetTestCase): def test_difference(self): self.set.add(1) self.set.add(2) self.set.add(3) assert self.set.difference(set([1, 2])) == set([3]) def test_substraction_operator(self): self.set.add(1) self.set.add(2) self.set.add(3) assert self.set - set([1, 2]) == set([3]) def test_difference_update(self): self.set.add(1) self.set.add(2) self.set.add(3) self.set.difference_update(set([1, 2])) assert self.set.data == set([3]) def test_difference_update_accepts_redis_sets(self): self.set.add(1) self.set.add(2) self.set.add(3) self.other_set.add(2) self.set.difference_update(self.other_set) assert self.set.data == set([1, 3]) def test_substraction_assignment_operator(self): self.set.add(1) self.set.add(2) self.set.add(3) self.set -= set([1, 2]) assert self.set.data == set([3])
28.439394
65
0.572722
268
1,877
3.914179
0.100746
0.273594
0.257388
0.104862
0.834128
0.801716
0.786463
0.786463
0.786463
0.786463
0
0.039102
0.264251
1,877
65
66
28.876923
0.720492
0
0
0.722222
0
0
0.006393
0
0
0
0
0
0.166667
1
0.166667
false
0
0.018519
0
0.222222
0
0
0
0
null
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
02f7c1c5576d3c6d293cc02d3b9f286ba3802ed6
1,347
py
Python
linkprediction/prediction_methods/prediction/others.py
ESM-analytics/Tie-Prediction-Tool
7c060a62c6c47e2d59e7df0870358d6663487817
[ "MIT" ]
1
2021-02-23T06:36:03.000Z
2021-02-23T06:36:03.000Z
linkprediction/prediction_methods/prediction/others.py
ESM-analytics/Tie-Prediction-Tool
7c060a62c6c47e2d59e7df0870358d6663487817
[ "MIT" ]
1
2022-03-02T09:59:27.000Z
2022-03-02T09:59:27.000Z
linkprediction/prediction_methods/prediction/others.py
social-media-analytics-research/tie-prediction-tool
7c060a62c6c47e2d59e7df0870358d6663487817
[ "MIT" ]
null
null
null
from .predictor import LinkPredictor class UAttribute(LinkPredictor): def __init__(self, graph, attribute): super().__init__(graph) self.attribute = attribute def predict(self, node_pairs): try: attributes = [(node_pair[0], node_pair[1], self.graph.nodes[node_pairs[0]][self.attribute]) for node_pair in node_pairs] except Exception: raise ValueError('Invalid node attribute value. ' 'It must be defined in the graph!') return attributes def __repr__(self): return self.__str__() def __str__(self): return 'UAttribute' class VAttribute(LinkPredictor): def __init__(self, graph, attribute): super().__init__(graph) self.attribute = attribute def predict(self, node_pairs): try: attributes = [(node_pair[0], node_pair[1], self.graph.nodes[node_pairs[1]][self.attribute]) for node_pair in node_pairs] except Exception: raise ValueError('Invalid node attribute value. ' 'It must be defined in the graph!') return attributes def __repr__(self): return self.__str__() def __str__(self): return 'VAttribute'
29.282609
103
0.579065
142
1,347
5.126761
0.267606
0.074176
0.054945
0.065934
0.884615
0.884615
0.884615
0.884615
0.884615
0.884615
0
0.006659
0.331106
1,347
45
104
29.933333
0.801332
0
0
0.787879
0
0
0.106904
0
0
0
0
0
0
1
0.242424
false
0
0.030303
0.121212
0.515152
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
10
02fe0fa90b74ea7bf72fee5b570d47ed826a69ff
86
py
Python
novgrid/envs/__init__.py
eilab-gt/NovGrid
0d73bfe70b56d2ab5364801c5ef6721b2103124d
[ "Apache-2.0" ]
14
2022-03-22T04:53:24.000Z
2022-03-31T05:07:12.000Z
novgrid/envs/__init__.py
eilab-gt/NovGrid
0d73bfe70b56d2ab5364801c5ef6721b2103124d
[ "Apache-2.0" ]
null
null
null
novgrid/envs/__init__.py
eilab-gt/NovGrid
0d73bfe70b56d2ab5364801c5ef6721b2103124d
[ "Apache-2.0" ]
null
null
null
from novgrid.envs.multidoormultikey import * from novgrid.envs.lavagapdoorkey import *
43
44
0.848837
10
86
7.3
0.6
0.30137
0.410959
0
0
0
0
0
0
0
0
0
0.081395
86
2
45
43
0.924051
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
b83604d2658fd132bdc2d788718362028334ce4c
10,154
py
Python
calculating_model_score/calculate_atis_slot.py
SmallStom/slot_learning
73753a1ecec61ee1cdb5bb6356f80f0ee552128a
[ "Apache-2.0" ]
418
2019-03-18T07:57:44.000Z
2022-03-30T13:42:16.000Z
calculating_model_score/calculate_atis_slot.py
SmallStom/slot_learning
73753a1ecec61ee1cdb5bb6356f80f0ee552128a
[ "Apache-2.0" ]
34
2019-03-18T08:20:36.000Z
2022-03-02T14:59:28.000Z
calculating_model_score/calculate_atis_slot.py
SmallStom/slot_learning
73753a1ecec61ee1cdb5bb6356f80f0ee552128a
[ "Apache-2.0" ]
100
2019-04-09T04:28:10.000Z
2022-03-10T08:05:05.000Z
import os from sklearn_metrics_function import show_metrics,delete_both_sides_is_O_word ATIS_slot_label = ['[Padding]', '[##WordPiece]', '[CLS]', '[SEP]', 'B-aircraft_code', 'B-airline_code', 'B-airline_name', 'B-airport_code', 'B-airport_name', 'B-arrive_date.date_relative', 'B-arrive_date.day_name', 'B-arrive_date.day_number', 'B-arrive_date.month_name', 'B-arrive_date.today_relative', 'B-arrive_time.end_time', 'B-arrive_time.period_mod', 'B-arrive_time.period_of_day', 'B-arrive_time.start_time', 'B-arrive_time.time', 'B-arrive_time.time_relative', 'B-booking_class', 'B-city_name', 'B-class_type', 'B-compartment', 'B-connect', 'B-cost_relative', 'B-day_name', 'B-day_number', 'B-days_code', 'B-depart_date.date_relative', 'B-depart_date.day_name', 'B-depart_date.day_number', 'B-depart_date.month_name', 'B-depart_date.today_relative', 'B-depart_date.year', 'B-depart_time.end_time', 'B-depart_time.period_mod', 'B-depart_time.period_of_day', 'B-depart_time.start_time', 'B-depart_time.time', 'B-depart_time.time_relative', 'B-economy', 'B-fare_amount', 'B-fare_basis_code', 'B-flight', 'B-flight_days', 'B-flight_mod', 'B-flight_number', 'B-flight_stop', 'B-flight_time', 'B-fromloc.airport_code', 'B-fromloc.airport_name', 'B-fromloc.city_name', 'B-fromloc.state_code', 'B-fromloc.state_name', 'B-meal', 'B-meal_code', 'B-meal_description', 'B-mod', 'B-month_name', 'B-or', 'B-period_of_day', 'B-restriction_code', 'B-return_date.date_relative', 'B-return_date.day_name', 'B-return_date.day_number', 'B-return_date.month_name', 'B-return_date.today_relative', 'B-return_time.period_mod', 'B-return_time.period_of_day', 'B-round_trip', 'B-state_code', 'B-state_name', 'B-stoploc.airport_code', 'B-stoploc.airport_name', 'B-stoploc.city_name', 'B-stoploc.state_code', 'B-time', 'B-time_relative', 'B-today_relative', 'B-toloc.airport_code', 'B-toloc.airport_name', 'B-toloc.city_name', 'B-toloc.country_name', 'B-toloc.state_code', 'B-toloc.state_name', 'B-transport_type', 'I-airline_name', 'I-airport_name', 'I-arrive_date.day_number', 'I-arrive_time.end_time', 'I-arrive_time.period_of_day', 'I-arrive_time.start_time', 'I-arrive_time.time', 'I-arrive_time.time_relative', 'I-city_name', 'I-class_type', 'I-cost_relative', 'I-depart_date.day_number', 'I-depart_date.today_relative', 'I-depart_time.end_time', 'I-depart_time.period_of_day', 'I-depart_time.start_time', 'I-depart_time.time', 'I-depart_time.time_relative', 'I-economy', 'I-fare_amount', 'I-fare_basis_code', 'I-flight_mod', 'I-flight_number', 'I-flight_stop', 'I-flight_time', 'I-fromloc.airport_name', 'I-fromloc.city_name', 'I-fromloc.state_name', 'I-meal_code', 'I-meal_description', 'I-restriction_code', 'I-return_date.date_relative', 'I-return_date.day_number', 'I-return_date.today_relative', 'I-round_trip', 'I-state_name', 'I-stoploc.city_name', 'I-time', 'I-today_relative', 'I-toloc.airport_name', 'I-toloc.city_name', 'I-toloc.state_name', 'I-transport_type', 'O'] ATIS_slot_effective_label = ['B-aircraft_code', 'B-airline_code', 'B-airline_name', 'B-airport_code', 'B-airport_name', 'B-arrive_date.date_relative', 'B-arrive_date.day_name', 'B-arrive_date.day_number', 'B-arrive_date.month_name', 'B-arrive_date.today_relative', 'B-arrive_time.end_time', 'B-arrive_time.period_mod', 'B-arrive_time.period_of_day', 'B-arrive_time.start_time', 'B-arrive_time.time', 'B-arrive_time.time_relative', 'B-booking_class', 'B-city_name', 'B-class_type', 'B-compartment', 'B-connect', 'B-cost_relative', 'B-day_name', 'B-day_number', 'B-days_code', 'B-depart_date.date_relative', 'B-depart_date.day_name', 'B-depart_date.day_number', 'B-depart_date.month_name', 'B-depart_date.today_relative', 'B-depart_date.year', 'B-depart_time.end_time', 'B-depart_time.period_mod', 'B-depart_time.period_of_day', 'B-depart_time.start_time', 'B-depart_time.time', 'B-depart_time.time_relative', 'B-economy', 'B-fare_amount', 'B-fare_basis_code', 'B-flight', 'B-flight_days', 'B-flight_mod', 'B-flight_number', 'B-flight_stop', 'B-flight_time', 'B-fromloc.airport_code', 'B-fromloc.airport_name', 'B-fromloc.city_name', 'B-fromloc.state_code', 'B-fromloc.state_name', 'B-meal', 'B-meal_code', 'B-meal_description', 'B-mod', 'B-month_name', 'B-or', 'B-period_of_day', 'B-restriction_code', 'B-return_date.date_relative', 'B-return_date.day_name', 'B-return_date.day_number', 'B-return_date.month_name', 'B-return_date.today_relative', 'B-return_time.period_mod', 'B-return_time.period_of_day', 'B-round_trip', 'B-state_code', 'B-state_name', 'B-stoploc.airport_code', 'B-stoploc.airport_name', 'B-stoploc.city_name', 'B-stoploc.state_code', 'B-time', 'B-time_relative', 'B-today_relative', 'B-toloc.airport_code', 'B-toloc.airport_name', 'B-toloc.city_name', 'B-toloc.country_name', 'B-toloc.state_code', 'B-toloc.state_name', 'B-transport_type', 'I-airline_name', 'I-airport_name', 'I-arrive_date.day_number', 'I-arrive_time.end_time', 'I-arrive_time.period_of_day', 'I-arrive_time.start_time', 'I-arrive_time.time', 'I-arrive_time.time_relative', 'I-city_name', 'I-class_type', 'I-cost_relative', 'I-depart_date.day_number', 'I-depart_date.today_relative', 'I-depart_time.end_time', 'I-depart_time.period_of_day', 'I-depart_time.start_time', 'I-depart_time.time', 'I-depart_time.time_relative', 'I-economy', 'I-fare_amount', 'I-fare_basis_code', 'I-flight_mod', 'I-flight_number', 'I-flight_stop', 'I-flight_time', 'I-fromloc.airport_name', 'I-fromloc.city_name', 'I-fromloc.state_name', 'I-meal_code', 'I-meal_description', 'I-restriction_code', 'I-return_date.date_relative', 'I-return_date.day_number', 'I-return_date.today_relative', 'I-round_trip', 'I-state_name', 'I-stoploc.city_name', 'I-time', 'I-today_relative', 'I-toloc.airport_name', 'I-toloc.city_name', 'I-toloc.state_name', 'I-transport_type', 'O'] ATIS_slot_effective_label2 = ['B-aircraft_code', 'B-airline_code', 'B-airline_name', 'B-airport_code', 'B-airport_name', 'B-arrive_date.date_relative', 'B-arrive_date.day_name', 'B-arrive_date.day_number', 'B-arrive_date.month_name', 'B-arrive_date.today_relative', 'B-arrive_time.end_time', 'B-arrive_time.period_mod', 'B-arrive_time.period_of_day', 'B-arrive_time.start_time', 'B-arrive_time.time', 'B-arrive_time.time_relative', 'B-booking_class', 'B-city_name', 'B-class_type', 'B-compartment', 'B-connect', 'B-cost_relative', 'B-day_name', 'B-day_number', 'B-days_code', 'B-depart_date.date_relative', 'B-depart_date.day_name', 'B-depart_date.day_number', 'B-depart_date.month_name', 'B-depart_date.today_relative', 'B-depart_date.year', 'B-depart_time.end_time', 'B-depart_time.period_mod', 'B-depart_time.period_of_day', 'B-depart_time.start_time', 'B-depart_time.time', 'B-depart_time.time_relative', 'B-economy', 'B-fare_amount', 'B-fare_basis_code', 'B-flight', 'B-flight_days', 'B-flight_mod', 'B-flight_number', 'B-flight_stop', 'B-flight_time', 'B-fromloc.airport_code', 'B-fromloc.airport_name', 'B-fromloc.city_name', 'B-fromloc.state_code', 'B-fromloc.state_name', 'B-meal', 'B-meal_code', 'B-meal_description', 'B-mod', 'B-month_name', 'B-or', 'B-period_of_day', 'B-restriction_code', 'B-return_date.date_relative', 'B-return_date.day_name', 'B-return_date.day_number', 'B-return_date.month_name', 'B-return_date.today_relative', 'B-return_time.period_mod', 'B-return_time.period_of_day', 'B-round_trip', 'B-state_code', 'B-state_name', 'B-stoploc.airport_code', 'B-stoploc.airport_name', 'B-stoploc.city_name', 'B-stoploc.state_code', 'B-time', 'B-time_relative', 'B-today_relative', 'B-toloc.airport_code', 'B-toloc.airport_name', 'B-toloc.city_name', 'B-toloc.country_name', 'B-toloc.state_code', 'B-toloc.state_name', 'B-transport_type', 'I-airline_name', 'I-airport_name', 'I-arrive_date.day_number', 'I-arrive_time.end_time', 'I-arrive_time.period_of_day', 'I-arrive_time.start_time', 'I-arrive_time.time', 'I-arrive_time.time_relative', 'I-city_name', 'I-class_type', 'I-cost_relative', 'I-depart_date.day_number', 'I-depart_date.today_relative', 'I-depart_time.end_time', 'I-depart_time.period_of_day', 'I-depart_time.start_time', 'I-depart_time.time', 'I-depart_time.time_relative', 'I-economy', 'I-fare_amount', 'I-fare_basis_code', 'I-flight_mod', 'I-flight_number', 'I-flight_stop', 'I-flight_time', 'I-fromloc.airport_name', 'I-fromloc.city_name', 'I-fromloc.state_name', 'I-meal_code', 'I-meal_description', 'I-restriction_code', 'I-return_date.date_relative', 'I-return_date.day_number', 'I-return_date.today_relative', 'I-round_trip', 'I-state_name', 'I-stoploc.city_name', 'I-time', 'I-today_relative', 'I-toloc.airport_name', 'I-toloc.city_name', 'I-toloc.state_name', 'I-transport_type'] with open(os.path.join("ATIS_solt", "seq.out")) as label_f: label_list = [label.replace("\n", "") for label in label_f.readlines()] label_list = [seq.split() for seq in label_list] #print(len(label_list), label_list) with open(os.path.join("ATIS_solt", "label_test.txt")) as predict_f: predict_list = [predict_label.replace("\n", "") for predict_label in predict_f.readlines()] #print(len(predict_list), predict_list) predict_sentence_list = [] for word in predict_list: if "[CLS]" == word: a_sentence = [] a_sentence.append(word) if "[SEP]" == word: predict_sentence_list.append(a_sentence) #print(len(predict_sentence_list), predict_sentence_list) y_test_list = [] clean_y_predict_list = [] assert len(label_list)==len(predict_sentence_list) for y_test, y_predict in zip(label_list, predict_sentence_list): y_predict.remove('[CLS]') y_predict.remove('[SEP]') while '[Padding]' in y_predict: y_predict.remove('[Padding]') while '[##WordPiece]' in y_predict: y_predict.remove('[##WordPiece]') if len(y_predict)!=len(y_test): print(y_predict) print(y_test) print("~"*100) y_test_list.extend(y_test) clean_y_predict_list.extend(y_predict) assert len(y_test_list)==len(clean_y_predict_list) y_test_list, clean_y_predict_list = delete_both_sides_is_O_word(y_test_list, clean_y_predict_list) show_metrics(y_test=y_test_list, y_predict=clean_y_predict_list, labels=ATIS_slot_effective_label2)
191.584906
2,865
0.742269
1,720
10,154
4.032558
0.061047
0.045415
0.033737
0.032439
0.879758
0.873558
0.860294
0.849048
0.840398
0.840398
0
0.000527
0.064901
10,154
52
2,866
195.269231
0.729963
0.012606
0
0
0
0
0.699661
0.34095
0
0
0
0
0.055556
1
0
false
0
0.055556
0
0.055556
0.083333
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
b861261d9d2f29641c956dc1232c4c9748443896
11,496
py
Python
boa3_test/tests/compiler_tests/test_native/test_ledger.py
OnBlockIO/neo3-boa
cb317292a67532a52ed26f2b0f0f7d0b10ac5f5f
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3_test/tests/compiler_tests/test_native/test_ledger.py
OnBlockIO/neo3-boa
cb317292a67532a52ed26f2b0f0f7d0b10ac5f5f
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3_test/tests/compiler_tests/test_native/test_ledger.py
OnBlockIO/neo3-boa
cb317292a67532a52ed26f2b0f0f7d0b10ac5f5f
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from boa3 import constants from boa3.boa3 import Boa3 from boa3.exception import CompilerError from boa3.model.builtin.interop.interop import Interop from boa3.neo.vm.opcode.Opcode import Opcode from boa3.neo.vm.type.Integer import Integer from boa3.neo.vm.type.String import String from boa3.neo3.contracts import CallFlags from boa3.neo3.core.types import UInt160, UInt256 from boa3_test.tests.boa_test import BoaTest from boa3_test.tests.test_classes.testengine import TestEngine class TestLedgerContract(BoaTest): default_folder: str = 'test_sc/native_test/ledger' def test_get_block_by_hash(self): path = self.get_contract_path('GetBlockByHash.py') engine = TestEngine() engine.increase_block(1) block_hash = bytes(32) result = self.run_smart_contract(engine, path, 'Main', block_hash) self.assertIsNone(result) from boa3.neo import from_hex_str # TODO: using genesis block hash for testing, change when TestEngine returns blocks hashes block_hash = from_hex_str('0x1f4d1defa46faa5e7b9b8d3f79a06bec777d7c26c4aa5f6f5899a291daa87c15') result = self.run_smart_contract(engine, path, 'Main', block_hash) self.assertIsInstance(result, list) self.assertEqual(10, len(result)) self.assertEqual(block_hash, result[0]) self.assertEqual(0, result[6]) # genesis block's index is zero def test_get_block_by_index(self): path = self.get_contract_path('GetBlockByIndex.py') engine = TestEngine() index = 0 result = self.run_smart_contract(engine, path, 'Main', index) self.assertIsInstance(result, list) self.assertEqual(10, len(result)) self.assertEqual(index, result[6]) index = 10 result = self.run_smart_contract(engine, path, 'Main', index) self.assertIsNone(result) engine.increase_block(10) result = self.run_smart_contract(engine, path, 'Main', index) self.assertIsInstance(result, list) self.assertEqual(10, len(result)) self.assertEqual(index, result[6]) def test_get_block_mismatched_types(self): path = self.get_contract_path('GetBlockMismatchedTypes.py') self.assertCompilerLogs(CompilerError.MismatchedTypes, path) def test_get_transaction(self): call_flags = Integer(CallFlags.ALL).to_byte_array(signed=True, min_length=1) method = String('getTransaction').to_bytes() expected_output = ( Opcode.INITSLOT + b'\x00\x01' + Opcode.LDARG0 + Opcode.PUSH1 + Opcode.PACK + Opcode.PUSHDATA1 + Integer(len(call_flags)).to_byte_array() + call_flags + Opcode.PUSHDATA1 + Integer(len(method)).to_byte_array() + method + Opcode.PUSHDATA1 + Integer(len(constants.LEDGER_SCRIPT)).to_byte_array() + constants.LEDGER_SCRIPT + Opcode.SYSCALL + Interop.CallContract.interop_method_hash + Opcode.RET ) path = self.get_contract_path('GetTransaction.py') output = Boa3.compile(path) self.assertEqual(expected_output, output) path_burn_gas = self.get_contract_path('../../interop_test/runtime', 'BurnGas.py') engine = TestEngine() engine.increase_block() sender = bytes(range(20)) self.run_smart_contract(engine, path_burn_gas, 'main', 1000, signer_accounts=[sender]) txs = engine.get_transactions() self.assertGreater(len(txs), 0) hash_ = txs[0].hash script = txs[0]._script result = self.run_smart_contract(engine, path, 'main', hash_) self.assertEqual(8, len(result)) if isinstance(result[0], str): result[0] = String(result[0]).to_bytes() self.assertEqual(UInt256(hash_), UInt256(result[0])) # hash self.assertIsInstance(result[1], int) # version self.assertIsInstance(result[2], int) # nonce if isinstance(result[3], str): result[3] = String(result[3]).to_bytes() self.assertEqual(UInt160(sender), UInt160(result[3])) # sender self.assertIsInstance(result[4], int) # system_fee self.assertIsInstance(result[5], int) # network_fee self.assertIsInstance(result[6], int) # valid_until_block if isinstance(result[7], str): result[7] = String(result[7]).to_bytes() self.assertEqual(script, result[7]) # script def test_get_transaction_mismatched_type(self): path = self.get_contract_path('GetTransactionMismatchedType.py') self.assertCompilerLogs(CompilerError.MismatchedTypes, path) def test_get_transaction_from_block_int(self): call_flags = Integer(CallFlags.ALL).to_byte_array(signed=True, min_length=1) method = String('getTransactionFromBlock').to_bytes() expected_output = ( Opcode.INITSLOT + b'\x00\x02' + Opcode.LDARG1 + Opcode.LDARG0 + Opcode.PUSH2 + Opcode.PACK + Opcode.PUSHDATA1 + Integer(len(call_flags)).to_byte_array() + call_flags + Opcode.PUSHDATA1 + Integer(len(method)).to_byte_array() + method + Opcode.PUSHDATA1 + Integer(len(constants.LEDGER_SCRIPT)).to_byte_array() + constants.LEDGER_SCRIPT + Opcode.SYSCALL + Interop.CallContract.interop_method_hash + Opcode.RET ) path = self.get_contract_path('GetTransactionFromBlockInt.py') output = Boa3.compile(path) self.assertEqual(expected_output, output) path_burn_gas = self.get_contract_path('../../interop_test/runtime', 'BurnGas.py') engine = TestEngine() engine.increase_block(10) sender = bytes(range(20)) self.run_smart_contract(engine, path_burn_gas, 'main', 100, signer_accounts=[sender]) block_10 = engine.current_block txs = block_10.get_transactions() hash_ = txs[0].hash script = txs[0]._script engine.increase_block() result = self.run_smart_contract(engine, path, 'main', 10, 0) self.assertEqual(8, len(result)) if isinstance(result[0], str): result[0] = String(result[0]).to_bytes() self.assertEqual(UInt256(hash_), UInt256(result[0])) # hash self.assertIsInstance(result[1], int) # version self.assertIsInstance(result[2], int) # nonce if isinstance(result[3], str): result[3] = String(result[3]).to_bytes() self.assertEqual(UInt160(sender), UInt160(result[3])) # sender self.assertIsInstance(result[4], int) # system_fee self.assertIsInstance(result[5], int) # network_fee self.assertIsInstance(result[6], int) # valid_until_block if isinstance(result[7], str): result[7] = String(result[7]).to_bytes() self.assertEqual(script, result[7]) # script def test_get_transaction_from_block_uint256(self): call_flags = Integer(CallFlags.ALL).to_byte_array(signed=True, min_length=1) method = String('getTransactionFromBlock').to_bytes() expected_output = ( Opcode.INITSLOT + b'\x00\x02' + Opcode.LDARG1 + Opcode.LDARG0 + Opcode.PUSH2 + Opcode.PACK + Opcode.PUSHDATA1 + Integer(len(call_flags)).to_byte_array() + call_flags + Opcode.PUSHDATA1 + Integer(len(method)).to_byte_array() + method + Opcode.PUSHDATA1 + Integer(len(constants.LEDGER_SCRIPT)).to_byte_array() + constants.LEDGER_SCRIPT + Opcode.SYSCALL + Interop.CallContract.interop_method_hash + Opcode.RET ) path = self.get_contract_path('GetTransactionFromBlockUInt256.py') output = Boa3.compile(path) self.assertEqual(expected_output, output) path_burn_gas = self.get_contract_path('../../interop_test/runtime', 'BurnGas.py') engine = TestEngine() engine.increase_block(10) sender = bytes(range(20)) self.run_smart_contract(engine, path_burn_gas, 'main', 100, signer_accounts=[sender]) block_10 = engine.current_block block_hash = block_10.hash self.assertIsNotNone(block_hash) txs = block_10.get_transactions() tx_hash = txs[0].hash tx_script = txs[0]._script engine.increase_block() result = self.run_smart_contract(engine, path, 'main', block_hash, 0) self.assertEqual(8, len(result)) if isinstance(result[0], str): result[0] = String(result[0]).to_bytes() self.assertEqual(UInt256(tx_hash), UInt256(result[0])) # hash self.assertIsInstance(result[1], int) # version self.assertIsInstance(result[2], int) # nonce if isinstance(result[3], str): result[3] = String(result[3]).to_bytes() self.assertEqual(UInt160(sender), UInt160(result[3])) # sender self.assertIsInstance(result[4], int) # system_fee self.assertIsInstance(result[5], int) # network_fee self.assertIsInstance(result[6], int) # valid_until_block if isinstance(result[7], str): result[7] = String(result[7]).to_bytes() self.assertEqual(tx_script, result[7]) # script def test_get_transaction_from_block_mismatched_type(self): path = self.get_contract_path('GetTransactionFromBlockMismatchedType.py') self.assertCompilerLogs(CompilerError.MismatchedTypes, path) def test_get_transaction_height(self): call_flags = Integer(CallFlags.ALL).to_byte_array(signed=True, min_length=1) method = String('getTransactionHeight').to_bytes() expected_output = ( Opcode.INITSLOT + b'\x00\x01' + Opcode.LDARG0 + Opcode.PUSH1 + Opcode.PACK + Opcode.PUSHDATA1 + Integer(len(call_flags)).to_byte_array() + call_flags + Opcode.PUSHDATA1 + Integer(len(method)).to_byte_array() + method + Opcode.PUSHDATA1 + Integer(len(constants.LEDGER_SCRIPT)).to_byte_array() + constants.LEDGER_SCRIPT + Opcode.SYSCALL + Interop.CallContract.interop_method_hash + Opcode.RET ) path = self.get_contract_path('GetTransactionHeight.py') output = Boa3.compile(path) self.assertEqual(expected_output, output) path_burn_gas = self.get_contract_path('../../interop_test/runtime', 'BurnGas.py') engine = TestEngine() expected_block_index = 10 engine.increase_block(expected_block_index) self.run_smart_contract(engine, path_burn_gas, 'main', 1000) txs = engine.get_transactions() self.assertGreater(len(txs), 0) hash_ = txs[0].hash result = self.run_smart_contract(engine, path, 'main', hash_) self.assertEqual(expected_block_index, result) def test_get_transaction_height_mismatched_type(self): path = self.get_contract_path('GetTransactionHeightMismatchedType.py') self.assertCompilerLogs(CompilerError.MismatchedTypes, path)
39.916667
103
0.637091
1,294
11,496
5.448223
0.120556
0.051064
0.066383
0.037731
0.817872
0.796454
0.770496
0.770496
0.749078
0.749078
0
0.031155
0.254523
11,496
287
104
40.055749
0.791482
0.029576
0
0.756098
0
0
0.060293
0.041423
0
0
0.00593
0.003484
0.207317
1
0.04065
false
0
0.04878
0
0.097561
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
b861d17b1de487ec111a74c8878ea1f661a55f66
95
py
Python
01_IO_Operation/Step09/gamjapark.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
null
null
null
01_IO_Operation/Step09/gamjapark.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
3
2020-11-04T05:38:53.000Z
2021-03-02T02:15:19.000Z
01_IO_Operation/Step09/gamjapark.py
StudyForCoding/BEAKJOON
84e1c5e463255e919ccf6b6a782978c205420dbf
[ "MIT" ]
null
null
null
a, b= map(int, input().split()) print("%d\n%d\n%d\n%d\n%d"%(a + b, a - b, a * b, a / b, a % b))
47.5
63
0.442105
26
95
1.615385
0.346154
0.285714
0.285714
0.380952
0.452381
0.452381
0.452381
0.238095
0
0
0
0
0.189474
95
2
63
47.5
0.545455
0
0
0
0
0
0.1875
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
0
1
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
8
b87f5e56e7e2fbd05f2c95f40f41cd903a192fa3
18,090
py
Python
disasm.py
uafio/BinaryNinja-CHIP8-Arch
76103e3a8e6b7338339a5dbe169734cf93dad901
[ "MIT" ]
3
2020-08-31T12:59:09.000Z
2021-05-23T16:15:46.000Z
disasm.py
uafio/BinaryNinja-CHIP8-Arch
76103e3a8e6b7338339a5dbe169734cf93dad901
[ "MIT" ]
null
null
null
disasm.py
uafio/BinaryNinja-CHIP8-Arch
76103e3a8e6b7338339a5dbe169734cf93dad901
[ "MIT" ]
null
null
null
from binaryninja.function import InstructionTextToken from binaryninja.enums import InstructionTextTokenType, BranchType from struct import unpack class Disassembler(object): """ CHIP-8 tokanized Disassembler """ def __init__(self): self.opcodes = { 0x0: "_rcs", 0x1: "_jp", 0x2: "_call", 0x3: "_se_kk", 0x4: "_sne_kk", 0x5: "_se", 0x6: "_ld_kk", 0x7: "_add", 0x8: "_bitops", 0x9: "_sne", 0xa: "_ld_i", 0xb: "_jp_v0", 0xc: "_rnd", 0xd: "_draw", 0xe: "_skip", 0xf: "_ld", } self.V = { 0x0: 'V0', 0x1: 'V1', 0x2: 'V2', 0x3: 'V3', 0x4: 'V4', 0x5: 'V5', 0x6: 'V6', 0x7: 'V7', 0x8: 'V8', 0x9: 'V9', 0xa: 'Va', 0xb: 'Vb', 0xc: 'Vc', 0xd: 'Vd', 0xe: 'Ve', 0xf: 'Vf', } def disasm(self, opcode, addr): """ Return disassembled tokanized instruction """ if not opcode: return None opd = self._u16(opcode) n = opd >> 12 handler = getattr(self, self.opcodes[n]) return handler(opd) def get_branch_info(self, opcode): vars = self._vars(opcode) m, kk = vars['m'], vars['kk'] if m == 0x0: if kk == 0xEE: return BranchType.FunctionReturn if kk != 0xE0: return BranchType.UnconditionalBranch if m == 0xE: if kk == 0x9E: return BranchType.TrueBranch if kk == 0xA1: return BranchType.FalseBranch mnem = { 0x1: BranchType.UnconditionalBranch, 0x2: BranchType.CallDestination, 0x3: BranchType.TrueBranch, 0x4: BranchType.FalseBranch, 0x5: BranchType.TrueBranch, 0xB: BranchType.IndirectBranch, } return mnem.get(m, None) def _vars(self, opd): """ Separates the different bits from opcode """ if isinstance(opd, bytes): opd = self._u16(opd) addr = opd & 0xfff m = opd >> 12 n = opd & 0xf x = (opd >> 8) & 0xf y = (opd >> 4) & 0xf kk = opd & 0xff return { 'm': m, 'addr': addr, 'n': n, 'x': x, 'y': y, 'kk': kk } def _u16(self, opcode): """ bytes to int """ if len(opcode) == 1: return unpack('>B', opcode)[0] return unpack('>H', opcode)[0] def _rcs(self, opcode): if opcode == 0x00EE: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'RET')] if opcode == 0x00E0: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'CLS')] addr = opcode & 0xfff return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SYS'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.PossibleAddressToken, hex(addr), addr)] def _jp(self, opcode): addr = opcode & 0xfff return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'JP'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.PossibleAddressToken, hex(addr), addr)] def _call(self, opcode): addr = opcode & 0xfff return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'CALL'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.PossibleAddressToken, hex(addr), addr)] def _se_kk(self, opcode): vars = self._vars(opcode) x, kk = vars['x'], vars['kk'] return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SE'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.IntegerToken, hex(kk), kk)] def _sne_kk(self, opcode): vars = self._vars(opcode) x, kk = vars['x'], vars['kk'] return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SNE'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.IntegerToken, hex(kk), kk)] def _se(self, opcode): vars = self._vars(opcode) x, y = vars['x'], vars['y'] return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SE'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y])] def _ld_kk(self, opcode): vars = self._vars(opcode) x, kk = vars['x'], vars['kk'] return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.IntegerToken, hex(kk), kk)] def _add(self, opcode): vars = self._vars(opcode) x, kk = vars['x'], vars['kk'] return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'ADD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.IntegerToken, hex(kk), kk)] def _bitops(self, opcode): vars = self._vars(opcode) x, y, n = vars['x'], vars['y'], vars['n'] if n == 0x0: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y])] elif n == 0x1: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'OR'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y])] elif n == 0x2: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'AND'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y])] elif n == 0x3: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'XOR'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y])] elif n == 0x4: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'ADD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y])] elif n == 0x5: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SUB'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y])] elif n == 0x6: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SHR'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.IntegerToken, hex(1), 1)] elif n == 0x7: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SUBN'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y])] elif n == 0xE: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SHL'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.IntegerToken, hex(1), 1)] def _sne(self, opcode): vars = self._vars(opcode) x, y = vars['x'], vars['y'] return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SNE'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y])] def _ld_i(self, opcode): addr = opcode & 0xfff return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'I'), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.PossibleAddressToken, hex(addr), addr)] def _jp_v0(self, opcode): addr = opcode & 0xfff return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'JP'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'V0'), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.PossibleAddressToken, hex(addr), addr)] def _rnd(self, opcode): vars = self._vars(opcode) x, kk = vars['x'], vars['kk'] return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'RND'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.IntegerToken, hex(kk), kk)] def _draw(self, opcode): vars = self._vars(opcode) x, y, n = vars['x'], vars['y'], vars['n'] return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'DRW'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[y]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.IntegerToken, hex(n), n)] def _skip(self, opcode): vars = self._vars(opcode) x, kk = vars['x'], vars['kk'] if kk == 0x9E: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SKP'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x])] if kk == 0xA1: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'SKNP'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x])] def _ld(self, opcode): vars = self._vars(opcode) x, kk = vars['x'], vars['kk'] if kk == 0x07: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'DT')] elif kk == 0x0A: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'K')] elif kk == 0x15: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'DT'), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x])] elif kk == 0x18: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'ST'), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x])] elif kk == 0x1e: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'ADD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'I'), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x])] elif kk == 0x29: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'F'), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x])] elif kk == 0x33: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'B'), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x])] elif kk == 0x55: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' ['), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'I'), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, '], '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x])] elif kk == 0x65: return [InstructionTextToken(InstructionTextTokenType.InstructionToken, 'LD'), InstructionTextToken(InstructionTextTokenType.TextToken, ' '), InstructionTextToken(InstructionTextTokenType.RegisterToken, self.V[x]), InstructionTextToken(InstructionTextTokenType.OperandSeparatorToken, ', ['), InstructionTextToken(InstructionTextTokenType.RegisterToken, 'I'), InstructionTextToken(InstructionTextTokenType.TextToken, ']')]
52.132565
93
0.670813
1,250
18,090
9.6568
0.1208
0.583216
0.231381
0.19203
0.818076
0.818076
0.810952
0.793969
0.793638
0.764808
0
0.012044
0.224323
18,090
346
94
52.283237
0.848204
0.007076
0
0.518987
0
0
0.020017
0
0
0
0.014608
0
0
1
0.066456
false
0
0.009494
0
0.221519
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
b899913b13a27912fac2c01b02b1d730ff24d517
7,126
py
Python
tests/features/test_integrity.py
ratschlab/tools-project-archives
a42ef1d3d60b24ff39ce5aa73a8fb332b4f25056
[ "MIT" ]
1
2021-12-02T15:13:47.000Z
2021-12-02T15:13:47.000Z
tests/features/test_integrity.py
ratschlab/tools-project-archives
a42ef1d3d60b24ff39ce5aa73a8fb332b4f25056
[ "MIT" ]
null
null
null
tests/features/test_integrity.py
ratschlab/tools-project-archives
a42ef1d3d60b24ff39ce5aa73a8fb332b4f25056
[ "MIT" ]
null
null
null
from archiver.integrity import check_integrity, verify_relative_symbolic_links, get_archives_with_hashes_from_path from tests.helpers import get_directory_with_name DEEP = True def test_integrity_check_on_archive(caplog): archive_dir = get_directory_with_name("normal-archive") archive_file = archive_dir.joinpath("test-folder.tar.lz") assert_successful_shallow_check(archive_file, caplog) def test_integrity_check_on_encrypted_archive(caplog, setup_gpg): archive_dir = get_directory_with_name("encrypted-archive") archive_file = archive_dir.joinpath("test-folder.tar.lz.gpg") assert_successful_shallow_check(archive_file, caplog) def test_integrity_check_on_directory(caplog): archive_dir = get_directory_with_name("normal-archive") assert_successful_shallow_check(archive_dir, caplog) def test_integrity_check_on_encrypted_directory(caplog, setup_gpg): archive_dir = get_directory_with_name("encrypted-archive") assert_successful_shallow_check(archive_dir, caplog) def test_integrity_check_on_split_archive(caplog): archive_dir = get_directory_with_name("split-archive") assert_successful_shallow_check(archive_dir, caplog) def test_integrity_check_on_split_encrypted_archive(caplog): archive_dir = get_directory_with_name("split-encrypted-archive") assert_successful_shallow_check(archive_dir, caplog) def test_integrity_check_on_split_encrypted_file(caplog, setup_gpg): archive_dir = get_directory_with_name("split-encrypted-archive") archive_file = archive_dir.joinpath("large-folder.part1.tar.lz.gpg") assert_successful_shallow_check(archive_file, caplog) def test_integrity_check_corrupted(caplog): archive_dir = get_directory_with_name("normal-archive-corrupted") archive_file = archive_dir.joinpath("test-folder.tar.lz") expected_string = f"Basic integrity check unsuccessful. Archive has been changed since creation." assert_integrity_check_with_output(archive_file, expected_string, False, caplog) def test_integrity_check_corrupted_encrypted(caplog, setup_gpg): archive_dir = get_directory_with_name("encrypted-archive-corrupted") expected_string = f"Basic integrity check unsuccessful. Archive has been changed since creation." assert_integrity_check_with_output(archive_dir, expected_string, False, caplog) def test_integrity_check_corrupted_on_split_archive(caplog): archive_dir = get_directory_with_name("split-archive-corrupted") expected_string = f"Basic integrity check unsuccessful. Archive has been changed since creation." assert_integrity_check_with_output(archive_dir, expected_string, False, caplog) def test_integrity_check_deep(caplog): archive_dir = get_directory_with_name("normal-archive") archive_file = archive_dir.joinpath("test-folder.tar.lz") assert_successful_deep_check(archive_file, caplog) def test_integrity_check_deep_encrypted(caplog, setup_gpg): archive_dir = get_directory_with_name("encrypted-archive") assert_successful_deep_check(archive_dir, caplog) def test_integrity_check_deep_encrypted_file(caplog, setup_gpg): archive_dir = get_directory_with_name("encrypted-archive") archive_file = archive_dir.joinpath("test-folder.tar.lz.gpg") assert_successful_deep_check(archive_file, caplog) def test_integrity_check_deep_on_split_archive(caplog): archive_dir = get_directory_with_name("split-archive") archive_file = archive_dir.joinpath("large-folder.part1.tar.lz") assert_successful_deep_check(archive_file, caplog) def test_integrity_check_deep_on_split_encrypted_archive(caplog, setup_gpg): archive_dir = get_directory_with_name("split-encrypted-archive") archive_file = archive_dir.joinpath("large-folder.part1.tar.lz.gpg") assert_successful_deep_check(archive_file, caplog) def test_integrity_check_deep_corrupted(caplog): archive_dir = get_directory_with_name("normal-archive-corrupted-deep") expected_messages = [ "Missing file test-folder/folder-in-archive/big file3.txt in archive!", 'File test-folder/folder-in-archive/file2.txt in archive does not appear in list of md5sums!', "Hash of test-folder/file1.txt has changed: Expected 49dbcfb5e7ae8ca55cab5b0e4674d9fd but got 49dbcfb5e7ae8ca55cab6b0e4674d9fd", "Deep integrity check unsuccessful. Archive has been changed since creation."] check_integrity_and_validate_output_contains(archive_dir, caplog, expected_messages, False, DEEP) def test_integrity_check_deep_corrupted_encrypted(caplog, setup_gpg): archive_dir = get_directory_with_name("encrypted-archive-corrupted-deep") expected_messages = ["Hash of test-folder/folder-in-archive/file2.txt has changed: Expected 5762a5694bf3cb3dp59bf864ed71a4a8 but got 5762a5694bf3cb3df59bf864ed71a4a8", "Deep integrity check unsuccessful. Archive has been changed since creation."] check_integrity_and_validate_output_contains(archive_dir, caplog, expected_messages, False, DEEP) def test_integrity_check_symlink(caplog): archive_dir = get_directory_with_name("symlink-archive") archive_file = archive_dir.joinpath("symlink-folder.tar.lz") assert_successful_shallow_check(archive_file, caplog) def test_integrity_check_deep_symlink(caplog): archive_dir = get_directory_with_name("symlink-archive") archive_file = archive_dir.joinpath("symlink-folder.tar.lz") assert_successful_deep_check(archive_file, caplog) assert "Symlink symlink-folder/invalid_link_abs found pointing to /not/existing . The archive contains the link itself, but possibly not the file it points to." in caplog.messages assert "Symlink symlink-folder/invalid_link pointing to not_existing is broken in archive" in caplog.messages def test_verify_relative_symbolic_links(): archive_dir = get_directory_with_name("symlink-archive") archives_with_hashes = get_archives_with_hashes_from_path(archive_dir) missing = verify_relative_symbolic_links(archives_with_hashes) link_key = 'symlink-folder/invalid_link' assert link_key in missing and missing[link_key] == 'not_existing' assert len(missing) == 1 # MARK: Helpers def assert_successful_deep_check(archive_path, caplog): expected_output = "Deep integrity check successful." assert_integrity_check_with_output(archive_path, expected_output, True, caplog, DEEP) def assert_successful_shallow_check(archive_path, caplog): expected_output = "Basic integrity check successful." assert_integrity_check_with_output(archive_path, expected_output, True, caplog) def assert_integrity_check_with_output(archive_path, expected_output, expected_return, caplog, deep=False): assert check_integrity(archive_path, deep, threads=2) == expected_return assert caplog.messages[-1] == expected_output def check_integrity_and_validate_output_contains(archive_path, caplog, expected_messages, expected_return, deep=False): assert check_integrity(archive_path, deep, threads=2) == expected_return for message in expected_messages: assert message in caplog.messages
39.153846
183
0.806483
945
7,126
5.686772
0.107937
0.074432
0.062523
0.078154
0.819315
0.798846
0.753256
0.729996
0.712691
0.666543
0
0.012411
0.118019
7,126
181
184
39.370166
0.842641
0.001824
0
0.470588
0
0.029412
0.245957
0.10097
0
0
0
0
0.294118
1
0.235294
false
0
0.019608
0
0.254902
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
7
b89fb448473ecb75ca19f8e3922cacb3b79a6ab6
215
py
Python
datadog_checks/base.py
iksaif/datadog-integrations
7ac27867d9785a33a3069eabd20816e86842b411
[ "Apache-2.0" ]
null
null
null
datadog_checks/base.py
iksaif/datadog-integrations
7ac27867d9785a33a3069eabd20816e86842b411
[ "Apache-2.0" ]
null
null
null
datadog_checks/base.py
iksaif/datadog-integrations
7ac27867d9785a33a3069eabd20816e86842b411
[ "Apache-2.0" ]
null
null
null
class AgentCheck(): def gauge(self, name, value, tags=None): print("gauge", name, value, tags) def monotonic_count(self, name, value, tags=None): print("monotonic_count", name, value, tags)
30.714286
54
0.646512
28
215
4.892857
0.428571
0.262774
0.379562
0.248175
0.379562
0.379562
0
0
0
0
0
0
0.209302
215
7
55
30.714286
0.805882
0
0
0
0
0
0.093023
0
0
0
0
0
0
1
0.4
false
0
0
0
0.6
0.4
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
7
b2270e80a97bb2fda529ece7a9d19c4feb95b942
88
py
Python
utility/math.py
Friedenspanzer/spacegame
639ef6903153d0be4e1c0ef75b84bc41b1fa9cd9
[ "MIT" ]
null
null
null
utility/math.py
Friedenspanzer/spacegame
639ef6903153d0be4e1c0ef75b84bc41b1fa9cd9
[ "MIT" ]
null
null
null
utility/math.py
Friedenspanzer/spacegame
639ef6903153d0be4e1c0ef75b84bc41b1fa9cd9
[ "MIT" ]
null
null
null
def clamp(value, min_value, max_value): return max(min(value, max_value), min_value)
44
48
0.75
15
88
4.133333
0.4
0.387097
0.419355
0.516129
0
0
0
0
0
0
0
0
0.125
88
2
48
44
0.805195
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
8
b23bf954d11b3cd0982da2b23a66f750a7d555b5
127
py
Python
create_db.py
ZDaria/grinding_converter
d4ebbcd1d5445dfd91e9142b6e5ac8e54ffbfcea
[ "Apache-2.0" ]
null
null
null
create_db.py
ZDaria/grinding_converter
d4ebbcd1d5445dfd91e9142b6e5ac8e54ffbfcea
[ "Apache-2.0" ]
null
null
null
create_db.py
ZDaria/grinding_converter
d4ebbcd1d5445dfd91e9142b6e5ac8e54ffbfcea
[ "Apache-2.0" ]
null
null
null
from webapp.catalogs import create_app from grinding_converter.webapp import create_db create_db.create_all(app=create_app())
25.4
47
0.858268
20
127
5.15
0.5
0.23301
0.271845
0
0
0
0
0
0
0
0
0
0.07874
127
5
48
25.4
0.880342
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
b23c8abbc7633b6f9f7321f4c46fd089316462f5
2,073
py
Python
DataProcess/CombineCol.py
ztlevi/TRI_Visualization
c9abfc9c41da1dcef71e3a6673bebeb299317014
[ "FSFAP" ]
5
2017-07-12T18:10:38.000Z
2017-12-29T02:40:24.000Z
DataProcess/CombineCol.py
ztlevi/TRI_demo
c9abfc9c41da1dcef71e3a6673bebeb299317014
[ "FSFAP" ]
null
null
null
DataProcess/CombineCol.py
ztlevi/TRI_demo
c9abfc9c41da1dcef71e3a6673bebeb299317014
[ "FSFAP" ]
null
null
null
import csv import pandas as pd df = pd.read_csv('output01.csv') print df.head() print '----------------' print df[['time [s]', 'long accel [g]', 'lat accel [g]','vector accel [g]', 'vert accel [g]', 'speed [mph]', 'GPS long [degs]', 'GPS lat [degs]']] print '------------------------------------------------------------------' print dd = pd.read_csv('output02.csv') print dd.head() print '----------------' print dd[['Time', 'HR', 'BR','Posture', 'Activity', 'PeakAccel', 'HRV']] print '------------------------------------------------------------------' print data = pd.merge(df, dd, how='outer') data = data[['time [s]', 'long accel [g]', 'lat accel [g]','vector accel [g]', 'vert accel [g]', 'speed [mph]', 'GPS long [degs]', 'GPS lat [degs]', 'Time', 'HR', 'BR','Posture', 'Activity', 'PeakAccel', 'HRV']] print data print '------------------------------------------------------------------' print data.to_csv(r'trip6.csv', encoding='gbk') df = pd.read_csv('trip6.csv') print df.head() print '----------------' print df[['time [s]', 'long accel [g]', 'lat accel [g]','vector accel [g]', 'vert accel [g]', 'speed [mph]', 'GPS long [degs]', 'GPS lat [degs]', 'Time', 'HR', 'BR','Posture', 'Activity', 'PeakAccel', 'HRV']] print '------------------------------------------------------------------' print dd = pd.read_csv('output03.csv') print dd.head() print '----------------' print dd[['ecg', 'gsr', 'scl','scr', 'driver_workload', 'expert_workload', 'traffic_load','event','GPS heading [degs]']] print '------------------------------------------------------------------' print data = pd.merge(df, dd) data = data[['time [s]', 'long accel [g]', 'lat accel [g]','vector accel [g]', 'vert accel [g]', 'speed [mph]', 'GPS long [degs]', 'GPS lat [degs]', 'Time', 'HR', 'BR','Posture', 'Activity', 'PeakAccel', 'HRV','ecg', 'gsr', 'scl','scr', 'driver_workload', 'expert_workload', 'traffic_load','event','GPS heading [degs']] print data print '------------------------------------------------------------------' print data.to_csv(r'trip7.csv', encoding='gbk')
39.113208
319
0.474674
246
2,073
3.95122
0.211382
0.098765
0.037037
0.057613
0.874486
0.874486
0.841564
0.752058
0.702675
0.651235
0
0.004841
0.103232
2,073
53
320
39.113208
0.51802
0
0
0.578947
0
0
0.601254
0.190935
0
0
0
0
0
0
null
null
0
0.052632
null
null
0.684211
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
1
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
9
a2947d47570f49343ab5e12950e0f2c0f4980a51
29,527
py
Python
tests/test_data/test_utils_data.py
johnlyzhou/behavenet
aa7187322e491299cd7fefbecb8f8f215b33edba
[ "MIT" ]
23
2021-03-11T10:28:36.000Z
2022-02-24T04:25:06.000Z
tests/test_data/test_utils_data.py
johnlyzhou/behavenet
aa7187322e491299cd7fefbecb8f8f215b33edba
[ "MIT" ]
12
2020-01-22T20:36:15.000Z
2021-01-28T18:45:39.000Z
tests/test_data/test_utils_data.py
johnlyzhou/behavenet
aa7187322e491299cd7fefbecb8f8f215b33edba
[ "MIT" ]
8
2020-01-22T18:42:03.000Z
2021-02-05T05:55:41.000Z
import h5py import os import numpy as np import pytest from behavenet.data import utils def test_get_data_generator_inputs(): hparams = { 'data_dir': 'ddir', 'results_dir': 'rdir', 'lab': 'lab0', 'expt': 'expt0', 'animal': 'animal0', 'session': 'session0'} session_dir = os.path.join( hparams['data_dir'], hparams['lab'], hparams['expt'], hparams['animal'], hparams['session']) hdf5_path = os.path.join(session_dir, 'data.hdf5') sess_ids = [ {'lab': hparams['lab'], 'expt': hparams['expt'], 'animal': hparams['animal'], 'session': hparams['session']}] # ----------------- # ae # ----------------- hparams['model_class'] = 'ae' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images'] assert transforms[0] == [None] assert paths[0] == [hdf5_path] hparams['model_class'] = 'ae' hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'masks'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['use_output_mask'] = False # ----------------- # vae # ----------------- hparams['model_class'] = 'vae' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images'] assert transforms[0] == [None] assert paths[0] == [hdf5_path] hparams['model_class'] = 'vae' hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'masks'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['use_output_mask'] = False # ----------------- # beta-tcvae # ----------------- hparams['model_class'] = 'beta-tcvae' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images'] assert transforms[0] == [None] assert paths[0] == [hdf5_path] hparams['model_class'] = 'beta-tcvae' hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'masks'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['use_output_mask'] = False # ----------------- # ps-vae # ----------------- hparams['model_class'] = 'ps-vae' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['model_class'] = 'ps-vae' hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels', 'masks'] assert transforms[0] == [None, None, None] assert paths[0] == [hdf5_path, hdf5_path, hdf5_path] hparams['use_output_mask'] = False hparams['model_class'] = 'ps-vae' hparams['use_label_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels', 'labels_masks'] assert transforms[0] == [None, None, None] assert paths[0] == [hdf5_path, hdf5_path, hdf5_path] hparams['use_label_mask'] = False # ----------------- # cond-vae # ----------------- hparams['model_class'] = 'cond-vae' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['model_class'] = 'cond-vae' hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels', 'masks'] assert transforms[0] == [None, None, None] assert paths[0] == [hdf5_path, hdf5_path, hdf5_path] hparams['use_output_mask'] = False # ----------------- # cond-ae # ----------------- hparams['model_class'] = 'cond-ae' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['model_class'] = 'cond-ae' hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels', 'masks'] assert transforms[0] == [None, None, None] assert paths[0] == [hdf5_path, hdf5_path, hdf5_path] hparams['use_output_mask'] = False hparams['model_class'] = 'cond-ae' hparams['conditional_encoder'] = True hparams['y_pixels'] = 2 hparams['x_pixels'] = 2 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels', 'labels_sc'] assert transforms[0][0] is None assert transforms[0][1] is None assert transforms[0][2].__repr__().find('MakeOneHot2D') > -1 assert paths[0] == [hdf5_path, hdf5_path, hdf5_path] hparams['conditional_encoder'] = False # ----------------- # cond-ae-msp # ----------------- hparams['model_class'] = 'cond-ae-msp' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['model_class'] = 'cond-ae-msp' hparams['use_label_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels', 'labels_masks'] assert transforms[0] == [None, None, None] assert paths[0] == [hdf5_path, hdf5_path, hdf5_path] hparams['use_label_mask'] = False # ----------------- # ae_latents # ----------------- hparams['model_class'] = 'ae_latents' hparams['session_dir'] = session_dir hparams['ae_model_class'] = 'ae' hparams['ae_model_type'] = 'conv' hparams['n_ae_latents'] = 8 hparams['ae_experiment_name'] = 'tt_expt_ae' hparams['ae_version'] = 0 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['ae_latents'] # transforms and paths tested by test_get_transforms_paths # ----------------- # neural-ae # ----------------- hparams['model_class'] = 'neural-ae' hparams['model_type'] = 'linear' hparams['session_dir'] = session_dir hparams['neural_type'] = 'spikes' hparams['neural_thresh'] = 0 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['neural', 'ae_latents'] assert hparams_['input_signal'] == 'neural' assert hparams_['output_signal'] == 'ae_latents' assert hparams_['output_size'] == hparams['n_ae_latents'] assert hparams_['noise_dist'] == 'gaussian' hparams['model_type'] = 'linear-mv' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert hparams_['noise_dist'] == 'gaussian-full' # ----------------- # neural-ae-me # ----------------- hparams['model_class'] = 'neural-ae-me' hparams['model_type'] = 'linear' hparams['session_dir'] = session_dir hparams['neural_type'] = 'spikes' hparams['neural_thresh'] = 0 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['neural', 'ae_latents'] assert transforms[0][0] is None assert transforms[0][1].__repr__().find('MotionEnergy') > -1 assert hparams_['input_signal'] == 'neural' assert hparams_['output_signal'] == 'ae_latents' assert hparams_['output_size'] == hparams['n_ae_latents'] assert hparams_['noise_dist'] == 'gaussian' hparams['model_type'] = 'linear-mv' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert hparams_['noise_dist'] == 'gaussian-full' # ----------------- # ae-neural # ----------------- hparams['model_class'] = 'ae-neural' hparams['model_type'] = 'linear' hparams['session_dir'] = session_dir hparams['neural_type'] = 'spikes' hparams['neural_thresh'] = 0 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['neural', 'ae_latents'] assert hparams_['input_signal'] == 'ae_latents' assert hparams_['output_signal'] == 'neural' assert hparams_['output_size'] is None assert hparams_['noise_dist'] == 'poisson' hparams['model_type'] = 'linear' hparams['neural_type'] = 'ca' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert hparams_['noise_dist'] == 'gaussian' hparams['model_type'] = 'linear-mv' hparams['neural_type'] = 'ca' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert hparams_['noise_dist'] == 'gaussian-full' # ----------------- # neural-labels # ----------------- hparams['model_class'] = 'neural-labels' hparams['model_type'] = 'linear' hparams['n_labels'] = 4 hparams['session_dir'] = session_dir hparams['neural_type'] = 'spikes' hparams['neural_thresh'] = 0 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['neural', 'labels'] assert hparams_['input_signal'] == 'neural' assert hparams_['output_signal'] == 'labels' assert hparams_['output_size'] == hparams['n_labels'] assert hparams_['noise_dist'] == 'gaussian' hparams['model_type'] = 'linear-mv' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert hparams_['noise_dist'] == 'gaussian-full' # ----------------- # labels-neural # ----------------- hparams['model_class'] = 'labels-neural' hparams['model_type'] = 'linear' hparams['n_labels'] = 4 hparams['session_dir'] = session_dir hparams['neural_type'] = 'spikes' hparams['neural_thresh'] = 0 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['neural', 'labels'] assert hparams_['input_signal'] == 'labels' assert hparams_['output_signal'] == 'neural' assert hparams_['output_size'] is None assert hparams_['noise_dist'] == 'poisson' hparams['model_type'] = 'linear' hparams['neural_type'] = 'ca' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert hparams_['noise_dist'] == 'gaussian' hparams['model_type'] = 'linear-mv' hparams['neural_type'] = 'ca' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert hparams_['noise_dist'] == 'gaussian-full' # ----------------- # arhmm # ----------------- hparams['model_class'] = 'arhmm' hparams['session_dir'] = session_dir hparams['ae_model_type'] = 'conv' hparams['n_ae_latents'] = 8 hparams['ae_experiment_name'] = 'tt_expt_ae' hparams['ae_version'] = 0 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['ae_latents'] # transforms and paths tested by test_get_transforms_paths hparams['load_videos'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['ae_latents', 'images'] hparams['load_videos'] = False hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['ae_latents', 'masks'] hparams['use_output_mask'] = False # ----------------- # arhmm-labels # ----------------- hparams['model_class'] = 'arhmm-labels' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['labels'] assert transforms[0] == [None] assert paths[0] == [hdf5_path] hparams['load_videos'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['labels', 'images'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['load_videos'] = False hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['labels', 'masks'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['use_output_mask'] = False # ----------------- # neural-arhmm # ----------------- hparams['model_class'] = 'neural-arhmm' hparams['model_type'] = 'linear' hparams['session_dir'] = session_dir hparams['neural_type'] = 'spikes' hparams['neural_thresh'] = 0 hparams['n_arhmm_states'] = 2 hparams['transitions'] = 'stationary' hparams['noise_type'] = 'gaussian' hparams['arhmm_experiment_name'] = 'tt_expt_arhmm' hparams['arhmm_version'] = 1 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['neural', 'arhmm_states'] assert hparams_['input_signal'] == 'neural' assert hparams_['output_signal'] == 'arhmm_states' assert hparams_['output_size'] == hparams['n_arhmm_states'] assert hparams_['noise_dist'] == 'categorical' # ----------------- # arhmm-neural # ----------------- hparams['model_class'] = 'arhmm-neural' hparams['model_type'] = 'linear' hparams['session_dir'] = session_dir hparams['neural_type'] = 'spikes' hparams['neural_thresh'] = 0 hparams['n_arhmm_states'] = 2 hparams['transitions'] = 'stationary' hparams['noise_type'] = 'gaussian' hparams['arhmm_experiment_name'] = 'tt_expt_arhmm' hparams['arhmm_version'] = 1 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['neural', 'arhmm_states'] assert hparams_['input_signal'] == 'arhmm_states' assert hparams_['output_signal'] == 'neural' assert hparams_['output_size'] is None assert hparams_['noise_dist'] == 'poisson' hparams['model_type'] = 'linear' hparams['neural_type'] = 'ca' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert hparams_['noise_dist'] == 'gaussian' hparams['model_type'] = 'linear-mv' hparams['neural_type'] = 'ca' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert hparams_['noise_dist'] == 'gaussian-full' # ----------------- # bayesian-decoding # ----------------- hparams['model_class'] = 'bayesian-decoding' hparams['neural_ae_experiment_name'] = 'tt_expt_ae_decoder' hparams['neural_ae_model_type'] = 'linear' hparams['neural_ae_version'] = 0 hparams['neural_arhmm_experiment_name'] = 'tt_expt_arhmm_decoder' hparams['neural_arhmm_model_type'] = 'linear' hparams['neural_arhmm_version'] = 0 hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['ae_latents', 'ae_predictions', 'arhmm_predictions', 'arhmm_states'] hparams['load_videos'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == [ 'ae_latents', 'ae_predictions', 'arhmm_predictions', 'arhmm_states', 'images'] hparams['load_videos'] = False hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == [ 'ae_latents', 'ae_predictions', 'arhmm_predictions', 'arhmm_states', 'masks'] hparams['use_output_mask'] = False # ----------------- # labels-images # ----------------- hparams['model_class'] = 'labels-images' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] assert hparams_['input_signal'] == 'labels' assert hparams_['output_signal'] == 'images' hparams['use_output_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['images', 'labels', 'masks'] hparams['use_output_mask'] = False # ----------------- # labels # ----------------- hparams['model_class'] = 'labels' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['labels'] assert transforms[0] == [None] assert paths[0] == [hdf5_path] hparams['use_label_mask'] = True hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['labels', 'labels_masks'] assert transforms[0] == [None, None] assert paths[0] == [hdf5_path, hdf5_path] hparams['use_label_mask'] = False # ----------------- # labels_masks # ----------------- hparams['model_class'] = 'labels_masks' hparams_, signals, transforms, paths = utils.get_data_generator_inputs( hparams, sess_ids, check_splits=False) assert signals[0] == ['labels_masks'] assert transforms[0] == [None] assert paths[0] == [hdf5_path] # ----------------- # other # ----------------- hparams['model_class'] = 'test' with pytest.raises(ValueError): utils.get_data_generator_inputs(hparams, sess_ids, check_splits=False) def test_get_transforms_paths(): hparams = { 'data_dir': 'ddir', 'results_dir': 'rdir', 'lab': 'lab', 'expt': 'expt', 'animal': 'animal', 'session': 'session'} session_dir = os.path.join( hparams['data_dir'], hparams['lab'], hparams['expt'], hparams['animal'], hparams['session']) hdf5_path = os.path.join(session_dir, 'data.hdf5') sess_id_str = str( '%s_%s_%s_%s_' % (hparams['lab'], hparams['expt'], hparams['animal'], hparams['session'])) # ------------------------ # neural data # ------------------------ # spikes, no thresholding hparams['neural_type'] = 'spikes' hparams['neural_thresh'] = 0 transform, path = utils.get_transforms_paths( 'neural', hparams, sess_id=None, check_splits=False) assert path == hdf5_path assert transform is None # spikes, thresholding hparams['neural_type'] = 'spikes' hparams['neural_thresh'] = 1 hparams['neural_bin_size'] = 1 transform, path = utils.get_transforms_paths( 'neural', hparams, sess_id=None, check_splits=False) assert path == hdf5_path assert transform.__repr__().find('Threshold') > -1 # calcium, no zscoring hparams['neural_type'] = 'ca' hparams['model_type'] = 'ae-neural' transform, path = utils.get_transforms_paths( 'neural', hparams, sess_id=None, check_splits=False) assert path == hdf5_path assert transform is None # calcium, zscoring hparams['neural_type'] = 'ca' hparams['model_type'] = 'neural-ae' transform, path = utils.get_transforms_paths( 'neural', hparams, sess_id=None, check_splits=False) assert path == hdf5_path assert transform.__repr__().find('ZScore') > -1 # raise exception for incorrect neural type hparams['neural_type'] = 'wf' with pytest.raises(ValueError): utils.get_transforms_paths('neural', hparams, sess_id=None, check_splits=False) # TODO: test subsampling methods # ------------------------ # ae latents # ------------------------ hparams['session_dir'] = session_dir hparams['ae_model_class'] = 'ae' hparams['ae_model_type'] = 'conv' hparams['n_ae_latents'] = 8 hparams['ae_experiment_name'] = 'tt_expt_ae' hparams['ae_version'] = 0 ae_path = os.path.join( hparams['data_dir'], hparams['lab'], hparams['expt'], hparams['animal'], hparams['session'], hparams['ae_model_class'], hparams['ae_model_type'], '%02i_latents' % hparams['n_ae_latents'], hparams['ae_experiment_name']) # user-defined latent path hparams['ae_latents_file'] = 'path/to/latents' transform, path = utils.get_transforms_paths( 'ae_latents', hparams, sess_id=None, check_splits=False) assert path == hparams['ae_latents_file'] assert transform is None hparams.pop('ae_latents_file') # build pathname from hparams transform, path = utils.get_transforms_paths( 'ae_latents', hparams, sess_id=None, check_splits=False) assert path == os.path.join( ae_path, 'version_%i' % hparams['ae_version'], '%slatents.pkl' % sess_id_str) assert transform is None # get correct transform transform, path = utils.get_transforms_paths( 'ae_latents_me', hparams, sess_id=None, check_splits=False) assert path == os.path.join( ae_path, 'version_%i' % hparams['ae_version'], '%slatents.pkl' % sess_id_str) assert transform.__repr__().find('MotionEnergy') > -1 # TODO: use get_best_model_version() # ------------------------ # arhmm states # ------------------------ hparams['n_ae_latents'] = 8 hparams['n_arhmm_states'] = 2 hparams['transitions'] = 'stationary' hparams['noise_type'] = 'gaussian' hparams['arhmm_experiment_name'] = 'tt_expt_arhmm' hparams['arhmm_version'] = 1 arhmm_path = os.path.join( hparams['data_dir'], hparams['lab'], hparams['expt'], hparams['animal'], hparams['session'], 'arhmm', '%02i_latents' % hparams['n_ae_latents'], '%02i_states' % hparams['n_arhmm_states'], hparams['transitions'], hparams['noise_type'], hparams['arhmm_experiment_name']) # user-defined state path hparams['arhmm_states_file'] = 'path/to/states' transform, path = utils.get_transforms_paths( 'arhmm_states', hparams, sess_id=None, check_splits=False) assert path == hparams['arhmm_states_file'] assert transform is None hparams.pop('arhmm_states_file') # build path name from hparams transform, path = utils.get_transforms_paths( 'arhmm_states', hparams, sess_id=None, check_splits=False) assert path == os.path.join( arhmm_path, 'version_%i' % hparams['arhmm_version'], '%sstates.pkl' % sess_id_str) assert transform is None # include shuffle transform hparams['shuffle_rng_seed'] = 0 transform, path = utils.get_transforms_paths( 'arhmm_states', hparams, sess_id=None, check_splits=False) assert path == os.path.join( arhmm_path, 'version_%i' % hparams['arhmm_version'], '%sstates.pkl' % sess_id_str) assert transform.__repr__().find('BlockShuffle') > -1 # TODO: use get_best_model_version() # ------------------------ # neural ae predictions # ------------------------ hparams['n_ae_latents'] = 8 hparams['neural_ae_model_type'] = 'linear' hparams['neural_ae_experiment_name'] = 'tt_expt_ae_decoder' hparams['neural_ae_version'] = 2 ae_pred_path = os.path.join( hparams['data_dir'], hparams['lab'], hparams['expt'], hparams['animal'], hparams['session'], 'neural-ae', '%02i_latents' % hparams['n_ae_latents'], hparams['neural_ae_model_type'], 'all', hparams['neural_ae_experiment_name']) # user-defined predictions path hparams['ae_predictions_file'] = 'path/to/predictions' transform, path = utils.get_transforms_paths( 'neural_ae_predictions', hparams, sess_id=None, check_splits=False) assert path == hparams['ae_predictions_file'] assert transform is None hparams.pop('ae_predictions_file') # build pathname from hparams transform, path = utils.get_transforms_paths( 'neural_ae_predictions', hparams, sess_id=None, check_splits=False) assert path == os.path.join( ae_pred_path, 'version_%i' % hparams['neural_ae_version'], '%spredictions.pkl' % sess_id_str) assert transform is None # TODO: use get_best_model_version() # ------------------------ # neural arhmm predictions # ------------------------ hparams['n_ae_latents'] = 8 hparams['n_arhmm_states'] = 10 hparams['transitions'] = 'stationary' hparams['noise_type'] = 'studentst' hparams['neural_arhmm_model_type'] = 'linear' hparams['neural_arhmm_experiment_name'] = 'tt_expt_ae_decoder' hparams['neural_arhmm_version'] = 3 arhmm_pred_path = os.path.join( hparams['data_dir'], hparams['lab'], hparams['expt'], hparams['animal'], hparams['session'], 'neural-arhmm', '%02i_latents' % hparams['n_ae_latents'], '%02i_states' % hparams['n_arhmm_states'], hparams['transitions'], hparams['neural_arhmm_model_type'], 'all', hparams['neural_arhmm_experiment_name']) # user-defined predictions path hparams['arhmm_predictions_file'] = 'path/to/predictions' transform, path = utils.get_transforms_paths( 'neural_arhmm_predictions', hparams, sess_id=None, check_splits=False) assert path == hparams['arhmm_predictions_file'] assert transform is None hparams.pop('arhmm_predictions_file') # build pathname from hparams transform, path = utils.get_transforms_paths( 'neural_arhmm_predictions', hparams, sess_id=None, check_splits=False) assert path == os.path.join( arhmm_pred_path, 'version_%i' % hparams['neural_arhmm_version'], '%spredictions.pkl' % sess_id_str) assert transform is None # TODO: use get_best_model_version() # ------------------------ # other # ------------------------ with pytest.raises(ValueError): utils.get_transforms_paths('invalid', hparams, sess_id=None, check_splits=False) def test_load_labels_like_latents(): # TODO pass def test_get_region_list(tmpdir): # make tmp hdf5 file path = tmpdir.join('data.hdf5') idx_data = { 'i0': np.array([0, 1, 2]), 'i1': np.array([3, 4, 5]), 'i2': np.array([6, 7, 8])} with h5py.File(path, 'w') as f: group0 = f.create_group('group0') # groupa = f.create_group('groupa') group1 = group0.create_group('group1') group1.create_dataset('i0', data=idx_data['i0']) group1.create_dataset('i1', data=idx_data['i1']) group1.create_dataset('i2', data=idx_data['i2']) # correct indices are returned hparams = { 'data_dir': tmpdir, 'lab': '', 'expt': '', 'animal': '', 'session': '', 'subsample_idxs_group_0': 'group0', 'subsample_idxs_group_1': 'group1'} idx_return = utils.get_region_list(hparams) for key in idx_data.keys(): assert np.all(idx_data[key] == idx_return[key]) # raise exception when first group is invalid hparams['subsample_idxs_group_0'] = 'group2' hparams['subsample_idxs_group_1'] = 'group1' with pytest.raises(ValueError): utils.get_region_list(hparams) # raise exception when first group contains no second group hparams['subsample_idxs_group_0'] = 'groupa' hparams['subsample_idxs_group_1'] = 'group1' with pytest.raises(ValueError): utils.get_region_list(hparams) # raise exception when second group is invalid hparams['subsample_idxs_group_0'] = 'group0' hparams['subsample_idxs_group_1'] = 'group2' with pytest.raises(ValueError): utils.get_region_list(hparams)
38.800263
98
0.640261
3,456
29,527
5.170139
0.05787
0.030445
0.057309
0.075106
0.895791
0.864674
0.843911
0.819118
0.777199
0.750392
0
0.010497
0.190199
29,527
760
99
38.851316
0.736774
0.078708
0
0.762162
0
0
0.228506
0.024549
0
0
0
0.001316
0.281081
1
0.007207
false
0.001802
0.009009
0
0.016216
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0c5aa5f47dd7cb2a4de5b2f5d96c9488b871a48e
16,543
py
Python
terminusdb_client/tests/ans_cardinality.py
LogicalDash/terminusdb-client-python
7f13f77e60f891b1e6bd214ebf73ff7f75fcaff8
[ "Apache-2.0" ]
43
2020-06-12T23:44:17.000Z
2022-03-12T15:18:55.000Z
terminusdb_client/tests/ans_cardinality.py
LogicalDash/terminusdb-client-python
7f13f77e60f891b1e6bd214ebf73ff7f75fcaff8
[ "Apache-2.0" ]
151
2020-06-12T20:23:05.000Z
2022-03-29T20:38:35.000Z
terminusdb_client/tests/ans_cardinality.py
LogicalDash/terminusdb-client-python
7f13f77e60f891b1e6bd214ebf73ff7f75fcaff8
[ "Apache-2.0" ]
46
2020-06-16T20:51:21.000Z
2022-03-17T18:11:46.000Z
import pytest @pytest.fixture(scope="module") def property_max(): return { "@type": "And", "and": [ { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P"}, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": { "@type": "Value", "node": "owl:DatatypeProperty", }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P"}, "predicate": { "@type": "NodeValue", "node": "rdfs:range", }, "object": {"@type": "Value", "node": "xsd:string"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P"}, "predicate": { "@type": "NodeValue", "node": "rdfs:domain", }, "object": {"@type": "Value", "node": "scm:A"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P_max"}, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": { "@type": "Value", "node": "owl:Restriction", }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P_max"}, "predicate": { "@type": "NodeValue", "node": "owl:onProperty", }, "object": {"@type": "Value", "node": "scm:P"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P_max"}, "predicate": { "@type": "NodeValue", "node": "owl:maxCardinality", }, "object": { "@type": "Value", "data": { "@value": 4, "@type": "xsd:nonNegativeInteger", }, }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:A"}, "predicate": { "@type": "NodeValue", "node": "rdfs:subClassOf", }, "object": {"@type": "Value", "node": "scm:P_max"}, "graph": "schema", }, ], } @pytest.fixture(scope="module") def property_min(): return { "@type": "And", "and": [ { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P"}, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": { "@type": "Value", "node": "owl:DatatypeProperty", }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P"}, "predicate": { "@type": "NodeValue", "node": "rdfs:range", }, "object": {"@type": "Value", "node": "xsd:string"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P"}, "predicate": { "@type": "NodeValue", "node": "rdfs:domain", }, "object": {"@type": "Value", "node": "scm:A"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P_min"}, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": { "@type": "Value", "node": "owl:Restriction", }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P_min"}, "predicate": { "@type": "NodeValue", "node": "owl:onProperty", }, "object": {"@type": "Value", "node": "scm:P"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P_min"}, "predicate": { "@type": "NodeValue", "node": "owl:minCardinality", }, "object": { "@type": "Value", "data": { "@value": 2, "@type": "xsd:nonNegativeInteger", }, }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:A"}, "predicate": { "@type": "NodeValue", "node": "rdfs:subClassOf", }, "object": {"@type": "Value", "node": "scm:P_min"}, "graph": "schema", }, ], } @pytest.fixture(scope="module") def property_cardinalty(): return { "@type": "And", "and": [ { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P"}, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": { "@type": "Value", "node": "owl:DatatypeProperty", }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P"}, "predicate": { "@type": "NodeValue", "node": "rdfs:range", }, "object": {"@type": "Value", "node": "xsd:string"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:P"}, "predicate": { "@type": "NodeValue", "node": "rdfs:domain", }, "object": {"@type": "Value", "node": "scm:A"}, "graph": "schema", }, { "@type": "AddTriple", "subject": { "@type": "NodeValue", "node": "scm:P_cardinality", }, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": { "@type": "Value", "node": "owl:Restriction", }, "graph": "schema", }, { "@type": "AddTriple", "subject": { "@type": "NodeValue", "node": "scm:P_cardinality", }, "predicate": { "@type": "NodeValue", "node": "owl:onProperty", }, "object": {"@type": "Value", "node": "scm:P"}, "graph": "schema", }, { "@type": "AddTriple", "subject": { "@type": "NodeValue", "node": "scm:P_cardinality", }, "predicate": { "@type": "NodeValue", "node": "owl:cardinality", }, "object": { "@type": "Value", "data": { "@value": 3, "@type": "xsd:nonNegativeInteger", }, }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:A"}, "predicate": { "@type": "NodeValue", "node": "rdfs:subClassOf", }, "object": { "@type": "Value", "node": "scm:P_cardinality", }, "graph": "schema", }, ], } @pytest.fixture(scope="module") def chain_insert(): return { "@type": "And", "and": [ { "@type": "AddTriple", "subject": { "@type": "NodeValue", "variable": "Node_ID", }, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": {"@type": "Value", "variable": "Type"}, }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "variable": "Node_ID"}, "predicate": {"@type": "NodeValue", "node": "rdfs:label"}, "object": {"@type": "Value", "variable": "Label"}, }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "variable": "Node_ID"}, "predicate": { "@type": "NodeValue", "node": "rdfs:comment", }, "object": {"@type": "Value", "variable": "Description"}, }, { "@type": "AddTriple", "subject": { "@type": "NodeValue", "variable": "Node_ID", }, "predicate": {"@type": "NodeValue", "node": "scm:prop"}, "object": { "@type": "Value", "variable": "Prop", }, }, { "@type": "AddTriple", "subject": { "@type": "NodeValue", "variable": "Node_ID", }, "predicate": {"@type": "NodeValue", "node": "scm:prop"}, "object": { "@type": "Value", "variable": "Prop2", }, }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "variable": "Node_ID"}, "predicate": { "@type": "NodeValue", "node": "rdfs:subClassOf", }, "object": { "@type": "Value", "node": "scm:myParentClass", }, }, ], } @pytest.fixture(scope="module") def chain_doctype(): return { "@type": "And", "and": [ { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:MyDoc"}, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": {"@type": "Value", "node": "owl:Class"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:MyDoc"}, "predicate": { "@type": "NodeValue", "node": "rdfs:subClassOf", }, "object": { "@type": "Value", "node": "terminus:Document", }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:MyDoc"}, "predicate": {"@type": "NodeValue", "node": "rdfs:label"}, "object": { "@type": "Value", "data": { "@value": "abc", "@type": "xsd:string", "@language": "en", }, }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:MyDoc"}, "predicate": { "@type": "NodeValue", "node": "rdfs:comment", }, "object": { "@type": "Value", "data": { "@value": "abcd", "@type": "xsd:string", "@language": "en", }, }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:prop"}, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": { "@type": "Value", "node": "owl:DatatypeProperty", }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:prop"}, "predicate": {"@type": "NodeValue", "node": "rdfs:range"}, "object": {"@type": "Value", "node": "xsd:dateTime"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:prop"}, "predicate": { "@type": "NodeValue", "node": "rdfs:domain", }, "object": {"@type": "Value", "node": "scm:MyDoc"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:prop"}, "predicate": {"@type": "NodeValue", "node": "rdfs:label"}, "object": { "@type": "Value", "data": { "@value": "aaa", "@type": "xsd:string", "@language": "en", }, }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:prop2"}, "predicate": {"@type": "NodeValue", "node": "rdf:type"}, "object": { "@type": "Value", "node": "owl:DatatypeProperty", }, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:prop2"}, "predicate": {"@type": "NodeValue", "node": "rdfs:range"}, "object": {"@type": "Value", "node": "xsd:integer"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:prop2"}, "predicate": { "@type": "NodeValue", "node": "rdfs:domain", }, "object": {"@type": "Value", "node": "scm:MyDoc"}, "graph": "schema", }, { "@type": "AddTriple", "subject": {"@type": "NodeValue", "node": "scm:prop2"}, "predicate": {"@type": "NodeValue", "node": "rdfs:label"}, "object": { "@type": "Value", "data": { "@value": "abe", "@type": "xsd:string", "@language": "en", }, }, "graph": "schema", }, ], }
34.464583
74
0.309255
939
16,543
5.423855
0.071353
0.199097
0.24033
0.183782
0.957785
0.941881
0.927744
0.913607
0.895543
0.875515
0
0.000975
0.503838
16,543
479
75
34.536534
0.619518
0
0
0.648188
0
0
0.313305
0.00399
0
0
0
0
0
1
0.010661
true
0
0.002132
0.010661
0.023454
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
10
a7625d10b14ef4d677d3598dc0af04586efef47e
131
py
Python
helloWorld/operators.py
NaebIis/Python
2b10a7c59abf3618695331525d0bc812845ae40f
[ "MIT" ]
null
null
null
helloWorld/operators.py
NaebIis/Python
2b10a7c59abf3618695331525d0bc812845ae40f
[ "MIT" ]
null
null
null
helloWorld/operators.py
NaebIis/Python
2b10a7c59abf3618695331525d0bc812845ae40f
[ "MIT" ]
null
null
null
a = 12 b = 3 print(a + b) print(a - b) print(a * b) print(a / b) print(a // b) print(a % b) print('testing', a + b / 3 - 4 * 12)
13.1
37
0.496183
29
131
2.241379
0.241379
0.215385
0.646154
1.107692
0.723077
0.723077
0.723077
0.723077
0.723077
0.723077
0
0.073684
0.274809
131
10
37
13.1
0.610526
0
0
0
0
0
0.05303
0
0
0
0
0
0
1
0
false
0
0
0
0
0.777778
1
0
0
null
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
10
a79a7d8e79cc7df9b6031d1ab49d68e12c1c8a5b
4,495
py
Python
tests/test_expression_helper.py
beepscore/searcher
189ac8c2a55030bbcf9f82d9e5b0fb40e6caf03b
[ "MIT" ]
null
null
null
tests/test_expression_helper.py
beepscore/searcher
189ac8c2a55030bbcf9f82d9e5b0fb40e6caf03b
[ "MIT" ]
null
null
null
tests/test_expression_helper.py
beepscore/searcher
189ac8c2a55030bbcf9f82d9e5b0fb40e6caf03b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import unittest from searcher import expression_helper class TestExpressionHelper(unittest.TestCase): def setUp(self): pass def test_ignored_filename_patterns(self): expected = ['\A\.$', '\A\.\.$', '\A\.DS_Store$', '\.git', '\.svn', '\.exe$'] self.assertEqual(expected, expression_helper.ignored_filename_patterns) def test_is_string_matched_in_regular_expression_objects_dot(self): """ match '.' representing current directory \A matches only at start of string $ matches at end of string https://docs.python.org/2/library/re.html """ ignored_filename_patterns = ['\A\.$'] ignored_regex_objects = expression_helper.regex_objects_from_patterns(ignored_filename_patterns) self.assertTrue(expression_helper.is_string_matched_in_regular_expression_objects('.', ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects('..', ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects('a.', ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects('.c', ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects('a.c', ignored_regex_objects)) def test_is_string_matched_in_regular_expression_objects_dotdot(self): """ match '..' representing directory above current directory \A matches only at start of string $ matches at end of string https://docs.python.org/2/library/re.html """ ignored_filename_patterns = ['\A\.\.$'] ignored_regex_objects = expression_helper.regex_objects_from_patterns(ignored_filename_patterns) self.assertTrue(expression_helper.is_string_matched_in_regular_expression_objects('..', ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects('a..', ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects('..c', ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects('a..c', ignored_regex_objects)) def test_is_string_matched_in_regular_expression_objects_dotDS_Store(self): """ match '.DS_Store' OSX file system file \A matches only at start of string $ matches at end of string https://docs.python.org/2/library/re.html """ ignored_filename_patterns = ['\A\.DS_Store$'] ignored_regex_objects = expression_helper.regex_objects_from_patterns(ignored_filename_patterns) self.assertTrue(expression_helper.is_string_matched_in_regular_expression_objects('.DS_Store', ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects('a.DS_Store', ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects('.DS_Storeb', ignored_regex_objects)) def test_is_string_matched_in_regular_expression_objects_inner(self): """ match 'ython' within string. Case sensitive """ ignored_filename_patterns = ['ython'] ignored_regex_objects = expression_helper.regex_objects_from_patterns(ignored_filename_patterns) self.assertTrue(expression_helper.is_string_matched_in_regular_expression_objects("A big python is here.", ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects("A big pythoxyz", ignored_regex_objects)) def test_is_string_matched_in_regular_expression_objects_dot_git(self): ignored_filename_patterns = ['\.git'] ignored_regex_objects = expression_helper.regex_objects_from_patterns(ignored_filename_patterns) self.assertTrue(expression_helper.is_string_matched_in_regular_expression_objects(".git", ignored_regex_objects)) self.assertTrue(expression_helper.is_string_matched_in_regular_expression_objects("a/.git/objects", ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects("git", ignored_regex_objects)) self.assertFalse(expression_helper.is_string_matched_in_regular_expression_objects("a/git/objects", ignored_regex_objects)) if __name__ == "__main__": unittest.main()
51.666667
138
0.772859
552
4,495
5.79529
0.137681
0.105033
0.107846
0.122226
0.843076
0.843076
0.840888
0.840888
0.840888
0.840888
0
0.001032
0.137931
4,495
86
139
52.267442
0.824516
0.114794
0
0.116279
0
0
0.052918
0
0
0
0
0
0.44186
1
0.162791
false
0.023256
0.046512
0
0.232558
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
1
0
0
0
0
0
0
0
0
0
7
a7a83374fd717aa904b26d9889de81dc4e81fc2b
10,276
py
Python
xview/models/fpn.py
mayankj/xView2-Solution
804aa15a3d9f28c7c1d73e50ce0ed0c359a0493e
[ "MIT" ]
null
null
null
xview/models/fpn.py
mayankj/xView2-Solution
804aa15a3d9f28c7c1d73e50ce0ed0c359a0493e
[ "MIT" ]
null
null
null
xview/models/fpn.py
mayankj/xView2-Solution
804aa15a3d9f28c7c1d73e50ce0ed0c359a0493e
[ "MIT" ]
null
null
null
from functools import partial from pytorch_toolbelt.modules import ABN, ACT_RELU from pytorch_toolbelt.modules import encoders as E from pytorch_toolbelt.modules.decoders import FPNSumDecoder, FPNCatDecoder from pytorch_toolbelt.modules.encoders import EncoderModule from torch import nn from torch.nn import functional as F from .common import disaster_type_classifier, damage_types_classifier from ..dataset import ( OUTPUT_MASK_4_KEY, OUTPUT_MASK_8_KEY, OUTPUT_MASK_16_KEY, OUTPUT_MASK_32_KEY, OUTPUT_MASK_KEY, DISASTER_TYPE_KEY, DISASTER_TYPES, DAMAGE_TYPE_KEY, DAMAGE_TYPES, ) __all__ = [ "FPNSumSegmentationModel", "FPNCatSegmentationModel", "resnet18_fpncat128", "resnet34_fpncat128", "resnet101_fpncat256", "resnet152_fpncat256", "resnet101_fpncat256", "seresnext50_fpncat128", "seresnext101_fpncat256", "seresnext101_fpnsum256", "effnetB4_fpncat128", "densenet121_fpnsum128", ] class FPNSumFinalBlock(nn.Module): def __init__(self, input_channels, output_channels, abn_block=ABN): super().__init__() self.conv1 = nn.Conv2d(input_channels, input_channels, kernel_size=3, padding=1, bias=False) self.abn1 = abn_block(input_channels) self.conv2 = nn.Conv2d(input_channels, input_channels, kernel_size=3, padding=1, bias=False) self.abn2 = abn_block(input_channels) self.final = nn.Conv2d(input_channels, output_channels, kernel_size=3, padding=1) def forward(self, x): x = self.conv1(x) x = self.abn1(x) x = self.conv2(x) x = self.abn2(x) x = self.final(x) return x class FPNSumSegmentationModel(nn.Module): def __init__( self, encoder: EncoderModule, num_classes: int, disaster_type_classes: int, damage_type_classes: int, dropout=0.25, abn_block=ABN, full_size_mask=True, fpn_channels=256, ): super().__init__() self.encoder = encoder self.decoder = FPNSumDecoder( feature_maps=encoder.output_filters, output_channels=num_classes, dsv_channels=None, fpn_channels=fpn_channels, abn_block=abn_block, dropout=dropout, final_block=FPNSumFinalBlock, ) self.full_size_mask = full_size_mask if disaster_type_classes is not None: self.disaster_type_classifier = disaster_type_classifier( encoder.output_filters[-1], disaster_type_classes, dropout=dropout ) else: self.disaster_type_classifier = None if damage_type_classes is not None: self.damage_types_classifier = damage_types_classifier( encoder.output_filters[-1], damage_type_classes, dropout=dropout ) else: self.damage_types_classifier = None def forward(self, x): enc_features = self.encoder(x) # Decode mask mask = self.decoder(enc_features) if self.full_size_mask: mask = F.interpolate(mask, size=x.size()[2:], mode="bilinear", align_corners=False) output = {OUTPUT_MASK_KEY: mask} if self.disaster_type_classifier is not None: disaster_type = self.disaster_type_classifier(enc_features[-1]) output[DISASTER_TYPE_KEY] = disaster_type if self.damage_types_classifier is not None: damage_types = self.damage_types_classifier(enc_features[-1]) output[DAMAGE_TYPE_KEY] = damage_types return output class FPNCatFinalBlock(nn.Module): def __init__(self, input_channels, output_channels, abn_block=ABN): super().__init__() self.conv1 = nn.Conv2d(input_channels, input_channels, kernel_size=3, padding=1, bias=False) self.abn1 = abn_block(input_channels) self.conv2 = nn.Conv2d(input_channels, output_channels, kernel_size=3, padding=1) def forward(self, x): x = self.conv1(x) x = self.abn1(x) x = self.conv2(x) return x class FPNCatSegmentationModel(nn.Module): def __init__( self, encoder: EncoderModule, num_classes: int, disaster_type_classes: int, damage_type_classes: int, dropout=0.25, abn_block=ABN, fpn_channels=256, full_size_mask=True, ): super().__init__() self.encoder = encoder self.decoder = FPNCatDecoder( feature_maps=encoder.output_filters, output_channels=num_classes, dsv_channels=None, fpn_channels=fpn_channels, abn_block=abn_block, dropout=dropout, final_block=partial(FPNCatFinalBlock, abn_block=abn_block), ) self.full_size_mask = full_size_mask if disaster_type_classes is not None: self.disaster_type_classifier = disaster_type_classifier( encoder.output_filters[-1], disaster_type_classes, dropout=dropout ) else: self.disaster_type_classifier = None if damage_type_classes is not None: self.damage_types_classifier = damage_types_classifier( encoder.output_filters[-1], damage_type_classes, dropout=dropout ) else: self.damage_types_classifier = None def forward(self, x): enc_features = self.encoder(x) # Decode mask mask = self.decoder(enc_features) if self.full_size_mask: mask = F.interpolate(mask, size=x.size()[2:], mode="bilinear", align_corners=False) output = {OUTPUT_MASK_KEY: mask} if self.disaster_type_classifier is not None: disaster_type = self.disaster_type_classifier(enc_features[-1]) output[DISASTER_TYPE_KEY] = disaster_type if self.damage_types_classifier is not None: damage_types = self.damage_types_classifier(enc_features[-1]) output[DAMAGE_TYPE_KEY] = damage_types return output def resnet18_fpncat128(num_classes=5, dropout=0.0, pretrained=True): encoder = E.Resnet18Encoder(pretrained=pretrained) encoder.change_input_channels(6) return FPNCatSegmentationModel( encoder, num_classes=num_classes, disaster_type_classes=len(DISASTER_TYPES), damage_type_classes=len(DAMAGE_TYPES), fpn_channels=128, dropout=dropout, ) def resnet34_fpncat128(num_classes=5, dropout=0.0, pretrained=True): encoder = E.Resnet34Encoder(pretrained=pretrained) encoder.change_input_channels(6) return FPNCatSegmentationModel( encoder, num_classes=num_classes, disaster_type_classes=len(DISASTER_TYPES), damage_type_classes=len(DAMAGE_TYPES), fpn_channels=128, dropout=dropout, ) def seresnext50_fpncat128(num_classes=5, dropout=0.0, pretrained=True): encoder = E.SEResNeXt50Encoder(pretrained=pretrained) encoder.change_input_channels(6) return FPNCatSegmentationModel( encoder, num_classes=num_classes, disaster_type_classes=len(DISASTER_TYPES), damage_type_classes=len(DAMAGE_TYPES), fpn_channels=128, dropout=dropout, abn_block=partial(ABN, activation=ACT_RELU), ) def seresnext101_fpncat256(num_classes=5, dropout=0.0, pretrained=True): encoder = E.SEResNeXt101Encoder(pretrained=pretrained) encoder.change_input_channels(6) return FPNCatSegmentationModel( encoder, num_classes=num_classes, disaster_type_classes=len(DISASTER_TYPES), damage_type_classes=len(DAMAGE_TYPES), fpn_channels=256, dropout=dropout, ) def seresnext101_fpnsum256(num_classes=5, dropout=0.0, pretrained=True): encoder = E.SEResNeXt101Encoder(pretrained=pretrained) encoder.change_input_channels(6) return FPNSumSegmentationModel( encoder, num_classes=num_classes, disaster_type_classes=len(DISASTER_TYPES), damage_type_classes=len(DAMAGE_TYPES), fpn_channels=256, dropout=dropout, ) def resnet101_fpncat256(num_classes=5, dropout=0.0, pretrained=True): encoder = E.Resnet101Encoder(pretrained=pretrained) encoder.change_input_channels(6) return FPNCatSegmentationModel( encoder, num_classes=num_classes, disaster_type_classes=len(DISASTER_TYPES), damage_type_classes=len(DAMAGE_TYPES), fpn_channels=256, dropout=dropout, ) def resnet152_fpncat256(num_classes=5, dropout=0.0, pretrained=True): encoder = E.Resnet152Encoder(pretrained=pretrained) encoder.change_input_channels(6) return FPNCatSegmentationModel( encoder, num_classes=num_classes, disaster_type_classes=len(DISASTER_TYPES), damage_type_classes=len(DAMAGE_TYPES), fpn_channels=256, dropout=dropout, ) def effnetB4_fpncat128(num_classes=5, dropout=0.0, pretrained=True): encoder = E.EfficientNetB4Encoder(abn_params={"activation": "swish"}, pretrained=pretrained) encoder.change_input_channels(6) return FPNCatSegmentationModel( encoder, num_classes=num_classes, disaster_type_classes=len(DISASTER_TYPES), damage_type_classes=len(DAMAGE_TYPES), fpn_channels=128, dropout=dropout, ) def densenet121_fpnsum128(input_channels=6, num_classes=5, dropout=0.0, pretrained=True): encoder = E.DenseNet121Encoder(pretrained=pretrained) encoder.change_input_channels(input_channels) return FPNSumSegmentationModel( encoder, num_classes=num_classes, disaster_type_classes=len(DISASTER_TYPES), damage_type_classes=len(DAMAGE_TYPES), fpn_channels=128, dropout=dropout, abn_block=partial(ABN, activation=ACT_RELU), )
32.830671
101
0.656481
1,143
10,276
5.580052
0.108486
0.062088
0.039511
0.036061
0.813578
0.795861
0.788648
0.776733
0.776733
0.776733
0
0.032497
0.263332
10,276
312
102
32.935897
0.81004
0.002238
0
0.70155
0
0
0.027571
0.013282
0
0
0
0
0
1
0.065891
false
0
0.034884
0
0.166667
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
38ffe57cdf264a10bb1e0af2f6844c5b0ed793cb
1,827
py
Python
src/graph_transpiler/webdnn/backend/fallback/kernels/__init__.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
1
2018-07-26T13:52:21.000Z
2018-07-26T13:52:21.000Z
src/graph_transpiler/webdnn/backend/fallback/kernels/__init__.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
src/graph_transpiler/webdnn/backend/fallback/kernels/__init__.py
gunpowder78/webdnn
c659ea49007f91d178ce422a1eebe289516a71ee
[ "MIT" ]
null
null
null
from webdnn.backend.fallback.kernels import abs from webdnn.backend.fallback.kernels import average_pooling_2d from webdnn.backend.fallback.kernels import broadcast from webdnn.backend.fallback.kernels import clipped_relu from webdnn.backend.fallback.kernels import concat from webdnn.backend.fallback.kernels import convolution_2d from webdnn.backend.fallback.kernels import elementwise from webdnn.backend.fallback.kernels import elementwise_add from webdnn.backend.fallback.kernels import elementwise_div from webdnn.backend.fallback.kernels import elementwise_mul from webdnn.backend.fallback.kernels import elementwise_pow from webdnn.backend.fallback.kernels import elu from webdnn.backend.fallback.kernels import exp from webdnn.backend.fallback.kernels import hard_sigmoid from webdnn.backend.fallback.kernels import leaky_relu from webdnn.backend.fallback.kernels import linear from webdnn.backend.fallback.kernels import local_response_normalization from webdnn.backend.fallback.kernels import max_pooling_2d from webdnn.backend.fallback.kernels import reinterpret_axis from webdnn.backend.fallback.kernels import relu from webdnn.backend.fallback.kernels import reshape from webdnn.backend.fallback.kernels import rsqrt from webdnn.backend.fallback.kernels import scalar_add from webdnn.backend.fallback.kernels import scalar_affine from webdnn.backend.fallback.kernels import scalar_mul from webdnn.backend.fallback.kernels import scalar_pow from webdnn.backend.fallback.kernels import sigmoid from webdnn.backend.fallback.kernels import softmax from webdnn.backend.fallback.kernels import softplus from webdnn.backend.fallback.kernels import softsign from webdnn.backend.fallback.kernels import split_axis from webdnn.backend.fallback.kernels import tanh from webdnn.backend.fallback.kernels import threshold_relu
53.735294
72
0.873563
252
1,827
6.25
0.166667
0.209524
0.35619
0.52381
0.892063
0.892063
0.578413
0.059683
0
0
0
0.00177
0.07225
1,827
33
73
55.363636
0.927434
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
1
1
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
8
ac259a2996edc3f10d7fc300224a50a157fe82ed
16,415
py
Python
keras_cbc/layers/detection_probability_functions.py
cbc-authors/cbc_networks
b65a7967fa1f6ac2cec23503a9f01fa7bf04ae03
[ "BSD-3-Clause" ]
15
2019-10-23T15:47:39.000Z
2022-03-16T20:56:21.000Z
keras_cbc/layers/detection_probability_functions.py
cbc-authors/cbc_networks
b65a7967fa1f6ac2cec23503a9f01fa7bf04ae03
[ "BSD-3-Clause" ]
1
2020-03-18T04:47:01.000Z
2020-03-24T10:07:36.000Z
keras_cbc/layers/detection_probability_functions.py
saralajew/cbc_networks
b65a7967fa1f6ac2cec23503a9f01fa7bf04ae03
[ "BSD-3-Clause" ]
4
2019-11-08T18:16:13.000Z
2020-04-03T15:09:39.000Z
# -*- coding: utf-8 -*- """Implementation of detection probability function layers. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from keras.layers import Layer from keras.utils import conv_utils from keras import activations import keras.backend as K import numpy as np class CosineSimilarity2D(Layer): """2-dimensional sliding operation with the cosine similarity. This layer computes the cosine similarity in a 2-dimensional sliding operation on a given input. Thereby, it accepts a predefined definition of components given by the argument `components` or a second input tensor of components. The layer can handle multiple versions of one component via `n_replicas`. The layer requires `K.image_data_format()` to be 'channels_last'. Use the `activation` argument to apply a proper activation to convert the similarity in a detection probability function. The documentation of the arguments `strides`, `padding`, `dilation_rate` and `activation` is copied from the Keras documentation of the `Conv2D` layer. # Arguments n_replicas: An integer specifying the number of replicas for each component. This parameter can be used to learn for one component multiple versions to handle variations. This could be more efficient in terms of parameters than learning multiple reasoning concepts. The output number of components is the input number of components divided by `n_replicas`. A respective handling of the replicas must performed manually afterwards. strides: An integer or tuple/list of 2 integers, specifying the strides of the convolution along the height and width. Can be a single integer to specify the same value for all spatial dimensions. Specifying any stride value != 1 is incompatible with specifying any `dilation_rate` value != 1. padding: one of `"valid"` or `"same"` (case-insensitive). Note that `"same"` is slightly inconsistent across backends with `strides` != 1, as described [here](https://github.com/keras-team/keras/pull/9473#issuecomment-372166860) dilation_rate: an integer or tuple/list of 2 integers, specifying the dilation rate to use for dilated convolution. Can be a single integer to specify the same value for all spatial dimensions. Currently, specifying any `dilation_rate` value != 1 is incompatible with specifying any stride value != 1. activation: Activation function to use (see [activations](../activations.md)). If you don't specify anything, no activation is applied (i.e. "linear" activation: `a(x) = x`). components: Numpy array, specifying predefined components. # Input shape List of two 4-dimensional tensors with shapes: `[(batch, rows, cols, channels), (number of components, rows, cols, channels)]`, where the first input is the input data feature tensor and the second input is the component feature tensor (the kernel) or a 4-dimensional tensor with shape: `(batch, rows, cols, channels)` if `components` is not 'None'. # Output shape 4-dimensional tensor with shape: `(batch, new_rows, new_cols, number of components)` if `n_replicas` == 1 or a 5-dimensional tensor with shape: `(batch, new_rows, new_cols, number of components // n_replicas, n_replicas)` otherwise. `rows` and `cols` values might have changed due to padding. """ def __init__(self, n_replicas=1, strides=(1, 1), padding='valid', dilation_rate=(1, 1), activation='relu', components=None, **kwargs): super(CosineSimilarity2D, self).__init__(**kwargs) self.n_replicas = n_replicas self.rank = 2 self.strides = conv_utils.normalize_tuple(strides, self.rank, 'strides') self.padding = conv_utils.normalize_padding(padding) self.dilation_rate = conv_utils.normalize_tuple(dilation_rate, self.rank, 'dilation_rate') self.components = components self.activation = activations.get(activation) if K.image_data_format() != 'channels_last': raise ValueError("The layer requires `K.image_data_format()` to " "be 'channels_last'.") def build(self, input_shape): # Only one tensor input given (no components input tensor) if not (isinstance(input_shape, list) and len(input_shape) > 1): # Component initializer should be given if self.components is None: raise ValueError("Input shape is 1, this requires components " "to be predefined by the `components` " "argument.") kernel_shape = self.components.shape else: _, kernel_shape = input_shape if kernel_shape[0] % self.n_replicas != 0: raise ValueError("The number of components must be a " "multiple of 'n_replicas'.") self.built = True def call(self, inputs, **kwargs): def sqrt(x): return K.sqrt(K.maximum(x, K.epsilon())) # Both components and input given if isinstance(inputs, list) and len(inputs) > 1: signals, kernel = inputs else: signals = inputs kernel = self.components.astype(K.floatx()) # move component_number to channel dimension kernel = K.permute_dimensions(kernel, (1, 2, 3, 0)) # normalize kernel normed_kernel = kernel / sqrt(K.sum(K.square(kernel), (0, 1, 2), keepdims=True)) # get norm of signals signals_norm = sqrt(K.conv2d(K.square(signals), np.ones(K.int_shape(kernel)[:3] + (1,), dtype=K.floatx()), strides=self.strides, padding=self.padding, data_format='channels_last', dilation_rate=self.dilation_rate)) diss = K.conv2d(signals, normed_kernel, strides=self.strides, padding=self.padding, data_format='channels_last', dilation_rate=self.dilation_rate) / signals_norm if self.n_replicas != 1: shape = K.int_shape(diss) diss = K.reshape(diss, (-1, shape[1], shape[2], shape[3] // self.n_replicas, self.n_replicas)) return self.activation(diss) def compute_output_shape(self, input_shape): # Both components and input given if isinstance(input_shape, list) and len(input_shape) > 1: input_shape, kernel_shape = input_shape else: input_shape = input_shape kernel_shape = self.components.shape filters = kernel_shape[0] // self.n_replicas kernel_shape = kernel_shape[1:3] space = input_shape[1:-1] new_space = [] for i in range(len(space)): new_dim = conv_utils.conv_output_length( space[i], kernel_shape[i], padding=self.padding, stride=self.strides[i], dilation=self.dilation_rate[i]) new_space.append(new_dim) if self.n_replicas != 1: return (input_shape[0],) + tuple(new_space) + \ (filters, self.n_replicas) else: return (input_shape[0],) + tuple(new_space) + (filters,) class EuclideanDistance2D(Layer): """2-dimensional sliding operation with the Euclidean distance. This layer computes the Euclidean distance in a 2-dimensional sliding operation on a given input. Thereby, it accepts a predefined definition of components given by the argument `components` or a second input tensor of components. The layer can handle multiple versions of one component via `n_replicas`. It computes the squared version of the Euclidean distance. If the non-squared version is requested, then use the activation function to apply the sqrt. The layer requires `K.image_data_format()` to be 'channels_last'. Use the `activation` argument to apply a proper activation to convert the distance in a detection probability function. The documentation of the arguments `strides`, `padding`, `dilation_rate` and `activation` is copied from the Keras documentation of the `Conv2D` layer. # Arguments n_replicas: An integer specifying the number of replicas for each component. This parameter can be used to learn for one component multiple versions to handle variations. This could be more efficient in terms of parameters than learning multiple reasoning concepts. The output number of components is the input number of components divided by `n_replicas`. A respective handling of the replicas must performed manually afterwards. strides: An integer or tuple/list of 2 integers, specifying the strides of the convolution along the height and width. Can be a single integer to specify the same value for all spatial dimensions. Specifying any stride value != 1 is incompatible with specifying any `dilation_rate` value != 1. padding: one of `"valid"` or `"same"` (case-insensitive). Note that `"same"` is slightly inconsistent across backends with `strides` != 1, as described [here](https://github.com/keras-team/keras/pull/9473#issuecomment-372166860) dilation_rate: an integer or tuple/list of 2 integers, specifying the dilation rate to use for dilated convolution. Can be a single integer to specify the same value for all spatial dimensions. Currently, specifying any `dilation_rate` value != 1 is incompatible with specifying any stride value != 1. activation: Activation function to use (see [activations](../activations.md)). If you don't specify anything, no activation is applied (i.e. "linear" activation: `a(x) = x`). components: Numpy array, specifying predefined components. # Input shape List of two 4-dimensional tensors with shapes: `[(batch, rows, cols, channels), (number of components, rows, cols, channels)]`, where the first input is the input data feature tensor and the second input is the component feature tensor (the kernel) or a 4-dimensional tensor with shape: `(batch, rows, cols, channels)` if `components` is not 'None'. # Output shape 4-dimensional tensor with shape: `(batch, new_rows, new_cols, number of components)` if `n_replicas` == 1 or a 5-dimensional tensor with shape: `(batch, new_rows, new_cols, number of components // n_replicas, n_replicas)` otherwise. `rows` and `cols` values might have changed due to padding. """ def __init__(self, n_replicas=1, strides=(1, 1), padding='valid', dilation_rate=(1, 1), activation=lambda x: K.exp(-x), components=None, **kwargs): super(EuclideanDistance2D, self).__init__(**kwargs) self.n_replicas = n_replicas self.rank = 2 self.strides = conv_utils.normalize_tuple(strides, self.rank, 'strides') self.padding = conv_utils.normalize_padding(padding) self.dilation_rate = conv_utils.normalize_tuple(dilation_rate, self.rank, 'dilation_rate') self.components = components self.activation = activations.get(activation) if K.image_data_format() != 'channels_last': raise ValueError("The layer requires `K.image_data_format()` to " "be 'channels_last'.") def build(self, input_shape): # Only one tensor input given (no components input tensor) if not (isinstance(input_shape, list) and len(input_shape) > 1): # Component initializer should be given if self.components is None: raise ValueError("Input shape is 1, this requires components " "to be predefined by the `components` " "argument.") kernel_shape = self.components.shape else: _, kernel_shape = input_shape if kernel_shape[0] % self.n_replicas != 0: raise ValueError("The number of components must be a " "multiple of 'n_replicas'.") self.built = True def call(self, inputs, **kwargs): # Both components and input given if isinstance(inputs, list) and len(inputs) > 1: signals, kernel = inputs else: signals = inputs kernel = self.components.astype(K.floatx()) # move component_number to channel dimension kernel = K.permute_dimensions(kernel, (1, 2, 3, 0)) # normalize kernel kernel_norm = K.sum(K.square(kernel), (0, 1, 2), keepdims=True) # get norm of signals signals_norm = K.conv2d(K.square(signals), K.ones_like(kernel), strides=self.strides, padding=self.padding, data_format='channels_last', dilation_rate=self.dilation_rate) diss = kernel_norm \ - 2 * K.conv2d(signals, kernel, strides=self.strides, padding=self.padding, data_format='channels_last', dilation_rate=self.dilation_rate) \ + signals_norm if self.n_replicas != 1: shape = K.int_shape(diss) diss = K.reshape(diss, (-1, shape[1], shape[2], shape[3] // self.n_replicas, self.n_replicas)) return self.activation(diss) def compute_output_shape(self, input_shape): # Both components and input given if isinstance(input_shape, list) and len(input_shape) > 1: input_shape, kernel_shape = input_shape else: input_shape = input_shape kernel_shape = self.components.shape filters = kernel_shape[0] // self.n_replicas kernel_shape = kernel_shape[1:3] space = input_shape[1:-1] new_space = [] for i in range(len(space)): new_dim = conv_utils.conv_output_length( space[i], kernel_shape[i], padding=self.padding, stride=self.strides[i], dilation=self.dilation_rate[i]) new_space.append(new_dim) if self.n_replicas != 1: return (input_shape[0],) + tuple(new_space) + \ (filters, self.n_replicas) else: return (input_shape[0],) + tuple(new_space) + (filters,)
43.197368
88
0.575815
1,857
16,415
4.969844
0.135164
0.033156
0.025355
0.010402
0.911258
0.906707
0.906707
0.898039
0.898039
0.898039
0
0.012345
0.348584
16,415
379
89
43.311346
0.850743
0.428998
0
0.812834
0
0
0.063234
0.005194
0
0
0
0
0
1
0.048128
false
0
0.042781
0.005348
0.139037
0.005348
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
ac5d534335f0e0a8db9fe0921edac405472de433
23,391
py
Python
Scripts/plot_ValidationScores-LoopHyperparameters.py
zmlabe/predictGMSTrate
2bde4a106de1988d772f15a52d283d23bb7128f4
[ "MIT" ]
2
2022-01-20T20:20:04.000Z
2022-02-21T12:33:37.000Z
Scripts/plot_ValidationScores-LoopHyperparameters.py
zmlabe/predictGMSTrate
2bde4a106de1988d772f15a52d283d23bb7128f4
[ "MIT" ]
null
null
null
Scripts/plot_ValidationScores-LoopHyperparameters.py
zmlabe/predictGMSTrate
2bde4a106de1988d772f15a52d283d23bb7128f4
[ "MIT" ]
3
2022-01-19T16:25:37.000Z
2022-03-22T13:25:00.000Z
""" Create plots to show validation scores for different hyperparameters Author : Zachary M. Labe Date : 28 September 2021 Version : 2 (mostly for testing) """ ### Import packages import sys import matplotlib.pyplot as plt import matplotlib.colors as c import numpy as np ### Plotting defaults plt.rc('text',usetex=True) plt.rc('font',**{'family':'sans-serif','sans-serif':['Avant Garde']}) def adjust_spines(ax, spines): for loc, spine in ax.spines.items(): if loc in spines: spine.set_position(('outward', 5)) else: spine.set_color('none') if 'left' in spines: ax.yaxis.set_ticks_position('left') else: ax.yaxis.set_ticks([]) if 'bottom' in spines: ax.xaxis.set_ticks_position('bottom') else: ax.xaxis.set_ticks([]) ### Hyperparamters for files of the ANN model rm_ensemble_mean = True COUNTER = 5 hiddenall = [[10],[30],[10,10],[30,30],[10,10,10],[30,30,30]] ridgePenaltyall = [0.01,0.1,0.5,1] letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m"] combinations = COUNTER * len(hiddenall) * len(ridgePenaltyall) directorydata = '/Users/zlabe/Documents/Research/GmstTrendPrediction/Data/LoopHyperparameters/' directoryfigure = '/Users/zlabe/Desktop/GmstTrendPrediction/ANN_v2/Scores/' ### Read in hyperparameters seeds = np.load(directorydata + 'Metadata_LoopResultsfor_ANNv2_OHC100_hiatus_EnsembleMeanRemoved_LoopHyper.npz') random_segment_seedq = seeds['random_segment_seedall'] random_network_seedq = seeds['random_network_seedall'] savenameq = seeds['savenamesall'] accval = np.empty((combinations)) precval = np.empty((combinations)) recallval = np.empty((combinations)) f1val = np.empty((combinations)) for lo in range(combinations): if rm_ensemble_mean == True: vari_predict = ['OHC100'] fac = 0.7 random_segment_seed = random_segment_seedq[lo] random_network_seed = random_network_seedq[lo] hidden = [30,30] n_epochs = 500 batch_size = 128 lr_here = 0.001 ridgePenalty = 0.5 actFun = 'relu' fractWeight = np.arange(0.1,1.2,0.1) yearsall = np.arange(1990,2099+1,1) else: print(ValueError('SOMETHING IS WRONG WITH DATA PROCESSING!')) sys.exit() ### Naming conventions for files savename = savenameq[lo] scores = np.load(directorydata + savename + '_SCORES_LoopHyper.npz') accval[lo] = scores['accval'] precval[lo] = scores['precval'] recallval[lo] = scores['recallval'] f1val[lo] = scores['f1_val'] ### Reshape arrays for plotting acc_re = accval.reshape(len(hiddenall),len(ridgePenaltyall),COUNTER) * 100. pre_re = precval.reshape(len(hiddenall),len(ridgePenaltyall),COUNTER) * 100. rec_re = recallval.reshape(len(hiddenall),len(ridgePenaltyall),COUNTER) * 100. f1s_re = f1val.reshape(len(hiddenall),len(ridgePenaltyall),COUNTER) * 100. # ### First set of plots for layer and all l2 # acc_layer = acc_re.reshape(len(hiddenall),len(ridgePenaltyall)*COUNTER) # pre_layer = pre_re.reshape(len(hiddenall),len(ridgePenaltyall)*COUNTER) # rec_layer = rec_re.reshape(len(hiddenall),len(ridgePenaltyall)*COUNTER) # f1s_layer = f1s_re.reshape(len(hiddenall),len(ridgePenaltyall)*COUNTER) ############################################################################### ############################################################################### ############################################################################### ### Graph for accuracy labels = [r'\textbf{1-LAYER$_{10}$}',r'\textbf{1-LAYER$_{30}$}',r'\textbf{2-LAYERS$_{10}$}', r'\textbf{2-LAYERS$_{30}$}',r'\textbf{3-LAYERS$_{10}$}',r'\textbf{3-LAYERS$_{30}$}'] fig = plt.figure() for plo in range(len(hiddenall)): ax = plt.subplot(2,3,plo+1) plotdata = acc_re[plo].transpose() adjust_spines(ax, ['left', 'bottom']) ax.spines['top'].set_color('none') ax.spines['right'].set_color('none') ax.spines['left'].set_color('dimgrey') ax.spines['bottom'].set_color('none') ax.spines['left'].set_linewidth(2) ax.tick_params('both',length=4,width=2,which='major',color='dimgrey') ax.tick_params(axis="x",which="both",bottom = False,top=False, labelbottom=False) ax.yaxis.grid(zorder=1,color='darkgrey',alpha=0.7,clip_on=False,linewidth=0.5) def set_box_color(bp, color): plt.setp(bp['boxes'],color=color) plt.setp(bp['whiskers'], color=color,linewidth=1.5) plt.setp(bp['caps'], color='w',alpha=0) plt.setp(bp['medians'], color='w',linewidth=1) positionsq = np.arange(len(ridgePenaltyall)) bpl = plt.boxplot(plotdata,positions=positionsq,widths=0.6, patch_artist=True,sym='') # Modify boxes cp= 'maroon' set_box_color(bpl,cp) plt.plot([], c=cp, label=r'\textbf{ACCURACY}',clip_on=False) for i in range(plotdata.shape[1]): y = plotdata[:,i] x = np.random.normal(positionsq[i], 0.04, size=len(y)) plt.plot(x, y,color='teal', alpha=0.5,zorder=10,marker='.',linewidth=0,markersize=5,markeredgewidth=0,clip_on=False) if any([plo==0,plo==3]): plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([80,100]) else: plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([80,100]) ax.axes.yaxis.set_ticklabels([]) if plo==3: plt.text(-0.35,78,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(1.05,78,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(2.4,78,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='k', ha='right',va='center') plt.text(3.27,78,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') elif any([plo==4,plo==5]): plt.text(-0.35,78,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(1.05,78,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(2.4,78,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(3.27,78,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(1.65,98.5,r'%s' % labels[plo],fontsize=11,color='dimgrey', ha='center',va='center') plt.text(3.3,100.7,r'\textbf{[%s]}' % letters[plo],color='k',fontsize=6) if any([plo==0,plo==3]): plt.ylabel(r'\textbf{Accuracy [\%]}',color='k',fontsize=7) if rm_ensemble_mean == True: plt.savefig(directoryfigure + 'AccracyScores-LoopHyperparameters_Hiatus_EDA-v2_rmENSEMBLEmean.png',dpi=300) else: plt.savefig(directoryfigure + 'AccuracyScores-LoopHyperparameters_Hiatus_EDA-v2.png',dpi=300) ############################################################################### ############################################################################### ############################################################################### ### Graph for precision fig = plt.figure() for plo in range(len(hiddenall)): ax = plt.subplot(2,3,plo+1) plotdata = pre_re[plo].transpose() adjust_spines(ax, ['left', 'bottom']) ax.spines['top'].set_color('none') ax.spines['right'].set_color('none') ax.spines['left'].set_color('dimgrey') ax.spines['bottom'].set_color('none') ax.spines['left'].set_linewidth(2) ax.tick_params('both',length=4,width=2,which='major',color='dimgrey') ax.tick_params(axis="x",which="both",bottom = False,top=False, labelbottom=False) ax.yaxis.grid(zorder=1,color='darkgrey',alpha=0.7,clip_on=False,linewidth=0.5) def set_box_color(bp, color): plt.setp(bp['boxes'],color=color) plt.setp(bp['whiskers'], color=color,linewidth=1.5) plt.setp(bp['caps'], color='w',alpha=0) plt.setp(bp['medians'], color='w',linewidth=1) positionsq = np.arange(len(ridgePenaltyall)) bpl = plt.boxplot(plotdata,positions=positionsq,widths=0.6, patch_artist=True,sym='') # Modify boxes cp= 'maroon' set_box_color(bpl,cp) plt.plot([], c=cp, label=r'\textbf{PRECISION}',clip_on=False) for i in range(plotdata.shape[1]): y = plotdata[:,i] x = np.random.normal(positionsq[i], 0.04, size=len(y)) plt.plot(x, y,color='teal', alpha=0.5,zorder=10,marker='.',linewidth=0,markersize=5,markeredgewidth=0,clip_on=False) if any([plo==0,plo==3]): plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([0,60]) else: plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([0,60]) ax.axes.yaxis.set_ticklabels([]) if plo==3: plt.text(-0.35,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(1.05,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(2.4,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='k', ha='right',va='center') plt.text(3.27,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') elif any([plo==4,plo==5]): plt.text(-0.35,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(1.05,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(2.4,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(3.27,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(1.65,55.3,r'%s' % labels[plo],fontsize=11,color='dimgrey', ha='center',va='center') plt.text(3.3,62,r'\textbf{[%s]}' % letters[plo],color='k',fontsize=6) if any([plo==0,plo==3]): plt.ylabel(r'\textbf{Precision [\%]}',color='k',fontsize=7) if rm_ensemble_mean == True: plt.savefig(directoryfigure + 'PrecisionScores-LoopHyperparameters_Hiatus_EDA-v2_rmENSEMBLEmean.png',dpi=300) else: plt.savefig(directoryfigure + 'PrecisionScores-LoopHyperparameters_Hiatus_EDA-v2.png',dpi=300) ############################################################################### ############################################################################### ############################################################################### ### Graph for recall fig = plt.figure() for plo in range(len(hiddenall)): ax = plt.subplot(2,3,plo+1) plotdata = rec_re[plo].transpose() adjust_spines(ax, ['left', 'bottom']) ax.spines['top'].set_color('none') ax.spines['right'].set_color('none') ax.spines['left'].set_color('dimgrey') ax.spines['bottom'].set_color('none') ax.spines['left'].set_linewidth(2) ax.tick_params('both',length=4,width=2,which='major',color='dimgrey') ax.tick_params(axis="x",which="both",bottom = False,top=False, labelbottom=False) ax.yaxis.grid(zorder=1,color='darkgrey',alpha=0.7,clip_on=False,linewidth=0.5) def set_box_color(bp, color): plt.setp(bp['boxes'],color=color) plt.setp(bp['whiskers'], color=color,linewidth=1.5) plt.setp(bp['caps'], color='w',alpha=0) plt.setp(bp['medians'], color='w',linewidth=1) positionsq = np.arange(len(ridgePenaltyall)) bpl = plt.boxplot(plotdata,positions=positionsq,widths=0.6, patch_artist=True,sym='') # Modify boxes cp= 'maroon' set_box_color(bpl,cp) plt.plot([], c=cp, label=r'\textbf{RECALL}',clip_on=False) for i in range(plotdata.shape[1]): y = plotdata[:,i] x = np.random.normal(positionsq[i], 0.04, size=len(y)) plt.plot(x, y,color='teal', alpha=0.5,zorder=10,marker='.',linewidth=0,markersize=5,markeredgewidth=0,clip_on=False) if any([plo==0,plo==3]): plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([0,60]) else: plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([0,60]) ax.axes.yaxis.set_ticklabels([]) if plo==3: plt.text(-0.35,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(1.05,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(2.4,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='k', ha='right',va='center') plt.text(3.27,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') elif any([plo==4,plo==5]): plt.text(-0.35,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(1.05,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(2.4,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(3.27,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(1.65,55.3,r'%s' % labels[plo],fontsize=11,color='dimgrey', ha='center',va='center') plt.text(3.3,62,r'\textbf{[%s]}' % letters[plo],color='k',fontsize=6) if any([plo==0,plo==3]): plt.ylabel(r'\textbf{Recall [\%]}',color='k',fontsize=7) if rm_ensemble_mean == True: plt.savefig(directoryfigure + 'RecallScores-LoopHyperparameters_Hiatus_EDA-v2_rmENSEMBLEmean.png',dpi=300) else: plt.savefig(directoryfigure + 'RecallScores-LoopHyperparameters_Hiatus_EDA-v2.png',dpi=300) ############################################################################### ############################################################################### ############################################################################### ### Graph for f1-score fig = plt.figure() for plo in range(len(hiddenall)): ax = plt.subplot(2,3,plo+1) plotdata = f1s_re[plo].transpose() adjust_spines(ax, ['left', 'bottom']) ax.spines['top'].set_color('none') ax.spines['right'].set_color('none') ax.spines['left'].set_color('dimgrey') ax.spines['bottom'].set_color('none') ax.spines['left'].set_linewidth(2) ax.tick_params('both',length=4,width=2,which='major',color='dimgrey') ax.tick_params(axis="x",which="both",bottom = False,top=False, labelbottom=False) ax.yaxis.grid(zorder=1,color='darkgrey',alpha=0.7,clip_on=False,linewidth=0.5) def set_box_color(bp, color): plt.setp(bp['boxes'],color=color) plt.setp(bp['whiskers'], color=color,linewidth=1.5) plt.setp(bp['caps'], color='w',alpha=0) plt.setp(bp['medians'], color='w',linewidth=1) positionsq = np.arange(len(ridgePenaltyall)) bpl = plt.boxplot(plotdata,positions=positionsq,widths=0.6, patch_artist=True,sym='') # Modify boxes cp= 'maroon' set_box_color(bpl,cp) plt.plot([], c=cp, label=r'\textbf{F1-SCORE}',clip_on=False) for i in range(plotdata.shape[1]): y = plotdata[:,i] x = np.random.normal(positionsq[i], 0.04, size=len(y)) plt.plot(x, y,color='teal', alpha=0.5,zorder=10,marker='.',linewidth=0,markersize=5,markeredgewidth=0,clip_on=False) if any([plo==0,plo==3]): plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([0,60]) else: plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([0,60]) ax.axes.yaxis.set_ticklabels([]) if plo==3: plt.text(-0.35,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(1.05,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(2.4,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='k', ha='right',va='center') plt.text(3.27,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') elif any([plo==4,plo==5]): plt.text(-0.35,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(1.05,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(2.4,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(3.27,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(1.65,55.3,r'%s' % labels[plo],fontsize=11,color='dimgrey', ha='center',va='center') plt.text(3.3,62,r'\textbf{[%s]}' % letters[plo],color='k',fontsize=6) if any([plo==0,plo==3]): plt.ylabel(r'\textbf{F1-Score [\%]}',color='k',fontsize=7) if rm_ensemble_mean == True: plt.savefig(directoryfigure + 'F1Scores-LoopHyperparameters_Hiatus_EDA-v2_rmENSEMBLEmean.png',dpi=300) else: plt.savefig(directoryfigure + 'F1Scores-LoopHyperparameters_Hiatus_EDA-v2.png',dpi=300) ############################################################################### ############################################################################### ############################################################################### ### Graph for combining recall and precision fig = plt.figure() for plo in range(len(hiddenall)): ax = plt.subplot(2,3,plo+1) plotdata1 = pre_re[plo].transpose() plotdata2 = rec_re[plo].transpose() adjust_spines(ax, ['left', 'bottom']) ax.spines['top'].set_color('none') ax.spines['right'].set_color('none') ax.spines['left'].set_color('dimgrey') ax.spines['bottom'].set_color('none') ax.spines['left'].set_linewidth(2) ax.tick_params('both',length=4,width=2,which='major',color='dimgrey') ax.tick_params(axis="x",which="both",bottom = False,top=False, labelbottom=False) ax.yaxis.grid(zorder=1,color='darkgrey',alpha=0.7,clip_on=False,linewidth=0.5) def set_box_color(bp, color): plt.setp(bp['boxes'],color=color) plt.setp(bp['whiskers'], color=color,linewidth=1.5) plt.setp(bp['caps'], color='w',alpha=0) plt.setp(bp['medians'], color='w',linewidth=1) positionspre = np.array(range(len(ridgePenaltyall)))*2.0-0.3 positionspost = np.array(range(len(ridgePenaltyall)))*2.0+0.3 bpl = plt.boxplot(plotdata1,positions=positionspre,widths=0.5, patch_artist=True,sym='') bpr = plt.boxplot(plotdata2,positions=positionspost, widths=0.5, patch_artist=True,sym='') # Modify boxes cpree = 'deepskyblue' cpost = 'indianred' set_box_color(bpl,cpree) set_box_color(bpr,cpost) plt.plot([], c=cpree, label=r'\textbf{PRECISION}') plt.plot([], c=cpost, label=r'\textbf{RECALL}') if plo == 2: l = plt.legend(shadow=False,fontsize=11,loc='upper center', bbox_to_anchor=(-0.77,1.34),fancybox=True,ncol=4,frameon=False, handlelength=5,handletextpad=1) for line,text in zip(l.get_lines(), l.get_texts()): text.set_color(line.get_color()) for i in range(len(ridgePenaltyall)): y = plotdata1[:,i] x = np.random.normal(positionspre[i], 0.04, size=len(y)) plt.plot(x, y,color='darkblue', alpha=0.5,zorder=10,marker='.',linewidth=0,markersize=5,markeredgewidth=0) for i in range(len(ridgePenaltyall)): y = plotdata2[:,i] x = np.random.normal(positionspost[i], 0.04, size=len(y)) plt.plot(x, y,color='darkred', alpha=0.5,zorder=10,marker='.',linewidth=0,markersize=5,markeredgewidth=0) if any([plo==0,plo==3]): plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([0,60]) else: plt.yticks(np.arange(0,101,10),list(map(str,np.round(np.arange(0,101,10),2))), fontsize=6) plt.ylim([0,60]) ax.axes.yaxis.set_ticklabels([]) if plo==3: plt.text(-0.7,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(2.1,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(4.7,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='k', ha='right',va='center') plt.text(6.5,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') elif any([plo==4,plo==5]): plt.text(-0.7,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[0],fontsize=5,color='dimgrey', ha='left',va='center') plt.text(2.1,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[1],fontsize=5,color='dimgrey', ha='center',va='center') plt.text(4.7,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[2],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(6.5,-6,r'\textbf{L$_{2}$=%s}' % ridgePenaltyall[3],fontsize=5,color='dimgrey', ha='right',va='center') plt.text(3.35,55.3,r'%s' % labels[plo],fontsize=11,color='dimgrey', ha='center',va='center') plt.text(6.4,62,r'\textbf{[%s]}' % letters[plo],color='k',fontsize=6) if any([plo==0,plo==3]): plt.ylabel(r'\textbf{Scores [\%]}',color='k',fontsize=7) if rm_ensemble_mean == True: plt.savefig(directoryfigure + 'CombinedScores-LoopHyperparameters_Hiatus_EDA-v2_rmENSEMBLEmean.png',dpi=300) else: plt.savefig(directoryfigure + 'CombinedScores-LoopHyperparameters_Hiatus_EDA-v2.png',dpi=300)
44.050847
124
0.567141
3,205
23,391
4.066147
0.099532
0.033303
0.024555
0.027624
0.801719
0.797652
0.796808
0.758978
0.749156
0.729512
0
0.047413
0.191185
23,391
531
125
44.050847
0.641419
0.035655
0
0.717445
0
0
0.170497
0.046717
0
0
0
0
0
1
0.014742
false
0
0.009828
0
0.02457
0.002457
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
ac77020c6724abf8a3f25521ee22539e33ee6b6b
14,365
py
Python
zeping_jobs.py
cinjon/ml-capsules-inverted-attention-routing
978b0f58eba1007bcef0b6cb045f3d2040f76a31
[ "AML" ]
null
null
null
zeping_jobs.py
cinjon/ml-capsules-inverted-attention-routing
978b0f58eba1007bcef0b6cb045f3d2040f76a31
[ "AML" ]
null
null
null
zeping_jobs.py
cinjon/ml-capsules-inverted-attention-routing
978b0f58eba1007bcef0b6cb045f3d2040f76a31
[ "AML" ]
null
null
null
"""Run the jobs in this file. Example running jobs: python zeping_jobs.py When you want to add more jobs just put them below and MAKE SURE that all of the do_jobs for the ones above are False. """ from zeping_run_on_cluster import do_jobarray email = 'zz2332@nyu.edu' code_directory = '/misc/kcgscratch1/ChoGroup/resnick/spaceofmotion/zeping/capsules/ml-capsules-inverted-attention-routing' def run(find_counter=None): job = { 'results_dir': '/misc/kcgscratch1/ChoGroup/resnick/spaceofmotion/zeping/capsules/results', 'data_root': '/misc/kcgscratch1/ChoGroup/resnick/spaceofmotion/zeping/capsules/data/MNIST', 'affnist_data_root': '/misc/kcgscratch1/ChoGroup/resnick/spaceofmotion/zeping/capsules/data/affNIST' } # Padded MNIST (40x40) NCE if find_counter == 0: num_gpus = 4 time = 24 job.update({ 'name': '2020.05.15', # 'optimizer': 'adam', 'config': 'resnet_backbone_movingmnist2_20ccgray_img40', 'criterion': 'nceprobs_selective', 'triangle_lambda': 1, # 'num_routing': 1, 'dataset': 'MovingMNist2', 'batch_size': 32, 'num_gpus': num_gpus, 'time': time, # 'num_workers': 2, 'epoch': 500, 'schedule_milestones': '10,30', 'use_scheduler': True, 'weight_decay': 0.0005, 'lr': 0.0003, 'schedule_gamma': 0.3, 'no_colored': True, 'num_mnist_digits': 1, 'fix_moving_mnist_center': True, # 'do_mnist_test_every': 1, # 'do_mnist_test_after': -1, 'do_tsne_test_every': 1, 'do_tsne_test_after': -1, 'use_presence_probs': True, 'lambda_sparse_presence': 0.3, 'use_cuda_tsne': False, 'presence_loss_type': 'l2norm', 'fix_moving_mnist_angle': False, 'triangle_margin_lambda': 1.0, 'margin_gamma2': 0.1, 'triangle_cos_lambda': 1.0, 'no_use_angle_loss': True, 'no_use_hinge_loss': True, 'num_output_classes': 10, 'lambda_between_entropy': 3.0, 'lambda_within_entropy': 1.0, 'presence_diffcos_lambda': 10.0, 'use_class_sampler': False, 'no_use_nce_loss': True, 'use_nce_probs': True, 'use_simclr_xforms': False, 'use_simclr_nce': True, 'step_length': 0., 'use_rand_presence_noise': True, 'nce_presence_temperature': 0.1, 'use_diff_class_digit': True, 'nceprobs_selection': 'ncelinear_none', 'image_size': 40, # 28 'no_hit_side': True, # 'center_discrete': False, 'discrete_angle': True, 'nceprobs_selection_temperature': 1.0, 'simclr_selection_strategy': 'default', 'ncelinear_anchorselect': '21', # 'center_discrete_count': 3, 'counter': find_counter, 'seed': 0, 'mnist_padding': True, }) # do_jobarray(email, num_gpus, counter, job, time) return find_counter, job # Selective Reorder elif find_counter == 1: num_gpus = 1 time = 24 job.update({ 'name': '2020.05.15', 'config': 'resnet_backbone_movingmnist2_20ccgray', 'criterion': 'selective_reorder', 'num_gpus': num_gpus, 'time': time, 'do_tsne_test_every': 1, 'do_tsne_test_after': -1, 'nceprobs_selection': 'ncelinear_maxfirst', 'presence_loss_type': 'sigmoid_only', 'batch_size': 8, 'use_diff_class_digit': True, 'lr': 1e-4, 'weight_decay': 5e-4, 'use_presence_probs': True, 'nceprobs_selection': 'ncelinear_maxfirst', 'presence_loss_type': 'sigmoid_only', 'use_nce_probs': True, 'use_simclr_nce': True, 'no_colored': True, 'fix_moving_mnist_center': True, 'num_mnist_digits': 1, 'counter': find_counter, 'use_cuda_tsne': True, 'tsne_batch_size': 32, }) return find_counter, job # Fixed Center MNIST NCE elif find_counter == 2: num_gpus = 4 time = 48 job.update({ 'name': '2020.05.16', # 'optimizer': 'adam', 'config': 'resnet_backbone_movingmnist2_20ccgray_img40', 'criterion': 'nceprobs_selective', 'triangle_lambda': 1, # 'num_routing': 1, 'dataset': 'MovingMNist2', 'batch_size': 32, 'num_gpus': num_gpus, 'time': time, # 'num_workers': 2, 'epoch': 500, 'schedule_milestones': '10,30', 'use_scheduler': True, 'weight_decay': 0.0005, 'lr': 0.0003, 'schedule_gamma': 0.3, 'no_colored': True, 'num_mnist_digits': 1, 'fix_moving_mnist_center': True, # 'do_mnist_test_every': 1, # 'do_mnist_test_after': -1, 'do_tsne_test_every': 1, 'do_tsne_test_after': -1, 'use_presence_probs': True, 'lambda_sparse_presence': 0.3, 'use_cuda_tsne': False, 'presence_loss_type': 'l2norm', 'fix_moving_mnist_angle': False, 'triangle_margin_lambda': 1.0, 'margin_gamma2': 0.1, 'triangle_cos_lambda': 1.0, 'no_use_angle_loss': True, 'no_use_hinge_floss': True, 'num_output_classes': 10, 'lambda_between_entropy': 3.0, 'lambda_within_entropy': 1.0, 'presence_diffcos_lambda': 10.0, 'use_class_sampler': False, 'no_use_nce_loss': True, 'use_nce_probs': True, 'use_simclr_xforms': False, 'use_simclr_nce': True, 'step_length': 0., 'use_rand_presence_noise': True, 'nce_presence_temperature': 0.1, 'use_diff_class_digit': True, 'nceprobs_selection': 'ncelinear_none', 'image_size': 40, # 28 'no_hit_side': True, # 'center_discrete': False, 'discrete_angle': True, 'nceprobs_selection_temperature': 1.0, 'simclr_selection_strategy': 'default', 'ncelinear_anchorselect': '21', # 'center_discrete_count': 3, 'counter': find_counter, 'seed': 0, 'mnist_padding': False, }) return find_counter, job # Padded MNIST (34x34) NCE with 0.1 presence_temperature elif find_counter == 3: num_gpus = 4 time = 24 job.update({ 'name': '2020.05.16', # 'optimizer': 'adam', 'config': 'resnet_backbone_movingmnist2_20ccgray_img34', 'criterion': 'nceprobs_selective', 'triangle_lambda': 1, # 'num_routing': 1, 'dataset': 'MovingMNist2', 'batch_size': 32, 'num_gpus': num_gpus, 'time': time, # 'num_workers': 2, 'epoch': 500, 'schedule_milestones': '10,30', 'use_scheduler': True, 'weight_decay': 0.0005, 'lr': 0.0003, 'schedule_gamma': 0.3, 'no_colored': True, 'num_mnist_digits': 1, 'fix_moving_mnist_center': True, # 'do_mnist_test_every': 1, # 'do_mnist_test_after': -1, 'do_tsne_test_every': 1, 'do_tsne_test_after': -1, 'use_presence_probs': True, 'lambda_sparse_presence': 0.3, 'use_cuda_tsne': False, 'presence_loss_type': 'l2norm', 'fix_moving_mnist_angle': False, 'triangle_margin_lambda': 1.0, 'margin_gamma2': 0.1, 'triangle_cos_lambda': 1.0, 'no_use_angle_loss': True, 'no_use_hinge_loss': True, 'num_output_classes': 10, 'lambda_between_entropy': 3.0, 'lambda_within_entropy': 1.0, 'presence_diffcos_lambda': 10.0, 'use_class_sampler': False, 'no_use_nce_loss': True, 'use_nce_probs': True, 'use_simclr_xforms': False, 'use_simclr_nce': True, 'step_length': 0., 'use_rand_presence_noise': True, 'nce_presence_temperature': 0.1, 'use_diff_class_digit': True, 'nceprobs_selection': 'ncelinear_none', 'image_size': 34, # 40, 'no_hit_side': True, # 'center_discrete': False, 'discrete_angle': True, 'nceprobs_selection_temperature': 1.0, 'simclr_selection_strategy': 'default', 'ncelinear_anchorselect': '21', # 'center_discrete_count': 3, 'counter': find_counter, 'seed': 0, 'mnist_padding': True, }) return find_counter, job # Padded MNIST (34x34) NCE with 0.01 presence_temperature elif find_counter == 4: num_gpus = 4 time = 24 job.update({ 'name': '2020.05.16', # 'optimizer': 'adam', 'config': 'resnet_backbone_movingmnist2_20ccgray_img34', 'criterion': 'nceprobs_selective', 'triangle_lambda': 1, # 'num_routing': 1, 'dataset': 'MovingMNist2', 'batch_size': 32, 'num_gpus': num_gpus, 'time': time, # 'num_workers': 2, 'epoch': 500, 'schedule_milestones': '10,30', 'use_scheduler': True, 'weight_decay': 0.0005, 'lr': 0.0003, 'schedule_gamma': 0.3, 'no_colored': True, 'num_mnist_digits': 1, 'fix_moving_mnist_center': True, # 'do_mnist_test_every': 1, # 'do_mnist_test_after': -1, 'do_tsne_test_every': 1, 'do_tsne_test_after': -1, 'use_presence_probs': True, 'lambda_sparse_presence': 0.3, 'use_cuda_tsne': False, 'presence_loss_type': 'l2norm', 'fix_moving_mnist_angle': False, 'triangle_margin_lambda': 1.0, 'margin_gamma2': 0.1, 'triangle_cos_lambda': 1.0, 'no_use_angle_loss': True, 'no_use_hinge_loss': True, 'num_output_classes': 10, 'lambda_between_entropy': 3.0, 'lambda_within_entropy': 1.0, 'presence_diffcos_lambda': 10.0, 'use_class_sampler': False, 'no_use_nce_loss': True, 'use_nce_probs': True, 'use_simclr_xforms': False, 'use_simclr_nce': True, 'step_length': 0., 'use_rand_presence_noise': True, 'nce_presence_temperature': 0.01, 'use_diff_class_digit': True, 'nceprobs_selection': 'ncelinear_none', 'image_size': 34, # 40, 'no_hit_side': True, # 'center_discrete': False, 'discrete_angle': True, 'nceprobs_selection_temperature': 1.0, 'simclr_selection_strategy': 'default', 'ncelinear_anchorselect': '21', # 'center_discrete_count': 3, 'counter': find_counter, 'seed': 0, 'mnist_padding': True, }) return find_counter, job # Padded MNIST (40x40) NCE with 0.01 nce_presence_temperature elif find_counter == 5: num_gpus = 4 time = 24 job.update({ 'name': '2020.05.15', # 'optimizer': 'adam', 'config': 'resnet_backbone_movingmnist2_20ccgray_img40', 'criterion': 'nceprobs_selective', 'triangle_lambda': 1, # 'num_routing': 1, 'dataset': 'MovingMNist2', 'batch_size': 32, 'num_gpus': num_gpus, 'time': time, # 'num_workers': 2, 'epoch': 500, 'schedule_milestones': '10,30', 'use_scheduler': True, 'weight_decay': 0.0005, 'lr': 0.0003, 'schedule_gamma': 0.3, 'no_colored': True, 'num_mnist_digits': 1, 'fix_moving_mnist_center': True, # 'do_mnist_test_every': 1, # 'do_mnist_test_after': -1, 'do_tsne_test_every': 1, 'do_tsne_test_after': -1, 'use_presence_probs': True, 'lambda_sparse_presence': 0.3, 'use_cuda_tsne': False, 'presence_loss_type': 'l2norm', 'fix_moving_mnist_angle': False, 'triangle_margin_lambda': 1.0, 'margin_gamma2': 0.1, 'triangle_cos_lambda': 1.0, 'no_use_angle_loss': True, 'no_use_hinge_loss': True, 'num_output_classes': 10, 'lambda_between_entropy': 3.0, 'lambda_within_entropy': 1.0, 'presence_diffcos_lambda': 10.0, 'use_class_sampler': False, 'no_use_nce_loss': True, 'use_nce_probs': True, 'use_simclr_xforms': False, 'use_simclr_nce': True, 'step_length': 0., 'use_rand_presence_noise': True, 'nce_presence_temperature': 0.01, 'use_diff_class_digit': True, 'nceprobs_selection': 'ncelinear_none', 'image_size': 40, # 28 'no_hit_side': True, # 'center_discrete': False, 'discrete_angle': True, 'nceprobs_selection_temperature': 1.0, 'simclr_selection_strategy': 'default', 'ncelinear_anchorselect': '21', # 'center_discrete_count': 3, 'counter': find_counter, 'seed': 0, 'mnist_padding': True, }) return find_counter, job else: print('Counter not found') return None, None if __name__ == '__main__': run()
36.092965
122
0.527184
1,513
14,365
4.61996
0.128222
0.005722
0.017167
0.018884
0.89485
0.865951
0.859371
0.843062
0.839199
0.821745
0
0.048907
0.353777
14,365
397
123
36.183879
0.704083
0.091612
0
0.907186
0
0.002994
0.41205
0.153663
0
0
0
0
0
1
0.002994
false
0
0.002994
0
0.026946
0.002994
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
ce3802a183acac5cdf26d7c89899eeed50a03be0
3,019
py
Python
problems/tests/test_subsets.py
vinta/fuck-coding-interviews
915ff55963430e81134a35f65f511e5684c52f11
[ "MIT" ]
590
2020-06-17T08:26:47.000Z
2022-03-30T18:47:32.000Z
problems/tests/test_subsets.py
parvathirajan/fuck-coding-interviews
915ff55963430e81134a35f65f511e5684c52f11
[ "MIT" ]
12
2020-07-14T09:24:32.000Z
2020-11-02T03:43:47.000Z
problems/tests/test_subsets.py
parvathirajan/fuck-coding-interviews
915ff55963430e81134a35f65f511e5684c52f11
[ "MIT" ]
75
2020-07-29T06:50:13.000Z
2022-03-13T16:14:57.000Z
# coding: utf-8 import unittest from problems.subsets import Solution from problems.subsets import Solution2 from problems.subsets import Solution3 class TestCase(unittest.TestCase): def setUp(self): self.solution = Solution() def test(self): nums = [1, 2, 3] expected = [ [], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3], ] self.assertCountEqual(self.solution.subsets(nums), expected) def test2(self): nums = [] expected = [ [], ] self.assertCountEqual(self.solution.subsets(nums), expected) def test3(self): nums = [1] expected = [ [], [1, ], ] self.assertCountEqual(self.solution.subsets(nums), expected) def test4(self): nums = [1, 2] expected = [ [], [1, ], [2, ], [1, 2], ] self.assertCountEqual(self.solution.subsets(nums), expected) class TestCase2(unittest.TestCase): def setUp(self): self.solution = Solution2() def test(self): nums = [1, 2, 3] expected = [ [], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3], ] self.assertCountEqual(self.solution.subsets(nums), expected) def test2(self): nums = [] expected = [ [], ] self.assertCountEqual(self.solution.subsets(nums), expected) def test3(self): nums = [1] expected = [ [], [1, ], ] self.assertCountEqual(self.solution.subsets(nums), expected) def test4(self): nums = [1, 2] expected = [ [], [1, ], [2, ], [1, 2], ] self.assertCountEqual(self.solution.subsets(nums), expected) class TestCase3(unittest.TestCase): def setUp(self): self.solution = Solution3() def test(self): nums = [1, 2, 3] expected = [ [], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3], ] self.assertCountEqual(self.solution.subsets(nums), expected) def test2(self): nums = [] expected = [ [], ] self.assertCountEqual(self.solution.subsets(nums), expected) def test3(self): nums = [1] expected = [ [], [1, ], ] self.assertCountEqual(self.solution.subsets(nums), expected) def test4(self): nums = [1, 2] expected = [ [], [1, ], [2, ], [1, 2], ] self.assertCountEqual(self.solution.subsets(nums), expected) if __name__ == '__main__': unittest.main()
21.111888
68
0.433256
268
3,019
4.850746
0.115672
0.032308
0.221538
0.295385
0.843077
0.843077
0.843077
0.750769
0.750769
0.750769
0
0.049133
0.426963
3,019
142
69
21.260563
0.702312
0.004306
0
0.8
0
0
0.002663
0
0
0
0
0
0.1
1
0.125
false
0
0.033333
0
0.183333
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
cbeab346d7c8b88f3aa45b708b6ddde82cdf4ab1
200
py
Python
KutanSpeech/__init__.py
kaankutan/kutanspeech
62cf2cba0e457f2a9ae7bc9807db5dd23e9470bc
[ "MIT" ]
1
2020-08-20T12:18:27.000Z
2020-08-20T12:18:27.000Z
KutanSpeech/__init__.py
kaankutan/kutanspeech
62cf2cba0e457f2a9ae7bc9807db5dd23e9470bc
[ "MIT" ]
null
null
null
KutanSpeech/__init__.py
kaankutan/kutanspeech
62cf2cba0e457f2a9ae7bc9807db5dd23e9470bc
[ "MIT" ]
null
null
null
from KutanSpeech.KutanSpeech import KutanSpeech from KutanSpeech.KutanSpeech import TimeoutError from KutanSpeech.KutanSpeech import UnknownValueError from KutanSpeech.KutanSpeech import RequestError
40
53
0.9
20
200
9
0.3
0.333333
0.577778
0.711111
0
0
0
0
0
0
0
0
0.08
200
4
54
50
0.978261
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
02062589924e1794c7547e4597e98722033b7de2
44,898
py
Python
tests/unit/test/plan/test_plan_execution_errors.py
zetahernandez/pysoa
006e55ba877196a42c64f2ff453583d366082d55
[ "Apache-2.0" ]
null
null
null
tests/unit/test/plan/test_plan_execution_errors.py
zetahernandez/pysoa
006e55ba877196a42c64f2ff453583d366082d55
[ "Apache-2.0" ]
null
null
null
tests/unit/test/plan/test_plan_execution_errors.py
zetahernandez/pysoa
006e55ba877196a42c64f2ff453583d366082d55
[ "Apache-2.0" ]
null
null
null
from __future__ import ( absolute_import, unicode_literals, ) import os import unittest from pysoa.test.compatibility import mock from pysoa.test.plan import ServicePlanTestCase from pysoa.test.plan.errors import ( FixtureLoadError, StatusError, ) class Error1(BaseException): pass class Error2(BaseException): pass class Error3(BaseException): pass class Error4(BaseException): pass class Error5(BaseException): pass class MockedTestCase(ServicePlanTestCase): addError = mock.MagicMock() addFailure = mock.MagicMock() set_up_test_fixture = mock.MagicMock() tear_down_test_fixture = mock.MagicMock() setUp = mock.MagicMock() tearDown = mock.MagicMock() set_up_test_case = mock.MagicMock() tear_down_test_case = mock.MagicMock() set_up_test_case_action = mock.MagicMock() tear_down_test_case_action = mock.MagicMock() _run_test_case = mock.MagicMock() _all_directives = (mock.MagicMock(), ) def __init__(self): super(MockedTestCase, self).__init__('fake_test') def fake_test(self): """ This is so that we can instantiate the class. """ @classmethod def reset(cls, include_setup=True): if include_setup: if hasattr(cls, '_test_fixture_setup_called'): del cls._test_fixture_setup_called if hasattr(cls, '_test_fixture_setup_succeeded'): del cls._test_fixture_setup_succeeded cls.addError = mock.MagicMock() cls.addFailure = mock.MagicMock() cls.set_up_test_fixture = mock.MagicMock() cls.tear_down_test_fixture = mock.MagicMock() cls.setUp = mock.MagicMock() cls.tearDown = mock.MagicMock() cls.set_up_test_case = mock.MagicMock() cls.tear_down_test_case = mock.MagicMock() cls.set_up_test_case_action = mock.MagicMock() cls.tear_down_test_case_action = mock.MagicMock() cls._run_test_case = mock.MagicMock() cls._all_directives = (mock.MagicMock(),) # Mock doesn't automatically mock methods that start with `assert`, so we have to do this cls._all_directives[0].return_value.assert_test_fixture_results = mock.MagicMock() class TestInvalidFixturePaths(unittest.TestCase): def setUp(self): MockedTestCase.reset() def test_path_does_not_exist(self): class TestCase(ServicePlanTestCase): fixture_path = '/invalid/path' with self.assertRaises(FixtureLoadError) as error_context: TestCase.get_fixture_file_names() self.assertIn('path does not exist', error_context.exception.args[0]) def test_path_has_no_fixtures(self): class TestCase(ServicePlanTestCase): fixture_path = os.path.dirname(__file__) + '/empty' with self.assertRaises(FixtureLoadError) as error_context: TestCase.get_fixture_file_names() self.assertIn('Could not find any fixture files', error_context.exception.args[0]) def test_abnormal_fixture_tear_down_succeeded(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function( 'My test description', 'my_fixture', test_case, test_fixture, test_fixture_results, ) self.assertEqual('My test description', test_function.__doc__) test.set_up_test_fixture.assert_not_called() test.tear_down_test_fixture.assert_not_called() test.setUp.assert_not_called() test.tearDown.assert_not_called() test.set_up_test_case.assert_not_called() test.tear_down_test_case.assert_not_called() test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_fixture.assert_not_called() test._all_directives[0].return_value.tear_down_test_fixture.assert_not_called() test._all_directives[0].return_value.set_up_test_case.assert_not_called() test._all_directives[0].return_value.tear_down_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_not_called() test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_not_called() test._all_directives[0].return_value.tear_down_test_fixture.assert_not_called() test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.tearDownClass() test.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test.addError.assert_not_called() test.addFailure.assert_not_called() def test_abnormal_fixture_tear_down_failed(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function( 'Your test description', 'your_fixture', test_case, test_fixture, test_fixture_results, ) self.assertEqual('Your test description', test_function.__doc__) test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_not_called() test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_not_called() test._all_directives[0].return_value.tear_down_test_fixture.assert_not_called() test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.tear_down_test_fixture.side_effect = Error1() with self.assertRaises(Error1): test.tearDownClass() test.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test.addError.assert_not_called() test.addFailure.assert_not_called() def test_normal_fixture_tear_down(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function( 'My test description', 'my_fixture', test_case, test_fixture, test_fixture_results, ) test_function._last_fixture_test = True self.assertEqual('My test description', test_function.__doc__) test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.tearDownClass() test.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test.addError.assert_not_called() test.addFailure.assert_not_called() def test_fixture_setup_failed(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function( 'My test description', 'my_fixture', test_case, test_fixture, test_fixture_results, ) test_function._last_fixture_test = True self.assertEqual('My test description', test_function.__doc__) test.set_up_test_fixture.side_effect = Error1() with self.assertRaises(Error1): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_not_called() test.setUp.assert_not_called() test.tearDown.assert_not_called() test.set_up_test_case.assert_not_called() test.tear_down_test_case.assert_not_called() test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_fixture.assert_not_called() test._all_directives[0].return_value.assert_test_fixture_results.assert_not_called() test._all_directives[0].return_value.tear_down_test_fixture.assert_not_called() test._all_directives[0].return_value.set_up_test_case.assert_not_called() test._all_directives[0].return_value.tear_down_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() with self.assertRaises(StatusError): test_function(test) def test_error_on_set_up_no_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test.setUp.side_effect = Error1() with self.assertRaises(Error1): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_not_called() test.tear_down_test_case.assert_not_called() test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_not_called() test._all_directives[0].return_value.tear_down_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.addFailure.assert_not_called() def test_error_on_set_up_some_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test.setUp.side_effect = Error1() test.tearDown.side_effect = Error2() test.tear_down_test_fixture.side_effect = Error3() with self.assertRaises(Error1): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_not_called() test.tear_down_test_case.assert_not_called() test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_not_called() test._all_directives[0].return_value.tear_down_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() self.assertEqual(2, test.addError.call_count) test.addFailure.assert_not_called() def test_error_on_set_up_different_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test.setUp.side_effect = Error3() test.tearDown.side_effect = KeyboardInterrupt() test._all_directives[0].return_value.assert_test_fixture_results.side_effect = AssertionError() test.tear_down_test_fixture.side_effect = KeyboardInterrupt() with self.assertRaises(Error3): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_not_called() test.tear_down_test_case.assert_not_called() test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_not_called() test._all_directives[0].return_value.tear_down_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.assertEqual(1, test.addFailure.call_count) def test_error_on_set_up_test_case_no_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test.set_up_test_case.side_effect = Error1() with self.assertRaises(Error1): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_not_called() test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_not_called() test._all_directives[0].return_value.tear_down_test_case.assert_not_called() test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.addFailure.assert_not_called() def test_error_on_run_test_no_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test._run_test_case.side_effect = Error1() with self.assertRaises(Error1): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.addFailure.assert_not_called() def test_error_on_run_test_no_some_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test._run_test_case.side_effect = Error1() test.tear_down_test_case.side_effect = Error2() test.tear_down_test_fixture.side_effect = Error3() with self.assertRaises(Error1): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() self.assertEqual(2, test.addError.call_count) test.addFailure.assert_not_called() def test_error_on_run_test_no_different_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test._run_test_case.side_effect = Error4() test.tear_down_test_case.side_effect = KeyboardInterrupt() test._all_directives[0].return_value.assert_test_fixture_results.side_effect = Error5() with self.assertRaises(Error4): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.assertEqual(1, test.addError.call_count) test.addFailure.assert_not_called() def test_keyboard_error_on_tear_down_test_case_no_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test.tear_down_test_case.side_effect = KeyboardInterrupt() with self.assertRaises(KeyboardInterrupt): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.addFailure.assert_not_called() def test_other_error_on_tear_down_test_case_some_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test.tear_down_test_case.side_effect = Error2() test._all_directives[0].return_value.assert_test_fixture_results.side_effect = Error5() with self.assertRaises(Error2): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.assertEqual(1, test.addError.call_count) test.addFailure.assert_not_called() def test_keyboard_error_on_tear_down_no_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test.tearDown.side_effect = KeyboardInterrupt() with self.assertRaises(KeyboardInterrupt): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.addFailure.assert_not_called() def test_other_error_on_tear_down_some_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test.tearDown.side_effect = Error2() test._all_directives[0].return_value.assert_test_fixture_results.side_effect = KeyboardInterrupt() with self.assertRaises(Error2): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.addFailure.assert_not_called() def test_keyboard_error_on_assert_test_fixture_results_no_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test._all_directives[0].return_value.assert_test_fixture_results.side_effect = KeyboardInterrupt() with self.assertRaises(KeyboardInterrupt): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.addFailure.assert_not_called() def test_assertion_error_on_assert_test_fixture_results_some_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test._all_directives[0].return_value.assert_test_fixture_results.side_effect = AssertionError() test.tear_down_test_fixture.side_effect = Error5() with self.assertRaises(AssertionError): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.assertEqual(1, test.addError.call_count) test.addFailure.assert_not_called() def test_other_error_on_assert_test_fixture_results_some_other_errors(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test._all_directives[0].return_value.assert_test_fixture_results.side_effect = Error3() test._all_directives[0].return_value.tear_down_test_fixture.side_effect = Error4() with self.assertRaises(Error3): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_not_called() test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.assertEqual(1, test.addError.call_count) test.addFailure.assert_not_called() def test_keyboard_error_on_tear_down_test_fixture(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test.tear_down_test_fixture.side_effect = KeyboardInterrupt() with self.assertRaises(KeyboardInterrupt): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_called_once_with(test_fixture) test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.addFailure.assert_not_called() def test_other_error_on_tear_down_test_fixture(self): test_case = {'my': 'case'} test_fixture = ['foo', 'bar'] test_fixture_results = ['baz', 'qux'] test = MockedTestCase() test_function = test._create_test_function('aaa', 'bbb', test_case, test_fixture, test_fixture_results) test_function._last_fixture_test = True test._all_directives[0].return_value.tear_down_test_fixture.side_effect = Error1() with self.assertRaises(Error1): test_function(test) test.set_up_test_fixture.assert_called_once_with(test_fixture) test.tear_down_test_fixture.assert_not_called() test.setUp.assert_called_once_with() test.tearDown.assert_called_once_with() test.set_up_test_case.assert_called_once_with(test_case, test_fixture) test.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test.set_up_test_case_action.assert_not_called() test.tear_down_test_case_action.assert_not_called() test._run_test_case.assert_called_once_with(test_case, test_fixture, test_fixture_results) test._all_directives[0].return_value.set_up_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.assert_test_fixture_results.assert_called_once_with( test_fixture_results, test_fixture, ) test._all_directives[0].return_value.tear_down_test_fixture.assert_called_once_with(test_fixture) test._all_directives[0].return_value.set_up_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.tear_down_test_case.assert_called_once_with(test_case, test_fixture) test._all_directives[0].return_value.set_up_test_case_action.assert_not_called() test._all_directives[0].return_value.tear_down_test_case_action.assert_not_called() test.addError.assert_not_called() test.addFailure.assert_not_called()
47.460888
113
0.746002
6,144
44,898
4.890299
0.022298
0.154863
0.110764
0.138454
0.96116
0.955901
0.93886
0.929009
0.927844
0.925547
0
0.005558
0.170475
44,898
945
114
47.511111
0.801176
0.002985
0
0.838493
0
0
0.017613
0.001229
0
0
0
0
0.561238
1
0.034993
false
0.006729
0.009421
0
0.072678
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
8
5a3595e593f8a8a8085329900df84f1d77cebf29
8,402
py
Python
Day15/test_window.py
lukasHD/adventofcode2019
409a2008de43ee70258e02de5a9aad27aa18c67a
[ "MIT" ]
null
null
null
Day15/test_window.py
lukasHD/adventofcode2019
409a2008de43ee70258e02de5a9aad27aa18c67a
[ "MIT" ]
null
null
null
Day15/test_window.py
lukasHD/adventofcode2019
409a2008de43ee70258e02de5a9aad27aa18c67a
[ "MIT" ]
null
null
null
# button_callback.py from tkinter import Tk, Button, Message, Y, RIGHT, Frame, BOTH, LEFT root = Tk() # Create a button with a custom callback def my_callback(): print("The button was clicked!") # Prints to console not the GUI msg.configure(text=BBB) #msg = Message(root, text=BBB) #msg.pack() def my_callback2(): print("The button was clicked!") # Prints to console not the GUI msg.configure(text=AAA) #msg = Message(root, text=AAA) #msg.pack() root.title("Feet to Meters") # Create a button that will destroy the main window when clicked # cretaing a Fra, e which can expand according # to the size of the window pane = Frame(root) pane.pack(fill = BOTH, expand = True) # button widgets which can also expand and fill # in the parent widget entirely print_button = Button(pane, text='BBB', command=my_callback) print_button.pack(side = LEFT, expand = True, fill = BOTH) print_button2 = Button(pane, text='AAA', command=my_callback2) print_button2.pack(side = LEFT, expand = True, fill = BOTH) exit_button = Button(pane, text='Exit Program', command=root.destroy) exit_button.pack(side = LEFT, expand = True, fill = BOTH) BBB = """Start Exploring x = [-21, 19] y = [-21, 19] ███████████████████████████ ███████████████ ███████████████████████████████████████ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ █████████ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███ ◦ █████████████████████████████████ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ██████ ◦ █████████ ◦ ███████████████ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ███ ◦ ████████████ ███ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ███████████████ ◦ ███ ◦ █████████ ◦ ███████████████ ◦ █████████ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ████████████ ◦ ███ ███ ◦ ███ ◦ ████████████ ███ ◦ █████████ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ███ ◦ ██████ ███ ◦ █████████ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ██████ ███ ◦ ◦ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ██████ ◦ ███ ██████ ◦ ███████████████ ◦ ███ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ██████ ███ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ██████ ◦ ███ ███ ◦ █████████ ◦ █████████ ◦ ███ ◦ ███████████████████████████ ◦ ███ ███ ◦ ◦ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ █████████ ◦ ██████ ██████ ◦ █████████ ◦ ███ ◦ ███ ◦ ███ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ███ ◦ ████████████ ██████ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ███ ████████████ ◦ █████████ ◦ ██████ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███████████████ ◦ ███ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ████████████ ◦ ███ ◦ █████████ ◦ ███ ◦ ███████████████ ◦ ███ ◦ ███ ◦ ███ ◦ ███ █████████ None""" AAA = """Start Exploring x = [-21, 19] y = [-21, 19] ███████████████████████████ ███████████████ ███████████████████████████████████████ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ █████████ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███ ◦ █████████████████████████████████ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ██████ ◦ █████████ ◦ ███████████████ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ███ ◦ ████████████ ███ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ███████████████ ◦ ███ ◦ █████████ ◦ ███████████████ ◦ █████████ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ████████████ ◦ ███ ███ ◦ ███ ◦ ████████████ ███ ◦ █████████ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ███ ◦ ██████ ███ ◦ █████████ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ██████ ███ ◦ ◦ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ██████ ◦ ███ ██████ ◦ ███████████████ ◦ ███ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ██████ ███ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ██████ ◦ ███ ███ ◦ █████████ ◦ █████████ ◦ ███ ◦ ███████████████████████████ ◦ ███ ███ ◦ ◦ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ █████████ ◦ ██████ ██████ ◦ █████████ ◦ ███ ◦ ███ ◦ ███ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ███ ◦ ████████████ ██████ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ███ ████████████ ◦ █████████ ◦ ██████ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███████████████ ◦ ███ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ████████████ ◦ ███ ◦ █████████ ◦ ███ ◦ ███████████████ ◦ ███ ◦ ███ ◦ ███ ◦ ██████████████████ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███████████████ ◦ ██████ ██████ ◦ ███████████████ ◦ ███ ◦ ███ ◦ ███ ◦ ███████████████ ◦ █████████ ◦ ██████ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ███ ◦ ███████████████████████████ ◦ ███ ◦ ███ ◦ ████████████ ████████████ ◦ ███ ◦ ███████████████ ◦ █████████ ◦ ██████ ███ ◦ ███ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ███ ◦ ███ ██████ ◦ █████████ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███████████████ ◦ ███ ███ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ███ ███ ◦ █████████ ◦ █████████ ◦ █████████ ◦ ███████████████████████████ ◦ ███ ◦ ███████████████ ◦ ████████████ ███ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ███ ◦ ███ ◦ ██████ ◦ ███ ◦ ███ ██████ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███ ◦ █████████ ◦ ███ ◦ ███████████████ ◦ ███ ███ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ███ ◦ ◦ ◦ ███ ◦ ███ ◦ ███ ◦ ███ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ██████ ◦ █████████ ◦ ███ ◦ █████████ ◦ █████████ ◦ █████████ ◦ ███ ◦ ███ ◦ █████████ ◦ ███████████████ ◦ ███ ◦ ███ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ███ ███ ◦ ███ ◦ ███████████████████████████████████████████████████ ◦ █████████████████████ ◦ █████████████████████ ◦ ███ ███ ◦ ███ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ███ ███ ◦ ███████████████████████████████████████ ◦ ███ ◦ ███ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ███ ◦ █████████ ◦ ███ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ◦ ◦ ◦ ◦ ◦ ███ ◦ ◦ ◦ ███ ███ █████████ █████████ █████████ ███████████████ █████████ None""" msg = Message(root, text=AAA) # Font is a tuple of (font_family, size_in_points, style_modifier_string) msg.config(font=('Consolas', 10, '')) msg.pack() root.mainloop()
68.308943
126
0.121043
1,719
8,402
2.920884
0.057592
0.166102
0.277833
0.166102
0.818363
0.790878
0.786696
0.778331
0.751842
0.740888
0
0.004207
0.377529
8,402
123
127
68.308943
0.187189
0.057248
0
0.549451
0
0.406593
0.899077
0.055394
0
0
0
0
0
1
0.021978
false
0
0.010989
0
0.032967
0.065934
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
11
5a408d7b6b24a284c504d52853d8f2bce0d37a51
529
py
Python
problems/counting-bits/solution.py
tonymontaro/leetcode-hints
678df921f9a1322454c1e52d3723a448b4bbb135
[ "MIT" ]
1
2020-09-09T08:22:40.000Z
2020-09-09T08:22:40.000Z
problems/counting-bits/solution.py
tonymontaro/leetcode-hints
678df921f9a1322454c1e52d3723a448b4bbb135
[ "MIT" ]
null
null
null
problems/counting-bits/solution.py
tonymontaro/leetcode-hints
678df921f9a1322454c1e52d3723a448b4bbb135
[ "MIT" ]
null
null
null
class Solution: def countBits(self, num: int): """O(n) time and space""" result = [0] * (num + 1) for i in range(1, num+1): result[i] = result[i//2] if i % 2 == 1: result[i] += 1 return result # Bit solution class Solution: def countBits(self, num: int): """O(n) time and space""" result = [0] * (num + 1) for i in range(1, num+1): result[i] = result[i >> 1] if i % 2 == 1: result[i] += 1 return result
26.45
41
0.459357
76
529
3.197368
0.302632
0.17284
0.131687
0.205761
0.946502
0.946502
0.946502
0.946502
0.946502
0.740741
0
0.04908
0.383743
529
19
42
27.842105
0.696319
0.100189
0
0.857143
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.428571
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
5a5972df60ad24927fa54e514ae08631669413bc
64,267
py
Python
Sapphire/Parse1Expression.py
Rhodolite/Parser-py
7743799794d92aa8560db11f1d6d5f00e5ac1925
[ "MIT" ]
null
null
null
Sapphire/Parse1Expression.py
Rhodolite/Parser-py
7743799794d92aa8560db11f1d6d5f00e5ac1925
[ "MIT" ]
null
null
null
Sapphire/Parse1Expression.py
Rhodolite/Parser-py
7743799794d92aa8560db11f1d6d5f00e5ac1925
[ "MIT" ]
null
null
null
# # Copyright (c) 2017 Joy Diamond. All rights reserved. # @gem('Sapphire.Parse1Expression') def gem(): require_gem('Sapphire.TernaryExpression') require_gem('Sapphire.UnaryExpression') show = 0 # # 3. Postfix-Expression (Python 2.7.14rc1 grammer calls this 'trailer') # # postfix-expression # : atom # | dot-expression # | call-expression # | method-call-expression # | index-expression # # dot-expression # : postfix-expression '.' name # # call-expression # : postfix-expression '(' ] ')' # : postfix-expression '(' argument-list ')' # # method-call-expression # : postfix-expression '.' name '(' ')' # | postfix-expression '.' name '(' argument-list ')' # # index-expression # : postfix-expression '[' ']' # | postfix-expression '[' subscript-list ']' # # subscript-list # : subscript # | subscript-list ',' subscript # # subscript # : '.' '.' '.' # | ternary-expression # | ternary-expression ':' # | ':' ternary-expression # | [ternary-expression] ':' [ternary-expression] ':' [ternary-expression] # @share def parse1_postfix_expression__left_operator(left, operator, indentation = 0): assert operator.is_postfix_operator while 7 is 7: assert qk() is none if operator.is_dot: name = tokenize_name() if qn() is not none: return conjure_member_expression(left, conjure_dot_name(operator, name)) operator_2 = tokenize_operator() if operator_2.is_dot: if qn() is not none: raise_unknown_line() name_2 = tokenize_name() if qn() is not none: return conjure_member_expression( left, conjure_dot_name_pair( conjure_dot_name(operator, name), conjure_dot_name(operator_2, name_2), ), ) operator_3 = tokenize_operator() if operator_3.is_dot: if qn() is not none: raise_unknown_line() name_3 = tokenize_name() if qn() is not none: return conjure_member_expression( left, conjure_dot_name_triplet( conjure_dot_name(operator, name), conjure_dot_name(operator_2, name_2), conjure_dot_name(operator_3, name_3), ), ) operator_4 = tokenize_operator() if operator_4.is_dot: if qn() is not none: raise_unknown_line() name_4 = tokenize_name() left = conjure_member_expression( left, conjure_dot_name_quadruplet( conjure_dot_name(operator, name), conjure_dot_name(operator_2, name_2), conjure_dot_name(operator_3, name_3), conjure_dot_name(operator_4, name_4), ), ) if qn() is not none: return left operator_5 = tokenize_operator() if not operator_5.is_postfix_operator: wk(operator_5) return left operator = operator_5 else: left = conjure_member_expression( left, conjure_dot_name_triplet( conjure_dot_name(operator, name), conjure_dot_name(operator_2, name_2), conjure_dot_name(operator_3, name_3), ), ) if not operator_4.is_postfix_operator: wk(operator_4) return left operator = operator_4 else: left = conjure_member_expression( left, conjure_dot_name_pair( conjure_dot_name(operator, name), conjure_dot_name(operator_2, name_2), ), ) if not operator_3.is_postfix_operator: wk(operator_3) return left operator = operator_3 else: left = conjure_member_expression(left, conjure_dot_name(operator, name)) if not operator_2.is_postfix_operator: wk(operator_2) return left operator = operator_2 if operator.is__arguments_0__or__left_parenthesis: if operator.is_left_parenthesis: assert qd() > 0 assert qn() is none operator = parse1_arguments__left_parenthesis(operator) newline = qn() if (indentation is not 0) and (newline is not none) and (qk() is none): wn(none) return left.call_statement(conjure_vw_frill(indentation, newline), left, operator) left = left.call_expression(left, operator) operator = qk() if operator is not none: if not operator.is_postfix_operator: return left wk(none) else: if newline is not none: return left operator = tokenize_operator() if not operator.is_postfix_operator: wk(operator) return left if operator.is_left_square_bracket: if qn() is not none: raise_unknown_line() middle = parse1_atom() if middle.is_colon: operator = conjure__left_square_bracket__colon(operator, middle) elif middle.is_special_operator: #my_line('middle: %r', middle) raise_unknown_line() else: operator_2 = qk() if operator_2 is none: if qn() is not none: raise_unknown_line() operator_2 = tokenize_operator() else: wk(none) if not operator_2.is_end_of_ternary_expression: middle = parse1_ternary_expression__X__any_expression(middle, operator_2) operator_2 = qk() if operator_2 is none: raise_unknown_line() wk(none) if operator_2.is_right_square_bracket: left = conjure_index_expression(left, conjure_normal_index(operator, middle, operator_2)) elif operator_2.is_colon: if qn() is not none: raise_unknown_line() middle_2 = parse1_atom() if middle_2.is_right_square_bracket: left = conjure_index_expression( left, conjure_head_index( operator, middle, conjure__colon__right_square_bracket(operator_2, middle_2), ), ) elif middle_2.is_special_operator: raise_unknown_line() else: operator_3 = qk() if operator_3 is none: if qn() is not none: raise_unknown_line() operator_3 = tokenize_operator() else: wk(none) if not operator_3.is_end_of_ternary_expression: middle_2 = parse1_ternary_expression__X__any_expression(middle_2, operator_3) operator_3 = qk() if operator_3 is none: raise_unknown_line() wk(none) if not operator_3.is_right_square_bracket: raise_unknown_line() left = conjure_index_expression( left, conjure_range_index(operator, middle, operator_2, middle_2, operator_3), ) elif operator_2.is_colon__right_square_bracket: left = conjure_index_expression(left, conjure_head_index(operator, middle, operator_2)) else: my_line('operator_2: %r', operator_2) raise_unknown_line() if qn() is not none: return left operator = qk() if operator is not none: if not operator.is_postfix_operator: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if not operator.is_postfix_operator: wk(operator) return left if operator.is_tail_index: middle_2 = parse1_atom() if middle_2.is_right_square_bracket: operator = conjure_all_index(operator.a, operator.b, middle_2) elif middle_2.is_special_operator: raise_unknown_line() else: operator_2 = qk() if operator_2 is none: if qn() is not none: raise_unknown_line() operator_2 = tokenize_operator() else: wk(none) if not operator_2.is_right_square_bracket: middle_2 = parse1_ternary_expression__X__any_expression(middle_2, operator_2) operator_2 = qk() if not operator_2.is_right_square_bracket: raise_unknown_line() wk(none) left = conjure_index_expression(left, conjure_tail_index(operator, middle_2, operator_2)) if qn() is not none: return left operator = qk() if operator is not none: if not operator.is_postfix_operator: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if not operator.is_postfix_operator: wk(operator) return left if operator.is_all_index: left = conjure_index_expression(left, operator) if qn() is not none: return left operator = qk() if operator is not none: if not operator.is_postfix_operator: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if not operator.is_postfix_operator: wk(operator) return left assert operator.is_postfix_operator raise_unknown_line() # # 4. Power-Expression (Python 2.7.14rc1 grammer calls this 'power') # # power-expression # : postfix-expression # | postfix-expression '**' unary-expression # def parse1_power_expression__left_operator(left, power_operator): return conjure_power_expression(left, power_operator, parse1_unary_expression()) # # 5. Unary-Expression (Python 2.7.14rc1 grammer calls this 'factor') # @share def parse1_twos_complement_expression__operator(operator): return conjure_twos_complement(operator, parse1_unary_expression()) @share def parse1_negative_expression__operator(operator): return conjure_negative_expression(operator, parse1_unary_expression()) def parse1_unary_expression(): left = parse1_atom() operator = qk() if operator is none: newline = qn() if qn() is not none: return left operator = tokenize_operator() if qk() is not none: raise_unknown_line() if operator.is_end_of_unary_expression: wk(operator) return left else: if operator.is_end_of_unary_expression: return left wk(none) if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_unary_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_unary_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_unary_expression: return left wk(none) raise_unknown_line() # # 6. Multiply-Expression (Python 2.7.14rc1 grammer calls this 'term') # # multiply-expression # : unary-expression # | multiply-expression mutiply-operator unary-expression # # multiply-operator # : '*' # | '/' # | '%' # | '//' # def parse1_multiply_expression__left_operator(left, multiply_operator): right = parse1_unary_expression() operator = qk() if operator is none: if qn() is not none: return multiply_operator.expression_meta(left, multiply_operator, right) operator = tokenize_operator() if operator.is_end_of_multiply_expression: wk(operator) return multiply_operator.expression_meta(left, multiply_operator, right) else: if operator.is_end_of_multiply_expression: return multiply_operator.expression_meta(left, multiply_operator, right) wk(none) if not operator.is_multiply_operator: raise_unknown_line() many = [left, right] many_frill = [multiply_operator, operator] while 7 is 7: many.append(parse1_unary_expression()) operator = qk() if operator is none: if qn() is not none: break operator = tokenize_operator() if operator.is_end_of_multiply_expression: wk(operator) break else: if operator.is_end_of_multiply_expression: break wk(none) if not operator.is_multiply_operator: raise_unknown_line() many.append(operator) return conjure_multiply_expression_many(many, many_frill) def parse1_multiply_expression(): left = parse1_atom() operator = qk() if operator is not none: if operator.is_end_of_multiply_expression: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if operator.is_end_of_multiply_expression: wk(operator) return left if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_multiply_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_multiply_expression: return left wk(none) if operator.is_multiply_operator: return parse1_multiply_expression__left_operator(left, operator) #my_line('left: %r; operator: %r; s: %s', left, operator, portray_string(qs()[qj():])) raise_unknown_line() # # 7. Arithmetic-Expression (Python 2.7.14rc1 grammer calls this 'arith_expr') # def parse1_arithmetic_expression__left_operator(left, add_operator): assert add_operator.is_arithmetic_operator right = parse1_multiply_expression() operator = qk() if operator is none: if qn() is not none: return add_operator.expression_meta(left, add_operator, right) operator = tokenize_operator() if operator.is_end_of_arithmetic_expression: wk(operator) return add_operator.expression_meta(left, add_operator, right) else: if operator.is_end_of_arithmetic_expression: return add_operator.expression_meta(left, add_operator, right) wk(none) if not operator.is_arithmetic_operator: raise_unknown_line() many = [left, right] many_frill = [add_operator, operator] while 7 is 7: many.append(parse1_multiply_expression()) operator = qk() if operator is none: if qn() is not none: break operator = tokenize_operator() if operator.is_end_of_arithmetic_expression: wk(operator) break else: if operator.is_end_of_arithmetic_expression: break wk(none) if not operator.is_arithmetic_operator: raise_unknown_line() many_frill.append(operator) return conjure_arithmetic_expression_many(many, many_frill) def parse1_arithmetic_expression(): left = parse1_atom() operator = qk() if operator is not none: if operator.is_end_of_arithmetic_expression: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if operator.is_end_of_arithmetic_expression: wk(operator) return left if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_arithmetic_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_arithmetic_expression: return left wk(none) if operator.is_multiply_operator: left = parse1_multiply_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_arithmetic_expression: return left wk(none) if operator.is_arithmetic_operator: return parse1_arithmetic_expression__left_operator(left, operator) #my_line('left: %r; operator: %r; s: %s', left, operator, portray_string(qs()[qj():])) raise_unknown_line() # # j. Shift-Expression (Python 2.7.14rc1 grammer calls this 'shift_expr') # # # 9. Logical-And-Expression (Python 2.7.14rc1 grammer calls this 'and_expr') # def parse1_logical_and_expression__left_operator(left, logical_and_operator): assert logical_and_operator.is_logical_and_operator right = parse1_arithmetic_expression() operator = qk() if operator is none: if qn() is not none: return conjure_logical_and_expression(left, logical_and_operator, right) operator = tokenize_operator() if operator.is_end_of_logical_and_expression: wk(operator) return conjure_logical_and_expression(left, logical_and_operator, right) else: if operator.is_end_of_logical_and_expression: return conjure_logical_and_expression(left, logical_and_operator, right) wk(none) if not operator.is_logical_and_operator: raise_unknown_line() many = [left, logical_and_operator, right, operator] while 7 is 7: many.append(parse1_arithmetic_expression()) operator = qk() if operator is none: if qn() is not none: return LogicalAndExpression_Many(Tuple(many)) operator = tokenize_operator() if operator.is_end_of_logical_and_expression: wk(operator) return LogicalAndExpression_Many(Tuple(many)) else: if operator.is_end_of_logical_and_expression: return LogicalAndExpression_Many(Tuple(many)) wk(none) if not operator.is_logical_and_operator: raise_unknown_line() many.append(operator) @share def parse1_logical_and_expression(): left = parse1_atom() operator = qk() if operator is not none: if operator.is_end_of_logical_and_expression: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if operator.is_end_of_logical_and_expression: wk(operator) return left if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_logical_and_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_logical_and_expression: return left wk(none) if operator.is_multiply_operator: left = parse1_multiply_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_logical_and_expression: return left wk(none) if operator.is_arithmetic_operator: left = parse1_arithmetic_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_logical_and_expression: return left wk(none) if operator.is_logical_and_operator: return parse1_logical_and_expression__left_operator(left, operator) #my_line('left: %r; operator: %r; s: %s', left, operator, portray_string(qs()[qj():])) raise_unknown_line() # # 10. Logical-Exclusive-Or-Expression (Python 2.7.14rc1 grammer calls this 'xor_expr') # # # 11. Normal-Expression (Logical-Or) (Python 2.7.14rc1 grammer calls this 'expr') # def parse1_normal_expression__left_operator(left, logical_or_operator): assert logical_or_operator.is_logical_or_operator right = parse1_logical_and_expression() operator = qk() if operator is none: if qn() is not none: return conjure_logical_or_expression(left, logical_or_operator, right) operator = tokenize_operator() if operator.is_end_of_logical_or_expression: wk(operator) return conjure_logical_or_expression(left, logical_or_operator, right) else: if operator.is_end_of_logical_or_expression: return conjure_logical_or_expression(left, logical_or_operator, right) wk(none) if not operator.is_logical_or_operator: raise_unknown_line() many = [left, right] many_frill = [logical_or_operator, operator] while 7 is 7: many.append(parse1_logical_and_expression()) operator = qk() if operator is none: if qn() is not none: break operator = tokenize_operator() if operator.is_end_of_logical_or_expression: wk(operator) break else: if operator.is_end_of_logical_or_expression: break wk(none) if not operator.is_logical_or_operator: raise_unknown_line() many_frill.append(operator) return conjure_logical_or_expression_many(many, many_frill) @share def parse1_normal_expression(): left = parse1_atom() operator = qk() if operator is not none: if operator.is_end_of_logical_or_expression: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if operator.is_end_of_logical_or_expression: wk(operator) return left if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_logical_or_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_logical_or_expression: return left wk(none) if operator.is_multiply_operator: left = parse1_multiply_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_logical_or_expression: return left wk(none) if operator.is_arithmetic_operator: left = parse1_arithmetic_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_logical_or_expression: return left wk(none) if operator.is_logical_and_operator: left = parse1_logical_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_logical_or_expression: return left wk(none) if operator.is_logical_or_operator: return parse1_normal_expression__left_operator(left, operator) #my_line('left: %r; operator: %r; s: %s', left, operator, portray_string(qs()[qj():])) raise_unknown_line() # # 12. Normal-Expression-List (Python 2.7.14rc1 grammer calls this 'exprlist') # @share def parse1_normal_expression_list(): return parse1_arithmetic_expression() # Temporary until , is implemented # # 13. Compare-Expression (Python 2.7.14rc1 grammer calls this 'comparasion') # @share def parse1_compare_expression__left_operator(left, compare_operator): assert compare_operator.is_compare_operator if compare_operator.is_keyword_not: #my_line('full: %s', portray_string(qs())) raise_unknown_line() right = parse1_normal_expression() operator = qk() if operator is none: if qn() is not none: return compare_operator.expression_meta(left, compare_operator, right) operator = tokenize_operator() if operator.is_end_of_compare_expression: wk(operator) return compare_operator.expression_meta(left, compare_operator, right) else: if operator.is_end_of_compare_expression: return compare_operator.expression_meta(left, compare_operator, right) wk(none) many = [left, right] many_frill = [compare_operator, operator] while 7 is 7: many.append(parse1_normal_expression()) operator = qk() if operator is none: if qn() is not none: break operator = tokenize_operator() if operator.is_end_of_compare_expression: wk(operator) break else: if operator.is_end_of_compare_expression: break wk(none) many_frill.append(operator) return conjure_compare_expression_many(many, many_frill) def parse1_compare_expression(): assert qk() is none left = parse1_atom() operator = qk() if operator is not none: if operator.is_end_of_compare_expression: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if operator.is_end_of_compare_expression: wk(operator) return left if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_compare_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_compare_expression: return left wk(none) if operator.is_multiply_operator: left = parse1_multiply_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_compare_expression: return left wk(none) if operator.is_arithmetic_operator: left = parse1_arithmetic_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_compare_expression: return left wk(none) if operator.is_logical_and_operator: left = parse1_logical_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_compare_expression: return left wk(none) if operator.is_logical_or_operator: left = parse1_normal_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_compare_expression: return left wk(none) if operator.is_compare_operator: return parse1_compare_expression__left_operator(left, operator) #my_line('left: %r; operator: %r; s: %s', left, operator, portray_string(qs()[qj():])) raise_unknown_line() # # 14. Not-Expression (Python 2.7.14rc1 grammer calls this 'not_test') # # not-expression # : compare-expression # | 'not' not-test # # NOTE [FIX IN FUTURE -- When really parsing not expressions properly]: # Uses .is_end_of_compare_expression on purpose (there is no .is_end_of_not_expression, as it would be # identicial to .is_end_of_compare_expression) # @share def parse1_not_expression__operator(not_operator): assert not_operator.is_keyword_not return conjure_not_expression(not_operator, parse1_compare_expression()) # Temporary until handle 'not' atom itself # # 15. Boolean-And-Expression (Python 2.7.14rc1 grammer calls this 'and_test') # def parse1_boolean_and_expression__left_operator(left, operator): assert operator.is_keyword_and right = parse1_compare_expression() operator_2 = qk() if operator_2 is none: if qn() is not none: return conjure_and_expression_1(left, operator, right) operator_2 = tokenize_operator() if operator_2.is_end_of_boolean_and_expression: wk(operator_2) return conjure_and_expression_1(left, operator, right) else: if operator_2.is_end_of_boolean_and_expression: return conjure_and_expression_1(left, operator, right) wk(none) many = [left, right] many_frill = [operator, operator_2] while 7 is 7: many.append(parse1_compare_expression()) operator_7 = qk() if operator_7 is none: if qn() is not none: return conjure_and_expression_many(many, many_frill) operator_7 = tokenize_operator() if operator_7.is_end_of_boolean_and_expression: wk(operator_7) return conjure_and_expression_many(many, many_frill) else: if operator_7.is_end_of_boolean_and_expression: return conjure_and_expression_many(many, many_frill) wk(none) if not operator_7.is_keyword_and: raise_unknown_line() many_frill.append(operator_7) def parse1_boolean_and_expression(): left = parse1_atom() operator = qk() if operator is not none: if operator.is_end_of_boolean_and_expression: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if operator.is_end_of_boolean_and_expression: wk(operator) return left if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_and_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_and_expression: return left wk(none) if operator.is_multiply_operator: left = parse1_multiply_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_and_expression: return left wk(none) if operator.is_arithmetic_operator: left = parse1_arithmetic_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_and_expression: return left wk(none) if operator.is_logical_and_operator: left = parse1_logical_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_and_expression: return left wk(none) if operator.is_logical_or_operator: left = parse1_normal_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_and_expression: return left wk(none) if operator.is_compare_operator: left = parse1_compare_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_and_expression: return left wk(none) if operator.is_keyword_and: return parse1_boolean_and_expression__left_operator(left, operator) #my_line('left: %r; operator: %r; s: %s', left, operator, portray_string(qs()[qj():])) raise_unknown_line() # # 16. Boolean-Or-Expression (Python 2.7.14rc1 grammer calls this 'or_test') # def parse1_boolean_or_expression__left_operator(left, operator): assert operator.is_keyword_or right = parse1_boolean_and_expression() operator_2 = qk() if operator_2 is none: if qn() is not none: return conjure_or_expression_1(left, operator, right) operator_2 = tokenize_operator() if operator_2.is_end_of_boolean_or_expression: wk(operator_2) return conjure_or_expression_1(left, operator, right) else: if operator_2.is_end_of_boolean_or_expression: return conjure_or_expression_1(left, operator, right) wk(none) many = [left, right] many_frill = [operator, operator_2] while 7 is 7: many.append(parse1_boolean_and_expression()) operator_7 = qk() if operator_7 is none: if qn() is not none: break operator_7 = tokenize_operator() if operator_7.is_end_of_boolean_or_expression: wk(operator_7) break else: if operator_7.is_end_of_boolean_or_expression: break wk(none) if not operator_7.is_keyword_or: raise_unknown_line() many_frill.append(operator_7) return conjure_or_expression_many(many, many_frill) def parse1_boolean_or_expression(): left = parse1_atom() operator = qk() if operator is not none: if operator.is_end_of_boolean_or_expression: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if operator.is_end_of_boolean_or_expression: wk(operator) return left if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_or_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_or_expression: return left wk(none) if operator.is_multiply_operator: left = parse1_multiply_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_or_expression: return left wk(none) if operator.is_arithmetic_operator: left = parse1_arithmetic_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_or_expression: return left wk(none) if operator.is_compare_operator: left = parse1_compare_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_or_expression: return left wk(none) if operator.is_logical_and_operator: left = parse1_logical_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_and_expression: return left wk(none) if operator.is_logical_or_operator: left = parse1_normal_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_or_expression: return left wk(none) if operator.is_keyword_and: left = parse1_boolean_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_boolean_or_expression: return left wk(none) if operator.is_keyword_or: return parse1_boolean_or_expression__left_operator(left, operator) #my_line('left: %r; operator: %r; s: %s', left, operator, portray_string(qs()[qj():])) raise_unknown_line() # # 17. Lambda-Expression (Python 2.7.14rc1 grammer calls this 'lambdef') # # # 18. Ternary-Expression (Python 2.7.14rc1 grammer calls this 'test') # # ternary-expression # : boolean-or-expression # | boolean-or-expression 'if' boolean-or-expression 'else' ternary-expression # | lambda-expression # # lambda-Expression # : 'lambda' [variable-argument-list] ':' ternary-expression # def parse1_ternary_expression__left_operator(left, operator): assert operator.is_keyword_if middle = parse1_boolean_or_expression() operator_2 = qk() wk(none) if not operator_2.is_keyword_else: #my_line('left: %r; operator: %r; middle: %r; operator_2: %r; s: %s', # left, operator, middle, operator_2, portray_string(qs()[qj():])) raise_unknown_line() return conjure_ternary_expression(left, operator, middle, operator_2, parse1_ternary_expression()) @share def parse1_ternary_expression__X__any_expression(left, operator): if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression: return left wk(none) if operator.is_multiply_operator: left = parse1_multiply_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression: return left wk(none) if operator.is_arithmetic_operator: left = parse1_arithmetic_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression: return left wk(none) if operator.is_compare_operator: left = parse1_compare_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression: return left wk(none) if operator.is_logical_and_operator: left = parse1_logical_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression: return left wk(none) if operator.is_logical_or_operator: left = parse1_normal_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression: return left wk(none) if operator.is_keyword_and: left = parse1_boolean_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression: return left wk(none) if operator.is_keyword_or: left = parse1_boolean_or_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression: return left wk(none) if operator.is_keyword_if: return parse1_ternary_expression__left_operator(left, operator) #my_line('left: %r; operator: %r; s: %s', left, operator, portray_string(qs()[qj():])) raise_unknown_line() @share def parse1_ternary_expression(): left = parse1_atom() operator = qk() if operator is not none: if operator.is_end_of_ternary_expression: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if operator.is_end_of_ternary_expression: wk(operator) return left return parse1_ternary_expression__X__any_expression(left, operator) # # 19. Ternary-Expression-List (Python 2.7.14rc1 grammer calls this 'testlist') # @share def parse1_ternary_expression_list__X_any_expresion(left, operator): if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) if operator.is_multiply_operator: left = parse1_multiply_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) if operator.is_arithmetic_operator: left = parse1_arithmetic_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) if operator.is_logical_and_operator: left = parse1_logical_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) if operator.is_logical_or_operator: left = parse1_normal_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) if operator.is_compare_operator: left = parse1_compare_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) if operator.is_keyword_and: left = parse1_boolean_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) if operator.is_keyword_or: left = parse1_boolean_or_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) if operator.is_keyword_if: left = parse1_ternary_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_ternary_expression_list: return left wk(none) #my_line('line: %d; left: %r; operator: %r', ql(), left, operator) raise_unknown_line() @share def parse1_ternary_expression_list(): left = parse1_atom() operator = qk() if operator is not none: if operator.is_end_of_ternary_expression_list: return left wk(none) else: if qn() is not none: return left operator = tokenize_operator() if operator.is_end_of_ternary_expression_list: wk(operator) return left return parse1_ternary_expression_list__X_any_expresion(left, operator) # # 20. Subscript-Expression # # # 21. Subscript-Expression-List # # # 22. Map-Element # 23. Map-Element # # # 24. Yield-Expression # # # 25. Comprehension-Expression-List (Python 2.7.14rc1 grammer calls this 'testlist_comp') # def parse1_comprehension_expression__left_operator(left, operator): assert operator.is_keyword_for while 7 is 7: if operator.is_keyword_for: middle = parse1_normal_expression_list() in_operator = qk() wk(none) if not in_operator.is_keyword_in: #my_line('left: %r; operator: %r; middle: %r; in_operator: %r; s: %s', # left, operator, middle, in_operator, portray_string(qs()[qj():])) raise_unknown_line() left = conjure_comprehension_for(left, operator, middle, in_operator, parse1_boolean_or_expression()) operator = qk() if (operator is none) or (operator.is_end_of_comprehension_expression_list): return left wk(none) if operator.is_keyword_if: left = conjure_comprehension_if(left, operator, parse1_boolean_or_expression()) operator = qk() if (operator is none) or (operator.is_end_of_comprehension_expression_list): return left wk(none) assert (operator.is_keyword_for) or (operator.is_keyword_if) @share def parse1_comprehension_expression__X__any_expression(left, operator): if operator.is_postfix_operator: left = parse1_postfix_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_power_operator: left = parse1_power_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_multiply_operator: left = parse1_multiply_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_arithmetic_operator: left = parse1_arithmetic_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_compare_operator: left = parse1_compare_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_logical_and_operator: left = parse1_logical_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_logical_or_operator: left = parse1_normal_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_keyword_and: left = parse1_boolean_and_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_keyword_or: left = parse1_boolean_or_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_keyword_if: left = parse1_ternary_expression__left_operator(left, operator) operator = qk() if operator is none: if qn() is none: raise_unknown_line() return left if operator.is_end_of_comprehension_expression: return left wk(none) if operator.is_keyword_for: return parse1_comprehension_expression__left_operator(left, operator) my_line('left: %r; operator: %r; s: %s', left, operator, portray_string(qs()[qj():])) raise_unknown_line()
27.511558
125
0.521683
6,386
64,267
4.911369
0.029283
0.101071
0.10866
0.05213
0.889364
0.853239
0.834205
0.814501
0.763646
0.716522
0
0.011555
0.419624
64,267
2,335
126
27.52334
0.829325
0.070689
0
0.881805
0
0
0.001981
0.001259
0
0
0
0
0.011461
1
0.020774
false
0
0
0.002865
0.191977
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
5a5bd288bcfa07d59fd3dbc4da418866d417f910
45,733
py
Python
src/graphql/executor/test/introspect_all_fields.py
btrekkie/graphql
6c118550267eeb57a9653f4f46d7bbd6c5902110
[ "MIT" ]
null
null
null
src/graphql/executor/test/introspect_all_fields.py
btrekkie/graphql
6c118550267eeb57a9653f4f46d7bbd6c5902110
[ "MIT" ]
null
null
null
src/graphql/executor/test/introspect_all_fields.py
btrekkie/graphql
6c118550267eeb57a9653f4f46d7bbd6c5902110
[ "MIT" ]
null
null
null
import unittest from graphql.executor import GraphQlContext from graphql.executor import GraphQlExecutor from graphql.schema import GraphQlSchemaFactory class GraphQlIntrospectAllFieldsTest(unittest.TestCase): """Tests GraphQlExecutor on an introspection query for most everything. Tests GraphQlExecutor on an introspection query for most every piece of information about each of the types and directives. """ def _convert_lists_to_sets(self, value): """Convert lists to sets and non-hashable values to hashable values. Return a value that is the same as "value", but with lists changed to frozensets and dictionaries changed to hashable representations of themselves. The representation is many-to-one, though our goal is that different values will typically have different representations. obj value - The JSON value to convert. return obj - The representation. """ if isinstance(value, list): result = [] for element in value: result.append(self._convert_lists_to_sets(element)) return frozenset(result) elif isinstance(value, dict): items = [] for key in list(sorted(value.iterkeys())): items.append((key, self._convert_lists_to_sets(value[key]))) return tuple(items) else: return value def test_introspection(self): """Test GraphQlExecutor on an introspection query for most everything. Test GraphQlExecutor on an introspection query for most every piece of information about each of the types. """ schema = GraphQlSchemaFactory.create_from_modules( [ 'graphql.executor.test.star_wars', 'graphql.scalar_descriptors.strict'], 'Query', None) context = GraphQlContext(schema) result = GraphQlExecutor.execute( 'query {__schema {types {' 'kind, name, fields {' 'name, args {name, type {...TypeFields}}, isDeprecated, ' 'deprecationReason, type {...TypeFields}},' 'interfaces {name}, possibleTypes {name},' 'enumValues {name, isDeprecated, deprecationReason}, ' 'inputFields {name}, ofType {name}}}}' 'fragment TypeFields on __Type {' 'name, kind, ofType {name, kind, ofType {' 'name, kind, ofType {name, kind, ofType {name}}}}}', context) self.assertEqual(['data'], list(result.iterkeys())) self.assertEqual(['__schema'], list(result['data'].iterkeys())) self.assertEqual( ['types'], list(result['data']['__schema'].iterkeys())) expected_types = [ { 'enumValues': None, 'fields': None, 'inputFields': None, 'interfaces': None, 'kind': 'SCALAR', 'name': 'Boolean', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': [ { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'appearsIn', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'ENUM', 'name': 'Episode', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'friends', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'INTERFACE', 'name': 'Character', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'id', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'name', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, ], 'inputFields': None, 'interfaces': None, 'kind': 'INTERFACE', 'name': 'Character', 'ofType': None, 'possibleTypes': [ {'name': 'Droid'}, {'name': 'Human'}, ], }, { 'enumValues': None, 'fields': [ { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'appearsIn', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'ENUM', 'name': 'Episode', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'friends', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'INTERFACE', 'name': 'Character', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'id', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'name', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'primaryFunction', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, ], 'inputFields': None, 'interfaces': [{'name': 'Character'}], 'kind': 'OBJECT', 'name': 'Droid', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': [ { 'deprecationReason': None, 'isDeprecated': False, 'name': 'NEWHOPE', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'EMPIRE', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'JEDI', }, ], 'fields': None, 'inputFields': None, 'interfaces': None, 'kind': 'ENUM', 'name': 'Episode', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': None, 'inputFields': None, 'interfaces': None, 'kind': 'SCALAR', 'name': 'Float', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': [ { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'appearsIn', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'ENUM', 'name': 'Episode', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'friends', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'INTERFACE', 'name': 'Character', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'homePlanet', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'id', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'name', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, ], 'inputFields': None, 'interfaces': [{'name': 'Character'}], 'kind': 'OBJECT', 'name': 'Human', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': None, 'inputFields': None, 'interfaces': None, 'kind': 'SCALAR', 'name': 'ID', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': None, 'inputFields': None, 'interfaces': None, 'kind': 'SCALAR', 'name': 'Int', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': [ { 'args': [ { 'name': 'id', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, }, ], 'deprecationReason': None, 'isDeprecated': False, 'name': 'droid', 'type': { 'kind': 'OBJECT', 'name': 'Droid', 'ofType': None, }, }, { 'args': [ { 'name': 'episode', 'type': { 'kind': 'ENUM', 'name': 'Episode', 'ofType': None, }, }, ], 'deprecationReason': None, 'isDeprecated': False, 'name': 'hero', 'type': { 'kind': 'INTERFACE', 'name': 'Character', 'ofType': None, }, }, { 'args': [ { 'name': 'id', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, }, ], 'deprecationReason': None, 'isDeprecated': False, 'name': 'human', 'type': { 'kind': 'OBJECT', 'name': 'Human', 'ofType': None, }, }, ], 'inputFields': None, 'interfaces': [], 'kind': 'OBJECT', 'name': 'Query', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': None, 'inputFields': None, 'interfaces': None, 'kind': 'SCALAR', 'name': 'String', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': [ { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'args', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__InputValue', 'ofType': None, }, }, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'description', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'locations', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'ENUM', 'name': '__DirectiveLocation', 'ofType': None, }, }, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'name', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, }, ], 'inputFields': None, 'interfaces': [], 'kind': 'OBJECT', 'name': '__Directive', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': [ { 'deprecationReason': None, 'isDeprecated': False, 'name': 'FIELD', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'FRAGMENT_DEFINITION', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'FRAGMENT_SPREAD', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'INLINE_FRAGMENT', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'MUTATION', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'QUERY', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'SUBSCRIPTION', }, ], 'fields': None, 'inputFields': None, 'interfaces': None, 'kind': 'ENUM', 'name': '__DirectiveLocation', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': [ { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'deprecationReason', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'description', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'isDeprecated', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'Boolean', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'name', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, }, ], 'inputFields': None, 'interfaces': [], 'kind': 'OBJECT', 'name': '__EnumValue', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': [ { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'args', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__InputValue', 'ofType': None, }, }, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'deprecationReason', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'description', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'isDeprecated', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'Boolean', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'name', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'type', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, }, }, }, ], 'inputFields': None, 'interfaces': [], 'kind': 'OBJECT', 'name': '__Field', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': [ { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'defaultValue', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'description', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'name', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'type', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, }, }, }, ], 'inputFields': None, 'interfaces': [], 'kind': 'OBJECT', 'name': '__InputValue', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': [ { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'directives', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__Directive', 'ofType': None, }, }, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'mutationType', 'type': { 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'queryType', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'subscriptionType', 'type': { 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'types', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, }, }, }, }, }, ], 'inputFields': None, 'interfaces': [], 'kind': 'OBJECT', 'name': '__Schema', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': None, 'fields': [ { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'description', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [ { 'name': 'includeDeprecated', 'type': { 'kind': 'SCALAR', 'name': 'Boolean', 'ofType': None, }, }, ], 'deprecationReason': None, 'isDeprecated': False, 'name': 'enumValues', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__EnumValue', 'ofType': None, }, }, }, }, { 'args': [ { 'name': 'includeDeprecated', 'type': { 'kind': 'SCALAR', 'name': 'Boolean', 'ofType': None, }, }, ], 'deprecationReason': None, 'isDeprecated': False, 'name': 'fields', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__Field', 'ofType': None, }, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'inputFields', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__InputValue', 'ofType': None, }, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'interfaces', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, }, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'kind', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'ENUM', 'name': '__TypeKind', 'ofType': None, }, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'name', 'type': { 'kind': 'SCALAR', 'name': 'String', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'ofType', 'type': { 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, }, }, { 'args': [], 'deprecationReason': None, 'isDeprecated': False, 'name': 'possibleTypes', 'type': { 'kind': 'LIST', 'name': None, 'ofType': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, }, }, }, }, ], 'inputFields': None, 'interfaces': [], 'kind': 'OBJECT', 'name': '__Type', 'ofType': None, 'possibleTypes': None, }, { 'enumValues': [ { 'deprecationReason': None, 'isDeprecated': False, 'name': 'ENUM', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'INPUT_OBJECT', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'INTERFACE', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'LIST', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'NON_NULL', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'OBJECT', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'SCALAR', }, { 'deprecationReason': None, 'isDeprecated': False, 'name': 'UNION', }, ], 'fields': None, 'inputFields': None, 'interfaces': None, 'kind': 'ENUM', 'name': '__TypeKind', 'ofType': None, 'possibleTypes': None, }, ] self.assertEqual( self._convert_lists_to_sets(expected_types), self._convert_lists_to_sets(result['data']['__schema']['types'])) def test_directive_introspection(self): """Test GraphQlExecutor on an introspection query for directives. Test GraphQlExecutor on an introspection query for most every piece of information about each of the directives. """ schema = GraphQlSchemaFactory.create_from_modules([ 'graphql.executor.test.star_wars', 'graphql.scalar_descriptors.strict']) context = GraphQlContext(schema) result = GraphQlExecutor.execute( 'query {__schema {directives {' 'name, locations, args {' 'name, type {name, kind, ofType {name, kind, ofType {' 'name, kind, ofType {name, kind}}}}}}}}', context) self.assertEqual(['data'], list(result.iterkeys())) self.assertEqual(['__schema'], list(result['data'].iterkeys())) self.assertEqual( ['directives'], list(result['data']['__schema'].iterkeys())) expected_directives = [ { 'args': [ { 'name': 'if', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'Boolean', 'ofType': None, }, }, }, ], 'locations': [ 'FIELD', 'FRAGMENT_DEFINITION', 'FRAGMENT_SPREAD', 'INLINE_FRAGMENT', ], 'name': 'include', }, { 'args': [ { 'name': 'if', 'type': { 'kind': 'NON_NULL', 'name': None, 'ofType': { 'kind': 'SCALAR', 'name': 'Boolean', 'ofType': None, }, }, }, ], 'locations': [ 'FIELD', 'FRAGMENT_DEFINITION', 'FRAGMENT_SPREAD', 'INLINE_FRAGMENT', ], 'name': 'skip', }, ] self.assertEqual( self._convert_lists_to_sets(expected_directives), self._convert_lists_to_sets( result['data']['__schema']['directives']))
38.110833
78
0.246605
1,845
45,733
6.029268
0.082927
0.066523
0.198759
0.228875
0.864257
0.81877
0.771575
0.763664
0.710805
0.682039
0
0
0.649181
45,733
1,199
79
38.142619
0.693343
0.020991
0
0.664953
0
0
0.182055
0.002868
0
0
0
0
0.006855
1
0.002571
false
0
0.003428
0
0.009426
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
ce53cfe9ac19ca4bbb15a20e3e7c92dae69f043b
125,337
py
Python
sdk/storage/azure-storage-blob/tests/test_blob_access_conditions_async.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/storage/azure-storage-blob/tests/test_blob_access_conditions_async.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/storage/azure-storage-blob/tests/test_blob_access_conditions_async.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import pytest import asyncio from datetime import datetime, timedelta import os import unittest from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.core import MatchConditions from azure.core.exceptions import HttpResponseError, ResourceNotFoundError, ResourceModifiedError from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy from azure.storage.blob import ( StorageErrorCode, BlobBlock, BlobType, ContentSettings, BlobProperties, ContainerSasPermissions, AccessPolicy, generate_account_sas, ResourceTypes, AccountSasPermissions, generate_blob_sas, BlobSasPermissions, generate_container_sas, CustomerProvidedEncryptionKey, ) from fake_credentials import CPK_KEY_HASH, CPK_KEY_VALUE from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase from azure.storage.blob.aio import ( BlobServiceClient, ContainerClient, BlobClient, BlobLeaseClient, ) # ------------------------------------------------------------------------------ LARGE_APPEND_BLOB_SIZE = 64 * 1024 # ------------------------------------------------------------------------------ class AiohttpTestTransport(AioHttpTransport): """Workaround to vcrpy bug: https://github.com/kevin1024/vcrpy/pull/461 """ async def send(self, request, **config): response = await super(AiohttpTestTransport, self).send(request, **config) if not isinstance(response.headers, CIMultiDictProxy): response.headers = CIMultiDictProxy(CIMultiDict(response.internal_response.headers)) response.content_type = response.headers.get("content-type") return response class StorageBlobAccessConditionsAsyncTest(AsyncStorageTestCase): def _setup(self): self.container_name = self.get_resource_name('utcontainer') # --Helpers----------------------------------------------------------------- async def _create_container(self, container_name, bsc): container = bsc.get_container_client(container_name) await container.create_container() return container async def _create_container_and_block_blob(self, container_name, blob_name, blob_data, bsc): container = await self._create_container(container_name, bsc) blob = bsc.get_blob_client(container_name, blob_name) resp = await blob.upload_blob(blob_data, length=len(blob_data)) self.assertIsNotNone(resp.get('etag')) return container, blob async def _create_container_and_page_blob(self, container_name, blob_name, content_length, bsc): container = await self._create_container(container_name, bsc) blob = bsc.get_blob_client(container_name, blob_name) resp = await blob.create_page_blob(str(content_length)) return container, blob async def _create_container_and_append_blob(self, container_name, blob_name, bsc): container = await self._create_container(container_name, bsc) blob = bsc.get_blob_client(container_name, blob_name) resp = await blob.create_append_blob() return container, blob # --Test cases for blob service -------------------------------------------- @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_service_client_from_container( self, storage_account_name, storage_account_key): bsc1 = BlobServiceClient( self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container_client1 = await self._create_container(self.container_name, bsc1) await container_client1.get_container_properties() test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act metadata = {'hello': 'world', 'number': '43'} # Set metadata to check against later await container_client1.set_container_metadata(metadata, if_modified_since=test_datetime) # Assert metadata is set cc1_props = await container_client1.get_container_properties() cc1_md1 = cc1_props.metadata self.assertDictEqual(metadata, cc1_md1) # Get blob service client from container client bsc_props1 = await bsc1.get_service_properties() bsc2 = container_client1._get_blob_service_client() bsc_props2 = await bsc2.get_service_properties() self.assertDictEqual(bsc_props1, bsc_props2) # Return to container and assert its properties container_client2 = bsc2.get_container_client(self.container_name) cc2_props = await container_client2.get_container_properties() cc2_md1 = cc2_props.metadata self.assertDictEqual(cc2_md1, cc1_md1) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_container_client_from_blob(self, storage_account_name, storage_account_key): bsc = BlobServiceClient( self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container_client1 = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act metadata = {'hello': 'world', 'number': '43'} # Set metadata to check against later await container_client1.set_container_metadata(metadata, if_modified_since=test_datetime) # Assert metadata is set props1 = await container_client1.get_container_properties() md1 = props1.metadata self.assertDictEqual(metadata, md1) # Create a blob from container_client1 blob_name = self.get_resource_name("testblob1") blob_client1 = container_client1.get_blob_client(blob_name) # Upload data to blob and get container_client again await blob_client1.upload_blob(b"this is test data") downloaded_blob1 = await blob_client1.download_blob() blob_client1_data = await downloaded_blob1.readall() container_client2 = blob_client1._get_container_client() props2 = await container_client2.get_container_properties() md2 = props2.metadata self.assertEqual(md1, md2) # Ensure we can get blob client again blob_client2 = container_client2.get_blob_client(blob_name) downloaded_blob2 = await blob_client2.download_blob() blob_client2_data = await downloaded_blob2.readall() self.assertEqual(blob_client1_data, blob_client2_data) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_container_metadata_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act metadata = {'hello': 'world', 'number': '43'} await container.set_container_metadata(metadata, if_modified_since=test_datetime) # Assert md = (await container.get_container_properties()).metadata self.assertDictEqual(metadata, md) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_container_md_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: metadata = {'hello': 'world', 'number': '43'} await container.set_container_metadata(metadata, if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_container_acl_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act access_policy = AccessPolicy(permission=ContainerSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), start=datetime.utcnow()) signed_identifiers = {'testid': access_policy} await container.set_container_access_policy(signed_identifiers, if_modified_since=test_datetime) # Assert acl = await container.get_container_access_policy() self.assertIsNotNone(acl) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_container_acl_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act access_policy = AccessPolicy(permission=ContainerSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), start=datetime.utcnow()) signed_identifiers = {'testid': access_policy} with self.assertRaises(ResourceModifiedError) as e: await container.set_container_access_policy(signed_identifiers, if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_container_acl_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act access_policy = AccessPolicy(permission=ContainerSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), start=datetime.utcnow()) signed_identifiers = {'testid': access_policy} await container.set_container_access_policy(signed_identifiers, if_unmodified_since=test_datetime) # Assert acl = await container.get_container_access_policy() self.assertIsNotNone(acl) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_container_acl_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act access_policy = AccessPolicy(permission=ContainerSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), start=datetime.utcnow()) signed_identifiers = {'testid': access_policy} with self.assertRaises(ResourceModifiedError) as e: await container.set_container_access_policy(signed_identifiers, if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_container_acquire_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act lease = await container.acquire_lease(if_modified_since=test_datetime) await lease.break_lease() # Assert @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_cont_acquire_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await container.acquire_lease(if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_container_acquire_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act lease = await container.acquire_lease(if_unmodified_since=test_datetime) await lease.break_lease() # Assert @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_container_acquire_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await container.acquire_lease(if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_container_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act deleted = await container.delete_container(if_modified_since=test_datetime) # Assert self.assertIsNone(deleted) with self.assertRaises(ResourceNotFoundError): await container.get_container_properties() @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_container_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await container.delete_container(if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_container_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act await container.delete_container(if_unmodified_since=test_datetime) # Assert with self.assertRaises(ResourceNotFoundError): await container.get_container_properties() @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_container_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await container.delete_container(if_unmodified_since=test_datetime) self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_multi_put_block_contains_headers(self, storage_account_name, storage_account_key): counter = list() def _validate_headers(request): counter.append(request) header = request.http_request.headers.get('x-custom-header') self.assertEqual(header, 'test_value') bsc = BlobServiceClient( self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=100, max_block_size=50) self._setup() data = self.get_random_bytes(2 * 100) await self._create_container(self.container_name, bsc) blob = bsc.get_blob_client(self.container_name, "blob1") await blob.upload_blob( data, headers={'x-custom-header': 'test_value'}, raw_request_hook=_validate_headers ) self.assertEqual(len(counter), 5) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_blob_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', data, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act resp = await blob.upload_blob(data, length=len(data), if_modified_since=test_datetime) # Assert self.assertIsNotNone(resp.get('etag')) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', data, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.upload_blob(data, length=len(data), if_modified_since=test_datetime, overwrite=True) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_blob_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', data, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act resp = await blob.upload_blob(data, length=len(data), if_unmodified_since=test_datetime) # Assert self.assertIsNotNone(resp.get('etag')) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', data, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.upload_blob(data, length=len(data), if_unmodified_since=test_datetime, overwrite=True) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_blob_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', data, bsc) etag = (await blob.get_blob_properties()).etag # Act resp = await blob.upload_blob(data, length=len(data), etag=etag, match_condition=MatchConditions.IfNotModified) # Assert self.assertIsNotNone(resp.get('etag')) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_blob_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', data, bsc) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.upload_blob( data, length=len(data), etag='0x111111111111111', match_condition=MatchConditions.IfNotModified, overwrite=True) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_blob_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', data, bsc) # Act resp = await blob.upload_blob(data, length=len(data), etag='0x111111111111111', match_condition=MatchConditions.IfModified) # Assert self.assertIsNotNone(resp.get('etag')) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', data, bsc) etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: await blob.upload_blob(data, length=len(data), etag=etag, match_condition=MatchConditions.IfModified, overwrite=True) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act content = await blob.download_blob(if_modified_since=test_datetime) content = await content.readall() # Assert self.assertEqual(content, b'hello world') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.download_blob(if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act content = await blob.download_blob(if_unmodified_since=test_datetime) content = await content.readall() # Assert self.assertEqual(content, b'hello world') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.download_blob(if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) etag = (await blob.get_blob_properties()).etag # Act content = await blob.download_blob(etag=etag, match_condition=MatchConditions.IfNotModified) content = await content.readall() # Assert self.assertEqual(content, b'hello world') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.download_blob(etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act content = await blob.download_blob(etag='0x111111111111111', match_condition=MatchConditions.IfModified) content = await content.readall() # Assert self.assertEqual(content, b'hello world') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: await blob.download_blob(etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_props_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act content_settings = ContentSettings( content_language='spanish', content_disposition='inline') blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_http_headers(content_settings, if_modified_since=test_datetime) # Assert properties = await blob.get_blob_properties() self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_props_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: content_settings = ContentSettings( content_language='spanish', content_disposition='inline') blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_http_headers(content_settings, if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_props_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act content_settings = ContentSettings( content_language='spanish', content_disposition='inline') blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_http_headers(content_settings, if_unmodified_since=test_datetime) # Assert properties = await blob.get_blob_properties() self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_props_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: content_settings = ContentSettings( content_language='spanish', content_disposition='inline') blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_http_headers(content_settings, if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_props_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act content_settings = ContentSettings( content_language='spanish', content_disposition='inline') await blob.set_http_headers(content_settings, etag=etag, match_condition=MatchConditions.IfNotModified) # Assert properties = await blob.get_blob_properties() self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_props_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act with self.assertRaises(ResourceModifiedError) as e: content_settings = ContentSettings( content_language='spanish', content_disposition='inline') blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_http_headers(content_settings, etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_props_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act content_settings = ContentSettings( content_language='spanish', content_disposition='inline') blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_http_headers(content_settings, etag='0x111111111111111', match_condition=MatchConditions.IfModified) # Assert properties = await blob.get_blob_properties() self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_props_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: content_settings = ContentSettings( content_language='spanish', content_disposition='inline') await blob.set_http_headers(content_settings, etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @pytest.mark.playback_test_only @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_if_blob_exists(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') old_blob_props = await blob.get_blob_properties() old_blob_version_id = old_blob_props.get("version_id") self.assertIsNotNone(old_blob_version_id) await blob.stage_block(block_id='1', data="this is test content") await blob.commit_block_list(['1']) new_blob_props = await blob.get_blob_properties() new_blob_version_id = new_blob_props.get("version_id") # Assert self.assertEqual(await blob.exists(version_id=old_blob_version_id), True) self.assertEqual(await blob.exists(version_id=new_blob_version_id), True) self.assertEqual(await blob.exists(version_id="2020-08-21T21:24:15.3585832Z"), False) # Act test_snapshot = await blob.create_snapshot() blob_snapshot = bsc.get_blob_client(self.container_name, 'blob1', snapshot=test_snapshot) self.assertEqual(await blob_snapshot.exists(), True) await blob.stage_block(block_id='1', data="this is additional test content") await blob.commit_block_list(['1']) # Assert self.assertEqual(await blob_snapshot.exists(), True) self.assertEqual(await blob.exists(), True) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_if_blob_with_cpk_exists(self, storage_account_name, storage_account_key): container_name = self.get_resource_name("testcontainer1") cc = ContainerClient( self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name=container_name, connection_data_block_size=4 * 1024) await cc.create_container() self._setup() test_cpk = CustomerProvidedEncryptionKey(key_value=CPK_KEY_VALUE, key_hash=CPK_KEY_HASH) blob_client = cc.get_blob_client("test_blob") await blob_client.upload_blob(b"hello world", cpk=test_cpk) # Act self.assertTrue(await blob_client.exists()) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_properties_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') properties = await blob.get_blob_properties(if_modified_since=test_datetime) # Assert self.assertIsInstance(properties, BlobProperties) self.assertEqual(properties.blob_type.value, 'BlockBlob') self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_properties_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.get_blob_properties(if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_properties_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') properties = await blob.get_blob_properties(if_unmodified_since=test_datetime) # Assert self.assertIsNotNone(properties) self.assertEqual(properties.blob_type.value, 'BlockBlob') self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_properties_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.get_blob_properties(if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_properties_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act properties = await blob.get_blob_properties(etag=etag, match_condition=MatchConditions.IfNotModified) # Assert self.assertIsNotNone(properties) self.assertEqual(properties.blob_type.value, 'BlockBlob') self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_properties_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.get_blob_properties(etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_properties_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') properties = await blob.get_blob_properties(etag='0x111111111111111', match_condition=MatchConditions.IfModified) # Assert self.assertIsNotNone(properties) self.assertEqual(properties.blob_type.value, 'BlockBlob') self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_properties_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: await blob.get_blob_properties(etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_metadata_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') md = (await blob.get_blob_properties(if_modified_since=test_datetime)).metadata # Assert self.assertIsNotNone(md) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_metadata_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.get_blob_properties(if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_metadata_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') md = (await blob.get_blob_properties(if_unmodified_since=test_datetime)).metadata # Assert self.assertIsNotNone(md) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_metadata_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.get_blob_properties(if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_metadata_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act md = (await blob.get_blob_properties(etag=etag, match_condition=MatchConditions.IfNotModified)).metadata # Assert self.assertIsNotNone(md) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_metadata_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.get_blob_properties(etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_metadata_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') md = (await blob.get_blob_properties(etag='0x111111111111111', match_condition=MatchConditions.IfModified)).metadata # Assert self.assertIsNotNone(md) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_metadata_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: await blob.get_blob_properties(etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_metadata_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act metadata = {'hello': 'world', 'number': '42'} blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_blob_metadata(metadata, if_modified_since=test_datetime) # Assert md = (await blob.get_blob_properties()).metadata self.assertDictEqual(metadata, md) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_metadata_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: metadata = {'hello': 'world', 'number': '42'} blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_blob_metadata(metadata, if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_metadata_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act metadata = {'hello': 'world', 'number': '42'} blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_blob_metadata(metadata, if_unmodified_since=test_datetime) # Assert md = (await blob.get_blob_properties()).metadata self.assertDictEqual(metadata, md) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_metadata_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: metadata = {'hello': 'world', 'number': '42'} blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_blob_metadata(metadata, if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_metadata_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act metadata = {'hello': 'world', 'number': '42'} await blob.set_blob_metadata(metadata, etag=etag, match_condition=MatchConditions.IfNotModified) # Assert md = (await blob.get_blob_properties()).metadata self.assertDictEqual(metadata, md) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_metadata_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act with self.assertRaises(ResourceModifiedError) as e: metadata = {'hello': 'world', 'number': '42'} blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_blob_metadata(metadata, etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_metadata_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act metadata = {'hello': 'world', 'number': '42'} blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.set_blob_metadata(metadata, etag='0x111111111111111', match_condition=MatchConditions.IfModified) # Assert md = (await blob.get_blob_properties()).metadata self.assertDictEqual(metadata, md) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_set_blob_metadata_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: metadata = {'hello': 'world', 'number': '42'} await blob.set_blob_metadata(metadata, etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_blob_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() test_datetime = (datetime.utcnow() - timedelta(minutes=15)) await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') resp = await blob.delete_blob(if_modified_since=test_datetime) # Assert self.assertIsNone(resp) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() test_datetime = (datetime.utcnow() + timedelta(minutes=15)) await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') with self.assertRaises(ResourceModifiedError) as e: await blob.delete_blob(if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_blob_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() test_datetime = (datetime.utcnow() + timedelta(minutes=15)) await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') resp = await blob.delete_blob(if_unmodified_since=test_datetime) # Assert self.assertIsNone(resp) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() test_datetime = (datetime.utcnow() - timedelta(minutes=15)) await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') with self.assertRaises(ResourceModifiedError) as e: await blob.delete_blob(if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_blob_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act resp = await blob.delete_blob(etag=etag, match_condition=MatchConditions.IfNotModified) # Assert self.assertIsNone(resp) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_blob_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') with self.assertRaises(ResourceModifiedError) as e: await blob.delete_blob(etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_blob_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') resp = await blob.delete_blob(etag='0x111111111111111', match_condition=MatchConditions.IfModified) # Assert self.assertIsNone(resp) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_delete_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: await blob.delete_blob(etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_snapshot_blob_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') resp = await blob.create_snapshot(if_modified_since=test_datetime) # Assert self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_snapshot_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.create_snapshot(if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_snapshot_blob_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') resp = await blob.create_snapshot(if_unmodified_since=test_datetime) # Assert self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_snapshot_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.create_snapshot(if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_snapshot_blob_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act resp = await blob.create_snapshot(etag=etag, match_condition=MatchConditions.IfNotModified) # Assert self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_snapshot_blob_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.create_snapshot(etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_snapshot_blob_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') resp = await blob.create_snapshot(etag='0x111111111111111', match_condition=MatchConditions.IfModified) # Assert self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_snapshot_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: await blob.create_snapshot(etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_blob_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_lease_id = '00000000-1111-2222-3333-444444444444' test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') lease = await blob.acquire_lease( if_modified_since=test_datetime, lease_id=test_lease_id) await lease.break_lease() # Assert self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.acquire_lease(if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_blob_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_lease_id = '00000000-1111-2222-3333-444444444444' test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') lease = await blob.acquire_lease( if_unmodified_since=test_datetime, lease_id=test_lease_id) await lease.break_lease() # Assert self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') with self.assertRaises(ResourceModifiedError) as e: await blob.acquire_lease(if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_blob_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag test_lease_id = '00000000-1111-2222-3333-444444444444' # Act lease = await blob.acquire_lease( lease_id=test_lease_id, etag=etag, match_condition=MatchConditions.IfNotModified) await lease.break_lease() # Assert self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) self.assertIsNotNone(lease.etag) self.assertEqual(lease.etag, etag) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_blob_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) # Act blob = bsc.get_blob_client(self.container_name, 'blob1') with self.assertRaises(ResourceModifiedError) as e: await blob.acquire_lease(etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_blob_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) test_lease_id = '00000000-1111-2222-3333-444444444444' # Act blob = bsc.get_blob_client(self.container_name, 'blob1') lease = await blob.acquire_lease( lease_id=test_lease_id, etag='0x111111111111111', match_condition=MatchConditions.IfModified) await lease.break_lease() # Assert self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_lease_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: await blob.acquire_lease(etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_list_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) await asyncio.gather(*[ blob.stage_block('1', b'AAA'), blob.stage_block('2', b'BBB'), blob.stage_block('3', b'CCC')]) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')] await blob.commit_block_list(block_list, if_modified_since=test_datetime) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(content, b'AAABBBCCC') @pytest.mark.playback_test_only @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_list_returns_vid(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) await asyncio.gather(*[ blob.stage_block('1', b'AAA'), blob.stage_block('2', b'BBB'), blob.stage_block('3', b'CCC')]) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')] resp = await blob.commit_block_list(block_list, if_modified_since=test_datetime) # Assert self.assertIsNotNone(resp['version_id']) content = await blob.download_blob() content = await content.readall() self.assertEqual(content, b'AAABBBCCC') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_list_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) await asyncio.gather(*[ blob.stage_block('1', b'AAA'), blob.stage_block('2', b'BBB'), blob.stage_block('3', b'CCC')]) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.commit_block_list( [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')], if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_list_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) await asyncio.gather(*[ blob.stage_block('1', b'AAA'), blob.stage_block('2', b'BBB'), blob.stage_block('3', b'CCC')]) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')] await blob.commit_block_list(block_list, if_unmodified_since=test_datetime) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(content, b'AAABBBCCC') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_list_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) await asyncio.gather(*[ blob.stage_block('1', b'AAA'), blob.stage_block('2', b'BBB'), blob.stage_block('3', b'CCC')]) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.commit_block_list( [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')], if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_list_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) await asyncio.gather(*[ blob.stage_block('1', b'AAA'), blob.stage_block('2', b'BBB'), blob.stage_block('3', b'CCC')]) etag = (await blob.get_blob_properties()).etag # Act block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')] await blob.commit_block_list(block_list, etag=etag, match_condition=MatchConditions.IfNotModified) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(content, b'AAABBBCCC') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_list_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) await asyncio.gather(*[ blob.stage_block('1', b'AAA'), blob.stage_block('2', b'BBB'), blob.stage_block('3', b'CCC')]) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.commit_block_list( [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')], etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_list_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) await asyncio.gather(*[ blob.stage_block('1', b'AAA'), blob.stage_block('2', b'BBB'), blob.stage_block('3', b'CCC')]) # Act block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')] await blob.commit_block_list(block_list, etag='0x111111111111111', match_condition=MatchConditions.IfModified) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(content, b'AAABBBCCC') @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_list_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) await asyncio.gather(*[ blob.stage_block('1', b'AAA'), blob.stage_block('2', b'BBB'), blob.stage_block('3', b'CCC')]) etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')] await blob.commit_block_list(block_list, etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_update_page_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) data = b'abcdefghijklmnop' * 32 # Act blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.upload_page(data, offset=0, length=512, if_modified_since=test_datetime) # Assert @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_update_page_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) data = b'abcdefghijklmnop' * 32 # Act blob = bsc.get_blob_client(self.container_name, 'blob1') with self.assertRaises(ResourceModifiedError) as e: await blob.upload_page(data, offset=0, length=512, if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_update_page_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) data = b'abcdefghijklmnop' * 32 # Act blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.upload_page(data, offset=0, length=512, if_unmodified_since=test_datetime) # Assert @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_update_page_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) data = b'abcdefghijklmnop' * 32 # Act blob = bsc.get_blob_client(self.container_name, 'blob1') with self.assertRaises(ResourceModifiedError) as e: await blob.upload_page(data, offset=0, length=512, if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_update_page_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) data = b'abcdefghijklmnop' * 32 blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act await blob.upload_page(data, offset=0, length=512, etag=etag, match_condition=MatchConditions.IfNotModified) # Assert @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_update_page_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) data = b'abcdefghijklmnop' * 32 # Act blob = bsc.get_blob_client(self.container_name, 'blob1') with self.assertRaises(ResourceModifiedError) as e: await blob.upload_page(data, offset=0, length=512, etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_update_page_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) data = b'abcdefghijklmnop' * 32 # Act blob = bsc.get_blob_client(self.container_name, 'blob1') await blob.upload_page(data, offset=0, length=512, etag='0x111111111111111', match_condition=MatchConditions.IfModified) # Assert @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_update_page_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) data = b'abcdefghijklmnop' * 32 blob = bsc.get_blob_client(self.container_name, 'blob1') etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: await blob.upload_page(data, offset=0, length=512, etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_page_ranges_iter_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) data = b'abcdefghijklmnop' * 32 test_datetime = (datetime.utcnow() - timedelta(minutes=15)) await asyncio.gather(blob.upload_page(data, offset=0, length=512), blob.upload_page(data, offset=1024, length=512)) # Act ranges = await blob.get_page_ranges(if_modified_since=test_datetime) # Assert self.assertEqual(len(ranges[0]), 2) self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_page_ranges_iter_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) data = b'abcdefghijklmnop' * 32 test_datetime = (datetime.utcnow() + timedelta(minutes=15)) await asyncio.gather(blob.upload_page(data, offset=0, length=512), blob.upload_page(data, offset=1024, length=512)) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.get_page_ranges(if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_page_ranges_iter_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) data = b'abcdefghijklmnop' * 32 test_datetime = (datetime.utcnow() + timedelta(minutes=15)) await asyncio.gather(blob.upload_page(data, offset=0, length=512), blob.upload_page(data, offset=1024, length=512)) # Act ranges = await blob.get_page_ranges(if_unmodified_since=test_datetime) # Assert self.assertEqual(len(ranges[0]), 2) self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_page_ranges_iter_with_if_unmod_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) data = b'abcdefghijklmnop' * 32 test_datetime = (datetime.utcnow() - timedelta(minutes=15)) await asyncio.gather(blob.upload_page(data, offset=0, length=512), blob.upload_page(data, offset=1024, length=512)) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.get_page_ranges(if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_page_ranges_iter_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) data = b'abcdefghijklmnop' * 32 await asyncio.gather(blob.upload_page(data, offset=0, length=512), blob.upload_page(data, offset=1024, length=512)) etag = (await blob.get_blob_properties()).etag # Act ranges = await blob.get_page_ranges(etag=etag, match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(len(ranges[0]), 2) self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_page_ranges_iter_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) data = b'abcdefghijklmnop' * 32 await asyncio.gather(blob.upload_page(data, offset=0, length=512), blob.upload_page(data, offset=1024, length=512)) # Act with self.assertRaises(ResourceModifiedError) as e: await blob.get_page_ranges(etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_page_ranges_iter_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) data = b'abcdefghijklmnop' * 32 await asyncio.gather(blob.upload_page(data, offset=0, length=512), blob.upload_page(data, offset=1024, length=512)) # Act ranges = await blob.get_page_ranges(etag='0x111111111111111', match_condition=MatchConditions.IfModified) # Assert self.assertEqual(len(ranges[0]), 2) self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_page_ranges_iter_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) data = b'abcdefghijklmnop' * 32 await asyncio.gather(blob.upload_page(data, offset=0, length=512), blob.upload_page(data, offset=1024, length=512)) etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: await blob.get_page_ranges(etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_block_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act for i in range(5): resp = await blob.append_block(u'block {0}'.format(i), if_modified_since=test_datetime) self.assertIsNotNone(resp) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_block_with_if_modified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: for i in range(5): resp = await blob.append_block(u'block {0}'.format(i), if_modified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_block_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act for i in range(5): resp = await blob.append_block(u'block {0}'.format(i), if_unmodified_since=test_datetime) self.assertIsNotNone(resp) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_block_with_if_unmodified_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: for i in range(5): resp = await blob.append_block(u'block {0}'.format(i), if_unmodified_since=test_datetime) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_block_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) # Act for i in range(5): etag = (await blob.get_blob_properties()).etag resp = await blob.append_block(u'block {0}'.format(i), etag=etag, match_condition=MatchConditions.IfNotModified) self.assertIsNotNone(resp) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_block_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) # Act with self.assertRaises(HttpResponseError) as e: for i in range(5): resp = await blob.append_block(u'block {0}'.format(i), etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) # Assert #self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_block_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) # Act for i in range(5): resp = await blob.append_block(u'block {0}'.format(i), etag='0x8D2C9167D53FC2C', match_condition=MatchConditions.IfModified) self.assertIsNotNone(resp) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_block_with_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) # Act with self.assertRaises(ResourceModifiedError) as e: for i in range(5): etag = (await blob.get_blob_properties()).etag resp = await blob.append_block(u'block {0}'.format(i), etag=etag, match_condition=MatchConditions.IfModified) # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_blob_from_bytes_with_if_modified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act data = self.get_random_bytes(LARGE_APPEND_BLOB_SIZE) await blob.upload_blob(data, blob_type=BlobType.AppendBlob, if_modified_since=test_datetime) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(data, content) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_apnd_blob_from_bytes_with_if_mod_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: data = self.get_random_bytes(LARGE_APPEND_BLOB_SIZE) await blob.upload_blob(data, blob_type=BlobType.AppendBlob, if_modified_since=test_datetime) self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_blob_from_bytes_with_if_unmodified(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) test_datetime = (datetime.utcnow() + timedelta(minutes=15)) # Act data = self.get_random_bytes(LARGE_APPEND_BLOB_SIZE) await blob.upload_blob(data, blob_type=BlobType.AppendBlob, if_unmodified_since=test_datetime) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(data, content) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_blob_from_bytes_with_if_unmod_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) # Act with self.assertRaises(ResourceModifiedError) as e: data = self.get_random_bytes(LARGE_APPEND_BLOB_SIZE) await blob.upload_blob(data, blob_type=BlobType.AppendBlob, if_unmodified_since=test_datetime) self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_blob_from_bytes_with_if_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) test_etag = (await blob.get_blob_properties()).etag # Act data = self.get_random_bytes(LARGE_APPEND_BLOB_SIZE) await blob.upload_blob(data, blob_type=BlobType.AppendBlob, etag=test_etag, match_condition=MatchConditions.IfNotModified) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(data, content) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_blob_from_bytes_with_if_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) test_etag = '0x8D2C9167D53FC2C' # Act with self.assertRaises(ResourceModifiedError) as e: data = self.get_random_bytes(LARGE_APPEND_BLOB_SIZE) await blob.upload_blob(data, blob_type=BlobType.AppendBlob, etag=test_etag, match_condition=MatchConditions.IfNotModified) self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_append_blob_from_bytes_with_if_none_match(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) test_etag = '0x8D2C9167D53FC2C' # Act data = self.get_random_bytes(LARGE_APPEND_BLOB_SIZE) await blob.upload_blob(data, blob_type=BlobType.AppendBlob, etag=test_etag, match_condition=MatchConditions.IfModified) # Assert content = await blob.download_blob() content = await content.readall() self.assertEqual(data, content) @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_apnd_blob_from_bytes_if_none_match_fail(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) test_etag = (await blob.get_blob_properties()).etag # Act with self.assertRaises(ResourceModifiedError) as e: data = self.get_random_bytes(LARGE_APPEND_BLOB_SIZE) await blob.upload_blob(data, blob_type=BlobType.AppendBlob, etag=test_etag, match_condition=MatchConditions.IfModified) self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) # ------------------------------------------------------------------------------
49.895303
171
0.70916
14,321
125,337
5.850429
0.021926
0.088227
0.056717
0.045426
0.956913
0.95369
0.946314
0.941206
0.936348
0.930261
0
0.020459
0.197029
125,337
2,511
172
49.915173
0.812037
0.020592
0
0.810175
0
0
0.035224
0.001404
0
0
0.003887
0
0.131291
1
0.001094
false
0
0.008206
0
0.013129
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
ce5da1148fc6647bced30e60aad6ecd51bd9a263
91
py
Python
Python/HW_SO.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
1,428
2018-10-03T15:15:17.000Z
2019-03-31T18:38:36.000Z
Python/HW_SO.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
1,162
2018-10-03T15:05:49.000Z
2018-10-18T14:17:52.000Z
Python/HW_SO.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
3,909
2018-10-03T15:07:19.000Z
2019-03-31T18:39:08.000Z
print(" Hello, World! It's Sahaj Oberoi!!") print("Hello, World! It's Guneet Singh also!!")
45.5
47
0.681319
15
91
4.133333
0.666667
0.322581
0.483871
0.548387
0.580645
0
0
0
0
0
0
0
0.120879
91
2
47
45.5
0.775
0
0
0
0
0
0.782609
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
8
ce745924eb6b43a28e1a8fa2145bf9b04f5186a8
6,075
py
Python
smart_instant_pot/tests/test_message_bus.py
tdicola/Smart_Instant_Pot
b2e4b9deec3f1813f737c94041f315eccce9978d
[ "MIT" ]
3
2018-12-16T21:01:47.000Z
2021-03-17T19:10:27.000Z
smart_instant_pot/tests/test_message_bus.py
tdicola/Smart_Instant_Pot
b2e4b9deec3f1813f737c94041f315eccce9978d
[ "MIT" ]
null
null
null
smart_instant_pot/tests/test_message_bus.py
tdicola/Smart_Instant_Pot
b2e4b9deec3f1813f737c94041f315eccce9978d
[ "MIT" ]
null
null
null
# Smart Instant Pot Message Bus Tests # Author: Tony DiCola import time import unittest from smart_instant_pot.services.message_bus import SimpleMessageBus, RedisThreadedMessageBus class TestSimpleMessageBus(unittest.TestCase): def test_subscribe_and_publish_one_subscriber(self): # Test basic subscribe and publish to a channel works. bus = SimpleMessageBus() callback_calls = [] def callback(channel, message): callback_calls.append({'channel': channel, 'message': message}) bus.subscribe('foo', callback) bus.publish('foo', 'bar') self.assertEqual(len(callback_calls), 1) self.assertDictEqual(callback_calls[0], {'channel': b'foo', 'message': b'bar'}) def test_subscribe_and_publish_multi_subscriber(self): # Test multiple subscribers receive the same published message. bus = SimpleMessageBus() callback1_calls = [] def callback1(channel, message): callback1_calls.append({'channel': channel, 'message': message}) callback2_calls = [] def callback2(channel, message): callback2_calls.append({'channel': channel, 'message': message}) bus.subscribe('foo', callback1) bus.subscribe('foo', callback2) bus.publish('foo', 'bar') self.assertEqual(len(callback1_calls), 1) self.assertDictEqual(callback1_calls[0], {'channel': b'foo', 'message': b'bar'}) self.assertEqual(len(callback2_calls), 1) self.assertDictEqual(callback2_calls[0], {'channel': b'foo', 'message': b'bar'}) def test_subscribe_then_unsubscribe_and_publish(self): # Test unsubscribe removes a subscriber from future notifications. bus = SimpleMessageBus() callback_calls = [] def callback(channel, message): callback_calls.append({'channel': channel, 'message': message}) bus.subscribe('foo', callback) bus.publish('foo', 'bar') bus.unsubscribe('foo', callback) bus.publish('foo', 'baz') self.assertEqual(len(callback_calls), 1) self.assertDictEqual(callback_calls[0], {'channel': b'foo', 'message': b'bar'}) def test_publish_no_subscribers_does_nothing(self): # Test publish does nothing when no subscribers are on the channel. bus = SimpleMessageBus() callback_calls = [] def callback(channel, message): callback_calls.append({'channel': channel, 'message': message}) bus.subscribe('foo', callback) bus.publish('bar', 'bar') self.assertEqual(len(callback_calls), 0) #@unittest.skip("Redis message bus integration tests must be manually run with redis.") class TestRedisThreadedMessageBus(unittest.TestCase): REDIS_HOST = 'redis' DELIVER_DELAY = 2.0 # Time to wait for messages to be delivered. # Simple but not ideal (consider polling for expected # state). def setUp(self): self._bus = RedisThreadedMessageBus(namespace='test', host=self.REDIS_HOST) def tearDown(self): self._bus.deinit() self._bus = None def test_subscribe_and_publish_one_subscriber(self): # Test basic subscribe and publish to a channel works. callback_calls = [] def callback(channel, message): callback_calls.append({'channel': channel, 'message': message}) self._bus.subscribe('foo', callback) self._bus.publish('foo', 'bar') time.sleep(self.DELIVER_DELAY) self.assertEqual(len(callback_calls), 1) self.assertDictEqual(callback_calls[0], {'channel': b'foo', 'message': b'bar'}) def test_subscribe_and_publish_multi_subscriber(self): # Test multiple subscribers receive the same published message. callback1_calls = [] def callback1(channel, message): callback1_calls.append({'channel': channel, 'message': message}) callback2_calls = [] def callback2(channel, message): callback2_calls.append({'channel': channel, 'message': message}) self._bus.subscribe('foo', callback1) self._bus.subscribe('foo', callback2) self._bus.publish('foo', 'bar') time.sleep(self.DELIVER_DELAY) self.assertEqual(len(callback1_calls), 1) self.assertDictEqual(callback1_calls[0], {'channel': b'foo', 'message': b'bar'}) self.assertEqual(len(callback2_calls), 1) self.assertDictEqual(callback2_calls[0], {'channel': b'foo', 'message': b'bar'}) def test_subscribe_then_unsubscribe_and_publish(self): # Test unsubscribe removes a subscriber from future notifications. callback_calls = [] def callback(channel, message): callback_calls.append({'channel': channel, 'message': message}) self._bus.subscribe('foo', callback) self._bus.publish('foo', 'bar') self._bus.unsubscribe('foo', callback) self._bus.publish('foo', 'baz') time.sleep(self.DELIVER_DELAY) self.assertEqual(len(callback_calls), 1) self.assertDictEqual(callback_calls[0], {'channel': b'foo', 'message': b'bar'}) def test_publish_no_subscribers_does_nothing(self): # Test publish does nothing when no subscribers are on the channel. callback_calls = [] def callback(channel, message): callback_calls.append({'channel': channel, 'message': message}) self._bus.subscribe('foo', callback) self._bus.publish('bar', 'bar') time.sleep(self.DELIVER_DELAY) self.assertEqual(len(callback_calls), 0)
44.021739
92
0.607243
630
6,075
5.693651
0.150794
0.079732
0.050181
0.069696
0.816002
0.808196
0.790354
0.785894
0.785894
0.781712
0
0.01005
0.279342
6,075
137
93
44.343066
0.809274
0.121152
0
0.785047
0
0
0.076071
0
0
0
0
0
0.168224
1
0.186916
false
0
0.028037
0
0.252336
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
ce93aede8ad02ee1ddc78593d230cb6bf7c95806
160
py
Python
geekshop/adminapp/utils.py
klim1286/django
d4d0fc73e920cfcbaa88ac37a0c37359836b6789
[ "MIT" ]
null
null
null
geekshop/adminapp/utils.py
klim1286/django
d4d0fc73e920cfcbaa88ac37a0c37359836b6789
[ "MIT" ]
null
null
null
geekshop/adminapp/utils.py
klim1286/django
d4d0fc73e920cfcbaa88ac37a0c37359836b6789
[ "MIT" ]
null
null
null
from django.contrib.auth.decorators import user_passes_test def superuser_required(function): return user_passes_test(lambda u: u.is_superuser)(function)
26.666667
63
0.825
23
160
5.478261
0.73913
0.15873
0.222222
0
0
0
0
0
0
0
0
0
0.1
160
5
64
32
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.666667
0.333333
0.333333
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
1
1
1
0
0
8
ced3f80c0b9fd5ba5f5b7017679b657ed57fcab0
174
py
Python
user/admin.py
Parametricall/portfolio_backend
ad00ee17536a49270137c69a53c7fa6869108094
[ "MIT" ]
null
null
null
user/admin.py
Parametricall/portfolio_backend
ad00ee17536a49270137c69a53c7fa6869108094
[ "MIT" ]
null
null
null
user/admin.py
Parametricall/portfolio_backend
ad00ee17536a49270137c69a53c7fa6869108094
[ "MIT" ]
null
null
null
# from django.contrib import admin # from django.contrib.auth.models import User # from django.contrib.auth.admin import UserAdmin # # # admin.site.register(User, UserAdmin)
24.857143
49
0.781609
24
174
5.666667
0.458333
0.220588
0.375
0.308824
0
0
0
0
0
0
0
0
0.114943
174
6
50
29
0.883117
0.925287
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
0c7d924427bf7c7771cbcbc10b5c795d5e8584fd
9,097
py
Python
ksteta3pi/PotentialBackgrounds/MC_12_13104093_MagUp.py.py
Williams224/davinci-scripts
730642d2ff13543eca4073a4ce0932631195de56
[ "MIT" ]
null
null
null
ksteta3pi/PotentialBackgrounds/MC_12_13104093_MagUp.py.py
Williams224/davinci-scripts
730642d2ff13543eca4073a4ce0932631195de56
[ "MIT" ]
null
null
null
ksteta3pi/PotentialBackgrounds/MC_12_13104093_MagUp.py.py
Williams224/davinci-scripts
730642d2ff13543eca4073a4ce0932631195de56
[ "MIT" ]
null
null
null
#-- GAUDI jobOptions generated on Fri Jul 24 17:21:43 2015 #-- Contains event types : #-- 13104093 - 92 files - 2038028 events - 551.09 GBytes #-- Extra information about the data processing phases: #-- Processing Pass Step-124834 #-- StepId : 124834 #-- StepName : Reco14a for MC #-- ApplicationName : Brunel #-- ApplicationVersion : v43r2p7 #-- OptionFiles : $APPCONFIGOPTS/Brunel/DataType-2012.py;$APPCONFIGOPTS/Brunel/MC-WithTruth.py;$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py #-- DDDB : fromPreviousStep #-- CONDDB : fromPreviousStep #-- ExtraPackages : AppConfig.v3r164 #-- Visible : Y #-- Processing Pass Step-125836 #-- StepId : 125836 #-- StepName : Stripping20-NoPrescalingFlagged for Sim08 - Implicit merging. #-- ApplicationName : DaVinci #-- ApplicationVersion : v32r2p1 #-- OptionFiles : $APPCONFIGOPTS/DaVinci/DV-Stripping20-Stripping-MC-NoPrescaling.py;$APPCONFIGOPTS/DaVinci/DataType-2012.py;$APPCONFIGOPTS/DaVinci/InputType-DST.py;$APPCONFIGOPTS/Persistency/Compression-ZLIB-1.py #-- DDDB : fromPreviousStep #-- CONDDB : fromPreviousStep #-- ExtraPackages : AppConfig.v3r164 #-- Visible : Y from Gaudi.Configuration import * from GaudiConf import IOHelper IOHelper('ROOT').inputFiles(['LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000001_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000002_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000003_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000004_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000005_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000006_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000007_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000008_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000009_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000010_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000011_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000012_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000013_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000014_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000015_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000016_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000017_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000018_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000019_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000020_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000021_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000022_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000023_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000024_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000025_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000026_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000027_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000028_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000029_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000030_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000031_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000032_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000033_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000034_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000035_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000041_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000042_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000043_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000044_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000045_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000046_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000047_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000048_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000049_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000050_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000051_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000052_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000053_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000054_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000055_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000056_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000057_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000058_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000059_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000060_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000061_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000062_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000063_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000064_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000065_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000066_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000067_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000068_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000069_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000070_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000071_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000072_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000073_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000074_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000075_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000076_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000077_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000078_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000079_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000080_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000081_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000082_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000083_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000084_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000085_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000086_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000087_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000088_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000089_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000090_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000091_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000092_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000093_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000094_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000095_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000096_2.AllStreams.dst', 'LFN:/lhcb/MC/2012/ALLSTREAMS.DST/00040734/0000/00040734_00000097_2.AllStreams.dst' ], clear=True)
70.51938
215
0.810157
1,329
9,097
5.407073
0.134688
0.332869
0.115224
0.166435
0.800167
0.800167
0.800167
0.800167
0.800167
0.793766
0
0.354649
0.03045
9,097
128
216
71.070313
0.460091
0.122018
0
0
1
0.968421
0.936448
0.935946
0
0
0
0
0
1
0
true
0
0.021053
0
0.021053
0
0
0
0
null
1
0
1
1
1
1
1
1
1
0
1
0
0
0
0
0
1
0
0
0
1
1
1
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
15
0caff21e8a5e8845f74544143a6735052b697d55
730
py
Python
__version__.py
pakal/multitimer
75a19880a367d83b6ad611e3e95518245e763685
[ "MIT" ]
null
null
null
__version__.py
pakal/multitimer
75a19880a367d83b6ad611e3e95518245e763685
[ "MIT" ]
null
null
null
__version__.py
pakal/multitimer
75a19880a367d83b6ad611e3e95518245e763685
[ "MIT" ]
null
null
null
# 88 88 88 # 88 ,d "" ,d "" # 88 88 88 # 88,dPYba,,adPYba, 88 88 88 MM88MMM 88 MM88MMM 88 88,dPYba,,adPYba, ,adPPYba, 8b,dPPYba, # 88P' "88" "8a 88 88 88 88 88 88 88 88P' "88" "8a a8P_____88 88P' "Y8 # 88 88 88 88 88 88 88 88 88 88 88 88 88 8PP""""""" 88 # 88 88 88 "8a, ,a88 88 88, 88 88, 88 88 88 88 "8b, ,aa 88 # 88 88 88 `"YbbdP'Y8 88 "Y888 88 "Y888 88 88 88 88 `"Ybbd8"' 88 __version__ = '0.2'
66.363636
108
0.330137
91
730
2.549451
0.230769
0.741379
0.853448
0.827586
0.241379
0.241379
0.241379
0.181034
0.112069
0.112069
0
0.491803
0.582192
730
10
109
73
0.268852
0.90137
0
0
0
0
0.103448
0
0
0
0
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
1
0
0
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0cc5760dbc616e5ff242860adc2cb8315ce5c498
7,807
py
Python
tests/q_functions_tests/test_state_action_q_function.py
ummavi/pfrl-1
e856a7cca30fcc3871024cdf7522d066006a5f0c
[ "MIT" ]
824
2020-07-29T00:30:14.000Z
2022-03-29T13:12:34.000Z
tests/q_functions_tests/test_state_action_q_function.py
ummavi/pfrl-1
e856a7cca30fcc3871024cdf7522d066006a5f0c
[ "MIT" ]
124
2020-07-30T01:53:47.000Z
2022-03-15T07:05:38.000Z
tests/q_functions_tests/test_state_action_q_function.py
ummavi/pfrl-1
e856a7cca30fcc3871024cdf7522d066006a5f0c
[ "MIT" ]
122
2020-07-29T04:33:35.000Z
2022-03-13T13:29:41.000Z
import unittest import basetest_state_action_q_function as base import pytest import torch.nn.functional as F import pfrl assertions = unittest.TestCase("__init__") @pytest.mark.parametrize("n_dim_obs", [1, 5]) @pytest.mark.parametrize("n_dim_action", [1, 3]) @pytest.mark.parametrize("n_hidden_layers", [0, 1, 2]) @pytest.mark.parametrize("n_hidden_channels", [1, 2]) @pytest.mark.parametrize("nonlinearity", ["relu", "elu"]) @pytest.mark.parametrize("last_wscale", [1, 1e-3]) class TestFCSAQFunction(base._TestSAQFunction): @pytest.fixture(autouse=True) def setUp( self, n_dim_obs, n_dim_action, n_hidden_layers, n_hidden_channels, nonlinearity, last_wscale, ): self.n_dim_obs = n_dim_obs self.n_dim_action = n_dim_action self.n_hidden_layers = n_hidden_layers self.n_hidden_channels = n_hidden_channels self.nonlinearity = nonlinearity self.last_wscale = last_wscale def _test_call(self, gpu): nonlinearity = getattr(F, self.nonlinearity) model = pfrl.q_functions.FCSAQFunction( n_dim_obs=self.n_dim_obs, n_dim_action=self.n_dim_action, n_hidden_layers=self.n_hidden_layers, n_hidden_channels=self.n_hidden_channels, nonlinearity=nonlinearity, last_wscale=self.last_wscale, ) self._test_call_given_model(model, gpu) def test_call_cpu(self): self._test_call(gpu=-1) @pytest.mark.gpu def test_call_gpu(self): self._test_call(gpu=0) @pytest.mark.skip @pytest.mark.parametrize("n_dim_obs", [1, 5]) @pytest.mark.parametrize("n_dim_action", [1, 3]) @pytest.mark.parametrize("n_hidden_layers", [0, 1, 2]) @pytest.mark.parametrize("n_hidden_channels", [1, 2]) @pytest.mark.parametrize("nonlinearity", ["relu", "elu"]) @pytest.mark.parametrize("last_wscale", [1, 1e-3]) class TestFCLSTMSAQFunction(base._TestSAQFunction): @pytest.fixture(autouse=True) def setUp( self, n_dim_obs, n_dim_action, n_hidden_layers, n_hidden_channels, nonlinearity, last_wscale, ): self.n_dim_obs = n_dim_obs self.n_dim_action = n_dim_action self.n_hidden_layers = n_hidden_layers self.n_hidden_channels = n_hidden_channels self.nonlinearity = nonlinearity self.last_wscale = last_wscale def _test_call(self, gpu): nonlinearity = getattr(F, self.nonlinearity) model = pfrl.q_functions.FCLSTMSAQFunction( n_dim_obs=self.n_dim_obs, n_dim_action=self.n_dim_action, n_hidden_layers=self.n_hidden_layers, n_hidden_channels=self.n_hidden_channels, nonlinearity=nonlinearity, last_wscale=self.last_wscale, ) self._test_call_given_model(model, gpu) def test_call_cpu(self): self._test_call(gpu=-1) @pytest.mark.gpu def test_call_gpu(self): self._test_call(gpu=0) @pytest.mark.parametrize("n_dim_obs", [1, 5]) @pytest.mark.parametrize("n_dim_action", [1, 3]) @pytest.mark.parametrize("n_hidden_layers", [0, 1, 2]) @pytest.mark.parametrize("n_hidden_channels", [1, 2]) @pytest.mark.parametrize("normalize_input", [True, False]) @pytest.mark.parametrize("nonlinearity", ["relu", "elu"]) @pytest.mark.parametrize("last_wscale", [1, 1e-3]) class TestFCBNSAQFunction(base._TestSAQFunction): @pytest.fixture(autouse=True) def setUp( self, n_dim_obs, n_dim_action, n_hidden_layers, n_hidden_channels, normalize_input, nonlinearity, last_wscale, ): self.n_dim_obs = n_dim_obs self.n_dim_action = n_dim_action self.n_hidden_layers = n_hidden_layers self.n_hidden_channels = n_hidden_channels self.normalize_input = normalize_input self.nonlinearity = nonlinearity self.last_wscale = last_wscale def _test_call(self, gpu): nonlinearity = getattr(F, self.nonlinearity) model = pfrl.q_functions.FCBNSAQFunction( n_dim_obs=self.n_dim_obs, n_dim_action=self.n_dim_action, n_hidden_layers=self.n_hidden_layers, n_hidden_channels=self.n_hidden_channels, normalize_input=self.normalize_input, nonlinearity=nonlinearity, last_wscale=self.last_wscale, ) self._test_call_given_model(model, gpu) def test_call_cpu(self): self._test_call(gpu=-1) @pytest.mark.gpu def test_call_gpu(self): self._test_call(gpu=0) @pytest.mark.parametrize("n_dim_obs", [1, 5]) @pytest.mark.parametrize("n_dim_action", [1, 3]) # LateAction requires n_hidden_layers >=1 @pytest.mark.parametrize("n_hidden_layers", [1, 2]) @pytest.mark.parametrize("n_hidden_channels", [1, 2]) @pytest.mark.parametrize("normalize_input", [True, False]) @pytest.mark.parametrize("nonlinearity", ["relu", "elu"]) @pytest.mark.parametrize("last_wscale", [1, 1e-3]) class TestFCBNLateActionSAQFunction(base._TestSAQFunction): @pytest.fixture(autouse=True) def setUp( self, n_dim_obs, n_dim_action, n_hidden_layers, n_hidden_channels, normalize_input, nonlinearity, last_wscale, ): self.n_dim_obs = n_dim_obs self.n_dim_action = n_dim_action self.n_hidden_layers = n_hidden_layers self.n_hidden_channels = n_hidden_channels self.normalize_input = normalize_input self.nonlinearity = nonlinearity self.last_wscale = last_wscale def _test_call(self, gpu): nonlinearity = getattr(F, self.nonlinearity) model = pfrl.q_functions.FCBNLateActionSAQFunction( n_dim_obs=self.n_dim_obs, n_dim_action=self.n_dim_action, n_hidden_layers=self.n_hidden_layers, n_hidden_channels=self.n_hidden_channels, normalize_input=self.normalize_input, nonlinearity=nonlinearity, last_wscale=self.last_wscale, ) self._test_call_given_model(model, gpu) def test_call_cpu(self): self._test_call(gpu=-1) @pytest.mark.gpu def test_call_gpu(self): self._test_call(gpu=0) @pytest.mark.parametrize("n_dim_obs", [1, 5]) @pytest.mark.parametrize("n_dim_action", [1, 3]) # LateAction requires n_hidden_layers >=1 @pytest.mark.parametrize("n_hidden_layers", [1, 2]) @pytest.mark.parametrize("n_hidden_channels", [1, 2]) @pytest.mark.parametrize("nonlinearity", ["relu", "elu"]) @pytest.mark.parametrize("last_wscale", [1, 1e-3]) class TestFCLateActionSAQFunction(base._TestSAQFunction): @pytest.fixture(autouse=True) def setUp( self, n_dim_obs, n_dim_action, n_hidden_layers, n_hidden_channels, nonlinearity, last_wscale, ): self.n_dim_obs = n_dim_obs self.n_dim_action = n_dim_action self.n_hidden_layers = n_hidden_layers self.n_hidden_channels = n_hidden_channels self.nonlinearity = nonlinearity self.last_wscale = last_wscale def _test_call(self, gpu): nonlinearity = getattr(F, self.nonlinearity) model = pfrl.q_functions.FCLateActionSAQFunction( n_dim_obs=self.n_dim_obs, n_dim_action=self.n_dim_action, n_hidden_layers=self.n_hidden_layers, n_hidden_channels=self.n_hidden_channels, nonlinearity=nonlinearity, last_wscale=self.last_wscale, ) self._test_call_given_model(model, gpu) def test_call_cpu(self): self._test_call(gpu=-1) @pytest.mark.gpu def test_call_gpu(self): self._test_call(gpu=0)
32.394191
59
0.667606
1,020
7,807
4.743137
0.067647
0.089706
0.1389
0.090947
0.92931
0.92931
0.92931
0.92931
0.92931
0.92931
0
0.011587
0.226207
7,807
240
60
32.529167
0.789273
0.010119
0
0.895238
0
0
0.058641
0
0
0
0
0
0.004762
1
0.095238
false
0
0.02381
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
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0cf9415844d265b78ca63663efd3ae1213876ecc
3,418
py
Python
pyaurorax/cli/util/commands.py
fossabot/pyaurorax
cb3e72a90f3107302d4f9fd4b0478fe98616354d
[ "MIT" ]
null
null
null
pyaurorax/cli/util/commands.py
fossabot/pyaurorax
cb3e72a90f3107302d4f9fd4b0478fe98616354d
[ "MIT" ]
45
2021-11-07T22:02:23.000Z
2022-03-09T03:04:27.000Z
pyaurorax/cli/util/commands.py
fossabot/pyaurorax
cb3e72a90f3107302d4f9fd4b0478fe98616354d
[ "MIT" ]
1
2022-01-16T17:28:14.000Z
2022-01-16T17:28:14.000Z
import click import datetime import pyaurorax from dateutil.parser import parse @click.group("util", help="Utility commands") def utility_group(): pass @utility_group.command("ground_to_nbtrace", short_help="Convert ground location to north B-trace location") @click.argument("lat", type=click.FloatRange(min=-90.0, max=90.0)) @click.argument("lon", type=click.FloatRange(min=-180.0, max=180.0)) @click.option("--timestamp", type=str, default=datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S"), show_default=True, help="timestamp to use when converting in ISO format " "(YYYY-mm-ddTHH:MM:SS), defaults to current time") @click.pass_obj def ground_to_nbtrace(config, lat, lon, timestamp): """ Convert a geographic location (assumed to be on the ground) to a north B-trace location. Note that the timestamp is needed since the B-trace values are derived using magnetic coordinates \n Important! If you supply negative numbers, prefix it with '--' to tell the terminal to not evaluate dash (-) characters as options after it. For example, "aurorax-cli util ground_to_nbtrace -- 90.0 -120.0" \b LAT the latitude, in geographic coordinates (-90 to 90) LON the longitude, in geographic coordinates (-180 to 180) """ # set location object input_location = pyaurorax.Location(lat=lat, lon=lon) click.echo("Inputted location:\t%s" % (input_location)) # interpret time ts = parse(timestamp) click.echo("Timestamp:\t\t%s" % (ts.isoformat())) # get nbtrace location nbtrace = pyaurorax.util.ground_geo_to_nbtrace(input_location, ts) # output click.echo("\nDerived north B-trace:\t%s" % (nbtrace)) @utility_group.command("ground_to_sbtrace", short_help="Convert ground location to south B-trace location") @click.argument("lat", type=click.FloatRange(min=-90.0, max=90.0)) @click.argument("lon", type=click.FloatRange(min=-180.0, max=180.0)) @click.option("--timestamp", type=str, default=datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S"), show_default=True, help="timestamp to use when converting in ISO format " "(YYYY-mm-ddTHH:MM:SS), defaults to current time") @click.pass_obj def ground_to_sbtrace(config, lat, lon, timestamp): """ Convert a geographic location (assumed to be on the ground) to a south B-trace location. Note that the timestamp is needed since the B-trace values are derived using magnetic coordinates \n Important! If you supply negative numbers, prefix it with '--' to tell the terminal to not evaluate dash (-) characters as options after it. For example, "aurorax-cli util ground_to_nbtrace -- 90.0 -120.0" \b LAT the latitude, in geographic coordinates (-90 to 90) LON the longitude, in geographic coordinates (-180 to 180) """ # set location object input_location = pyaurorax.Location(lat=lat, lon=lon) click.echo("Inputted location:\t%s" % (input_location)) # interpret time ts = parse(timestamp) click.echo("Timestamp:\t\t%s" % (ts.isoformat())) # get nbtrace location nbtrace = pyaurorax.util.ground_geo_to_sbtrace(input_location, ts) # output click.echo("\nDerived south B-trace:\t%s" % (nbtrace))
37.152174
86
0.667642
479
3,418
4.695198
0.25261
0.028457
0.026679
0.039129
0.914184
0.876834
0.848377
0.814584
0.814584
0.814584
0
0.023031
0.212405
3,418
91
87
37.56044
0.812407
0.341135
0
0.604651
0
0
0.252573
0.02058
0
0
0
0
0
1
0.069767
false
0.069767
0.093023
0
0.162791
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
7
0b352287a42c8e86757681b8f109b5b0153ba283
159
py
Python
app/core/admin.py
zahraakhlaghi/api_test
4488e80e014d0ee93af9daa09d7db5a327a9c5b0
[ "MIT" ]
null
null
null
app/core/admin.py
zahraakhlaghi/api_test
4488e80e014d0ee93af9daa09d7db5a327a9c5b0
[ "MIT" ]
null
null
null
app/core/admin.py
zahraakhlaghi/api_test
4488e80e014d0ee93af9daa09d7db5a327a9c5b0
[ "MIT" ]
null
null
null
from django.contrib import admin from core import models admin.site.register(models.Category) admin.site.register(models.Post) admin.site.register(models.Tag)
26.5
36
0.830189
24
159
5.5
0.5
0.204545
0.386364
0.522727
0
0
0
0
0
0
0
0
0.069182
159
6
37
26.5
0.891892
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
0b419015fe4f5303a7356378b9b45c92debf8994
13,097
py
Python
torchbenchmark/models/fastNLP/reproduction/sequence_labelling/chinese_ner/LatticeLSTM/models.py
Chillee/benchmark
91e1b2871327e44b9b7d24d173ca93720fb6565b
[ "BSD-3-Clause" ]
2,693
2018-03-08T03:09:20.000Z
2022-03-30T07:38:42.000Z
reproduction/sequence_labelling/chinese_ner/LatticeLSTM/models.py
stratoes/fastNLP
a8a458230489710ab945b37ec22e93315230f2de
[ "Apache-2.0" ]
291
2018-07-21T07:43:17.000Z
2022-03-07T13:06:58.000Z
reproduction/sequence_labelling/chinese_ner/LatticeLSTM/models.py
stratoes/fastNLP
a8a458230489710ab945b37ec22e93315230f2de
[ "Apache-2.0" ]
514
2018-03-09T06:54:25.000Z
2022-03-26T20:11:44.000Z
import torch.nn as nn from fastNLP.embeddings import StaticEmbedding from fastNLP.modules import LSTM, ConditionalRandomField import torch from fastNLP import seq_len_to_mask from utils import better_init_rnn,print_info class LatticeLSTM_SeqLabel(nn.Module): def __init__(self, char_embed, bigram_embed, word_embed, hidden_size, label_size, bias=True, bidirectional=False, device=None, embed_dropout=0, output_dropout=0, skip_batch_first=True,debug=False, skip_before_head=False,use_bigram=True,vocabs=None): if device is None: self.device = torch.device('cpu') else: self.device = torch.device(device) from modules import LatticeLSTMLayer_sup_back_V0 super().__init__() self.debug = debug self.skip_batch_first = skip_batch_first self.char_embed_size = char_embed.embedding.weight.size(1) self.bigram_embed_size = bigram_embed.embedding.weight.size(1) self.word_embed_size = word_embed.embedding.weight.size(1) self.hidden_size = hidden_size self.label_size = label_size self.bidirectional = bidirectional self.use_bigram = use_bigram self.vocabs = vocabs if self.use_bigram: self.input_size = self.char_embed_size + self.bigram_embed_size else: self.input_size = self.char_embed_size self.char_embed = char_embed self.bigram_embed = bigram_embed self.word_embed = word_embed self.encoder = LatticeLSTMLayer_sup_back_V0(self.input_size,self.word_embed_size, self.hidden_size, left2right=True, bias=bias, device=self.device, debug=self.debug, skip_before_head=skip_before_head) if self.bidirectional: self.encoder_back = LatticeLSTMLayer_sup_back_V0(self.input_size, self.word_embed_size, self.hidden_size, left2right=False, bias=bias, device=self.device, debug=self.debug, skip_before_head=skip_before_head) self.output = nn.Linear(self.hidden_size * (2 if self.bidirectional else 1), self.label_size) self.crf = ConditionalRandomField(label_size, True) self.crf.trans_m = nn.Parameter(torch.zeros(size=[label_size, label_size],requires_grad=True)) if self.crf.include_start_end_trans: self.crf.start_scores = nn.Parameter(torch.zeros(size=[label_size],requires_grad=True)) self.crf.end_scores = nn.Parameter(torch.zeros(size=[label_size],requires_grad=True)) self.loss_func = nn.CrossEntropyLoss() self.embed_dropout = nn.Dropout(embed_dropout) self.output_dropout = nn.Dropout(output_dropout) def forward(self, chars, bigrams, seq_len, target, skips_l2r_source, skips_l2r_word, lexicon_count, skips_r2l_source=None, skips_r2l_word=None, lexicon_count_back=None): # print('skips_l2r_word_id:{}'.format(skips_l2r_word.size())) batch = chars.size(0) max_seq_len = chars.size(1) # max_lexicon_count = skips_l2r_word.size(2) embed_char = self.char_embed(chars) if self.use_bigram: embed_bigram = self.bigram_embed(bigrams) embedding = torch.cat([embed_char, embed_bigram], dim=-1) else: embedding = embed_char embed_nonword = self.embed_dropout(embedding) # skips_l2r_word = torch.reshape(skips_l2r_word,shape=[batch,-1]) embed_word = self.word_embed(skips_l2r_word) embed_word = self.embed_dropout(embed_word) # embed_word = torch.reshape(embed_word,shape=[batch,max_seq_len,max_lexicon_count,-1]) encoded_h, encoded_c = self.encoder(embed_nonword, seq_len, skips_l2r_source, embed_word, lexicon_count) if self.bidirectional: embed_word_back = self.word_embed(skips_r2l_word) embed_word_back = self.embed_dropout(embed_word_back) encoded_h_back, encoded_c_back = self.encoder_back(embed_nonword, seq_len, skips_r2l_source, embed_word_back, lexicon_count_back) encoded_h = torch.cat([encoded_h, encoded_h_back], dim=-1) encoded_h = self.output_dropout(encoded_h) pred = self.output(encoded_h) mask = seq_len_to_mask(seq_len) if self.training: loss = self.crf(pred, target, mask) return {'loss': loss} else: pred, path = self.crf.viterbi_decode(pred, mask) return {'pred': pred} # batch_size, sent_len = pred.shape[0], pred.shape[1] # loss = self.loss_func(pred.reshape(batch_size * sent_len, -1), target.reshape(batch_size * sent_len)) # return {'pred':pred,'loss':loss} class LatticeLSTM_SeqLabel_V1(nn.Module): def __init__(self, char_embed, bigram_embed, word_embed, hidden_size, label_size, bias=True, bidirectional=False, device=None, embed_dropout=0, output_dropout=0, skip_batch_first=True,debug=False, skip_before_head=False,use_bigram=True,vocabs=None,gaz_dropout=0): if device is None: self.device = torch.device('cpu') else: self.device = torch.device(device) from modules import LatticeLSTMLayer_sup_back_V1 super().__init__() self.count = 0 self.debug = debug self.skip_batch_first = skip_batch_first self.char_embed_size = char_embed.embedding.weight.size(1) self.bigram_embed_size = bigram_embed.embedding.weight.size(1) self.word_embed_size = word_embed.embedding.weight.size(1) self.hidden_size = hidden_size self.label_size = label_size self.bidirectional = bidirectional self.use_bigram = use_bigram self.vocabs = vocabs if self.use_bigram: self.input_size = self.char_embed_size + self.bigram_embed_size else: self.input_size = self.char_embed_size self.char_embed = char_embed self.bigram_embed = bigram_embed self.word_embed = word_embed self.encoder = LatticeLSTMLayer_sup_back_V1(self.input_size,self.word_embed_size, self.hidden_size, left2right=True, bias=bias, device=self.device, debug=self.debug, skip_before_head=skip_before_head) if self.bidirectional: self.encoder_back = LatticeLSTMLayer_sup_back_V1(self.input_size, self.word_embed_size, self.hidden_size, left2right=False, bias=bias, device=self.device, debug=self.debug, skip_before_head=skip_before_head) self.output = nn.Linear(self.hidden_size * (2 if self.bidirectional else 1), self.label_size) self.crf = ConditionalRandomField(label_size, True) self.crf.trans_m = nn.Parameter(torch.zeros(size=[label_size, label_size],requires_grad=True)) if self.crf.include_start_end_trans: self.crf.start_scores = nn.Parameter(torch.zeros(size=[label_size],requires_grad=True)) self.crf.end_scores = nn.Parameter(torch.zeros(size=[label_size],requires_grad=True)) self.loss_func = nn.CrossEntropyLoss() self.embed_dropout = nn.Dropout(embed_dropout) self.gaz_dropout = nn.Dropout(gaz_dropout) self.output_dropout = nn.Dropout(output_dropout) def forward(self, chars, bigrams, seq_len, target, skips_l2r_source, skips_l2r_word, lexicon_count, skips_r2l_source=None, skips_r2l_word=None, lexicon_count_back=None): batch = chars.size(0) max_seq_len = chars.size(1) embed_char = self.char_embed(chars) if self.use_bigram: embed_bigram = self.bigram_embed(bigrams) embedding = torch.cat([embed_char, embed_bigram], dim=-1) else: embedding = embed_char embed_nonword = self.embed_dropout(embedding) # skips_l2r_word = torch.reshape(skips_l2r_word,shape=[batch,-1]) embed_word = self.word_embed(skips_l2r_word) embed_word = self.embed_dropout(embed_word) encoded_h, encoded_c = self.encoder(embed_nonword, seq_len, skips_l2r_source, embed_word, lexicon_count) if self.bidirectional: embed_word_back = self.word_embed(skips_r2l_word) embed_word_back = self.embed_dropout(embed_word_back) encoded_h_back, encoded_c_back = self.encoder_back(embed_nonword, seq_len, skips_r2l_source, embed_word_back, lexicon_count_back) encoded_h = torch.cat([encoded_h, encoded_h_back], dim=-1) encoded_h = self.output_dropout(encoded_h) pred = self.output(encoded_h) mask = seq_len_to_mask(seq_len) if self.training: loss = self.crf(pred, target, mask) return {'loss': loss} else: pred, path = self.crf.viterbi_decode(pred, mask) return {'pred': pred} class LSTM_SeqLabel(nn.Module): def __init__(self, char_embed, bigram_embed, word_embed, hidden_size, label_size, bias=True, bidirectional=False, device=None, embed_dropout=0, output_dropout=0,use_bigram=True): if device is None: self.device = torch.device('cpu') else: self.device = torch.device(device) super().__init__() self.char_embed_size = char_embed.embedding.weight.size(1) self.bigram_embed_size = bigram_embed.embedding.weight.size(1) self.word_embed_size = word_embed.embedding.weight.size(1) self.hidden_size = hidden_size self.label_size = label_size self.bidirectional = bidirectional self.use_bigram = use_bigram self.char_embed = char_embed self.bigram_embed = bigram_embed self.word_embed = word_embed if self.use_bigram: self.input_size = self.char_embed_size + self.bigram_embed_size else: self.input_size = self.char_embed_size self.encoder = LSTM(self.input_size, self.hidden_size, bidirectional=self.bidirectional) better_init_rnn(self.encoder.lstm) self.output = nn.Linear(self.hidden_size * (2 if self.bidirectional else 1), self.label_size) self.debug = True self.loss_func = nn.CrossEntropyLoss() self.embed_dropout = nn.Dropout(embed_dropout) self.output_dropout = nn.Dropout(output_dropout) self.crf = ConditionalRandomField(label_size, True) def forward(self, chars, bigrams, seq_len, target): if self.debug: print_info('chars:{}'.format(chars.size())) print_info('bigrams:{}'.format(bigrams.size())) print_info('seq_len:{}'.format(seq_len.size())) print_info('target:{}'.format(target.size())) embed_char = self.char_embed(chars) if self.use_bigram: embed_bigram = self.bigram_embed(bigrams) embedding = torch.cat([embed_char, embed_bigram], dim=-1) else: embedding = embed_char embedding = self.embed_dropout(embedding) encoded_h, encoded_c = self.encoder(embedding, seq_len) encoded_h = self.output_dropout(encoded_h) pred = self.output(encoded_h) mask = seq_len_to_mask(seq_len) # pred = self.crf(pred) # batch_size, sent_len = pred.shape[0], pred.shape[1] # loss = self.loss_func(pred.reshape(batch_size * sent_len, -1), target.reshape(batch_size * sent_len)) if self.debug: print('debug mode:finish') exit(1208) if self.training: loss = self.crf(pred, target, mask) return {'loss': loss} else: pred, path = self.crf.viterbi_decode(pred, mask) return {'pred': pred}
42.11254
117
0.599068
1,555
13,097
4.731833
0.074598
0.032618
0.031802
0.025415
0.888693
0.888693
0.879315
0.879315
0.874151
0.874151
0
0.008916
0.314881
13,097
310
118
42.248387
0.8111
0.051844
0
0.85022
0
0
0.007013
0
0
0
0
0
0
1
0.026432
false
0
0.035242
0
0.101322
0.026432
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0b88cd34174317ea26521317702896ac84ef4aaf
398
py
Python
logic_gates.py
ChristopherKlix/logic_gates
8ebfce5dbe789667adaa4ff887e66a8e67a894fb
[ "MIT" ]
null
null
null
logic_gates.py
ChristopherKlix/logic_gates
8ebfce5dbe789667adaa4ff887e66a8e67a894fb
[ "MIT" ]
null
null
null
logic_gates.py
ChristopherKlix/logic_gates
8ebfce5dbe789667adaa4ff887e66a8e67a894fb
[ "MIT" ]
null
null
null
def and_gate(input_a, input_b): return 1 if input_a and input_b else 0 def or_gate(input_a, input_b): return 1 if input_a or input_b else 0 def nand_gate(input_a, input_b): return 0 if and_gate(input_a, input_b) else 1 def nor_gate(input_a, input_b): return 0 if or_gate(input_a, input_b) else 1 def xor_gate(input_a, input_b): return 1 if not input_a == input_b else 0
20.947368
49
0.723618
87
398
3
0.183908
0.229885
0.337165
0.367816
0.915709
0.747126
0.708812
0.708812
0.237548
0.237548
0
0.031646
0.20603
398
18
50
22.111111
0.794304
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
0
0
0
null
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
10
e7eaba843f182844d38353eed90476403efda2f5
3,553
py
Python
hummingbot/client/test_performance_analysis.py
rnw2000/hummingbot
812691718b6738a27a2fc65ace60776e43129070
[ "Apache-2.0" ]
null
null
null
hummingbot/client/test_performance_analysis.py
rnw2000/hummingbot
812691718b6738a27a2fc65ace60776e43129070
[ "Apache-2.0" ]
15
2020-08-17T07:08:56.000Z
2020-08-25T03:22:48.000Z
hummingbot/client/test_performance_analysis.py
rnw2000/hummingbot
812691718b6738a27a2fc65ace60776e43129070
[ "Apache-2.0" ]
null
null
null
import math import unittest from hummingbot.client.performance_analysis import PerformanceAnalysis class TestPerformanceAnalysis(unittest.TestCase): def test_basic_one_ex(self): """ Test performance analysis on a one exchange balance. """ performance_analysis = PerformanceAnalysis() performance_analysis.add_balances("WETH", 0.5, True, True) performance_analysis.add_balances("DAI", 60, False, True) performance_analysis.add_balances("WETH", 0.4, True, False) performance_analysis.add_balances("DAI", 70, False, False) calculated_percent = performance_analysis.compute_profitability(50) expected_percent = (((0.4 * 50) + 70)/((0.5 * 50) + 60) - 1) * 100 self.assertEqual(calculated_percent, expected_percent, "Basic one ex test failed.") def test_basic_two_ex(self): """ Test performance analysis on a two exchange balance with the same currencies trading in both exchanges. """ performance_analysis = PerformanceAnalysis() performance_analysis.add_balances("WETH", 0.5, True, True) performance_analysis.add_balances("DAI", 60, False, True) performance_analysis.add_balances("WETH", 0.7, True, True) performance_analysis.add_balances("DAI", 50, False, True) performance_analysis.add_balances("WETH", 0.4, True, False) performance_analysis.add_balances("DAI", 70, False, False) performance_analysis.add_balances("WETH", 0.3, True, False) performance_analysis.add_balances("DAI", 70, False, False) calculated_percent = performance_analysis.compute_profitability(50) expected_percent = (((0.7 * 50) + 140)/((1.2 * 50) + 110) - 1) * 100 self.assertEqual(calculated_percent, expected_percent, "Basic one ex test failed.") def test_different_tokens_two_ex(self): """ Test performance analysis on a two exchange balance with different currencies trading. Note that this test will not work as the config file that contains the conversion has not been loaded.""" performance_analysis = PerformanceAnalysis() performance_analysis.add_balances("WETH", 0.5, True, True) performance_analysis.add_balances("DAI", 60, False, True) performance_analysis.add_balances("ETH", 0.7, True, True) performance_analysis.add_balances("USD", 50, False, True) performance_analysis.add_balances("WETH", 0.4, True, False) performance_analysis.add_balances("DAI", 70, False, False) performance_analysis.add_balances("ETH", 0.3, True, False) performance_analysis.add_balances("USD", 70, False, False) calculated_percent = performance_analysis.compute_profitability(50) expected_percent = (((0.7 * 50) + 140)/((1.2 * 50) + 110) - 1) * 100 self.assertAlmostEquals(calculated_percent, expected_percent, msg="Two diff token test failed.", delta=0.1) def test_nan_starting(self): """ Test the case where the starting balance is 0. """ performance_analysis = PerformanceAnalysis() performance_analysis.add_balances("WETH", 0, True, True) performance_analysis.add_balances("DAI", 0, False, True) performance_analysis.add_balances("WETH", 0.3, True, False) performance_analysis.add_balances("DAI", 70, False, False) calculated_percent = performance_analysis.compute_profitability(50) self.assertTrue(math.isnan(calculated_percent), "Starting value of 0 test failed.") if __name__ == "__main__": unittest.main()
55.515625
119
0.703631
436
3,553
5.516055
0.211009
0.284407
0.219543
0.299376
0.761331
0.758836
0.756341
0.72474
0.671102
0.640748
0
0.038141
0.188292
3,553
63
120
56.396825
0.79577
0.111174
0
0.571429
0
0
0.0637
0
0
0
0
0
0.081633
1
0.081633
false
0
0.061224
0
0.163265
0
0
0
0
null
1
1
1
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
e7f70c220acc15a934e0e959889a2af5e8851a46
112
py
Python
5 Star Python/set/Set .union() Operation.py
TheCodeAlpha26/Hackerrank-Demystified
03713a8f3a05e5d6dfed6f6808b06340558e2310
[ "Apache-2.0" ]
6
2021-04-26T17:09:54.000Z
2021-07-08T17:36:16.000Z
5 Star Python/set/Set .union() Operation.py
TheCodeAlpha26/Hackerrank-Demystified
03713a8f3a05e5d6dfed6f6808b06340558e2310
[ "Apache-2.0" ]
null
null
null
5 Star Python/set/Set .union() Operation.py
TheCodeAlpha26/Hackerrank-Demystified
03713a8f3a05e5d6dfed6f6808b06340558e2310
[ "Apache-2.0" ]
null
null
null
_,s = input(),set(map(int,input().split())) _,s2 =input(),set(map(int,input().split())) print(len(s.union(s2)))
28
43
0.616071
19
112
3.526316
0.526316
0.238806
0.328358
0.41791
0.716418
0.716418
0
0
0
0
0
0.018868
0.053571
112
3
44
37.333333
0.613208
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0.333333
1
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
f02cf486d088f1f82ee5966380fe7723c4af40c7
8
py
Python
test_data/parse_retree/unexpected/improper_escaping/range_character/unhandled/whitespace/source.py
aas-core-works/aas-core-codegen
afec2cf363b6cb69816e7724a2b58626e2165869
[ "MIT" ]
5
2021-12-29T12:55:34.000Z
2022-03-01T17:57:21.000Z
test_data/parse_retree/unexpected/improper_escaping/range_character/unhandled/whitespace/source.py
aas-core-works/aas-core-codegen
afec2cf363b6cb69816e7724a2b58626e2165869
[ "MIT" ]
10
2021-12-29T02:15:55.000Z
2022-03-09T11:04:22.000Z
test_data/parse_retree/unexpected/improper_escaping/range_character/unhandled/whitespace/source.py
aas-core-works/aas-core-codegen
afec2cf363b6cb69816e7724a2b58626e2165869
[ "MIT" ]
2
2021-12-29T01:42:12.000Z
2022-02-15T13:46:33.000Z
"[\\s]"
4
7
0.125
1
8
1
1
0
0
0
0
0
0
0
0
0
0
0
0.125
8
1
8
8
0.142857
0.5
0
0
0
0
0.625
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
f0420bf723c9db163da87a83cfada671b31961ac
33
py
Python
torch_geometric_signed_directed/nn/general/__init__.py
SherylHYX/pytorch_geometric_signed_directed
c2dbede0171424cdf7bae7c45c6c1e19a862bcfd
[ "MIT" ]
38
2022-02-09T06:27:14.000Z
2022-03-29T09:44:14.000Z
torch_geometric_signed_directed/nn/general/__init__.py
SherylHYX/pytorch_geometric_signed_directed
c2dbede0171424cdf7bae7c45c6c1e19a862bcfd
[ "MIT" ]
17
2022-02-09T23:13:35.000Z
2022-02-21T03:14:36.000Z
torch_geometric_signed_directed/nn/general/__init__.py
SherylHYX/pytorch_geometric_signed_directed
c2dbede0171424cdf7bae7c45c6c1e19a862bcfd
[ "MIT" ]
6
2022-02-09T04:49:17.000Z
2022-03-29T09:44:17.000Z
from .conv_base import Conv_Base
16.5
32
0.848485
6
33
4.333333
0.666667
0.615385
0
0
0
0
0
0
0
0
0
0
0.121212
33
1
33
33
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
f045c326d7beaba5e86a34fab2607bf1f65362b6
5,071
py
Python
amlc/test/test_marginalized_likelihood.py
jegpeek/amlc
41ebdabc524b4117ecd36300964f693a8c012288
[ "MIT" ]
1
2021-03-29T04:55:35.000Z
2021-03-29T04:55:35.000Z
amlc/test/test_marginalized_likelihood.py
jegpeek/amlc
41ebdabc524b4117ecd36300964f693a8c012288
[ "MIT" ]
null
null
null
amlc/test/test_marginalized_likelihood.py
jegpeek/amlc
41ebdabc524b4117ecd36300964f693a8c012288
[ "MIT" ]
1
2019-07-11T19:12:38.000Z
2019-07-11T19:12:38.000Z
import pytest import numpy as np from scipy.integrate import dblquad from scipy.optimize import check_grad from ..marginalized_likelihood import MarginalizedLikelihood @pytest.fixture def improper_marginalized_likelihood_example(): np.random.seed(seed=0) size = 150 continuum_deg = 1 wave_ax = np.linspace(-1, 1, size) transmittance = 1 - np.abs(np.random.normal(0, 0.2, size)) A_m = np.polynomial.polynomial.polyvander(wave_ax, continuum_deg) c_true = np.asarray([1., 0.2]) y_sd = np.full(size, 0.2) y_true = transmittance * (A_m @ c_true) y_obs = np.random.normal(y_true, y_sd) return MarginalizedLikelihood(y_obs, y_sd**2, A_m) @pytest.fixture def proper_marginalized_likelihood_example(): np.random.seed(seed=0) size = 150 continuum_deg = 1 wave_ax = np.linspace(-1, 1, size) transmittance = 1 - np.abs(np.random.normal(0, 0.2, size)) A_m = np.polynomial.polynomial.polyvander(wave_ax, continuum_deg) c_true = np.asarray([1., 0.2]) y_sd = np.full(size, 0.2) y_true = transmittance * (A_m @ c_true) y_obs = np.random.normal(y_true, y_sd) c_sd = np.asarray([10., 10.]) return MarginalizedLikelihood(y_obs, y_sd**2, A_m, c_cov=c_sd**2) @pytest.mark.parametrize('arg', ['improper_marginalized_likelihood_example', 'proper_marginalized_likelihood_example']) def test_marginalized_likelihood(arg, request): marginalized_likelihood_example = request.getfixturevalue(arg) np.random.seed(seed=0) size = marginalized_likelihood_example.y.size transmittance = 1 - np.abs(np.random.normal(0, 0.2, size)) def differential_func(c1, c0): c = np.asarray([c0, c1]) return np.exp(marginalized_likelihood_example.get_unmarginalized_likelihood(c, transmittance, mu_m=1)) gfun = lambda *args : -np.inf hfun = lambda *args : np.inf numerical_p, err = dblquad(differential_func, -np.inf, np.inf, gfun, hfun) analytic_p = np.exp(marginalized_likelihood_example(transmittance, return_logp=True, mu_m=1)['logp']) print(numerical_p - analytic_p, err) assert np.abs(numerical_p - analytic_p) < err @pytest.mark.parametrize('arg', ['improper_marginalized_likelihood_example', 'proper_marginalized_likelihood_example']) def test_grad_logp_wrt_d_theta(arg, request): marginalized_likelihood_example = request.getfixturevalue(arg) np.random.seed(seed=0) size = marginalized_likelihood_example.y.size x0 = 1 - np.abs(np.random.normal(0, 0.2, size)) jac_d_theta = np.identity(size) def func(x): return marginalized_likelihood_example(x, mu_m=1, return_logp=True)['logp'] def grad(x): return marginalized_likelihood_example(x, mu_m=1, return_grad_logp=True, jac_d_theta=jac_d_theta, jac_mu_m=0, jac_mu_b=0)['grad_logp'] assert check_grad(func, grad, x0) < 1.e-2 @pytest.mark.parametrize('arg', ['improper_marginalized_likelihood_example', 'proper_marginalized_likelihood_example']) def test_grad_logp_wrt_d_mu_m(arg, request): marginalized_likelihood_example = request.getfixturevalue(arg) np.random.seed(seed=0) size = marginalized_likelihood_example.y.size transmittance = 1 - np.abs(np.random.normal(0, 0.2, size)) x0 = np.ones(size) jac_mu_m = np.identity(size) def func(x): return marginalized_likelihood_example(transmittance, mu_m=x, return_logp=True)['logp'] def grad(x): return marginalized_likelihood_example(transmittance, mu_m=x, return_grad_logp=True, jac_d_theta=0, jac_mu_m=jac_mu_m, jac_mu_b=0)['grad_logp'] assert check_grad(func, grad, x0) < 1.e-2 @pytest.mark.parametrize('arg', ['improper_marginalized_likelihood_example', 'proper_marginalized_likelihood_example']) def test_grad_logp_wrt_d_mu_b(arg, request): marginalized_likelihood_example = request.getfixturevalue(arg) np.random.seed(seed=0) size = marginalized_likelihood_example.y.size transmittance = 1 - np.abs(np.random.normal(0, 0.2, size)) x0 = np.zeros(size) jac_mu_b = np.identity(size) def func(x): return marginalized_likelihood_example(transmittance, mu_m=1, mu_b=x, return_logp=True)['logp'] def grad(x): return marginalized_likelihood_example(transmittance, mu_m=1, mu_b=x, return_grad_logp=True, jac_d_theta=0, jac_mu_m=0, jac_mu_b=jac_mu_b)['grad_logp'] assert check_grad(func, grad, x0) < 1.e-2
43.34188
103
0.63025
668
5,071
4.508982
0.128743
0.204515
0.250332
0.031873
0.821713
0.782537
0.782537
0.770916
0.770916
0.745684
0
0.023331
0.264642
5,071
116
104
43.715517
0.784393
0
0
0.6
0
0
0.072372
0.061526
0
0
0
0
0.04
1
0.13
false
0
0.05
0.06
0.27
0.01
0
0
0
null
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
b2d6a156d833f4d0a1ac9b2b1d60cc9f0b2ede33
20,598
py
Python
tests/unit/controllers/platform/test_logs.py
sdolenc/aws-elastic-beanstalk-cli
4167a38bd599a4433c62c1d3516b8836248a4171
[ "Apache-2.0" ]
110
2020-01-15T22:58:46.000Z
2022-03-27T20:47:33.000Z
tests/unit/controllers/platform/test_logs.py
QPC-database/aws-elastic-beanstalk-cli
87ad9d8bbe5e4e7cb01b1bd4392eda33cb1943f7
[ "Apache-2.0" ]
89
2020-01-15T23:18:34.000Z
2022-03-31T21:56:05.000Z
tests/unit/controllers/platform/test_logs.py
QPC-database/aws-elastic-beanstalk-cli
87ad9d8bbe5e4e7cb01b1bd4392eda33cb1943f7
[ "Apache-2.0" ]
50
2020-01-15T22:58:53.000Z
2022-02-11T17:39:28.000Z
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file 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 os import shutil import mock import unittest from ebcli.core import fileoperations from ebcli.core.ebcore import EB import ebcli.core.ebpcore from ebcli.core.ebpcore import EBP from ebcli.controllers.platform import logs from ebcli.objects.exceptions import ApplicationWorkspaceNotSupportedError from ebcli.objects.platform import PlatformVersion from ebcli.objects.solutionstack import SolutionStack class LogsTest(unittest.TestCase): platform = PlatformVersion( 'arn:aws:elasticbeanstalk:us-west-2::platform/PHP 7.1 running on 64bit Amazon Linux/2.6.5' ) solution_stack = SolutionStack( '64bit Amazon Linux 2017.09 v4.4.0 running Node.js' ) def setUp(self): self.root_dir = os.getcwd() if not os.path.exists('testDir'): os.mkdir('testDir') os.chdir('testDir') def tearDown(self): os.chdir(self.root_dir) shutil.rmtree('testDir') def setup_platform_workspace(self): fileoperations.create_config_file( 'my-platform', 'us-west-2', self.platform.name, workspace_type='Platform' ) def setup_application_workspace(self): fileoperations.create_config_file( 'my-application', 'us-west-2', self.solution_stack.name, workspace_type='Application' ) class TestEBPlatformLogs(LogsTest): def test_logs__application_workspace__command_not_applicable(self): self.setup_application_workspace() with self.assertRaises(ApplicationWorkspaceNotSupportedError) as context_manager: app = EB(argv=['platform', 'logs']) app.setup() app.run() self.assertEqual( 'This command is not supported outside Platform workspaces.', str(context_manager.exception) ) def test_logs__neutral_workspace__command_not_applicable(self): self.setup_application_workspace() fileoperations.write_config_setting('global', 'workspace', None) with self.assertRaises(ApplicationWorkspaceNotSupportedError) as context_manager: app = EB(argv=['platform', 'logs']) app.setup() app.run() self.assertEqual( 'This command is not supported outside Platform workspaces.', str(context_manager.exception) ) @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_not_specified__stream_argument_not_specified__print_paginated_logs( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' get_platform_version_mock.return_value = '1.0.3' app = EB(argv=['platform', 'logs']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_called_once_with('custom-platform-4', '1.0.3') stream_platform_logs_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_specified_and_is_valid_semantic_version( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' app = EB(argv=['platform', 'logs', '1.0.3']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_called_once_with('custom-platform-4', '1.0.3') stream_platform_logs_mock.assert_not_called() get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_specified_and_is_valid_platform_arn( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' app = EB(argv=['platform', 'logs', 'arn:aws:elasticbeanstalk:us-west-2:123123123:platform/custom-platform-4/1.0.3']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_called_once_with('custom-platform-4', '1.0.3') stream_platform_logs_mock.assert_not_called() get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_specified_and_is_valid_short_format( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' app = EB(argv=['platform', 'logs', 'custom-platform-4/1.0.3']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_called_once_with('custom-platform-4', '1.0.3') stream_platform_logs_mock.assert_not_called() get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_specified_and_is_invalid( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' with self.assertRaises(logs.InvalidPlatformVersionError) as context_manager: app = EB(argv=['platform', 'logs', '1.0.3.5']) app.setup() app.run() self.assertEqual( 'Invalid version format. Only ARNs, version numbers, or platform_name/version formats are accepted.', str(context_manager.exception) ) paginate_cloudwatch_logs_mock.assert_not_called() stream_platform_logs_mock.assert_not_called() get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') @mock.patch('ebcli.controllers.platform.logs.platform_version_ops.PackerStreamFormatter') def test_logs__platform_workspace__stream_logs( self, PackerStreamFormatter_mock, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() streamer_formatter_mock = mock.MagicMock() PackerStreamFormatter_mock.return_value = streamer_formatter_mock get_platform_name_mock.return_value = 'custom-platform-4' app = EB(argv=['platform', 'logs', '1.0.3', '--stream']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_not_called() stream_platform_logs_mock.assert_called_once_with( 'custom-platform-4', '1.0.3', formatter=streamer_formatter_mock, log_name='custom-platform-4/1.0.3' ) get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') @mock.patch('ebcli.controllers.platform.logs.platform_version_ops.PackerStreamFormatter') def test_logs__platform_workspace__stream_logs__unable_to_find_cloudwatch_logs( self, PackerStreamFormatter_mock, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() streamer_formatter_mock = mock.MagicMock() PackerStreamFormatter_mock.return_value = streamer_formatter_mock get_platform_name_mock.return_value = 'custom-platform-4' stream_platform_logs_mock.side_effect = logs.NotFoundError with self.assertRaises(logs.NotFoundError) as context_manager: app = EB(argv=['platform', 'logs', '1.0.3', '--stream']) app.setup() app.run() self.assertEqual( 'Unable to find logs in CloudWatch.', str(context_manager.exception) ) paginate_cloudwatch_logs_mock.assert_not_called() stream_platform_logs_mock.assert_called_once_with( 'custom-platform-4', '1.0.3', formatter=streamer_formatter_mock, log_name='custom-platform-4/1.0.3' ) get_platform_version_mock.assert_not_called() class TestEBPLogs(LogsTest): def test_logs__application_workspace__command_not_applicable(self): self.setup_application_workspace() with self.assertRaises(ApplicationWorkspaceNotSupportedError) as context_manager: app = EBP(argv=['logs']) app.setup() app.run() self.assertEqual( 'This command is not supported outside Platform workspaces.', str(context_manager.exception) ) def test_logs__neutral_workspace__command_not_applicable(self): self.setup_application_workspace() fileoperations.write_config_setting('global', 'workspace', None) with self.assertRaises(ApplicationWorkspaceNotSupportedError) as context_manager: app = EBP(argv=['logs']) app.setup() app.run() self.assertEqual( 'This command is not supported outside Platform workspaces.', str(context_manager.exception) ) @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_not_specified__stream_argument_not_specified__print_paginated_logs( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' get_platform_version_mock.return_value = '1.0.3' app = EBP(argv=['logs']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_called_once_with('custom-platform-4', '1.0.3') stream_platform_logs_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_specified_and_is_valid_semantic_version( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' app = EBP(argv=['logs', '1.0.3']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_called_once_with('custom-platform-4', '1.0.3') stream_platform_logs_mock.assert_not_called() get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_specified_and_is_valid_platform_arn( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' app = EBP(argv=['logs', 'arn:aws:elasticbeanstalk:us-west-2:123123123:platform/custom-platform-4/1.0.3']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_called_once_with('custom-platform-4', '1.0.3') stream_platform_logs_mock.assert_not_called() get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_specified_and_is_valid_short_format( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' app = EBP(argv=['logs', 'custom-platform-4/1.0.3']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_called_once_with('custom-platform-4', '1.0.3') stream_platform_logs_mock.assert_not_called() get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') def test_logs__platform_workspace__version_specified_and_is_invalid( self, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() get_platform_name_mock.return_value = 'custom-platform-4' with self.assertRaises(logs.InvalidPlatformVersionError) as context_manager: app = EBP(argv=['logs', '1.0.3.5']) app.setup() app.run() self.assertEqual( 'Invalid version format. Only ARNs, version numbers, or platform_name/version formats are accepted.', str(context_manager.exception) ) paginate_cloudwatch_logs_mock.assert_not_called() stream_platform_logs_mock.assert_not_called() get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') @mock.patch('ebcli.controllers.platform.logs.platform_version_ops.PackerStreamFormatter') def test_logs__platform_workspace__stream_logs( self, PackerStreamFormatter_mock, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() streamer_formatter_mock = mock.MagicMock() PackerStreamFormatter_mock.return_value = streamer_formatter_mock get_platform_name_mock.return_value = 'custom-platform-4' app = EBP(argv=['logs', '1.0.3', '--stream']) app.setup() app.run() paginate_cloudwatch_logs_mock.assert_not_called() stream_platform_logs_mock.assert_called_once_with( 'custom-platform-4', '1.0.3', formatter=streamer_formatter_mock, log_name='custom-platform-4/1.0.3' ) get_platform_version_mock.assert_not_called() @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_name') @mock.patch('ebcli.controllers.platform.logs.fileoperations.get_platform_version') @mock.patch('ebcli.controllers.platform.logs.logsops.stream_platform_logs') @mock.patch('ebcli.controllers.platform.logs.paginate_cloudwatch_logs') @mock.patch('ebcli.controllers.platform.logs.platform_version_ops.PackerStreamFormatter') def test_logs__platform_workspace__stream_logs__unable_to_find_cloudwatch_logs( self, PackerStreamFormatter_mock, paginate_cloudwatch_logs_mock, stream_platform_logs_mock, get_platform_version_mock, get_platform_name_mock ): self.setup_platform_workspace() streamer_formatter_mock = mock.MagicMock() PackerStreamFormatter_mock.return_value = streamer_formatter_mock get_platform_name_mock.return_value = 'custom-platform-4' stream_platform_logs_mock.side_effect = logs.NotFoundError with self.assertRaises(logs.NotFoundError) as context_manager: app = EBP(argv=['logs', '1.0.3', '--stream']) app.setup() app.run() self.assertEqual( 'Unable to find logs in CloudWatch.', str(context_manager.exception) ) paginate_cloudwatch_logs_mock.assert_not_called() stream_platform_logs_mock.assert_called_once_with( 'custom-platform-4', '1.0.3', formatter=streamer_formatter_mock, log_name='custom-platform-4/1.0.3' ) get_platform_version_mock.assert_not_called()
41.196
124
0.704632
2,395
20,598
5.691858
0.078914
0.099472
0.107394
0.110035
0.907424
0.907424
0.905296
0.898694
0.898181
0.897154
0
0.010652
0.202398
20,598
500
125
41.196
0.8191
0.026022
0
0.855746
0
0.007335
0.27586
0.206284
0
0
0
0
0.136919
1
0.05379
false
0
0.02934
0
0.095355
0.00489
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
b2e4df82943534edf08deda72133dd3aedab9459
1,663
py
Python
tests/test_protocol.py
hgrecco/pizco
9e4a431c23af032955884e508ce5fb751f869f7e
[ "BSD-3-Clause" ]
29
2015-02-12T17:45:26.000Z
2021-04-15T02:10:18.000Z
tests/test_protocol.py
braingram/pizco
9e4a431c23af032955884e508ce5fb751f869f7e
[ "BSD-3-Clause" ]
6
2015-04-28T08:44:37.000Z
2020-03-31T00:01:45.000Z
tests/test_protocol.py
hgrecco/pizco
9e4a431c23af032955884e508ce5fb751f869f7e
[ "BSD-3-Clause" ]
7
2015-06-29T09:10:23.000Z
2022-03-03T05:18:49.000Z
import unittest from pizco.protocol import Protocol class TestProtocol(unittest.TestCase): def test_protocol(self): prot = Protocol() self.assertRaises(ValueError, prot.parse, []) msg = prot.format('friend', 'bla', 'here goes the content') sender, topic, content, msgid = prot.parse(msg) self.assertEqual(sender, 'friend') self.assertEqual(topic, 'bla') self.assertEqual(content, 'here goes the content') real_id = msg[1] msg[1] = 'newid'.encode('utf-8') self.assertRaises(ValueError, prot.parse, msg, check_msgid='wrong id') self.assertRaises(ValueError, prot.parse, msg, check_sender='another') msg[-1] = 'fake signature'.encode('utf-8') msg[1] = real_id self.assertEqual(sender, 'friend') self.assertEqual(topic, 'bla') self.assertEqual(content, 'here goes the content') def test_protocol_key(self): prot = Protocol(hmac_key='have a key') msg = prot.format('friend', 'bla', 'here goes the content') sender, topic, content, msgid = prot.parse(msg) self.assertEqual(sender, 'friend') self.assertEqual(topic, 'bla') self.assertEqual(content, 'here goes the content') real_id = msg[1] msg[1] = 'newid'.encode('utf-8') self.assertRaises(ValueError, prot.parse, msg, check_msgid='wrong id') self.assertRaises(ValueError, prot.parse, msg, check_sender='another') msg[-1] = 'fake signature'.encode('utf-8') msg[1] = real_id self.assertRaises(ValueError, prot.parse, msg) if __name__ == '__main__': unittest.main()
35.382979
78
0.629585
202
1,663
5.084158
0.227723
0.131451
0.093476
0.175268
0.824732
0.824732
0.790652
0.757546
0.757546
0.757546
0
0.009382
0.230908
1,663
46
79
36.152174
0.793589
0
0
0.694444
0
0
0.154031
0
0
0
0
0
0.416667
1
0.055556
false
0
0.055556
0
0.138889
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
8
654b8b44f952ae5fabf7c7dba4762157e7124968
296
py
Python
temboo/core/Library/Zendesk/Search/__init__.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/Zendesk/Search/__init__.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/Zendesk/Search/__init__.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
from temboo.Library.Zendesk.Search.SearchAll import SearchAll, SearchAllInputSet, SearchAllResultSet, SearchAllChoreographyExecution from temboo.Library.Zendesk.Search.SearchAnonymous import SearchAnonymous, SearchAnonymousInputSet, SearchAnonymousResultSet, SearchAnonymousChoreographyExecution
98.666667
162
0.905405
22
296
12.181818
0.636364
0.074627
0.126866
0.179104
0.223881
0
0
0
0
0
0
0
0.047297
296
2
163
148
0.950355
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
null
0
0
1
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
8
e8e4590a312ce0307e58249417a8c66fd85bed9d
145
py
Python
Django_Rest_Framework/api/mixer/mixer.py
Drack112/Treina-Web-Django
555ecce1c351769240eefd4340b63e547f3bd2a9
[ "MIT" ]
null
null
null
Django_Rest_Framework/api/mixer/mixer.py
Drack112/Treina-Web-Django
555ecce1c351769240eefd4340b63e547f3bd2a9
[ "MIT" ]
null
null
null
Django_Rest_Framework/api/mixer/mixer.py
Drack112/Treina-Web-Django
555ecce1c351769240eefd4340b63e547f3bd2a9
[ "MIT" ]
null
null
null
from mixer.backend.django import mixer from api.models import Vaga, Tecnologia mixer.cycle(100).blend(Tecnologia) mixer.cycle(100).blend(Vaga)
20.714286
39
0.8
22
145
5.272727
0.545455
0.258621
0.344828
0.396552
0.482759
0
0
0
0
0
0
0.045455
0.089655
145
6
40
24.166667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
33162bbd995a552df1c8370ed744cfcdb3073187
11,723
py
Python
QA/fbmessenger.py
roopakv/probe-cli
a8e5ac470963e95063832d6a48d9e9fbfd82ed79
[ "BSD-3-Clause" ]
46
2019-05-31T08:06:44.000Z
2021-02-23T01:48:17.000Z
QA/fbmessenger.py
roopakv/probe-cli
a8e5ac470963e95063832d6a48d9e9fbfd82ed79
[ "BSD-3-Clause" ]
674
2019-05-21T09:40:03.000Z
2021-06-11T08:59:24.000Z
QA/fbmessenger.py
roopakv/probe-cli
a8e5ac470963e95063832d6a48d9e9fbfd82ed79
[ "BSD-3-Clause" ]
18
2019-07-22T19:16:16.000Z
2021-10-09T20:14:12.000Z
#!/usr/bin/env python3 """ ./QA/fbmessenger.py - main QA script for fbmessenger This script performs a bunch of fbmessenger tests under censored network conditions and verifies that the measurement is consistent with the expectations, by parsing the resulting JSONL. """ import contextlib import json import os import shlex import socket import subprocess import sys import time import urllib.parse sys.path.insert(0, ".") import common services = { "stun": "stun.fbsbx.com", "b_api": "b-api.facebook.com", "b_graph": "b-graph.facebook.com", "edge": "edge-mqtt.facebook.com", "external_cdn": "external.xx.fbcdn.net", "scontent_cdn": "scontent.xx.fbcdn.net", "star": "star.c10r.facebook.com", } def execute_jafar_and_return_validated_test_keys(ooni_exe, outfile, tag, args): """ Executes jafar and returns the validated parsed test keys, or throws an AssertionError if the result is not valid. """ tk = common.execute_jafar_and_miniooni( ooni_exe, outfile, "facebook_messenger", tag, args ) assert tk["requests"] is None if tk["tcp_connect"] is not None: assert isinstance(tk["tcp_connect"], list) assert len(tk["tcp_connect"]) > 0 for entry in tk["tcp_connect"]: assert isinstance(entry, dict) assert isinstance(entry["ip"], str) assert isinstance(entry["port"], int) assert isinstance(entry["status"], dict) failure = entry["status"]["failure"] success = entry["status"]["success"] assert isinstance(failure, str) or failure is None assert isinstance(success, bool) return tk def helper_for_blocking_services_via_dns(service): """ Helper for hijacking a service via dns """ args = [] args.append("-iptables-hijack-dns-to") args.append("127.0.0.1:53") args.append("-dns-proxy-block") args.append(service) return args def helper_for_hijacking_services_via_dns(service): """ Helper for hijacking a service via dns """ args = [] args.append("-iptables-hijack-dns-to") args.append("127.0.0.1:53") args.append("-dns-proxy-hijack") args.append(service) return args def helper_for_blocking_services_via_tcp(service): """ Helper for blocking a service via tcp """ args = [] args.append("-iptables-reset-ip") args.append(service) return args def fbmessenger_dns_hijacked_for_all(ooni_exe, outfile): """ Test case where everything we measure is DNS hijacked """ args = [] for _, value in services.items(): args.extend(helper_for_hijacking_services_via_dns(value)) tk = execute_jafar_and_return_validated_test_keys( ooni_exe, outfile, "fbmessenger_dns_hijacked_for_all", args, ) assert tk["facebook_b_api_dns_consistent"] == False assert tk["facebook_b_api_reachable"] == None assert tk["facebook_b_graph_dns_consistent"] == False assert tk["facebook_b_graph_reachable"] == None assert tk["facebook_edge_dns_consistent"] == False assert tk["facebook_edge_reachable"] == None assert tk["facebook_external_cdn_dns_consistent"] == False assert tk["facebook_external_cdn_reachable"] == None assert tk["facebook_scontent_cdn_dns_consistent"] == False assert tk["facebook_scontent_cdn_reachable"] == None assert tk["facebook_star_dns_consistent"] == False assert tk["facebook_star_reachable"] == None assert tk["facebook_stun_dns_consistent"] == False assert tk["facebook_stun_reachable"] == None assert tk["facebook_dns_blocking"] == True assert tk["facebook_tcp_blocking"] == False def fbmessenger_dns_hijacked_for_some(ooni_exe, outfile): """ Test case where some endpoints are DNS hijacked """ args = [] args.extend(helper_for_hijacking_services_via_dns(services["star"])) args.extend(helper_for_hijacking_services_via_dns(services["edge"])) tk = execute_jafar_and_return_validated_test_keys( ooni_exe, outfile, "fbmessenger_dns_hijacked_for_some", args, ) assert tk["facebook_b_api_dns_consistent"] == True assert tk["facebook_b_api_reachable"] == True assert tk["facebook_b_graph_dns_consistent"] == True assert tk["facebook_b_graph_reachable"] == True assert tk["facebook_edge_dns_consistent"] == False assert tk["facebook_edge_reachable"] == None assert tk["facebook_external_cdn_dns_consistent"] == True assert tk["facebook_external_cdn_reachable"] == True assert tk["facebook_scontent_cdn_dns_consistent"] == True assert tk["facebook_scontent_cdn_reachable"] == True assert tk["facebook_star_dns_consistent"] == False assert tk["facebook_star_reachable"] == None assert tk["facebook_stun_dns_consistent"] == True assert tk["facebook_stun_reachable"] == None assert tk["facebook_dns_blocking"] == True assert tk["facebook_tcp_blocking"] == False def fbmessenger_dns_blocked_for_all(ooni_exe, outfile): """ Test case where everything we measure is DNS blocked """ args = [] for _, value in services.items(): args.extend(helper_for_blocking_services_via_dns(value)) tk = execute_jafar_and_return_validated_test_keys( ooni_exe, outfile, "fbmessenger_dns_blocked_for_all", args, ) assert tk["facebook_b_api_dns_consistent"] == False assert tk["facebook_b_api_reachable"] == None assert tk["facebook_b_graph_dns_consistent"] == False assert tk["facebook_b_graph_reachable"] == None assert tk["facebook_edge_dns_consistent"] == False assert tk["facebook_edge_reachable"] == None assert tk["facebook_external_cdn_dns_consistent"] == False assert tk["facebook_external_cdn_reachable"] == None assert tk["facebook_scontent_cdn_dns_consistent"] == False assert tk["facebook_scontent_cdn_reachable"] == None assert tk["facebook_star_dns_consistent"] == False assert tk["facebook_star_reachable"] == None assert tk["facebook_stun_dns_consistent"] == False assert tk["facebook_stun_reachable"] == None assert tk["facebook_dns_blocking"] == True assert tk["facebook_tcp_blocking"] == False def fbmessenger_dns_blocked_for_some(ooni_exe, outfile): """ Test case where some endpoints are DNS blocked """ args = [] args.extend(helper_for_blocking_services_via_dns(services["b_graph"])) args.extend(helper_for_blocking_services_via_dns(services["stun"])) tk = execute_jafar_and_return_validated_test_keys( ooni_exe, outfile, "fbmessenger_dns_blocked_for_some", args, ) assert tk["facebook_b_api_dns_consistent"] == True assert tk["facebook_b_api_reachable"] == True assert tk["facebook_b_graph_dns_consistent"] == False assert tk["facebook_b_graph_reachable"] == None assert tk["facebook_edge_dns_consistent"] == True assert tk["facebook_edge_reachable"] == True assert tk["facebook_external_cdn_dns_consistent"] == True assert tk["facebook_external_cdn_reachable"] == True assert tk["facebook_scontent_cdn_dns_consistent"] == True assert tk["facebook_scontent_cdn_reachable"] == True assert tk["facebook_star_dns_consistent"] == True assert tk["facebook_star_reachable"] == True assert tk["facebook_stun_dns_consistent"] == False assert tk["facebook_stun_reachable"] == None assert tk["facebook_dns_blocking"] == True assert tk["facebook_tcp_blocking"] == False def fbmessenger_tcp_blocked_for_all(ooni_exe, outfile): """ Test case where everything we measure is TCP blocked """ args = [] for _, value in services.items(): args.extend(helper_for_blocking_services_via_tcp(value)) tk = execute_jafar_and_return_validated_test_keys( ooni_exe, outfile, "fbmessenger_tcp_blocked_for_all", args, ) assert tk["facebook_b_api_dns_consistent"] == True assert tk["facebook_b_api_reachable"] == False assert tk["facebook_b_graph_dns_consistent"] == True assert tk["facebook_b_graph_reachable"] == False assert tk["facebook_edge_dns_consistent"] == True assert tk["facebook_edge_reachable"] == False assert tk["facebook_external_cdn_dns_consistent"] == True assert tk["facebook_external_cdn_reachable"] == False assert tk["facebook_scontent_cdn_dns_consistent"] == True assert tk["facebook_scontent_cdn_reachable"] == False assert tk["facebook_star_dns_consistent"] == True assert tk["facebook_star_reachable"] == False assert tk["facebook_stun_dns_consistent"] == True assert tk["facebook_stun_reachable"] == None assert tk["facebook_dns_blocking"] == False assert tk["facebook_tcp_blocking"] == True def fbmessenger_tcp_blocked_for_some(ooni_exe, outfile): """ Test case where only some endpoints are TCP blocked """ args = [] args.extend(helper_for_blocking_services_via_tcp(services["edge"])) tk = execute_jafar_and_return_validated_test_keys( ooni_exe, outfile, "fbmessenger_tcp_blocked_for_some", args, ) assert tk["facebook_b_api_dns_consistent"] == True assert tk["facebook_b_api_reachable"] == True assert tk["facebook_b_graph_dns_consistent"] == True assert tk["facebook_b_graph_reachable"] == True assert tk["facebook_edge_dns_consistent"] == True assert tk["facebook_edge_reachable"] == False assert tk["facebook_external_cdn_dns_consistent"] == True assert tk["facebook_external_cdn_reachable"] == True assert tk["facebook_scontent_cdn_dns_consistent"] == True assert tk["facebook_scontent_cdn_reachable"] == True assert tk["facebook_star_dns_consistent"] == True assert tk["facebook_star_reachable"] == True assert tk["facebook_stun_dns_consistent"] == True assert tk["facebook_stun_reachable"] == None assert tk["facebook_dns_blocking"] == False assert tk["facebook_tcp_blocking"] == True def fbmessenger_mixed_results(ooni_exe, outfile): """ Test case where only some endpoints are TCP blocked """ args = [] args.extend(helper_for_blocking_services_via_tcp(services["edge"])) args.extend(helper_for_blocking_services_via_dns(services["b_api"])) tk = execute_jafar_and_return_validated_test_keys( ooni_exe, outfile, "fbmessenger_tcp_blocked_for_some", args, ) assert tk["facebook_b_api_dns_consistent"] == False assert tk["facebook_b_api_reachable"] == None assert tk["facebook_b_graph_dns_consistent"] == True assert tk["facebook_b_graph_reachable"] == True assert tk["facebook_edge_dns_consistent"] == True assert tk["facebook_edge_reachable"] == False assert tk["facebook_external_cdn_dns_consistent"] == True assert tk["facebook_external_cdn_reachable"] == True assert tk["facebook_scontent_cdn_dns_consistent"] == True assert tk["facebook_scontent_cdn_reachable"] == True assert tk["facebook_star_dns_consistent"] == True assert tk["facebook_star_reachable"] == True assert tk["facebook_stun_dns_consistent"] == True assert tk["facebook_stun_reachable"] == None assert tk["facebook_dns_blocking"] == True assert tk["facebook_tcp_blocking"] == True def main(): if len(sys.argv) != 2: sys.exit("usage: %s /path/to/ooniprobelegacy-like/binary" % sys.argv[0]) outfile = "fbmessenger.jsonl" ooni_exe = sys.argv[1] tests = [ fbmessenger_dns_hijacked_for_all, fbmessenger_dns_hijacked_for_some, fbmessenger_dns_blocked_for_all, fbmessenger_dns_blocked_for_some, fbmessenger_tcp_blocked_for_all, fbmessenger_tcp_blocked_for_some, fbmessenger_mixed_results, ] for test in tests: test(ooni_exe, outfile) time.sleep(7) if __name__ == "__main__": main()
40.84669
80
0.720464
1,538
11,723
5.124187
0.102731
0.114706
0.227382
0.134501
0.826672
0.799137
0.786448
0.78556
0.77414
0.753077
0
0.002572
0.170946
11,723
286
81
40.98951
0.808314
0.073701
0
0.59322
0
0
0.354356
0.321754
0
0
0
0
0.512712
1
0.050847
false
0
0.042373
0
0.110169
0
0
0
0
null
0
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
8
332b3bd1074e1d9f5c7b19d058783fca2b840e03
50,991
py
Python
pyboto3/accessanalyzer.py
gehad-shaat/pyboto3
4a0c2851a8bc04fb1c71c36086f7bb257e48181d
[ "MIT" ]
91
2016-12-31T11:38:37.000Z
2021-09-16T19:33:23.000Z
pyboto3/accessanalyzer.py
gehad-shaat/pyboto3
4a0c2851a8bc04fb1c71c36086f7bb257e48181d
[ "MIT" ]
7
2017-01-02T18:54:23.000Z
2020-08-11T13:54:02.000Z
pyboto3/accessanalyzer.py
gehad-shaat/pyboto3
4a0c2851a8bc04fb1c71c36086f7bb257e48181d
[ "MIT" ]
26
2016-12-31T13:11:00.000Z
2022-03-03T21:01:12.000Z
''' The MIT License (MIT) Copyright (c) 2016 WavyCloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ''' def can_paginate(operation_name=None): """ Check if an operation can be paginated. :type operation_name: string :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). """ pass def create_analyzer(analyzerName=None, archiveRules=None, clientToken=None, tags=None, type=None): """ Creates an analyzer for your account. See also: AWS API Documentation Exceptions :example: response = client.create_analyzer( analyzerName='string', archiveRules=[ { 'filter': { 'string': { 'contains': [ 'string', ], 'eq': [ 'string', ], 'exists': True|False, 'neq': [ 'string', ] } }, 'ruleName': 'string' }, ], clientToken='string', tags={ 'string': 'string' }, type='ACCOUNT'|'ORGANIZATION' ) :type analyzerName: string :param analyzerName: [REQUIRED]\nThe name of the analyzer to create.\n :type archiveRules: list :param archiveRules: Specifies the archive rules to add for the analyzer. Archive rules automatically archive findings that meet the criteria you define for the rule.\n\n(dict) --An criterion statement in an archive rule. Each archive rule may have multiple criteria.\n\nfilter (dict) -- [REQUIRED]The condition and values for a criterion.\n\n(string) --\n(dict) --The criteria to use in the filter that defines the archive rule.\n\ncontains (list) --A 'contains' operator to match for the filter used to create the rule.\n\n(string) --\n\n\neq (list) --An 'equals' operator to match for the filter used to create the rule.\n\n(string) --\n\n\nexists (boolean) --An 'exists' operator to match for the filter used to create the rule.\n\nneq (list) --A 'not equals' operator to match for the filter used to create the rule.\n\n(string) --\n\n\n\n\n\n\n\n\nruleName (string) -- [REQUIRED]The name of the rule.\n\n\n\n\n :type clientToken: string :param clientToken: A client token.\nThis field is autopopulated if not provided.\n :type tags: dict :param tags: The tags to apply to the analyzer.\n\n(string) --\n(string) --\n\n\n\n :type type: string :param type: [REQUIRED]\nThe type of analyzer to create. Only ACCOUNT analyzers are supported. You can create only one analyzer per account per Region.\n :rtype: dict ReturnsResponse Syntax { 'arn': 'string' } Response Structure (dict) -- The response to the request to create an analyzer. arn (string) -- The ARN of the analyzer that was created by the request. Exceptions AccessAnalyzer.Client.exceptions.ConflictException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ServiceQuotaExceededException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'arn': 'string' } :returns: AccessAnalyzer.Client.exceptions.ConflictException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ServiceQuotaExceededException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def create_archive_rule(analyzerName=None, clientToken=None, filter=None, ruleName=None): """ Creates an archive rule for the specified analyzer. Archive rules automatically archive findings that meet the criteria you define when you create the rule. See also: AWS API Documentation Exceptions :example: response = client.create_archive_rule( analyzerName='string', clientToken='string', filter={ 'string': { 'contains': [ 'string', ], 'eq': [ 'string', ], 'exists': True|False, 'neq': [ 'string', ] } }, ruleName='string' ) :type analyzerName: string :param analyzerName: [REQUIRED]\nThe name of the created analyzer.\n :type clientToken: string :param clientToken: A client token.\nThis field is autopopulated if not provided.\n :type filter: dict :param filter: [REQUIRED]\nThe criteria for the rule.\n\n(string) --\n(dict) --The criteria to use in the filter that defines the archive rule.\n\ncontains (list) --A 'contains' operator to match for the filter used to create the rule.\n\n(string) --\n\n\neq (list) --An 'equals' operator to match for the filter used to create the rule.\n\n(string) --\n\n\nexists (boolean) --An 'exists' operator to match for the filter used to create the rule.\n\nneq (list) --A 'not equals' operator to match for the filter used to create the rule.\n\n(string) --\n\n\n\n\n\n\n\n :type ruleName: string :param ruleName: [REQUIRED]\nThe name of the rule to create.\n :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ConflictException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ServiceQuotaExceededException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def delete_analyzer(analyzerName=None, clientToken=None): """ Deletes the specified analyzer. When you delete an analyzer, Access Analyzer is disabled for the account in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action. See also: AWS API Documentation Exceptions :example: response = client.delete_analyzer( analyzerName='string', clientToken='string' ) :type analyzerName: string :param analyzerName: [REQUIRED]\nThe name of the analyzer to delete.\n :type clientToken: string :param clientToken: A client token.\nThis field is autopopulated if not provided.\n :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def delete_archive_rule(analyzerName=None, clientToken=None, ruleName=None): """ Deletes the specified archive rule. See also: AWS API Documentation Exceptions :example: response = client.delete_archive_rule( analyzerName='string', clientToken='string', ruleName='string' ) :type analyzerName: string :param analyzerName: [REQUIRED]\nThe name of the analyzer that associated with the archive rule to delete.\n :type clientToken: string :param clientToken: A client token.\nThis field is autopopulated if not provided.\n :type ruleName: string :param ruleName: [REQUIRED]\nThe name of the rule to delete.\n :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): """ Generate a presigned url given a client, its method, and arguments :type ClientMethod: string :param ClientMethod: The client method to presign for :type Params: dict :param Params: The parameters normally passed to\nClientMethod. :type ExpiresIn: int :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) :type HttpMethod: string :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. """ pass def get_analyzed_resource(analyzerArn=None, resourceArn=None): """ Retrieves information about a resource that was analyzed. See also: AWS API Documentation Exceptions :example: response = client.get_analyzed_resource( analyzerArn='string', resourceArn='string' ) :type analyzerArn: string :param analyzerArn: [REQUIRED]\nThe ARN of the analyzer to retrieve information from.\n :type resourceArn: string :param resourceArn: [REQUIRED]\nThe ARN of the resource to retrieve information about.\n :rtype: dict ReturnsResponse Syntax { 'resource': { 'actions': [ 'string', ], 'analyzedAt': datetime(2015, 1, 1), 'createdAt': datetime(2015, 1, 1), 'error': 'string', 'isPublic': True|False, 'resourceArn': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::IAM::Role'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::S3::Bucket'|'AWS::SQS::Queue', 'sharedVia': [ 'string', ], 'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED', 'updatedAt': datetime(2015, 1, 1) } } Response Structure (dict) -- The response to the request. resource (dict) -- An AnalyedResource object that contains information that Access Analyzer found when it analyzed the resource. actions (list) -- The actions that an external principal is granted permission to use by the policy that generated the finding. (string) -- analyzedAt (datetime) -- The time at which the resource was analyzed. createdAt (datetime) -- The time at which the finding was created. error (string) -- An error message. isPublic (boolean) -- Indicates whether the policy that generated the finding grants public access to the resource. resourceArn (string) -- The ARN of the resource that was analyzed. resourceOwnerAccount (string) -- The AWS account ID that owns the resource. resourceType (string) -- The type of the resource that was analyzed. sharedVia (list) -- Indicates how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings. (string) -- status (string) -- The current status of the finding generated from the analyzed resource. updatedAt (datetime) -- The time at which the finding was updated. Exceptions AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'resource': { 'actions': [ 'string', ], 'analyzedAt': datetime(2015, 1, 1), 'createdAt': datetime(2015, 1, 1), 'error': 'string', 'isPublic': True|False, 'resourceArn': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::IAM::Role'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::S3::Bucket'|'AWS::SQS::Queue', 'sharedVia': [ 'string', ], 'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED', 'updatedAt': datetime(2015, 1, 1) } } :returns: (string) -- """ pass def get_analyzer(analyzerName=None): """ Retrieves information about the specified analyzer. See also: AWS API Documentation Exceptions :example: response = client.get_analyzer( analyzerName='string' ) :type analyzerName: string :param analyzerName: [REQUIRED]\nThe name of the analyzer retrieved.\n :rtype: dict ReturnsResponse Syntax{ 'analyzer': { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'lastResourceAnalyzed': 'string', 'lastResourceAnalyzedAt': datetime(2015, 1, 1), 'name': 'string', 'status': 'ACTIVE'|'CREATING'|'DISABLED'|'FAILED', 'statusReason': { 'code': 'AWS_SERVICE_ACCESS_DISABLED'|'DELEGATED_ADMINISTRATOR_DEREGISTERED'|'ORGANIZATION_DELETED'|'SERVICE_LINKED_ROLE_CREATION_FAILED' }, 'tags': { 'string': 'string' }, 'type': 'ACCOUNT'|'ORGANIZATION' } } Response Structure (dict) --The response to the request. analyzer (dict) --An AnalyzerSummary object that contains information about the analyzer. arn (string) --The ARN of the analyzer. createdAt (datetime) --A timestamp for the time at which the analyzer was created. lastResourceAnalyzed (string) --The resource that was most recently analyzed by the analyzer. lastResourceAnalyzedAt (datetime) --The time at which the most recently analyzed resource was analyzed. name (string) --The name of the analyzer. status (string) --The status of the analyzer. An Active analyzer successfully monitors supported resources and generates new findings. The analyzer is Disabled when a user action, such as removing trusted access for IAM Access Analyzer from AWS Organizations, causes the analyzer to stop generating new findings. The status is Creating when the analyzer creation is in progress and Failed when the analyzer creation has failed. statusReason (dict) --The statusReason provides more details about the current status of the analyzer. For example, if the creation for the analyzer fails, a Failed status is displayed. For an analyzer with organization as the type, this failure can be due to an issue with creating the service-linked roles required in the member accounts of the AWS organization. code (string) --The reason code for the current status of the analyzer. tags (dict) --The tags added to the analyzer. (string) -- (string) -- type (string) --The type of analyzer, which corresponds to the zone of trust chosen for the analyzer. Exceptions AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'analyzer': { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'lastResourceAnalyzed': 'string', 'lastResourceAnalyzedAt': datetime(2015, 1, 1), 'name': 'string', 'status': 'ACTIVE'|'CREATING'|'DISABLED'|'FAILED', 'statusReason': { 'code': 'AWS_SERVICE_ACCESS_DISABLED'|'DELEGATED_ADMINISTRATOR_DEREGISTERED'|'ORGANIZATION_DELETED'|'SERVICE_LINKED_ROLE_CREATION_FAILED' }, 'tags': { 'string': 'string' }, 'type': 'ACCOUNT'|'ORGANIZATION' } } :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def get_archive_rule(analyzerName=None, ruleName=None): """ Retrieves information about an archive rule. See also: AWS API Documentation Exceptions :example: response = client.get_archive_rule( analyzerName='string', ruleName='string' ) :type analyzerName: string :param analyzerName: [REQUIRED]\nThe name of the analyzer to retrieve rules from.\n :type ruleName: string :param ruleName: [REQUIRED]\nThe name of the rule to retrieve.\n :rtype: dict ReturnsResponse Syntax { 'archiveRule': { 'createdAt': datetime(2015, 1, 1), 'filter': { 'string': { 'contains': [ 'string', ], 'eq': [ 'string', ], 'exists': True|False, 'neq': [ 'string', ] } }, 'ruleName': 'string', 'updatedAt': datetime(2015, 1, 1) } } Response Structure (dict) -- The response to the request. archiveRule (dict) -- Contains information about an archive rule. createdAt (datetime) -- The time at which the archive rule was created. filter (dict) -- A filter used to define the archive rule. (string) -- (dict) -- The criteria to use in the filter that defines the archive rule. contains (list) -- A "contains" operator to match for the filter used to create the rule. (string) -- eq (list) -- An "equals" operator to match for the filter used to create the rule. (string) -- exists (boolean) -- An "exists" operator to match for the filter used to create the rule. neq (list) -- A "not equals" operator to match for the filter used to create the rule. (string) -- ruleName (string) -- The name of the archive rule. updatedAt (datetime) -- The time at which the archive rule was last updated. Exceptions AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'archiveRule': { 'createdAt': datetime(2015, 1, 1), 'filter': { 'string': { 'contains': [ 'string', ], 'eq': [ 'string', ], 'exists': True|False, 'neq': [ 'string', ] } }, 'ruleName': 'string', 'updatedAt': datetime(2015, 1, 1) } } :returns: (string) -- """ pass def get_finding(analyzerArn=None, id=None): """ Retrieves information about the specified finding. See also: AWS API Documentation Exceptions :example: response = client.get_finding( analyzerArn='string', id='string' ) :type analyzerArn: string :param analyzerArn: [REQUIRED]\nThe ARN of the analyzer that generated the finding.\n :type id: string :param id: [REQUIRED]\nThe ID of the finding to retrieve.\n :rtype: dict ReturnsResponse Syntax { 'finding': { 'action': [ 'string', ], 'analyzedAt': datetime(2015, 1, 1), 'condition': { 'string': 'string' }, 'createdAt': datetime(2015, 1, 1), 'error': 'string', 'id': 'string', 'isPublic': True|False, 'principal': { 'string': 'string' }, 'resource': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::IAM::Role'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::S3::Bucket'|'AWS::SQS::Queue', 'sources': [ { 'detail': { 'accessPointArn': 'string' }, 'type': 'BUCKET_ACL'|'POLICY'|'S3_ACCESS_POINT' }, ], 'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED', 'updatedAt': datetime(2015, 1, 1) } } Response Structure (dict) -- The response to the request. finding (dict) -- A finding object that contains finding details. action (list) -- The action in the analyzed policy statement that an external principal has permission to use. (string) -- analyzedAt (datetime) -- The time at which the resource was analyzed. condition (dict) -- The condition in the analyzed policy statement that resulted in a finding. (string) -- (string) -- createdAt (datetime) -- The time at which the finding was generated. error (string) -- An error. id (string) -- The ID of the finding. isPublic (boolean) -- Indicates whether the policy that generated the finding allows public access to the resource. principal (dict) -- The external principal that access to a resource within the zone of trust. (string) -- (string) -- resource (string) -- The resource that an external principal has access to. resourceOwnerAccount (string) -- The AWS account ID that owns the resource. resourceType (string) -- The type of the resource reported in the finding. sources (list) -- The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings. (dict) -- The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings. detail (dict) -- Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings. accessPointArn (string) -- The ARN of the access point that generated the finding. type (string) -- Indicates the type of access that generated the finding. status (string) -- The current status of the finding. updatedAt (datetime) -- The time at which the finding was updated. Exceptions AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'finding': { 'action': [ 'string', ], 'analyzedAt': datetime(2015, 1, 1), 'condition': { 'string': 'string' }, 'createdAt': datetime(2015, 1, 1), 'error': 'string', 'id': 'string', 'isPublic': True|False, 'principal': { 'string': 'string' }, 'resource': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::IAM::Role'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::S3::Bucket'|'AWS::SQS::Queue', 'sources': [ { 'detail': { 'accessPointArn': 'string' }, 'type': 'BUCKET_ACL'|'POLICY'|'S3_ACCESS_POINT' }, ], 'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED', 'updatedAt': datetime(2015, 1, 1) } } :returns: (string) -- """ pass def get_paginator(operation_name=None): """ Create a paginator for an operation. :type operation_name: string :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). :rtype: L{botocore.paginate.Paginator} ReturnsA paginator object. """ pass def get_waiter(waiter_name=None): """ Returns an object that can wait for some condition. :type waiter_name: str :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. :rtype: botocore.waiter.Waiter """ pass def list_analyzed_resources(analyzerArn=None, maxResults=None, nextToken=None, resourceType=None): """ Retrieves a list of resources of the specified type that have been analyzed by the specified analyzer.. See also: AWS API Documentation Exceptions :example: response = client.list_analyzed_resources( analyzerArn='string', maxResults=123, nextToken='string', resourceType='AWS::IAM::Role'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::S3::Bucket'|'AWS::SQS::Queue' ) :type analyzerArn: string :param analyzerArn: [REQUIRED]\nThe ARN of the analyzer to retrieve a list of analyzed resources from.\n :type maxResults: integer :param maxResults: The maximum number of results to return in the response. :type nextToken: string :param nextToken: A token used for pagination of results returned. :type resourceType: string :param resourceType: The type of resource. :rtype: dict ReturnsResponse Syntax { 'analyzedResources': [ { 'resourceArn': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::IAM::Role'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::S3::Bucket'|'AWS::SQS::Queue' }, ], 'nextToken': 'string' } Response Structure (dict) -- The response to the request. analyzedResources (list) -- A list of resources that were analyzed. (dict) -- Contains the ARN of the analyzed resource. resourceArn (string) -- The ARN of the analyzed resource. resourceOwnerAccount (string) -- The AWS account ID that owns the resource. resourceType (string) -- The type of resource that was analyzed. nextToken (string) -- A token used for pagination of results returned. Exceptions AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'analyzedResources': [ { 'resourceArn': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::IAM::Role'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::S3::Bucket'|'AWS::SQS::Queue' }, ], 'nextToken': 'string' } :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def list_analyzers(maxResults=None, nextToken=None, type=None): """ Retrieves a list of analyzers. See also: AWS API Documentation Exceptions :example: response = client.list_analyzers( maxResults=123, nextToken='string', type='ACCOUNT'|'ORGANIZATION' ) :type maxResults: integer :param maxResults: The maximum number of results to return in the response. :type nextToken: string :param nextToken: A token used for pagination of results returned. :type type: string :param type: The type of analyzer. :rtype: dict ReturnsResponse Syntax { 'analyzers': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'lastResourceAnalyzed': 'string', 'lastResourceAnalyzedAt': datetime(2015, 1, 1), 'name': 'string', 'status': 'ACTIVE'|'CREATING'|'DISABLED'|'FAILED', 'statusReason': { 'code': 'AWS_SERVICE_ACCESS_DISABLED'|'DELEGATED_ADMINISTRATOR_DEREGISTERED'|'ORGANIZATION_DELETED'|'SERVICE_LINKED_ROLE_CREATION_FAILED' }, 'tags': { 'string': 'string' }, 'type': 'ACCOUNT'|'ORGANIZATION' }, ], 'nextToken': 'string' } Response Structure (dict) -- The response to the request. analyzers (list) -- The analyzers retrieved. (dict) -- Contains information about the analyzer. arn (string) -- The ARN of the analyzer. createdAt (datetime) -- A timestamp for the time at which the analyzer was created. lastResourceAnalyzed (string) -- The resource that was most recently analyzed by the analyzer. lastResourceAnalyzedAt (datetime) -- The time at which the most recently analyzed resource was analyzed. name (string) -- The name of the analyzer. status (string) -- The status of the analyzer. An Active analyzer successfully monitors supported resources and generates new findings. The analyzer is Disabled when a user action, such as removing trusted access for IAM Access Analyzer from AWS Organizations, causes the analyzer to stop generating new findings. The status is Creating when the analyzer creation is in progress and Failed when the analyzer creation has failed. statusReason (dict) -- The statusReason provides more details about the current status of the analyzer. For example, if the creation for the analyzer fails, a Failed status is displayed. For an analyzer with organization as the type, this failure can be due to an issue with creating the service-linked roles required in the member accounts of the AWS organization. code (string) -- The reason code for the current status of the analyzer. tags (dict) -- The tags added to the analyzer. (string) -- (string) -- type (string) -- The type of analyzer, which corresponds to the zone of trust chosen for the analyzer. nextToken (string) -- A token used for pagination of results returned. Exceptions AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'analyzers': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'lastResourceAnalyzed': 'string', 'lastResourceAnalyzedAt': datetime(2015, 1, 1), 'name': 'string', 'status': 'ACTIVE'|'CREATING'|'DISABLED'|'FAILED', 'statusReason': { 'code': 'AWS_SERVICE_ACCESS_DISABLED'|'DELEGATED_ADMINISTRATOR_DEREGISTERED'|'ORGANIZATION_DELETED'|'SERVICE_LINKED_ROLE_CREATION_FAILED' }, 'tags': { 'string': 'string' }, 'type': 'ACCOUNT'|'ORGANIZATION' }, ], 'nextToken': 'string' } :returns: (string) -- (string) -- """ pass def list_archive_rules(analyzerName=None, maxResults=None, nextToken=None): """ Retrieves a list of archive rules created for the specified analyzer. See also: AWS API Documentation Exceptions :example: response = client.list_archive_rules( analyzerName='string', maxResults=123, nextToken='string' ) :type analyzerName: string :param analyzerName: [REQUIRED]\nThe name of the analyzer to retrieve rules from.\n :type maxResults: integer :param maxResults: The maximum number of results to return in the request. :type nextToken: string :param nextToken: A token used for pagination of results returned. :rtype: dict ReturnsResponse Syntax { 'archiveRules': [ { 'createdAt': datetime(2015, 1, 1), 'filter': { 'string': { 'contains': [ 'string', ], 'eq': [ 'string', ], 'exists': True|False, 'neq': [ 'string', ] } }, 'ruleName': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } Response Structure (dict) -- The response to the request. archiveRules (list) -- A list of archive rules created for the specified analyzer. (dict) -- Contains information about an archive rule. createdAt (datetime) -- The time at which the archive rule was created. filter (dict) -- A filter used to define the archive rule. (string) -- (dict) -- The criteria to use in the filter that defines the archive rule. contains (list) -- A "contains" operator to match for the filter used to create the rule. (string) -- eq (list) -- An "equals" operator to match for the filter used to create the rule. (string) -- exists (boolean) -- An "exists" operator to match for the filter used to create the rule. neq (list) -- A "not equals" operator to match for the filter used to create the rule. (string) -- ruleName (string) -- The name of the archive rule. updatedAt (datetime) -- The time at which the archive rule was last updated. nextToken (string) -- A token used for pagination of results returned. Exceptions AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'archiveRules': [ { 'createdAt': datetime(2015, 1, 1), 'filter': { 'string': { 'contains': [ 'string', ], 'eq': [ 'string', ], 'exists': True|False, 'neq': [ 'string', ] } }, 'ruleName': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } :returns: (string) -- """ pass def list_findings(analyzerArn=None, filter=None, maxResults=None, nextToken=None, sort=None): """ Retrieves a list of findings generated by the specified analyzer. See also: AWS API Documentation Exceptions :example: response = client.list_findings( analyzerArn='string', filter={ 'string': { 'contains': [ 'string', ], 'eq': [ 'string', ], 'exists': True|False, 'neq': [ 'string', ] } }, maxResults=123, nextToken='string', sort={ 'attributeName': 'string', 'orderBy': 'ASC'|'DESC' } ) :type analyzerArn: string :param analyzerArn: [REQUIRED]\nThe ARN of the analyzer to retrieve findings from.\n :type filter: dict :param filter: A filter to match for the findings to return.\n\n(string) --\n(dict) --The criteria to use in the filter that defines the archive rule.\n\ncontains (list) --A 'contains' operator to match for the filter used to create the rule.\n\n(string) --\n\n\neq (list) --An 'equals' operator to match for the filter used to create the rule.\n\n(string) --\n\n\nexists (boolean) --An 'exists' operator to match for the filter used to create the rule.\n\nneq (list) --A 'not equals' operator to match for the filter used to create the rule.\n\n(string) --\n\n\n\n\n\n\n\n :type maxResults: integer :param maxResults: The maximum number of results to return in the response. :type nextToken: string :param nextToken: A token used for pagination of results returned. :type sort: dict :param sort: The sort order for the findings returned.\n\nattributeName (string) --The name of the attribute to sort on.\n\norderBy (string) --The sort order, ascending or descending.\n\n\n :rtype: dict ReturnsResponse Syntax { 'findings': [ { 'action': [ 'string', ], 'analyzedAt': datetime(2015, 1, 1), 'condition': { 'string': 'string' }, 'createdAt': datetime(2015, 1, 1), 'error': 'string', 'id': 'string', 'isPublic': True|False, 'principal': { 'string': 'string' }, 'resource': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::IAM::Role'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::S3::Bucket'|'AWS::SQS::Queue', 'sources': [ { 'detail': { 'accessPointArn': 'string' }, 'type': 'BUCKET_ACL'|'POLICY'|'S3_ACCESS_POINT' }, ], 'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } Response Structure (dict) -- The response to the request. findings (list) -- A list of findings retrieved from the analyzer that match the filter criteria specified, if any. (dict) -- Contains information about a finding. action (list) -- The action in the analyzed policy statement that an external principal has permission to use. (string) -- analyzedAt (datetime) -- The time at which the resource-based policy that generated the finding was analyzed. condition (dict) -- The condition in the analyzed policy statement that resulted in a finding. (string) -- (string) -- createdAt (datetime) -- The time at which the finding was created. error (string) -- The error that resulted in an Error finding. id (string) -- The ID of the finding. isPublic (boolean) -- Indicates whether the finding reports a resource that has a policy that allows public access. principal (dict) -- The external principal that has access to a resource within the zone of trust. (string) -- (string) -- resource (string) -- The resource that the external principal has access to. resourceOwnerAccount (string) -- The AWS account ID that owns the resource. resourceType (string) -- The type of the resource that the external principal has access to. sources (list) -- The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings. (dict) -- The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings. detail (dict) -- Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings. accessPointArn (string) -- The ARN of the access point that generated the finding. type (string) -- Indicates the type of access that generated the finding. status (string) -- The status of the finding. updatedAt (datetime) -- The time at which the finding was most recently updated. nextToken (string) -- A token used for pagination of results returned. Exceptions AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'findings': [ { 'action': [ 'string', ], 'analyzedAt': datetime(2015, 1, 1), 'condition': { 'string': 'string' }, 'createdAt': datetime(2015, 1, 1), 'error': 'string', 'id': 'string', 'isPublic': True|False, 'principal': { 'string': 'string' }, 'resource': 'string', 'resourceOwnerAccount': 'string', 'resourceType': 'AWS::IAM::Role'|'AWS::KMS::Key'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::S3::Bucket'|'AWS::SQS::Queue', 'sources': [ { 'detail': { 'accessPointArn': 'string' }, 'type': 'BUCKET_ACL'|'POLICY'|'S3_ACCESS_POINT' }, ], 'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } :returns: (string) -- """ pass def list_tags_for_resource(resourceArn=None): """ Retrieves a list of tags applied to the specified resource. See also: AWS API Documentation Exceptions :example: response = client.list_tags_for_resource( resourceArn='string' ) :type resourceArn: string :param resourceArn: [REQUIRED]\nThe ARN of the resource to retrieve tags from.\n :rtype: dict ReturnsResponse Syntax{ 'tags': { 'string': 'string' } } Response Structure (dict) --The response to the request. tags (dict) --The tags that are applied to the specified resource. (string) -- (string) -- Exceptions AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: { 'tags': { 'string': 'string' } } :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def start_resource_scan(analyzerArn=None, resourceArn=None): """ Immediately starts a scan of the policies applied to the specified resource. See also: AWS API Documentation Exceptions :example: response = client.start_resource_scan( analyzerArn='string', resourceArn='string' ) :type analyzerArn: string :param analyzerArn: [REQUIRED]\nThe ARN of the analyzer to use to scan the policies applied to the specified resource.\n :type resourceArn: string :param resourceArn: [REQUIRED]\nThe ARN of the resource to scan.\n :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def tag_resource(resourceArn=None, tags=None): """ Adds a tag to the specified resource. See also: AWS API Documentation Exceptions :example: response = client.tag_resource( resourceArn='string', tags={ 'string': 'string' } ) :type resourceArn: string :param resourceArn: [REQUIRED]\nThe ARN of the resource to add the tag to.\n :type tags: dict :param tags: [REQUIRED]\nThe tags to add to the resource.\n\n(string) --\n(string) --\n\n\n\n :rtype: dict ReturnsResponse Syntax {} Response Structure (dict) -- The response to the request. Exceptions AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: {} :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def untag_resource(resourceArn=None, tagKeys=None): """ Removes a tag from the specified resource. See also: AWS API Documentation Exceptions :example: response = client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] ) :type resourceArn: string :param resourceArn: [REQUIRED]\nThe ARN of the resource to remove the tag from.\n :type tagKeys: list :param tagKeys: [REQUIRED]\nThe key for the tag to add.\n\n(string) --\n\n :rtype: dict ReturnsResponse Syntax {} Response Structure (dict) -- The response to the request. Exceptions AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException :return: {} :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def update_archive_rule(analyzerName=None, clientToken=None, filter=None, ruleName=None): """ Updates the criteria and values for the specified archive rule. See also: AWS API Documentation Exceptions :example: response = client.update_archive_rule( analyzerName='string', clientToken='string', filter={ 'string': { 'contains': [ 'string', ], 'eq': [ 'string', ], 'exists': True|False, 'neq': [ 'string', ] } }, ruleName='string' ) :type analyzerName: string :param analyzerName: [REQUIRED]\nThe name of the analyzer to update the archive rules for.\n :type clientToken: string :param clientToken: A client token.\nThis field is autopopulated if not provided.\n :type filter: dict :param filter: [REQUIRED]\nA filter to match for the rules to update. Only rules that match the filter are updated.\n\n(string) --\n(dict) --The criteria to use in the filter that defines the archive rule.\n\ncontains (list) --A 'contains' operator to match for the filter used to create the rule.\n\n(string) --\n\n\neq (list) --An 'equals' operator to match for the filter used to create the rule.\n\n(string) --\n\n\nexists (boolean) --An 'exists' operator to match for the filter used to create the rule.\n\nneq (list) --A 'not equals' operator to match for the filter used to create the rule.\n\n(string) --\n\n\n\n\n\n\n\n :type ruleName: string :param ruleName: [REQUIRED]\nThe name of the rule to update.\n :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass def update_findings(analyzerArn=None, clientToken=None, ids=None, resourceArn=None, status=None): """ Updates the status for the specified findings. See also: AWS API Documentation Exceptions :example: response = client.update_findings( analyzerArn='string', clientToken='string', ids=[ 'string', ], resourceArn='string', status='ACTIVE'|'ARCHIVED' ) :type analyzerArn: string :param analyzerArn: [REQUIRED]\nThe ARN of the analyzer that generated the findings to update.\n :type clientToken: string :param clientToken: A client token.\nThis field is autopopulated if not provided.\n :type ids: list :param ids: The IDs of the findings to update.\n\n(string) --\n\n :type resourceArn: string :param resourceArn: The ARN of the resource identified in the finding. :type status: string :param status: [REQUIRED]\nThe state represents the action to take to update the finding Status. Use ARCHIVE to change an Active finding to an Archived finding. Use ACTIVE to change an Archived finding to an Active finding.\n :returns: AccessAnalyzer.Client.exceptions.ResourceNotFoundException AccessAnalyzer.Client.exceptions.ValidationException AccessAnalyzer.Client.exceptions.InternalServerException AccessAnalyzer.Client.exceptions.ThrottlingException AccessAnalyzer.Client.exceptions.AccessDeniedException """ pass
27.772876
920
0.6438
5,487
50,991
5.958812
0.078549
0.074627
0.11194
0.014558
0.827991
0.802422
0.78713
0.779912
0.776028
0.768718
0
0.006466
0.259967
50,991
1,835
921
27.788011
0.859997
0.957502
0
0.5
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
9
33478ce847065e5b26e00bc2ca0d7e1523e20ff9
12,856
py
Python
pybots/test/filters/test_window.py
aivian/robots
6827886916e36432ce1d806f0a78edef6c9270d9
[ "MIT" ]
null
null
null
pybots/test/filters/test_window.py
aivian/robots
6827886916e36432ce1d806f0a78edef6c9270d9
[ "MIT" ]
null
null
null
pybots/test/filters/test_window.py
aivian/robots
6827886916e36432ce1d806f0a78edef6c9270d9
[ "MIT" ]
1
2021-09-24T17:08:30.000Z
2021-09-24T17:08:30.000Z
import pdb import sys import numpy import filters.window import geodesy.conversions import matplotlib.pyplot as plt if __name__ == '__main__': #pdb.set_trace() r1 = {} r10 = {} r50 = {} r100 = {} if sys.argv[1] == 'sample' or sys.argv[1] == 'all': # test the sample window filter data = numpy.arange(1,101) sw_filter = filters.window.Average(10) result_1 = [] result_10 = [] result_50 = [] result_100 = [] for x in data: sw_filter.add(x) result_1.append(sw_filter.mean(n=1)) result_10.append(sw_filter.mean()) result_50.append(sw_filter.mean(n=50)) result_100.append(sw_filter.mean(n=100)) result_1 = numpy.array(result_1, ndmin=2).T result_10 = numpy.array(result_10, ndmin=2).T result_50 = numpy.array(result_50, ndmin=2).T result_100 = numpy.array(result_100, ndmin=2).T plt.plot(result_1, label='n=1') plt.plot(result_10, label='n=10') plt.plot(result_50, label='n=50') plt.plot(result_100, label='n=100') plt.grid() plt.legend() plt.xlabel('sample') plt.ylabel('window average') plt.title('sample window') if sys.argv[1] != 'all': plt.show() r1['sample'] = result_1 r10['sample'] = result_10 r50['sample'] = result_50 r100['sample'] = result_100 if sys.argv[1] == 'time' or sys.argv[1] == 'all': # test the time window filter time = numpy.arange(1, 101) sw_filter = filters.window.TimeAverage(10) result_1 = [] result_10 = [] result_50 = [] result_100 = [] for x, t in zip(data, time): sw_filter.add(x, t) result_1.append(sw_filter.mean(t_avg=1)) result_10.append(sw_filter.mean()) result_50.append(sw_filter.mean(t_avg=50)) result_100.append(sw_filter.mean(t_avg=100)) result_1 = numpy.array(result_1, ndmin=2).T result_10 = numpy.array(result_10, ndmin=2).T result_50 = numpy.array(result_50, ndmin=2).T result_100 = numpy.array(result_100, ndmin=2).T plt.plot(result_1, label='t=1') plt.plot(result_10, label='t=10') plt.plot(result_50, label='t=50') plt.plot(result_100, label='t=100') plt.grid() plt.legend() plt.xlabel('sample') plt.ylabel('window average') plt.title('time window') if sys.argv[1] != 'all': plt.show() r1['time'] = result_1 r10['time'] = result_10 r50['time'] = result_50 r100['time'] = result_100 if sys.argv[1] == 'nd' or sys.argv[1] == 'all': # test the sample window filter for n-d data sw_filter = filters.window.Average(10) r = 1.e3 theta = numpy.linspace(-numpy.pi, numpy.pi, 100) X = numpy.vstack(( r * numpy.cos(theta), r * numpy.sin(theta), numpy.zeros(theta.shape), numpy.arange(1, theta.shape[0] + 1))).T result_1 = [] result_10 = [] result_50 = [] result_100 = [] for x in X: sw_filter.add(x) result_1.append(sw_filter.mean(n=1)) result_10.append(sw_filter.mean()) result_50.append(sw_filter.mean(n=50)) result_100.append(sw_filter.mean(n=100)) result_1 = numpy.array(result_1) result_10 = numpy.array(result_10) result_50 = numpy.array(result_50) result_100 = numpy.array(result_100) f, axs = plt.subplots(result_1.shape[1], 1, sharex=True) for i, ax in enumerate(axs): ax.plot(result_1[:,i], label='n=1') ax.plot(result_10[:,i], label='n=10') ax.plot(result_50[:,i], label='n=50') ax.plot(result_100[:,i], label='n=100') ax.grid() ax.set_ylabel('window average') ax.legend() ax.set_xlabel('sample') plt.title('sample window, nd-data') plt.figure() plt.plot(result_1[:,0], result_1[:,1], label='n=1') plt.plot(result_10[:,0], result_10[:,1], label='n=10') plt.plot(result_50[:,0], result_50[:,1], label='n=50') plt.plot(result_100[:,0], result_100[:,1], label='n=100') plt.grid() plt.legend() plt.xlabel('x (m)') plt.ylabel('y (m)') plt.axis('equal') plt.title('sample window, nd-data') if sys.argv[1] != 'all': plt.show() r1['nd'] = result_1 r10['nd'] = result_10 r50['nd'] = result_50 r100['nd'] = result_100 if sys.argv[1] == 'nd-time' or sys.argv[1] == 'all': # test the sample window filter for n-d time data sw_filter = filters.window.TimeAverage(10) r = 1.e3 theta = numpy.linspace(-numpy.pi, numpy.pi, 100) time = numpy.arange(1, 101) X = numpy.vstack(( r * numpy.cos(theta), r * numpy.sin(theta), numpy.zeros(theta.shape), numpy.arange(1, theta.shape[0] + 1))).T result_1 = [] result_10 = [] result_50 = [] result_100 = [] for x,t in zip(X, time): sw_filter.add(x, t) result_1.append(sw_filter.mean(t_avg=1)) result_10.append(sw_filter.mean()) result_50.append(sw_filter.mean(t_avg=50)) result_100.append(sw_filter.mean(t_avg=100)) result_1 = numpy.array(result_1) result_10 = numpy.array(result_10) result_50 = numpy.array(result_50) result_100 = numpy.array(result_100) f, axs = plt.subplots(result_1.shape[1], 1, sharex=True) for i, ax in enumerate(axs): ax.plot(result_1[:,i], label='t=1') ax.plot(result_10[:,i], label='t=10') ax.plot(result_50[:,i], label='t=50') ax.plot(result_100[:,i], label='t=100') ax.grid() ax.set_ylabel('window average') ax.legend() ax.set_xlabel('sample') plt.title('time window, nd-data') plt.figure() plt.plot(result_1[:,0], result_1[:,1], label='t=1') plt.plot(result_10[:,0], result_10[:,1], label='t=10') plt.plot(result_50[:,0], result_50[:,1], label='t=50') plt.plot(result_100[:,0], result_100[:,1], label='t=100') plt.grid() plt.legend() plt.xlabel('x (m)') plt.ylabel('y (m)') plt.axis('equal') plt.title('time window, nd-data') if sys.argv[1] != 'all': plt.show() r1['nd-time'] = result_1 r10['nd-time'] = result_10 r50['nd-time'] = result_50 r100['nd-time'] = result_100 if sys.argv[1] == 'geo' or sys.argv[1] == 'all': # test the sample window filter for n-d data sw_filter = filters.window.GeodesicAverage(10) r = 1.e3 theta = numpy.linspace(-numpy.pi, numpy.pi, 100) lla_ref = numpy.deg2rad( numpy.array([40.010065, -105.245080, 0.0], ndmin=2)) X = numpy.vstack(( r * numpy.cos(theta), r * numpy.sin(theta), numpy.zeros(theta.shape), numpy.arange(1, theta.shape[0] + 1))).T X[:,:3] = geodesy.conversions.enu_to_lla(X[:,:3], lla_ref) result_1 = [] result_10 = [] result_50 = [] result_100 = [] for x in X: sw_filter.add(x) result_1.append(sw_filter.mean(n=1)) result_10.append(sw_filter.mean()) result_50.append(sw_filter.mean(n=50)) result_100.append(sw_filter.mean(n=100)) result_1 = numpy.array(result_1) result_10 = numpy.array(result_10) result_50 = numpy.array(result_50) result_100 = numpy.array(result_100) result_1[:,:3] = geodesy.conversions.lla_to_enu(result_1[:,:3], lla_ref) result_10[:,:3] = geodesy.conversions.lla_to_enu( result_10[:,:3], lla_ref) result_50[:,:3] = geodesy.conversions.lla_to_enu( result_50[:,:3], lla_ref) result_100[:,:3] = geodesy.conversions.lla_to_enu( result_100[:,:3], lla_ref) f, axs = plt.subplots(result_1.shape[1], 1, sharex=True) for i, ax in enumerate(axs): ax.plot(result_1[:,i], label='n=1') ax.plot(result_10[:,i], label='n=10') ax.plot(result_50[:,i], label='n=50') ax.plot(result_100[:,i], label='n=100') ax.grid() ax.set_ylabel('window average') ax.legend() ax.set_xlabel('sample') plt.title('sample window, geo data') plt.figure() plt.plot(result_1[:,0], result_1[:,1], label='n=1') plt.plot(result_10[:,0], result_10[:,1], label='n=10') plt.plot(result_50[:,0], result_50[:,1], label='n=50') plt.plot(result_100[:,0], result_100[:,1], label='n=100') plt.grid() plt.legend() plt.xlabel('x (m)') plt.ylabel('y (m)') plt.axis('equal') plt.title('sample window, geo data') if sys.argv[1] != 'all': plt.show() r1['geo'] = result_1 r10['geo'] = result_10 r50['geo'] = result_50 r100['geo'] = result_100 if sys.argv[1] == 'geo-time' or sys.argv[1] == 'all': # test the sample window filter for n-d time data sw_filter = filters.window.GeodesicTimeAverage(10) time = numpy.arange(1, 101) r = 1.e3 theta = numpy.linspace(-numpy.pi, numpy.pi, 100) lla_ref = numpy.deg2rad( numpy.array([40.010065, -105.245080, 0.0], ndmin=2)) X = numpy.vstack(( r * numpy.cos(theta), r * numpy.sin(theta), numpy.zeros(theta.shape), numpy.arange(1, theta.shape[0] + 1))).T X[:,:3] = geodesy.conversions.enu_to_lla(X[:,:3], lla_ref) result_1 = [] result_10 = [] result_50 = [] result_100 = [] for x, t in zip(X, time): sw_filter.add(x, t) result_1.append(sw_filter.mean(t_avg=1)) result_10.append(sw_filter.mean()) result_50.append(sw_filter.mean(t_avg=50)) result_100.append(sw_filter.mean(t_avg=100)) result_1 = numpy.array(result_1) result_10 = numpy.array(result_10) result_50 = numpy.array(result_50) result_100 = numpy.array(result_100) result_1[:,:3] = geodesy.conversions.lla_to_enu(result_1[:,:3], lla_ref) result_10[:,:3] = geodesy.conversions.lla_to_enu( result_10[:,:3], lla_ref) result_50[:,:3] = geodesy.conversions.lla_to_enu( result_50[:,:3], lla_ref) result_100[:,:3] = geodesy.conversions.lla_to_enu( result_100[:,:3], lla_ref) f, axs = plt.subplots(result_1.shape[1], 1, sharex=True) for i, ax in enumerate(axs): ax.plot(result_1[:,i], label='t=1') ax.plot(result_10[:,i], label='t=10') ax.plot(result_50[:,i], label='t=50') ax.plot(result_100[:,i], label='t=100') ax.grid() ax.set_ylabel('window average') ax.legend() ax.set_xlabel('sample') plt.title('time window, geo data') plt.figure() plt.plot(result_1[:,0], result_1[:,1], label='t=1') plt.plot(result_10[:,0], result_10[:,1], label='t=10') plt.plot(result_50[:,0], result_50[:,1], label='t=50') plt.plot(result_100[:,0], result_100[:,1], label='t=100') plt.grid() plt.legend() plt.xlabel('x (m)') plt.ylabel('y (m)') plt.axis('equal') plt.title('time window, geo data') if sys.argv[1] != 'all': plt.show() r1['geo-time'] = result_1 r10['geo-time'] = result_10 r50['geo-time'] = result_50 r100['geo-time'] = result_100 if sys.argv[1] == 'all': R = {1: r1, 10: r10, 50: r50, 100: r100} err = {1: {}, 10: {}, 50: {}, 100: {}} position_err = {1: {}, 10: {}, 50: {}, 100: {}} max_err = -numpy.inf max_position_err = -numpy.inf for key_n, r in R.items(): for key, val in r.items(): err[key_n][key] = val[:,-1] - r['sample'][:,-1] max_err = max(max_err, numpy.amax(numpy.abs(err[key_n][key]))) if val.shape[1] > 1: position_err[key_n][key] = val[:,:3] - r['nd'][:,:3] max_position_err= max( max_position_err, numpy.amax(numpy.abs(position_err[key_n][key]))) print('max_error: {}\nmax_position_err: {}'.format( max_err, max_position_err)) plt.show()
33.305699
80
0.533836
1,834
12,856
3.571429
0.061614
0.055573
0.051298
0.065954
0.88626
0.861985
0.853588
0.821374
0.801527
0.791145
0
0.087415
0.299704
12,856
385
81
33.392208
0.64012
0.019835
0
0.77116
0
0
0.061617
0.001667
0
0
0
0
0
1
0
false
0
0.018809
0
0.018809
0.003135
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
3365c61ca6440069badf9b214e5f5cfbb2fef8be
262
py
Python
test/expressions/expr9.py
Setonas/MagicSetonas
ef76da5f27a0506b194c58072b81424e3ce985d7
[ "MIT" ]
5
2017-02-22T10:17:39.000Z
2021-04-06T16:36:13.000Z
test/expressions/expr9.py
Setonas/MagicSetonas
ef76da5f27a0506b194c58072b81424e3ce985d7
[ "MIT" ]
null
null
null
test/expressions/expr9.py
Setonas/MagicSetonas
ef76da5f27a0506b194c58072b81424e3ce985d7
[ "MIT" ]
1
2020-08-29T02:30:52.000Z
2020-08-29T02:30:52.000Z
duoti nuo a duoti a duoti nuo : keyword.control.flow.python, source.python : source.python a : source.python duoti : keyword.control.flow.python, source.python : source.python a : source.python
21.833333
58
0.572519
30
262
5
0.266667
0.48
0.48
0.32
0.813333
0.813333
0.813333
0.813333
0.813333
0.813333
0
0
0.351145
262
11
59
23.818182
0.882353
0
0
0.5
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
10
6832e95fff9d126e066f4c9b5ff81b4349463862
2,126
py
Python
hackathon 4.0 Demo_2021-01-09_13-31-31.py
ClointFusion-Community/CFC-Projects
c6381738ade07e6e8979bbae37400ec2b4e626c5
[ "MIT" ]
null
null
null
hackathon 4.0 Demo_2021-01-09_13-31-31.py
ClointFusion-Community/CFC-Projects
c6381738ade07e6e8979bbae37400ec2b4e626c5
[ "MIT" ]
null
null
null
hackathon 4.0 Demo_2021-01-09_13-31-31.py
ClointFusion-Community/CFC-Projects
c6381738ade07e6e8979bbae37400ec2b4e626c5
[ "MIT" ]
null
null
null
# This code is generated automatically by ClointFusion BOT Builder Tool. import ClointFusion as cf import time cf.window_show_desktop() cf.mouse_click(int(cf.pg.size()[0]/2),int(cf.pg.size()[1]/2)) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_gu0z2qio_generator\Images\Snips\1--240_558.png',conf=0.7, wait=10),left_or_right='left', single_double_triple = 'single') except: cf.mouse_click(240,558,left_or_right='left', single_double_triple = 'single') time.sleep(0) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_gu0z2qio_generator\Images\Snips\2--240_558.png',conf=0.7, wait=13),left_or_right='left', single_double_triple = 'double') except: cf.mouse_click(240,558,left_or_right='left', single_double_triple = 'double') time.sleep(3) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_gu0z2qio_generator\Images\Snips\3-NewTabGoogleChrome-407_252.png',conf=0.7, wait=11),left_or_right='left', single_double_triple = 'double') except: cf.mouse_click(407,252,left_or_right='left', single_double_triple = 'double') time.sleep(1) cf.key_write_enter('modi',key='') time.sleep(1) cf.key_press('enter') time.sleep(4) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_gu0z2qio_generator\Images\Snips\4-modiGoogleSearchGoogleChrome-1889_244.png',conf=0.7, wait=16),left_or_right='left', single_double_triple = 'single') except: cf.mouse_click(1889,244,left_or_right='left', single_double_triple = 'single') time.sleep(6) try: cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_gu0z2qio_generator\Images\Snips\5-modiGoogleSearchGoogleChrome-1892_14.png',conf=0.7, wait=10),left_or_right='left', single_double_triple = 'single') except: cf.mouse_click(1892,14,left_or_right='left', single_double_triple = 'single') time.sleep(0) cf.window_close_windows('modi - Google Search - Google Chrome')
45.234043
257
0.784572
358
2,126
4.357542
0.231844
0.071795
0.084615
0.096154
0.769872
0.739744
0.739744
0.723718
0.723718
0.723718
0
0.05449
0.067733
2,126
47
258
45.234043
0.732593
0.032926
0
0.411765
1
0.147059
0.318735
0.248175
0
0
0
0
0
1
0
true
0
0.058824
0
0.058824
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
7
686905917088b9759f298b196de640c33a4764fd
475
py
Python
nnfs/regularizers.py
tblut/NNFS
75320c546043bc74f368a7a6edcd8bb70aa90dc4
[ "MIT" ]
null
null
null
nnfs/regularizers.py
tblut/NNFS
75320c546043bc74f368a7a6edcd8bb70aa90dc4
[ "MIT" ]
null
null
null
nnfs/regularizers.py
tblut/NNFS
75320c546043bc74f368a7a6edcd8bb70aa90dc4
[ "MIT" ]
null
null
null
import numpy as np class L1: def __init__(self, l=0.01): self.l = l def __call__(self, params): return self.l * np.sum(np.abs(params).reshape(-1)) def get_grad(self, params): return self.l * np.sign(params) class L2: def __init__(self, l=0.01): self.l = l def __call__(self, params): return self.l * np.sum(np.square(params).reshape(-1)) def get_grad(self, params): return 2.0 * self.l * params
19.791667
61
0.585263
76
475
3.421053
0.328947
0.153846
0.246154
0.230769
0.765385
0.765385
0.738462
0.738462
0.738462
0.430769
0
0.034783
0.273684
475
23
62
20.652174
0.718841
0
0
0.533333
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.066667
0.266667
0.866667
0
0
0
0
null
0
1
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
9
6884f7fd31c43780c4c275756b2de11c31f26306
16,145
py
Python
tests/utils.py
jcbagneris/fms
b4ca85b09dfcac253437317c97f8d1b09fe09f75
[ "BSD-3-Clause" ]
84
2015-01-08T08:06:12.000Z
2022-02-17T11:52:06.000Z
tests/utils.py
jcbagneris/fms
b4ca85b09dfcac253437317c97f8d1b09fe09f75
[ "BSD-3-Clause" ]
null
null
null
tests/utils.py
jcbagneris/fms
b4ca85b09dfcac253437317c97f8d1b09fe09f75
[ "BSD-3-Clause" ]
25
2015-12-10T23:04:37.000Z
2022-02-17T11:52:12.000Z
#!/usr/bin/env python # -*- coding: utf8 -*- """ Tests for utils module. """ import unittest import sys from StringIO import StringIO from fms.utils import CSVDELIMITERS from fms.utils.parsers import YamlParamsParser, XmlParamsParser from fms.utils.exceptions import MissingParameter class YamlParserTests(unittest.TestCase): """ Tests for YamlParser class """ def setUp(self): self.fixturesdir = "fixtures" def testExperimentNameDefaultValue(self): """ Experiment name is built from filename if missing """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['name'], '%s/minimalconfig.yml experiment' % self.fixturesdir) def testExperimentNameValue(self): """ Experiment name is correctly read """ ymlparamsfile = '%s/fullconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['name'], 'Test Experiment') def testUniqueByAgentDefaultValue(self): """ unique_by_agent value is True if missing """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertTrue(params['unique_by_agent']) def testCsvDelimiterDefaultValue(self): """ csvdelimiter value is ';' if missing """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['csvdelimiter'], ';') def testRandomseedDefaultValue(self): """ Randomseed should be None if missing """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['randomseed'], None) def testRandomSeedValue(self): """ Randomseed is read correctly """ ymlparamsfile = '%s/fullconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['randomseed'], 12345678) def testOutputfileDefaultValue(self): """ Outputfile should be sys.stdout if missing """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['outputfilename'], 'sys.stdout') def testOuputfileValue(self): """ Outputfile might be read from config """ ymlparamsfile = '%s/fullconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['outputfilename'], '%s/dummyoutput.csv' % self.fixturesdir) def testOrdersLogFileDefaultValue(self): """ OrdersLogFile shoud be None if missing """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['orderslogfilename'], None) def testOrderLogFileValue(self): """ OrdersLogFile might be read from config """ ymlparamsfile = '%s/fullconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['orderslogfilename'], '%s/dummyoutput.log' % self.fixturesdir) def testWorldMandatory(self): """ World param is mandatory in config file """ ymlparamsfile = '%s/missingworld.yml' % self.fixturesdir self.assertRaises(MissingParameter, YamlParamsParser, ymlparamsfile) def testWorldClassValue(self): """ World class is read correctly """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['world']['classname'], 'NullWorld') def testOneEngineMandatory(self): """ At least one engine param is mandatory in config file """ ymlparamsfile = '%s/missingengine.yml' % self.fixturesdir self.assertRaises(MissingParameter, YamlParamsParser, ymlparamsfile) def testEngineClassValue(self): """ Engine classname is read correctly """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['engines'][0]['classname'], 'AsynchronousRandWReplace') def testDaysDefaultValue(self): """ Engine's days param should be 1 if missing """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['engines'][0]['days'], 1) def testDaysValue(self): """ Engine's days param is correctly read as an int """ ymlparamsfile = '%s/fullconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['engines'][0]['days'], 2) def testClearBooksAtEODDefaultValue(self): """ Clear books at end of day if this param is missing """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertTrue(params['engines'][0]['clearbooksateod']) def testClearBooksAtEODValue(self): """ Engine's clearbooksateod param is correctly read """ ymlparamsfile = '%s/fullconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertFalse(params['engines'][0]['clearbooksateod']) def testDaylengthDefaultValue(self): """ Daylength should be 1 if missing """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['engines'][0]['daylength'], 1) def testDaylengthValue(self): """ Daylength is correctly read as an int """ ymlparamsfile = '%s/fullconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['engines'][0]['daylength'], 10) def testMarketMandatory(self): """ One market param per engine is mandatory """ ymlparamsfile = '%s/missingmarket.yml' % self.fixturesdir self.assertRaises(MissingParameter, YamlParamsParser, ymlparamsfile) def testMarketClassValue(self): """ Market param classname is read correctly """ ymlparamsfile = '%s/minimalconfig.yml' % self.fixturesdir params = YamlParamsParser(ymlparamsfile) self.assertEqual(params['engines'][0]['market']['classname'], 'ContinuousOrderDriven') def testAgentsMandatory(self): """ Agents param is mandatory in config file """ ymlparamsfile = '%s/missingagents.yml' % self.fixturesdir self.assertRaises(MissingParameter, YamlParamsParser, ymlparamsfile) def testAgentMandatory(self): """ At least one agent param is mandatory in agents """ ymlparamsfile = '%s/missingagent.yml' % self.fixturesdir self.assertRaises(MissingParameter, YamlParamsParser, ymlparamsfile) class XmlParserTests(unittest.TestCase): """ Tests for XmlParser class """ def setUp(self): self.fixturesdir = "fixtures" self.missingengine = """ <experiments> <experiment> <world> <className>NullWorld</className> </world> <market> <className>DummyMarket</className> </market> <agents> <agent> <className>StupidTrader</className> </agent> </agents> </experiment> </experiments> """ self.missingworld = """ <experiments> <experiment> <simulationEngine> <className>AsynchronousRandom</className> </simulationEngine> <market> <className>DummyMarket</className> </market> <agents> <agent> <className>StupidTrader</className> </agent> </agents> </experiment> </experiments> """ self.missingmarket = """ <experiments> <experiment> <simulationEngine> <className>AsynchronousRandom</className> </simulationEngine> <world> <className>NullWorld</className> </world> <agents> <agent> <className>StupidTrader</className> </agent> </agents> </experiment> </experiments> """ self.missingagents = """ <experiments> <experiment> <simulationEngine> <className>AsynchronousRandom</className> </simulationEngine> <world> <className>NullWorld</className> </world> <market> <className>DummyMarket</className> </market> </experiment> </experiments> """ self.missingagent = """ <experiments> <experiment> <simulationEngine> <className>AsynchronousRandom</className> </simulationEngine> <world> <className>NullWorld</className> </world> <market> <className>DummyMarket</className> </market> <agents> </agents> </experiment> </experiments> """ def testExperimentNameDefaultValue(self): """ Experiment name is built from filename if missing """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['name'], '%s/minimalconfig.xml experiment' % self.fixturesdir) def testExperimentNameValue(self): """ Experiment name is correctly read """ xmlparamsfile = '%s/fullconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['name'], 'Test Experiment') def testRandomseedDefaultValue(self): """ Randomseed should be None if missing """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['randomseed'], None) def testRandomSeedValue(self): """ Randomseed is read correctly """ xmlparamsfile = '%s/fullconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['randomseed'], '12345678') def testOutputfileDefaultValue(self): """ Outputfile should be sys.stdout if missing """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['outputfilename'], 'sys.stdout') def testOuputfileValue(self): """ Outputfile might be read from config """ xmlparamsfile = '%s/fullconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['outputfilename'], '%s/dummyoutput.csv' % self.fixturesdir) def testOrdersLogFileDefaultValue(self): """ OrdersLogFile shoud be None if missing """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['orderslogfilename'], None) def testOrderLogFileValue(self): """ OrdersLogFile might be read from config """ xmlparamsfile = '%s/fullconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['orderslogfilename'], '%s/dummyoutput.log' % self.fixturesdir) def testWorldMandatory(self): """ World param is mandatory in config file """ xmlparamsfile = StringIO(self.missingworld) self.assertRaises(MissingParameter, XmlParamsParser, xmlparamsfile) def testWorldClassValue(self): """ World class is read correctly """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['world']['classname'], 'NullWorld') def testOneEngineMandatory(self): """ At least one engine param is mandatory in config file """ xmlparamsfile = StringIO(self.missingengine) self.assertRaises(MissingParameter, XmlParamsParser, xmlparamsfile) def testEngineClassValue(self): """ Engine classname is read correctly """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['engines'][0]['classname'], 'AsynchronousRandom') def testDaysDefaultValue(self): """ Engine's days param should be 1 if missing """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['engines'][0]['days'], 1) def testDaysValue(self): """ Engine's days param is correctly read as an int """ xmlparamsfile = '%s/fullconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['engines'][0]['days'], 2) def testClearBooksAtEODDefaultValue(self): """ Engines clear books at end of day """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertTrue(params['engines'][0]['clearbooksateod']) def testDaylengthDefaultValue(self): """ Daylength should be 1 if missing """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['engines'][0]['daylength'], 1) def testDaylengthValue(self): """ Daylength is correctly read as an int """ xmlparamsfile = '%s/fullconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['engines'][0]['daylength'], 10) def testMarketMandatory(self): """ One market param per engine is mandatory """ xmlparamsfile = StringIO(self.missingmarket) self.assertRaises(MissingParameter, XmlParamsParser, xmlparamsfile) def testMarketClassValue(self): """ Market param classname is read correctly """ xmlparamsfile = '%s/minimalconfig.xml' % self.fixturesdir params = XmlParamsParser(xmlparamsfile) self.assertEqual(params['engines'][0]['market']['classname'], 'DummyMarket') def testAgentsMandatory(self): """ Agents param is mandatory in config file """ xmlparamsfile = StringIO(self.missingagents) self.assertRaises(MissingParameter, XmlParamsParser, xmlparamsfile) def testAgentMandatory(self): """ At least one agent param is mandatory in agents """ xmlparamsfile = StringIO(self.missingagent) self.assertRaises(MissingParameter, XmlParamsParser, xmlparamsfile) if __name__ == "__main__": unittest.main()
33.635417
77
0.598823
1,278
16,145
7.555556
0.113459
0.074565
0.076118
0.047225
0.896645
0.890431
0.856669
0.829122
0.80292
0.743786
0
0.00405
0.296562
16,145
479
78
33.705637
0.846174
0.119666
0
0.862676
0
0
0.287769
0.043991
0
0
0
0
0.158451
1
0.165493
false
0
0.021127
0
0.193662
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
68a0a9c975c5df90cb45245f5e08e97e6f0936f8
31,522
py
Python
sdk/python/pulumi_wavefront/dashboard.py
pulumi/pulumi-wavefront
1d199d386ee241fa2ef94553e6cae1359ec9ccf6
[ "ECL-2.0", "Apache-2.0" ]
1
2022-02-20T09:48:33.000Z
2022-02-20T09:48:33.000Z
sdk/python/pulumi_wavefront/dashboard.py
pulumi/pulumi-wavefront
1d199d386ee241fa2ef94553e6cae1359ec9ccf6
[ "ECL-2.0", "Apache-2.0" ]
40
2020-08-12T08:37:24.000Z
2022-03-31T15:51:17.000Z
sdk/python/pulumi_wavefront/dashboard.py
pulumi/pulumi-wavefront
1d199d386ee241fa2ef94553e6cae1359ec9ccf6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * __all__ = ['DashboardArgs', 'Dashboard'] @pulumi.input_type class DashboardArgs: def __init__(__self__, *, description: pulumi.Input[str], sections: pulumi.Input[Sequence[pulumi.Input['DashboardSectionArgs']]], tags: pulumi.Input[Sequence[pulumi.Input[str]]], url: pulumi.Input[str], can_modifies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, can_views: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, display_query_parameters: Optional[pulumi.Input[bool]] = None, display_section_table_of_contents: Optional[pulumi.Input[bool]] = None, event_filter_type: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, parameter_details: Optional[pulumi.Input[Sequence[pulumi.Input['DashboardParameterDetailArgs']]]] = None): """ The set of arguments for constructing a Dashboard resource. :param pulumi.Input[str] description: Human-readable description of the dashboard :param pulumi.Input[Sequence[pulumi.Input['DashboardSectionArgs']]] sections: Dashboard chart sections. See dashboard sections :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A set of tags to assign to this resource. :param pulumi.Input[str] url: Unique identifier, also URL slug, of the dashboard :param pulumi.Input[Sequence[pulumi.Input[str]]] can_modifies: A list of users that have modify ACL access to the dashboard :param pulumi.Input[Sequence[pulumi.Input[str]]] can_views: A list of users that have view ACL access to the dashboard :param pulumi.Input[bool] display_query_parameters: Whether the dashboard parameters section is opened by default when the dashboard is shown :param pulumi.Input[bool] display_section_table_of_contents: Whether the "pills" quick-linked the sections of the dashboard are displayed by default when the dashboard is shown :param pulumi.Input[str] event_filter_type: How charts belonging to this dashboard should display events. BYCHART is default if unspecified; Valid options are: `BYCHART`, `AUTOMATIC`, `ALL`, `NONE`, `BYDASHBOARD`, and `BYCHARTANDDASHBOARD` :param pulumi.Input[str] name: Name of the dashboard :param pulumi.Input[Sequence[pulumi.Input['DashboardParameterDetailArgs']]] parameter_details: The current JSON representation of dashboard parameters. See parameter details """ pulumi.set(__self__, "description", description) pulumi.set(__self__, "sections", sections) pulumi.set(__self__, "tags", tags) pulumi.set(__self__, "url", url) if can_modifies is not None: pulumi.set(__self__, "can_modifies", can_modifies) if can_views is not None: pulumi.set(__self__, "can_views", can_views) if display_query_parameters is not None: pulumi.set(__self__, "display_query_parameters", display_query_parameters) if display_section_table_of_contents is not None: pulumi.set(__self__, "display_section_table_of_contents", display_section_table_of_contents) if event_filter_type is not None: pulumi.set(__self__, "event_filter_type", event_filter_type) if name is not None: pulumi.set(__self__, "name", name) if parameter_details is not None: pulumi.set(__self__, "parameter_details", parameter_details) @property @pulumi.getter def description(self) -> pulumi.Input[str]: """ Human-readable description of the dashboard """ return pulumi.get(self, "description") @description.setter def description(self, value: pulumi.Input[str]): pulumi.set(self, "description", value) @property @pulumi.getter def sections(self) -> pulumi.Input[Sequence[pulumi.Input['DashboardSectionArgs']]]: """ Dashboard chart sections. See dashboard sections """ return pulumi.get(self, "sections") @sections.setter def sections(self, value: pulumi.Input[Sequence[pulumi.Input['DashboardSectionArgs']]]): pulumi.set(self, "sections", value) @property @pulumi.getter def tags(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: """ A set of tags to assign to this resource. """ return pulumi.get(self, "tags") @tags.setter def tags(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): pulumi.set(self, "tags", value) @property @pulumi.getter def url(self) -> pulumi.Input[str]: """ Unique identifier, also URL slug, of the dashboard """ return pulumi.get(self, "url") @url.setter def url(self, value: pulumi.Input[str]): pulumi.set(self, "url", value) @property @pulumi.getter(name="canModifies") def can_modifies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ A list of users that have modify ACL access to the dashboard """ return pulumi.get(self, "can_modifies") @can_modifies.setter def can_modifies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "can_modifies", value) @property @pulumi.getter(name="canViews") def can_views(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ A list of users that have view ACL access to the dashboard """ return pulumi.get(self, "can_views") @can_views.setter def can_views(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "can_views", value) @property @pulumi.getter(name="displayQueryParameters") def display_query_parameters(self) -> Optional[pulumi.Input[bool]]: """ Whether the dashboard parameters section is opened by default when the dashboard is shown """ return pulumi.get(self, "display_query_parameters") @display_query_parameters.setter def display_query_parameters(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "display_query_parameters", value) @property @pulumi.getter(name="displaySectionTableOfContents") def display_section_table_of_contents(self) -> Optional[pulumi.Input[bool]]: """ Whether the "pills" quick-linked the sections of the dashboard are displayed by default when the dashboard is shown """ return pulumi.get(self, "display_section_table_of_contents") @display_section_table_of_contents.setter def display_section_table_of_contents(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "display_section_table_of_contents", value) @property @pulumi.getter(name="eventFilterType") def event_filter_type(self) -> Optional[pulumi.Input[str]]: """ How charts belonging to this dashboard should display events. BYCHART is default if unspecified; Valid options are: `BYCHART`, `AUTOMATIC`, `ALL`, `NONE`, `BYDASHBOARD`, and `BYCHARTANDDASHBOARD` """ return pulumi.get(self, "event_filter_type") @event_filter_type.setter def event_filter_type(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "event_filter_type", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ Name of the dashboard """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter(name="parameterDetails") def parameter_details(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DashboardParameterDetailArgs']]]]: """ The current JSON representation of dashboard parameters. See parameter details """ return pulumi.get(self, "parameter_details") @parameter_details.setter def parameter_details(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DashboardParameterDetailArgs']]]]): pulumi.set(self, "parameter_details", value) @pulumi.input_type class _DashboardState: def __init__(__self__, *, can_modifies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, can_views: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, description: Optional[pulumi.Input[str]] = None, display_query_parameters: Optional[pulumi.Input[bool]] = None, display_section_table_of_contents: Optional[pulumi.Input[bool]] = None, event_filter_type: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, parameter_details: Optional[pulumi.Input[Sequence[pulumi.Input['DashboardParameterDetailArgs']]]] = None, sections: Optional[pulumi.Input[Sequence[pulumi.Input['DashboardSectionArgs']]]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, url: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering Dashboard resources. :param pulumi.Input[Sequence[pulumi.Input[str]]] can_modifies: A list of users that have modify ACL access to the dashboard :param pulumi.Input[Sequence[pulumi.Input[str]]] can_views: A list of users that have view ACL access to the dashboard :param pulumi.Input[str] description: Human-readable description of the dashboard :param pulumi.Input[bool] display_query_parameters: Whether the dashboard parameters section is opened by default when the dashboard is shown :param pulumi.Input[bool] display_section_table_of_contents: Whether the "pills" quick-linked the sections of the dashboard are displayed by default when the dashboard is shown :param pulumi.Input[str] event_filter_type: How charts belonging to this dashboard should display events. BYCHART is default if unspecified; Valid options are: `BYCHART`, `AUTOMATIC`, `ALL`, `NONE`, `BYDASHBOARD`, and `BYCHARTANDDASHBOARD` :param pulumi.Input[str] name: Name of the dashboard :param pulumi.Input[Sequence[pulumi.Input['DashboardParameterDetailArgs']]] parameter_details: The current JSON representation of dashboard parameters. See parameter details :param pulumi.Input[Sequence[pulumi.Input['DashboardSectionArgs']]] sections: Dashboard chart sections. See dashboard sections :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A set of tags to assign to this resource. :param pulumi.Input[str] url: Unique identifier, also URL slug, of the dashboard """ if can_modifies is not None: pulumi.set(__self__, "can_modifies", can_modifies) if can_views is not None: pulumi.set(__self__, "can_views", can_views) if description is not None: pulumi.set(__self__, "description", description) if display_query_parameters is not None: pulumi.set(__self__, "display_query_parameters", display_query_parameters) if display_section_table_of_contents is not None: pulumi.set(__self__, "display_section_table_of_contents", display_section_table_of_contents) if event_filter_type is not None: pulumi.set(__self__, "event_filter_type", event_filter_type) if name is not None: pulumi.set(__self__, "name", name) if parameter_details is not None: pulumi.set(__self__, "parameter_details", parameter_details) if sections is not None: pulumi.set(__self__, "sections", sections) if tags is not None: pulumi.set(__self__, "tags", tags) if url is not None: pulumi.set(__self__, "url", url) @property @pulumi.getter(name="canModifies") def can_modifies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ A list of users that have modify ACL access to the dashboard """ return pulumi.get(self, "can_modifies") @can_modifies.setter def can_modifies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "can_modifies", value) @property @pulumi.getter(name="canViews") def can_views(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ A list of users that have view ACL access to the dashboard """ return pulumi.get(self, "can_views") @can_views.setter def can_views(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "can_views", value) @property @pulumi.getter def description(self) -> Optional[pulumi.Input[str]]: """ Human-readable description of the dashboard """ return pulumi.get(self, "description") @description.setter def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) @property @pulumi.getter(name="displayQueryParameters") def display_query_parameters(self) -> Optional[pulumi.Input[bool]]: """ Whether the dashboard parameters section is opened by default when the dashboard is shown """ return pulumi.get(self, "display_query_parameters") @display_query_parameters.setter def display_query_parameters(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "display_query_parameters", value) @property @pulumi.getter(name="displaySectionTableOfContents") def display_section_table_of_contents(self) -> Optional[pulumi.Input[bool]]: """ Whether the "pills" quick-linked the sections of the dashboard are displayed by default when the dashboard is shown """ return pulumi.get(self, "display_section_table_of_contents") @display_section_table_of_contents.setter def display_section_table_of_contents(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "display_section_table_of_contents", value) @property @pulumi.getter(name="eventFilterType") def event_filter_type(self) -> Optional[pulumi.Input[str]]: """ How charts belonging to this dashboard should display events. BYCHART is default if unspecified; Valid options are: `BYCHART`, `AUTOMATIC`, `ALL`, `NONE`, `BYDASHBOARD`, and `BYCHARTANDDASHBOARD` """ return pulumi.get(self, "event_filter_type") @event_filter_type.setter def event_filter_type(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "event_filter_type", value) @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: """ Name of the dashboard """ return pulumi.get(self, "name") @name.setter def name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "name", value) @property @pulumi.getter(name="parameterDetails") def parameter_details(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DashboardParameterDetailArgs']]]]: """ The current JSON representation of dashboard parameters. See parameter details """ return pulumi.get(self, "parameter_details") @parameter_details.setter def parameter_details(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DashboardParameterDetailArgs']]]]): pulumi.set(self, "parameter_details", value) @property @pulumi.getter def sections(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DashboardSectionArgs']]]]: """ Dashboard chart sections. See dashboard sections """ return pulumi.get(self, "sections") @sections.setter def sections(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DashboardSectionArgs']]]]): pulumi.set(self, "sections", value) @property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ A set of tags to assign to this resource. """ return pulumi.get(self, "tags") @tags.setter def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "tags", value) @property @pulumi.getter def url(self) -> Optional[pulumi.Input[str]]: """ Unique identifier, also URL slug, of the dashboard """ return pulumi.get(self, "url") @url.setter def url(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "url", value) class Dashboard(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, can_modifies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, can_views: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, description: Optional[pulumi.Input[str]] = None, display_query_parameters: Optional[pulumi.Input[bool]] = None, display_section_table_of_contents: Optional[pulumi.Input[bool]] = None, event_filter_type: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, parameter_details: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardParameterDetailArgs']]]]] = None, sections: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardSectionArgs']]]]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, url: Optional[pulumi.Input[str]] = None, __props__=None): """ Provides a Wavefront Dashboard resource. This allows dashboards to be created, updated, and deleted. ## Import Dashboards can be imported using the `id`, e.g. ```sh $ pulumi import wavefront:index/dashboard:Dashboard dashboard tftestimport ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] can_modifies: A list of users that have modify ACL access to the dashboard :param pulumi.Input[Sequence[pulumi.Input[str]]] can_views: A list of users that have view ACL access to the dashboard :param pulumi.Input[str] description: Human-readable description of the dashboard :param pulumi.Input[bool] display_query_parameters: Whether the dashboard parameters section is opened by default when the dashboard is shown :param pulumi.Input[bool] display_section_table_of_contents: Whether the "pills" quick-linked the sections of the dashboard are displayed by default when the dashboard is shown :param pulumi.Input[str] event_filter_type: How charts belonging to this dashboard should display events. BYCHART is default if unspecified; Valid options are: `BYCHART`, `AUTOMATIC`, `ALL`, `NONE`, `BYDASHBOARD`, and `BYCHARTANDDASHBOARD` :param pulumi.Input[str] name: Name of the dashboard :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardParameterDetailArgs']]]] parameter_details: The current JSON representation of dashboard parameters. See parameter details :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardSectionArgs']]]] sections: Dashboard chart sections. See dashboard sections :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A set of tags to assign to this resource. :param pulumi.Input[str] url: Unique identifier, also URL slug, of the dashboard """ ... @overload def __init__(__self__, resource_name: str, args: DashboardArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Provides a Wavefront Dashboard resource. This allows dashboards to be created, updated, and deleted. ## Import Dashboards can be imported using the `id`, e.g. ```sh $ pulumi import wavefront:index/dashboard:Dashboard dashboard tftestimport ``` :param str resource_name: The name of the resource. :param DashboardArgs 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(DashboardArgs, 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, can_modifies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, can_views: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, description: Optional[pulumi.Input[str]] = None, display_query_parameters: Optional[pulumi.Input[bool]] = None, display_section_table_of_contents: Optional[pulumi.Input[bool]] = None, event_filter_type: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, parameter_details: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardParameterDetailArgs']]]]] = None, sections: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardSectionArgs']]]]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, url: 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__ = DashboardArgs.__new__(DashboardArgs) __props__.__dict__["can_modifies"] = can_modifies __props__.__dict__["can_views"] = can_views if description is None and not opts.urn: raise TypeError("Missing required property 'description'") __props__.__dict__["description"] = description __props__.__dict__["display_query_parameters"] = display_query_parameters __props__.__dict__["display_section_table_of_contents"] = display_section_table_of_contents __props__.__dict__["event_filter_type"] = event_filter_type __props__.__dict__["name"] = name __props__.__dict__["parameter_details"] = parameter_details if sections is None and not opts.urn: raise TypeError("Missing required property 'sections'") __props__.__dict__["sections"] = sections if tags is None and not opts.urn: raise TypeError("Missing required property 'tags'") __props__.__dict__["tags"] = tags if url is None and not opts.urn: raise TypeError("Missing required property 'url'") __props__.__dict__["url"] = url super(Dashboard, __self__).__init__( 'wavefront:index/dashboard:Dashboard', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, can_modifies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, can_views: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, description: Optional[pulumi.Input[str]] = None, display_query_parameters: Optional[pulumi.Input[bool]] = None, display_section_table_of_contents: Optional[pulumi.Input[bool]] = None, event_filter_type: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, parameter_details: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardParameterDetailArgs']]]]] = None, sections: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardSectionArgs']]]]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, url: Optional[pulumi.Input[str]] = None) -> 'Dashboard': """ Get an existing Dashboard resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] can_modifies: A list of users that have modify ACL access to the dashboard :param pulumi.Input[Sequence[pulumi.Input[str]]] can_views: A list of users that have view ACL access to the dashboard :param pulumi.Input[str] description: Human-readable description of the dashboard :param pulumi.Input[bool] display_query_parameters: Whether the dashboard parameters section is opened by default when the dashboard is shown :param pulumi.Input[bool] display_section_table_of_contents: Whether the "pills" quick-linked the sections of the dashboard are displayed by default when the dashboard is shown :param pulumi.Input[str] event_filter_type: How charts belonging to this dashboard should display events. BYCHART is default if unspecified; Valid options are: `BYCHART`, `AUTOMATIC`, `ALL`, `NONE`, `BYDASHBOARD`, and `BYCHARTANDDASHBOARD` :param pulumi.Input[str] name: Name of the dashboard :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardParameterDetailArgs']]]] parameter_details: The current JSON representation of dashboard parameters. See parameter details :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['DashboardSectionArgs']]]] sections: Dashboard chart sections. See dashboard sections :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A set of tags to assign to this resource. :param pulumi.Input[str] url: Unique identifier, also URL slug, of the dashboard """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _DashboardState.__new__(_DashboardState) __props__.__dict__["can_modifies"] = can_modifies __props__.__dict__["can_views"] = can_views __props__.__dict__["description"] = description __props__.__dict__["display_query_parameters"] = display_query_parameters __props__.__dict__["display_section_table_of_contents"] = display_section_table_of_contents __props__.__dict__["event_filter_type"] = event_filter_type __props__.__dict__["name"] = name __props__.__dict__["parameter_details"] = parameter_details __props__.__dict__["sections"] = sections __props__.__dict__["tags"] = tags __props__.__dict__["url"] = url return Dashboard(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter(name="canModifies") def can_modifies(self) -> pulumi.Output[Sequence[str]]: """ A list of users that have modify ACL access to the dashboard """ return pulumi.get(self, "can_modifies") @property @pulumi.getter(name="canViews") def can_views(self) -> pulumi.Output[Optional[Sequence[str]]]: """ A list of users that have view ACL access to the dashboard """ return pulumi.get(self, "can_views") @property @pulumi.getter def description(self) -> pulumi.Output[str]: """ Human-readable description of the dashboard """ return pulumi.get(self, "description") @property @pulumi.getter(name="displayQueryParameters") def display_query_parameters(self) -> pulumi.Output[Optional[bool]]: """ Whether the dashboard parameters section is opened by default when the dashboard is shown """ return pulumi.get(self, "display_query_parameters") @property @pulumi.getter(name="displaySectionTableOfContents") def display_section_table_of_contents(self) -> pulumi.Output[Optional[bool]]: """ Whether the "pills" quick-linked the sections of the dashboard are displayed by default when the dashboard is shown """ return pulumi.get(self, "display_section_table_of_contents") @property @pulumi.getter(name="eventFilterType") def event_filter_type(self) -> pulumi.Output[Optional[str]]: """ How charts belonging to this dashboard should display events. BYCHART is default if unspecified; Valid options are: `BYCHART`, `AUTOMATIC`, `ALL`, `NONE`, `BYDASHBOARD`, and `BYCHARTANDDASHBOARD` """ return pulumi.get(self, "event_filter_type") @property @pulumi.getter def name(self) -> pulumi.Output[str]: """ Name of the dashboard """ return pulumi.get(self, "name") @property @pulumi.getter(name="parameterDetails") def parameter_details(self) -> pulumi.Output[Optional[Sequence['outputs.DashboardParameterDetail']]]: """ The current JSON representation of dashboard parameters. See parameter details """ return pulumi.get(self, "parameter_details") @property @pulumi.getter def sections(self) -> pulumi.Output[Sequence['outputs.DashboardSection']]: """ Dashboard chart sections. See dashboard sections """ return pulumi.get(self, "sections") @property @pulumi.getter def tags(self) -> pulumi.Output[Sequence[str]]: """ A set of tags to assign to this resource. """ return pulumi.get(self, "tags") @property @pulumi.getter def url(self) -> pulumi.Output[str]: """ Unique identifier, also URL slug, of the dashboard """ return pulumi.get(self, "url")
47.688351
199
0.666265
3,630
31,522
5.578788
0.056198
0.115155
0.064293
0.080243
0.909881
0.888796
0.876846
0.856056
0.85023
0.837391
0
0.000041
0.230347
31,522
660
200
47.760606
0.834673
0.308483
0
0.767016
1
0
0.120012
0.049832
0
0
0
0
0
1
0.162304
false
0.002618
0.018325
0
0.277487
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
d79c452262dd49f7881ae3e89e74d97124b75bb5
10,568
py
Python
CxSM_FeynmanGauge_UFO/decays.py
YangPhy/CxSM_FR
10ad2ebe0ffa91e6f9e6d4fcdc59faa00860576a
[ "MIT" ]
null
null
null
CxSM_FeynmanGauge_UFO/decays.py
YangPhy/CxSM_FR
10ad2ebe0ffa91e6f9e6d4fcdc59faa00860576a
[ "MIT" ]
null
null
null
CxSM_FeynmanGauge_UFO/decays.py
YangPhy/CxSM_FR
10ad2ebe0ffa91e6f9e6d4fcdc59faa00860576a
[ "MIT" ]
null
null
null
# This file was automatically created by FeynRules 2.3.36 # Mathematica version: 11.3.0 for Linux x86 (64-bit) (March 7, 2018) # Date: Tue 15 Feb 2022 16:39:52 from object_library import all_decays, Decay import particles as P Decay_b = Decay(name = 'Decay_b', particle = P.b, partial_widths = {(P.W__minus__,P.t):'(((3*ee**2*MB**2)/(2.*sw**2) + (3*ee**2*MT**2)/(2.*sw**2) + (3*ee**2*MB**4)/(2.*MW**2*sw**2) - (3*ee**2*MB**2*MT**2)/(MW**2*sw**2) + (3*ee**2*MT**4)/(2.*MW**2*sw**2) - (3*ee**2*MW**2)/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MT**2 + MT**4 - 2*MB**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MB)**3)'}) Decay_h1 = Decay(name = 'Decay_h1', particle = P.h1, partial_widths = {(P.b,P.b__tilde__):'((-12*ca**2*MB**2*yb**2 + 3*ca**2*Mh1**2*yb**2)*cmath.sqrt(-4*MB**2*Mh1**2 + Mh1**4))/(16.*cmath.pi*abs(Mh1)**3)', (P.h2,P.h2):'(((ca**6*delta2**2*vev**2)/4. - ca**4*delta2**2*sa**2*vev**2 + (3*ca**4*delta2*lamd*sa**2*vev**2)/2. + ca**2*delta2**2*sa**4*vev**2 - 3*ca**2*delta2*lamd*sa**4*vev**2 + (9*ca**2*lamd**2*sa**4*vev**2)/4. + (3*ca**5*d2*delta2*sa*vev*vs)/2. - ca**5*delta2**2*sa*vev*vs - 3*ca**3*d2*delta2*sa**3*vev*vs + (5*ca**3*delta2**2*sa**3*vev*vs)/2. + (9*ca**3*d2*lamd*sa**3*vev*vs)/2. - 3*ca**3*delta2*lamd*sa**3*vev*vs - ca*delta2**2*sa**5*vev*vs + (3*ca*delta2*lamd*sa**5*vev*vs)/2. + (9*ca**4*d2**2*sa**2*vs**2)/4. - 3*ca**4*d2*delta2*sa**2*vs**2 + ca**4*delta2**2*sa**2*vs**2 + (3*ca**2*d2*delta2*sa**4*vs**2)/2. - ca**2*delta2**2*sa**4*vs**2 + (delta2**2*sa**6*vs**2)/4.)*cmath.sqrt(Mh1**4 - 4*Mh1**2*Mh2**2))/(32.*cmath.pi*abs(Mh1)**3)', (P.HA,P.HA):'(((ca**2*delta2**2*vev**2)/4. + (ca*d2*delta2*sa*vev*vs)/2. + (d2**2*sa**2*vs**2)/4.)*cmath.sqrt(Mh1**4 - 4*Mh1**2*MHA**2))/(32.*cmath.pi*abs(Mh1)**3)', (P.ta__minus__,P.ta__plus__):'((ca**2*Mh1**2*ytau**2 - 4*ca**2*MTA**2*ytau**2)*cmath.sqrt(Mh1**4 - 4*Mh1**2*MTA**2))/(16.*cmath.pi*abs(Mh1)**3)', (P.t,P.t__tilde__):'((3*ca**2*Mh1**2*yt**2 - 12*ca**2*MT**2*yt**2)*cmath.sqrt(Mh1**4 - 4*Mh1**2*MT**2))/(16.*cmath.pi*abs(Mh1)**3)', (P.W__minus__,P.W__plus__):'(((3*ca**2*ee**4*vev**2)/(4.*sw**4) + (ca**2*ee**4*Mh1**4*vev**2)/(16.*MW**4*sw**4) - (ca**2*ee**4*Mh1**2*vev**2)/(4.*MW**2*sw**4))*cmath.sqrt(Mh1**4 - 4*Mh1**2*MW**2))/(16.*cmath.pi*abs(Mh1)**3)', (P.Z,P.Z):'(((9*ca**2*ee**4*vev**2)/2. + (3*ca**2*ee**4*Mh1**4*vev**2)/(8.*MZ**4) - (3*ca**2*ee**4*Mh1**2*vev**2)/(2.*MZ**2) + (3*ca**2*cw**4*ee**4*vev**2)/(4.*sw**4) + (ca**2*cw**4*ee**4*Mh1**4*vev**2)/(16.*MZ**4*sw**4) - (ca**2*cw**4*ee**4*Mh1**2*vev**2)/(4.*MZ**2*sw**4) + (3*ca**2*cw**2*ee**4*vev**2)/sw**2 + (ca**2*cw**2*ee**4*Mh1**4*vev**2)/(4.*MZ**4*sw**2) - (ca**2*cw**2*ee**4*Mh1**2*vev**2)/(MZ**2*sw**2) + (3*ca**2*ee**4*sw**2*vev**2)/cw**2 + (ca**2*ee**4*Mh1**4*sw**2*vev**2)/(4.*cw**2*MZ**4) - (ca**2*ee**4*Mh1**2*sw**2*vev**2)/(cw**2*MZ**2) + (3*ca**2*ee**4*sw**4*vev**2)/(4.*cw**4) + (ca**2*ee**4*Mh1**4*sw**4*vev**2)/(16.*cw**4*MZ**4) - (ca**2*ee**4*Mh1**2*sw**4*vev**2)/(4.*cw**4*MZ**2))*cmath.sqrt(Mh1**4 - 4*Mh1**2*MZ**2))/(32.*cmath.pi*abs(Mh1)**3)'}) Decay_h2 = Decay(name = 'Decay_h2', particle = P.h2, partial_widths = {(P.b,P.b__tilde__):'((-12*MB**2*sa**2*yb**2 + 3*Mh2**2*sa**2*yb**2)*cmath.sqrt(-4*MB**2*Mh2**2 + Mh2**4))/(16.*cmath.pi*abs(Mh2)**3)', (P.h1,P.h1):'((ca**4*delta2**2*sa**2*vev**2 - 3*ca**4*delta2*lamd*sa**2*vev**2 + (9*ca**4*lamd**2*sa**2*vev**2)/4. - ca**2*delta2**2*sa**4*vev**2 + (3*ca**2*delta2*lamd*sa**4*vev**2)/2. + (delta2**2*sa**6*vev**2)/4. + ca**5*delta2**2*sa*vev*vs - (3*ca**5*delta2*lamd*sa*vev*vs)/2. + 3*ca**3*d2*delta2*sa**3*vev*vs - (5*ca**3*delta2**2*sa**3*vev*vs)/2. - (9*ca**3*d2*lamd*sa**3*vev*vs)/2. + 3*ca**3*delta2*lamd*sa**3*vev*vs - (3*ca*d2*delta2*sa**5*vev*vs)/2. + ca*delta2**2*sa**5*vev*vs + (ca**6*delta2**2*vs**2)/4. + (3*ca**4*d2*delta2*sa**2*vs**2)/2. - ca**4*delta2**2*sa**2*vs**2 + (9*ca**2*d2**2*sa**4*vs**2)/4. - 3*ca**2*d2*delta2*sa**4*vs**2 + ca**2*delta2**2*sa**4*vs**2)*cmath.sqrt(-4*Mh1**2*Mh2**2 + Mh2**4))/(32.*cmath.pi*abs(Mh2)**3)', (P.HA,P.HA):'(((delta2**2*sa**2*vev**2)/4. - (ca*d2*delta2*sa*vev*vs)/2. + (ca**2*d2**2*vs**2)/4.)*cmath.sqrt(Mh2**4 - 4*Mh2**2*MHA**2))/(32.*cmath.pi*abs(Mh2)**3)', (P.ta__minus__,P.ta__plus__):'((Mh2**2*sa**2*ytau**2 - 4*MTA**2*sa**2*ytau**2)*cmath.sqrt(Mh2**4 - 4*Mh2**2*MTA**2))/(16.*cmath.pi*abs(Mh2)**3)', (P.t,P.t__tilde__):'((3*Mh2**2*sa**2*yt**2 - 12*MT**2*sa**2*yt**2)*cmath.sqrt(Mh2**4 - 4*Mh2**2*MT**2))/(16.*cmath.pi*abs(Mh2)**3)', (P.W__minus__,P.W__plus__):'(((3*ee**4*sa**2*vev**2)/(4.*sw**4) + (ee**4*Mh2**4*sa**2*vev**2)/(16.*MW**4*sw**4) - (ee**4*Mh2**2*sa**2*vev**2)/(4.*MW**2*sw**4))*cmath.sqrt(Mh2**4 - 4*Mh2**2*MW**2))/(16.*cmath.pi*abs(Mh2)**3)', (P.Z,P.Z):'(((9*ee**4*sa**2*vev**2)/2. + (3*ee**4*Mh2**4*sa**2*vev**2)/(8.*MZ**4) - (3*ee**4*Mh2**2*sa**2*vev**2)/(2.*MZ**2) + (3*cw**4*ee**4*sa**2*vev**2)/(4.*sw**4) + (cw**4*ee**4*Mh2**4*sa**2*vev**2)/(16.*MZ**4*sw**4) - (cw**4*ee**4*Mh2**2*sa**2*vev**2)/(4.*MZ**2*sw**4) + (3*cw**2*ee**4*sa**2*vev**2)/sw**2 + (cw**2*ee**4*Mh2**4*sa**2*vev**2)/(4.*MZ**4*sw**2) - (cw**2*ee**4*Mh2**2*sa**2*vev**2)/(MZ**2*sw**2) + (3*ee**4*sa**2*sw**2*vev**2)/cw**2 + (ee**4*Mh2**4*sa**2*sw**2*vev**2)/(4.*cw**2*MZ**4) - (ee**4*Mh2**2*sa**2*sw**2*vev**2)/(cw**2*MZ**2) + (3*ee**4*sa**2*sw**4*vev**2)/(4.*cw**4) + (ee**4*Mh2**4*sa**2*sw**4*vev**2)/(16.*cw**4*MZ**4) - (ee**4*Mh2**2*sa**2*sw**4*vev**2)/(4.*cw**4*MZ**2))*cmath.sqrt(Mh2**4 - 4*Mh2**2*MZ**2))/(32.*cmath.pi*abs(Mh2)**3)'}) Decay_t = Decay(name = 'Decay_t', particle = P.t, partial_widths = {(P.W__plus__,P.b):'(((3*ee**2*MB**2)/(2.*sw**2) + (3*ee**2*MT**2)/(2.*sw**2) + (3*ee**2*MB**4)/(2.*MW**2*sw**2) - (3*ee**2*MB**2*MT**2)/(MW**2*sw**2) + (3*ee**2*MT**4)/(2.*MW**2*sw**2) - (3*ee**2*MW**2)/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MT**2 + MT**4 - 2*MB**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(96.*cmath.pi*abs(MT)**3)'}) Decay_ta__minus__ = Decay(name = 'Decay_ta__minus__', particle = P.ta__minus__, partial_widths = {(P.W__minus__,P.vt):'((MTA**2 - MW**2)*((ee**2*MTA**2)/(2.*sw**2) + (ee**2*MTA**4)/(2.*MW**2*sw**2) - (ee**2*MW**2)/sw**2))/(32.*cmath.pi*abs(MTA)**3)'}) Decay_W__plus__ = Decay(name = 'Decay_W__plus__', particle = P.W__plus__, partial_widths = {(P.c,P.s__tilde__):'(ee**2*MW**4)/(16.*cmath.pi*sw**2*abs(MW)**3)', (P.t,P.b__tilde__):'(((-3*ee**2*MB**2)/(2.*sw**2) - (3*ee**2*MT**2)/(2.*sw**2) - (3*ee**2*MB**4)/(2.*MW**2*sw**2) + (3*ee**2*MB**2*MT**2)/(MW**2*sw**2) - (3*ee**2*MT**4)/(2.*MW**2*sw**2) + (3*ee**2*MW**2)/sw**2)*cmath.sqrt(MB**4 - 2*MB**2*MT**2 + MT**4 - 2*MB**2*MW**2 - 2*MT**2*MW**2 + MW**4))/(48.*cmath.pi*abs(MW)**3)', (P.u,P.d__tilde__):'(ee**2*MW**4)/(16.*cmath.pi*sw**2*abs(MW)**3)', (P.ve,P.e__plus__):'(ee**2*MW**4)/(48.*cmath.pi*sw**2*abs(MW)**3)', (P.vm,P.mu__plus__):'(ee**2*MW**4)/(48.*cmath.pi*sw**2*abs(MW)**3)', (P.vt,P.ta__plus__):'((-MTA**2 + MW**2)*(-(ee**2*MTA**2)/(2.*sw**2) - (ee**2*MTA**4)/(2.*MW**2*sw**2) + (ee**2*MW**2)/sw**2))/(48.*cmath.pi*abs(MW)**3)'}) Decay_Z = Decay(name = 'Decay_Z', particle = P.Z, partial_widths = {(P.b,P.b__tilde__):'((-7*ee**2*MB**2 + ee**2*MZ**2 - (3*cw**2*ee**2*MB**2)/(2.*sw**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) - (17*ee**2*MB**2*sw**2)/(6.*cw**2) + (5*ee**2*MZ**2*sw**2)/(6.*cw**2))*cmath.sqrt(-4*MB**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', (P.c,P.c__tilde__):'(MZ**2*(-(ee**2*MZ**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) + (17*ee**2*MZ**2*sw**2)/(6.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', (P.d,P.d__tilde__):'(MZ**2*(ee**2*MZ**2 + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) + (5*ee**2*MZ**2*sw**2)/(6.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', (P.e__minus__,P.e__plus__):'(MZ**2*(-(ee**2*MZ**2) + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (5*ee**2*MZ**2*sw**2)/(2.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', (P.mu__minus__,P.mu__plus__):'(MZ**2*(-(ee**2*MZ**2) + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (5*ee**2*MZ**2*sw**2)/(2.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', (P.s,P.s__tilde__):'(MZ**2*(ee**2*MZ**2 + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) + (5*ee**2*MZ**2*sw**2)/(6.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', (P.ta__minus__,P.ta__plus__):'((-5*ee**2*MTA**2 - ee**2*MZ**2 - (cw**2*ee**2*MTA**2)/(2.*sw**2) + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (7*ee**2*MTA**2*sw**2)/(2.*cw**2) + (5*ee**2*MZ**2*sw**2)/(2.*cw**2))*cmath.sqrt(-4*MTA**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', (P.t,P.t__tilde__):'((-11*ee**2*MT**2 - ee**2*MZ**2 - (3*cw**2*ee**2*MT**2)/(2.*sw**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) + (7*ee**2*MT**2*sw**2)/(6.*cw**2) + (17*ee**2*MZ**2*sw**2)/(6.*cw**2))*cmath.sqrt(-4*MT**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)', (P.u,P.u__tilde__):'(MZ**2*(-(ee**2*MZ**2) + (3*cw**2*ee**2*MZ**2)/(2.*sw**2) + (17*ee**2*MZ**2*sw**2)/(6.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', (P.ve,P.ve__tilde__):'(MZ**2*(ee**2*MZ**2 + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (ee**2*MZ**2*sw**2)/(2.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', (P.vm,P.vm__tilde__):'(MZ**2*(ee**2*MZ**2 + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (ee**2*MZ**2*sw**2)/(2.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', (P.vt,P.vt__tilde__):'(MZ**2*(ee**2*MZ**2 + (cw**2*ee**2*MZ**2)/(2.*sw**2) + (ee**2*MZ**2*sw**2)/(2.*cw**2)))/(48.*cmath.pi*abs(MZ)**3)', (P.W__minus__,P.W__plus__):'(((-12*cw**2*ee**2*MW**2)/sw**2 - (17*cw**2*ee**2*MZ**2)/sw**2 + (4*cw**2*ee**2*MZ**4)/(MW**2*sw**2) + (cw**2*ee**2*MZ**6)/(4.*MW**4*sw**2))*cmath.sqrt(-4*MW**2*MZ**2 + MZ**4))/(48.*cmath.pi*abs(MZ)**3)'})
157.731343
805
0.449186
2,339
10,568
1.944421
0.042326
0.050792
0.057168
0.048813
0.828056
0.784301
0.737907
0.645998
0.527485
0.439094
0
0.142027
0.169852
10,568
66
806
160.121212
0.376382
0.014478
0
0
0
0.692308
0.738905
0.651873
0
0
0
0
0
1
0
false
0
0.038462
0
0.038462
0
0
0
1
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
d7ec7674c836c5ea87171ba718df8c474cb9d60c
111
py
Python
qaml/exceptions.py
tchlux/qaml
97501635fb8aadeb5f48b1b7fda10489c349147c
[ "MIT" ]
2
2019-11-05T20:39:12.000Z
2020-03-14T21:31:00.000Z
qaml/exceptions.py
tchlux/qaml
97501635fb8aadeb5f48b1b7fda10489c349147c
[ "MIT" ]
null
null
null
qaml/exceptions.py
tchlux/qaml
97501635fb8aadeb5f48b1b7fda10489c349147c
[ "MIT" ]
1
2021-02-21T14:53:31.000Z
2021-02-21T14:53:31.000Z
class AmbiguousTerm(Exception): pass class UsageError(Exception): pass class UnsolvableSystem(Exception): pass
27.75
39
0.837838
12
111
7.75
0.5
0.419355
0.387097
0
0
0
0
0
0
0
0
0
0.081081
111
3
40
37
0.911765
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
1
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
1
0
0
1
0
0
7
0bddb7c3e6c61e7171d634e60b4a75f462220291
21,677
py
Python
similarity/SimTopicLists.py
Renata1995/Topic-Distance-and-Coherence
d567d5b3ef71ea5654f214aa3736add7f3ac94bc
[ "Apache-2.0" ]
5
2018-08-25T07:16:31.000Z
2020-11-12T00:36:15.000Z
similarity/SimTopicLists.py
Renata1995/Topic-Distance-and-Coherence
d567d5b3ef71ea5654f214aa3736add7f3ac94bc
[ "Apache-2.0" ]
1
2018-09-24T16:17:47.000Z
2018-09-24T16:17:47.000Z
similarity/SimTopicLists.py
Renata1995/Topic-Distance-and-Coherence
d567d5b3ef71ea5654f214aa3736add7f3ac94bc
[ "Apache-2.0" ]
4
2018-05-07T07:52:10.000Z
2020-11-12T00:36:18.000Z
from similarity import Similarity class SimTopicLists: """ Compare similarities between topics in two topic lists """ def __init__(self): self.sim = Similarity() def bha_distance(self, t_list1, t_list2): """ Compare the Bhattacharyya Distance between each of two topics in two topic lists and store the results in a 2D list Example t_list1 contains t1_0, t1_1, t1_2 t_list2 contains t2_0, t2_1, t2_2 distance list: [[sim(t1_0,t2_0), sim(t1_0, t2_1), sim(t1_0, t2_2)], [sim(t1_1,t2_0), sim(t1_1, t2_1), sim(t1_1, t2_2)], [sim(t1_2,t2_0), sim(t1_2, t2_1), sim(t1_2, t2_2)]] The following distance methods have similar outputs :return: a 2D list stores the results """ distance_list = [] for value1 in t_list1: sub_list = [self.sim.bha_distance(value1, value2) for value2 in t_list2] distance_list.append(sub_list) return distance_list def kl_divergence(self, t_list1, t_list2): """ Compare the KL Divergence between each of two topics in two topic lists and store the results in a 2D list :return: a 2D list stores the results """ distance_list = [] for value1 in t_list1: sub_list = [self.sim.kl_divergence(value1, value2) for value2 in t_list2] distance_list.append(sub_list) return distance_list def cos_distance(self, t_list1, t_list2): """ Compare the cosine distance between each of two topics in two topic lists and store the results in a 2D list :return: a 2D list stores the results """ distance_list = [] for value1 in t_list1: sub_list = [self.sim.cosine_distance(value1, value2) for value2 in t_list2] distance_list.append(sub_list) return distance_list def kendall(self, t_list1, t_list2): """ Compare the kendall tau correlation between each of two topics in two topic lists and store the results in a 2D list :return: a 2D list stores the results """ distance_list = [] for index1, value1 in enumerate(t_list1): sub_list = [] for index2, value2 in enumerate(t_list2): result = self.sim.kendall_tau(value2, value1) sub_list.append(result) distance_list.append(sub_list) return distance_list def dcg(self, t_list1, t_list2, word_limit=0): """ Compare the difference between dcg values of each two topics in two topic lists and store the results in a 2D list :return: a 2D list stores the results """ distance_list = [] if word_limit == 0: word_limit = len(t_list1) for value1 in t_list1: sub_list = [self.sim.dcg_difference(value1, value2, word_limit) for value2 in t_list2] distance_list.append(sub_list) return distance_list def jaccard(self, t_list1, t_list2, threshold): """ Compare the jaccard distance between each of two in two topic lists and store the results in a 2D list :return: a 2D list stores the """ distance_list = [] for value1 in t_list1: sub_list = [self.sim.jaccard_distance(value1, value2, threshold) for value2 in t_list2] distance_list.append(sub_list) return distance_list def write_distance(self, distance_list, ofile): """ Write distance values between two topics in a topic list Assume one topic list t_list1 contains t0, t1, t2 :param distance_list: generated by one of similarity/distance methods above i.e. [[sim(t0,t0), sim(t0,t1), sim(t0,t2)], [sim(t1,t0), sim(t1, t1), sim(t1,t2)], [sim(t2,t0), sim(t2,t1), sim(t2,t2)]] :param ofile: the output file :return: a list of similarity/distance values i.e. [sim(t0,t1), sim(t0,t2), sim(t1,t2)] """ for i1, sublist in enumerate(distance_list): for i2, value in enumerate(sublist[i1 + 1:]): ofile.write(str(value) + "\n") def read_distance_list(self, ifile): """ Read a distance list from an output file :param ifile: the input file :return: a list of similarity/distance values """ dist_list = [] for line in ifile: dist_list.append(float(line)) return dist_list def give_dist_names(self, dist_list, topics_count, corpus_type): """ Turn a distance list into a list of (topic_pair_name,similarity value) tuples This new list will be used in the calculation of kendalltau correlations among different similarity measures. :param dist_list: a distance list generated by a tfidf 3-topic LDA i.e. Suppose a topic list t_list1 contains t0, t1, t2 and [sim(t0,t1), sim(t0,t2), sim(t1,t2)] corresponds to [0.3, 0.2, 0.4] :param topics_count: the number of topics in the topic list that related with the distance list :param corpus_type: the corpus type of the LDA that generates this topic list :return: [(tfidf_t3t0_t1:0.3), (tfidf_t3t0_t2:0.2), (tfidf_t3t1_t2:0.4)) """ dist_names = [] index = 0 for t1 in range(topics_count): for t2 in range(t1 + 1, topics_count): dist_names.append( (corpus_type + "_t" + str(topics_count) + "t" + str(t1) + "_t" + str(t2), dist_list[index])) index += 1 return dist_names # Different display methods def find_smallest(self, num_list): if num_list[0] < num_list[1]: row_min, row_min2, i1, i2 = num_list[0], num_list[1], 0, 1 else: row_min, row_min2, i1, i2 = num_list[1], num_list[0], 1, 0 for index, value in enumerate(num_list): if value < row_min: row_min2, i2 = row_min, i1 row_min, i1 = value, index elif (row_min < value < row_min2) or (row_min == value and i1 != index): row_min2, i2 = value, index return i1, i2 def find_smallest_self(self, num_list): if num_list[0] < num_list[1]: row_min, row_min2, i1, i2 = num_list[0], num_list[1], 0, 1 else: row_min, row_min2, i1, i2 = num_list[1], num_list[0], 1, 0 for index, value in enumerate(num_list): if value < row_min: row_min2, i2 = row_min, i1 row_min, i1 = value, index elif (row_min < value < row_min2) or (row_min == value and i1 != index): row_min2, i2 = value, index return i1, i2 def find_largest_two(self, num_list): if num_list[0] > num_list[1]: row_max, row_max2, i1, i2 = num_list[0], num_list[1], 0, 1 else: row_max, row_max2, i1, i2 = num_list[1], num_list[0], 1, 0 for index, value in enumerate(num_list): if value > row_max: row_max2, i2 = row_max, i1 row_max, i1 = value, index elif (row_max > value > row_max2) or (row_max == value and i1 != index): row_max2, i2 = value, index return i1, i2 def find_largest_one(self, num_list): lmax = num_list[0] i = 0 for index, value in enumerate(num_list): if value > lmax: lmax = value i = index return i def rank(self, nlist): # rank = 'a b c d e f g h i j k l m n o p q r s t u v w x y z'.split() rank = list(range(0, len(nlist))) sorted_list = list(sorted(nlist)) ranklist = {} for index, num in enumerate(sorted_list): ranklist[num] = rank[index] newlist = [] for index, num in enumerate(nlist): newlist.append(str(ranklist[num]) + " " + str('{0:.6f}'.format(num))) return newlist def show_results_rank(self, distance_list, file): """ Show the results from the comp_topic_lists method :param distance_list: a 2D list of data """ width = 14 file.write("\ntopic List 1 is vertical and topic List 2 is horizontal\n") # calculate smallest results # show row labels file.write("<style>table, th, td {border: 1px solid black;}</style>") file.write("<table><thead><tr><th></th>") for value in range(len(distance_list[0])): file.write("<th> topic" + str(value) + "</th>") file.write("</tr></thead><tbody>") colordiff = int(16777215 / (len(distance_list[0]))) for index, sublist in enumerate(distance_list): # show column labels file.write("<tr><td> topic" + str(index) + "</td>") # rank sublist = self.rank(sublist) for sub_i, value in enumerate(sublist): ranknum = float(value.split()[0]) colornum = int(16777215 - ranknum * colordiff) color = format(colornum, "06X") file.write("<td><span style='background-color: #" + str(color) + "'>") file.write(value.split()[1]) file.write("</span></td>") file.write("</tr>") file.write("</tbody></table>") def show_results_rank_bw(self, distance_list, file): """ Show the results from the comp_topic_lists method :param distance_list: a 2D list of data """ width = 14 file.write("\ntopic List 1 is vertical and topic List 2 is horizontal\n") # calculate smallest results # show row labels file.write("<style>table, th, td {border: 1px solid black;}</style>") file.write("<table><thead><tr><th></th>") for value in range(len(distance_list[0])): file.write("<th> topic" + str(value) + "</th>") file.write("</tr></thead><tbody>") colordiff = int(255 / (len(distance_list[0]))) for index, sublist in enumerate(distance_list): # show column labels file.write("<tr><td> topic" + str(index) + "</td>") # rank sublist = self.rank(sublist) for sub_i, value in enumerate(sublist): ranknum = int(value.split()[0]) colornum = str(255 - ranknum * colordiff) rgbstr = "rgb(" + colornum + "," + colornum + "," + colornum + ")" file.write("<td><span style='background-color: " + rgbstr + "'>") file.write(value.split()[1]) file.write("</span></td>") file.write("</tr>") file.write("</tbody></table>") def show_results_rank_reverse(self, distance_list, file): """ Show the results from the comp_topic_lists method :param distance_list: a 2D list of data """ width = 14 file.write("\ntopic List 1 is vertical and topic List 2 is horizontal\n") # calculate smallest results # show row labels file.write("<style>table, th, td {border: 1px solid black;}</style>") file.write("<table><thead><tr><th></th>") for value in range(len(distance_list[0])): file.write("<th> topic" + str(value) + "</th>") file.write("</tr></thead><tbody>") colordiff = int(255.0 / (len(distance_list[0]))) for index, sublist in enumerate(distance_list): # show column labels file.write("<tr><td> topic" + str(index) + "</td>") # rank sublist = self.rank(sublist) for sub_i, value in enumerate(sublist): ranknum = int(value.split()[0]) colornum = str(ranknum * colordiff) rgbstr = "rgb(" + colornum + "," + colornum + "," + colornum + ")" file.write("<td><span style='background-color: " + rgbstr + "'>") file.write(value.split()[1]) file.write("</span></td>") file.write("</tr>") file.write("</tbody></table>") def show_results_value(self, distance_list, file): """ Show the results from the comp_topic_lists method :param distance_list: a 2D list of data """ width = 14 file.write("\ntopic List 1 is vertical and topic List 2 is horizontal\n") # calculate smallest results # show row labels file.write("<style>table, th, td {border: 1px solid black;}</style>") file.write("<table><thead><tr><th></th>") for value in range(len(distance_list[0])): file.write("<th> topic" + str(value) + "</th>") file.write("</tr></thead><tbody>") max_value = max([max(v) for v in distance_list]) min_value = min([min(v) for v in distance_list]) for index, sublist in enumerate(distance_list): # show column labels file.write("<tr><td> topic" + str(index) + "</td>") for sub_i, value in enumerate(sublist): percent = (value - min_value) / (max_value - min_value) colornum = str(int(255 * (1 - percent))) rgbstr = "rgb(" + colornum + "," + colornum + "," + colornum + ")" file.write("<td><span style='background-color: " + rgbstr + "'>") value = '{0:.6f}'.format(value) file.write(str(value)) file.write("</span></td>") file.write("</tr>") file.write("</tbody></table>") def show_results_value_reverse(self, distance_list, file): """ Show the results from the comp_topic_lists method :param distance_list: a 2D list of data """ width = 14 file.write("\ntopic List 1 is vertical and topic List 2 is horizontal\n") # calculate smallest results # show row labels file.write("<style>table, th, td {border: 1px solid black;}</style>") file.write("<table><thead><tr><th></th>") for value in range(len(distance_list[0])): file.write("<th> topic" + str(value) + "</th>") file.write("</tr></thead><tbody>") max_list = [] for sub in distance_list: max_list.append(max([v for v in sub if round(v, 6) != 1.000000])) max_value = max(max_list) min_value = min([min(v) for v in distance_list]) for index, sublist in enumerate(distance_list): # show column labels file.write("<tr><td> topic" + str(index) + "</td>") for sub_i, value in enumerate(sublist): if round(value, 6) == 1.000000: colornum = "255" else: percent = (value - min_value) / (max_value - min_value) colornum = str(int(255 * percent)) rgbstr = "rgb(" + colornum + "," + colornum + "," + colornum + ")" file.write("<td><span style='background-color: " + rgbstr + "'>") value = '{0:.6f}'.format(value) file.write(str(value)) file.write("</span></td>") file.write("</tr>") file.write("</tbody></table>") def show_results(self, distance_list, file): """ Show the results from the comp_topic_lists method :param distance_list: a 2D list of data """ width = 14 file.write("\ntopic List 1 is vertical and topic List 2 is horizontal\n") # calculate smallest results # show row labels file.write("{:{w}}".format("T_List1/T_List2", w=width)) for value in range(len(distance_list[0])): file.write('{:{w}}'.format(" topic" + str(value), w=width)) file.write("\n") for index, sublist in enumerate(distance_list): # show column labels file.write('{:{w}}'.format(" topic" + str(index), w=width)) # find row and col max rmax = self.find_largest_one(sublist) cmax_list = [] for i in range(len(sublist)): col_list = [v[i] for v in distance_list] cmax_list.append(self.find_largest_one(col_list)) for sub_i, value in enumerate(sublist): print value value = '{0:.6f}'.format(value) if sub_i == rmax and index != cmax_list[sub_i]: file.write('{:{w}}'.format("| **" + value, w=width)) elif sub_i != rmax and index == cmax_list[sub_i]: file.write('{:{w}}'.format("| ++" + value, w=width)) elif sub_i == rmax and index == cmax_list[sub_i]: file.write('{:{w}}'.format("| *+" + value, w=width)) else: file.write('{:{w}}'.format("| " + value, w=width)) file.write("\n" + "-" * width * (len(distance_list[0]) + 1) + "\n") def show_results_self(self, distance_list, file): """ Show the results from the comp_topic_lists method :param distance_list: a 2D list of data """ width = 14 file.write("\ntopic List 1 is vertical and topic List 2 is horizontal\n") # calculate smallest results # show row labels file.write("{:{w}}".format("T_List1/T_List2", w=width)) for value in range(len(distance_list[0])): file.write('{:{w}}'.format(" topic" + str(value), w=width)) file.write("\n") for index, sublist in enumerate(distance_list): # show column labels file.write('{:{w}}'.format(" topic" + str(index), w=width)) # find row and col max rmax = self.find_largest_one(sublist) for sub_i, value in enumerate(sublist): value = '{0:.6f}'.format(value) if sub_i == rmax: file.write('{:{w}}'.format("| **" + value, w=width)) else: file.write('{:{w}}'.format("| " + value, w=width)) file.write("\n" + "-" * width * (len(distance_list[0]) + 1) + "\n") def show_results_2min_self(self, distance_list, file): """ Show the results from the comp_topic_lists method :param distance_list: a 2D list of data """ width = 14 file.write("\ntopic List 1 is vertical and topic List 2 is horizontal\n") # show row labels file.write("{:{w}}".format("T_List1/T_List2", w=width)) for value in range(len(distance_list[0])): file.write('{:{w}}'.format(" topic" + str(value), w=width)) file.write("\n") for index, sublist in enumerate(distance_list): # show column labels file.write('{:{w}}'.format(" topic" + str(index), w=width)) # show data in each cell min_1, min_2 = self.find_smallest(sublist) for sub_i, value in enumerate(sublist): value = '{0:.6f}'.format(value) if sub_i == min_1: file.write('{:{w}}'.format("|##" + value, w=width)) elif sub_i == min_2: file.write('{:{w}}'.format("| #" + value, w=width)) else: file.write('{:{w}}'.format("| " + value, w=width)) file.write("\n" + "-" * width * (len(distance_list[0]) + 1) + "\n") def show_results_2max_self(self, distance_list, file): """ Show the results from the comp_topic_lists method :param distance_list: a 2D list of data """ width = 14 file.write("\ntopic List 1 is vertical and topic List 2 is horizontal\n") # show row labels file.write("{:{w}}".format("T_List1/T_List2", w=width)) for value in range(len(distance_list[0])): file.write('{:{w}}'.format(" topic" + str(value), w=width)) file.write("\n") for index, sublist in enumerate(distance_list): # show column labels file.write('{:{w}}'.format(" topic" + str(index), w=width)) # show data in each cell max_1, max_2 = self.find_largest_two(sublist) for sub_i, value in enumerate(sublist): value = '{0:.6f}'.format(value) if sub_i == max_1: file.write('{:{w}}'.format("| " + value, w=width)) elif sub_i == max_2: file.write('{:{w}}'.format("| **" + value, w=width)) else: file.write('{:{w}}'.format("| " + value, w=width)) file.write("\n" + "-" * width * (len(distance_list[0]) + 1) + "\n") def write_distance(self, distance_list, ofile): for i1, sublist in enumerate(distance_list): for i2, value in enumerate(sublist[i1 + 1:]): ofile.write(str(value) + "\n") def read_distance_list(self, ifile): dist_list = [] for line in ifile: dist_list.append(float(line)) return dist_list def read_distance_rank(self, dist_list, topics_count, corpus_type): dist_rank = [] index = 0 for t1 in range(topics_count): for t2 in range(t1+1, topics_count): dist_rank.append((corpus_type+"_t"+str(topics_count)+ "t"+str(t1)+"_t"+str(t2), dist_list[index])) index += 1 return dist_rank
38.434397
117
0.544125
2,834
21,677
4.026464
0.079746
0.071773
0.021032
0.033652
0.809482
0.792919
0.791605
0.769608
0.747962
0.731575
0
0.030222
0.325322
21,677
563
118
38.502664
0.750017
0.032338
0
0.679878
0
0
0.119675
0.015108
0
0
0
0
0
0
null
null
0
0.003049
null
null
0.003049
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
1
0
0
0
0
0
0
0
0
7
0be1ff6febe670da1e98763a37ce44337976deff
294
py
Python
cardinal/handlers/__init__.py
multiparty/cardinal
912bae64e1317114faaf89456a978ee172fca7a0
[ "MIT" ]
null
null
null
cardinal/handlers/__init__.py
multiparty/cardinal
912bae64e1317114faaf89456a978ee172fca7a0
[ "MIT" ]
null
null
null
cardinal/handlers/__init__.py
multiparty/cardinal
912bae64e1317114faaf89456a978ee172fca7a0
[ "MIT" ]
null
null
null
from cardinal.handlers.vm.ec2 import Ec2Handler from cardinal.handlers.kube.eks import EksHandler from cardinal.handlers.vm.gce import GceHandler from cardinal.handlers.kube.gke import GkeHandler from cardinal.handlers.vm.avm import AvmHandler from cardinal.handlers.kube.aks import AksHandler
42
49
0.857143
42
294
6
0.428571
0.285714
0.47619
0.261905
0
0
0
0
0
0
0
0.007407
0.081633
294
6
50
49
0.925926
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
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
0bf3b71a61703bec44d2504aa96238f63914d387
21,078
py
Python
pypureclient/flashblade/FB_2_2/api/keytabs_api.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flashblade/FB_2_2/api/keytabs_api.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flashblade/FB_2_2/api/keytabs_api.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashBlade REST API A lightweight client for FlashBlade REST API 2.2, developed by Pure Storage, Inc. (http://www.purestorage.com/). OpenAPI spec version: 2.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # python 2 and python 3 compatibility library import six from typing import List, Optional from .. import models class KeytabsApi(object): def __init__(self, api_client): self.api_client = api_client def api22_keytabs_delete_with_http_info( self, ids=None, # type: List[str] names=None, # type: List[str] async_req=False, # type: bool _return_http_data_only=False, # type: bool _preload_content=True, # type: bool _request_timeout=None, # type: Optional[int] ): # type: (...) -> None """DELETE keytabs Delete a Kerberos keytab file. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.api22_keytabs_delete_with_http_info(async_req=True) >>> result = thread.get() :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. :param bool _return_http_data_only: Returns only data field. :param bool _preload_content: Response is converted into objects. :param int _request_timeout: Total request timeout in seconds. It can also be a tuple of (connection time, read time) timeouts. :return: None If the method is called asynchronously, returns the request thread. """ if ids is not None: if not isinstance(ids, list): ids = [ids] if names is not None: if not isinstance(names, list): names = [names] params = {k: v for k, v in six.iteritems(locals()) if v is not None} # Convert the filter into a string if params.get('filter'): params['filter'] = str(params['filter']) if params.get('sort'): params['sort'] = [str(_x) for _x in params['sort']] collection_formats = {} path_params = {} query_params = [] if 'ids' in params: query_params.append(('ids', params['ids'])) collection_formats['ids'] = 'csv' if 'names' in params: query_params.append(('names', params['names'])) collection_formats['names'] = 'csv' header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json']) # Authentication setting auth_settings = ['AuthorizationHeader'] return self.api_client.call_api( '/api/2.2/keytabs', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type=None, auth_settings=auth_settings, async_req=async_req, _return_http_data_only=_return_http_data_only, _preload_content=_preload_content, _request_timeout=_request_timeout, collection_formats=collection_formats, ) def api22_keytabs_download_get_with_http_info( self, keytab_ids=None, # type: List[str] keytab_names=None, # type: List[str] async_req=False, # type: bool _return_http_data_only=False, # type: bool _preload_content=True, # type: bool _request_timeout=None, # type: Optional[int] ): # type: (...) -> models.KeytabFileResponse """GET keytabs/download Download a Kerberos keytab file. The file can be downloaded in the native binary format or a base64 encoded format. If not specified, defaults to binary. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.api22_keytabs_download_get_with_http_info(async_req=True) >>> result = thread.get() :param list[str] keytab_ids: A comma-separated list of keytab IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `keytab_names` query parameter. :param list[str] keytab_names: A comma-separated list of keytab names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `keytab_ids` query parameter. :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. :param bool _return_http_data_only: Returns only data field. :param bool _preload_content: Response is converted into objects. :param int _request_timeout: Total request timeout in seconds. It can also be a tuple of (connection time, read time) timeouts. :return: KeytabFileResponse If the method is called asynchronously, returns the request thread. """ if keytab_ids is not None: if not isinstance(keytab_ids, list): keytab_ids = [keytab_ids] if keytab_names is not None: if not isinstance(keytab_names, list): keytab_names = [keytab_names] params = {k: v for k, v in six.iteritems(locals()) if v is not None} # Convert the filter into a string if params.get('filter'): params['filter'] = str(params['filter']) if params.get('sort'): params['sort'] = [str(_x) for _x in params['sort']] collection_formats = {} path_params = {} query_params = [] if 'keytab_ids' in params: query_params.append(('keytab_ids', params['keytab_ids'])) collection_formats['keytab_ids'] = 'csv' if 'keytab_names' in params: query_params.append(('keytab_names', params['keytab_names'])) collection_formats['keytab_names'] = 'csv' header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/octet-stream', 'text/plain']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json']) # Authentication setting auth_settings = ['AuthorizationHeader'] return self.api_client.call_api( '/api/2.2/keytabs/download', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='KeytabFileResponse', auth_settings=auth_settings, async_req=async_req, _return_http_data_only=_return_http_data_only, _preload_content=_preload_content, _request_timeout=_request_timeout, collection_formats=collection_formats, ) def api22_keytabs_get_with_http_info( self, continuation_token=None, # type: str filter=None, # type: str ids=None, # type: List[str] limit=None, # type: int names=None, # type: List[str] offset=None, # type: int sort=None, # type: List[str] async_req=False, # type: bool _return_http_data_only=False, # type: bool _preload_content=True, # type: bool _request_timeout=None, # type: Optional[int] ): # type: (...) -> models.KeytabGetResponse """GET keytabs List a Kerberos keytab file and its configuration information. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.api22_keytabs_get_with_http_info(async_req=True) >>> result = thread.get() :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. :param str filter: Exclude resources that don't match the specified criteria. :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. :param int offset: The offset of the first resource to return from a collection. :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. :param bool _return_http_data_only: Returns only data field. :param bool _preload_content: Response is converted into objects. :param int _request_timeout: Total request timeout in seconds. It can also be a tuple of (connection time, read time) timeouts. :return: KeytabGetResponse If the method is called asynchronously, returns the request thread. """ if ids is not None: if not isinstance(ids, list): ids = [ids] if names is not None: if not isinstance(names, list): names = [names] if sort is not None: if not isinstance(sort, list): sort = [sort] params = {k: v for k, v in six.iteritems(locals()) if v is not None} # Convert the filter into a string if params.get('filter'): params['filter'] = str(params['filter']) if params.get('sort'): params['sort'] = [str(_x) for _x in params['sort']] if 'limit' in params and params['limit'] < 1: raise ValueError("Invalid value for parameter `limit` when calling `api22_keytabs_get`, must be a value greater than or equal to `1`") if 'offset' in params and params['offset'] < 0: raise ValueError("Invalid value for parameter `offset` when calling `api22_keytabs_get`, must be a value greater than or equal to `0`") collection_formats = {} path_params = {} query_params = [] if 'continuation_token' in params: query_params.append(('continuation_token', params['continuation_token'])) if 'filter' in params: query_params.append(('filter', params['filter'])) if 'ids' in params: query_params.append(('ids', params['ids'])) collection_formats['ids'] = 'csv' if 'limit' in params: query_params.append(('limit', params['limit'])) if 'names' in params: query_params.append(('names', params['names'])) collection_formats['names'] = 'csv' if 'offset' in params: query_params.append(('offset', params['offset'])) if 'sort' in params: query_params.append(('sort', params['sort'])) collection_formats['sort'] = 'csv' header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json']) # Authentication setting auth_settings = ['AuthorizationHeader'] return self.api_client.call_api( '/api/2.2/keytabs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='KeytabGetResponse', auth_settings=auth_settings, async_req=async_req, _return_http_data_only=_return_http_data_only, _preload_content=_preload_content, _request_timeout=_request_timeout, collection_formats=collection_formats, ) def api22_keytabs_post_with_http_info( self, keytab=None, # type: models.KeytabPost name_prefixes=None, # type: str async_req=False, # type: bool _return_http_data_only=False, # type: bool _preload_content=True, # type: bool _request_timeout=None, # type: Optional[int] ): # type: (...) -> models.KeytabResponse """POST keytabs Import a Kerberos keytab file from a Key Distribution Center. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.api22_keytabs_post_with_http_info(keytab, async_req=True) >>> result = thread.get() :param KeytabPost keytab: (required) :param str name_prefixes: The prefix to use for the names of all Kerberos keytab objects that are being created. :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. :param bool _return_http_data_only: Returns only data field. :param bool _preload_content: Response is converted into objects. :param int _request_timeout: Total request timeout in seconds. It can also be a tuple of (connection time, read time) timeouts. :return: KeytabResponse If the method is called asynchronously, returns the request thread. """ params = {k: v for k, v in six.iteritems(locals()) if v is not None} # Convert the filter into a string if params.get('filter'): params['filter'] = str(params['filter']) if params.get('sort'): params['sort'] = [str(_x) for _x in params['sort']] # verify the required parameter 'keytab' is set if keytab is None: raise TypeError("Missing the required parameter `keytab` when calling `api22_keytabs_post`") collection_formats = {} path_params = {} query_params = [] if 'name_prefixes' in params: query_params.append(('name_prefixes', params['name_prefixes'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'keytab' in params: body_params = params['keytab'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['application/json']) # Authentication setting auth_settings = ['AuthorizationHeader'] return self.api_client.call_api( '/api/2.2/keytabs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='KeytabResponse', auth_settings=auth_settings, async_req=async_req, _return_http_data_only=_return_http_data_only, _preload_content=_preload_content, _request_timeout=_request_timeout, collection_formats=collection_formats, ) def api22_keytabs_upload_post_with_http_info( self, keytab_file=None, # type: models.ERRORUNKNOWN name_prefixes=None, # type: str async_req=False, # type: bool _return_http_data_only=False, # type: bool _preload_content=True, # type: bool _request_timeout=None, # type: Optional[int] ): # type: (...) -> models.KeytabFileResponse """POST keytabs/upload Upload a Kerberos keytab file to the array. The file can be uploaded in the native binary format or a base64 encoded format. If not specified, defaults to binary. The procedure to upload a file may vary depending on the type of REST client. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.api22_keytabs_upload_post_with_http_info(keytab_file, async_req=True) >>> result = thread.get() :param ERRORUNKNOWN keytab_file: The keytab file to upload. (required) :param str name_prefixes: The prefix to use for the names of all Kerberos keytab objects that are being created. :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. :param bool _return_http_data_only: Returns only data field. :param bool _preload_content: Response is converted into objects. :param int _request_timeout: Total request timeout in seconds. It can also be a tuple of (connection time, read time) timeouts. :return: KeytabFileResponse If the method is called asynchronously, returns the request thread. """ params = {k: v for k, v in six.iteritems(locals()) if v is not None} # Convert the filter into a string if params.get('filter'): params['filter'] = str(params['filter']) if params.get('sort'): params['sort'] = [str(_x) for _x in params['sort']] # verify the required parameter 'keytab_file' is set if keytab_file is None: raise TypeError("Missing the required parameter `keytab_file` when calling `api22_keytabs_upload_post`") collection_formats = {} path_params = {} query_params = [] if 'name_prefixes' in params: query_params.append(('name_prefixes', params['name_prefixes'])) header_params = {} form_params = [] local_var_files = {} if 'keytab_file' in params: form_params.append(('keytab_file', params['keytab_file'])) body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/octet-stream', 'text/plain']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( ['multipart/form-data']) # Authentication setting auth_settings = ['AuthorizationHeader'] return self.api_client.call_api( '/api/2.2/keytabs/upload', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='KeytabFileResponse', auth_settings=auth_settings, async_req=async_req, _return_http_data_only=_return_http_data_only, _preload_content=_preload_content, _request_timeout=_request_timeout, collection_formats=collection_formats, )
43.37037
449
0.631939
2,585
21,078
4.954739
0.107157
0.018738
0.030528
0.028107
0.80114
0.782948
0.756636
0.737352
0.737352
0.729076
0
0.003573
0.283044
21,078
485
450
43.459794
0.843965
0.400465
0
0.743945
0
0.00692
0.130365
0.010392
0
0
0
0
0
1
0.020761
false
0
0.017301
0
0.058824
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
0bf9af9211f1f07e5a2dbb47c749958fb6f75269
74,696
py
Python
tests/test_with_single_game/test_data_player_data.py
a-luna/vigorish
6cede5ced76c7d2c9ad0aacdbd2b18c2f1ee4ee6
[ "MIT" ]
2
2021-07-15T13:53:33.000Z
2021-07-25T17:03:29.000Z
tests/test_with_single_game/test_data_player_data.py
a-luna/vigorish
6cede5ced76c7d2c9ad0aacdbd2b18c2f1ee4ee6
[ "MIT" ]
650
2019-05-18T07:00:12.000Z
2022-01-21T19:38:55.000Z
tests/test_with_single_game/test_data_player_data.py
a-luna/vigorish
6cede5ced76c7d2c9ad0aacdbd2b18c2f1ee4ee6
[ "MIT" ]
2
2020-03-28T21:01:31.000Z
2022-01-06T05:16:11.000Z
from vigorish.data.player_data import PlayerData from vigorish.enums import DefensePosition from .conftest import BBREF_GAME_ID def test_bat_stats(vig_app): bat_stats_for_career_dict = { "all_player_stats_for_bat_order": False, "all_player_stats_for_def_pos": False, "all_stats_for_season": False, "all_stats_for_stint": False, "all_team_stats_for_bat_order": False, "all_team_stats_for_def_pos": False, "at_bats": 5, "avg": 0.8, "bases_on_balls": 0, "bat_order_list": [2], "bat_order_metrics": [{"bat_order": 2, "percent": 100.0, "total_games": 1}], "bb_rate": 0.0, "bbref_id": "troutmi01", "career_stats_all_teams": False, "career_stats_for_team": False, "caught_stealing": 1, "changed_teams_midseason": False, "contact_rate": 1.0, "def_position_list": [DefensePosition.CENTER_FIELD], "def_position_metrics": [ {"def_pos": DefensePosition.CENTER_FIELD, "is_starter": True, "percent": 100.0, "total_games": 1} ], "doubles": 1, "gdp": 0, "hit_by_pitch": 0, "hits": 4, "homeruns": 1, "intentional_bb": 0, "is_starter": False, "iso": 0.8, "k_rate": 0.0, "mlb_id": 545361, "obp": 0.8, "opponent_team_id_bbref": None, "ops": 2.4, "percent_started": 1.0, "percent_subbed": 0.0, "plate_appearances": 5, "player_team_id_bbref": None, "rbis": 3, "re24_bat": 2.9, "runs_scored": 2, "sac_fly": 0, "sac_hit": 0, "separate_player_stats_for_bat_order": False, "separate_player_stats_for_def_pos": False, "slg": 1.6, "stint_number": None, "stolen_bases": 0, "strikeouts": 0, "team_id_bbref": None, "total_games": 1, "total_games_started": 1, "total_games_subbed": 0, "total_pitches": 19, "total_strikes": 11, "triples": 0, "wpa_bat": 0.14, "wpa_bat_neg": -0.02, "wpa_bat_pos": 0.17, "year": None, "bat_order": "2", "def_position": "CF", } bat_stats_by_year_dict = { "all_player_stats_for_bat_order": False, "all_player_stats_for_def_pos": False, "all_stats_for_season": False, "all_stats_for_stint": False, "all_team_stats_for_bat_order": False, "all_team_stats_for_def_pos": False, "at_bats": 5, "avg": 0.8, "bases_on_balls": 0, "bat_order_list": [2], "bat_order_metrics": [{"bat_order": 2, "percent": 100.0, "total_games": 1}], "bb_rate": 0.0, "bbref_id": "troutmi01", "career_stats_all_teams": False, "career_stats_for_team": False, "caught_stealing": 1, "changed_teams_midseason": False, "contact_rate": 1.0, "def_position_list": [DefensePosition.CENTER_FIELD], "def_position_metrics": [ {"def_pos": DefensePosition.CENTER_FIELD, "is_starter": True, "percent": 100.0, "total_games": 1} ], "doubles": 1, "gdp": 0, "hit_by_pitch": 0, "hits": 4, "homeruns": 1, "intentional_bb": 0, "is_starter": False, "iso": 0.8, "k_rate": 0.0, "mlb_id": 545361, "obp": 0.8, "opponent_team_id_bbref": None, "ops": 2.4, "percent_started": 1.0, "percent_subbed": 0.0, "plate_appearances": 5, "player_team_id_bbref": None, "rbis": 3, "re24_bat": 2.9, "runs_scored": 2, "sac_fly": 0, "sac_hit": 0, "separate_player_stats_for_bat_order": False, "separate_player_stats_for_def_pos": False, "slg": 1.6, "stint_number": None, "stolen_bases": 0, "strikeouts": 0, "team_id_bbref": None, "total_games": 1, "total_games_started": 1, "total_games_subbed": 0, "total_pitches": 19, "total_strikes": 11, "triples": 0, "wpa_bat": 0.14, "wpa_bat_neg": -0.02, "wpa_bat_pos": 0.17, "year": 2019, "bat_order": "2", "def_position": "CF", } bat_stats_by_team_dict = { "all_player_stats_for_bat_order": False, "all_player_stats_for_def_pos": False, "all_stats_for_season": False, "all_stats_for_stint": False, "all_team_stats_for_bat_order": False, "all_team_stats_for_def_pos": False, "at_bats": 5, "avg": 0.8, "bases_on_balls": 0, "bat_order_list": [2], "bat_order_metrics": [{"bat_order": 2, "percent": 100.0, "total_games": 1}], "bb_rate": 0.0, "bbref_id": "troutmi01", "career_stats_all_teams": False, "career_stats_for_team": False, "caught_stealing": 1, "changed_teams_midseason": False, "contact_rate": 1.0, "def_position_list": [DefensePosition.CENTER_FIELD], "def_position_metrics": [ {"def_pos": DefensePosition.CENTER_FIELD, "is_starter": True, "percent": 100.0, "total_games": 1} ], "doubles": 1, "gdp": 0, "hit_by_pitch": 0, "hits": 4, "homeruns": 1, "intentional_bb": 0, "is_starter": False, "iso": 0.8, "k_rate": 0.0, "mlb_id": 545361, "obp": 0.8, "opponent_team_id_bbref": None, "ops": 2.4, "percent_started": 1.0, "percent_subbed": 0.0, "plate_appearances": 5, "player_team_id_bbref": "LAA", "rbis": 3, "re24_bat": 2.9, "runs_scored": 2, "sac_fly": 0, "sac_hit": 0, "separate_player_stats_for_bat_order": False, "separate_player_stats_for_def_pos": False, "slg": 1.6, "stint_number": None, "stolen_bases": 0, "strikeouts": 0, "team_id_bbref": "LAA", "total_games": 1, "total_games_started": 1, "total_games_subbed": 0, "total_pitches": 19, "total_strikes": 11, "triples": 0, "wpa_bat": 0.14, "wpa_bat_neg": -0.02, "wpa_bat_pos": 0.17, "year": None, "bat_order": "2", "def_position": "CF", } bat_stats_by_team_by_year_dict = { "all_player_stats_for_bat_order": False, "all_player_stats_for_def_pos": False, "all_stats_for_season": False, "all_stats_for_stint": False, "all_team_stats_for_bat_order": False, "all_team_stats_for_def_pos": False, "at_bats": 5, "avg": 0.8, "bases_on_balls": 0, "bat_order_list": [2], "bat_order_metrics": [{"bat_order": 2, "percent": 100.0, "total_games": 1}], "bb_rate": 0.0, "bbref_id": "troutmi01", "career_stats_all_teams": False, "career_stats_for_team": False, "caught_stealing": 1, "changed_teams_midseason": False, "contact_rate": 1.0, "def_position_list": [DefensePosition.CENTER_FIELD], "def_position_metrics": [ {"def_pos": DefensePosition.CENTER_FIELD, "is_starter": True, "percent": 100.0, "total_games": 1} ], "doubles": 1, "gdp": 0, "hit_by_pitch": 0, "hits": 4, "homeruns": 1, "intentional_bb": 0, "is_starter": False, "iso": 0.8, "k_rate": 0.0, "mlb_id": 545361, "obp": 0.8, "opponent_team_id_bbref": None, "ops": 2.4, "percent_started": 1.0, "percent_subbed": 0.0, "plate_appearances": 5, "player_team_id_bbref": "LAA", "rbis": 3, "re24_bat": 2.9, "runs_scored": 2, "sac_fly": 0, "sac_hit": 0, "separate_player_stats_for_bat_order": False, "separate_player_stats_for_def_pos": False, "slg": 1.6, "stint_number": 1, "stolen_bases": 0, "strikeouts": 0, "team_id_bbref": "LAA", "total_games": 1, "total_games_started": 1, "total_games_subbed": 0, "total_pitches": 19, "total_strikes": 11, "triples": 0, "wpa_bat": 0.14, "wpa_bat_neg": -0.02, "wpa_bat_pos": 0.17, "year": 2019, "bat_order": "2", "def_position": "CF", } bat_stats_by_opp_team_dict = { "all_player_stats_for_bat_order": False, "all_player_stats_for_def_pos": False, "all_stats_for_season": False, "all_stats_for_stint": False, "all_team_stats_for_bat_order": False, "all_team_stats_for_def_pos": False, "at_bats": 5, "avg": 0.8, "bases_on_balls": 0, "bat_order_list": [2], "bat_order_metrics": [{"bat_order": 2, "percent": 100.0, "total_games": 1}], "bb_rate": 0.0, "bbref_id": "troutmi01", "career_stats_all_teams": False, "career_stats_for_team": False, "caught_stealing": 1, "changed_teams_midseason": False, "contact_rate": 1.0, "def_position_list": [DefensePosition.CENTER_FIELD], "def_position_metrics": [ {"def_pos": DefensePosition.CENTER_FIELD, "is_starter": True, "percent": 100.0, "total_games": 1} ], "doubles": 1, "gdp": 0, "hit_by_pitch": 0, "hits": 4, "homeruns": 1, "intentional_bb": 0, "is_starter": False, "iso": 0.8, "k_rate": 0.0, "mlb_id": 545361, "obp": 0.8, "opponent_team_id_bbref": "TOR", "ops": 2.4, "percent_started": 1.0, "percent_subbed": 0.0, "plate_appearances": 5, "player_team_id_bbref": None, "rbis": 3, "re24_bat": 2.9, "runs_scored": 2, "sac_fly": 0, "sac_hit": 0, "separate_player_stats_for_bat_order": False, "separate_player_stats_for_def_pos": False, "slg": 1.6, "stint_number": None, "stolen_bases": 0, "strikeouts": 0, "team_id_bbref": None, "total_games": 1, "total_games_started": 1, "total_games_subbed": 0, "total_pitches": 19, "total_strikes": 11, "triples": 0, "wpa_bat": 0.14, "wpa_bat_neg": -0.02, "wpa_bat_pos": 0.17, "year": None, "bat_order": "2", "def_position": "CF", } bat_stats_by_opp_team_by_year_dict = { "all_player_stats_for_bat_order": False, "all_player_stats_for_def_pos": False, "all_stats_for_season": False, "all_stats_for_stint": False, "all_team_stats_for_bat_order": False, "all_team_stats_for_def_pos": False, "at_bats": 5, "avg": 0.8, "bases_on_balls": 0, "bat_order_list": [2], "bat_order_metrics": [{"bat_order": 2, "percent": 100.0, "total_games": 1}], "bb_rate": 0.0, "bbref_id": "troutmi01", "career_stats_all_teams": False, "career_stats_for_team": False, "caught_stealing": 1, "changed_teams_midseason": False, "contact_rate": 1.0, "def_position_list": [DefensePosition.CENTER_FIELD], "def_position_metrics": [ {"def_pos": DefensePosition.CENTER_FIELD, "is_starter": True, "percent": 100.0, "total_games": 1} ], "doubles": 1, "gdp": 0, "hit_by_pitch": 0, "hits": 4, "homeruns": 1, "intentional_bb": 0, "is_starter": False, "iso": 0.8, "k_rate": 0.0, "mlb_id": 545361, "obp": 0.8, "opponent_team_id_bbref": "TOR", "ops": 2.4, "percent_started": 1.0, "percent_subbed": 0.0, "plate_appearances": 5, "player_team_id_bbref": None, "rbis": 3, "re24_bat": 2.9, "runs_scored": 2, "sac_fly": 0, "sac_hit": 0, "separate_player_stats_for_bat_order": False, "separate_player_stats_for_def_pos": False, "slg": 1.6, "stint_number": None, "stolen_bases": 0, "strikeouts": 0, "team_id_bbref": None, "total_games": 1, "total_games_started": 1, "total_games_subbed": 0, "total_pitches": 19, "total_strikes": 11, "triples": 0, "wpa_bat": 0.14, "wpa_bat_neg": -0.02, "wpa_bat_pos": 0.17, "year": 2019, "bat_order": "2", "def_position": "CF", } player_data = PlayerData(vig_app, 545361) assert player_data.bat_stats_for_career.as_dict() == bat_stats_for_career_dict assert player_data.bat_stats_by_year[0].as_dict() == bat_stats_by_year_dict assert player_data.bat_stats_by_team[0].as_dict() == bat_stats_by_team_dict assert player_data.bat_stats_by_team_by_year[0].as_dict() == bat_stats_by_team_by_year_dict assert player_data.bat_stats_by_opp_team["TOR"].as_dict() == bat_stats_by_opp_team_dict assert player_data.bat_stats_by_opp_team_by_year[2019]["TOR"].as_dict() == bat_stats_by_opp_team_by_year_dict def test_pitch_stats(vig_app): pitch_stats_as_rp_dict = { "bases_on_balls": 0, "batters_faced": 0, "bb_per_nine": 0.0, "bb_rate": 0.0, "bbref_id": "lawde01", "earned_runs": 0, "era": 0.0, "fly_balls": 0, "games_as_rp": 0, "games_as_sp": 0, "ground_balls": 0, "hits": 0, "homeruns": 0, "hr_per_fb": 0.0, "hr_per_nine": 0.0, "inherited_runners": 0, "inherited_scored": 0, "innings_pitched": 0.0, "k_minus_bb": 0.0, "k_per_bb": 0.0, "k_per_nine": 0.0, "k_rate": 0.0, "line_drives": 0, "losses": 0, "mlb_id": 571882, "opponent_team_id_bbref": None, "pitch_count": 0, "player_team_id_bbref": None, "re24_pitch": 0, "role": "RP", "runs": 0, "saves": 0, "stint_number": None, "strikeouts": 0, "strikes": 0, "strikes_contact": 0, "strikes_looking": 0, "strikes_swinging": 0, "team_id_bbref": None, "total_games": 0, "total_outs": 0, "unknown_type": 0, "whip": 0.0, "wins": 0, "wpa_pitch": 0, "year": None, } pitch_stats_as_sp_dict = { "bases_on_balls": 0, "batters_faced": 3, "bb_per_nine": 0.0, "bb_rate": 0.0, "bbref_id": "lawde01", "earned_runs": 0, "era": 0.0, "fly_balls": 1, "games_as_rp": 0, "games_as_sp": 1, "ground_balls": 0, "hits": 0, "homeruns": 0, "hr_per_fb": 0.0, "hr_per_nine": 0.0, "inherited_runners": 0, "inherited_scored": 0, "innings_pitched": 1.0, "k_minus_bb": 0.667, "k_per_bb": 0.0, "k_per_nine": 18.0, "k_rate": 0.667, "line_drives": 1, "losses": 0, "mlb_id": 571882, "opponent_team_id_bbref": None, "pitch_count": 17, "player_team_id_bbref": None, "re24_pitch": 0.5, "role": "SP", "runs": 0, "saves": 0, "stint_number": None, "strikeouts": 2, "strikes": 11, "strikes_contact": 4, "strikes_looking": 5, "strikes_swinging": 2, "team_id_bbref": None, "total_games": 1, "total_outs": 3, "unknown_type": 0, "whip": 0.0, "wins": 0, "wpa_pitch": 0.05, "year": None, } pitch_stats_by_opp_team_by_year_dict = { "bases_on_balls": 0, "batters_faced": 3, "bb_per_nine": 0.0, "bb_rate": 0.0, "bbref_id": "lawde01", "earned_runs": 0, "era": 0.0, "fly_balls": 1, "games_as_rp": 0, "games_as_sp": 1, "ground_balls": 0, "hits": 0, "homeruns": 0, "hr_per_fb": 0.0, "hr_per_nine": 0.0, "inherited_runners": 0, "inherited_scored": 0, "innings_pitched": 1.0, "k_minus_bb": 0.667, "k_per_bb": 0.0, "k_per_nine": 18.0, "k_rate": 0.667, "line_drives": 1, "losses": 0, "mlb_id": 571882, "opponent_team_id_bbref": "LAA", "pitch_count": 17, "player_team_id_bbref": None, "re24_pitch": 0.5, "role": None, "runs": 0, "saves": 0, "stint_number": None, "strikeouts": 2, "strikes": 11, "strikes_contact": 4, "strikes_looking": 5, "strikes_swinging": 2, "team_id_bbref": None, "total_games": 1, "total_outs": 3, "unknown_type": 0, "whip": 0.0, "wins": 0, "wpa_pitch": 0.05, "year": 2019, } pitch_stats_by_opp_team_dict = { "bases_on_balls": 0, "batters_faced": 3, "bb_per_nine": 0.0, "bb_rate": 0.0, "bbref_id": "lawde01", "earned_runs": 0, "era": 0.0, "fly_balls": 1, "games_as_rp": 0, "games_as_sp": 1, "ground_balls": 0, "hits": 0, "homeruns": 0, "hr_per_fb": 0.0, "hr_per_nine": 0.0, "inherited_runners": 0, "inherited_scored": 0, "innings_pitched": 1.0, "k_minus_bb": 0.667, "k_per_bb": 0.0, "k_per_nine": 18.0, "k_rate": 0.667, "line_drives": 1, "losses": 0, "mlb_id": 571882, "opponent_team_id_bbref": "LAA", "pitch_count": 17, "player_team_id_bbref": None, "re24_pitch": 0.5, "role": None, "runs": 0, "saves": 0, "stint_number": None, "strikeouts": 2, "strikes": 11, "strikes_contact": 4, "strikes_looking": 5, "strikes_swinging": 2, "team_id_bbref": None, "total_games": 1, "total_outs": 3, "unknown_type": 0, "whip": 0.0, "wins": 0, "wpa_pitch": 0.05, "year": None, } pitch_stats_by_team_by_year_dict = { "bases_on_balls": 0, "batters_faced": 3, "bb_per_nine": 0.0, "bb_rate": 0.0, "bbref_id": "lawde01", "earned_runs": 0, "era": 0.0, "fly_balls": 1, "games_as_rp": 0, "games_as_sp": 1, "ground_balls": 0, "hits": 0, "homeruns": 0, "hr_per_fb": 0.0, "hr_per_nine": 0.0, "inherited_runners": 0, "inherited_scored": 0, "innings_pitched": 1.0, "k_minus_bb": 0.667, "k_per_bb": 0.0, "k_per_nine": 18.0, "k_rate": 0.667, "line_drives": 1, "losses": 0, "mlb_id": 571882, "opponent_team_id_bbref": None, "pitch_count": 17, "player_team_id_bbref": "TOR", "re24_pitch": 0.5, "role": None, "runs": 0, "saves": 0, "stint_number": 1, "strikeouts": 2, "strikes": 11, "strikes_contact": 4, "strikes_looking": 5, "strikes_swinging": 2, "team_id_bbref": "TOR", "total_games": 1, "total_outs": 3, "unknown_type": 0, "whip": 0.0, "wins": 0, "wpa_pitch": 0.05, "year": 2019, } pitch_stats_by_team_dict = { "bases_on_balls": 0, "batters_faced": 3, "bb_per_nine": 0.0, "bb_rate": 0.0, "bbref_id": "lawde01", "earned_runs": 0, "era": 0.0, "fly_balls": 1, "games_as_rp": 0, "games_as_sp": 1, "ground_balls": 0, "hits": 0, "homeruns": 0, "hr_per_fb": 0.0, "hr_per_nine": 0.0, "inherited_runners": 0, "inherited_scored": 0, "innings_pitched": 1.0, "k_minus_bb": 0.667, "k_per_bb": 0.0, "k_per_nine": 18.0, "k_rate": 0.667, "line_drives": 1, "losses": 0, "mlb_id": 571882, "opponent_team_id_bbref": None, "pitch_count": 17, "player_team_id_bbref": "TOR", "re24_pitch": 0.5, "role": None, "runs": 0, "saves": 0, "stint_number": None, "strikeouts": 2, "strikes": 11, "strikes_contact": 4, "strikes_looking": 5, "strikes_swinging": 2, "team_id_bbref": "TOR", "total_games": 1, "total_outs": 3, "unknown_type": 0, "whip": 0.0, "wins": 0, "wpa_pitch": 0.05, "year": None, } pitch_stats_by_year_dict = { "bases_on_balls": 0, "batters_faced": 3, "bb_per_nine": 0.0, "bb_rate": 0.0, "bbref_id": "lawde01", "earned_runs": 0, "era": 0.0, "fly_balls": 1, "games_as_rp": 0, "games_as_sp": 1, "ground_balls": 0, "hits": 0, "homeruns": 0, "hr_per_fb": 0.0, "hr_per_nine": 0.0, "inherited_runners": 0, "inherited_scored": 0, "innings_pitched": 1.0, "k_minus_bb": 0.667, "k_per_bb": 0.0, "k_per_nine": 18.0, "k_rate": 0.667, "line_drives": 1, "losses": 0, "mlb_id": 571882, "opponent_team_id_bbref": None, "pitch_count": 17, "player_team_id_bbref": None, "re24_pitch": 0.5, "role": None, "runs": 0, "saves": 0, "stint_number": None, "strikeouts": 2, "strikes": 11, "strikes_contact": 4, "strikes_looking": 5, "strikes_swinging": 2, "team_id_bbref": None, "total_games": 1, "total_outs": 3, "unknown_type": 0, "whip": 0.0, "wins": 0, "wpa_pitch": 0.05, "year": 2019, } pitch_stats_for_career_dict = { "bases_on_balls": 0, "batters_faced": 3, "bb_per_nine": 0.0, "bb_rate": 0.0, "bbref_id": "lawde01", "earned_runs": 0, "era": 0.0, "fly_balls": 1, "games_as_rp": 0, "games_as_sp": 1, "ground_balls": 0, "hits": 0, "homeruns": 0, "hr_per_fb": 0.0, "hr_per_nine": 0.0, "inherited_runners": 0, "inherited_scored": 0, "innings_pitched": 1.0, "k_minus_bb": 0.667, "k_per_bb": 0.0, "k_per_nine": 18.0, "k_rate": 0.667, "line_drives": 1, "losses": 0, "mlb_id": 571882, "opponent_team_id_bbref": None, "pitch_count": 17, "player_team_id_bbref": None, "re24_pitch": 0.5, "role": None, "runs": 0, "saves": 0, "stint_number": None, "strikeouts": 2, "strikes": 11, "strikes_contact": 4, "strikes_looking": 5, "strikes_swinging": 2, "team_id_bbref": None, "total_games": 1, "total_outs": 3, "unknown_type": 0, "whip": 0.0, "wins": 0, "wpa_pitch": 0.05, "year": None, } player_data = PlayerData(vig_app, 571882) assert player_data.all_pitch_stats_for_career.as_dict() == pitch_stats_for_career_dict assert player_data.pitch_stats_as_sp.as_dict() == pitch_stats_as_sp_dict assert player_data.pitch_stats_as_rp.as_dict() == pitch_stats_as_rp_dict assert player_data.pitch_stats_by_year[0].as_dict() == pitch_stats_by_year_dict assert player_data.pitch_stats_by_team[0].as_dict() == pitch_stats_by_team_dict assert player_data.pitch_stats_by_team_by_year[0].as_dict() == pitch_stats_by_team_by_year_dict assert player_data.pitch_stats_by_opp_team["LAA"].as_dict() == pitch_stats_by_opp_team_dict assert player_data.pitch_stats_by_opp_team_by_year[2019]["LAA"].as_dict() == pitch_stats_by_opp_team_by_year_dict def test_pitchfx_pitching_metrics_career(vig_app): # All PitchFX metrics used by this test are from a single pitching performance by Derek Law, who appeared # as the starting pitcher for the Toronto Blue Jays against the Los Angeles Angels on June 17, 2019. pfx_metrics_career_vsALL_combined_dict = { "avg": 0.0, "avg_break_angle": 9.2, "avg_break_length": 7.8, "avg_break_y": 24.0, "avg_extension": 6.29, "avg_hit_distance": 328.0, "avg_launch_angle": 27.0, "avg_launch_speed": 85.3, "avg_pfx_x": -0.31, "avg_pfx_z": 2.41, "avg_plate_time": 0.442, "avg_px": 0.13, "avg_pz": 2.27, "avg_speed": 86.0, "avg_spin_direction": 123.0, "avg_spin_rate": 2127.0, "bad_whiff_rate": 0.167, "barrel_rate": 0.0, "bat_stand": None, "bb_rate": 0.0, "called_strike_rate": 0.294, "contact_rate": 0.667, "csw_rate": 0.412, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 0.667, "line_drive_rate": 1.0, "max_launch_speed": 85.3, "medium_hit_rate": 1.0, "mlb_id": 571882, "o_contact_rate": 0.667, "o_swing_rate": 0.3, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 1, "pitch_type_int": 32803, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.353, "swinging_strike_rate": 0.118, "total_at_bats": 3, "total_bad_whiffs": 1, "total_balls_in_play": 1, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 5, "total_contact_inside_zone": 2, "total_contact_outside_zone": 2, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 7, "total_k": 2, "total_line_drives": 1, "total_medium_hits": 1, "total_outs": 3, "total_outside_strike_zone": 10, "total_pa": 3, "total_pitches": 17, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 2, "total_swings": 6, "total_swings_inside_zone": 3, "total_swings_made_contact": 4, "total_swings_outside_zone": 3, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.333, "z_contact_rate": 0.667, "z_swing_rate": 0.429, "zone_rate": 0.412, "pitch_type": ["CH", "CU", "FF", "SL"], } pfx_metrics_career_vsRHB_combined_dict = { "avg": 0.0, "avg_break_angle": 9.1, "avg_break_length": 6.7, "avg_break_y": 24.0, "avg_extension": 6.25, "avg_hit_distance": 328.0, "avg_launch_angle": 27.0, "avg_launch_speed": 85.3, "avg_pfx_x": -0.26, "avg_pfx_z": 3.81, "avg_plate_time": 0.432, "avg_px": 0.29, "avg_pz": 2.9, "avg_speed": 88.3, "avg_spin_direction": 131.0, "avg_spin_rate": 2206.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": "R", "bb_rate": 0.0, "called_strike_rate": 0.2, "contact_rate": 1.0, "csw_rate": 0.2, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 0.0, "line_drive_rate": 1.0, "max_launch_speed": 85.3, "medium_hit_rate": 1.0, "mlb_id": 571882, "o_contact_rate": 1.0, "o_swing_rate": 0.333, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 1, "pitch_type_int": 32802, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.4, "swinging_strike_rate": 0.0, "total_at_bats": 1, "total_bad_whiffs": 0, "total_balls_in_play": 1, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 1, "total_contact_inside_zone": 1, "total_contact_outside_zone": 1, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 2, "total_k": 0, "total_line_drives": 1, "total_medium_hits": 1, "total_outs": 1, "total_outside_strike_zone": 3, "total_pa": 1, "total_pitches": 5, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 0, "total_swings": 2, "total_swings_inside_zone": 1, "total_swings_made_contact": 2, "total_swings_outside_zone": 1, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.0, "z_contact_rate": 1.0, "z_swing_rate": 0.5, "zone_rate": 0.4, "pitch_type": ["CU", "FF", "SL"], } pfx_metrics_career_vsLHB_combined_dict = { "avg": 0.0, "avg_break_angle": 9.2, "avg_break_length": 8.2, "avg_break_y": 24.0, "avg_extension": 6.3, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": -0.34, "avg_pfx_z": 1.82, "avg_plate_time": 0.446, "avg_px": 0.07, "avg_pz": 2.01, "avg_speed": 85.0, "avg_spin_direction": 119.0, "avg_spin_rate": 2093.0, "bad_whiff_rate": 0.25, "barrel_rate": 0.0, "bat_stand": "L", "bb_rate": 0.0, "called_strike_rate": 0.333, "contact_rate": 0.5, "csw_rate": 0.5, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 1.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.5, "o_swing_rate": 0.286, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 1, "pitch_type_int": 32803, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.333, "swinging_strike_rate": 0.167, "total_at_bats": 2, "total_bad_whiffs": 1, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 4, "total_contact_inside_zone": 1, "total_contact_outside_zone": 1, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 5, "total_k": 2, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 2, "total_outside_strike_zone": 7, "total_pa": 2, "total_pitches": 12, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 2, "total_swings": 4, "total_swings_inside_zone": 2, "total_swings_made_contact": 2, "total_swings_outside_zone": 2, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.5, "z_contact_rate": 0.5, "z_swing_rate": 0.4, "zone_rate": 0.417, "pitch_type": ["CH", "CU", "FF", "SL"], } pfx_metrics_career_vsALL_CU_dict = { "avg": 0.0, "avg_break_angle": 5.4, "avg_break_length": 13.2, "avg_break_y": 24.0, "avg_extension": 5.82, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": 3.04, "avg_pfx_z": -5.96, "avg_plate_time": 0.502, "avg_px": 0.23, "avg_pz": 1.59, "avg_speed": 76.2, "avg_spin_direction": 27.0, "avg_spin_rate": 2056.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": None, "bb_rate": 0.0, "called_strike_rate": 0.5, "contact_rate": 0.0, "csw_rate": 0.5, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 0.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.0, "o_swing_rate": 0.0, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.23529411764705882, "pitch_type_int": 2, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.0, "swinging_strike_rate": 0.0, "total_at_bats": 0, "total_bad_whiffs": 0, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 2, "total_contact_inside_zone": 0, "total_contact_outside_zone": 0, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 2, "total_k": 0, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 0, "total_outside_strike_zone": 2, "total_pa": 0, "total_pitches": 4, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 0, "total_swings": 0, "total_swings_inside_zone": 0, "total_swings_made_contact": 0, "total_swings_outside_zone": 0, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.0, "z_contact_rate": 0.0, "z_swing_rate": 0.0, "zone_rate": 0.5, "pitch_type": ["CU"], } pfx_metrics_career_vsRHB_CU_dict = { "avg": 0.0, "avg_break_angle": 2.4, "avg_break_length": 13.2, "avg_break_y": 24.0, "avg_extension": 5.64, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": 1.2, "avg_pfx_z": -6.97, "avg_plate_time": 0.51, "avg_px": 0.73, "avg_pz": 1.44, "avg_speed": 75.6, "avg_spin_direction": 11.0, "avg_spin_rate": 2141.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": "R", "bb_rate": 0.0, "called_strike_rate": 0.0, "contact_rate": 0.0, "csw_rate": 0.0, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 0.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.0, "o_swing_rate": 0.0, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.2, "pitch_type_int": 2, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.0, "swinging_strike_rate": 0.0, "total_at_bats": 0, "total_bad_whiffs": 0, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 0, "total_contact_inside_zone": 0, "total_contact_outside_zone": 0, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 0, "total_k": 0, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 0, "total_outside_strike_zone": 1, "total_pa": 0, "total_pitches": 1, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 0, "total_swings": 0, "total_swings_inside_zone": 0, "total_swings_made_contact": 0, "total_swings_outside_zone": 0, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.0, "z_contact_rate": 0.0, "z_swing_rate": 0.0, "zone_rate": 0.0, "pitch_type": ["CU"], } pfx_metrics_career_vsLHB_CU_dict = { "avg": 0.0, "avg_break_angle": 6.4, "avg_break_length": 13.2, "avg_break_y": 24.0, "avg_extension": 5.88, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": 3.66, "avg_pfx_z": -5.63, "avg_plate_time": 0.5, "avg_px": 0.06, "avg_pz": 1.64, "avg_speed": 76.4, "avg_spin_direction": 32.0, "avg_spin_rate": 2028.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": "L", "bb_rate": 0.0, "called_strike_rate": 0.667, "contact_rate": 0.0, "csw_rate": 0.667, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 0.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.0, "o_swing_rate": 0.0, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.25, "pitch_type_int": 2, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.0, "swinging_strike_rate": 0.0, "total_at_bats": 0, "total_bad_whiffs": 0, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 2, "total_contact_inside_zone": 0, "total_contact_outside_zone": 0, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 2, "total_k": 0, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 0, "total_outside_strike_zone": 1, "total_pa": 0, "total_pitches": 3, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 0, "total_swings": 0, "total_swings_inside_zone": 0, "total_swings_made_contact": 0, "total_swings_outside_zone": 0, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.0, "z_contact_rate": 0.0, "z_swing_rate": 0.0, "zone_rate": 0.667, "pitch_type": ["CU"], } pfx_metrics_career_vsALL_FF_dict = { "avg": 0.0, "avg_break_angle": 7.0, "avg_break_length": 3.6, "avg_break_y": 24.0, "avg_extension": 6.61, "avg_hit_distance": 328.0, "avg_launch_angle": 27.0, "avg_launch_speed": 85.3, "avg_pfx_x": -1.25, "avg_pfx_z": 8.58, "avg_plate_time": 0.398, "avg_px": 0.05, "avg_pz": 3.3, "avg_speed": 94.0, "avg_spin_direction": 186.0, "avg_spin_rate": 2150.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": None, "bb_rate": 0.0, "called_strike_rate": 0.167, "contact_rate": 1.0, "csw_rate": 0.167, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 0.0, "line_drive_rate": 1.0, "max_launch_speed": 85.3, "medium_hit_rate": 1.0, "mlb_id": 571882, "o_contact_rate": 1.0, "o_swing_rate": 0.2, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.35294117647058826, "pitch_type_int": 32, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.333, "swinging_strike_rate": 0.0, "total_at_bats": 1, "total_bad_whiffs": 0, "total_balls_in_play": 1, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 1, "total_contact_inside_zone": 1, "total_contact_outside_zone": 1, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 1, "total_k": 0, "total_line_drives": 1, "total_medium_hits": 1, "total_outs": 1, "total_outside_strike_zone": 5, "total_pa": 1, "total_pitches": 6, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 0, "total_swings": 2, "total_swings_inside_zone": 1, "total_swings_made_contact": 2, "total_swings_outside_zone": 1, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.0, "z_contact_rate": 1.0, "z_swing_rate": 1.0, "zone_rate": 0.167, "pitch_type": ["FF"], } pfx_metrics_career_vsRHB_FF_dict = { "avg": 0.0, "avg_break_angle": 11.6, "avg_break_length": 3.6, "avg_break_y": 24.0, "avg_extension": 6.58, "avg_hit_distance": 328.0, "avg_launch_angle": 27.0, "avg_launch_speed": 85.3, "avg_pfx_x": -1.92, "avg_pfx_z": 9.08, "avg_plate_time": 0.397, "avg_px": 0.05, "avg_pz": 3.45, "avg_speed": 94.6, "avg_spin_direction": 191.0, "avg_spin_rate": 2204.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": "R", "bb_rate": 0.0, "called_strike_rate": 0.0, "contact_rate": 1.0, "csw_rate": 0.0, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 0.0, "line_drive_rate": 1.0, "max_launch_speed": 85.3, "medium_hit_rate": 1.0, "mlb_id": 571882, "o_contact_rate": 1.0, "o_swing_rate": 0.5, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.6, "pitch_type_int": 32, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.667, "swinging_strike_rate": 0.0, "total_at_bats": 1, "total_bad_whiffs": 0, "total_balls_in_play": 1, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 0, "total_contact_inside_zone": 1, "total_contact_outside_zone": 1, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 1, "total_k": 0, "total_line_drives": 1, "total_medium_hits": 1, "total_outs": 1, "total_outside_strike_zone": 2, "total_pa": 1, "total_pitches": 3, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 0, "total_swings": 2, "total_swings_inside_zone": 1, "total_swings_made_contact": 2, "total_swings_outside_zone": 1, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.0, "z_contact_rate": 1.0, "z_swing_rate": 1.0, "zone_rate": 0.333, "pitch_type": ["FF"], } pfx_metrics_career_vsLHB_FF_dict = { "avg": 0.0, "avg_break_angle": 2.4, "avg_break_length": 3.6, "avg_break_y": 24.0, "avg_extension": 6.64, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": -0.58, "avg_pfx_z": 8.07, "avg_plate_time": 0.4, "avg_px": 0.05, "avg_pz": 3.16, "avg_speed": 93.4, "avg_spin_direction": 182.0, "avg_spin_rate": 2096.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": "L", "bb_rate": 0.0, "called_strike_rate": 0.333, "contact_rate": 0.0, "csw_rate": 0.333, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 0.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.0, "o_swing_rate": 0.0, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.25, "pitch_type_int": 32, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.0, "swinging_strike_rate": 0.0, "total_at_bats": 0, "total_bad_whiffs": 0, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 1, "total_contact_inside_zone": 0, "total_contact_outside_zone": 0, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 0, "total_k": 0, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 0, "total_outside_strike_zone": 3, "total_pa": 0, "total_pitches": 3, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 0, "total_swings": 0, "total_swings_inside_zone": 0, "total_swings_made_contact": 0, "total_swings_outside_zone": 0, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.0, "z_contact_rate": 0.0, "z_swing_rate": 0.0, "zone_rate": 0.0, "pitch_type": ["FF"], } pfx_metrics_career_vsALL_CH_dict = { "avg": 0.0, "avg_break_angle": 22.8, "avg_break_length": 6.4, "avg_break_y": 24.0, "avg_extension": 6.55, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": -6.38, "avg_pfx_z": 6.99, "avg_plate_time": 0.437, "avg_px": -0.2, "avg_pz": 2.37, "avg_speed": 85.8, "avg_spin_direction": 222.0, "avg_spin_rate": 1967.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": None, "bb_rate": 0.0, "called_strike_rate": 0.333, "contact_rate": 0.5, "csw_rate": 0.667, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 1.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.0, "o_swing_rate": 0.0, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.17647058823529413, "pitch_type_int": 1, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.667, "swinging_strike_rate": 0.333, "total_at_bats": 1, "total_bad_whiffs": 0, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 1, "total_contact_inside_zone": 1, "total_contact_outside_zone": 0, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 3, "total_k": 1, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 1, "total_outside_strike_zone": 0, "total_pa": 1, "total_pitches": 3, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 1, "total_swings": 2, "total_swings_inside_zone": 2, "total_swings_made_contact": 1, "total_swings_outside_zone": 0, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.5, "z_contact_rate": 0.5, "z_swing_rate": 0.667, "zone_rate": 1.0, "pitch_type": ["CH"], } pfx_metrics_career_vsLHB_CH_dict = { "avg": 0.0, "avg_break_angle": 22.8, "avg_break_length": 6.4, "avg_break_y": 24.0, "avg_extension": 6.55, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": -6.38, "avg_pfx_z": 6.99, "avg_plate_time": 0.437, "avg_px": -0.2, "avg_pz": 2.37, "avg_speed": 85.8, "avg_spin_direction": 222.0, "avg_spin_rate": 1967.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": "L", "bb_rate": 0.0, "called_strike_rate": 0.333, "contact_rate": 0.5, "csw_rate": 0.667, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 1.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.0, "o_swing_rate": 0.0, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.25, "pitch_type_int": 1, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.667, "swinging_strike_rate": 0.333, "total_at_bats": 1, "total_bad_whiffs": 0, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 1, "total_contact_inside_zone": 1, "total_contact_outside_zone": 0, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 3, "total_k": 1, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 1, "total_outside_strike_zone": 0, "total_pa": 1, "total_pitches": 3, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 1, "total_swings": 2, "total_swings_inside_zone": 2, "total_swings_made_contact": 1, "total_swings_outside_zone": 0, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.5, "z_contact_rate": 0.5, "z_swing_rate": 0.667, "zone_rate": 1.0, "pitch_type": ["CH"], } pfx_metrics_career_vsALL_SL_dict = { "avg": 0.0, "avg_break_angle": 6.0, "avg_break_length": 9.6, "avg_break_y": 24.0, "avg_extension": 6.07, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": 2.29, "avg_pfx_z": -1.92, "avg_plate_time": 0.45, "avg_px": 0.41, "avg_pz": 1.35, "avg_speed": 83.7, "avg_spin_direction": 48.0, "avg_spin_rate": 2281.0, "bad_whiff_rate": 0.5, "barrel_rate": 0.0, "bat_stand": None, "bb_rate": 0.0, "called_strike_rate": 0.25, "contact_rate": 0.5, "csw_rate": 0.5, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 1.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.5, "o_swing_rate": 0.667, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.23529411764705882, "pitch_type_int": 32768, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.5, "swinging_strike_rate": 0.25, "total_at_bats": 1, "total_bad_whiffs": 1, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 1, "total_contact_inside_zone": 0, "total_contact_outside_zone": 1, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 1, "total_k": 1, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 1, "total_outside_strike_zone": 3, "total_pa": 1, "total_pitches": 4, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 1, "total_swings": 2, "total_swings_inside_zone": 0, "total_swings_made_contact": 1, "total_swings_outside_zone": 2, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.5, "z_contact_rate": 0.0, "z_swing_rate": 0.0, "zone_rate": 0.25, "pitch_type": ["SL"], } pfx_metrics_career_vsRHB_SL_dict = { "avg": 0.0, "avg_break_angle": 8.4, "avg_break_length": 9.6, "avg_break_y": 24.0, "avg_extension": 5.88, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": 3.27, "avg_pfx_z": -1.24, "avg_plate_time": 0.46, "avg_px": 0.55, "avg_pz": 2.72, "avg_speed": 81.9, "avg_spin_direction": 70.0, "avg_spin_rate": 2277.0, "bad_whiff_rate": 0.0, "barrel_rate": 0.0, "bat_stand": "R", "bb_rate": 0.0, "called_strike_rate": 1.0, "contact_rate": 0.0, "csw_rate": 1.0, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 0.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.0, "o_swing_rate": 0.0, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.2, "pitch_type_int": 32768, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.0, "swinging_strike_rate": 0.0, "total_at_bats": 0, "total_bad_whiffs": 0, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 1, "total_contact_inside_zone": 0, "total_contact_outside_zone": 0, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 1, "total_k": 0, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 0, "total_outside_strike_zone": 0, "total_pa": 0, "total_pitches": 1, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 0, "total_swings": 0, "total_swings_inside_zone": 0, "total_swings_made_contact": 0, "total_swings_outside_zone": 0, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.0, "z_contact_rate": 0.0, "z_swing_rate": 0.0, "zone_rate": 1.0, "pitch_type": ["SL"], } pfx_metrics_career_vsLHB_SL_dict = { "avg": 0.0, "avg_break_angle": 5.2, "avg_break_length": 9.6, "avg_break_y": 24.0, "avg_extension": 6.14, "avg_hit_distance": 0.0, "avg_launch_angle": 0.0, "avg_launch_speed": 0.0, "avg_pfx_x": 1.96, "avg_pfx_z": -2.15, "avg_plate_time": 0.447, "avg_px": 0.36, "avg_pz": 0.89, "avg_speed": 84.3, "avg_spin_direction": 41.0, "avg_spin_rate": 2282.0, "bad_whiff_rate": 0.5, "barrel_rate": 0.0, "bat_stand": "L", "bb_rate": 0.0, "called_strike_rate": 0.0, "contact_rate": 0.5, "csw_rate": 0.333, "fly_ball_rate": 0.0, "ground_ball_rate": 0.0, "hard_hit_rate": 0.0, "hr_per_fb": 0.0, "iso": 0.0, "k_rate": 1.0, "line_drive_rate": 0.0, "max_launch_speed": 0.0, "medium_hit_rate": 0.0, "mlb_id": 571882, "o_contact_rate": 0.5, "o_swing_rate": 0.667, "obp": 0.0, "ops": 0.0, "p_throws": "R", "percent": 0.25, "pitch_type_int": 32768, "popup_rate": 0.0, "slg": 0.0, "soft_hit_rate": 0.0, "swing_rate": 0.667, "swinging_strike_rate": 0.333, "total_at_bats": 1, "total_bad_whiffs": 1, "total_balls_in_play": 0, "total_barrels": 0, "total_bb": 0, "total_called_strikes": 0, "total_contact_inside_zone": 0, "total_contact_outside_zone": 1, "total_doubles": 0, "total_errors": 0, "total_fly_balls": 0, "total_ground_balls": 0, "total_hard_hits": 0, "total_hbp": 0, "total_hits": 0, "total_homeruns": 0, "total_ibb": 0, "total_inside_strike_zone": 0, "total_k": 1, "total_line_drives": 0, "total_medium_hits": 0, "total_outs": 1, "total_outside_strike_zone": 3, "total_pa": 1, "total_pitches": 3, "total_popups": 0, "total_sac_fly": 0, "total_sac_hit": 0, "total_singles": 0, "total_soft_hits": 0, "total_swinging_strikes": 1, "total_swings": 2, "total_swings_inside_zone": 0, "total_swings_made_contact": 1, "total_swings_outside_zone": 2, "total_triples": 0, "triple_slash": ".000/.000/.000 (.000)", "whiff_rate": 0.5, "z_contact_rate": 0.0, "z_swing_rate": 0.0, "zone_rate": 0.0, "pitch_type": ["SL"], } pitchfx_metrics_set_vsALL_for_year = { "pitch_type": ["CH", "CU", "FF", "SL"], "pitch_type_int": 32803, "total_pitches": 17, "total_pfx_removed": 0, "metrics_combined": pfx_metrics_career_vsALL_combined_dict, "metrics_by_pitch_type": { "FF": pfx_metrics_career_vsALL_FF_dict, "CU": pfx_metrics_career_vsALL_CU_dict, "SL": pfx_metrics_career_vsALL_SL_dict, "CH": pfx_metrics_career_vsALL_CH_dict, }, } pitchfx_metrics_set_vsRHB_for_year = { "pitch_type": ["CU", "FF", "SL"], "pitch_type_int": 32802, "total_pitches": 5, "total_pfx_removed": 0, "metrics_combined": pfx_metrics_career_vsRHB_combined_dict, "metrics_by_pitch_type": { "FF": pfx_metrics_career_vsRHB_FF_dict, "CU": pfx_metrics_career_vsRHB_CU_dict, "SL": pfx_metrics_career_vsRHB_SL_dict, }, } pitchfx_metrics_set_vsLHB_for_year = { "pitch_type": ["CH", "CU", "FF", "SL"], "pitch_type_int": 32803, "total_pitches": 12, "total_pfx_removed": 0, "metrics_combined": pfx_metrics_career_vsLHB_combined_dict, "metrics_by_pitch_type": { "FF": pfx_metrics_career_vsLHB_FF_dict, "CU": pfx_metrics_career_vsLHB_CU_dict, "SL": pfx_metrics_career_vsLHB_SL_dict, "CH": pfx_metrics_career_vsLHB_CH_dict, }, } career_percentiles_vsALL_dict = [ { "pitch_type": "FF", "avg_speed": (94.0, 54.0), "ops": (0.0, 100.0), "zone_rate": (0.167, 2.1), "o_swing_rate": (0.2, 15.4), "whiff_rate": (0.0, 1.3), "bad_whiff_rate": (0.0, 100.0), "contact_rate": (1.0, 1.4), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (85.3, 100.0), }, { "pitch_type": "CU", "avg_speed": (76.2, 22.2), "ops": (0.0, 100.0), "zone_rate": (0.5, 99.4), "o_swing_rate": (0.0, 1.0), "whiff_rate": (0.0, 1.4), "bad_whiff_rate": (0.0, 100.0), "contact_rate": (0.0, 100.0), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (0.0, 100.0), }, { "pitch_type": "SL", "avg_speed": (83.7, 31.1), "ops": (0.0, 100.0), "zone_rate": (0.25, 21.3), "o_swing_rate": (0.667, 100.0), "whiff_rate": (0.5, 93.1), "bad_whiff_rate": (0.5, 100.0), "contact_rate": (0.5, 93.3), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (0.0, 100.0), }, { "pitch_type": "CH", "avg_speed": (85.8, 53.1), "ops": (0.0, 100.0), "zone_rate": (1.0, 100.0), "o_swing_rate": (0.0, 1.4), "whiff_rate": (0.5, 98.3), "bad_whiff_rate": (0.0, 100.0), "contact_rate": (0.5, 98.2), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (0.0, 100.0), }, ] career_percentiles_vsRHB_dict = [ { "pitch_type": "FF", "avg_speed": (94.6, 62.1), "ops": (0.0, 100.0), "zone_rate": (0.333, 23.2), "o_swing_rate": (0.5, 99.0), "whiff_rate": (0.0, 1.3), "bad_whiff_rate": (0.0, 100.0), "contact_rate": (1.0, 1.4), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (85.3, 100.0), }, { "pitch_type": "CU", "avg_speed": (75.6, 16.2), "ops": (0.0, 100.0), "zone_rate": (0.0, 1.1), "o_swing_rate": (0.0, 1.0), "whiff_rate": (0.0, 1.4), "bad_whiff_rate": (0.0, 100.0), "contact_rate": (0.0, 100.0), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (0.0, 100.0), }, { "pitch_type": "SL", "avg_speed": (81.9, 14.1), "ops": (0.0, 100.0), "zone_rate": (1.0, 100.0), "o_swing_rate": (0.0, 1.3), "whiff_rate": (0.0, 1.0), "bad_whiff_rate": (0.0, 100.0), "contact_rate": (0.0, 100.0), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (0.0, 100.0), }, ] career_percentiles_vsLHB_dict = [ { "pitch_type": "CH", "avg_speed": (85.8, 53.1), "ops": (0.0, 100.0), "zone_rate": (1.0, 100.0), "o_swing_rate": (0.0, 1.4), "whiff_rate": (0.5, 98.3), "bad_whiff_rate": (0.0, 100.0), "contact_rate": (0.5, 98.2), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (0.0, 100.0), }, { "pitch_type": "CU", "avg_speed": (76.4, 23.2), "ops": (0.0, 100.0), "zone_rate": (0.667, 100.0), "o_swing_rate": (0.0, 1.0), "whiff_rate": (0.0, 1.4), "bad_whiff_rate": (0.0, 100.0), "contact_rate": (0.0, 100.0), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (0.0, 100.0), }, { "pitch_type": "FF", "avg_speed": (93.4, 45.2), "ops": (0.0, 100.0), "zone_rate": (0.0, 1.3), "o_swing_rate": (0.0, 1.0), "whiff_rate": (0.0, 1.3), "bad_whiff_rate": (0.0, 100.0), "contact_rate": (0.0, 100.0), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (0.0, 100.0), }, { "pitch_type": "SL", "avg_speed": (84.3, 38.0), "ops": (0.0, 100.0), "zone_rate": (0.0, 1.3), "o_swing_rate": (0.667, 100.0), "whiff_rate": (0.5, 93.1), "bad_whiff_rate": (0.5, 100.0), "contact_rate": (0.5, 93.3), "ground_ball_rate": (0.0, 100.0), "barrel_rate": (0.0, 100.0), "avg_exit_velocity": (0.0, 100.0), }, ] player_data = PlayerData(vig_app, 571882) assert ( player_data.pfx_pitching_metrics_vs_all_for_career.metrics_combined.as_dict() == pfx_metrics_career_vsALL_combined_dict ) assert ( player_data.pfx_pitching_metrics_vs_all_for_career.metrics_by_pitch_type["CH"].as_dict() == pfx_metrics_career_vsALL_CH_dict ) assert ( player_data.pfx_pitching_metrics_vs_all_for_career.metrics_by_pitch_type["CU"].as_dict() == pfx_metrics_career_vsALL_CU_dict ) assert ( player_data.pfx_pitching_metrics_vs_all_for_career.metrics_by_pitch_type["FF"].as_dict() == pfx_metrics_career_vsALL_FF_dict ) assert ( player_data.pfx_pitching_metrics_vs_all_for_career.metrics_by_pitch_type["SL"].as_dict() == pfx_metrics_career_vsALL_SL_dict ) assert player_data.percentiles_for_pitch_types_for_career == career_percentiles_vsALL_dict assert ( player_data.pfx_pitching_metrics_vs_rhb_for_career.metrics_combined.as_dict() == pfx_metrics_career_vsRHB_combined_dict ) assert ( player_data.pfx_pitching_metrics_vs_rhb_for_career.metrics_by_pitch_type["CU"].as_dict() == pfx_metrics_career_vsRHB_CU_dict ) assert ( player_data.pfx_pitching_metrics_vs_rhb_for_career.metrics_by_pitch_type["FF"].as_dict() == pfx_metrics_career_vsRHB_FF_dict ) assert ( player_data.pfx_pitching_metrics_vs_rhb_for_career.metrics_by_pitch_type["SL"].as_dict() == pfx_metrics_career_vsRHB_SL_dict ) assert player_data.percentiles_for_pitch_types_vs_rhb_for_career == career_percentiles_vsRHB_dict assert ( player_data.pfx_pitching_metrics_vs_lhb_for_career.metrics_combined.as_dict() == pfx_metrics_career_vsLHB_combined_dict ) assert ( player_data.pfx_pitching_metrics_vs_lhb_for_career.metrics_by_pitch_type["CH"].as_dict() == pfx_metrics_career_vsLHB_CH_dict ) assert ( player_data.pfx_pitching_metrics_vs_lhb_for_career.metrics_by_pitch_type["CU"].as_dict() == pfx_metrics_career_vsLHB_CU_dict ) assert ( player_data.pfx_pitching_metrics_vs_lhb_for_career.metrics_by_pitch_type["FF"].as_dict() == pfx_metrics_career_vsLHB_FF_dict ) assert ( player_data.pfx_pitching_metrics_vs_lhb_for_career.metrics_by_pitch_type["SL"].as_dict() == pfx_metrics_career_vsLHB_SL_dict ) assert player_data.percentiles_for_pitch_types_vs_lhb_for_career == career_percentiles_vsLHB_dict assert player_data.pfx_pitching_metrics_vs_all_by_year[2019].as_dict() == pitchfx_metrics_set_vsALL_for_year assert player_data.percentiles_for_pitch_types_by_year[2019] == career_percentiles_vsALL_dict assert player_data.pfx_pitching_metrics_vs_rhb_by_year[2019].as_dict() == pitchfx_metrics_set_vsRHB_for_year assert player_data.percentiles_for_pitch_types_vs_rhb_by_year[2019] == career_percentiles_vsRHB_dict assert player_data.pfx_pitching_metrics_vs_lhb_by_year[2019].as_dict() == pitchfx_metrics_set_vsLHB_for_year assert player_data.percentiles_for_pitch_types_vs_lhb_by_year[2019] == career_percentiles_vsLHB_dict assert player_data.get_pfx_pitching_metrics_vs_all_for_season(2019).as_dict() == pitchfx_metrics_set_vsALL_for_year assert player_data.get_pfx_pitching_metrics_vs_rhb_for_season(2019).as_dict() == pitchfx_metrics_set_vsRHB_for_year assert player_data.get_pfx_pitching_metrics_vs_lhb_for_season(2019).as_dict() == pitchfx_metrics_set_vsLHB_for_year assert ( player_data.get_pfx_pitching_metrics_vs_all_for_game(BBREF_GAME_ID).as_dict() == pitchfx_metrics_set_vsALL_for_year ) assert ( player_data.get_pfx_pitching_metrics_vs_rhb_for_game(BBREF_GAME_ID).as_dict() == pitchfx_metrics_set_vsRHB_for_year ) assert ( player_data.get_pfx_pitching_metrics_vs_lhb_for_game(BBREF_GAME_ID).as_dict() == pitchfx_metrics_set_vsLHB_for_year ) pfx_career_data = player_data.get_all_pfx_career_data() assert pfx_career_data["all"]["metrics"].as_dict() == pitchfx_metrics_set_vsALL_for_year assert pfx_career_data["all"]["percentiles"] == career_percentiles_vsALL_dict assert pfx_career_data["rhb"]["metrics"].as_dict() == pitchfx_metrics_set_vsRHB_for_year assert pfx_career_data["rhb"]["percentiles"] == career_percentiles_vsRHB_dict assert pfx_career_data["lhb"]["metrics"].as_dict() == pitchfx_metrics_set_vsLHB_for_year assert pfx_career_data["lhb"]["percentiles"] == career_percentiles_vsLHB_dict pfx_yearly_data = player_data.get_all_pfx_yearly_data() assert pfx_yearly_data["all"]["metrics"][2019].as_dict() == pitchfx_metrics_set_vsALL_for_year assert pfx_yearly_data["all"]["percentiles"][2019] == career_percentiles_vsALL_dict assert pfx_yearly_data["rhb"]["metrics"][2019].as_dict() == pitchfx_metrics_set_vsRHB_for_year assert pfx_yearly_data["rhb"]["percentiles"][2019] == career_percentiles_vsRHB_dict assert pfx_yearly_data["lhb"]["metrics"][2019].as_dict() == pitchfx_metrics_set_vsLHB_for_year assert pfx_yearly_data["lhb"]["percentiles"][2019] == career_percentiles_vsLHB_dict def test_pitchfx_batting_metrics_career(vig_app): player_data = PlayerData(vig_app, 600303) assert player_data.pfx_batting_metrics_vs_all_for_career assert player_data.pfx_batting_metrics_vs_rhp_for_career assert player_data.pfx_batting_metrics_vs_lhp_for_career assert player_data.pfx_batting_metrics_vs_rhp_as_lhb_for_career assert player_data.pfx_batting_metrics_vs_lhp_as_lhb_for_career assert player_data.pfx_batting_metrics_by_year assert player_data.get_pfx_batting_metrics_vs_all_for_game(BBREF_GAME_ID) assert player_data.get_pfx_batting_metrics_vs_rhp_for_game(BBREF_GAME_ID) assert player_data.get_pfx_batting_metrics_vs_lhp_for_game(BBREF_GAME_ID) assert player_data.get_pfx_batting_metrics_vs_rhp_as_lhb_for_game(BBREF_GAME_ID) assert player_data.get_pfx_batting_metrics_vs_lhp_as_lhb_for_game(BBREF_GAME_ID) assert player_data.get_all_pfx_batting_career_data() assert player_data.get_all_pfx_batting_yearly_data() player_data = PlayerData(vig_app, 545361) assert player_data.pfx_batting_metrics_vs_rhp_as_rhb_for_career assert player_data.pfx_batting_metrics_vs_lhp_as_rhb_for_career assert player_data.get_pfx_batting_metrics_vs_rhp_as_rhb_for_game(BBREF_GAME_ID) assert player_data.get_pfx_batting_metrics_vs_lhp_as_rhb_for_game(BBREF_GAME_ID)
31.188309
119
0.53383
10,164
74,696
3.514364
0.034829
0.026484
0.045689
0.009406
0.934882
0.921137
0.902968
0.875448
0.855431
0.820437
0
0.082389
0.316068
74,696
2,394
120
31.201337
0.616811
0.002704
0
0.81442
0
0
0.364219
0.061632
0
0
0
0
0.030717
1
0.001706
false
0
0.00128
0
0.002986
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
041ab59dafa0ddd4f00e2e49c73e0f7eedbe61ca
117
py
Python
test/declarative/__init__.py
thatch/BitSwanPump
98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f
[ "BSD-3-Clause" ]
null
null
null
test/declarative/__init__.py
thatch/BitSwanPump
98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f
[ "BSD-3-Clause" ]
null
null
null
test/declarative/__init__.py
thatch/BitSwanPump
98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f
[ "BSD-3-Clause" ]
null
null
null
from .test_declarative_datetime import * from .test_declarative_config import * from .test_declarative_join import *
29.25
40
0.846154
15
117
6.2
0.466667
0.258065
0.612903
0.537634
0
0
0
0
0
0
0
0
0.102564
117
3
41
39
0.885714
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
04238d85b14373a0224f48564481d093815ece09
154
py
Python
algorithms/refinement/parameterisation/__init__.py
toastisme/dials
6bc8ababc33bfe334513677f8adb65c0e90003f3
[ "BSD-3-Clause" ]
58
2015-10-15T09:28:20.000Z
2022-03-28T20:09:38.000Z
algorithms/refinement/parameterisation/__init__.py
toastisme/dials
6bc8ababc33bfe334513677f8adb65c0e90003f3
[ "BSD-3-Clause" ]
1,741
2015-11-24T08:17:02.000Z
2022-03-31T15:46:42.000Z
algorithms/refinement/parameterisation/__init__.py
toastisme/dials
6bc8ababc33bfe334513677f8adb65c0e90003f3
[ "BSD-3-Clause" ]
45
2015-10-14T13:44:16.000Z
2022-03-22T14:45:56.000Z
from .configure import build_prediction_parameterisation, phil_scope, phil_str __all__ = ["build_prediction_parameterisation", "phil_scope", "phil_str"]
38.5
78
0.831169
18
154
6.444444
0.555556
0.258621
0.534483
0.603448
0.810345
0.810345
0.810345
0
0
0
0
0
0.077922
154
3
79
51.333333
0.816901
0
0
0
0
0
0.331169
0.214286
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
9
04561c617f4fcdaaef29046bc78b08467400aa63
105
py
Python
CodeHS/Basic Python and Console Interaction/OperatorPrecedence.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
2
2021-08-10T18:16:08.000Z
2021-09-26T19:49:26.000Z
CodeHS/Basic Python and Console Interaction/OperatorPrecedence.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
CodeHS/Basic Python and Console Interaction/OperatorPrecedence.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
print(-5 + 4 * 2 % 3 - 1) print(-5 + 4 * 2 % (3 - 1)) x = 3 y = 7 z = x * - (y - 1) % 4 print(z)
13.125
28
0.333333
23
105
1.521739
0.434783
0.342857
0.4
0.457143
0.571429
0.571429
0
0
0
0
0
0.225806
0.409524
105
8
29
13.125
0.33871
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
1
null
1
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
9
9bd989cbe8c55026e97a5c99fb059fc6553f151e
128
py
Python
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_0/_pkg0_0_0_0_0/_mod0_0_0_0_0_2.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_0/_pkg0_0_0_0_0/_mod0_0_0_0_0_2.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_0/_pkg0_0_0_0_0/_mod0_0_0_0_0_2.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
name0_0_0_0_0_2_0 = None name0_0_0_0_0_2_1 = None name0_0_0_0_0_2_2 = None name0_0_0_0_0_2_3 = None name0_0_0_0_0_2_4 = None
14.222222
24
0.820313
40
128
1.875
0.175
0.4
0.4
0.533333
0.88
0.88
0.746667
0
0
0
0
0.318182
0.140625
128
9
25
14.222222
0.363636
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
1
null
1
1
1
1
1
1
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
9bea4c5d5eb5d7eefe41ac3b491ac2cc4c8b1dd3
38,686
py
Python
src/main/thrift/gen-py/ThriftServer/ThriftServer.py
huaxuechensu/DataXServer
8e75f622eab9e33f438fd64ce6aa489cbcdd1f12
[ "Apache-2.0" ]
1
2018-07-17T08:33:30.000Z
2018-07-17T08:33:30.000Z
src/main/thrift/gen-py/ThriftServer/ThriftServer.py
huaxuechensu/DataXServer
8e75f622eab9e33f438fd64ce6aa489cbcdd1f12
[ "Apache-2.0" ]
null
null
null
src/main/thrift/gen-py/ThriftServer/ThriftServer.py
huaxuechensu/DataXServer
8e75f622eab9e33f438fd64ce6aa489cbcdd1f12
[ "Apache-2.0" ]
null
null
null
# # Autogenerated by Thrift Compiler (0.10.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException import sys import logging from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport class Iface(object): def submitJob(self, jobConfPath): """ Parameters: - jobConfPath """ pass def submitJobWithParams(self, jobConfPath, params): """ Parameters: - jobConfPath - params """ pass def getJobStatus(self, jobId): """ Parameters: - jobId """ pass def cancelJob(self, jobId): """ Parameters: - jobId """ pass def getJobResult(self, jobId): """ Parameters: - jobId """ pass def getJobCost(self, jobId): """ Parameters: - jobId """ pass class Client(Iface): def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot if oprot is not None: self._oprot = oprot self._seqid = 0 def submitJob(self, jobConfPath): """ Parameters: - jobConfPath """ self.send_submitJob(jobConfPath) return self.recv_submitJob() def send_submitJob(self, jobConfPath): self._oprot.writeMessageBegin('submitJob', TMessageType.CALL, self._seqid) args = submitJob_args() args.jobConfPath = jobConfPath args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_submitJob(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = submitJob_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "submitJob failed: unknown result") def submitJobWithParams(self, jobConfPath, params): """ Parameters: - jobConfPath - params """ self.send_submitJobWithParams(jobConfPath, params) return self.recv_submitJobWithParams() def send_submitJobWithParams(self, jobConfPath, params): self._oprot.writeMessageBegin('submitJobWithParams', TMessageType.CALL, self._seqid) args = submitJobWithParams_args() args.jobConfPath = jobConfPath args.params = params args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_submitJobWithParams(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = submitJobWithParams_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "submitJobWithParams failed: unknown result") def getJobStatus(self, jobId): """ Parameters: - jobId """ self.send_getJobStatus(jobId) return self.recv_getJobStatus() def send_getJobStatus(self, jobId): self._oprot.writeMessageBegin('getJobStatus', TMessageType.CALL, self._seqid) args = getJobStatus_args() args.jobId = jobId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getJobStatus(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getJobStatus_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getJobStatus failed: unknown result") def cancelJob(self, jobId): """ Parameters: - jobId """ self.send_cancelJob(jobId) return self.recv_cancelJob() def send_cancelJob(self, jobId): self._oprot.writeMessageBegin('cancelJob', TMessageType.CALL, self._seqid) args = cancelJob_args() args.jobId = jobId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_cancelJob(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = cancelJob_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "cancelJob failed: unknown result") def getJobResult(self, jobId): """ Parameters: - jobId """ self.send_getJobResult(jobId) return self.recv_getJobResult() def send_getJobResult(self, jobId): self._oprot.writeMessageBegin('getJobResult', TMessageType.CALL, self._seqid) args = getJobResult_args() args.jobId = jobId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getJobResult(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getJobResult_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getJobResult failed: unknown result") def getJobCost(self, jobId): """ Parameters: - jobId """ self.send_getJobCost(jobId) return self.recv_getJobCost() def send_getJobCost(self, jobId): self._oprot.writeMessageBegin('getJobCost', TMessageType.CALL, self._seqid) args = getJobCost_args() args.jobId = jobId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getJobCost(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getJobCost_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getJobCost failed: unknown result") class Processor(Iface, TProcessor): def __init__(self, handler): self._handler = handler self._processMap = {} self._processMap["submitJob"] = Processor.process_submitJob self._processMap["submitJobWithParams"] = Processor.process_submitJobWithParams self._processMap["getJobStatus"] = Processor.process_getJobStatus self._processMap["cancelJob"] = Processor.process_cancelJob self._processMap["getJobResult"] = Processor.process_getJobResult self._processMap["getJobCost"] = Processor.process_getJobCost def process(self, iprot, oprot): (name, type, seqid) = iprot.readMessageBegin() if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() return else: self._processMap[name](self, seqid, iprot, oprot) return True def process_submitJob(self, seqid, iprot, oprot): args = submitJob_args() args.read(iprot) iprot.readMessageEnd() result = submitJob_result() try: result.success = self._handler.submitJob(args.jobConfPath) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("submitJob", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_submitJobWithParams(self, seqid, iprot, oprot): args = submitJobWithParams_args() args.read(iprot) iprot.readMessageEnd() result = submitJobWithParams_result() try: result.success = self._handler.submitJobWithParams(args.jobConfPath, args.params) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("submitJobWithParams", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getJobStatus(self, seqid, iprot, oprot): args = getJobStatus_args() args.read(iprot) iprot.readMessageEnd() result = getJobStatus_result() try: result.success = self._handler.getJobStatus(args.jobId) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getJobStatus", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_cancelJob(self, seqid, iprot, oprot): args = cancelJob_args() args.read(iprot) iprot.readMessageEnd() result = cancelJob_result() try: result.success = self._handler.cancelJob(args.jobId) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("cancelJob", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getJobResult(self, seqid, iprot, oprot): args = getJobResult_args() args.read(iprot) iprot.readMessageEnd() result = getJobResult_result() try: result.success = self._handler.getJobResult(args.jobId) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getJobResult", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getJobCost(self, seqid, iprot, oprot): args = getJobCost_args() args.read(iprot) iprot.readMessageEnd() result = getJobCost_result() try: result.success = self._handler.getJobCost(args.jobId) msg_type = TMessageType.REPLY except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): raise except Exception as ex: msg_type = TMessageType.EXCEPTION logging.exception(ex) result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getJobCost", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() # HELPER FUNCTIONS AND STRUCTURES class submitJob_args(object): """ Attributes: - jobConfPath """ thrift_spec = ( None, # 0 (1, TType.STRING, 'jobConfPath', 'UTF8', None, ), # 1 ) def __init__(self, jobConfPath=None,): self.jobConfPath = jobConfPath def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.jobConfPath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('submitJob_args') if self.jobConfPath is not None: oprot.writeFieldBegin('jobConfPath', TType.STRING, 1) oprot.writeString(self.jobConfPath.encode('utf-8') if sys.version_info[0] == 2 else self.jobConfPath) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class submitJob_result(object): """ Attributes: - success """ thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('submitJob_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class submitJobWithParams_args(object): """ Attributes: - jobConfPath - params """ thrift_spec = ( None, # 0 (1, TType.STRING, 'jobConfPath', 'UTF8', None, ), # 1 (2, TType.MAP, 'params', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 ) def __init__(self, jobConfPath=None, params=None,): self.jobConfPath = jobConfPath self.params = params def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.jobConfPath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.MAP: self.params = {} (_ktype1, _vtype2, _size0) = iprot.readMapBegin() for _i4 in range(_size0): _key5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val6 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.params[_key5] = _val6 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('submitJobWithParams_args') if self.jobConfPath is not None: oprot.writeFieldBegin('jobConfPath', TType.STRING, 1) oprot.writeString(self.jobConfPath.encode('utf-8') if sys.version_info[0] == 2 else self.jobConfPath) oprot.writeFieldEnd() if self.params is not None: oprot.writeFieldBegin('params', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.params)) for kiter7, viter8 in self.params.items(): oprot.writeString(kiter7.encode('utf-8') if sys.version_info[0] == 2 else kiter7) oprot.writeString(viter8.encode('utf-8') if sys.version_info[0] == 2 else viter8) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class submitJobWithParams_result(object): """ Attributes: - success """ thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('submitJobWithParams_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class getJobStatus_args(object): """ Attributes: - jobId """ thrift_spec = ( None, # 0 (1, TType.STRING, 'jobId', 'UTF8', None, ), # 1 ) def __init__(self, jobId=None,): self.jobId = jobId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.jobId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getJobStatus_args') if self.jobId is not None: oprot.writeFieldBegin('jobId', TType.STRING, 1) oprot.writeString(self.jobId.encode('utf-8') if sys.version_info[0] == 2 else self.jobId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class getJobStatus_result(object): """ Attributes: - success """ thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getJobStatus_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class cancelJob_args(object): """ Attributes: - jobId """ thrift_spec = ( None, # 0 (1, TType.STRING, 'jobId', 'UTF8', None, ), # 1 ) def __init__(self, jobId=None,): self.jobId = jobId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.jobId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('cancelJob_args') if self.jobId is not None: oprot.writeFieldBegin('jobId', TType.STRING, 1) oprot.writeString(self.jobId.encode('utf-8') if sys.version_info[0] == 2 else self.jobId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class cancelJob_result(object): """ Attributes: - success """ thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('cancelJob_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class getJobResult_args(object): """ Attributes: - jobId """ thrift_spec = ( None, # 0 (1, TType.STRING, 'jobId', 'UTF8', None, ), # 1 ) def __init__(self, jobId=None,): self.jobId = jobId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.jobId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getJobResult_args') if self.jobId is not None: oprot.writeFieldBegin('jobId', TType.STRING, 1) oprot.writeString(self.jobId.encode('utf-8') if sys.version_info[0] == 2 else self.jobId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class getJobResult_result(object): """ Attributes: - success """ thrift_spec = ( (0, TType.STRUCT, 'success', (TaskResult, TaskResult.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = TaskResult() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getJobResult_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class getJobCost_args(object): """ Attributes: - jobId """ thrift_spec = ( None, # 0 (1, TType.STRING, 'jobId', 'UTF8', None, ), # 1 ) def __init__(self, jobId=None,): self.jobId = jobId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.jobId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getJobCost_args') if self.jobId is not None: oprot.writeFieldBegin('jobId', TType.STRING, 1) oprot.writeString(self.jobId.encode('utf-8') if sys.version_info[0] == 2 else self.jobId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class getJobCost_result(object): """ Attributes: - success """ thrift_spec = ( (0, TType.STRUCT, 'success', (TaskCost, TaskCost.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = TaskCost() self.success.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getJobCost_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other)
33.994728
134
0.591532
4,014
38,686
5.465869
0.044345
0.015497
0.027894
0.02051
0.852917
0.826026
0.796354
0.782817
0.774385
0.774385
0
0.005741
0.302099
38,686
1,137
135
34.024626
0.806882
0.020136
0
0.824541
1
0
0.032984
0.001342
0
0
0
0
0
1
0.134174
false
0.006881
0.008028
0.041284
0.271789
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
9bef3779870a70057f41407d7e66be5b25dc877d
41,406
py
Python
migrations/versions/901439908b15_.py
Anioko/reusable
de6480bc23fb8cfff474985128be91f4dd391be6
[ "MIT" ]
null
null
null
migrations/versions/901439908b15_.py
Anioko/reusable
de6480bc23fb8cfff474985128be91f4dd391be6
[ "MIT" ]
null
null
null
migrations/versions/901439908b15_.py
Anioko/reusable
de6480bc23fb8cfff474985128be91f4dd391be6
[ "MIT" ]
null
null
null
"""empty message Revision ID: 901439908b15 Revises: Create Date: 2020-07-30 10:49:53.391294 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '901439908b15' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('blog_categories', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('name', sa.String(), nullable=False), sa.Column('order', sa.Integer(), nullable=True), sa.Column('is_featured', sa.Boolean(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('blog_news_letters', sa.Column('id', sa.Integer(), nullable=False), sa.Column('email', sa.String(length=64), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('email') ) op.create_table('blog_tags', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('name', sa.String(), nullable=False), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('editableHTML', sa.Column('id', sa.Integer(), nullable=False), sa.Column('editor_name', sa.String(length=100), nullable=True), sa.Column('value', sa.Text(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('editor_name') ) op.create_table('images', sa.Column('id', sa.Integer(), nullable=False), sa.Column('image_filename', sa.String(), nullable=True), sa.Column('image_url', sa.String(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('landingimages', sa.Column('id', sa.Integer(), nullable=False), sa.Column('image', sa.String(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('landingsettings', sa.Column('id', sa.Integer(), nullable=False), sa.Column('site_name', sa.String(length=128), nullable=True), sa.Column('title', sa.String(length=128), nullable=True), sa.Column('description', sa.String(length=180), nullable=True), sa.Column('twitter_name', sa.String(length=25), nullable=True), sa.Column('facebook_name', sa.String(length=25), nullable=True), sa.Column('instagram_name', sa.String(length=25), nullable=True), sa.Column('linkedin_name', sa.String(length=25), nullable=True), sa.Column('tiktok_name', sa.String(length=25), nullable=True), sa.Column('snap_chat_name', sa.String(length=25), nullable=True), sa.Column('youtube', sa.String(length=25), nullable=True), sa.Column('blog', sa.String(length=25), nullable=True), sa.Column('about', sa.String(length=25), nullable=True), sa.Column('contact', sa.String(length=25), nullable=True), sa.Column('faq', sa.String(length=25), nullable=True), sa.Column('featured_title_one', sa.String(length=90), nullable=True), sa.Column('featured_title_one_text', sa.String(length=180), nullable=True), sa.Column('featured_title_one_icon', sa.String(length=25), nullable=True), sa.Column('featured_title_two', sa.String(length=90), nullable=True), sa.Column('featured_title_two_text', sa.String(length=180), nullable=True), sa.Column('featured_title_two_icon', sa.String(length=25), nullable=True), sa.Column('featured_title_three', sa.String(length=90), nullable=True), sa.Column('featured_title_three_text', sa.String(length=180), nullable=True), sa.Column('featured_title_three_icon', sa.String(length=25), nullable=True), sa.Column('google_analytics_id', sa.String(length=25), nullable=True), sa.Column('other_tracking_analytics_one', sa.Text(), nullable=True), sa.Column('other_tracking_analytics_two', sa.Text(), nullable=True), sa.Column('other_tracking_analytics_three', sa.Text(), nullable=True), sa.Column('other_tracking_analytics_four', sa.Text(), nullable=True), sa.Column('block_content_one', sa.Text(), nullable=True), sa.Column('html_code_one', sa.Text(), nullable=True), sa.Column('html_code_two', sa.Text(), nullable=True), sa.Column('html_code_three', sa.Text(), nullable=True), sa.Column('html_code_four', sa.Text(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('about'), sa.UniqueConstraint('blog'), sa.UniqueConstraint('contact'), sa.UniqueConstraint('description'), sa.UniqueConstraint('facebook_name'), sa.UniqueConstraint('faq'), sa.UniqueConstraint('featured_title_one'), sa.UniqueConstraint('featured_title_one_icon'), sa.UniqueConstraint('featured_title_one_text'), sa.UniqueConstraint('featured_title_three'), sa.UniqueConstraint('featured_title_three_icon'), sa.UniqueConstraint('featured_title_three_text'), sa.UniqueConstraint('featured_title_two'), sa.UniqueConstraint('featured_title_two_icon'), sa.UniqueConstraint('featured_title_two_text'), sa.UniqueConstraint('google_analytics_id'), sa.UniqueConstraint('instagram_name'), sa.UniqueConstraint('linkedin_name'), sa.UniqueConstraint('site_name'), sa.UniqueConstraint('snap_chat_name'), sa.UniqueConstraint('tiktok_name'), sa.UniqueConstraint('title'), sa.UniqueConstraint('twitter_name'), sa.UniqueConstraint('youtube') ) op.create_table('marketplace_categories', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('parent_id', sa.Integer(), nullable=True), sa.Column('name', sa.String(), nullable=False), sa.Column('image', sa.String(), nullable=False), sa.Column('order', sa.Integer(), nullable=True), sa.Column('is_featured', sa.Boolean(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['parent_id'], ['marketplace_categories.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_currency', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('name', sa.String(), nullable=False), sa.Column('symbol', sa.String(), nullable=True), sa.Column('default', sa.Boolean(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_settings', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('name', sa.String(), nullable=True), sa.Column('display_name', sa.String(), nullable=True), sa.Column('value', sa.String(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('newslinks', sa.Column('id', sa.Integer(), nullable=False), sa.Column('news_site_one', sa.String(length=25), nullable=True), sa.Column('news_site_two', sa.String(length=25), nullable=True), sa.Column('news_site_three', sa.String(length=25), nullable=True), sa.Column('news_site_four', sa.String(length=25), nullable=True), sa.Column('news_site_five', sa.String(length=25), nullable=True), sa.Column('news_url_one', sa.String(length=25), nullable=True), sa.Column('news_url_two', sa.String(length=25), nullable=True), sa.Column('news_url_three', sa.String(length=25), nullable=True), sa.Column('news_url_four', sa.String(length=25), nullable=True), sa.Column('brand_url_five', sa.String(length=25), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('brand_url_five'), sa.UniqueConstraint('news_site_five'), sa.UniqueConstraint('news_site_four'), sa.UniqueConstraint('news_site_one'), sa.UniqueConstraint('news_site_three'), sa.UniqueConstraint('news_site_two'), sa.UniqueConstraint('news_url_four'), sa.UniqueConstraint('news_url_one'), sa.UniqueConstraint('news_url_three'), sa.UniqueConstraint('news_url_two') ) op.create_table('ourbrands', sa.Column('id', sa.Integer(), nullable=False), sa.Column('brand_name_one', sa.String(length=25), nullable=True), sa.Column('brand_name_two', sa.String(length=25), nullable=True), sa.Column('brand_name_three', sa.String(length=25), nullable=True), sa.Column('brand_name_four', sa.String(length=25), nullable=True), sa.Column('brand_name_five', sa.String(length=25), nullable=True), sa.Column('brand_url_one', sa.String(length=25), nullable=True), sa.Column('brand_url_two', sa.String(length=25), nullable=True), sa.Column('brand_url_three', sa.String(length=25), nullable=True), sa.Column('brand_url_four', sa.String(length=25), nullable=True), sa.Column('brand_url_five', sa.String(length=25), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('brand_name_five'), sa.UniqueConstraint('brand_name_four'), sa.UniqueConstraint('brand_name_one'), sa.UniqueConstraint('brand_name_three'), sa.UniqueConstraint('brand_name_two'), sa.UniqueConstraint('brand_url_five'), sa.UniqueConstraint('brand_url_four'), sa.UniqueConstraint('brand_url_one'), sa.UniqueConstraint('brand_url_three'), sa.UniqueConstraint('brand_url_two') ) op.create_table('payment_settings', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('name', sa.String(), nullable=True), sa.Column('display_name', sa.String(), nullable=True), sa.Column('value', sa.String(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('pricingplans', sa.Column('id', sa.Integer(), nullable=False), sa.Column('name', sa.String(), nullable=True), sa.Column('duration', sa.Integer(), nullable=True), sa.Column('cost', sa.Float(), nullable=True), sa.Column('currency_symbol', sa.String(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('roles', sa.Column('id', sa.Integer(), nullable=False), sa.Column('name', sa.String(length=64), nullable=True), sa.Column('index', sa.String(length=64), nullable=True), sa.Column('default', sa.Boolean(), nullable=True), sa.Column('permissions', sa.Integer(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('name') ) op.create_index(op.f('ix_roles_default'), 'roles', ['default'], unique=False) op.create_table('sitesettings', sa.Column('id', sa.Integer(), nullable=False), sa.Column('site_title', sa.String(length=128), nullable=True), sa.Column('siteaddress', sa.String(length=500), nullable=True), sa.Column('administration_user_address', sa.String(length=128), nullable=True), sa.Column('site_Language', sa.String(length=120), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('administration_user_address'), sa.UniqueConstraint('site_Language'), sa.UniqueConstraint('site_title') ) op.create_table('testdb', sa.Column('id', sa.Integer(), nullable=False), sa.Column('news_site_one_1', sa.String(length=25), nullable=True), sa.Column('news_site_twi_2', sa.String(length=25), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('news_site_one_1'), sa.UniqueConstraint('news_site_twi_2') ) op.create_table('transactionfees', sa.Column('id', sa.Integer(), nullable=False), sa.Column('provider_name', sa.String(), nullable=True), sa.Column('local_fee', sa.Integer(), nullable=True), sa.Column('european_fee', sa.Integer(), nullable=True), sa.Column('international_fee', sa.Integer(), nullable=True), sa.Column('transfer_fee', sa.Integer(), nullable=True), sa.Column('our_fee', sa.Integer(), nullable=True), sa.Column('local_percentage', sa.Float(), nullable=True), sa.Column('european_percentage', sa.Float(), nullable=True), sa.Column('international_percentage', sa.Float(), nullable=True), sa.Column('our_percentage', sa.Float(), nullable=True), sa.Column('card_type', sa.String(), nullable=True), sa.Column('currency_symbol', sa.String(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('users', sa.Column('id', sa.Integer(), nullable=False), sa.Column('confirmed', sa.Boolean(), nullable=True), sa.Column('verified', sa.Boolean(), nullable=True), sa.Column('is_seller', sa.Boolean(), nullable=True), sa.Column('first_name', sa.String(length=64), nullable=True), sa.Column('last_name', sa.String(length=64), nullable=True), sa.Column('email', sa.String(length=64), nullable=True), sa.Column('gender', sa.String(length=64), nullable=True), sa.Column('profession', sa.String(length=64), nullable=True), sa.Column('area_code', sa.String(length=6), nullable=True), sa.Column('mobile_phone', sa.BigInteger(), nullable=True), sa.Column('summary_text', sa.Text(), nullable=True), sa.Column('zip', sa.String(length=10), nullable=True), sa.Column('city', sa.String(length=64), nullable=True), sa.Column('state', sa.String(length=64), nullable=True), sa.Column('country', sa.String(length=64), nullable=True), sa.Column('password_hash', sa.String(length=128), nullable=True), sa.Column('socket_id', sa.Text(), nullable=True), sa.Column('online', sa.String(length=1), nullable=True), sa.Column('invited_by', sa.String(length=128), nullable=True), sa.Column('role_id', sa.Integer(), nullable=True), sa.Column('last_message_read_time', sa.DateTime(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['role_id'], ['roles.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_users_area_code'), 'users', ['area_code'], unique=False) op.create_index(op.f('ix_users_city'), 'users', ['city'], unique=False) op.create_index(op.f('ix_users_country'), 'users', ['country'], unique=False) op.create_index(op.f('ix_users_email'), 'users', ['email'], unique=True) op.create_index(op.f('ix_users_first_name'), 'users', ['first_name'], unique=False) op.create_index(op.f('ix_users_gender'), 'users', ['gender'], unique=False) op.create_index(op.f('ix_users_last_name'), 'users', ['last_name'], unique=False) op.create_index(op.f('ix_users_mobile_phone'), 'users', ['mobile_phone'], unique=True) op.create_index(op.f('ix_users_profession'), 'users', ['profession'], unique=False) op.create_index(op.f('ix_users_state'), 'users', ['state'], unique=False) op.create_index(op.f('ix_users_zip'), 'users', ['zip'], unique=False) op.create_table('blog_posts', sa.Column('id', sa.Integer(), nullable=False), sa.Column('title', sa.String(), nullable=True), sa.Column('image', sa.String(), nullable=False), sa.Column('text', sa.Text(), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('contact_messages', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('read', sa.Boolean(), nullable=True), sa.Column('spam', sa.Boolean(), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('name', sa.String(), nullable=True), sa.Column('email', sa.String(length=64), nullable=True), sa.Column('text', sa.Text(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_carts', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('session_id', sa.String(), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('step', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_orders', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('order_number', sa.String(), nullable=True), sa.Column('charge_id', sa.String(), nullable=True), sa.Column('order_status', sa.Integer(), nullable=True), sa.Column('products_total', sa.Float(), nullable=True), sa.Column('shipping_cost', sa.Float(), nullable=True), sa.Column('order_total', sa.Float(), nullable=True), sa.Column('order_discount', sa.Float(), nullable=True), sa.Column('order_pay_amount', sa.Float(), nullable=True), sa.Column('buyer_id', sa.Integer(), nullable=True), sa.Column('price_currency_id', sa.Integer(), nullable=True), sa.Column('first_name', sa.String(length=64), nullable=True), sa.Column('last_name', sa.String(length=64), nullable=True), sa.Column('email', sa.String(length=64), nullable=True), sa.Column('mobile_phone', sa.BigInteger(), nullable=True), sa.Column('zip', sa.String(length=10), nullable=True), sa.Column('city', sa.String(length=64), nullable=True), sa.Column('state', sa.String(length=64), nullable=True), sa.Column('country', sa.String(length=64), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['buyer_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['price_currency_id'], ['marketplace_currency.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_marketplace_orders_city'), 'marketplace_orders', ['city'], unique=False) op.create_index(op.f('ix_marketplace_orders_country'), 'marketplace_orders', ['country'], unique=False) op.create_index(op.f('ix_marketplace_orders_email'), 'marketplace_orders', ['email'], unique=False) op.create_index(op.f('ix_marketplace_orders_first_name'), 'marketplace_orders', ['first_name'], unique=False) op.create_index(op.f('ix_marketplace_orders_last_name'), 'marketplace_orders', ['last_name'], unique=False) op.create_index(op.f('ix_marketplace_orders_mobile_phone'), 'marketplace_orders', ['mobile_phone'], unique=False) op.create_index(op.f('ix_marketplace_orders_state'), 'marketplace_orders', ['state'], unique=False) op.create_index(op.f('ix_marketplace_orders_zip'), 'marketplace_orders', ['zip'], unique=False) op.create_table('marketplace_products', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('name', sa.String(), nullable=True), sa.Column('images', sa.Text(), nullable=True), sa.Column('description', sa.String(), nullable=True), sa.Column('availability', sa.Boolean(), nullable=True), sa.Column('min_order_quantity', sa.Integer(), nullable=True), sa.Column('length', sa.Float(), nullable=True), sa.Column('weight', sa.Float(), nullable=True), sa.Column('height', sa.Float(), nullable=True), sa.Column('price', sa.Float(), nullable=True), sa.Column('price_currency_id', sa.Integer(), nullable=True), sa.Column('seller_id', sa.Integer(), nullable=True), sa.Column('is_featured', sa.Boolean(), nullable=True), sa.Column('lead_time', sa.String(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['price_currency_id'], ['marketplace_currency.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['seller_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_shipping_methods', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('name', sa.String(), nullable=False), sa.Column('seller_id', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['seller_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('messages', sa.Column('id', sa.Integer(), nullable=False), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('recipient_id', sa.Integer(), nullable=True), sa.Column('body', sa.Text(), nullable=True), sa.Column('timestamp', sa.DateTime(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.Column('read_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['recipient_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_messages_timestamp'), 'messages', ['timestamp'], unique=False) op.create_table('notifications', sa.Column('id', sa.Integer(), nullable=False), sa.Column('name', sa.String(length=128), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('related_id', sa.Integer(), nullable=True), sa.Column('timestamp', sa.Float(), nullable=True), sa.Column('payload_json', sa.Text(), nullable=True), sa.Column('read', sa.Boolean(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_notifications_name'), 'notifications', ['name'], unique=False) op.create_index(op.f('ix_notifications_timestamp'), 'notifications', ['timestamp'], unique=False) op.create_table('organisations', sa.Column('id', sa.Integer(), nullable=False), sa.Column('user_id', sa.Integer(), nullable=False), sa.Column('image_filename', sa.String(), nullable=True), sa.Column('image_url', sa.String(), nullable=True), sa.Column('org_name', sa.String(length=255), nullable=True), sa.Column('org_city', sa.String(length=255), nullable=True), sa.Column('org_state', sa.String(length=255), nullable=True), sa.Column('org_country', sa.String(length=255), nullable=True), sa.Column('org_website', sa.String(length=255), nullable=True), sa.Column('org_industry', sa.String(length=255), nullable=True), sa.Column('org_description', sa.Text(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('photos', sa.Column('id', sa.Integer(), nullable=False), sa.Column('image_filename', sa.String(), nullable=True), sa.Column('image_url', sa.String(), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('subscriptions', sa.Column('id', sa.Integer(), nullable=False), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('start_time', sa.DateTime(), nullable=True), sa.Column('end_time', sa.DateTime(), nullable=True), sa.Column('active', sa.Boolean(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('blog_post_categories', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('category_id', sa.Integer(), nullable=True), sa.Column('post_id', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['category_id'], ['blog_categories.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['post_id'], ['blog_posts.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('blog_post_comments', sa.Column('id', sa.Integer(), nullable=False), sa.Column('text', sa.String(), nullable=True), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('post_id', sa.Integer(), nullable=True), sa.Column('depth', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.Column('lft', sa.Integer(), nullable=False), sa.Column('rgt', sa.Integer(), nullable=False), sa.Column('level', sa.Integer(), nullable=False), sa.Column('tree_id', sa.Integer(), nullable=True), sa.Column('parent_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint(['parent_id'], ['blog_post_comments.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['post_id'], ['blog_posts.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_index('blog_post_comments_level_idx', 'blog_post_comments', ['level'], unique=False) op.create_index('blog_post_comments_lft_idx', 'blog_post_comments', ['lft'], unique=False) op.create_index('blog_post_comments_rgt_idx', 'blog_post_comments', ['rgt'], unique=False) op.create_table('blog_post_tags', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('tag_id', sa.Integer(), nullable=True), sa.Column('post_id', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['post_id'], ['blog_posts.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['tag_id'], ['blog_tags.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('logos', sa.Column('id', sa.Integer(), nullable=False), sa.Column('image_filename', sa.String(), nullable=True), sa.Column('image_url', sa.String(), nullable=True), sa.Column('organisation_id', sa.Integer(), nullable=False), sa.Column('owner_organisation', sa.String(length=128), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['organisation_id'], ['organisations.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_cart_details', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('cart_id', sa.Integer(), nullable=True), sa.Column('first_name', sa.String(length=64), nullable=True), sa.Column('last_name', sa.String(length=64), nullable=True), sa.Column('email', sa.String(length=64), nullable=True), sa.Column('mobile_phone', sa.BigInteger(), nullable=True), sa.Column('zip', sa.String(length=10), nullable=True), sa.Column('city', sa.String(length=64), nullable=True), sa.Column('state', sa.String(length=64), nullable=True), sa.Column('country', sa.String(length=64), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['cart_id'], ['marketplace_carts.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_marketplace_cart_details_city'), 'marketplace_cart_details', ['city'], unique=False) op.create_index(op.f('ix_marketplace_cart_details_country'), 'marketplace_cart_details', ['country'], unique=False) op.create_index(op.f('ix_marketplace_cart_details_email'), 'marketplace_cart_details', ['email'], unique=True) op.create_index(op.f('ix_marketplace_cart_details_first_name'), 'marketplace_cart_details', ['first_name'], unique=False) op.create_index(op.f('ix_marketplace_cart_details_last_name'), 'marketplace_cart_details', ['last_name'], unique=False) op.create_index(op.f('ix_marketplace_cart_details_mobile_phone'), 'marketplace_cart_details', ['mobile_phone'], unique=True) op.create_index(op.f('ix_marketplace_cart_details_state'), 'marketplace_cart_details', ['state'], unique=False) op.create_index(op.f('ix_marketplace_cart_details_zip'), 'marketplace_cart_details', ['zip'], unique=False) op.create_table('marketplace_product_categories', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('category_id', sa.Integer(), nullable=True), sa.Column('product_id', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['category_id'], ['marketplace_categories.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['product_id'], ['marketplace_products.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_seller_carts', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('cart_id', sa.Integer(), nullable=True), sa.Column('seller_id', sa.Integer(), nullable=True), sa.Column('shipping_method_id', sa.Integer(), nullable=True), sa.Column('buyer_id', sa.Integer(), nullable=True), sa.Column('current_currency_id', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['buyer_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['cart_id'], ['marketplace_carts.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['current_currency_id'], ['marketplace_currency.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['seller_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['shipping_method_id'], ['marketplace_shipping_methods.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_seller_orders', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('order_id', sa.Integer(), nullable=True), sa.Column('seller_id', sa.Integer(), nullable=True), sa.Column('order_status', sa.Integer(), nullable=True), sa.Column('shipping_method_id', sa.Integer(), nullable=True), sa.Column('buyer_id', sa.Integer(), nullable=True), sa.Column('current_currency_id', sa.Integer(), nullable=True), sa.Column('shipping_cost', sa.Float(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['buyer_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['current_currency_id'], ['marketplace_currency.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['order_id'], ['marketplace_orders.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['seller_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['shipping_method_id'], ['marketplace_shipping_methods.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_shipping_method_prices', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('shipping_method_id', sa.Integer(), nullable=True), sa.Column('seller_id', sa.Integer(), nullable=True), sa.Column('price_currency_id', sa.Integer(), nullable=True), sa.Column('price', sa.Float(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['price_currency_id'], ['marketplace_currency.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['seller_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['shipping_method_id'], ['marketplace_shipping_methods.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('org_staff', sa.Column('id', sa.Integer(), nullable=False), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('invited_by', sa.Integer(), nullable=True), sa.Column('org_id', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['invited_by'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['org_id'], ['organisations.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_cart_items', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('cart_id', sa.Integer(), nullable=True), sa.Column('seller_cart_id', sa.Integer(), nullable=True), sa.Column('product_id', sa.Integer(), nullable=True), sa.Column('seller_id', sa.Integer(), nullable=True), sa.Column('buyer_id', sa.Integer(), nullable=True), sa.Column('count', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['buyer_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['cart_id'], ['marketplace_carts.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['product_id'], ['marketplace_products.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['seller_cart_id'], ['marketplace_seller_carts.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['seller_id'], ['users.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_order_items', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('order_id', sa.Integer(), nullable=True), sa.Column('seller_order_id', sa.Integer(), nullable=True), sa.Column('seller_id', sa.Integer(), nullable=True), sa.Column('buyer_id', sa.Integer(), nullable=True), sa.Column('product_id', sa.Integer(), nullable=True), sa.Column('count', sa.Integer(), nullable=True), sa.Column('current_price', sa.Float(), nullable=True), sa.Column('current_total_price', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['buyer_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['order_id'], ['marketplace_orders.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['product_id'], ['marketplace_products.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['seller_id'], ['users.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['seller_order_id'], ['marketplace_seller_orders.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) op.create_table('marketplace_order_status_changes', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('order_id', sa.Integer(), nullable=True), sa.Column('seller_order_id', sa.Integer(), nullable=True), sa.Column('changed_from', sa.Integer(), nullable=True), sa.Column('changed_to', sa.Integer(), nullable=True), sa.Column('created_at', sa.DateTime(), nullable=True), sa.Column('updated_at', sa.DateTime(), nullable=True), sa.ForeignKeyConstraint(['order_id'], ['marketplace_orders.id'], ondelete='CASCADE'), sa.ForeignKeyConstraint(['seller_order_id'], ['marketplace_seller_orders.id'], ondelete='CASCADE'), sa.PrimaryKeyConstraint('id') ) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_table('marketplace_order_status_changes') op.drop_table('marketplace_order_items') op.drop_table('marketplace_cart_items') op.drop_table('org_staff') op.drop_table('marketplace_shipping_method_prices') op.drop_table('marketplace_seller_orders') op.drop_table('marketplace_seller_carts') op.drop_table('marketplace_product_categories') op.drop_index(op.f('ix_marketplace_cart_details_zip'), table_name='marketplace_cart_details') op.drop_index(op.f('ix_marketplace_cart_details_state'), table_name='marketplace_cart_details') op.drop_index(op.f('ix_marketplace_cart_details_mobile_phone'), table_name='marketplace_cart_details') op.drop_index(op.f('ix_marketplace_cart_details_last_name'), table_name='marketplace_cart_details') op.drop_index(op.f('ix_marketplace_cart_details_first_name'), table_name='marketplace_cart_details') op.drop_index(op.f('ix_marketplace_cart_details_email'), table_name='marketplace_cart_details') op.drop_index(op.f('ix_marketplace_cart_details_country'), table_name='marketplace_cart_details') op.drop_index(op.f('ix_marketplace_cart_details_city'), table_name='marketplace_cart_details') op.drop_table('marketplace_cart_details') op.drop_table('logos') op.drop_table('blog_post_tags') op.drop_index('blog_post_comments_rgt_idx', table_name='blog_post_comments') op.drop_index('blog_post_comments_lft_idx', table_name='blog_post_comments') op.drop_index('blog_post_comments_level_idx', table_name='blog_post_comments') op.drop_table('blog_post_comments') op.drop_table('blog_post_categories') op.drop_table('subscriptions') op.drop_table('photos') op.drop_table('organisations') op.drop_index(op.f('ix_notifications_timestamp'), table_name='notifications') op.drop_index(op.f('ix_notifications_name'), table_name='notifications') op.drop_table('notifications') op.drop_index(op.f('ix_messages_timestamp'), table_name='messages') op.drop_table('messages') op.drop_table('marketplace_shipping_methods') op.drop_table('marketplace_products') op.drop_index(op.f('ix_marketplace_orders_zip'), table_name='marketplace_orders') op.drop_index(op.f('ix_marketplace_orders_state'), table_name='marketplace_orders') op.drop_index(op.f('ix_marketplace_orders_mobile_phone'), table_name='marketplace_orders') op.drop_index(op.f('ix_marketplace_orders_last_name'), table_name='marketplace_orders') op.drop_index(op.f('ix_marketplace_orders_first_name'), table_name='marketplace_orders') op.drop_index(op.f('ix_marketplace_orders_email'), table_name='marketplace_orders') op.drop_index(op.f('ix_marketplace_orders_country'), table_name='marketplace_orders') op.drop_index(op.f('ix_marketplace_orders_city'), table_name='marketplace_orders') op.drop_table('marketplace_orders') op.drop_table('marketplace_carts') op.drop_table('contact_messages') op.drop_table('blog_posts') op.drop_index(op.f('ix_users_zip'), table_name='users') op.drop_index(op.f('ix_users_state'), table_name='users') op.drop_index(op.f('ix_users_profession'), table_name='users') op.drop_index(op.f('ix_users_mobile_phone'), table_name='users') op.drop_index(op.f('ix_users_last_name'), table_name='users') op.drop_index(op.f('ix_users_gender'), table_name='users') op.drop_index(op.f('ix_users_first_name'), table_name='users') op.drop_index(op.f('ix_users_email'), table_name='users') op.drop_index(op.f('ix_users_country'), table_name='users') op.drop_index(op.f('ix_users_city'), table_name='users') op.drop_index(op.f('ix_users_area_code'), table_name='users') op.drop_table('users') op.drop_table('transactionfees') op.drop_table('testdb') op.drop_table('sitesettings') op.drop_index(op.f('ix_roles_default'), table_name='roles') op.drop_table('roles') op.drop_table('pricingplans') op.drop_table('payment_settings') op.drop_table('ourbrands') op.drop_table('newslinks') op.drop_table('marketplace_settings') op.drop_table('marketplace_currency') op.drop_table('marketplace_categories') op.drop_table('landingsettings') op.drop_table('landingimages') op.drop_table('images') op.drop_table('editableHTML') op.drop_table('blog_tags') op.drop_table('blog_news_letters') op.drop_table('blog_categories') # ### end Alembic commands ###
55.281709
128
0.700237
5,430
41,406
5.143831
0.046041
0.107408
0.160395
0.198346
0.874942
0.840106
0.796033
0.736816
0.703197
0.634886
0
0.00668
0.114162
41,406
748
129
55.355615
0.754819
0.006835
0
0.438356
0
0
0.252811
0.079419
0
0
0
0
0
1
0.00274
false
0.00137
0.00274
0
0.005479
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
50083f15b337cb2ad7773f0329b45c2b31019b78
8,395
py
Python
mvmm_sim/data_analysis/multi_view/model_selection.py
idc9/mvmm_sim
5819d9ff95e36310536fd436bba50baba4f0ca71
[ "MIT" ]
null
null
null
mvmm_sim/data_analysis/multi_view/model_selection.py
idc9/mvmm_sim
5819d9ff95e36310536fd436bba50baba4f0ca71
[ "MIT" ]
null
null
null
mvmm_sim/data_analysis/multi_view/model_selection.py
idc9/mvmm_sim
5819d9ff95e36310536fd436bba50baba4f0ca71
[ "MIT" ]
null
null
null
import pandas as pd from mvmm.multi_view.block_diag.graph.bipt_community import get_block_mat from mvmm.clustering_measures import MEASURE_MIN_GOOD from mvmm_sim.simulation.run_sim import get_n_blocks def get_bd_mvmm_model_sel(mvmm_results, select_metric='bic', user_best_idx=None): """ Parameters ---------- mvmm_results select_metric: str Which metric to use for model selection. user_best_idx: None, int User provided index for which model to select. May be used to overwrite best BIC selected index. """ fit_data = mvmm_results['fit_data'] n_view_comp_seq = mvmm_results['n_view_components'] # n_view_comp_seq = mvmm_results['n_view_components'] n_view_comp_settings = len(fit_data) # len(n_view_comp_seq) model_sel_df = [] for view_comp_idx in range(n_view_comp_settings): data = fit_data[view_comp_idx] bd_models = data['models']['bd_mvmm'] if 'full_mvmm' in data['models'].keys(): full_model = data['models']['full_mvmm'] else: full_model = None model_scores_measures = bd_models.model_sel_scores_.columns.values ############# # BD models # ############# # bd_scores = bd_models.scores_ # for bd_idx, row in bd_scores.iterrows(): for bd_idx in range(len(bd_models.estimators_)): est = bd_models.estimators_[bd_idx] model_sel_scores = bd_models.model_sel_scores_.iloc[bd_idx] # est n_blocks D_est = est.final_.bd_weights_ zero_thresh = est.final_.zero_thresh comm_mat_est = get_block_mat(D_est > zero_thresh) n_blocks_est = get_n_blocks(comm_mat_est) n_comp_est = (D_est > zero_thresh).sum() # requested n blocks n_blocks_req = est.final_.n_blocks res = {'model': 'bd_' + str(bd_idx), 'view_comp_idx': view_comp_idx, # 'bic': scores['bic'], # 'aic': scores['aic'], 'n_blocks_est': n_blocks_est, 'n_blocks_req': n_blocks_req, 'n_comp_est': n_comp_est, 'n_view_comp': n_view_comp_seq[view_comp_idx]} for measure in model_scores_measures: res[measure] = model_sel_scores[measure] model_sel_df.append(res) ############# # Full mvmm # ############# if full_model is not None: comm_mat_est = get_block_mat(full_model.weights_mat_ > zero_thresh) n_blocks_est = get_n_blocks(comm_mat_est) n_comp_est = (full_model.weights_mat_ > zero_thresh).sum() res = {'model': 'full', 'view_comp_idx': view_comp_idx, # 'bic': data['full_model_sel_scores']['bic'], 'n_blocks_req': 1, 'n_blocks_est': n_blocks_est, 'n_comp_est': n_comp_est, 'n_view_comp': n_view_comp_seq[view_comp_idx] } for measure in model_scores_measures: res[measure] = data['full_model_sel_scores'][measure] model_sel_df.append(res) model_sel_df = pd.DataFrame(model_sel_df) # get best model if user_best_idx is None: # select with BIC/AIC if MEASURE_MIN_GOOD[measure]: best_idx = model_sel_df[select_metric].idxmin() else: best_idx = model_sel_df[select_metric].idxmax() else: # user provided best_idx = int(user_best_idx) best_model_name = model_sel_df.loc[best_idx]['model'] best_view_comp_idx = model_sel_df.loc[best_idx]['view_comp_idx'] best_vc_models = fit_data[best_view_comp_idx]['models'] if 'bd' in best_model_name: bd_idx = int(best_model_name.split('_')[1]) best_model = best_vc_models['bd_mvmm'].estimators_[bd_idx] else: best_model = best_vc_models['full_mvmm'] # if isinstance(best_model, TwoStage): # best_model = best_model.final_ sel_metadata = {'idx': best_idx, 'model_name': best_model_name, 'best_view_comp_idx': view_comp_idx} return best_model, model_sel_df, sel_metadata def get_log_pen_mvmm_model_sel(mvmm_results, select_metric='bic', user_best_idx=None): """ Parameters ---------- mvmm_results select_metric: str Which metric to use for model selection. user_best_idx: None, int User provided index for which model to select. May be used to overwrite best BIC selected index. """ fit_data = mvmm_results['fit_data'] n_view_comp_seq = mvmm_results['n_view_components'] # n_view_comp_seq = mvmm_results['n_view_components'] n_view_comp_settings = len(fit_data) # len(n_view_comp_seq) model_sel_df = [] for view_comp_idx in range(n_view_comp_settings): data = fit_data[view_comp_idx] log_pen_models = data['models']['log_pen_mvmm'] if 'full_mvmm' in data['models'].keys(): full_model = data['models']['full_mvmm'] model_scores_measures = log_pen_models.model_sel_scores_.columns.values ############# # BD models # ############# # bd_scores = bd_models.scores_ # for bd_idx, row in bd_scores.iterrows(): for tune_idx in range(len(log_pen_models.estimators_)): est = log_pen_models.estimators_[tune_idx] model_sel_scores = log_pen_models.model_sel_scores_.iloc[tune_idx] Pi_est = est.final_.weights_mat_ zero_thresh = 0 comm_mat_est = get_block_mat(Pi_est > zero_thresh) n_blocks_est = get_n_blocks(comm_mat_est) n_comp_est = (Pi_est > zero_thresh).sum() res = {'model': 'logpen_' + str(tune_idx), 'view_comp_idx': view_comp_idx, # 'bic': scores['bic'], # 'aic': scores['aic'], 'n_blocks_est': n_blocks_est, # 'n_blocks_req': n_blocks_req, 'n_comp_est': n_comp_est, 'n_view_comp': n_view_comp_seq[view_comp_idx], 'n_view_comp_est': list(Pi_est.shape)} for measure in model_scores_measures: res[measure] = model_sel_scores[measure] model_sel_df.append(res) ############# # Full mvmm # ############# if full_model is not None: comm_mat_est = get_block_mat(full_model.weights_mat_ > zero_thresh) n_blocks_est = get_n_blocks(comm_mat_est) n_comp_est = (full_model.weights_mat_ > zero_thresh).sum() res = {'model': 'full', 'view_comp_idx': view_comp_idx, # 'bic': data['full_model_sel_scores']['bic'], 'n_blocks_est': n_blocks_est, 'n_comp_est': n_comp_est, 'n_view_comp': n_view_comp_seq[view_comp_idx] } for measure in model_scores_measures: res[measure] = data['full_model_sel_scores'][measure] model_sel_df.append(res) model_sel_df = pd.DataFrame(model_sel_df) # get best model if user_best_idx is None: # select with BIC/AIC if MEASURE_MIN_GOOD[measure]: best_idx = model_sel_df[select_metric].idxmin() else: best_idx = model_sel_df[select_metric].idxmax() else: # user provided best_idx = int(user_best_idx) best_model_name = model_sel_df.loc[best_idx]['model'] best_view_comp_idx = model_sel_df.loc[best_idx]['view_comp_idx'] best_vc_models = fit_data[best_view_comp_idx]['models'] if 'logpen' in best_model_name: bd_idx = int(best_model_name.split('_')[1]) best_model = best_vc_models['log_pen_mvmm'].estimators_[bd_idx] else: best_model = best_vc_models['full_mvmm'] # if isinstance(best_model, TwoStage): # best_model = best_model.final_ sel_metadata = {'idx': best_idx, 'model_name': best_model_name, 'best_view_comp_idx': view_comp_idx} return best_model, model_sel_df, sel_metadata
33.446215
79
0.597022
1,119
8,395
4.007149
0.098302
0.080285
0.063782
0.026762
0.845674
0.833854
0.817351
0.817351
0.817351
0.817351
0
0.000679
0.29863
8,395
250
80
33.58
0.76087
0.151995
0
0.704545
0
0
0.088073
0.006094
0
0
0
0
0
1
0.015152
false
0
0.030303
0
0.060606
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
503abf3eed8196c12180b1741a6c353bca05aba6
4,894
py
Python
videoanalyst/evaluation/davis_benchmark/evaluation_method.py
yutliu/betterSAT
fb983f43b12352f9ee6ae40b4e0954f6ba502fb8
[ "MIT" ]
null
null
null
videoanalyst/evaluation/davis_benchmark/evaluation_method.py
yutliu/betterSAT
fb983f43b12352f9ee6ae40b4e0954f6ba502fb8
[ "MIT" ]
null
null
null
videoanalyst/evaluation/davis_benchmark/evaluation_method.py
yutliu/betterSAT
fb983f43b12352f9ee6ae40b4e0954f6ba502fb8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -* import os import sys from time import time import argparse import numpy as np import pandas as pd from..davis_benchmark.davis2017.davis_evaluation import DAVISEvaluation, alivos1valuation dataset = 'val' task = 'semi-supervised' dataset_ali = 'test1' def davis2017_eval(davis_path,results_path,csv_name_global_path,csv_name_per_sequence_path,hp_dict,version = '2017' ): time_start = time() hp_keys = list(hp_dict.keys()) hp_values = [hp_dict[k] for k in hp_keys] print('Evaluating sequences for the {} task...'.format(task)) # Create dataset and evaluate dataset_eval = DAVISEvaluation(davis_root=davis_path, task=task, gt_set=dataset,version = version) metrics_res = dataset_eval.evaluate(results_path) J, F = metrics_res['J'], metrics_res['F'] # Generate dataframe for the general results g_measures = ['J&F-Mean', 'J-Mean', 'J-Recall', 'J-Decay', 'F-Mean', 'F-Recall', 'F-Decay'] + hp_keys final_mean = (np.mean(J["M"]) + np.mean(F["M"])) / 2. g_res = np.array( [final_mean, np.mean(J["M"]), np.mean(J["R"]), np.mean(J["D"]), np.mean(F["M"]), np.mean(F["R"]), np.mean(F["D"])] + hp_values ) g_res = np.reshape(g_res, [1, len(g_res)]) table_g = pd.DataFrame(data=g_res, columns=g_measures) with open(csv_name_global_path, 'a') as f: table_g.to_csv(f, index=False, float_format="%.3f",mode='a') print('Global results saved in {}'.format(csv_name_global_path)) seq_names = list(J['M_per_object'].keys()) seq_measures = ['Sequence', 'J-Mean', 'F-Mean'] J_per_object = [J['M_per_object'][x] for x in seq_names] F_per_object = [F['M_per_object'][x] for x in seq_names] table_seq = pd.DataFrame(data=list(zip(seq_names, J_per_object, F_per_object)), columns=seq_measures) with open(csv_name_per_sequence_path, 'w') as f: table_seq.to_csv(f, index=False, float_format="%.3f") print('Per-sequence results saved in {}'.format(csv_name_per_sequence_path)) # Print the results sys.stdout.write("--------------------------- Global results for {} ---------------------------\n".format(dataset)) print(table_g.to_string(index=False)) sys.stdout.write("\n---------- Per sequence results for {} ----------\n".format(dataset)) print(table_seq.to_string(index=False)) total_time = time() - time_start sys.stdout.write('\nTotal time:' + str(total_time)) return dict(JF=final_mean, JM=np.mean(J["M"]), JR=np.mean(J["R"]), JD=np.mean(J["D"]), FM=np.mean(F["M"]), FR=np.mean(F["R"]), FD=np.mean(F["D"])) def alivos1_eval(davis_path,results_path,csv_name_global_path,csv_name_per_sequence_path,hp_dict,version = '2017' ): time_start = time() hp_keys = list(hp_dict.keys()) hp_values = [hp_dict[k] for k in hp_keys] print('Evaluating sequences for the {} task...'.format(task)) # Create dataset and evaluate dataset_eval = alivos1valuation(davis_root=davis_path, task=task, gt_set=dataset_ali,version = version) metrics_res = dataset_eval.evaluate(results_path) J, F = metrics_res['J'], metrics_res['F'] # Generate dataframe for the general results g_measures = ['J&F-Mean', 'J-Mean', 'J-Recall', 'J-Decay', 'F-Mean', 'F-Recall', 'F-Decay'] + hp_keys final_mean = (np.mean(J["M"]) + np.mean(F["M"])) / 2. g_res = np.array( [final_mean, np.mean(J["M"]), np.mean(J["R"]), np.mean(J["D"]), np.mean(F["M"]), np.mean(F["R"]), np.mean(F["D"])] + hp_values ) g_res = np.reshape(g_res, [1, len(g_res)]) table_g = pd.DataFrame(data=g_res, columns=g_measures) with open(csv_name_global_path, 'a') as f: table_g.to_csv(f, index=False, float_format="%.3f",mode='a') print('Global results saved in {}'.format(csv_name_global_path)) seq_names = list(J['M_per_object'].keys()) seq_measures = ['Sequence', 'J-Mean', 'F-Mean'] J_per_object = [J['M_per_object'][x] for x in seq_names] F_per_object = [F['M_per_object'][x] for x in seq_names] table_seq = pd.DataFrame(data=list(zip(seq_names, J_per_object, F_per_object)), columns=seq_measures) with open(csv_name_per_sequence_path, 'w') as f: table_seq.to_csv(f, index=False, float_format="%.3f") print('Per-sequence results saved in {}'.format(csv_name_per_sequence_path)) # Print the results sys.stdout.write("--------------------------- Global results for {} ---------------------------\n".format(dataset)) print(table_g.to_string(index=False)) sys.stdout.write("\n---------- Per sequence results for {} ----------\n".format(dataset)) print(table_seq.to_string(index=False)) total_time = time() - time_start sys.stdout.write('\nTotal time:' + str(total_time)) return dict(JF=final_mean, JM=np.mean(J["M"]), JR=np.mean(J["R"]), JD=np.mean(J["D"]), FM=np.mean(F["M"]), FR=np.mean(F["R"]), FD=np.mean(F["D"]))
46.609524
130
0.644871
789
4,894
3.774398
0.144487
0.056414
0.032908
0.034251
0.910007
0.910007
0.910007
0.910007
0.910007
0.884486
0
0.006996
0.153045
4,894
104
131
47.057692
0.71146
0.040458
0
0.820513
0
0
0.166596
0.023891
0
0
0
0
0
1
0.025641
false
0
0.089744
0
0.141026
0.128205
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
acf58443136d4c96f86334cec6054185351f8563
6,857
py
Python
toolkit/radar_preprocess/util/mmwave_bag.py
MAPS-Lab/OdomBydVision
a6e1a91dce0001bd377080ad228529f6184b7130
[ "MIT" ]
null
null
null
toolkit/radar_preprocess/util/mmwave_bag.py
MAPS-Lab/OdomBydVision
a6e1a91dce0001bd377080ad228529f6184b7130
[ "MIT" ]
null
null
null
toolkit/radar_preprocess/util/mmwave_bag.py
MAPS-Lab/OdomBydVision
a6e1a91dce0001bd377080ad228529f6184b7130
[ "MIT" ]
null
null
null
import struct import csv import numpy as np import pandas as pd def make_frames_from_csv(csv_path): readings_dict = dict() with open(csv_path, 'r') as input_file: reader = csv.reader(input_file) next(reader) for row in reader: pts = list() # add timestamp timestamp = row[0] # timestamp = row[4] + row[5].zfill(9) # parsing try: offset_col = row[37] except: offset_col = row[29] pt_cloud = np.fromstring(offset_col[1:-1], dtype=int, sep=',') for i in range(0, int(len(pt_cloud) / 32)): point = list() # x tmp = struct.pack('4B', int(pt_cloud[32 * i]), int(pt_cloud[32 * i + 1]), int(pt_cloud[32 * i + 2]), int(pt_cloud[32 * i + 3])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # y tmp = struct.pack('4B', int(pt_cloud[32 * i + 4]), int(pt_cloud[32 * i + 5]), int(pt_cloud[32 * i + 6]), int(pt_cloud[32 * i + 7])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # z tmp = struct.pack('4B', int(pt_cloud[32 * i + 8]), int(pt_cloud[32 * i + 9]), int(pt_cloud[32 * i + 10]), int(pt_cloud[32 * i + 11])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # intensity tmp = struct.pack('4B', int(pt_cloud[32 * i + 16]), int(pt_cloud[32 * i + 17]), int(pt_cloud[32 * i + 18]), int(pt_cloud[32 * i + 19])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # range tmp = struct.pack('4B', int(pt_cloud[32 * i + 20]), int(pt_cloud[32 * i + 21]), int(pt_cloud[32 * i + 22]), int(pt_cloud[32 * i + 23])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # doppler tmp = struct.pack('4B', int(pt_cloud[32 * i + 24]), int(pt_cloud[32 * i + 25]), int(pt_cloud[32 * i + 26]), int(pt_cloud[32 * i + 27])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) pts.append(point) readings_dict[timestamp] = pts return readings_dict def make_frames_from_csv_doppler(csv_path): doppler_csv_path = csv_path.replace('.csv', '_scan.csv') print(doppler_csv_path) vel_data = pd.read_csv(doppler_csv_path) # print(vel_data.head()) vel_idx = 0 readings_dict = dict() with open(csv_path, 'r') as input_file: reader = csv.reader(input_file) next(reader) for row in reader: pts = list() # add timestamp timestamp = row[0] # timestamp = row[4] + row[5].zfill(9) # parsing try: offset_col = row[37] except: offset_col = row[29] pt_cloud = np.fromstring(offset_col[1:-1], dtype=int, sep=',') row_without_velocity = 0 for i in range(0, int(len(pt_cloud) / 32)): point = list() # x tmp = struct.pack('4B', int(pt_cloud[32 * i]), int(pt_cloud[32 * i + 1]), int(pt_cloud[32 * i + 2]), int(pt_cloud[32 * i + 3])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # y tmp = struct.pack('4B', int(pt_cloud[32 * i + 4]), int(pt_cloud[32 * i + 5]), int(pt_cloud[32 * i + 6]), int(pt_cloud[32 * i + 7])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # z tmp = struct.pack('4B', int(pt_cloud[32 * i + 8]), int(pt_cloud[32 * i + 9]), int(pt_cloud[32 * i + 10]), int(pt_cloud[32 * i + 11])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # intensity tmp = struct.pack('4B', int(pt_cloud[32 * i + 16]), int(pt_cloud[32 * i + 17]), int(pt_cloud[32 * i + 18]), int(pt_cloud[32 * i + 19])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # range tmp = struct.pack('4B', int(pt_cloud[32 * i + 20]), int(pt_cloud[32 * i + 21]), int(pt_cloud[32 * i + 22]), int(pt_cloud[32 * i + 23])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) # doppler tmp = struct.pack('4B', int(pt_cloud[32 * i + 24]), int(pt_cloud[32 * i + 25]), int(pt_cloud[32 * i + 26]), int(pt_cloud[32 * i + 27])) tempf = struct.unpack('1f', tmp) point.append(tempf[0]) if row_without_velocity == 1: continue if vel_idx == vel_data.shape[0]: return readings_dict if abs(point[0] - vel_data.loc[vel_idx]['x']) < 1e-10 and abs( point[1] - vel_data.loc[vel_idx]['y']) < 1e-10 and abs( point[2] - vel_data.loc[vel_idx]['z']) < 1e-10: point[5] = vel_data.loc[vel_idx]['velocity'] vel_idx = vel_idx + 1 else: find_flag = 0 while vel_idx < vel_data.shape[0] - 1: vel_idx = vel_idx + 1 if abs(point[0] - vel_data.loc[vel_idx]['x']) < 1e-10 and abs( point[1] - vel_data.loc[vel_idx]['y']) < 1e-10 and abs( point[2] - vel_data.loc[vel_idx]['z']) < 1e-10: point[5] = vel_data.loc[vel_idx]['velocity'] vel_idx = vel_idx + 1 find_flag = 1 break if find_flag == 0: vel_idx = 0 row_without_velocity = 1 continue pts.append(point) readings_dict[timestamp] = pts return readings_dict
43.675159
120
0.41855
820
6,857
3.343902
0.130488
0.13275
0.164114
0.210066
0.899708
0.860686
0.846827
0.846827
0.846827
0.846827
0
0.072572
0.453405
6,857
156
121
43.955128
0.659018
0.029167
0
0.848
0
0
0.013114
0
0
0
0
0
0
1
0.016
false
0
0.032
0
0.072
0.008
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
4a1c44a2ece75af5f3adb234674129a8dbefcc0d
96
py
Python
gyomei_trainer/metrics/__init__.py
KonstantinDob/gyomei_trainer
028628d09205b0bb4c411d39d51a00add58aecc2
[ "MIT" ]
null
null
null
gyomei_trainer/metrics/__init__.py
KonstantinDob/gyomei_trainer
028628d09205b0bb4c411d39d51a00add58aecc2
[ "MIT" ]
null
null
null
gyomei_trainer/metrics/__init__.py
KonstantinDob/gyomei_trainer
028628d09205b0bb4c411d39d51a00add58aecc2
[ "MIT" ]
null
null
null
from gyomei_trainer.metrics.loss import Loss from gyomei_trainer.metrics.metrics import Metrics
32
50
0.875
14
96
5.857143
0.428571
0.243902
0.414634
0.585366
0
0
0
0
0
0
0
0
0.083333
96
2
51
48
0.931818
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
8
c57cd6b41bf5acc3f232f7056acc358959c9e9a0
411,550
py
Python
tests/games/Plotter.py
DoveDoof/QLUT
8d48a5430a267b6b1018312d8267236d4df899d9
[ "MIT" ]
null
null
null
tests/games/Plotter.py
DoveDoof/QLUT
8d48a5430a267b6b1018312d8267236d4df899d9
[ "MIT" ]
13
2018-07-19T09:42:28.000Z
2018-09-25T15:08:05.000Z
tests/games/Plotter.py
DoveDoof/QLUT
8d48a5430a267b6b1018312d8267236d4df899d9
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np # regnn det:reg_51_51_51_e-3_det_1e-1 regdet = {"5000": [1, -1, 1, 1, 0, -1, -1, -1, -1, 0, 1, -1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, -1, 0, 1, 1, 0, -1, 1, -1, 0, 1, -1, -1, 0, 1, 1, 1, -1, 0, 1, 0, 0, -1, 0, 1, 1, -1, 1, 1, -1, 0, 0, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 0, -1, -1, 0, 1, -1, 1, -1, 0, 1, -1, -1, -1, -1, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 1, 0, -1, 0, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 0, 1, 1, 0, 0, -1, 1, 0, -1, 1, 0, 0, 1, 0, 1, 0, 0, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 0, 0, 0, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 0, 0, 1, -1, 1, -1, -1, 1, -1, -1, 0, -1, 0, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 0, 0, 1, 1, -1, 1, 1, -1, 0, -1, -1, -1, 0, 0, 0, 1, 0, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 1, 0, -1, -1, 1, -1, -1, 0, -1, -1, 0, -1, 0, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 0, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 1, -1, -1, 1, 0, 0, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, 0, -1, -1, 1, -1, 0, 1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 0, 1, 1, -1, -1, 1, 1, 0, 0, 1, -1, 1, 1, 1, 0, 0, 1, 0, -1, -1, 1, -1, 0, -1, 0, 1, 0, 1, -1, 1, -1, -1, 0, -1, 1, 1, 0, 1, -1, 0, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 0, -1, -1, 0, 0, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 0, 0, -1, -1, 0, 1, 0, -1, 1, 1, -1, 0, -1, 0, 0, -1, -1, -1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 0, 1, -1, 0, -1, 1, 1, -1, 0, 1, 1, -1, 0, -1, -1, 0, -1, -1, -1, -1, 0, 0, -1, -1, 1, 1, 0, -1, 0, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 0, 0, -1, -1, -1, 1, 1, -1, 1, 0, 1, 0, 0, 1, -1, -1, -1, 1, -1, 1, 1, 0, -1, 1, 1, 0, 0, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 0, -1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, -1, 1, 0, 0, 0, 1, 1, -1, 0, 0, 1, -1, -1, -1, 0, 1, -1, -1, -1, 1, -1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 0, 1, 1, 1, -1, -1, -1, -1, 0, 0, 1, -1, 0, 0, 1, 1, 0, 1, 0, -1, 0, -1, 1, -1, -1, -1, 0, 0, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 0, 0, -1, 1, 0, 0, -1, 0, -1, 1, -1, 1, 0, -1, 0, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 0, -1, -1, 1, -1, 0, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, -1, 0, 1, 0, 1, 1, -1, -1, 0, 0, -1, 0, 1, 0, 1, 1, 0, 0, -1, 0, 1, 0, 0, 1, -1, 1, -1, 0, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 0, 0, -1, 1, 0, 0, 0, 1, -1, -1, -1, -1, 1, 1, 0, 1, 0, -1, -1, -1, 0, 0, 1, 1, 1, 1, 0, -1, -1, 0, -1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, 0, 0, 1, -1, -1, 1, -1, 0, -1, 0, -1, 0, 1, -1, -1, -1, -1, 1, 0, -1, -1, 0, -1, -1, 1, 0, -1, 1, 0, 0, -1, -1, 1, 1, 0, 1, -1, 0, -1, 1, -1, -1, 1, -1, 0, -1, 0, 1, 0, 0, 1, 1, 0, -1, -1, -1, 0, 1, 1, -1, -1, 0, -1, 0, -1, 1, -1, 1, 0, 1, 1, -1, -1, 0, -1, 1, 0, -1, -1, -1, -1, -1, 1, 0, 0, 1, 1, 1, -1, -1, -1, -1, 1, 0, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 0, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 0, 1, -1, 1, 0, 0, 1, 1, 0, -1], "10000": [1, 0, -1, 1, 1, 0, 1, 1, 0, 1, 0, 1, -1, 1, 0, 0, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 0, -1, 1, -1, 0, -1, 0, 1, -1, 0, -1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 0, 0, 1, 0, -1, 0, -1, 1, 1, 1, -1, 0, 0, -1, 1, -1, 1, 1, 0, 1, -1, 0, 0, 0, -1, 1, 1, 1, -1, 0, 0, -1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 0, -1, -1, 1, 1, -1, 0, 1, 0, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, -1, 0, 1, 1, 1, 0, 0, -1, -1, -1, 1, 1, -1, 0, 1, 1, -1, -1, 1, -1, -1, -1, 1, 0, -1, 0, -1, 0, 0, 0, -1, 1, -1, 1, 0, 1, 0, -1, 1, 0, 0, 1, 1, 0, -1, 1, -1, -1, -1, 1, 0, -1, -1, 0, -1, -1, 0, -1, 1, 1, 0, 1, -1, 1, 0, -1, -1, -1, -1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 0, 0, 1, 0, 1, -1, 1, -1, -1, 0, 1, 0, 0, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 0, 0, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 0, 1, 0, -1, -1, 0, 0, 1, 1, 0, -1, -1, 0, 1, -1, 1, 0, -1, 0, -1, 1, 0, 1, -1, -1, 0, 1, 0, 1, -1, 1, -1, 0, 1, 0, 0, 0, 1, -1, 0, -1, 1, 0, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 0, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 0, 1, -1, -1, -1, -1, 1, -1, 1, 0, -1, -1, -1, -1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 0, -1, -1, 0, -1, -1, 0, 1, -1, 1, -1, 1, -1, -1, 1, -1, 0, 0, -1, -1, 0, 1, 1, 0, 1, 0, -1, 1, 1, 1, -1, 0, 0, -1, 0, -1, -1, 1, 0, -1, 1, -1, 0, 1, 1, 0, 1, 0, -1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, -1, -1, 1, -1, -1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 0, 1, 0, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 0, 1, -1, -1, 0, -1, 0, 0, 1, 0, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 0, -1, 1, 1, 1, -1, 0, 0, -1, 1, -1, -1, 1, -1, -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 0, -1, 1, -1, 0, 0, 0, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 0, 0, -1, 1, 0, 0, 0, 1, -1, 0, 0, 1, 0, -1, -1, 1, 1, 0, 0, 1, -1, 0, 0, 0, 1, 0, -1, -1, 1, 1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, -1, 0, 1, -1, -1, 0, 1, 0, 0, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 0, -1, 1, -1, -1, -1, 1, 0, 1, 1, 0, 1, -1, 0, 0, 1, 0, 0, 1, -1, -1, 0, -1, 1, 0, 0, 1, 1, -1, 1, 0, -1, -1, 1, -1, 1, 1, -1, 0, 1, 0, -1, -1, 0, 0, 0, -1, 0, -1, 0, -1, -1, 0, 1, -1, 0, -1, 1, 1, 0, 0, 1, -1, -1, 1, 0, -1, 1, -1, 1, -1, 1, 0, 1, -1, 0, -1, 1, 1, -1, 0, 1, -1, -1, -1, -1, 0, -1, 0, 0, 0, -1, 1, -1, 1, -1, 0, 0, 1, -1, 0, 0, -1, 0, -1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 1, 0, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 0, -1, -1, 1, -1, 1, 0, -1, 0, 0, -1, 0, 1, -1, 0, 1, 1, 0, 0, 0, 1, -1, -1, 1, 0, 1, 1, -1, 1, 0, -1, 0, -1, 1, 1, 0, -1, -1, -1, 0, 0, 1, 0, 0, -1, 0, -1, -1, -1, 1, -1, -1, 0, 1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 0, -1, 1, -1, -1, 1, 0, 0, -1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 1, 0, 0, 1, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 0, 0, 1, 1, 0, 0, 1, 0, -1, -1, -1, -1, 0, 0, 0, 1, 0, -1, 0, -1, 1, 0, 0, -1, 1, 0, -1, 0, -1, -1, -1, 0, 1, 1, 1, 1, -1, 0, -1, -1, 0, -1, 0, -1, 0, -1, 1, 0, 1, 0, -1, 0, -1, 1, -1, 0, 1, -1, -1, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 0, 1], "15000": [1, 1, 1, -1, 0, 1, 1, 1, 0, 0, 0, 1, 0, -1, -1, 0, -1, 0, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 0, -1, 0, 0, -1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 0, 1, -1, 0, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, 1, -1, -1, 1, -1, -1, 0, 0, 1, -1, -1, -1, 1, -1, 0, -1, -1, -1, -1, 0, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 0, -1, 0, 0, 1, -1, 1, 0, -1, -1, 0, 0, 1, 1, 0, 0, 1, -1, -1, 1, -1, 0, 1, 0, 0, 1, 1, 0, -1, -1, 0, 1, -1, -1, -1, -1, -1, 1, 1, -1, 0, -1, 0, -1, -1, 1, 0, 0, -1, -1, 0, 1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 0, 0, -1, 0, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 0, -1, 0, -1, 0, -1, 1, 1, 1, 1, 0, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 0, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 0, 1, 0, 1, -1, -1, -1, -1, -1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, -1, 1, -1, 0, -1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 0, 0, 0, 0, 0, -1, 1, 0, -1, 0, -1, 1, 0, 1, 0, 0, 1, 0, -1, -1, -1, -1, -1, 1, -1, 0, 0, -1, 0, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, -1, 0, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 0, 0, -1, 1, 1, -1, 0, -1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 0, 1, -1, 1, -1, 1, -1, -1, 1, 0, 0, 1, 1, 0, -1, -1, 0, 0, -1, 1, 0, -1, -1, 1, 0, 1, -1, 1, -1, -1, 1, 0, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 0, 0, 0, 1, -1, 0, 1, 1, -1, 1, -1, 0, 0, -1, 0, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 0, 1, 0, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 0, 1, 0, 0, 1, 1, 1, -1, -1, 1, -1, 0, 0, -1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 0, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, -1, -1, -1, -1, -1, 0, 0, -1, 1, -1, 1, 1, -1, -1, 0, -1, 0, 1, -1, 1, -1, 1, -1, 1, 0, 0, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 0, 0, 0, 1, -1, 1, -1, 0, 1, -1, 0, -1, 0, -1, 1, 1, 1, 0, 0, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 0, 0, -1, -1, -1, 0, 0, 1, 0, -1, 1, -1, 0, 0, 1, -1, 1, 0, -1, -1, -1, 0, 0, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 0, 0, -1, 1, -1, 1, 0, -1, 0, 1, 0, 0, 1, -1, -1, -1, -1, -1, 1, 1, -1, 0, -1, -1, -1, 1, -1, 0, -1, -1, -1, 0, 1, -1, 0, -1, 1, -1, 1, -1, -1, 1, 0, 0, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 0, -1, -1, 1, -1, 1, 1, 0, -1, 0, -1, 0, 0, -1, 0, 0, 1, 0, 1, -1, -1, -1, 0, 0, 0, -1, 0, -1, 1, -1, 1, 0, 0, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 0, 0, 1, 0, 0, 0, -1, 1, 0, 0, -1, -1, 1, 1, 0, -1, 1, -1, 1, -1, 0, -1, 1, -1, -1, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, 1, 0, 1, -1, 1, -1, -1, 0, 0, -1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 0, 0, 0, -1, -1, -1, 0, 1, 1, 1, -1, 1, -1, 0, 1, -1, -1, 0, -1, -1, 1, 0, 1, -1, -1, 0, 0, 1, -1, 0, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 0, 1, -1, -1, 1, 1, -1, -1, -1, -1, 0, -1, 1, -1, 0], "20000": [1, 1, 1, 0, -1, 1, 0, 1, 1, -1, 1, 1, 0, 0, 0, 1, 1, -1, -1, 1, -1, 0, 0, 0, 1, 1, -1, 0, -1, 1, -1, 0, 0, 0, 1, 0, 1, 1, 1, -1, 0, 1, -1, 0, -1, 0, -1, 1, 0, 0, -1, 0, 1, -1, 1, 0, 1, 1, 0, 0, 0, 0, -1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 0, 1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 0, -1, 0, -1, -1, -1, -1, 0, -1, 0, 0, 0, -1, 1, 1, -1, -1, 1, -1, 0, 1, 0, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 0, 0, 0, 1, 1, 1, 1, 0, -1, 0, 1, -1, -1, 1, -1, 1, 0, 1, 1, 0, -1, -1, -1, 1, 1, 0, -1, 1, 1, 0, 0, 1, 1, 1, -1, -1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 0, 0, -1, -1, 0, 0, 1, -1, -1, -1, 0, 1, -1, 0, -1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 0, 1, 0, -1, 0, 0, 1, -1, 1, 0, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 0, -1, 1, 1, 1, 1, 0, -1, -1, 0, -1, 1, -1, -1, 1, -1, -1, 0, 1, 1, -1, -1, 1, 0, -1, 1, 1, 0, 0, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 0, 0, 1, 0, 0, 0, 1, 0, -1, 1, 0, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 0, 0, 1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 0, 0, -1, 0, -1, 1, 0, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 1, -1, 1, -1, 1, -1, 0, -1, -1, 0, 1, -1, 0, 1, 0, -1, 1, 0, 1, 0, 1, -1, 1, 0, 1, -1, 1, -1, -1, 0, 1, -1, -1, -1, -1, -1, 1, 0, 0, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, -1, 0, -1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 0, -1, 0, 1, 1, -1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 0, -1, -1, -1, 1, 0, 0, -1, -1, -1, 0, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 0, 0, 0, 1, 0, 1, -1, 0, 1, 1, 0, 1, -1, -1, -1, -1, 1, 1, -1, -1, 0, -1, -1, 0, 0, 1, 0, -1, 1, 0, 1, 1, 1, -1, -1, 1, 0, -1, 1, 0, 0, -1, 1, -1, -1, -1, -1, 0, -1, 0, 1, 0, -1, 1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 0, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, -1, -1, 0, 1, 1, 0, 1, 1, 0, 1, 0, -1, -1, -1, -1, 0, -1, -1, 1, 0, 0, 1, -1, -1, -1, 1, 1, 0, 0, -1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1, -1, -1, 1, 0, 1, 0, -1, 0, 0, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, -1, 0, 1, 0, 1, -1, -1, -1, -1, 0, 1, -1, 0, -1, -1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 1, 1, -1, -1, 0, 0, -1, 0, 1, -1, 0, 0, 1, -1, 1, 0, 0, 0, 0, -1, 1, -1, 1, -1, 0, 1, 0, 1, 1, -1, 1, 0, 1, -1, 1, 0, -1, 1, 1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 0, 0, 0, 1, 0, 0, -1, 1, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 0, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, -1, -1, -1, 0, -1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 0, 1, 0, 1, 0, -1, 1, -1, 1, 1, 1, -1, -1, -1, 0, 1, -1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, -1, 0, -1, 0, 1, 1, 1, 0, -1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 0, -1, -1, 1, 0, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 1, 1, 1, 0, 1, -1, -1, 0, -1, -1, -1, -1, 1, 0, 1, 1, 0, 0, 0], "25000": [0, -1, 1, 1, -1, 1, -1, 0, -1, 0, 1, -1, 1, -1, 1, -1, -1, 0, 0, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, 0, 1, 1, 1, 0, 1, -1, 0, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 0, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 0, -1, -1, 1, 0, -1, 1, 1, -1, 0, -1, -1, -1, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 1, 0, 1, 1, 0, -1, 1, 1, 1, 1, 0, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 0, -1, 0, 0, 1, -1, -1, 0, 0, 0, 0, 1, 0, 1, -1, -1, -1, 1, -1, 0, 0, 1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, 0, 1, 0, 1, 1, -1, 1, 0, 1, 0, 1, 0, -1, 0, -1, 1, 1, 0, 1, 1, 0, -1, 1, 0, 1, 0, -1, 1, -1, -1, 1, 1, 1, 0, 1, 0, -1, -1, -1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, -1, -1, 0, 1, -1, 0, -1, 0, 1, 1, -1, -1, -1, 1, -1, 0, -1, 0, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 0, 1, -1, -1, 0, -1, 0, 0, 1, 1, 1, -1, 0, 1, -1, 0, 1, 1, 1, 0, -1, 0, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 0, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 0, 1, 0, -1, 1, 1, 0, -1, 0, -1, 0, 0, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 0, -1, -1, -1, 1, 1, 0, 1, 0, -1, 1, 0, 0, 1, 1, 0, -1, 0, -1, 0, 0, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, -1, 0, -1, -1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, -1, 1, -1, -1, -1, 1, -1, 1, -1, 0, -1, 1, 0, -1, 1, 1, 0, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 0, -1, -1, -1, 1, 0, 0, 1, 1, 0, -1, 0, 0, 1, 1, 1, 1, -1, 0, 1, 0, -1, -1, 1, 0, 1, 1, 0, -1, -1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, 0, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 0, -1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 1, 0, 0, -1, -1, -1, 0, -1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 0, 1, 1, 0, 1, -1, 0, -1, 1, -1, -1, 0, 1, 0, 1, 1, 1, 0, -1, 0, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 0, -1, -1, -1, -1, 1, 0, -1, 1, -1, 0, 0, 1, 1, -1, 0, 0, 1, 0, -1, -1, 0, -1, 1, 0, -1, -1, 1, 0, 0, 1, -1, -1, 1, -1, 0, 1, 1, 1, 0, 1, 0, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, -1, 1, 0, -1, 0, 0, 0, -1, -1, 1, -1, 1, 1, 0, 0, 1, -1, -1, -1, 1, 0, 0, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 0, -1, 0, 1, 0, -1, 0, 1, 1, -1, 0, 1, -1, -1, 1, 1, -1, 0, 0, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, 0, 0, 1, -1, 1, 1, -1, -1, -1, 0, 1, -1, 0, 1, 0, 1, -1, 1, 1, -1, -1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 0, 1, -1, -1, 1, 1, -1, 0, 1, 1, -1, -1, -1, -1, 0, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 0, -1, 1, -1, -1, 1, -1, -1, 0, 1, -1, 0, 1, 0, 0, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, -1, 1, -1, -1, 0, -1, -1, 1, 0, 1, -1, 1, 1, 1, 0, 0, 0, -1, 0, -1, 1, 1, 1, 0, 1, 0, 0, -1, -1, 1, 0, -1, 0, 1, -1, 0, 0, 1, 1, -1, 0, -1, 0, -1, -1, 0, 0, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 0, -1, 0, 0, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, -1, -1, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, -1, 1, 0, -1, 1, 1, -1, 1], "30000": [1, 0, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 0, -1, -1, -1, 0, 1, -1, 1, -1, 0, -1, 1, 0, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, -1, 0, 0, 0, 0, 1, -1, 1, 0, 0, 0, 0, 1, 0, 1, -1, 1, -1, 1, 0, 0, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 0, -1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 0, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 0, -1, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 0, 1, 0, -1, 0, 1, 1, 1, 0, 0, 1, 0, 1, -1, 1, 1, 1, -1, 0, 0, 1, 1, -1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, -1, -1, 0, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 0, 0, -1, 0, 1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, -1, -1, -1, -1, -1, 0, 0, 0, -1, -1, 0, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 0, 0, 1, -1, 1, -1, 0, 1, -1, -1, 0, 0, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 0, 1, -1, 0, 0, 1, 0, 1, -1, -1, 1, -1, 0, -1, 1, 1, -1, -1, 0, 1, 1, 0, 0, -1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, 1, 1, 1, 1, 1, 0, 1, 0, -1, -1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, -1, 0, 1, 0, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 0, -1, 0, -1, 1, 0, 1, 0, 1, -1, 0, 1, 1, -1, -1, 0, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 0, 0, 1, -1, -1, 0, 0, 0, 0, -1, -1, 1, 1, 1, 0, 0, -1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, -1, 0, 1, 0, -1, 0, 0, -1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, -1, 1, 1, 0, 0, 0, -1, -1, 0, -1, 1, -1, 0, -1, 0, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 0, -1, -1, 0, -1, -1, -1, 0, 1, 1, -1, 0, -1, 0, 1, -1, 0, 1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 1, 0, 0, 1, 0, 1, -1, 0, 1, -1, -1, -1, 0, -1, -1, 1, 0, -1, 0, 1, -1, 1, 1, 0, -1, 1, -1, 1, -1, -1, -1, 0, -1, 1, 0, 1, 1, 1, -1, -1, 0, 0, -1, 1, 1, -1, 1, 0, -1, 1, 1, 0, 0, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 0, -1, 0, 0, -1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1, 0, 1, 0, -1, -1, 0, 1, -1, -1, 0, -1, 1, 1, 0, -1, 0, -1, 1, 1, -1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 1, -1, 0, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, -1, 0, 0, 1, 1, 0, 1, 1, -1, 1, 0, -1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 0, -1, -1, 1, 0, 1, 0, -1, -1, 0, 1, -1, 1, 0, 0, 1, 1, 0, 1, 1, 0, -1, 0, -1, 0, 0, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 0, 0, -1, 0, -1, 1, -1, 1, -1, -1, -1, 0, 1, 1, -1, -1, -1, -1, -1, -1, 0, 0, 1, 0, 1, -1, 1, 1, 0, -1, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 0, 1, 0, -1, 0, 1, 1, 1, 0, -1, -1, 0, 1, 1, -1, 1, -1, -1, -1, 0, 1, 0, -1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, -1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 0, 1, 1, -1, 0, -1, 1, 1, 0, -1, -1, 0, 1, 0, -1, 1, -1, -1, 0, 0, -1, 0, 1, -1, 0, 1, 1, 0, 1, 1, -1, 0, 0, 1, 0, -1, 1, 0, -1, -1, 0, -1, 1, 0, -1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 0, 1, 0, -1, -1, 1, -1, 1, 0, 0, 1, 0, -1, 1], "35000": [1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, -1, -1, 0, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 0, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, 0, 1, 1, 0, 0, -1, -1, 1, 0, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, -1, 0, 1, 1, 0, 0, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 0, -1, -1, 0, 0, -1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 0, -1, 0, 1, -1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 0, 0, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, -1, -1, 0, -1, 1, 1, 1, -1, 0, -1, -1, 0, 1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1, 1, 0, -1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 0, 0, 1, 1, 0, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 0, -1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0, -1, -1, 0, 1, 0, -1, -1, 1, 1, -1, 0, -1, 0, 1, -1, -1, 1, 1, 0, 0, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 0, 1, 1, -1, 1, 0, 1, 0, -1, 0, -1, 1, -1, 1, -1, -1, -1, 0, 1, 0, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 0, 0, 1, 0, 1, -1, 0, 1, -1, 1, -1, 1, 0, -1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 0, 0, -1, -1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 0, -1, -1, -1, 0, -1, 1, 1, 0, 1, -1, -1, 0, 1, -1, -1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, 0, -1, 1, 1, 1, 0, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 0, 1, 0, 0, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 0, -1, 1, 0, 0, 0, -1, -1, 1, 1, -1, 0, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, 0, -1, 1, -1, 0, -1, 1, 1, 1, 0, 0, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 0, 0, 1, -1, 1, 0, -1, 1, 0, -1, 0, 1, 0, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 0, 0, 1, 0, 0, -1, 0, -1, 0, -1, -1, 1, -1, 0, 0, 1, -1, -1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, -1, 1, -1, 0, -1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 0, -1, -1, -1, 1, 1, -1, 0, 0, 0, -1, -1, -1, 1, 0, -1, -1, -1, -1, 0, -1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, -1, -1, 1, -1, -1, -1, -1, 0, 0, 0, 1, 0, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 0, 0, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, -1, 1, -1, 0, 1, -1, 0, 1, 1, 0, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 0, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1], "40000": [-1, 1, 1, 0, 1, 1, 0, -1, 1, -1, 1, -1, 1, 1, 0, 0, 0, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 0, -1, -1, 1, 1, -1, 1, 1, 0, -1, 1, 0, -1, 1, 0, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 0, 0, 1, 1, -1, 0, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 1, 0, 0, 1, -1, -1, 1, -1, 0, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, -1, 1, 0, 0, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 0, 0, 0, 1, 0, 0, -1, 1, 1, -1, 1, 1, 0, 0, 1, 1, 1, -1, 0, 1, -1, 0, 0, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 0, 1, 0, 0, 0, 0, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 0, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 0, -1, 0, -1, -1, 1, 0, -1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 0, -1, -1, 0, 1, 1, 1, 1, 1, 0, -1, 0, 0, 1, 1, 1, -1, -1, 1, 0, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, 0, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 0, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, 1, -1, -1, 0, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 0, 0, 1, 1, -1, -1, 0, 1, 1, -1, 0, 1, 1, 1, -1, 0, -1, 0, -1, -1, 1, -1, 1, 0, 1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 0, 1, 0, -1, 1, 0, 1, -1, -1, 1, -1, 0, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, -1, 0, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 0, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, -1, 0, 1, 0, -1, 1, 0, -1, -1, 0, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 0, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 0, 1, -1, -1, 0, -1, 0, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, -1, 1, 1, 1, 0, 1, -1, 0, -1, 0, -1, -1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, -1, 1, 1, -1, 0, -1, -1, -1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 0, 1, 0, -1, 0, 0, 1, -1, -1, 1, -1, 0, 0, 1, 0, 0, -1, 0, -1, 0, 0, 1, 0, 0, 0, -1, 0, -1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 0, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 0, -1, -1, -1, 1, 1, 0, -1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 0, 1, 1, 0, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 0, -1, -1, -1, 1, 0, 0, 1, 1, 0, 0, 1, -1, -1, -1, 0, -1, -1, 0, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 0, -1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 0, 0, 1], "45000": [1, 1, -1, 0, 1, 1, -1, -1, 1, 1, 0, 1, 1, 0, -1, 1, 0, -1, 0, -1, 0, 1, 1, -1, 1, 1, -1, -1, -1, 0, -1, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 0, 1, 1, 1, -1, 0, 0, 1, 0, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 0, 0, 0, 1, 0, 0, -1, 0, -1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 0, -1, -1, 1, 0, 0, -1, 1, -1, -1, 1, 0, 0, -1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 0, 0, 1, -1, 1, 0, 1, 1, 0, -1, 1, 0, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, -1, -1, 1, -1, 0, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 0, -1, -1, 1, 0, -1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 0, 1, 0, -1, -1, 1, -1, 1, -1, 1, 0, -1, -1, 0, 1, 0, -1, 0, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 0, 1, 1, 1, 1, -1, 0, -1, -1, 0, 0, -1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, 0, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 0, -1, 0, 1, 1, 1, 0, 1, 1, -1, 1, 0, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 0, -1, 0, 1, 1, -1, -1, 0, 1, 0, 1, -1, -1, 0, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 0, -1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 0, 0, -1, 1, -1, 1, 0, 0, 0, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 0, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 0, -1, 0, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 1, 0, -1, 0, -1, -1, 0, -1, 1, 0, 1, -1, 1, -1, 0, 0, -1, 0, 1, 1, -1, 1, -1, 0, -1, 1, -1, -1, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 0, -1, -1, -1, -1, -1, 0, -1, 1, 0, -1, -1, 0, 0, -1, 1, -1, 1, -1, -1, 1, 0, 0, 0, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 0, -1, 1, -1, -1, 1, 0, 0, 1, 1, -1, -1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 0, -1, -1, 0, 0, 1, 0, 1, 0, 1, 0, -1, 0, -1, 1, -1, 1, -1, 0, 1, 1, -1, 0, -1, -1, 1, 0, 0, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 0, -1, 1, 1, -1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 0, -1, -1, 0, 0, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 0, 0, -1, 1, 1, 0, 0, 1, 1, 1, -1, 0, 0, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 0, 0, 1, 1, -1, 0, 1, -1, 0, 0, 1, -1, 0, 1, 0, 1, -1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 0, -1, 1, -1, 1, -1, -1, -1, -1, 0, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, -1, -1, -1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 0, 1, 0, 1, 1, 1], "50000": [1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, 1, -1, 1, 0, 0, 1, -1, -1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 0, 1, 0, 0, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, -1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, 1, 0, -1, 0, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 1, -1, 1, 0, -1, 1, 1, -1, -1, 0, 0, -1, 1, 0, -1, 1, 1, -1, 1, 0, 1, 1, 0, 1, -1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 0, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 0, 0, 1, 1, -1, 1, 0, 1, 1, -1, -1, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 0, 0, -1, 1, 0, 0, -1, 1, 0, 1, 1, 1, 0, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 0, 0, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 0, -1, 0, 1, 1, 0, 0, 1, -1, 1, 0, 0, 1, -1, 1, 0, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 0, 0, 1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 0, -1, 1, -1, 1, -1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 0, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 0, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 0, 0, -1, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, -1, -1, -1, 1, -1, -1, -1, -1, 1, 0, -1, 1, -1, 1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, -1, 1, 0, 0, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 0, 0, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 0, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 0, 1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 0, 1, 0, 0, 0, -1, -1, 1, -1, 1, 0, -1, 1, 1, 0, 0, 1, 0, 1, -1, 0, -1, -1, 0, 1, 1, -1, 0, 0, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 0, 1, 0, -1, -1, 0, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 0, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 0, 1, 1, 1, 0, 1, -1, 0, 1, 0, 0, 0, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 0, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 0, 0, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 0, 0, 0, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 0, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1], "55000": [-1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 0, -1, -1, -1, 1, -1, -1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 0, -1, -1, 0, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, -1, -1, -1, -1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1], "60000": [1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 0, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, 0, -1, 1, 1, 0, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 0, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 0, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, -1, 1, -1, 0, -1, 1, -1, 0, 0, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 0, -1, 0, -1, -1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1], "65000": [-1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 0, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 0, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 0, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 0, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 0, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, 0, 0, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, -1, -1, 1, 1, 0, 1, 0, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1], "70000": [1, 1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 0, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 0, 1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, -1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 0, -1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 0, -1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 0, 1, 1, 0, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1], "75000": [1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 0, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 0, 1, -1, 0, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 0, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 0, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 0, 0, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 0, -1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, -1, -1, -1, 0, 1, -1, -1, -1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 0, 1, -1, 0, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 0, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 0, -1, -1, -1], "80000": [1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 0, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 0, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 0, 0, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 0, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 0, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1], "85000": [-1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 0, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 0, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 0, 0, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, 1, 0, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1], "90000": [1, 0, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 0, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, -1, -1, 0, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 0, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1], "95000": [1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, -1, -1, 1, 1, -1, -1, 0, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 0, -1, 1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, -1, -1, 0, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 0, -1, -1, 0, -1, 0, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 0, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 0, 1, 1, 1, 1, 1], "100000": [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 0, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, -1, 1, -1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 0, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 0, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, 0, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1], "105000": [1, 1, -1, 1, -1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 0, -1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 0, -1, 0, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 0, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 0, 1, 0, 1, 1, -1, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1], "110000": [1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 0, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 0, 1, -1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 0, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 0, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 0, 0, -1, 1, 1, 1, 1, 0, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 0, 1, -1, -1, -1, 0, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1], "115000": [-1, -1, -1, 0, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 0, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 0, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 0, -1, -1, 1, 1, 0, 1, 1, 1, 1, 0, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 0, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 0], "120000": [1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, -1, -1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 0, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 0, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 0, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 0, -1, 1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 0, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 0, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 0, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 0, -1, -1, 1, 1], "125000": [-1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 0, -1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 0, -1, -1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 0, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 0, 1, 1, -1, -1, 1, 1, -1, 0, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 0, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 0, -1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 0, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1], "130000": [1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 0, -1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 0, -1, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 0, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 1, -1, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 0, 1, 0, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 0, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0], "135000": [-1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 0, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 0, -1, -1, -1, 1, -1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 0, 1, -1, -1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 1, -1, 0, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 1, 1, 0, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 0, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1], "140000": [-1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 0, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, -1, 0, 0, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 0, -1, 1, -1, -1, 1, -1, 1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 0, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 0, -1, -1, 1, 1, -1, 0, 1, -1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1], "145000": [-1, -1, -1, -1, -1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 0, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 0, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 0, 0, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 0, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 0, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 0, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1], "150000": [1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 0, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 0, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 0, -1, 0, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 0, -1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, -1, -1, 1, -1, 0, 1, 0, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1], "155000": [1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 0, 0, 1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, -1, 0, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 0, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 0, 1, -1, 1, -1, 1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 0, 0, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 0, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1], "160000": [-1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 0, 0, 1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 0, -1, -1, -1, -1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 0, 1, 0, 1, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, -1, -1, 1, -1, -1, -1, 0, 1, -1, -1, 1, 1, -1, -1, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 0, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1], "165000": [1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 0, -1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 0, -1, -1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 1, 0, -1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1], "170000": [1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 0, -1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 0, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 0, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 0, -1, -1, 0, -1, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 0, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 0, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1], "175000": [1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 1, 0, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 0, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, -1, -1, 1, -1, 0, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 0, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, -1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 1, 0, -1, 1, -1, 0, -1, 1, -1, 1, -1, -1, -1, 0, -1, 1, -1, 1, 0, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 0, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, -1, -1, 0, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 0, 1, 1], "180000": [1, 1, 1, -1, 0, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 0, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 0, 1, 0, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 0, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 0, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 0, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, -1, 0, -1, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, 0, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 0, -1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1], "185000": [1, 1, 1, 1, -1, 0, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 0, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 0, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 0, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 0, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1], "190000": [-1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 0, -1, -1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 0, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 0, -1, 1, 1, 0, -1, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 0, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, -1, 1, 0, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 0, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, -1, -1, 0, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 0, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1], "195000": [-1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 0, 1, 1, -1, 0, -1, -1, 1, -1, 1, 0, -1, 1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 0, -1, -1, -1, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 0, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 0, 1, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, -1, -1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, -1, 0, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, -1, 0, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 0, -1, 0, -1, 1, 1, 0, -1, 0, 0, 1, -1, 1, 0, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 0, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 0, 0, 1, -1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, -1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 0, -1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 0, 1, 1, 0, 0, -1, 1, -1, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1], "200000": [0, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, -1, 1, 0, -1, 0, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 0, 0, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 0, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 0, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 0, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 0, -1, 1, -1, -1, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 0, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1]} # regnn stoch: regnn_50_50_50_e-3_stoch regstoch = {"5000": [1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 0, 1, 0, 0, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 0, 1, 1, 0, -1, -1, -1, 0, 0, 1, 1, -1, 1, 0, -1, 0, -1, 0, -1, 0, 1, 1, 1, 0, 0, 1, -1, 1, 1, 0, -1, -1, -1, -1, -1, 0, -1, 1, 0, 1, -1, 1, 1, 1, 0, 0, -1, 1, 0, -1, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, -1, -1, 0, -1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 0, 1, 1, 0, 0, 1, 0, -1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 0, -1, -1, 0, 0, 1, -1, -1, -1, -1, -1, 0, -1, 1, 1, 1, 0, 1, -1, 1, 1, 0, 1, 0, 1, 0, -1, 0, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 0, -1, 0, -1, 0, -1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 0, 1, 0, -1, -1, -1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, -1, -1, 1, 1, 1, -1, 0, -1, 0, -1, -1, 0, 1, 1, 0, 0, -1, 0, -1, 0, 1, 1, -1, 1, 0, 1, -1, 1, 0, 0, 0, 1, 0, -1, -1, -1, 0, 1, 0, -1, -1, 1, 1, 0, 1, -1, -1, -1, 1, -1, -1, -1, 0, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 0, -1, 0, -1, 0, 0, -1, -1, 1, -1, -1, 1, 0, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 0, -1, 0, 1, -1, 0, 1, 1, -1, 0, 0, -1, 0, 1, 1, -1, -1, 0, -1, 1, 1, -1, -1, 0, -1, 1, 0, -1, 0, 0, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, 0, -1, 1, -1, -1, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, 0, -1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, -1, 1, 0, -1, -1, 0, 0, 1, 1, 0, -1, -1, -1, 1, -1, -1, 0, -1, 1, -1, 1, 0, 1, 0, -1, 1, 1, 0, 1, -1, 0, -1, 1, -1, 0, 1, -1, -1, -1, -1, -1, 0, -1, 1, 0, 0, 1, 0, 1, 0, -1, 1, 0, -1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, -1, 0, 0, 0, 1, 0, 1, -1, 0, 1, 0, 0, 1, 1, -1, -1, 1, 0, 1, 0, -1, 1, -1, 1, 1, -1, 0, 0, -1, -1, -1, 0, 1, 1, 0, -1, 1, -1, -1, 0, 1, 0, 1, 1, 1, -1, 0, 1, 0, -1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, -1, 0, -1, 0, 1, 1, 1, 0, 1, 0, 1, -1, -1, -1, 0, 1, 0, 1, -1, 0, 1, 1, 0, 1, -1, -1, 0, -1, 1, -1, -1, -1, 1, -1, 1, -1, 0, -1, -1, 0, -1, 0, 1, 0, 1, 1, -1, 0, 1, 1, 1, -1, 0, 1, 0, 0, 0, -1, 1, -1, -1, -1, -1, 1, 0, 1, 0, -1, -1, 1, 1, -1, 1, 0, -1, 0, 0, 1, 0, 0, 0, -1, -1, 1, 0, -1, 1, -1, 1, -1, -1, -1, 0, 1, -1, 0, 1, 0, 1, 1, -1, -1, -1, 1, 0, 0, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 0, -1, 0, -1, 0, -1, 0, -1, -1, 0, 0, 0, 1, 1, 0, 0, 1, -1, -1, 1, -1, 1, 1, 0, 0, -1, -1, -1, 0, -1, 0, -1, -1, -1, 0, -1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 0, -1, -1, 0, -1, 1, 1, 0, 1, 1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 0, 0, 1, -1, 0, 0, 0, 0, 1, -1, 0, 0, -1, 1, -1, -1, 0, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, -1, -1, 0, -1, 0, -1, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 0, 0, -1, 1, 0, -1, -1, 1, 1, 1, 0, 0, -1, 0, 0, -1, 1, -1, 0, -1, 0, 1, 0, -1, 1, 1, 0, 0, -1, 0, 1, 0, 1, -1, 0, -1, -1, 0, 1, 0, 0, -1, 0, 0, 1, -1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, -1, 1, 0, 0, -1, -1, -1, 0, -1, 0, 0, 1, -1, -1, 1, 0, 0, 1, 0, 0, -1, -1, 1, -1, -1, 0, 1, -1, -1, 1, -1, -1, -1, 1, 0, 0, 1, -1, -1, 0, 0, 0, -1, 0, 0, 0, 1, -1, -1, 0, 1, 1, -1, 0, 0, 0, -1, -1, 0, -1, 1, 0, 0, 1, -1, 1, 0, 1, 0, 0, 0, 0, 1, 0, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 0, 1, 0, 1, 0, 1, -1, 0, -1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 1, 1, -1, 0, 0, 1, 0, 0, 1, -1, 0, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, -1, 1, -1, 0, 1, -1, 0, -1, -1, -1, -1, -1, 0, -1, 1, 1, -1, 1, 0, 1, 0, -1, 0, 1, 1, 0, 1, 0, 0, 0, 1, -1, -1, 1, 0, 0, 0, 1, 0, -1, 0, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 0, 1, -1, 1, 1, 0, -1], "10000": [1, 1, 1, 0, 0, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 0, -1, 1, 0, 1, -1, 1, 1, 0, 0, 0, -1, 1, -1, 1, 1, -1, 0, 0, -1, 1, 1, 0, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 0, 0, 1, 0, 1, -1, -1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 0, 1, 1, 0, 0, -1, 1, 0, 0, 1, 1, -1, 0, -1, 1, 1, 0, 0, 1, 1, -1, 1, 0, 0, 0, 1, -1, -1, -1, -1, 1, 0, -1, 0, 1, 1, 0, 0, -1, 1, 0, 0, 1, 0, 0, 1, -1, 0, -1, -1, -1, -1, -1, 0, 1, -1, 1, 0, 0, 1, 1, -1, 1, 0, -1, 1, 1, -1, -1, 0, -1, -1, 1, 0, 1, 1, 0, -1, 1, -1, -1, 1, -1, -1, 1, 0, 0, 1, 1, 0, 0, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, -1, -1, 0, -1, 0, 1, 1, 0, 1, 0, -1, 1, 1, 1, 0, -1, 1, 1, 0, 0, 0, 0, 0, 1, 0, -1, 1, 0, 1, -1, 0, -1, 0, -1, -1, 1, 0, 0, -1, 1, -1, 1, 0, 0, 0, 0, -1, -1, 1, 0, 0, 0, -1, 0, 0, 1, -1, -1, -1, -1, -1, -1, 1, 0, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 0, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 0, 1, 0, -1, 0, -1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, 0, -1, 1, 0, 1, -1, 0, 1, 0, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 0, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, 0, 1, -1, 0, 0, 0, -1, 0, 1, 1, -1, 0, 0, -1, -1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 0, -1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 0, -1, 1, 1, -1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, -1, -1, 0, 1, 0, -1, 0, 0, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 0, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, -1, 0, 1, 0, 0, 0, -1, 1, 1, 0, -1, -1, 1, 1, 0, 0, 0, 1, 0, -1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, -1, -1, 1, 1, 0, 1, -1, 1, -1, -1, -1, 0, -1, 0, 0, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, -1, 0, 1, -1, 0, 1, 0, 1, -1, 0, 1, -1, 0, 1, 1, -1, 1, 1, 0, -1, 1, 1, 0, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, -1, 0, -1, -1, 0, -1, 1, 0, 0, -1, 0, -1, -1, -1, 1, 0, 1, 0, -1, 1, -1, 1, 1, 0, 1, 1, 0, 1, -1, -1, 0, -1, 1, -1, -1, 1, 0, -1, -1, 1, 0, 1, 1, 0, 1, 1, 1, 0, -1, -1, 0, -1, 1, 1, 1, 0, -1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 0, 0, 0, -1, 1, 1, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -1, -1, 0, 1, -1, 0, 1, 1, -1, -1, 1, 0, 0, -1, -1, 0, 1, -1, 0, -1, 0, 0, 1, 1, -1, 0, 0, -1, 1, 1, 0, 0, 0, -1, -1, 1, 0, 0, -1, -1, 1, 0, 0, -1, 0, 1, -1, 0, 1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 0, -1, 0, 1, -1, 0, -1, 1, 1, 0, -1, -1, 1, -1, 1, -1, -1, -1, 0, -1, 0, 0, 1, 1, -1, -1, 0, 0, -1, 1, 1, 0, 1, 0, -1, -1, 0, 0, 1, 1, 1, 0, -1, 0, -1, 0, 1, 1, -1, -1, -1, 1, 0, 0, 0, -1, -1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, -1, 1, 1, -1, -1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 0, 1, -1, -1, 0, 1, 0, 1, 1, -1, 1, 0, -1, -1, -1, -1, 1, 0, 1, 0, 0, -1, 0, -1, 0, 0, -1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 0, 1, 0, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 0, 1, -1, 0, 1, -1, 0, 1, 1, 1, 0, 0, 1, 1, 0, -1, 1, 0, 0, 0, 1, -1, 1, -1, 1, 0, 1, 0, 0, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 0, -1, 0, -1, 1, 1, -1, -1, -1, 0, 0, 1, -1, 1, -1, -1, 0, -1, 0, 0, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 1, 1, -1, 0, -1, -1, 1, 1, 0], "15000": [1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 0, 0, -1, 1, 0, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 0, -1, -1, 1, -1, 1, 1, -1, 0, 1, 0, -1, -1, 1, 0, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 0, 0, 1, 0, 1, -1, 0, 0, 1, 1, -1, 1, 1, -1, -1, 0, 0, 1, 0, 1, 1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 0, 0, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 0, 1, 1, 1, 0, 0, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 0, -1, 1, 1, 0, 1, 1, 0, 0, -1, 1, 1, 1, 1, -1, -1, 0, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 1, 0, -1, 0, 1, -1, 0, 1, 1, 1, 0, 0, 1, 0, -1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 0, -1, -1, -1, 0, -1, 1, 1, 1, 1, 1, 0, 0, 0, 1, -1, 1, 1, 1, -1, 0, 0, -1, -1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, -1, -1, 0, -1, 0, 1, -1, -1, 0, 0, 1, -1, 0, 0, -1, 1, 1, -1, 1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 1, 1, 0, 0, 1, 0, -1, -1, 1, -1, 0, -1, -1, -1, 1, -1, 1, 0, 0, 0, -1, 0, 1, -1, 0, 1, -1, 1, -1, 1, -1, -1, -1, -1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, -1, 0, 1, 0, 0, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 0, -1, 1, 1, 0, 1, 0, 1, -1, -1, 0, 1, 1, 1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, -1, 0, 0, 0, -1, -1, 1, -1, 0, 0, 1, -1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 0, -1, 1, 1, 0, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 0, -1, 0, 0, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, -1, -1, 0, 0, 0, -1, -1, -1, -1, 1, 0, 0, 1, -1, -1, -1, 0, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 0, -1, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1, 1, 1, 0, 1, 1, -1, 1, 0, 1, 1, -1, -1, 0, 0, 0, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 0, 1, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, -1, 0, 0, -1, 1, 1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, 0, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 0, 1, 0, 0, 0, -1, -1, 1, 1, 1, 0, 1, 0, -1, 0, 0, -1, -1, -1, 1, -1, 1, 0, 0, -1, -1, 0, 0, 0, 1, -1, -1, 1, 0, 0, 1, -1, 1, -1, -1, 0, 1, 0, 0, -1, 1, 1, 0, -1, -1, -1, 1, 1, 0, -1, -1, 0, -1, -1, 0, 1, -1, -1, -1, 0, 0, 0, -1, 0, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 0, 1, -1, 0, 1, 1, 0, -1, 0, -1, -1, -1, -1, 0, 1, 0, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, -1, 0, 1, 0, 1, -1, -1, -1, 0, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 0, -1, -1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, -1, 1, -1, 0, -1, -1, 1, 1, 0, -1, -1, -1, 1, -1, 0, -1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 0, 0, -1, 0, 0, 0, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 0, -1, 0, -1, 1, -1, 0, 0, 1, 0, 1, 0, 1, 0, -1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 1, 0, 0, 1, 1, 0, 0, -1, 1, 0, 1, 1, 0, 1, 0, 1, -1, 1, 1, 0, 1, -1, -1, -1, 1, 0, 0, 0, -1, 0, 1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, -1], "20000": [0, 0, 1, -1, -1, 1, 0, 0, -1, 0, 0, 1, 0, -1, 1, 0, 0, 0, -1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, -1, -1, 0, 0, 0, 0, 0, 1, -1, 1, 0, 0, -1, 1, -1, 1, -1, 0, 1, 0, -1, 1, 1, 1, 0, 1, 0, 0, -1, -1, 0, 1, 0, 0, 1, 0, 1, -1, 1, 0, -1, -1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, -1, 1, -1, 1, -1, -1, 1, 1, 0, -1, 0, 0, 1, 1, -1, -1, -1, 1, 0, 1, 0, -1, 1, 1, -1, 1, 0, 1, 1, -1, 0, 0, 0, 1, 1, -1, -1, -1, 1, 0, 1, 1, 0, -1, 1, -1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 0, 1, 0, 0, 1, -1, -1, -1, 0, 0, 0, 0, 1, 0, -1, 0, 1, -1, -1, -1, 0, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, -1, 1, 0, -1, -1, 0, 0, 0, 1, 0, -1, 0, -1, 1, 1, 1, -1, 0, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, 0, 0, 1, 1, 1, 0, -1, 1, 1, 1, -1, 0, 0, 0, 1, 1, -1, 0, 1, -1, 0, 1, 0, 1, 1, 1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, 0, 1, 1, 1, -1, 0, -1, 1, 1, 0, 0, 0, 0, 0, -1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 0, -1, 0, 0, -1, -1, 0, 1, -1, 0, 1, 0, -1, 1, -1, 0, -1, -1, -1, -1, 0, -1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, -1, 1, -1, 0, 0, 1, -1, -1, 0, 1, -1, 1, 1, 0, 1, 0, 0, -1, 1, -1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 0, -1, -1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, -1, 1, 1, 1, -1, -1, 0, -1, 1, 0, -1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, -1, -1, 0, 1, 1, 0, 1, 1, -1, 1, 1, 0, 0, 1, -1, 0, 1, 1, 0, -1, 1, 0, 1, 1, 0, 0, 1, 1, 1, -1, 1, 1, 0, 1, -1, -1, 0, 1, -1, 1, 1, 0, 1, 1, 1, 0, 0, -1, 1, 0, 0, 1, 1, -1, 0, 1, 0, 1, 1, 1, 0, 1, 0, -1, 1, -1, 0, 1, 0, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, -1, 0, -1, 0, -1, 0, -1, 1, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 0, 0, 0, 0, 1, -1, 1, 1, 1, 1, 0, -1, 0, 1, -1, 0, 0, 0, -1, 1, -1, 0, -1, 1, -1, 0, -1, 0, -1, 1, -1, 1, 1, 1, 0, -1, 0, 0, 1, 0, 0, 1, 1, 1, 1, -1, 0, 1, 0, -1, 0, -1, 1, 1, 1, -1, 0, -1, -1, 0, -1, 1, 1, -1, 0, 0, -1, 0, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, -1, 1, -1, 0, -1, 0, 0, 0, 1, 1, 1, 1, 0, -1, -1, 0, 1, 0, -1, -1, 0, 1, 1, 1, 1, 0, 1, -1, 0, 1, -1, 0, 0, 0, 0, 1, -1, 0, -1, -1, -1, 1, -1, 1, 0, -1, 0, 1, 1, 0, -1, 1, 0, 1, 0, 1, 1, 0, -1, -1, -1, 1, -1, 1, 1, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 0, 0, -1, -1, 1, 0, -1, -1, -1, 1, -1, 0, 1, -1, 1, -1, 1, 0, -1, 1, -1, 0, 0, 1, -1, -1, 0, 0, 0, -1, 0, 0, 1, 1, -1, 1, 1, 0, 1, -1, -1, 0, -1, 1, 0, 0, -1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 0, 0, -1, -1, 0, -1, 1, 0, 1, 1, 0, 0, 1, 0, 0, -1, 0, 1, -1, 1, -1, 1, -1, -1, 0, 1, 0, 1, 1, 0, 1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 1, -1, 0, 0, 0, 1, -1, 0, 0, -1, 0, 0, -1, 1, -1, 1, 0, -1, 1, -1, 1, -1, 0, -1, 0, 0, -1, -1, 0, 1, -1, 0, 0, 1, -1, -1, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -1, 1, 0, 1, 0, -1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, 0, -1, 1, -1, 1, 1, -1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, -1, 0, -1, 1, 0, -1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, -1, 0, 0, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 0, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 0, 1, 1, 1, 0, -1, 0, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 0, -1, -1, -1, -1, 1, 0, 1, -1, 0, 1, 0, 0, -1, 1, -1, 0, 1, 1, -1], "25000": [1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 0, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 0, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 0, -1, -1, -1, 1, -1, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 0, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 0, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1], "30000": [-1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, 0, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 0, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 0, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 0, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 0, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 0, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1], "35000": [-1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 0, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 0, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, -1, 1, 0, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, -1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 0, -1, -1, 1, 0, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 0, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 0, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0], "40000": [-1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, -1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 0, -1, -1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 0, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, -1, -1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 0, 0, 1, 1, -1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 0, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1], "45000": [-1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 0, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 1, -1, 1, 0, -1, -1, 0, -1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 0, 0, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, -1, -1, -1, 1, -1, 1, 1, 0, -1, -1, 0, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 0, 1, 0, -1, 1, 1, -1, 1, 0, -1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 0, -1, 1, -1, 0, -1, -1, -1, 1, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 0, 0, 1, -1, -1, -1, 0, 1, -1], "50000": [0, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 0, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 0, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 0, -1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 0, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 0, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 0, 0, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1], "55000": [-1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 0, -1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 0, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, -1, 1, -1, 0, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, -1, -1, 1, 1, 0, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 0, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1], "60000": [-1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 0, -1, -1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 0, 0, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, -1, -1, 1, 0, 0, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 0, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 0, -1, 0, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1, 0, -1, 1, 1, -1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 0, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1], "65000": [1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 0, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 0, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 0, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 0, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1], "70000": [1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 0, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 0, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 0, 1, -1, 0, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 0, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 0, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 0, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1], "75000": [1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 0, -1, 0, 1, 1, 1, -1, 1, 1, 0, 0, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 0, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 0, -1, -1, -1, 1, 1, 1, 0, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 0, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 0, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 0, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 0, -1, -1, 1, -1, -1, -1, 1, 1, 0, 1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 0, 1, 1, -1, -1, 0, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 0, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 0, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 0, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1], "80000": [-1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 0, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 0, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, -1, -1, -1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 0, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 0, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, 0, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 0, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, -1, -1, -1, 0, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 1, -1, -1, 1, 0, 0, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1], "85000": [1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 0, 0, -1, 1, -1, -1, 1, 1, -1, -1, 0, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 0, 0, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1], "90000": [1, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 0, 1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 0, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, -1, 1, -1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 0, 1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 0, 1, -1, -1, -1, 1, -1, -1, 1, 1, 0, -1, -1, -1, 1, 1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 0, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 1], "95000": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, -1, 0, 0, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 0, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 0, -1, 1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 1, 1, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 0, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1], "100000": [0, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 0, -1, 0, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, 0, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 0, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 0, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 0, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 1, 1, 1, -1, -1, -1, 0, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 0, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 0, -1, -1, 0, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1]} # regnn MCTS: regnn_50_50_50_e-3_stoch_mcts regmcts = {"1000": [-1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1], "2000": [-1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, 1, -1, -1, 0, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 0, 1, -1, 1, -1, 1, 1, -1, 1, -1], "3000": [1, 1, -1, 1, -1, 1, -1, 0, 0, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1], "4000": [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, -1, 0, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 0, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1], "5000": [-1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1], "6000": [-1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1]} # cnn det: cnn_10_10_10_e-3_det_1e-1_no_hist cnndet = {"5000": [1, 0, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, -1, 0, 1, 1, 1, -1, 1, 0, 1, 0, 0, 1, 0, -1, 0, 1, 0, 0, 1, -1, 0, -1, -1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, 0, 1, 0, -1, 0, 1, 0, 1, -1, -1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, -1, 0, -1, 1, 0, 1, 1, -1, 0, 1, -1, 0, 1, 0, 0, -1, 1, 1, 0, 1, 0, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 0, 0, 0, -1, 1, 1, 1, 0, 0, 0, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 0, -1, 0, -1, 0, 0, -1, 0, 0, 1, 0, -1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 0, -1, -1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, 0, 1, 0, -1, 0, 0, 1, -1, 0, -1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 0, -1, 0, 0, 1, 1, 0, 0, -1, 0, -1, -1, -1, 1, 1, -1, 0, 1, 0, -1, -1, 0, 1, 0, 1, -1, 0, 1, 0, 1, 0, -1, 1, -1, 1, 1, 0, -1, 1, 1, 0, 0, -1, -1, 1, -1, 0, 1, 0, 0, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, 1, 1, 0, 1, 0, 1, -1, -1, -1, 1, 0, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 0, -1, 0, 1, 1, 1, 1, 0, 0, -1, -1, 1, -1, 0, -1, 1, 0, 1, 0, -1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 0, 0, -1, 0, 1, -1, 1, 1, 0, 0, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 0, -1, 1, -1, 0, 0, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1, 0, -1, 1, 0, 0, 1, -1, 1, -1, 0, 0, 0, 0, 0, 1, 0, 0, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 0, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, 0, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 1, 0, 0, 0, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 0, 0, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 0, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, -1, 0, 1, -1, 1, 0, 0, -1, 0, 1, 0, -1, 0, 1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 0, -1, 1, -1, 0, 1, -1, 1, -1, -1, -1, 0, 0, 1, 0, 0, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 1, 1, -1, 0, -1, -1, 0, -1, 1, 0, -1, 1, -1, -1, -1, 0, -1, 1, -1, 0, -1, -1, -1, 1, -1, -1, -1, 0, 1, 0, 1, 0, 0, 0, -1, 1, 1, -1, 0, -1, 0, 0, -1, 1, -1, 1, -1, 0, -1, 0, -1, 1, 0, 0, 0, -1, 0, -1, 1, 0, -1, -1, 0, 1, -1, -1, 0, 0, 0, -1, -1, 0, 1, 0, -1, -1, 0, 1, 0, 1, 1, 0, 1, 1, 0, -1, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, -1, -1, 0, 0, 1, -1, -1, 0, 0, -1, 1, 1, -1, -1, 0, 1, 0, 0, -1, 0, -1, 0, -1, 0, 0, -1, -1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, -1, 0, -1, 0, 0, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 0, 1, -1, 1, -1, 0, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, -1, -1, 1, -1, -1, 0, 0, -1, 1, 1, -1, -1, 1, 1, 1, 0, -1, 1, 1, 0, 0, 1, -1, -1, 0, -1, 0, -1, -1, 0, -1, 1, -1, 0, 0, 0, 0, 0, -1, 1, 0, 1, 0, -1, -1, 1, 0, 1, 0, -1, -1, -1, 0, 0, -1, -1, 0, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 0, 0, -1, 0, 0, -1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, -1, -1, -1, -1, 1, 0, 1, -1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 0, -1, -1, 1, 1, 0, -1, 0, 0, -1, -1, 0, 1, -1, -1, 1, 1, 1, 0, 0, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 0, 1, -1, 0, -1, 1, -1, 1, -1, 0, 0, -1, 0, 1, 1, 0, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 0, -1, -1, 0, 1, 1, 0, 0, -1, -1, 0, 1, 1, -1, 1, -1, 0, 1], "10000": [0, -1, 1, -1, -1, 0, 0, 1, -1, 0, 1, 1, 0, 1, 1, 0, -1, 0, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 0, 0, 0, 1, 0, -1, 0, 0, -1, 0, -1, -1, 1, 0, 1, 1, 0, 0, -1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 0, 1, 1, -1, -1, 1, 1, 0, 0, -1, 0, -1, 1, -1, 0, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 0, 0, 1, -1, 0, 0, 1, 1, 1, 0, -1, 0, -1, 0, -1, 1, -1, 1, 1, 0, -1, 1, 1, 0, -1, 0, -1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, -1, 0, -1, 0, 1, -1, 0, -1, -1, -1, 1, 0, -1, 1, 1, 1, 1, 0, 0, -1, -1, 1, 0, 0, -1, -1, 0, 1, 1, 0, -1, 1, -1, -1, 1, -1, 1, 0, 1, 0, 1, -1, 0, 1, 0, -1, 1, -1, 0, 0, 1, -1, -1, 1, -1, 0, 0, 0, 0, 1, 1, 0, -1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, -1, 1, 0, 1, 0, -1, 1, 0, 0, -1, 1, 0, 0, 1, 1, -1, 1, 0, 1, 0, -1, 0, 0, 1, -1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 0, 0, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 0, 1, -1, -1, 0, -1, -1, 0, 0, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 0, -1, 0, -1, 1, 0, 1, -1, 0, 1, 1, -1, 0, 0, 1, 0, -1, 1, 1, 1, 0, 0, 1, -1, 0, 0, 1, -1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, 0, -1, -1, 0, 0, 0, 0, 1, -1, 0, -1, 1, 0, 0, 0, -1, 1, 0, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, -1, 0, -1, -1, 0, 0, 1, -1, 0, 0, -1, 1, 1, 0, 0, 1, -1, 1, 1, -1, 0, 1, 0, -1, -1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 0, 1, -1, -1, -1, 0, 0, -1, 0, 0, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 0, 1, 1, -1, -1, 0, 1, 1, 0, -1, -1, 1, 0, 1, 1, -1, -1, -1, 0, 1, 1, -1, -1, 1, 1, 0, 0, 1, 1, -1, 1, -1, -1, 0, 0, 1, 1, 1, -1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 0, -1, 0, -1, 0, 1, -1, 1, -1, 0, 0, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 0, 0, -1, 0, 1, 1, 1, 1, -1, -1, 0, 0, -1, 0, -1, 1, 0, 1, -1, 1, -1, 0, -1, 0, 1, -1, -1, 1, 0, -1, -1, 1, 1, 1, -1, 1, -1, 0, -1, -1, 1, -1, 0, 1, 1, -1, 1, 0, 1, 0, 1, -1, 0, -1, -1, -1, -1, 1, 0, 1, 1, -1, -1, 1, -1, 0, -1, 0, 1, 0, -1, 0, -1, -1, 1, 0, 0, 0, 0, -1, 1, 0, -1, 0, 0, 1, 1, 1, 1, -1, -1, -1, 0, -1, -1, 1, -1, -1, -1, 1, 0, 0, -1, 0, 1, 1, -1, -1, -1, 0, 0, -1, -1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 0, 1, -1, -1, 1, 0, 1, -1, -1, -1, 0, 1, -1, 0, -1, -1, 0, 1, -1, 1, -1, -1, -1, 0, -1, 1, -1, -1, -1, 1, 0, 0, 0, 1, -1, -1, -1, -1, -1, 0, 0, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, -1, 0, 1, -1, 0, 1, 0, 0, 0, 0, 1, 1, 1, -1, 0, -1, -1, 1, 1, 0, 0, 1, 1, -1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 0, -1, 0, 0, 1, -1, -1, -1, 1, 1, -1, 0, 1, -1, 0, 0, 1, 0, -1, -1, -1, -1, -1, 1, -1, -1, 1, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, -1, -1, 1, 0, 1, 0, 0, 1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 0, 1, -1, -1, 0, -1, 0, -1, 1, -1, -1, 1, 1, -1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, -1, -1, 1, 0, 0, 1, 1, -1, 1, 1, -1, 1, 0, -1, 1, 0, 1, 0, -1, 1, 1, 0, 1, -1, 1, -1, 1, 0, -1, 0, -1, -1, 1, 0, -1, 0, 0, 0, 0, 1, -1, 1, -1, 0, 0, -1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 0, 1, 1, 0, -1, -1, -1, 1, -1, -1, 0, 0, 1, 1, 0, 0, 1, 1, 0, -1, 0, 1, 0, -1, 1, 0, -1, -1, 0, -1, 1, 0, 0, -1, 0, 1, -1, -1, -1, 0, 0, 1, 0, 1, 1, -1, -1, 1, -1, 1, 1, -1, 0, -1, -1, 0, -1, -1, 0, 1, -1, 0, -1, -1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, -1, 0, 1, -1, 1, 0, 1], "15000": [-1, -1, 0, -1, 1, -1, 0, -1, 0, -1, 0, 1, -1, 1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 0, 0, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 0, 1, 1, 0, 1, 1, -1, 1, 0, 0, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 0, 1, -1, 1, 1, 0, 1, -1, 0, -1, 0, 0, 0, 0, -1, -1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, -1, -1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 0, 1, -1, -1, 0, 0, 1, 1, 1, 1, 1, -1, 0, 0, 0, 0, -1, 0, -1, 1, 1, -1, 1, 1, 0, 1, -1, 0, -1, 1, 1, 0, -1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 0, -1, 0, 0, -1, 0, 0, 1, 0, -1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 1, -1, 1, 1, 0, 0, 1, 0, 0, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 0, 1, -1, 1, -1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 0, -1, 0, 1, 1, 0, 1, 0, 0, 1, 1, -1, 1, 1, 1, 0, 1, -1, 0, -1, -1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, -1, 1, 1, 0, 1, 1, 0, 1, 0, 1, -1, -1, 1, 0, 1, -1, 0, -1, -1, -1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 0, 1, 0, -1, -1, 1, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, -1, -1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, -1, 0, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, 1, 1, -1, 0, 0, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, -1, -1, 0, 0, 1, 0, 1, -1, -1, 1, 0, 1, 0, 0, 0, 0, 0, -1, 1, 1, 0, -1, 0, 1, 0, 1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 0, 1, 1, 1, 0, 1, -1, -1, -1, 0, 1, 0, 1, -1, 1, 1, 0, 1, -1, 0, 1, 1, 1, 0, 0, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 0, 1, 0, 0, 1, 0, -1, -1, 1, 1, 1, 0, 0, 0, -1, 1, 0, 1, 1, -1, 0, -1, 0, -1, 1, -1, 1, 1, 0, 1, 1, 1, 0, 0, 0, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 0, -1, -1, 0, -1, 0, -1, 1, -1, -1, -1, -1, -1, 0, 1, 0, -1, -1, -1, 1, -1, 0, -1, 1, -1, 0, 0, 1, 0, 1, 1, 0, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 0, 0, -1, 1, 1, 1, 0, -1, 0, 0, 1, 0, 0, 1, -1, 1, -1, 0, 1, 1, 0, 1, 1, 1, -1, -1, 1, 0, 0, 0, 1, 0, 1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 0, -1, 0, -1, 0, 1, -1, 0, 0, -1, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 0, 1, 1, -1, 0, -1, 1, 0, 1, -1, 0, 0, 1, 1, -1, 1, 0, -1, 1, -1, -1, 1, 1, 0, -1, -1, 1, 0, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 0, 0, -1, 0, 0, 1, -1, 1, 0, 1, 0, 1, 0, 1, -1, 0, 1, -1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, -1, -1, 1, -1, -1, -1, 1, -1, 0, 0, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 0, -1, 0, 0, -1, -1, -1, 1, 0, -1, -1, -1, -1, 0, -1, 0, -1, 1, -1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 0, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 0, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 0, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 1, 1, 0, -1, -1, 0, 1, 0, -1, -1, -1, 0, -1, 1, -1, 0, 1, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 1, 1, 1, -1, -1, -1, -1, -1, 0, 1, 1, -1], "20000": [1, 0, -1, -1, 1, -1, 0, 1, 0, -1, 1, 0, 0, 1, 0, 0, -1, 0, 1, 1, -1, -1, 1, 0, 0, 1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 0, 0, 1, 0, -1, 0, 1, 1, 1, 1, -1, 0, -1, 0, 1, -1, 0, -1, 0, 0, 0, 1, 0, -1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 0, 0, 0, 0, 0, 1, 1, -1, -1, -1, 0, -1, 0, 1, 1, 1, 1, 1, 0, 0, -1, 0, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, 1, -1, 0, -1, 0, -1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 0, -1, -1, 1, 0, 1, 0, -1, 0, -1, 0, 0, -1, -1, 0, -1, 0, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 0, 1, -1, 1, 1, -1, 0, 0, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 0, -1, 1, 1, 1, 1, -1, 1, 0, 0, 0, 1, 1, 0, 1, -1, 1, -1, -1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, -1, 1, -1, 0, -1, 1, 0, 0, -1, 1, -1, -1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, -1, -1, 0, 1, 1, 0, -1, 0, 0, 0, 0, 1, 1, -1, 1, 1, 0, 1, 0, 0, -1, 1, -1, 1, 0, 1, 1, 0, -1, 0, 1, 1, 1, 1, -1, 0, 0, 1, 1, 0, 0, -1, 0, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 0, -1, 0, 0, -1, -1, 0, 1, -1, 1, 0, 0, -1, -1, -1, 0, -1, 1, 0, 0, -1, 0, -1, 1, -1, 0, 1, 1, 0, -1, 1, 0, -1, 1, 0, 0, 1, -1, 0, 1, 1, -1, 1, -1, -1, -1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 1, 1, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 0, 1, 1, -1, 0, 0, 0, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 0, 1, 0, -1, 1, -1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 0, -1, 1, 0, -1, 0, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 0, 1, -1, -1, 1, 0, 1, 0, 1, 1, 0, 0, -1, -1, -1, 0, 1, -1, -1, -1, 1, 0, 1, 0, 0, 1, 0, -1, -1, 1, 0, 1, 1, 1, 0, -1, 0, 1, -1, 0, -1, 1, 1, 1, 0, 0, -1, 0, 1, -1, -1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, -1, 0, -1, 0, 1, 1, -1, 1, 0, 1, 0, 1, -1, -1, -1, 0, -1, 0, 1, -1, 0, 1, 1, 0, 0, 1, 1, 1, -1, -1, 1, -1, -1, 0, -1, 1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 0, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 0, -1, -1, 1, -1, 0, 0, 1, -1, 0, 0, -1, -1, 0, 1, 0, -1, -1, 1, -1, 1, 0, 0, 1, 1, 0, 0, 0, -1, 1, 1, 0, -1, -1, -1, -1, 1, -1, -1, -1, 0, -1, -1, 0, 0, 0, 0, -1, 1, 1, 0, -1, -1, 1, 0, 1, 0, -1, -1, 0, 1, 0, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 0, 0, -1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, -1, 0, 0, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, -1, -1, -1, 0, -1, 1, 0, 1, -1, -1, 0, -1, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 0, -1, -1, -1, 1, 1, -1, -1, 0, -1, -1, -1, 1, -1, 0, 0, 0, -1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 0, 1, 1, 1, 1, 0, -1, -1, -1, 0, -1, 0, 0, 0, 1, 1, 0, -1, -1, 0, -1, 0, 0, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 0, -1, -1, 0, 1, -1, 1, -1, -1, 0, -1, -1, -1, 1, 0, 1, 1, -1, 0, 0, 1, 0, -1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, -1, 0, -1, -1, 1, 0, 1, 1, 0, 1, 0, -1, 1, 1, -1, 1, -1, -1, 1, 0, 0, 0, 1, 1, 0, -1, 0, 0, -1, 0, 1, 1, -1, 1, -1, -1, -1, 0, -1, 0, 0, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 0, 0, 0, 0, 0, 1, 0, 1, -1, 1, 0, 1, -1, 1, 0, 0, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 0, 1, -1, 1, 1, -1, 0, 1, 1, 0, 1, 1, -1, 1, 1, 0, 0, 0, -1, 1, 0, -1, 0, -1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, -1, 0, 1, 1, 0, -1, 0, -1, 0, -1, -1, 1, 1, 0, 1, -1, 0, 1, 0, 1, -1, 1, -1, 0, 1, 0, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 0, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, -1, 0, 1, 0, 0, -1, 1, 0, 1, -1, -1, -1, -1, 0, -1, -1, -1, 0, 1, -1, -1], "25000": [-1, 0, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 0, 1, 0, -1, 1, -1, 1, -1, -1, -1, 1, -1, 0, 1, -1, -1, -1, 1, -1, -1, -1, 0, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, -1, -1, 0, -1, 0, 0, 1, -1, -1, 0, -1, 0, 0, 1, -1, -1, 1, 0, -1, 1, -1, 1, -1, -1, 0, 1, 1, -1, 1, -1, -1, -1, 0, 0, 1, -1, 1, -1, 0, 1, 1, 0, -1, -1, -1, 0, -1, 0, 1, -1, 1, 1, 1, -1, 0, 1, 1, 0, -1, 1, 1, 0, 1, 0, -1, 1, -1, 0, 0, 1, 1, 0, -1, 0, 0, -1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 0, 0, -1, 1, 0, -1, 1, 1, 1, 0, 1, 0, -1, 0, 0, -1, 1, 1, 0, 0, 0, -1, -1, 1, 0, 1, 1, 0, 0, -1, 1, 1, 1, 0, 0, -1, 1, -1, 0, 1, 1, 1, 0, -1, -1, 0, -1, 1, -1, -1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 0, 0, 0, 0, -1, -1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 0, -1, 1, 1, -1, -1, 1, 0, 0, 1, 0, -1, 1, 0, -1, 1, 0, -1, 0, 1, 0, 1, 0, 1, 0, 0, 1, -1, 0, 0, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 1, -1, 0, -1, -1, 0, -1, 0, -1, 0, 1, 1, -1, 0, 0, -1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 0, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 0, 1, 0, -1, 1, 1, 1, 0, 0, -1, -1, 0, 1, 1, 1, 0, 1, 1, 0, -1, 1, -1, 1, -1, -1, -1, -1, 0, -1, 0, 1, 1, 1, 0, 1, 1, -1, -1, -1, 1, 1, 0, 0, 0, -1, -1, 0, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 0, 0, 1, -1, -1, 1, -1, -1, 1, 0, 1, 0, 0, 1, -1, 1, 1, 1, -1, 0, -1, -1, 0, 1, -1, 1, 0, 1, 0, 0, 0, 0, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, -1, 0, 1, 0, -1, -1, 0, -1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 0, 0, -1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, -1, 1, 1, 1, 0, 1, 1, 1, 0, 1, -1, -1, -1, 0, -1, 0, 1, 1, -1, 1, -1, 0, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 0, -1, 0, -1, -1, 0, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 0, 0, 0, 1, 1, 1, -1, -1, -1, -1, 1, 0, 0, 0, 0, 1, -1, -1, 1, -1, 1, 1, -1, -1, 0, -1, 1, 0, -1, -1, 1, 0, 0, 1, 0, 0, -1, 1, -1, 1, 0, -1, 0, 1, 0, 1, 0, -1, 1, 0, 0, -1, 1, 1, 0, -1, 1, 1, 0, -1, 0, -1, 0, 0, 1, 0, 1, 0, 0, -1, -1, -1, 1, -1, 1, 1, 0, -1, -1, 0, -1, -1, 1, -1, -1, 0, 1, 1, 0, -1, -1, -1, 1, -1, 0, 1, 0, 0, -1, -1, -1, 1, -1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 0, 1, 0, -1, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1, -1, -1, 1, 0, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, -1, -1, 1, 0, 0, -1, 0, -1, 0, -1, 0, 1, 0, 0, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 0, -1, -1, -1, 0, -1, 1, -1, 0, 1, 1, 1, 1, 0, 0, -1, 1, 1, -1, 0, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 0, -1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 0, 0, -1, 1, 1, 1, 0, 0, 0, -1, 0, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 0, 0, -1, 1, 0, -1, 1, -1, -1, 0, 1, 0, 0, 0, 1, 1, 0, -1, -1, 1, -1, 0, 0, -1, 0, 1, -1, -1, 1, 1, -1, -1, 0, -1, -1, 1, -1, 0, -1, 1, 0, -1, -1, 1, -1, -1, 0, -1, -1, -1, 1, 0, 0, 1, -1, -1, -1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, -1, 0, 0, -1, 0, 1, 1, -1, -1, 1, 0, 1, 0, 1, -1, 1, -1, 0, -1, 0, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 0, 1, 0, 0, 0, -1, 0, 0, 1, 1, 0, -1, 0, -1, 0, 0, 1, 1, -1, 0, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 0, -1, -1, 0, -1, -1, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, -1, 1, 0, -1, -1, 0, 0, -1, -1, 0, 0, 1, -1, -1, -1, 1, 1, 0, -1, 1, -1, 0, 0, -1, -1, 0, -1, 1, 1, -1, -1], "30000": [1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 0, 0, 0, -1, 1, -1, 1, 0, -1, -1, 1, 1, 0, 0, -1, -1, 1, -1, 1, -1, 0, -1, 1, 0, 0, 0, -1, -1, 1, 0, 0, -1, -1, 1, 0, 1, 0, -1, 0, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 1, 0, 1, 1, 0, -1, -1, 1, 0, -1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 0, 0, 0, -1, 0, 0, 0, 1, 1, -1, 1, 0, 0, 0, 1, -1, 0, 1, 0, -1, 1, -1, -1, -1, -1, 1, -1, 0, -1, 0, -1, 0, 1, 0, 1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 0, 1, -1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 1, -1, 0, 1, -1, -1, 0, 1, 0, 1, 1, -1, -1, -1, 0, 1, -1, -1, 0, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 0, 0, -1, -1, -1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 0, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 0, 0, -1, 0, -1, 0, 0, 1, 1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 1, -1, 0, 0, 1, -1, 1, 1, 0, 0, 1, 1, 0, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, -1, 0, 1, -1, 0, 1, 1, 1, 1, 0, -1, 0, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 0, 0, 1, 1, 1, 1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 1, 1, 0, 0, -1, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 0, -1, 1, 1, 1, -1, 1, 0, 0, 0, 1, 1, -1, -1, -1, 1, 1, 0, 0, 0, -1, -1, 0, 1, -1, -1, 1, 0, -1, 1, 1, 0, 1, 1, -1, 0, -1, -1, 1, -1, 0, 0, 0, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, -1, -1, 0, 0, -1, -1, -1, -1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 0, 0, 0, 0, 0, -1, 1, 0, 1, 0, 0, 1, 1, 1, 1, -1, -1, 0, -1, 0, -1, 1, -1, 1, 0, 1, -1, 1, 0, 1, -1, 1, -1, 0, 1, -1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, -1, -1, 1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 1, 0, -1, 0, 0, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 0, -1, 1, 0, 1, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 1, 0, 1, 1, -1, -1, -1, 1, 1, 0, -1, 0, 1, -1, 0, 1, 0, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 0, 0, -1, 0, -1, 0, 1, 0, 0, -1, 1, 1, 0, 0, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, -1, -1, -1, 0, 0, -1, 1, -1, 0, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, -1, 0, 1, 0, 1, 1, 1, 0, 1, 1, -1, 0, -1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 0, 1, -1, -1, 1, 1, 1, 1, -1, 1, 0, 0, -1, -1, 1, 1, 0, 0, 0, 1, 0, -1, 0, 0, -1, 0, 0, -1, -1, -1, 1, 1, 0, -1, 0, -1, 0, 1, -1, 1, -1, 1, 1, 1, 0, -1, 0, 0, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 0, 0, 0, -1, 1, 0, 0, -1, -1, 0, 1, 1, 0, 1, 0, 1, 0, -1, -1, 1, 1, 0, 1, 0, 1, 0, -1, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 0, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, -1, 1, 0, 0, 1, 1, 1, 1, 0, -1, 0, -1, -1, -1, 1, -1, 1, 0, -1, 0, -1, 0, -1, 0, 1, -1, 1, -1, -1, 1, 0, 0, 1, 1, 1, -1, -1, 1, -1, 0, -1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 0, 0, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 0, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 0, -1, -1, 1, 0, 0, -1, 0, 1, 1, -1, 0, 1, 0, -1, -1, 1, -1, 0, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 0, 0, 0, -1, 1, -1, 0, 0, -1, 0, -1, 1, -1, -1, 1, -1, 1, 1, 0, -1, 1, 0, 0, 1, 0, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 0, 0, -1, -1, 1, 0, 0, -1, 1, 1, 1, 1, 1, -1, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0, -1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, -1, 1, 0, 1, -1, 1], "35000": [1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 0, -1, 0, -1, 0, 0, 1, 1, 1, 1, -1, 0, 1, 0, -1, -1, 1, -1, -1, 1, 0, -1, -1, 0, 1, -1, 0, -1, -1, 0, -1, -1, 1, 1, 1, -1, 1, -1, 0, 0, 0, 0, -1, -1, 1, -1, -1, -1, -1, -1, 0, 0, 1, -1, -1, 1, 1, 1, 0, 0, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 0, -1, -1, 1, -1, -1, 0, 0, 0, 1, 1, -1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 0, -1, 0, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 0, 1, 0, -1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 0, -1, 1, -1, 1, 0, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 0, -1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, 0, 1, -1, 1, -1, 1, 0, 0, 1, 0, 0, 0, 1, -1, 1, 0, -1, -1, 1, 1, -1, 0, -1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 0, -1, -1, -1, -1, 1, 1, 0, -1, 1, 0, -1, 0, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 0, -1, 1, -1, -1, -1, 1, 0, 1, -1, 0, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 0, 1, 1, 0, 1, 1, -1, -1, 0, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 0, 0, -1, 1, 1, 1, 1, 0, -1, 0, 1, -1, 1, 0, 0, 1, 1, 1, -1, 0, -1, 1, 0, -1, -1, 0, 0, -1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 0, 0, 1, 1, -1, -1, 0, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 0, -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, 0, -1, 1, -1, -1, -1, 0, -1, 1, -1, 1, -1, 1, 1, -1, 1, 0, -1, 1, 0, -1, 0, 0, 1, -1, 1, 1, 0, 0, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 0, 0, -1, 1, -1, 1, 1, -1, 1, 0, -1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, -1, -1, -1, 1, 0, 0, 0, 1, 1, 0, 0, 0, -1, -1, 1, -1, 0, 0, 1, 0, 1, -1, 1, 0, -1, -1, 1, -1, -1, -1, 0, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 0, -1, -1, 0, 0, 1, -1, 1, 0, 1, 1, -1, 1, 0, -1, 0, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, -1, 1, 1, 1, 0, -1, -1, 1, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, -1, -1, -1, -1, 1, 0, -1, 1, 0, -1, 0, 0, 0, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 0, -1, -1, 0, -1, 1, 0, 0, 0, -1, 1, -1, -1, 1, 0, 0, -1, -1, -1, -1, 1, 1, -1, 1, 1, 0, 1, -1, 0, 0, 1, -1, 1, -1, 1, -1, 0, -1, 1, 0, 0, 0, 0, -1, -1, 1, 1, -1, 0, 0, 0, -1, -1, 1, -1, 1, -1, -1, 0, -1, 1, -1, 1, 0, 0, 1, 1, 0, -1, 1, -1, 1, -1, -1, 1, 0, -1, 1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 0, 1, -1, 0, -1, 1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 0, 1, 1, 1, -1, -1, 0, -1, 1, 0, 1, 0, -1, 0, -1, 0, -1, 1, 1, -1, 1, 0, 0, 0, 1, 1, 1, -1, 0, 0, -1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 0, -1, 1, 0, -1, -1, 1, -1, -1, 0, -1, 0, -1, 0, -1, 1, 1, -1, 1, -1, 0, -1, 0, 0, 1, 1, -1, -1, 0, 0, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 0, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, 1, 1, 0, 0, -1, 1, 1, -1, 0, -1, 1, 1, -1, 0, -1, -1, 1, 1, 0, 1, 0, 0], "40000": [0, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, 1, -1, 0, 1, 0, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 0, 0, 1, -1, -1, 1, 0, 1, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, -1, 1, 0, 0, 0, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 0, 0, -1, 0, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 0, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 0, -1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 0, 0, -1, -1, -1, 0, 1, 1, 1, 0, 0, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 0, -1, -1, 1, 0, 0, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 0, 0, 1, -1, -1, 0, 1, 0, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 0, 0, -1, 1, 1, 1, -1, 0, 1, 1, -1, 0, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 0, -1, 0, -1, -1, -1, 0, 1, -1, 1, 0, -1, 0, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 0, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 0, 0, 1, 1, 0, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 0, -1, 0, 0, 0, -1, -1, 0, -1, -1, 1, 1, 0, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 0, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 0, -1, -1, 0, 0, 0, 0, 1, 1, 1, 0, -1, -1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 0, -1, -1, 1, -1, -1, 0, -1, 1, -1, 1, 0, 1, 0, 1, -1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 0, -1, 1, -1, 0, 0, 1, 1, 0, 1, -1, 1, 1, -1, 0, -1, -1, 0, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 0, -1, 0, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, -1, -1, -1, -1, -1, -1, 1, 1, 0, 1, -1, 0, 1, 1, -1, -1, 1, 0, -1, 1, -1, 0, 1, -1, -1, 0, -1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 0, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 0, -1, 0, 1, 0, 0, -1, 1, 1, 1, -1, 0, -1, 0, 1, 0, 0, -1, 1, -1, -1, -1, 1, 0, 0, -1, 1, 1, -1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 1, 0, -1, 0, -1, 0, -1, -1, 0, 1, 0, 1, -1, -1, 0, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 0, -1, 1, -1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 0, 0, 1, -1, -1, -1, 0, 0, 1, 0, -1, -1, -1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 1, -1, 1, 0, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, 1, -1, 1, 0, 0, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, 0, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1, 0, 0, 0, 1, 1, -1, 0, -1, 1, 1, 1, 0, 0, 0, 0, 1, 1, -1, -1, 0, 1, 1, 1, 1, 0, -1, -1], "45000": [0, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, -1, -1, 0, 0, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 0, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, -1, 0, -1, 0, 0, -1, 1, 1, 1, 1, 0, -1, 0, 1, 1, -1, 1, -1, 0, 1, -1, 0, 0, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 0, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 0, 0, 0, -1, -1, 1, 1, -1, 0, -1, -1, 1, -1, 0, 0, 0, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 0, -1, 0, -1, 1, 0, 0, -1, -1, 0, 1, -1, -1, -1, 1, 1, 0, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 0, 0, -1, -1, 1, 1, 1, -1, 0, 1, 1, 0, -1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 0, 1, 0, 1, 1, 1, 1, 0, -1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, -1, -1, -1, 0, -1, 0, -1, 1, 1, 0, -1, 1, 0, 1, -1, 1, 1, 0, 0, 1, 1, -1, 1, -1, 1, 0, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 0, 0, -1, -1, 0, 1, 1, 1, -1, 0, 0, 1, -1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 0, 1, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, -1, 0, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 0, -1, 1, -1, 0, -1, 1, -1, 0, 1, 0, 1, -1, -1, -1, 0, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 0, 1, 0, 1, -1, -1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 1, -1, 1, 0, -1, -1, -1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 0, 1, 1, -1, -1, 1, -1, -1, 1, -1, 0, -1, -1, 1, -1, 0, 0, 1, 0, 1, 1, 1, -1, -1, -1, 1, -1, 1, 0, 0, 0, 0, 1, -1, 1, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 0, -1, 1, 0, -1, -1, 0, -1, 1, 1, 0, -1, 1, 0, 1, -1, 0, 0, 1, 0, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 0, -1, 1, 1, 0, -1, -1, 0, 0, 0, -1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 0, 1, 0, -1, -1, -1, -1, 1, 0, 0, -1, -1, 0, 1, -1, -1, -1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 0, 0, -1, 1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 0, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, -1, -1, -1, 0, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 0, -1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 0, 0, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 0, -1, -1, 1, 1, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 0, 0, -1, -1, 0, 0, -1, -1, 0, -1, -1, 0, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, -1, -1, 0, -1, -1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 0, -1, 1, -1, 0, 1, 1, -1, 1, 1, 0, -1, -1, 1], "50000": [0, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 0, 1, 1, -1, -1, 0, -1, -1, 1, -1, 0, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 0, -1, 0, 0, 1, -1, -1, 0, -1, -1, -1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, -1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 0, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, 1, -1, -1, 1, -1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 0, -1, 1, -1, -1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 0, -1, 1, 0, -1, 1, -1, 1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 0, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, -1, 1, -1, -1, 1, 0, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 0, 0, 1, -1, 0, 1, 0, -1, 1, 0, 0, 1, 1, -1, 0, 1, -1, 1, -1, 1, -1, 0, 1, 0, 1, -1, 1, -1, 0, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, -1, -1, -1, -1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 0, -1, -1, 1, -1, 0, 1, 1, -1, -1, 0, 1, -1, 1, -1, -1, 0, -1, -1, 1, 1, -1, -1, 0, 1, -1, 1, -1, -1, 1, 1, 0, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, -1, 0, -1, -1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, -1, 0, -1, -1, -1, -1, -1, 1, -1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 0, 1, 0, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 0, -1, -1, 0, 1, -1, 0, -1, -1, 1, 0, 1, 0, -1, 0, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 0, 0, 0, 0, 1, -1, 0, -1, 0, -1, 1, 1, -1, -1, -1, 0, -1, 0, -1, -1, -1, 0, 1, 1, 1, -1, -1, -1, -1, 1, 0, 1, 1, 1, -1, 0, 1, 1, 0, -1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 0, 0, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, -1, -1, 0, 1, -1, 1, -1, 0, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 0, 1, 1, -1, -1, 1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 0, -1, 1, -1, -1, 1, 1, -1, -1, -1, 0, 1, -1, 1, -1, 1, -1, 1, -1, 0, -1, -1, -1, 1, 0, 1, 1, -1, 0, 0, 1, -1, 1, -1, 0, -1, -1, -1, 1, 1, 0, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 0, -1, 0, -1, 0, 0, -1, 1, -1, -1, 0, -1, 1, 0, 1, 1, 1, 1, 0, 0, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, -1, -1, -1, 1, -1, -1, 0, 0, -1, 1, 0, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 0, -1, 1, 0, -1, -1, 1, 0, 1, 1, 1, -1, -1, 0, 1, -1, 0, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, 0, 1, 1, -1, -1, -1, -1, 0, -1, -1, 0, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 0, 0, -1, -1, 1, 0, 0, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 0, 1, 0, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 0, -1, 0, 1], "55000": [0, 1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 0, 1, 1, 0, -1, 1, 1, 1, 0, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, 1, 0, 0, -1, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 0, 1, 1, 0, 1, 0, -1, -1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 0, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, -1, -1, -1, 0, -1, -1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 0, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 0, 0, 1, -1, 0, 1, -1, -1, 1, 0, 0, -1, -1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 1, 1, -1, 1, 0, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 0, 1, -1, 1, -1, -1, 0, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 1, 0, -1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 1, 0, 1, -1, 0, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 1, 0, 0, 0, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 0, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 0, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 0, 1, -1, 1, 1, 1, 0, 0, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 0, 0, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 0, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, -1, 1, -1, 0, 0, -1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, -1, -1, 0, 1, -1, 0, 0, -1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, -1, -1, -1, -1, 1, 0, 1, -1, 0, -1, -1, -1, 1, 0, -1, 0, -1, -1, -1, -1, 0, 1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 0, 0, -1, 1, 0, 1, -1, -1, 1, 0, -1, 1, 1, -1, -1, -1, -1, -1, 1, 0, 1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 1, 0, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, -1, 1, -1, -1, 0, -1, 1, 0, -1, 1, -1, 0, 0, -1, 1, 1, 0, -1, -1, 0, 0, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, -1, -1, 0, 1, -1, -1, -1, 0, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 0, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 0, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, 1, -1, 1, -1, 1, 0, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 0, -1, 1, 1, -1, 0, 0, 1, 0, -1, 0, -1, -1, 0, 0, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 0, -1, -1, -1, 1, -1, -1, 0, -1, 0, -1, 0, -1, 1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 0, -1, -1, 1, -1, -1, 0, 1, 0, -1, -1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 0, -1, -1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 0], "60000": [1, 0, 1, -1, 1, 0, -1, 0, 0, -1, -1, -1, -1, 0, 0, 1, -1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 1, 1, 0, 1, -1, 0, 0, 1, -1, 1, 0, 1, 0, 1, -1, -1, 1, 1, -1, 1, 0, 1, 0, 0, -1, 1, 1, 1, 0, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 0, 0, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, -1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 0, -1, 1, 1, 1, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 0, -1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 0, 1, 1, 0, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 0, 0, 1, 1, 0, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 0, 1, 0, -1, 1, 0, 0, -1, 1, 0, -1, -1, 0, -1, -1, 1, -1, 1, -1, 0, 0, -1, -1, 0, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 0, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 0, 0, -1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 0, -1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 0, 1, -1, 0, 1, 0, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, -1, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, -1, 0, -1, 1, 1, -1, 1, 1, 0, 1, -1, 0, 1, -1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 0, 1, 0, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, -1, -1, 0, 1, 1, 0, 0, -1, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, -1, -1, 1, 0, -1, 0, 1, -1, -1, 0, 1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 0, -1, 1, 1, 0, 0, 1, 0, 1, -1, 0, 0, 1, -1, -1, 1, 1, -1, -1, -1, 1, 0, -1, -1, 1, -1, -1, -1, 0, 1, 1, 0, 0, 1, 1, -1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 1, 0, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, -1, 0, -1, 1, 1, 1, -1, 0, 1, 1, 0, 0, -1, 1, 1, 1, -1, -1, 0, 0, 1, 1, -1, 1, -1, 0, -1, 1, 1, 0, 1, -1, 0, 0, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, -1, 0, -1, -1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 0, 1, 0, -1, 1, 0, 0, -1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 0, 0, -1, 1, 0, -1, 0, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, 0, -1, -1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 0, -1, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 1], "65000": [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, 1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 0, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 0, 1, 1, -1, 0, -1, 1, -1, 0, 1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, 1, 0, -1, 1, -1, 1, 0, 0, 1, -1, 0, 0, 0, 1, 1, -1, -1, 1, -1, -1, -1, 1, 0, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, 1, -1, 0, 0, -1, 0, -1, 1, 1, -1, 1, 0, 1, -1, 0, 0, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, -1, -1, 1, 1, -1, 0, 1, -1, -1, -1, 0, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, -1, 1, 0, 1, 0, 0, 1, 0, -1, -1, 1, 0, -1, 0, 1, 1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 1, -1, 1, 0, -1, 0, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 0, -1, -1, 1, 0, -1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, -1, 0, 1, -1, 1, 0, 1, -1, 0, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 0, -1, -1, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 0, -1, 0, 0, -1, 1, -1, 1, 1, 0, 1, 1, 1, 0, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 0, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 0, 0, -1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 0, -1, 0, 0, 0, 1, 0, -1, -1, 0, 0, 1, 1, 0, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 0, 0, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, -1, 0, 1, -1, -1, 0, 1, 0, 1, -1, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, -1, -1, 1, 1, 0, 1, 0, -1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 0, 0, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 0, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, -1, -1, 0, 1, -1, 0, -1, 1, -1, -1, -1, 0, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 0, 0, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 1, -1, -1, 0, 0, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 0, 0, 1, 1, 0, 0, 0, 0, -1, -1, 0, 1, -1, 1, 0, -1, 1, 0, 1, -1, 0, -1, 0, -1, 1, -1, -1, -1, 0, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 0, 1, -1, -1, 1, 0, 0, -1, 0, 0, -1, 1, -1, 0, 1, 0, 1, -1, 0, 1, 0, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 0, 1, -1, 0, -1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 0, 0, 1, 1, 1, 0, -1, 1, 0, -1, 1, 1, 0, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 0, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 0, -1, 0, 1, -1, 1, 0, 1, -1, -1, 0, 1, -1, -1, 1, 1, 0, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, -1, 1, 0, -1, 0, -1, 1, 0, 1, 0, 1, -1, -1, -1, 1, -1, 1, -1, 1, 0, 0, 1, 1, 0, 0, -1, -1, 0, 0, 1, 1, 1, 0, 0, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1], "70000": [1, -1, -1, 0, 0, 0, -1, -1, 0, -1, -1, 1, -1, 0, 0, -1, 1, -1, 1, 0, -1, -1, -1, -1, -1, 1, 0, 0, 0, -1, 1, -1, 0, -1, -1, -1, -1, 1, 1, 0, -1, -1, -1, -1, 1, 0, 0, 1, 0, 0, -1, 1, 0, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 0, -1, -1, 1, 0, 0, 1, 1, 1, 1, 1, 0, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 0, 1, 0, -1, 0, 1, -1, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 0, -1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 0, -1, -1, 1, 0, -1, -1, 1, -1, 1, 0, -1, 0, 1, 0, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, -1, 0, 0, 0, -1, 1, -1, 1, 0, 0, -1, 1, -1, -1, -1, 0, 1, 1, -1, -1, 1, -1, 0, 0, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, -1, -1, -1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 1, 0, -1, 0, -1, -1, -1, 1, 1, -1, -1, 1, -1, 0, -1, 0, 1, 0, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 0, -1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 0, 1, -1, 0, 1, 1, 1, 0, 1, 0, 1, -1, 0, -1, -1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 0, -1, -1, 0, 1, 1, 0, -1, 0, 0, -1, -1, 1, 0, 1, 1, -1, -1, 1, 0, 0, 1, 1, -1, 1, -1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 0, -1, 1, -1, -1, -1, 1, 1, 0, 1, -1, 0, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 1, -1, 0, 0, 1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 1, 0, -1, 1, 1, -1, 0, 1, 1, -1, -1, 1, -1, 1, 0, -1, -1, 1, 0, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, -1, 1, -1, 0, -1, -1, -1, 0, 0, 1, -1, -1, -1, -1, -1, 1, 0, 1, 0, 0, 1, -1, 0, 1, 1, -1, -1, -1, -1, -1, 1, 1, 0, 1, -1, 1, 0, -1, 0, 1, -1, 1, 0, 1, 0, 1, -1, 1, -1, 0, 1, 1, 1, 0, 0, -1, 1, 1, -1, 1, -1, 0, 1, 0, 1, 1, -1, -1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 1, 0, -1, 0, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 0, 0, 1, -1, 0, 1, -1, 1, 1, 1, -1, 0, -1, 1, 0, -1, 0, -1, -1, -1, 1, 1, 0, 0, -1, 1, 0, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 0, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, -1, 0, -1, -1, 0, -1, 0, 1, -1, 1, -1, 0, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 0, -1, 1, 1, -1, 0, -1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 0, -1, 0, 0, 1, -1, 0, -1, -1, 1, 0, 1, -1, 0, 0, 0, 0, -1, 0, 1, -1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 0, -1, -1, 0, 0, 0, 1, 1, -1, -1, -1, 0, -1, -1, 1, -1, 0, 1, 0, 0, -1, 1, 1, -1, 1, 0, 0, 0, 1, 0, -1, -1, 1, -1, -1, -1, 1, -1, 0, 0, -1, 1, 1, -1, -1, 0, 0, 1, 0, 0, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 1, 1, 0, 0, -1, 1, 0, 0, -1, -1, 0, 1, -1, 1, -1, 0, 1, 0, -1, 1, -1, 0, -1, 0, -1, 1, 1, 1, -1, 1, 1, 0, -1, -1, 1, -1, 1, -1, -1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 1, 0, 1, 0, 1, -1, -1, -1, 0, 1, -1, 0, -1, -1, 1, -1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 0, 0, -1, -1, -1, -1, 1, 0, 1, 0, -1, 1, 1, 0, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, -1, 0, 0, -1, -1, 0, 1, 0, -1, -1, -1, 1, -1, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, 0, 1], "75000": [-1, 1, -1, 1, -1, -1, -1, -1, 0, 1, 0, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 0, 1, 1, 0, 1, 1, -1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, -1, 1, -1, -1, 0, 1, 1, 0, 0, 1, -1, -1, 1, 0, 1, 1, 0, 1, 1, -1, 1, 0, 1, -1, -1, 0, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 0, -1, -1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 0, -1, -1, -1, 1, -1, 0, 0, -1, 1, 0, -1, -1, -1, 0, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, 0, 1, 0, -1, 0, -1, -1, 1, -1, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 0, 0, -1, -1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, -1, 0, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 0, 0, -1, -1, 1, 1, -1, 1, 0, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, -1, -1, 0, 1, 1, 0, 1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 0, -1, -1, -1, 1, 0, 1, -1, -1, -1, 1, 0, 1, -1, 1, 0, 1, 1, -1, -1, 1, 0, 0, 0, 0, -1, 1, 0, -1, 1, -1, -1, 1, -1, -1, 0, -1, -1, -1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 0, -1, 0, -1, -1, -1, -1, 1, 0, -1, 1, 1, -1, -1, 0, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, -1, 1, -1, -1, -1, 0, -1, 1, 1, 1, -1, -1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 0, 1, 0, 0, 0, -1, -1, 1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 0, 0, -1, 1, -1, -1, 1, -1, 0, 1, 1, -1, -1, 1, 0, 0, 0, -1, -1, 0, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 0, -1, 0, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 0, -1, 1, 0, 1, 1, -1, -1, 1, 0, -1, 0, 1, -1, -1, -1, 0, -1, 1, -1, -1, -1, 1, -1, 0, 0, 0, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, -1, -1, -1, 0, 1, -1, 0, 0, 0, 0, 0, -1, -1, 0, 1, -1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 0, -1, 0, 1, 1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 1, -1, 0, 0, 1, 0, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 0, 0, -1, 0, 0, 1, -1, -1, 1, 0, 1, 0, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 0, -1, -1, 1, 1, -1, 0, -1, -1, 0, 0, 1, -1, 1, -1, 1, 0, -1, 0, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 0, -1, -1, 0, -1, 0, 1, -1, 1, -1, 1, -1, -1, 0, 0, 1, 1, 1, -1, -1, 0, -1, 1, -1, 1, -1, -1, -1, 0, -1, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1, 0, 1, -1, 1, 0, 0, 1, -1, 1, 0, -1, 1, 0, -1, -1, 1, 0, 0, 1, -1, -1, -1, 1, 1, 0, 0, -1, -1, 0, 1, 0, 0, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 0, 1, -1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, 0, 0, 0, 1, -1, 1, 0, 0, -1, 0, 1, 0, 1, 1, -1, 0, 1, -1, -1, 1, -1, -1, 1, -1, 0, 0, -1, -1, 1, 1, -1, 1, 0, -1, 0, 0, 0, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 0, -1, -1, 1, -1, -1, 1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1], "80000": [1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 0, -1, 1, -1, -1, 1, 0, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 0, 1, 0, 0, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 0, 0, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 0, -1, 0, 1, -1, -1, 0, -1, -1, -1, 0, 0, 1, 0, -1, 0, -1, -1, 0, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 0, -1, -1, 0, -1, 0, 0, 0, -1, -1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 0, 0, 0, 1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 0, -1, 1, 0, 0, -1, 1, -1, -1, 0, -1, 1, -1, 1, 1, 1, 0, 1, 1, 0, -1, 1, -1, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 0, -1, 1, 1, 0, -1, -1, -1, -1, -1, 0, 0, 1, -1, -1, 1, 1, -1, 0, -1, 1, 1, 0, 0, 1, -1, 1, 1, 1, 0, -1, 0, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, -1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 0, -1, 0, -1, 1, 1, 0, -1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 0, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 0, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 0, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 0, 0, 1, 1, 0, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 1, 1, 1, 0, 0, 1, -1, -1, 0, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, 0, -1, 1, 0, -1, 0, 0, 0, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 0, 1, -1, 1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 0, 0, 1, 0, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 0, 1, 1, 0, 0, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 0, 1, 0, 0, -1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 0, -1, 1, -1, 0, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 0, 0, 0, -1, 1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 0, -1, -1, -1, 0, 1, 0, -1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 0, -1, -1, -1, 0, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 0, 0, 1, 1, -1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, -1, 1, 1, 0, 1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 1, -1, 1, 0, 1, 1, -1, 0, -1, -1, 0, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 0, 1, 1, -1, -1, -1, 0, -1, -1, 1, -1, 1, 1, 0, 1, 0, -1, 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, -1, -1, -1, 0, -1, -1, -1, 1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 0, -1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 0, -1, 1, -1, -1, -1, 0, -1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 1, -1, -1, -1, 0, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, -1, 0, -1, 0, 0, -1, 1, -1, 0, -1, 1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 1, 1, -1, 0, 1, -1, -1, 1, 0, -1, -1, 0, 1, 0, 0, 1, 1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 1, -1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 0, 0, 1, 1, 0, 1, 1, -1, -1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 0, 0, -1, 0, -1, -1], "85000": [-1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 0, -1, 0, -1, 1, -1, -1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, -1, -1, -1, 0, -1, 1, 0, 0, 1, -1, 1, 1, 0, -1, 0, 0, 1, 1, -1, 0, -1, 1, 0, 0, 0, 1, 1, -1, 0, -1, -1, -1, -1, -1, 0, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 0, -1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 0, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 0, -1, -1, 0, -1, 1, -1, -1, -1, -1, 0, -1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 0, 0, 1, 1, 0, 0, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 0, -1, 0, -1, 0, -1, 0, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 0, 1, -1, 1, 1, 1, -1, -1, 0, 0, 1, 1, 0, 1, 0, 1, -1, -1, -1, 1, 0, -1, 1, 0, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, -1, -1, 0, 1, 0, 0, -1, -1, 1, 1, 0, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 1, 1, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 0, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, -1, 1, 0, 1, 0, 0, -1, -1, -1, 0, -1, 1, -1, 0, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 0, -1, 1, -1, -1, -1, 0, 1, 0, 1, 0, -1, 1, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, -1, -1, 0, 1, 0, 1, 1, -1, 0, 1, 1, 0, -1, 0, -1, 1, -1, 0, 1, 0, 1, 0, 0, -1, -1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 1, 0, 0, -1, 1, 0, 1, -1, -1, 0, 1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 0, 1, 0, 0, -1, -1, 1, 1, 1, -1, 0, -1, -1, -1, 1, -1, 1, 1, 0, -1, 0, -1, -1, 1, 0, -1, 1, 0, 1, 1, -1, -1, 0, 1, 0, -1, -1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 0, 0, 1, -1, 1, -1, -1, -1, 1, 1, 0, 0, 1, 1, -1, -1, 0, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 0, 0, -1, 1, 0, 1, -1, 0, 1, -1, 0, 1, 1, -1, 1, 1, -1, 0, 1, 0, 1, -1, 0, -1, -1, 1, -1, 0, -1, 0, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 0, 1, 0, -1, 1, 0, 1, 0, 1, 1, -1, 1, -1, 0, 1, 0, 0, -1, 0, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 0, 1, 1, 0, 0, -1, -1, -1, 0, 1, 1, -1, -1, -1, 1, -1, 0, 0, 1, -1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 0, 1, -1, 1, -1, -1, 1, -1, 1, 1, 0, -1, -1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, -1, -1, -1, 1, 1, 0, -1, 0, 1, 0, 0, -1, 1, -1, 0, -1, 0, 1, 1, -1, 1, 1, 0, 0, -1, -1, -1, 0, -1, 1, -1, 0, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 0, -1, 1, -1, 0, -1, 1, 0, -1, 1, -1, 1, 1, 0, 0, 1, 1, 1, 0, -1, 0, 1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 0, 0, 1, -1, 1, 0, 1, -1, -1, -1, -1, 1, 0, 0, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 0, -1, -1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 0, -1, 1, 0, 1, 0, -1, -1, 0, -1, -1, 1, -1, 1, 1, -1, -1], "90000": [1, -1, 1, 1, -1, 1, -1, 0, -1, -1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 0, -1, -1, 1, 0, 0, 0, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 0, 1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 0, -1, 1, 1, -1, 1, 0, -1, -1, -1, 0, 1, 1, 0, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, 1, 1, -1, -1, 0, -1, 1, -1, 0, 1, -1, 1, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, -1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, -1, -1, 1, -1, 1, 0, -1, -1, 1, 0, -1, -1, 0, -1, 1, 1, 0, 1, -1, 1, -1, -1, -1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, -1, 1, -1, -1, -1, -1, -1, 1, 0, -1, 0, 1, 1, 0, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 0, -1, 1, -1, -1, 1, 1, 0, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 0, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 0, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 0, 0, 0, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 0, -1, 0, -1, -1, -1, -1, 1, -1, -1, 0, 1, -1, 0, -1, -1, 1, 1, 1, -1, 0, 1, 0, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 0, 0, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 0, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 0, 1, -1, 1, 1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 0, 0, 1, 1, 1, 0, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, -1, -1, 0, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 0, 1, -1, 1, 1, 1, -1, 0, 0, -1, 1, 1, -1, 1, 1, 0, 1, 0, 1, -1, 0, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 1, 0, 1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 0, 1, 1, -1, 1, 0, -1, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 0, -1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 0, 0, 0, 1, 0, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, 1, 1, 0, 1, 1, -1, 1, -1, -1, -1, 0, -1, -1, 1, 0, 0, -1, -1, -1, 0, 0, 1, -1, -1, -1, -1, 1, -1, 0, 1, 1, 1, -1, -1, 0, 1, 0, -1, -1, 1, -1, 1, 0, 0, 1, 1, 0, 1, -1, -1, -1, -1, 0, 0, -1, 1, 1, 0, 0, 0, 1, -1, -1, -1, -1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, -1, 1, 1, 0, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, 1, -1, 0, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 0, -1, -1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, -1, 0, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1], "95000": [-1, -1, -1, -1, 1, 0, 1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, 0, 1, -1, -1, 1, 1, 1, 0, -1, 0, 0, 0, 0, -1, 0, -1, -1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, -1, 0, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 0, 1, -1, 1, 0, 0, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 0, 0, 1, 1, -1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 0, -1, -1, 0, -1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, -1, -1, -1, 0, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 0, 1, 1, 0, -1, 1, 0, 0, -1, -1, -1, 1, 1, 0, 1, 0, -1, 1, 0, -1, 1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, -1, -1, -1, 0, 1, -1, -1, 1, 0, 0, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, -1, 0, 0, 1, -1, 0, -1, 1, 1, 0, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 0, 0, -1, -1, 1, -1, 1, -1, 0, -1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 0, -1, -1, -1, -1, 0, -1, -1, 1, 1, 1, -1, 0, 1, 0, -1, -1, -1, 1, 0, 1, -1, -1, 0, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 0, 0, 1, -1, -1, -1, -1, 1, 0, 0, -1, 1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 1, -1, 1, 0, 0, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, 0, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 0, -1, -1, 1, 1, -1, -1, 0, -1, 1, 0, 0, -1, 0, 0, 1, 1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 1, 0, -1, 1, 0, 1, -1, 1, -1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 0, 1, 1, 0, -1, 1, -1, -1, 0, 1, 1, -1, 0, -1, 1, -1, -1, 1, 0, 0, -1, 1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, 1, 1, -1, 0, 0, 1, 0, -1, -1, -1, -1, 1, 1, 0, 0, 1, 0, 0, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 0, 1, 1, -1, 1, 0, 0, 1, -1, -1, 0, -1, 1, -1, 0, -1, 1, 0, 1, -1, 1, 1, -1, 1, 0, -1, 0, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 0, 0, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 0, 1, 0, 1, -1, -1, 0, 1, 1, 0, 1, 1, -1, 0, 0, -1, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 0, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, 0, -1, 1, -1, 0, 1, -1, 1, 1, 1, -1, 0, 1, 0, -1, -1, -1, 0, -1, -1, -1, 1, 0, -1, 1, -1, 0, -1, 0, 1, -1, -1, 1, 0, -1, -1, 0, -1, -1, -1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 0, -1, -1, 0, 0, -1, 1, 1, -1, 1, 0, -1, 0, -1, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 0, 1, 0, -1, -1, -1, -1, -1, 1, -1, 0, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 0, -1, 0, 1, -1, 1, 1, -1, 1, 0, 0, 1, 1, 1, -1, 1, 1, -1, -1, 0, -1, 1, -1, 0, 1, 1, 0, 0, 1, 1, -1, 0, 1, 1, -1, 0, -1, 1, 0, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1], "100000": [1, 0, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 0, 0, 1, 1, 0, 0, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 0, 1, 1, -1, 0, -1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 0, 1, 1, 0, 0, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 0, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 0, -1, -1, -1, -1, 0, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 0, 0, 1, 1, 0, 1, 1, 0, -1, 1, -1, 0, -1, 1, 0, 0, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 1, 1, -1, -1, -1, -1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 0, -1, -1, 0, -1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 0, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 0, 0, -1, 1, -1, -1, 1, -1, -1, 0, -1, -1, 1, 1, -1, 1, 1, 0, 0, -1, 1, -1, 1, 0, -1, 1, 0, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 0, -1, 1, 1, -1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 0, 0, 1, 1, 1, 1, -1, -1, 0, 0, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 0, -1, 0, 1, 1, -1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 0, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, 0, 0, -1, 1, 1, 1, -1, 0, 0, -1, -1, 1, 0, -1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 0, 0, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 0, 1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, -1, 0, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 1, -1, 0, 0, -1, 1, 1, -1, -1, 0, 0, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 0, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 0, -1, 1, -1, -1, 1, -1, 0, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, -1, 0, -1, 0, 1, 0, 1, 0, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 0, 1, 1, 0, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 0, -1, 1, -1, -1, 0, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, -1, 1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 0, -1, 1, -1, -1, 0, -1, 0, -1, -1, 1, 1, -1, 0, 1, -1, 0, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 0, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 1, -1, 0, 0, 1, -1, 1, 0, 1, -1, 0, -1, 1, 1, 0, 1, 1, 0, 1, 1, 1, -1, 0, 1, 1, -1, -1, -1, -1, 1, 0, -1, -1, 0, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 0, -1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1], "105000": [1, 1, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, -1, 0, 0, 1, -1, -1, 1, 1, 0, 0, 0, 0, -1, -1, 1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 0, 1, 0, -1, -1, -1, 1, 1, -1, 0, 0, -1, -1, 0, -1, 0, -1, 1, 1, 0, 1, 0, 1, -1, 0, 0, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, -1, 0, 1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 0, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, -1, 0, 1, -1, -1, 0, -1, 0, 0, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 0, 1, -1, 0, 1, -1, 1, -1, -1, 0, -1, 0, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 0, 1, -1, 1, 1, -1, -1, 1, -1, 0, -1, -1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 0, -1, -1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 0, -1, -1, 1, -1, 1, -1, 0, -1, 0, -1, 1, 1, 1, -1, -1, 0, -1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 0, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 0, -1, 1, -1, 1, -1, 0, -1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 0, -1, 1, -1, -1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, 1, 0, -1, -1, 1, -1, 1, -1, 0, 1, -1, 1, -1, 0, 1, -1, 1, 0, 0, -1, 0, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 1, -1, -1, -1, -1, 0, 1, -1, 1, 0, -1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 0, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 0, 0, -1, 0, -1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 0, -1, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, -1, 0, 0, 0, 0, 1, -1, 1, 1, 0, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 0, -1, -1, 1, 1, 0, -1, 0, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 0, -1, 0, -1, 1, -1, 1, 0, -1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, -1, 0, 1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, -1, -1, -1, 1, -1, 0, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 0, 0, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 0, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 1, -1, 0, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, -1, -1, -1, 0, 1, 1, -1, -1, 1, -1, -1, 1, -1, 0, -1, 1, -1, -1, -1, 1, 1, 0, 1, 1, 1, 0, 1, 1, -1, -1, 0, 1, 0, 0, 0, 0, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 0, 0, -1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 0, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 0, 1, -1, -1, -1, 0, -1, 1, 1, 0, -1, 1, 0, -1, 1, -1, 1, -1, 1, -1, 1, 0, 0, 1, 1, 0, 0, 0, -1, 0, -1, 0, 1, -1, 1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1], "110000": [1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, -1, 0, -1, -1, -1, 1, 0, 1, -1, 1, 0, 0, 1, 1, 1, -1, 0, -1, 0, 0, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, -1, 0, 1, 0, 1, -1, 0, 1, 1, 1, 1, -1, 0, -1, 1, 0, -1, 0, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 0, -1, 1, -1, -1, -1, -1, 1, 0, -1, 1, -1, 0, 1, 1, 0, 1, 1, -1, -1, -1, 0, 1, 0, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, 0, 0, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, -1, -1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, -1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, -1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 0, 1, -1, 1, -1, -1, 1, 0, 1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, -1, 1, -1, -1, -1, -1, 0, 0, -1, 1, 0, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, 0, -1, -1, 1, 0, -1, 0, -1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 0, 0, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 0, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 0, 1, 0, 1, 1, -1, 0, -1, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 1, 0, -1, -1, -1, 1, -1, -1, 0, 0, -1, -1, -1, 1, 0, 0, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 0, 1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, -1, -1, 0, -1, 1, -1, 0, 0, 1, 1, 0, 0, 1, -1, -1, 0, -1, -1, -1, 1, 0, -1, 0, -1, 1, -1, -1, 0, -1, 1, 1, 1, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, 0, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 0, -1, -1, 0, -1, -1, 0, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 0, -1, -1, -1, 1, 1, -1, 1, -1, -1, 0, 1, -1, 0, -1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 0, -1, 1, 0, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, -1, 1, 1, -1, -1, 1, 0, 1, 0, -1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, 0, 0, -1, -1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 0, 0, 1, 1, 1, 1, -1, -1, -1, 0, -1, 1, 0, 0, 1, -1, 1, 0, 0, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 0, -1, -1, -1, -1, -1, 0, 1, 0, -1, -1, 0, 0, -1, 0, 0, -1, -1, 1, 1, 0, -1, -1, -1, 1, 0, 1, -1, 0, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 0, -1, 0, 1, -1, 0, -1, 1, -1, 0, -1, -1, 1, -1, 1, 1, 0, -1, -1, 1, -1, 0, 1, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 0, 0, -1, -1, 1, 0, -1, -1, -1, 0, -1, 1, -1, -1, 0, 1, -1, 1, -1, 0, 1, 1, -1, 1, -1, 0, 0, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 0, -1, 0, 1, -1, -1, 1, 1, -1, 0, -1, -1, 0, 1, 1, -1, 1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 0, -1, 0, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 0, 1, -1, 1, 0, -1, 1, 1, 0, 1, 0, 1, -1, -1, -1, 1, -1, -1, 0, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 0, -1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 0, 1, 1, -1, 0, -1, 1, -1, 1, -1, -1, -1, -1, -1, 0, 1, 0, -1, -1, -1, 1, 0, 1, -1, 0, 1, 1, -1, 1, 1, 0, -1, -1, -1, -1, 0, 0, 1, -1, -1, 0, 1, 0, -1, -1, 1, -1, 0, -1, -1, 1, -1, 1, 0, -1, 0, -1, -1, 1, 1, 0, 1, 0], "115000": [0, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 0, -1, -1, 1, -1, 0, -1, 0, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 0, -1, 1, -1, 1, 1, -1, -1, -1, 0, 0, 1, 0, -1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 0, -1, 1, 0, 1, 1, 1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 0, 1, -1, -1, -1, 1, 0, -1, 1, 0, 0, -1, 1, 1, 1, 1, -1, 1, 0, 0, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 0, -1, -1, -1, 0, -1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 0, -1, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 0, 1, 1, 0, 0, 1, 1, 0, -1, 1, -1, 1, -1, 0, -1, 1, 1, -1, -1, -1, -1, 0, 1, -1, -1, -1, 0, -1, 0, 0, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 0, 0, -1, 1, 1, 0, -1, -1, 0, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 0, -1, -1, 1, 0, 0, -1, 0, -1, 0, -1, 1, 1, 1, -1, 1, 1, 0, 0, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 1, -1, 1, 0, -1, -1, -1, 1, 1, 1, 0, -1, -1, 1, 0, -1, 1, 0, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 0, 0, 0, -1, -1, 1, 1, 1, -1, 1, 0, -1, 0, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 0, -1, -1, 1, 0, 0, -1, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 0, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 0, 1, -1, 1, -1, 0, -1, 1, 1, 0, 0, -1, -1, 1, -1, 1, 1, -1, 1, 1, 0, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, 1, 0, -1, -1, -1, 0, -1, 1, 0, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, 0, -1, 1, 1, 1, -1, -1, 0, 0, -1, 1, -1, 0, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, -1, -1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 0, -1, 1, 1, 0, -1, 0, 1, 1, -1, -1, -1, 1, -1, 0, 1, -1, -1, 0, -1, -1, -1, -1, 0, 1, -1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 0, 1, 1, 0, 1, 0, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 0, -1, 0, 0, 1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, 1, 1, 0, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 0, 0, -1, 0, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 0, -1, 1, 0, 1, -1, 1, 0, 0, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 0, 1, -1, -1, 0, 1, 0, -1, 1, 1, -1, 1, 1, 0, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 0, -1, 0, 1, -1, 1, -1, 0, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 0, -1, 1, 0, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 0, -1, 1, -1, 0, -1, 0, 0, -1, 1, 0, -1, 1, 1, -1, 0, -1, 1, -1, -1, 1, -1, 0, 0, 1, 1, 1, 0, 1, 1, -1, 1, 0, 0, 0, -1, 0, -1, 1, 1, 1, -1, 0, 1, -1, -1, -1, -1, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 0, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 0], "120000": [0, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, 1, 0, 1, 0, -1, -1, -1, -1, -1, 1, 0, -1, -1, 0, 1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 1, -1, -1, 0, -1, -1, 1, -1, -1, 0, -1, 0, -1, 1, 1, 1, 1, 1, 0, 1, -1, 0, -1, -1, -1, 1, 1, -1, 0, 0, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 1, 0, 1, -1, 1, -1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, -1, -1, -1, -1, 0, 1, 0, 1, 1, -1, -1, 0, 1, 0, 1, -1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 0, -1, -1, 0, 1, 1, -1, -1, 0, 1, 0, 1, 1, 0, -1, 0, 0, 0, -1, 0, 1, -1, 0, 1, -1, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 0, 0, -1, -1, 1, -1, -1, 1, -1, 1, 0, 0, -1, -1, -1, -1, 1, -1, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 0, -1, 0, 0, 1, -1, 1, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 0, 0, 1, -1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 0, -1, -1, 1, 0, 1, 1, -1, -1, 1, -1, 1, 0, 1, -1, -1, 0, 1, -1, 1, 0, 1, 0, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, -1, -1, 0, -1, 1, 0, 0, 1, 0, -1, 0, -1, -1, -1, 1, 1, 1, -1, -1, 0, 0, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, 0, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 0, 0, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 0, -1, -1, -1, 1, 0, -1, 1, 0, -1, 1, -1, -1, 1, 0, -1, 0, 0, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, 0, 1, 0, 0, -1, 0, -1, 1, 0, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 0, 1, 0, 1, 0, -1, -1, 1, -1, 1, -1, 0, -1, -1, 1, 1, 0, 0, 1, 0, -1, 1, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 0, 1, 1, 0, -1, 1, -1, -1, -1, -1, 0, -1, 0, 1, 1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 0, -1, 1, 0, -1, -1, -1, -1, 1, 0, 1, 0, 0, -1, -1, -1, 0, 0, 1, -1, 0, -1, 1, 0, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 0, -1, -1, -1, 1, 0, -1, -1, 1, 0, 1, -1, 1, 0, 1, -1, 0, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 0, -1, -1, 1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 0, -1, -1, -1, -1, 0, -1, 0, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 0, 0, -1, -1, 1, 0, -1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 0, 1, -1, 1, -1, 1, 0, 0, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 0, -1, -1, -1, 0, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 0, 0, 0, 0, 1, 1, -1, 0, 1, 0, 0, 1, 1, -1, -1, -1, -1, 0, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, -1, -1, -1, 1, 0, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 0, 0, 0, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 0, 0, 1, 1, -1, 0, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, -1, -1, 1, 0, -1, 0, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 0, 0, 1, 1, 1, 1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 1, -1, 0, 1, 1, -1, -1, -1, -1], "125000": [-1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 0, 1, 1, 0, 0, -1, 1, -1, 0, -1, 0, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 0, 0, 1, -1, 0, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 0, -1, -1, -1, -1, 1, 1, -1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 0, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 0, -1, 1, 1, -1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, -1, -1, 0, 1, -1, -1, -1, -1, 0, 0, 1, -1, -1, 1, -1, 0, -1, 1, -1, -1, 1, 0, -1, 1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 1, -1, 1, 1, -1, 0, 1, 0, 1, -1, 0, -1, -1, 1, 1, -1, 0, 0, 1, 1, -1, 1, -1, 0, 0, 1, -1, -1, -1, 0, 1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, -1, 1, -1, 0, -1, -1, -1, 0, 1, 1, 1, 0, 1, -1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 0, 0, -1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 0, -1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 0, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, -1, 0, -1, 0, 0, 1, -1, 0, 1, 0, 1, 0, 1, 0, -1, 1, 1, -1, 1, -1, 0, -1, -1, 1, -1, -1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 0, 0, -1, 1, -1, -1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 0, -1, -1, 1, 1, 1, -1, 1, 0, 0, -1, 0, 1, 1, 0, 1, 0, -1, -1, 0, 1, -1, 1, 0, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 0, -1, 1, 1, 0, 1, 1, 1, 0, -1, -1, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 0, 0, 1, 0, 0, 1, 0, -1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 0, -1, 1, -1, 0, 1, 1, 0, 1, -1, 1, 0, -1, -1, -1, -1, 0, 0, -1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 0, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 0, -1, -1, 1, 0, 1, 0, 0, 0, 1, 1, -1, 1, 1, 1, -1, 1, 0, 1, -1, 0, -1, -1, -1, 0, 1, -1, 1, -1, -1, 1, 0, 0, -1, -1, 1, 1, 0, -1, -1, 1, 0, 0, 1, 1, -1, -1, -1, -1, 1, 0, 0, 0, 0, -1, 0, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, -1, 1, -1, 0, 1, 0, -1, 0, 0, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 0, -1, 1, 1, 1, 0, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 0, -1, -1, 1, -1, 0, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, 0, -1, 0, -1, -1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, 0, 1, -1, 0, 0, 0, 1, 0, 1, 0, 1, 0, -1, -1, 0, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1, 0, -1, 1, 0, 0, -1, -1, -1, -1, -1, 0, -1, 1, -1, 0, -1, 1, 0, -1, 0, -1, 1, 1, -1, 1, 0, 0, 0, 1, 1, -1, 0, 1, 1, -1, -1, 0, -1, 1, -1, -1, 1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, 0, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 0, -1, 0, -1, 1, 1, -1, -1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 0, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 0, 0, 1, 0, -1, -1, -1, 1, 0, -1, 0, -1, -1, -1, -1, 1, 0, 0, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 0, -1, 0, 1], "130000": [1, -1, 0, 1, -1, 0, -1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 0, -1, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 0, 0, -1, -1, -1, 1, 1, -1, -1, -1, 1, 0, 0, -1, -1, 1, -1, 0, -1, 0, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 0, -1, 0, 0, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 0, -1, -1, 1, -1, 0, 1, 0, -1, 1, -1, -1, 1, -1, 0, -1, 1, 0, 1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 0, 1, 0, -1, 1, -1, -1, -1, 1, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, 0, -1, -1, -1, 1, 0, 0, 0, 1, 1, -1, -1, 1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 0, -1, 1, 0, -1, -1, -1, 1, 1, 0, -1, 0, -1, 1, 0, 0, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 0, 0, 0, -1, -1, -1, 0, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 0, -1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 0, 1, -1, -1, 0, 0, 1, 0, -1, -1, -1, 1, -1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 0, 0, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 0, 0, -1, 1, 0, 1, -1, 1, 1, 1, 0, -1, -1, -1, 0, 0, -1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 1, 0, -1, 1, 1, -1, -1, -1, 1, 0, -1, -1, 1, -1, -1, -1, 1, -1, 0, -1, -1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 0, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, 0, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 0, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 0, 1, -1, 0, 1, -1, 0, -1, 0, 1, 0, -1, 1, 1, 0, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 0, 1, -1, -1, -1, 1, -1, -1, -1, -1, 0, 1, -1, 0, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 0, -1, -1, 1, 1, 1, 0, 1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 0, 0, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 0, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 0, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 0, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, 1, -1, -1, -1, 1, 0, -1, 1, -1, 0, 0, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 0, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 0, 1, -1, 0, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, -1, -1, 0, 1, -1, 1, -1, -1, 0, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 0, 1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 0, -1, 0, -1, 1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, 1, -1, 1, 0, 1, 1, 0, 0, 0, -1, -1, -1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 0, 1, 1, -1, 1, -1, 0, 0, -1, 1, -1, 1, -1, 1, 0, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 0, 1, -1, 0, -1], "135000": [0, 1, 1, 0, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 0, -1, 0, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 0, 0, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 1, 0, 0, 0, -1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 0, -1, 0, -1, 0, -1, 0, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 1, 0, -1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 0, 0, 1, 0, -1, 1, 1, -1, 0, -1, 0, 1, 1, -1, 0, 1, 1, 1, -1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 0, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 0, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 0, -1, 1, 0, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, 1, 1, 0, -1, 0, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 0, 1, -1, 0, -1, -1, 1, 0, 0, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 0, 0, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 0, -1, 0, 1, 0, 0, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 0, -1, 1, -1, 0, -1, -1, -1, 1, 1, -1, 1, 1, 0, 0, 1, -1, 0, 0, 1, 1, 1, 1, -1, 0, -1, 1, 0, -1, 0, -1, 0, 1, 1, -1, -1, 0, 1, -1, 0, 1, -1, 0, -1, 0, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 0, 1, -1, 0, -1, -1, 0, -1, 1, -1, 1, 1, 0, 0, -1, 1, -1, 0, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, -1, -1, 0, 0, 1, 0, 1, 1, -1, 1, 1, -1, 0, 1, 0, -1, 0, 0, 0, 1, 1, 1, 0, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 0, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 0, 0, 1, -1, 1, -1, 0, -1, 1, 0, -1, 1, -1, -1, 0, 0, -1, 1, 0, 1, 0, 0, 1, -1, 1, 1, -1, 0, 1, 1, 0, 1, -1, 0, 0, 0, 1, -1, 0, 1, -1, 1, 0, -1, -1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 0, -1, -1, 1, -1, -1, -1, 0, -1, 0, 1, -1, 1, 0, 0, 0, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 1, -1, 0, 1, 1, -1, 0, -1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 0, -1, -1, 1, -1, 0, 1, -1, 1, -1, 0, 0, -1, 0, 0, 0, -1, 1, -1, 1, 0, 0, 1, 0, 1, -1, 0, -1, -1, -1, 0, 0, 1, 1, 1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 0, -1, -1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, -1, 0, -1, 1, 1, -1, -1, 0, 1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 0, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 0, 1, 0, 1, 0, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, -1, -1, 0, 0, 1, 0, 1, 1, 1, 1, 1, -1, 0, -1, -1, 0, 1, 0, 0, 1, -1, 1, -1, 1, -1, 0, 1, 1, 0, -1, -1, 0, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 0, -1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 0, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1], "140000": [1, 0, -1, -1, 1, 1, 0, -1, 1, -1, 1, -1, 1, 1, 0, -1, 0, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, -1, 1, -1, 0, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, 0, -1, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, -1, 0, 0, 1, 1, 0, -1, 1, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, 1, 0, -1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 0, 0, -1, -1, 1, -1, 1, 0, 1, 0, 0, -1, 0, -1, -1, -1, 0, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 0, 1, 0, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 0, 0, 1, 1, 1, -1, 0, -1, -1, 1, -1, 1, 1, 1, 0, -1, 0, 1, 0, 0, -1, -1, -1, -1, 0, -1, -1, 0, 1, -1, 0, -1, 0, -1, 0, 1, -1, 0, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, -1, 1, -1, 0, 1, 1, 0, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 0, -1, 1, -1, 0, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, 1, 0, 1, -1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, -1, 0, 1, 1, 1, 1, -1, 0, -1, 1, 1, -1, 1, -1, -1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, -1, -1, 1, -1, -1, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 0, -1, 0, 1, 1, -1, -1, 0, 1, 1, -1, 0, 0, 0, -1, 0, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 1, -1, -1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 1, 0, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 0, 1, 1, -1, -1, 0, 1, -1, -1, 1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 0, 0, 1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 0, 1, -1, -1, 0, -1, 1, 0, 1, -1, 1, -1, -1, 0, 1, -1, 1, 0, 0, 1, 1, 0, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 0, 0, -1, 1, 0, -1, -1, 1, -1, 0, -1, 1, -1, -1, -1, -1, -1, 0, 0, -1, 1, 0, -1, 1, 1, -1, 1, -1, 0, 1, 0, 1, -1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, -1, 0, -1, -1, -1, 0, 1, -1, -1, -1, 0, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, -1, 0, 0, 1, 1, 1, -1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, -1, 0, -1, 1, 1, 0, -1, 1, 1, -1, -1, 0, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 0, 1, 0, -1, 0, -1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, -1, 0, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 0, -1, -1, -1, 1, -1, -1, -1, 0, 0, 1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, -1, 0, 0, 0, 1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 0, 0, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 1, -1, 0, -1, -1, 1, 0, -1, 1, -1, -1, -1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 0, 1, -1, -1, 1, 0, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 0, -1, -1, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 0, -1, 1, 1, -1, 0, -1, 1, -1, 0, 0, -1, 1, -1, 1, 1, -1, -1, 1, 0, -1, -1, 1, -1, -1, 1, -1, 1, 0, 0, -1, 1, -1, -1, -1, 0, -1, 1, 0, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 0, 0, -1, -1, 1, 1, 1, 0, 0, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 0, -1, 1, 1, -1], "145000": [0, -1, 0, 0, 0, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 1, -1, 1, -1, 0, 1, 0, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 0, 1, 0, 0, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 0, -1, -1, 0, -1, 0, 1, 1, 1, 1, 0, 1, 1, 0, -1, 0, -1, -1, 1, 0, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 0, 1, 1, -1, 1, 1, 1, 0, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 1, -1, 0, 1, 0, -1, -1, 1, -1, 1, 0, -1, -1, 1, -1, -1, -1, 1, 0, -1, -1, -1, 1, 1, -1, -1, 0, -1, -1, 1, -1, 0, 1, -1, 0, 1, 0, 1, 1, 0, -1, -1, -1, 1, 1, 0, -1, -1, -1, -1, 1, 0, 1, -1, 1, 0, 0, -1, 1, -1, -1, 1, 0, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 0, 1, -1, -1, 1, -1, -1, 0, -1, 1, 1, -1, 1, -1, -1, 0, 0, 0, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 0, 0, -1, 1, -1, 1, -1, 1, 0, -1, 1, 0, 0, 1, 0, 0, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 0, -1, -1, 0, -1, -1, -1, -1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, 1, 0, 1, 0, -1, -1, 1, 0, 1, 0, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 0, -1, 0, 1, -1, -1, -1, -1, -1, 0, -1, 0, 1, 0, 1, -1, -1, 1, -1, -1, -1, 1, -1, 0, -1, 0, -1, 1, -1, 1, -1, -1, -1, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, 0, 0, 0, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 0, 1, 0, -1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 0, 0, 0, -1, -1, 0, -1, -1, -1, 1, 1, -1, -1, 1, -1, 0, -1, 1, 1, 0, 0, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, -1, 0, -1, 0, -1, -1, -1, 1, -1, 1, 1, -1, -1, 0, 1, 0, 0, 1, -1, 0, -1, -1, -1, 0, 0, -1, 1, -1, -1, -1, -1, 1, 0, -1, 1, -1, 0, 1, 0, 1, 1, 0, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 0, -1, -1, 1, 1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, -1, -1, 1, 0, 1, 0, -1, 1, -1, -1, -1, 0, 1, 0, 0, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 0, -1, -1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 0, -1, -1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 0, -1, -1, -1, 1, 0, 1, 1, 1, -1, 0, -1, -1, 0, -1, 0, 1, 1, 0, -1, -1, -1, -1, 0, 1, 0, 1, 0, 0, -1, -1, 0, -1, 1, 0, 1, -1, -1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 0, -1, -1, -1, -1, -1, 1, 0, -1, -1, -1, -1, 1, 0, 1, -1, 1, -1, -1, 0, 0, 1, 1, -1, -1, -1, -1, 0, 0, 0, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 0, -1, 1, 1, -1, 1, 0, -1, 0, 0, 1, 1, -1, 0, 0, 1, -1, -1, 1, 0, 1, -1, -1, 0, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 0, 0, -1, 1, 0, 1, -1, -1, -1, -1, -1, -1, -1, 1, 0, 1, -1, 0, -1, 1, -1, 1, 0, 1, -1, 0, -1, 1, -1, 1, 1, 0, -1, 0, -1, 1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 1, 1, 1, -1, 1, -1, 0, -1, 1, 1, 0, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 0, -1, 1, -1, -1, -1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 1, 1, 0, -1, -1, 1, -1, -1, 0, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, 0, 1, -1, -1, 0, -1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1], "150000": [1, 1, 1, -1, -1, -1, -1, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 0, -1, -1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 0, 0, -1, 0, 0, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 0, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, -1, -1, 0, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 0, -1, 1, -1, 0, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 0, -1, -1, -1, -1, -1, -1, 1, -1, 0, 1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 0, -1, 0, -1, -1, 1, 0, 1, 0, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 0, -1, -1, -1, 0, -1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, -1, 1, -1, -1, -1, -1, 0, 1, -1, 0, 0, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 0, -1, -1, -1, -1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 0, 0, 1, -1, -1, -1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 0, 1, 1, 1, 0, -1, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, 0, 1, 1, -1, 0, -1, 1, 1, 0, -1, 0, -1, 1, -1, 1, -1, 0, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 0, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 0, -1, -1, -1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 0, -1, 0, -1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 0, -1, -1, -1, -1, 0, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 0, -1, -1, 1, -1, -1, 0, 0, 1, 1, 0, -1, -1, 1, 0, 1, -1, -1, 1, -1, -1, 0, 1, 0, 1, -1, 1, 1, 0, 1, -1, 1, 1, 0, -1, 1, 1, 1, 0, 0, 1, -1, -1, 1, -1, 0, 0, 1, 0, -1, 1, -1, 0, -1, 1, 1, 1, -1, 0, 1, 1, 0, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 0, 0, -1, 0, -1, 1, -1, -1, 1, -1, -1, -1, 0, -1, -1, 0, -1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 0, 1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 0, 1, -1, 0, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, -1, -1, -1, 0, 1, 1, 0, 0, 1, 0, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, -1, -1, -1, -1, 1, 0, 0, -1, 0, -1, -1, -1, 1, 0, 0, -1, -1, 1, -1, 1, 0, -1, 0, -1, 1, -1, -1, 0, 1, -1, 0, 1, 0, -1, 1, -1, -1, -1, 1, 1, 0, -1, -1, 0, 1, 1, 1, 0, -1, -1, 1, 1, 0, 0, 1, -1, 1, 1, -1, 1, -1, 1, -1, 0, 0, -1, -1, 0, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 1, 1, -1, 0, -1, 1, -1, 0, -1, 1, 1, -1, -1, 1, 1, 0, -1, 0, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 0, -1, -1, 0, -1, 0, 1, 1, 1, 0, 0, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 0, -1, -1, 1, 1, -1, 0, -1, 0, 0, 1, 0, -1, -1, 1, 1, 1, 1, -1, 0, -1, 1, 0, 1, 1, -1, 0, 0, -1, 0, -1, 0, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, -1, -1, 0, -1, -1, -1, 0, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, 1, -1, -1], "155000": [1, 1, 1, 1, 1, -1, -1, -1, 0, 0, 0, 1, 1, -1, -1, -1, 1, -1, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, -1, 1, 1, -1, 0, 0, 0, 1, -1, 1, 1, -1, 1, -1, 0, -1, 1, -1, 1, 0, -1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, 0, -1, 0, 0, 0, 1, 0, 1, -1, 1, 1, -1, 0, -1, 0, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 0, 0, 1, 1, -1, -1, -1, -1, 1, -1, -1, 0, -1, 0, -1, 1, -1, 1, 0, 1, 1, -1, 0, -1, 0, 1, -1, -1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, -1, -1, 0, -1, -1, -1, -1, -1, 1, -1, -1, 0, 0, -1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 0, -1, 0, -1, -1, -1, 1, -1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 0, -1, 0, -1, -1, 1, -1, 1, 0, -1, 1, 0, -1, 1, 0, 1, -1, -1, 0, 0, -1, -1, -1, 0, 1, -1, 0, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 0, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, -1, 1, 1, 0, -1, 0, -1, 0, 1, -1, 1, 1, 1, 0, 0, 0, -1, -1, 0, 1, 0, -1, 1, -1, 1, -1, 1, 0, 0, 0, 1, -1, -1, 1, 1, 0, 1, 0, 1, 1, -1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, -1, 1, 0, -1, -1, 1, -1, -1, 1, 1, -1, 0, 1, -1, -1, -1, 1, -1, 1, 0, -1, 1, -1, 0, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 0, -1, -1, 0, 0, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 0, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 1, 1, -1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 0, -1, -1, -1, -1, -1, 0, -1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 0, 0, -1, -1, 1, -1, 0, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, -1, -1, 0, -1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 0, -1, -1, 1, 1, 1, -1, 0, -1, 1, 0, -1, 1, -1, -1, 0, 1, 1, 1, 0, -1, 0, 0, -1, 0, 1, 1, 1, -1, -1, -1, 0, -1, 0, 1, -1, 0, 1, -1, 1, -1, -1, 1, -1, 0, -1, 0, -1, 0, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, -1, -1, 0, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, -1, -1, -1, 0, -1, -1, 0, 1, -1, 0, 0, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0, -1, 1, -1, -1, -1, -1, -1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 0, 1, 0, -1, 0, 0, 1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 0, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 0, 0, 1, 0, 0, -1, -1, -1, 1, 0, 1, -1, 0, -1, -1, 1, -1, 1, 1, 0, 0, -1, 1, 0, 1, -1, -1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 0, -1, -1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, -1, 0, 0, -1, 0, 1, -1, 1, -1, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 0, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 0, 1, 0, 0, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 0, -1, 1, 0, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, 0, 1, -1, -1, 0, 0, 1, 1, 1, -1, 0, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 0, -1, 0, -1, 0, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 0, 0, -1, -1, 1, 1, -1, 0, 1, 0, 1, 1, -1, 0], "160000": [1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 0, 1, 0, 0, -1, 1, 0, -1, 1, 0, -1, -1, -1, 0, -1, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 0, -1, 1, -1, 0, 0, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 0, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 0, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 0, 0, 0, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 0, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 0, -1, 1, 0, 1, -1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 0, 0, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 0, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 0, 0, -1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 0, 1, -1, 1, 1, 1, -1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, -1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, -1, 0, -1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 0, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, -1, 0, 1, 1, -1, 1, 0, 1, 0, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 0, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 0, 0, 1, -1, -1, 0, -1, -1, -1, 1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 0, -1, -1, 1, -1, 0, 1, 1, 1, -1, 0, 1, -1, -1, 0, -1, -1, -1, 0, 1, 0, 1, -1, 1, 1, 0, -1, 1, -1, 0, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, -1, 0, 0, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 0, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, -1, 1, 0, 1, 0, -1, 0, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 0, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 0, 0, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, 0], "165000": [0, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 0, 1, 0, 1, 1, 1, -1, 1, -1, -1, -1, 0, -1, 1, 0, -1, -1, -1, 1, -1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 0, -1, 0, 0, -1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, -1, 0, 0, -1, 0, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 0, 1, 0, 1, -1, 0, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 0, 1, 0, 0, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 0, -1, 0, 1, 0, -1, 1, 1, 1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 0, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 0, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 0, -1, 0, 1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 0, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 0, 0, 0, 1, -1, -1, 1, -1, -1, -1, 1, -1, 0, -1, -1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, -1, 0, -1, 0, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 0, -1, 1, 1, -1, -1, -1, 1, 0, -1, -1, -1, -1, 1, 0, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 0, -1, 1, 1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, -1, 0, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 0, 1, 1, 0, 1, 0, -1, 1, -1, 1, -1, 1, -1, 0, 0, -1, 0, 0, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 0, -1, -1, -1, -1, 0, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, -1, 0, 1, 1, -1, 1, -1, -1, -1, -1, 1, 0, -1, -1, 1, 0, 1, 0, -1, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 1, -1, -1, -1, 1, -1, 0, -1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 0, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 0, 1, -1, -1, -1, 1, 0, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 0, -1, 0, -1, -1, 1, -1, 0, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 0, -1, -1, 0, 1, 0, -1, 1, -1, -1, -1, -1, -1, -1, 0, 1, 0, 1, 1, 1, -1, -1, -1, 0, -1, -1, 1, 1, 1, 0, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 0, 0, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 0, 0, 1, -1, 0, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 0, -1, -1, 0, -1, 1, 0, -1, -1, 1, -1, 1, 1, 0, 0, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 0, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 0, -1, 1, 1, 0, 1], "170000": [0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 0, 1, -1, -1, 0, 1, 1, -1, 0, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 0, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 0, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, -1, -1, -1, 1, -1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 0, 1, 0, 1, -1, -1, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 0, -1, 1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, -1, 0, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 0, -1, -1, -1, -1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 0, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 0, 1, 0, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 0, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 0, 1, 0, -1, 0, 1, 1, 1, 0, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 0, -1, 0, -1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 0, -1, 0, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 0, -1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 0, -1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 1, -1, -1, -1, 1, -1, 0, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 1, -1, 0, -1, 0, -1, 0, 1, -1, 1, 1, 1, 0, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 0, 1, -1, -1, 1, -1, 0, -1, 0, 1, -1, -1, -1, 0, 0, -1, 1, 0, -1, -1, 1, 0, -1, -1, 1, -1, 1, 1, 0, -1, -1, 1, -1, 0, -1, 1, 1, 0, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, 0, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 0, 0, -1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 0, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 0, -1, 0, 0, 1, 1, -1, 1, 1, -1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 0, 1, 1, -1, -1, 0], "175000": [1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 1, 1, -1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 0, 1, 1, 0, 1, 1, 0, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 0, 0, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 1, 0, 0, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 0, -1, 0, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 0, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 0, -1, 0, 1, 1, -1, 0, 1, 0, 0, -1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 1, -1, -1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 0, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 0, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, -1, 1, 1, -1, 0, -1, -1, 1, 1, -1, 0, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 0, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 0, -1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 0, -1, 1, -1, -1, -1, -1, 1, 0, 1, 0, -1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, -1, 1, -1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, -1, 1, 1, -1, 1, 1, 0, -1, -1, 1, -1, 0, -1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, -1, -1, 1, 0, -1, 1, 0, 1, -1, -1, 1, -1, 0, 1, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, -1, 0, -1, 1, -1, 1, 1, 1, 0, 0, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 0, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, 0, 1, 1, 1, 0, 1, -1, 1, 0, 1, 0, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 1, -1, 0, -1, 1, 1, -1, -1, 1, 1, 1, 0, 0, 0, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 0, 0, 1, 1, 1, -1, -1, 1, 1, 0, 1, 0, -1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 1, -1, 0, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1], "180000": [1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 0, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 0, -1, 1, 0, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, -1, 1, 1, 0, 1, 1, 1, 0, -1, -1, 1, -1, 1, 0, 1, 0, -1, 1, -1, 0, 1, 1, -1, 1, 0, 0, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 0, -1, 1, 1, 1, -1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 0, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 0, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 0, -1, -1, -1, 0, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 0, 1, 1, 1, 1, 0, -1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 0, -1, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 0, 0, 0, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 0, 0, -1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 0, 0, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 0, 0, 0, -1, -1, 1, 0, -1, -1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 0], "185000": [1, 1, 1, 1, -1, 0, 1, -1, 1, 0, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 0, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 0, 0, 0, -1, 0, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 0, 1, 1, 1, 0, 1, -1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, 0, 1, 1, 0, 1, 1, -1, -1, -1, 0, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, 0, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 0, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 0, 1, -1, 0, 0, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 0, 0, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, -1, 0, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 0, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 0, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 0, 0, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 0, 0, 1, 1, -1, 1, 1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 0, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 0, -1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1], "190000": [1, -1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 0, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 0, 0, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 0, 1, 0, 0, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 0, -1, 1, 0, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 0, 1, 0, 1, 1, 1, 1, -1, 1, 0, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 0, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 0, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 0, 1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, 0, 1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 0, 0, 1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, -1, 1, 0, 1, 0, -1, 1, -1], "195000": [1, -1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 0, 1, 0, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 0, -1, -1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 0, 1, 1, -1, 0, -1, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 0, 1, 1, 0, 0, -1, -1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, -1, -1, 0, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 0, -1, 0, 1, 1, -1, 1, 1, 0, -1, -1, 0, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, -1, 1, -1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 0, 1, 1, -1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 0, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 0, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, -1], "200000": [1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 0, 1, 0, 1, -1, -1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, -1, 0, -1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 0, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 0, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, 1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 0, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, -1, 1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 0, -1, 1, 1, -1, 0, 1, 1, 1, -1, 0, -1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, -1, 0, -1, -1, 1, 1, 0, -1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 0, 1, -1, -1, 0, 1, 1, 1, -1, 1, 0, 0, -1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 0, 0, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 0, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 0, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1]} # cnn stoch: cnn_10_10_10_e-3_stoch cnnstoch = {"5000": [1, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 0, 0, 1, 1, -1, 1, 1, 1, 0, 0, 1, -1, 0, -1, 1, -1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, -1, 1, 0, 1, 0, 0, -1, 0, -1, -1, 0, 1, 1, -1, 0, -1, 1, -1, -1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, -1, -1, 0, -1, 1, -1, 0, 0, 1, 1, 0, -1, 1, -1, -1, -1, 1, 0, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 0, -1, 0, 1, 0, 1, -1, 0, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 0, -1, 1, -1, 0, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 0, 1, 1, 1, -1, -1, 1, 1, 0, 0, 0, 1, -1, 1, 0, 1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, -1, 1, -1, -1, -1, -1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, -1, 1, 0, 1, 1, -1, 0, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 1, -1, 0, 1, 0, 1, -1, 1, 0, 1, -1, 0, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 0, 0, 1, 1, 1, 0, -1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, -1, 1, -1, 1, -1, 0, -1, 0, 0, -1, 1, 1, 0, 1, 0, -1, -1, 1, 0, 0, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, -1, 1, -1, 0, 0, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, -1, 1, 0, 1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 0, 0, 1, -1, -1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, -1, 0, 1, -1, -1, 1, 1, -1, 0, -1, 0, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, -1, 1, -1, -1, 0, -1, 1, 0, 1, -1, -1, 1, 1, 1, 0, 1, -1, -1, 0, 0, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 0, -1, -1, 0, -1, -1, 1, -1, 1, 0, 0, 1, 0, -1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 0, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, 1, 1, 0, 0, -1, 1, 1, -1, 0, -1, -1, 0, 0, -1, 0, 1, 0, 1, -1, 0, 1, -1, -1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, -1, -1, 0, 1, -1, -1, -1, -1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 1, 0, 1, -1, 1, -1, 0, -1, -1, 1, 1, 1, -1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 1, -1, 1, 0, 0, 1, 1, -1, -1, 1, -1, -1, 0, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 0, 1, -1, 1, 1, -1, 1, 1, -1, 0, 0, 1, 0, -1, 1, 0, 1, 1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 0, -1, 0, 1, -1, 1, 0, 0, -1, -1, 1, -1, 0, 1, -1, -1, 1, -1, -1, 0, 0, -1, -1, -1, 0, 0, -1, 0, 0, 1, 0, -1, 0, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 0, -1, 1, 0, 0, -1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 0, -1, 1, 0, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 0, -1, 0, 0, -1, -1, 0, 1, 1, -1, 0, 0, 0, -1, -1, -1, 0, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 0, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 0, 1, -1, 0, -1, 0, -1, 0, 1, -1, 1, 1, -1, -1, 1, -1, 0, -1, 1, -1, 1, 0, 0, -1, 1, 1, 0, 0, 1, -1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 0, 1, 0, 1, -1, -1, 1, 0, -1, 0, 0, -1, -1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 0, 0, 1, 1, 1, -1, 1, 0, -1, 1, 1, 0, -1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 0, 0, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 0, 1, -1, 1, -1, -1, 0, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 0], "10000": [-1, 0, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 0, 0, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 0, 1, 0, 1, 0, 1, 1, -1, 1, 1, 0, -1, 1, -1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, -1, 0, 0, 1, 0, 1, 1, -1, 1, 1, 0, -1, -1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, -1, 1, 0, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 0, -1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 0, 0, 1, 1, -1, 1, 0, -1, 0, 1, -1, 1, -1, 1, 0, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 1, 0, 1, -1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 0, 1, 0, 1, -1, 0, 0, -1, 1, 1, 1, 0, 1, 0, -1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, -1, -1, 1, 1, 1, -1, 1, 0, 1, 0, 1, -1, 1, -1, 0, 1, 1, 0, 1, 1, 1, -1, -1, 1, -1, -1, 1, 0, 0, 1, -1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, 0, 1, -1, 0, -1, 1, -1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, -1, 1, 0, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 0, 0, 1, 1, -1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, -1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, -1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 0, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, -1, 0, 0, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 0, -1, 0, -1, 1, 1, -1, -1, 0, 1, 0, 1, -1, -1, 0, 1, 0, 0, 1, 0, -1, 1, 1, 1, -1, 0, 1, -1, 1, 1, -1, 0, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, -1, 1, 0, 1, -1, 1, 0, 1, -1, 0, -1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 1, -1, 1, -1, 1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 0, 1, 0, 0, 1, -1, 1, -1, 1, 0, -1, 1, 0, -1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 0, 0, 1, -1, 1, 0, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, 0, 0, 1, 0, -1, 1, 1, -1, -1, -1, 0, 0, 0, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 0, 0, -1, -1, 1, 1, -1, 1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 0, 0, -1, 0, -1, 0, 1, 0, 1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 0, 0, -1, -1, 1, -1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 0, 1, 0, 1, -1, -1, 0, 1, 1, 1, -1, 0, 0, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 0, -1, 1, 0, 1, -1, 0, 0, 0, 0, -1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 1, -1, 0, 0, 0, 1, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 0, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1], "15000": [1, 0, 1, -1, 1, 1, -1, 0, 0, -1, 1, 1, 0, 1, 1, 0, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 0, -1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, -1, 1, 1, 1, 0, -1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, -1, 0, 0, 0, 0, -1, 1, 0, -1, -1, 0, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, 0, 1, 1, 1, 1, 0, 1, -1, 0, 1, -1, 1, 0, -1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 0, 0, 0, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, -1, 0, 1, 0, 1, -1, 0, -1, -1, 1, 1, 1, 0, -1, 0, 0, 1, 0, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 0, 1, 0, 1, -1, 0, -1, 0, 0, 1, 0, 1, 1, 0, -1, 0, 1, 0, -1, 0, 0, -1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 0, -1, -1, -1, 0, 1, 1, 1, 0, 1, -1, -1, 0, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 0, 0, -1, 0, 1, -1, -1, 1, -1, 1, 0, 0, -1, -1, -1, -1, 0, 1, 0, -1, -1, 1, 0, 1, 1, -1, 0, -1, 0, 1, -1, 0, -1, -1, 1, 0, -1, 0, 1, -1, 0, 1, 1, 1, 0, 1, 1, -1, -1, -1, 0, -1, 1, 1, 1, 1, 1, 0, -1, 0, 0, 1, 1, 1, 1, 0, -1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 0, 0, -1, 0, -1, 0, -1, 1, -1, 1, -1, 0, 1, 1, 0, -1, -1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 0, -1, 1, 0, 0, 1, -1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 0, 0, -1, 0, 1, 1, -1, 1, 0, 0, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 0, 0, -1, 0, -1, -1, 1, 0, 1, 1, -1, 1, 0, -1, 0, -1, -1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, -1, 0, 1, 0, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, 0, 1, -1, -1, -1, 1, -1, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 1, 0, -1, 1, -1, 0, -1, 1, -1, 0, -1, -1, 0, -1, 0, 1, -1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 0, 0, 1, 0, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 0, 1, -1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, -1, -1, -1, 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, 0, -1, -1, 0, -1, 1, 0, 1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 0, 1, -1, -1, -1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 0, 1, -1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, -1, -1, 1, -1, -1, 1, 0, 1, 0, 0, -1, 1, 1, -1, 1, 0, -1, -1, -1, -1, 1, 1, 0, 0, 0, -1, 1, 1, -1, 0, -1, 1, 1, 1, 0, -1, 1, -1, 0, -1, -1, -1, 1, -1, 0, -1, 0, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, -1, 1, 0, 1, -1, 0, 1, -1, -1, -1, 0, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 0, 1, -1, 0, 1, -1, 0, 0, 1, 1, 1, -1, 1, -1, 0, -1, -1, 1, -1, 0, -1, -1, -1, 1, -1, 0, 0, 0, 1, 1, 1, 0, -1, -1, 0, -1, 1, -1, -1, -1, 1, -1, -1, 0, -1, 1, 0, 1, 0, -1, 1, 1, 1, -1, -1, 0, -1, 1, -1, 0, -1, 1, -1, -1, -1, 1, 0, -1, -1, 1, 1, 1, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 1, 0, -1, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 0, 1, -1, -1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 0, -1, 1, -1, -1, -1, 0, -1, 1, 1, -1, -1, 0], "20000": [1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 0, 1, 1, 0, -1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, -1, 1, 1, 0, 1, 0, 0, -1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, -1, -1, 1, 0, 0, 0, 0, 1, -1, 1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 0, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 0, 0, 1, 1, 0, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 1, 0, 1, 1, 0, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 0, -1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, -1, 1, 0, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, 1, -1, 0, -1, -1, 0, -1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, 1, -1, 1, 0, 0, 0, 0, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 0, 1, -1, -1, 1, 0, 1, -1, 0, 1, 0, -1, 0, 1, -1, 1, 1, 0, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 0, -1, -1, -1, 0, -1, 1, 1, 1, 0, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 1, -1, 0, 0, 1, 1, 1, -1, -1, 0, 0, 1, 1, 1, 0, 0, 1, -1, 0, 1, 0, 0, 0, 1, 1, 0, -1, -1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 0, 1, -1, 1, -1, -1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 0, 0, -1, -1, 1, 0, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 0, 0, -1, 1, -1, 1, 0, 0, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 0, 0, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 0, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 0, 1, 1, 0, 1, -1, -1, 0, 0, -1, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 0, 1, 0, 0, -1, 1, 1, 1, -1, -1, -1, 1, 0, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, -1, -1, 1, 0, 1, -1, 0, 0, 1, 1, -1, -1, 1, -1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, -1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 0, 1, -1, -1, 1, -1, 0, 0, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 0, 1, 0, 1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 0, 1, 0, -1, 1, 1, 1, 1, 0, 1, -1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, -1, 0, 0, -1, 0, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 0, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 0, 0, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, -1, 0, 1, 0, 0, 0, 0, -1, -1, -1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, 0, 1, -1, 1, 1, -1, 1, 0, 1], "25000": [1, 0, -1, -1, 0, 1, 0, 1, 0, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 0, 1, 1, 0, -1, -1, -1, 1, 1, 0, 1, 0, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 0, 1, 0, -1, 1, 1, 0, 0, -1, 0, 1, -1, -1, -1, 1, -1, 0, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 0, -1, -1, -1, -1, 1, 0, 1, -1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 0, 1, 0, 0, 0, 1, 1, -1, 0, 1, 1, 0, 1, 0, 1, 1, 1, -1, -1, 0, 1, 1, 0, -1, 1, 1, 1, 1, 0, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 0, -1, 0, -1, -1, 1, 0, 1, 0, 0, 1, 1, -1, 1, 0, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, -1, -1, 0, 1, 0, 1, -1, 0, -1, 0, 1, 0, -1, 1, -1, 1, 0, -1, 1, 0, 1, 1, -1, 0, 0, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 0, 0, 1, 1, 1, -1, 0, -1, 0, 1, -1, 1, 0, 0, 1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 0, 0, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 0, 1, 0, 0, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 0, -1, 0, 1, -1, 1, 1, 1, 1, -1, 0, 0, 0, 0, -1, 1, 1, -1, 0, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, -1, 0, 1, 1, 0, 1, 0, 0, -1, 1, 1, 0, 1, 1, -1, 1, -1, -1, -1, 0, 1, 0, 1, 0, -1, 1, 1, -1, 0, 1, 0, 1, 0, 0, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 0, -1, -1, 0, 0, 1, -1, -1, 1, -1, -1, 0, 1, 0, 0, -1, 1, 1, 0, 1, 0, 1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 0, -1, 0, 0, 1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, -1, 0, 1, 0, 1, -1, 1, 1, 0, 0, 1, -1, 1, 1, 0, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 0, 1, 0, 0, 1, -1, 1, 1, 1, -1, 0, 1, 0, -1, -1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, -1, 0, 1, 1, 0, 0, -1, 0, 1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, 1, 1, 0, 0, -1, -1, 1, 0, 1, 0, 0, 1, 1, 1, 1, -1, 0, 1, 0, 0, 0, 1, 0, -1, 1, -1, 1, 0, 1, -1, 0, -1, -1, 1, 0, 1, 1, 1, -1, 1, 0, 1, -1, -1, 0, -1, -1, 0, -1, 0, -1, 1, 0, 0, 1, -1, 1, -1, 1, 1, 0, 0, 0, 0, -1, 0, -1, 1, -1, 0, 1, 0, 0, -1, -1, 0, 0, -1, 1, 1, 0, 1, 0, 1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, -1, 1, 1, 0, 0, -1, 1, 1, -1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 0, 0, 1, 0, 0, -1, 1, -1, -1, -1, 1, 0, -1, 0, -1, -1, 1, 0, 0, -1, 0, -1, 0, -1, 1, 0, 0, -1, 0, 1, 0, 0, 1, -1, -1, -1, 1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 0, 1, -1, 1, 0, -1, -1, 1, 1, 0, 0, 0, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, -1, -1, -1, -1, 0, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, -1], "30000": [1, 1, 0, 0, -1, 1, 0, -1, 0, -1, 0, 1, 1, -1, -1, 1, 1, 0, 1, -1, -1, 0, -1, 1, 0, -1, 1, -1, 1, -1, -1, 0, -1, 0, 1, -1, 0, 0, -1, -1, -1, 0, 1, 0, -1, -1, 1, 0, 1, -1, -1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, -1, 1, -1, 0, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 0, -1, 1, -1, 0, -1, 1, 0, 1, -1, -1, 1, 1, 1, -1, -1, 0, 0, 1, 0, 0, 0, 1, -1, -1, 0, 1, -1, 1, 0, 0, 1, 0, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 0, 1, 1, 0, 1, -1, -1, 1, -1, 1, -1, 0, 1, 0, 0, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 0, -1, 1, -1, 0, 1, 1, -1, 1, 0, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, -1, -1, 0, 0, -1, 1, 1, 0, 0, 1, 1, 0, 1, 0, -1, 0, 1, 1, -1, 1, 0, -1, 1, -1, -1, -1, 1, 0, -1, 0, 1, 1, 1, -1, 1, 0, 1, 0, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 0, 0, -1, -1, 0, 1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 0, 0, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 0, 1, 1, 1, 0, 1, 1, -1, 0, 1, 1, -1, 1, 1, 0, 1, -1, -1, 0, 1, 0, 0, 1, 1, 1, 1, 1, -1, 1, 0, 0, -1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 0, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 0, 1, -1, -1, -1, 0, -1, 0, 1, 0, -1, 1, 1, 0, 1, 1, -1, -1, -1, 0, -1, 0, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, -1, 1, 0, 0, -1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 0, 1, 0, 0, 1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, 0, 1, 1, -1, 0, -1, -1, 1, -1, 1, 0, -1, 1, -1, 0, -1, 1, -1, -1, 1, 1, 0, -1, 1, 0, 1, -1, 1, 1, 1, 0, -1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, -1, -1, 1, -1, 0, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 0, -1, 1, 1, 0, 0, -1, 1, -1, -1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, -1, 1, 1, 0, -1, 1, -1, -1, -1, 1, -1, 0, 0, 1, 0, 1, 1, 1, -1, 1, 1, 0, 0, -1, -1, 1, 0, 1, -1, -1, -1, 0, 0, 1, 0, -1, -1, -1, 1, 0, -1, 0, 1, 1, -1, -1, -1, 0, 1, 1, 1, -1, 0, -1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, -1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 0, 0, -1, -1, 0, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 0, -1, -1, -1, 1, 1, 0, 1, 1, -1, 1, -1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, -1, -1, 1, -1, 0, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 0, -1, -1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 1, 0, 1, -1, 1, 0, 0, 0, 0, 1, -1, -1, -1, -1, 1, 1, -1, 0, 0, 1, -1, 1, 1, 1, -1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 0, 0, 1, 1, -1, -1, 1, 1, 1, 0, 1, 0, 1, 1, -1, -1, 0, -1, 0, 0, -1, 1, -1, -1, -1, -1, 0, 1, -1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 0, 0, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 0, 0, 1, 1, 1, -1, -1, -1, 0, -1, -1, 0, -1, 1, 0, -1, 1, 1, 0, 1, -1, 0, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 0, 0, 1, 0, 0, -1, 1, 1, -1, 0, 1, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, -1, -1, 0, -1, 0, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, 0, -1, 1, -1, 1, -1, 1, 0, 0, 0, 0, 1, -1, 0, 0, 0, -1, 0, 1, -1, 0, 1, 0, -1, 1, -1, -1, 1, 1, 1, 0, -1, -1, -1, 0, -1, 0, 0, 1, 1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 1], "35000": [-1, 0, 1, -1, 0, -1, 1, -1, -1, -1, 0, 1, 1, 0, -1, 1, 1, 1, 0, -1, 0, 0, 1, 1, 1, -1, -1, 0, -1, -1, 0, 1, 1, 0, 0, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, 1, 0, 0, -1, 0, 1, 0, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 0, 0, 1, -1, 1, -1, -1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, 0, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 0, 0, 0, -1, 1, 1, 1, 0, -1, 1, 1, 0, -1, 1, 1, 0, 1, 1, 0, 1, -1, 1, 0, -1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, -1, -1, -1, -1, 0, 0, 0, -1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 0, 1, 0, -1, -1, 1, 1, 0, 0, 1, 0, 1, -1, 1, 0, 1, 0, -1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, -1, 1, 0, 1, -1, -1, 1, 0, 1, 1, 1, 0, -1, 1, 0, 0, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 0, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, -1, -1, 0, 0, 1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 0, 1, 0, 0, 1, -1, 0, -1, 0, 1, 0, 0, 0, 1, 0, 1, -1, 1, 1, 1, 0, 1, -1, 0, 0, -1, -1, 0, 0, 1, 1, 0, -1, 1, 1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 0, -1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 0, -1, 1, 0, -1, -1, -1, -1, -1, -1, 0, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 0, 0, 1, 1, 0, -1, -1, 1, 1, -1, -1, -1, 1, 1, 0, 0, -1, 1, 1, 0, -1, -1, -1, 1, -1, 0, -1, -1, -1, 0, 0, 1, 1, 1, 1, 1, 0, -1, 0, 0, 0, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 0, 1, -1, 0, 1, 1, 0, 1, 1, 0, 1, 0, -1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 1, -1, 0, -1, 0, -1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 0, 0, -1, -1, -1, 0, -1, 0, 1, 1, 1, 0, -1, 0, 0, 1, 1, 0, 0, 1, 0, -1, -1, -1, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 1, 0, 1, 0, 0, 0, 1, 1, -1, -1, -1, -1, 1, 0, -1, 0, -1, 1, -1, 0, -1, 1, 1, -1, -1, 1, -1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 0, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 0, 0, -1, -1, 1, 1, -1, -1, 1, 1, -1, 0, 1, -1, -1, 0, 0, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, 1, -1, 1, 0, -1, 1, -1, 1, -1, 0, -1, 1, 0, 1, 1, 1, 1, 0, -1, 0, 0, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 0, -1, 0, 0, 1, -1, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 0, 0, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, -1, 1, 0, 0, 0, 1, 1, 1, 0, -1, 0, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, -1, 0, -1, 0, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 0, 1, -1, 0, 0, -1, 1, 1, 1, 1, -1, 0, 1, 0, 1, 0, 1, 1, -1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 0, 1, 0, -1, 0, -1, -1, -1, 0, 1, 0, 1, 1, -1, 1, -1, 0, 1, 1, 0, 0, 1, 1, 0, -1, 1, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 0, -1, 0, -1, 0, 0, 0, 1, 0, 1, 1, 0, -1, 1, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, -1, 1, -1, -1, 1, -1, 1, -1, 0, 1, 0, 1, 0, 0, 0, -1, -1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, -1, 1, 1, 1, 0, -1, -1, -1, 0, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 0, 1, -1, 0, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 0, -1, 1, 1, 0, -1, 0, -1, 0, 1], "40000": [1, 1, 1, -1, -1, -1, 0, 1, 1, -1, 1, 0, 0, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 0, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, -1, 0, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, 0, 1, -1, -1, 0, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 0, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 0, 1, 1, 0, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 0, -1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 0, 0, -1, 1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 0, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 0, 0, -1, 1, 1, 0, 1, 1, -1, 1, 0, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, 0, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 0, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 0, -1, 1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, -1, -1, -1, 1, 1, -1, 0, 0, 1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1, -1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 0, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 0, -1, -1, -1, 0, -1, -1, 1, -1, 1, 1, -1, 0, 1, -1, -1, -1, -1, 1, 1, 1, 0, 0, 1, -1, -1, 0, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 0, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 0, -1, 0, -1, 0, 1, 1, 1, 0, 0, 1, 1, -1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, 0, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 0, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 1, -1, -1, -1, -1, 1, 0, 1, -1, 0, 0, 0, 1, 1, 1, -1, -1, 0, 0, 0, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 0, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 0], "45000": [-1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 1, 1, 0, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 0, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, 0, 1, 1, 1, 0, -1, 0, 1, 0, 1, 0, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 0, 1, -1, 0, -1, -1, 0, 1, -1, -1, -1, 1, 1, 0, 1, 0, 1, 0, 1, -1, 1, -1, 1, 0, 1, 0, 0, 0, 1, -1, -1, -1, -1, -1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 0, 0, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 0, 0, 0, 1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, -1, 0, 0, -1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 0, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 0, -1, 1, 0, -1, -1, 1, 1, 1, 0, 1, 1, -1, 0, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 1, -1, -1, 1, 0, -1, -1, 1, 0, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 0, -1, 0, -1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, -1, 0, 1, 1, -1, 1, 1, -1, 0, 1, 0, -1, 0, -1, 1, 0, 1, 1, -1, 1, -1, 0, -1, -1, 0, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, -1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, -1, -1, -1, -1, 0, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 0, 1, -1, 0, 0, 1, 1, 0, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 0, 0, 1, 1, -1, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, 1, -1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 0, 1, -1, 1, 0, 1, -1, 0, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 0, 1, -1, -1, -1, 1, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 0, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 0, -1, -1, 0, -1, -1, 1, 0, 0, 1, 1, -1, 0, -1, -1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 0, -1, 1, 0, -1, 0, 1, 1, -1, -1, 0, 0, 1, 1, 0, -1, -1, -1, 1, 0, 0, 0, 0, 1], "50000": [1, 1, 1, 1, 1, 0, 1, 1, 0, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 0, 1, 0, -1, 1, 1, 0, 1, 1, 1, 0, 0, -1, -1, 0, -1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 0, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 0, -1, -1, 0, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 0, 0, 0, -1, 1, 1, -1, -1, 0, 1, -1, 1, -1, 0, 0, -1, 0, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 0, -1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, -1, -1, 1, 1, 0, -1, -1, -1, 0, 1, -1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, -1, 1, -1, 1, 0, 0, 1, -1, -1, -1, -1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 0, 1, -1, -1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 0, 1, 1, 1, 0, 1, -1, 1, -1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 0, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 0, 1, -1, 1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, 0, 1, 1, 1, 0, -1, 0, -1, 0, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 0, 1, -1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 1, 0, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 0, 1, 1, -1, 1, 0, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 0, 1, 0, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 1, 0, 0, -1, 0, 1, -1, 1, -1, -1, 0, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 0, -1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 0, -1, 0, -1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 0, 1, -1, 0, -1, -1, 0, -1, -1, 1, 1, 1, 1, -1, 1, -1, 0, -1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 0, -1, 0, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0, 0, -1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, 0, 1, 0, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 0, 1, 1, 1, 0, -1, 1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1, 1, 1, -1, -1, 0, -1, 1, 0, 1, 0, 1, 0, 0, -1, -1, -1, 1, -1, 0, 0, 1, 1, -1, 1, -1, 1, 0, 0, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 0, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 0, 0, -1, 1, 1, -1, 1, 0, 0, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 0, 1, 1, 0], "55000": [1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 0, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 0, -1, 1, 1, 1, -1, 1, -1, -1, 0, -1, 0, -1, 0, 1, 1, 0, 1, -1, 1, 1, -1, 0, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 0, 1, -1, 1, -1, 1, 0, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 0, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 0, 1, -1, -1, 0, 0, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 1, 1, 0, -1, 1, 1, 0, 1, 0, -1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, -1, -1, 1, 1, 0, 1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, -1, 0, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 0, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 0, 1, 1, 0, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 0, 1, 0, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 0, 1, 0, -1, 0, 0, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 0, -1, 0, 0, 1, -1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 0, 0, 1, 1, 0, -1, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 0, 0, 1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, 0, -1, -1, 1, -1, 1, -1, 0, -1, 1, -1, -1, -1, -1, -1, 0, 0, -1, -1, 1, -1, 1, -1, 1, 0, -1, 0, 1, 0, 1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, -1, -1, -1, 0, 1, 1, 1, -1, 0, 1, 0, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 0, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 0, -1, 0, -1, 0, -1, 1, -1, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 0, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 0, -1, -1, -1, 1, 1, 1, 1, 0, 1, 0, 0, -1, 1, 1, 1, 0, 1, -1, -1, 1, 1, -1, 0, -1, 0, -1, 0, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 0, -1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 1, -1, -1, 0, 1, 1, 0, -1, 1, 1, 1, 0, 0, 1, 1, -1, 1, -1, 1, 0, -1, 0, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 0, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 0, -1, 0, -1, 0, -1, -1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 0, 0, 1, 0, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 0, -1, -1, -1, 0, 0, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, -1, 1, -1, 1, -1, -1, -1, 0, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 0, -1, 0, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 0, 0, 0, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1], "60000": [0, 1, 1, -1, 1, 1, -1, 1, 0, 0, 1, 1, -1, 0, 1, 1, 1, -1, 0, 1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, 0, 1, 1, -1, 1, 1, 0, 1, 0, 1, -1, 0, 1, 0, -1, -1, 0, 1, 1, 1, 1, -1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 0, -1, 0, 0, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 0, 1, -1, 0, 1, 1, -1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 0, -1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 0, -1, 1, 1, 0, 0, 1, -1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 0, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 1, -1, 0, 0, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 0, 1, -1, 1, 0, -1, 0, 0, -1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, -1, -1, -1, -1, -1, 1, 0, -1, 1, 0, -1, -1, 0, -1, 0, 1, 1, 1, 1, 0, 1, -1, -1, 0, 1, 0, 1, 1, 1, 0, 1, -1, 0, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 0, 1, 1, -1, 0, 1, 0, 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 0, -1, 1, -1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, -1, 0, 0, -1, -1, -1, 1, 1, -1, 0, -1, -1, 0, 1, 1, 0, 0, 1, -1, -1, 1, -1, -1, 0, 1, 0, 1, 0, -1, 1, 0, 0, 0, -1, 1, 1, 1, -1, 1, 0, -1, -1, 1, -1, 0, 1, 1, 0, 0, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 0, 0, 1, 1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 0, 0, 0, 1, 1, 0, -1, 0, 0, 1, 1, 0, 1, -1, 0, 0, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 0, -1, -1, 0, 0, 1, 0, -1, 0, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, 1, -1, -1, 0, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, -1, 0, -1, -1, 1, -1, 1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 0, -1, -1, 0, 1, 1, 1, -1, -1, -1, 0, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 0, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 0, -1, 1, 1, -1, 0, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 0, -1, 1, 0, 1, 0, -1, 0, 1, 1, 1, 0, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 0, 1, -1, 0, 1, -1, 0, 0, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 0, 0, -1, 1, -1, -1, 1, 0, 1, 1, 0, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 0, 0, 1, 1, 1, 1, 0, -1, -1, 1, -1, 0, -1, 1, -1, 1, -1, -1, 1, 0, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, 0, 0, 1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 0, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 0, -1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, 1, 1, -1, 0, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 0], "65000": [1, 1, 1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 0, 0, -1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 0, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 1, -1, -1, 1, -1, 1, 1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 0, -1, -1, 1, 0, 1, -1, -1, -1, -1, 1, -1, 1, 0, -1, 1, 1, 0, 1, 1, -1, 0, 0, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 0, 1, -1, 1, 1, 1, 0, 0, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 0, -1, -1, 0, -1, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, -1, 0, 1, -1, 1, 0, -1, -1, -1, 0, 1, 1, 0, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, 0, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, -1, -1, -1, 0, 1, -1, 0, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 0, -1, -1, 0, 0, 1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, 0, 1, 0, 1, 0, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 0, 1, 1, 0, -1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, -1, -1, -1, 1, 0, 1, 0, 1, -1, 0, 1, 0, 1, 1, -1, 1, 0, 0, 1, -1, 1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 0, 1, 0, 0, 1, 1, 0, -1, 1, -1, -1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, -1, -1, 0, 1, 0, -1, 1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 0, 1, 1, 0, -1, 1, -1, -1, 0, -1, 0, -1, 1, -1, -1, -1, 0, 1, 0, -1, 0, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 0, 1, 1, -1, -1, -1, -1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 0, 1, -1, -1, 0, 0, -1, 1, 1, -1, 1, 1, 0, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, -1, -1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 0, -1, 0, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 0, -1, 0, 0, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 0, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 0, 1, -1, 1, 0, 1, 0, 1, 1, -1, 0, 0, 0, -1, -1, 1, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 0, 0, 0, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, -1, 0, -1, 1, 1, 1, -1, 0, 1, 0, 1, -1, 0, 1, 1, 1, -1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, -1, 1, -1, -1, 1, -1, 0, -1, -1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 0, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1], "70000": [1, 1, 1, 0, 1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, 1, 1, -1, -1, 0, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, 0, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 0, -1, -1, 1, 0, 0, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 0, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, 0, -1, 0, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, -1, 0, 1, 0, 0, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, -1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 0, -1, 1, -1, 1, 0, -1, 0, 1, 1, 0, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, -1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 0, 0, 1, 1, 1, 0, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 0, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 0, 1, 1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, 0, -1, 1, -1, 1, 1, 0, -1, 1, 0, -1, 1, 1, -1, -1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 0, 0, -1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 0, 0, 0, 1, -1, 1, 1, 0, 1, 1, 1, -1, 0, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 0, 1, 1, -1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 0, 1, -1, 0, 1, -1, -1, 0, 1, -1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 0, -1, -1, -1, -1, 1, 1, 1, 1, 0, -1, -1, -1, 0, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 0, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 0, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 0, 1, 1, 0, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 1, -1, -1, 0, 0, -1, -1, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 0, -1, 0, 0, -1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, 0, -1, 1, 0, -1, 1, 1, -1, 1, 0, 0, 1, 0, -1, 1, -1, -1, -1, 1, 1, 0, -1, 0, 1, 1, 0, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 0, 1, 1, 0, -1, 0, -1, -1, -1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, -1, 0, 1, 0, 1, 1, 1, -1, -1, -1, -1, 1, -1, 0, 0, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 0, 0, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, -1, -1, -1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, -1, -1], "75000": [0, 1, 1, -1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 0, 0, 1, -1, 0, 1, 0, -1, 0, -1, 1, 1, 1, 1, -1, 1, 0, -1, 1, 0, -1, -1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, 1, 1, 0, 0, 1, -1, -1, 1, 0, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 0, 0, -1, -1, 0, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, -1, 0, -1, -1, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 0, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 0, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 0, -1, -1, -1, 1, -1, 1, 0, 1, 1, 1, -1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, -1, 0, -1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, 0, 1, 1, -1, -1, -1, 0, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 0, 0, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 0, -1, -1, -1, 0, 1, -1, 0, -1, 1, -1, 0, 1, 1, 1, 1, 0, -1, 0, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 0, 1, -1, -1, 0, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 0, 0, -1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 0, 0, 1, 1, 1, 0, 1, -1, 1, -1, -1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, 0, -1, 1, -1, -1, 1, 0, 1, 1, 0, 0, 0, 1, -1, 1, -1, -1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 0, -1, -1, -1, 0, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 0, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 0, -1, -1, 1, 0, 1, -1, 0, 0, -1, 0, -1, -1, -1, 1, 1, -1, -1, -1, 1, 0, 1, 1, 0, 1, 1, 1, 0, -1, 1, 1, 0, -1, 1, 0, 1, -1, 0, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 0, -1, -1, 1, 1, 1, 1, 0, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 0, 1, 1, -1, 0, 1, -1, 0, 1, -1, 1, -1, -1, 1, 1, -1, 0, 0, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, -1, -1, 0, -1, 0, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, -1], "80000": [-1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, -1, 1, 1, 0, -1, 1, 0, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 0, -1, -1, -1, -1, 1, 1, 0, 1, -1, 1, -1, -1, 0, 1, 1, -1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, 1, 1, 0, 1, -1, -1, -1, 1, 1, -1, 1, 0, -1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, 0, 1, 1, -1, 0, 0, 1, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 0, 1, -1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 0, 1, 1, 1, -1, -1, 0, 0, 1, -1, 0, -1, 1, -1, 1, 0, -1, 1, 1, -1, 0, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 1, -1, 0, 1, 1, 1, -1, -1, -1, -1, 0, 1, 1, 1, -1, -1, 1, 0, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 0, -1, -1, 0, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 0, -1, 0, 1, -1, -1, 1, 1, 0, -1, 0, -1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 0, 0, -1, 1, 1, 1, 0, 0, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 0, 1, 1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, -1, 0, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 0, -1, -1, -1, 0, -1, 1, 1, -1, -1, 0, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, -1, 0, 1, 0, -1, 1, -1, 0, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, 0, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 0, 0, -1, 0, -1, -1, 1, -1, -1, 1, 0, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 0, 1, -1, 1, -1, -1, -1, 0, 0, 1, 0, 1, -1, -1, 1, 0, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 0, 0, -1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 0, 1, 0, -1, -1, 1, 1, 0, 1, 1, 0, 0, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 0, 0, -1, -1, -1, -1, 1, -1, 0, 1, 0, 1, -1, -1, 1, -1, -1, -1, 1, 1, 0, -1, 1, -1, 0, 1, 0, 1, -1, -1, -1, 1, 1, 0, -1, 0, 1, 1, -1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 1, -1, 0, 0, 0, -1, 1, -1, -1, 1, 0, -1, 1, -1, -1, 0, 1, 0, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, -1, -1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, 0, -1, -1, -1, -1, -1, 1, 0, 0, 0, 1, -1, -1, 0, -1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 1, 0, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 0, 1, 1, -1, -1, -1, -1, 1, -1, 0, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 0, 1, -1, 0, -1, -1, -1, 0, -1, 1, 1, 1, 1, 1, 0, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 0, -1, 0, 1, -1, 0, 1, -1, 1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1], "85000": [1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 0, -1, -1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 0, 1, 1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, -1, 1, -1, -1, 1, 0, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 0, -1, -1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 0, 1, 1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 0, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 1, -1, -1, -1, 1, -1, 0, 1, 1, -1, 1, -1, 0, 1, 0, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 0, 0, -1, 1, -1, -1, 0, -1, 1, -1, -1, 1, 1, 1, -1, 1, 0, 0, -1, 0, -1, 1, 0, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 0, -1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 1, 0, 0, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 0, 1, 0, 1, -1, 1, 1, 1, 0, 1, -1, 0, 1, 1, -1, -1, 1, 0, 0, 0, -1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, 0, -1, -1, -1, 1, 0, 1, 0, -1, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, -1, -1, 1, 0, 1, 0, 1, 1, 0, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 1, 0, -1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 0, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, -1, 0, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, 0, 1, -1, 1, 1, -1, 1, -1, -1, 0, 0, 1, 1, -1, 0, 0, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 0, 0, 1, 1, -1, 0, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, -1, 1, -1, -1, -1, 0, -1, 1, 1, 0, 0, -1, 1, -1, -1, 0, 0, -1, 0, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 0, 1, 1, -1, 1, 0, -1, -1, 1, 0, 0, 1, 1, 0, -1, 1, 1, -1, -1, -1, 0, 1, 0, 1, -1, -1, 1, 0, -1, 1, 0, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 0, -1, -1, -1, 1, -1, 1, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 0, 1, 0, 1, 0, -1, 1, 1, 1, -1, 1, 0, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 0, -1, 1, 1, 0, 1, 0, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 0, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 0, 0, 0, 0, 1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 0, -1, 1, 0, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 0, 1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 0, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 0, -1, -1, 0, 0, -1, 1], "90000": [-1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 0, 1, -1, 1, 0, 1, 1, -1, 1, 1, -1, -1, 0, 1, 1, 1, 1, -1, 0, 0, -1, -1, 0, 1, 1, -1, -1, -1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, -1, 0, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, 1, -1, 1, 0, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 0, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, -1, 1, 0, -1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 0, 1, -1, -1, 1, -1, 1, 1, -1, 0, 1, 0, 0, 1, 0, -1, 0, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 0, 1, 1, 1, 0, 1, -1, 0, 1, 0, 1, -1, -1, -1, 1, 0, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, 0, 0, -1, 1, 0, 1, -1, 0, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 0, -1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 0, 1, 0, -1, 1, -1, -1, -1, 1, 0, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, 1, 1, 0, 1, -1, 1, -1, -1, -1, -1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, 0, 1, 1, -1, -1, -1, -1, 1, -1, 0, -1, -1, 1, 0, 1, -1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, -1, 0, -1, 0, 1, 1, -1, -1, 1, 0, 1, -1, 0, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 1, 1, 0, -1, 1, 1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 0, 1, 1, 0, 0, -1, 1, -1, 0, -1, 1, -1, 1, 1, 1, 0, -1, 1, 1, 0, 1, 0, -1, -1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 0, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 0, -1, 1, 0, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 0, -1, 0, 1, 1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 0, 1, -1, 1, -1, 1, -1, 0, 1, 1, -1, 0, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 0, -1, 1, -1, -1, 0, 0, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 0, -1, 0, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 0, 0, 1, 1, -1, 0, -1, 1, 1, 1, 0, -1, 1, 0, -1, -1, 1, -1, 0, 0, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 0, -1, 0, 1, -1, -1, 1, 0, -1, -1, 0, -1, -1, 0, 1, 0, -1, -1, 1, -1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 1], "95000": [1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 0, 1, 0, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, 0, 1, 1, -1, 1, 1, 0, 0, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 0, 1, 1, 1, 1, -1, 1, 1, -1, 0, -1, 0, 1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, -1, 0, 0, 0, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 0, -1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 0, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 1, -1, 0, -1, 1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 0, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, -1, -1, 0, -1, 1, 1, 1, 1, -1, 0, 1, 1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 0, 0, 1, 0, 1, 1, 1, -1, 0, 0, 1, 1, -1, 0, 1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, 0, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, -1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 0, -1, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 0, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, -1, 1, 1, -1, -1, 1, 1, 0, -1, -1, 1, 1, -1, 1, 1, 1, -1, 0, 0, 1, 1, -1, 0, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 0, -1, 0, 1, 1, 1, 1, 0, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 1, -1, 1, 1, 0, 1, -1, 1, 0, 0, 1, 1, -1, 1, -1, 1, -1, 0, 1, 1, 1, -1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 0, 0, -1, -1, 1, 0, 1, 1, 1, -1, -1, 1, 0, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 0, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 0, 1, -1, 1, -1, 0, -1, 1, -1, -1, 0, 1, 0, 1, 0, -1, 1, 1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 0, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 0, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 1, -1, 0, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 0, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 0, 1, 1, -1, -1, 0, 0, -1, -1, 0, 0, 0, 1, 1, 0, -1, 1, -1, 1, 1, 1, 1, 0, 1, -1, -1, -1, 1, 1, 1, -1, 1, 0, -1, 1, 1, 1, 1, 1, -1, -1, 0, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 0, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 0, 0, 1, -1, 0, 0, 1, 1, 1, 1, 1, -1, 0, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 0, -1, -1, 1, 1, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 0, 0, 0, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 0, 0, 1, 0, -1, -1, 1, 0, 0, -1, 1, -1, 1, 0, 1, 0, 1, -1, 0, -1, -1, 0, 1, 0, 1], "100000": [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 0, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 0, 0, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 0, 0, -1, 1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 0, 0, 1, 1, 1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, -1, 1, 1, 1, 1, -1, -1, 0, 1, 0, 0, 1, 0, 1, -1, 0, 0, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, -1, 1, 1, 0, 1, -1, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 0, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 0, 0, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 0, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 0, 1, 1, 1, 0, 1, 1, 0, -1, 1, 1, 0, -1, -1, 0, 1, 1, 1, 0, 1, -1, 1, 1, -1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 0, 1, 0, 0, -1, 1, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, 1, 0, -1, 1, 1, -1, -1, -1, 0, -1, 1, -1, 1, -1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, -1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1, -1, 0, 1, -1, 1, -1, 1, 0, 1, 0, -1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 0, 1, 1, 0, 0, 0, 0, 1, -1, 1, -1, 1, 1, -1, -1, 0, 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 0, 0, -1, -1, -1, -1, 1, 1, 0, 1, 1, 0, -1, 1, 1, -1, -1, -1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 0, 0, 0, 1, 1, -1, -1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, -1, 1, -1, -1, -1, -1, -1, 0, 0, 1, 0, -1, -1, 0, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 0, -1, 0, -1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 0, 1, 0, 1, 0, 1, 0, -1, 0, -1, -1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, -1, -1, 0, -1, 1, 0, -1, 1, 1, -1, 1, 1, -1, 0, -1, 1, -1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 0, 1, -1, 1, 0, 1, 0, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, -1, 0, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 0, 0, 1, 0, -1, 1, 1, -1, 1, -1, -1, 1, 0, 1, -1, 1, 1, 1, -1, 0, -1, -1, 1, 0, 0, 1, -1, -1, 1, -1, 0, -1, -1, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, -1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 0, 1, -1, -1, 1, 1, 1, -1, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 1, 1, 0, -1, 0, 1, 1, 0, 1, 1, -1, -1, -1, 0, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 0, 1, -1, 1, 1, 0, 1, 1, 1, 0, -1, 1, -1, -1, -1, 1, -1, -1, 0, 1, -1, 0, 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, -1, 1, -1, 1, 1, -1, 0, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 0, 1, 1, 0, 1, 1, 0, -1, 1, 1, 0, 1, 1, 1, -1, -1, 1, 0, 1, 1, -1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 0, 1, 1, 1, -1, 1, 0, 1, -1, 1, 1, 0, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 0, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 0, -1]} # cnn MCTS: cnn_50_50_50_e-3_stoch_mcts cnnmcts = {"1000": [1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 0, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1], "2000": [-1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1], "3000": [-1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 0, -1, -1, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1], "4000": [-1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 0, -1, 1, 0, -1, 0, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 0, -1, 1, -1, 0, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1], "5000": [1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1], "6000": [1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 0, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 0, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1], "7000": [-1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1], "8000": [1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 0, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 0, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1], "9000": [0, 1, 1, -1, -1, 0, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, 1], "10000": [1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 0, -1, -1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 0, -1, 1, 1, 1, 1, -1, 1, -1, 0, -1, -1, -1, 1, -1, -1, 1, 1, -1]} # The following variables can be loaded: regdet regstoch regmcts cnndet cnnstoch cnnmcts winrate = [] lossrate = [] drawrate = [] games = [] for key,value in cnnmcts.items(): winrate.append(value.count(1) / len(value)) lossrate.append(value.count(-1) / len(value)) drawrate.append(value.count(0) / len(value)) games.append(key) fontsize = 16 plt.rc('xtick', labelsize=fontsize) plt.rc('ytick', labelsize=fontsize) plt.rcParams.update({'font.size': fontsize}) fig, ax = plt.subplots() ax.xaxis.offsetText.set_fontsize(fontsize) plt.ticklabel_format( style='sci', axis='x', scilimits=(0, 3)) plt.plot(np.asfarray(games), winrate, np.asfarray(games), lossrate, np.asfarray(games), drawrate) plt.legend(['win rate','loss rate','draw rate']) plt.xlabel('Trained games') plt.ylabel('rate') plt.ylim([0,1]) plt.show()
8,069.607843
135,820
0.299303
121,932
411,550
1.009907
0.001066
1.506708
2.000845
2.380283
0.993357
0.992951
0.992107
0.991026
0.990905
0.99071
0
0.422413
0.296151
411,550
50
135,821
8,231
0.002693
0.00077
0
0
0
0
0.001875
0
0
0
0
0
0
1
0
false
0
0.066667
0
0.066667
0
0
0
1
null
1
1
1
1
1
1
1
1
1
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
14
c57e708bba0f75345ef0aa555efd953601502869
16
py
Python
.history/py/main_20201230141954.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/py/main_20201230141954.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/py/main_20201230141954.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
print(36 // 7)
5.333333
14
0.5
3
16
2.666667
1
0
0
0
0
0
0
0
0
0
0
0.25
0.25
16
2
15
8
0.416667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
7
c5819ccb0a2711fc0a6cdec94acf5058280e386a
637
py
Python
game/characters/evil.py
fernandoDBR/fernandodbr
5cb9d65358411cb4504799c9901c9a49618ebf66
[ "MIT" ]
null
null
null
game/characters/evil.py
fernandoDBR/fernandodbr
5cb9d65358411cb4504799c9901c9a49618ebf66
[ "MIT" ]
null
null
null
game/characters/evil.py
fernandoDBR/fernandodbr
5cb9d65358411cb4504799c9901c9a49618ebf66
[ "MIT" ]
null
null
null
import game.characters.character as ch import game.player as pl class Corinthiano(ch.Character): def __init__(self, player: pl.Player): super().__init__(player, 'evil') class Maradona(ch.Character): def __init__(self, player: pl.Player): super().__init__(player, 'evil') class Dunga(ch.Character): def __init__(self, player: pl.Player): super().__init__(player, 'evil') class Bruno(ch.Character): def __init__(self, player: pl.Player): super().__init__(player, 'evil') class Xuxa(ch.Character): def __init__(self, player: pl.Player): super().__init__(player, 'evil')
22.75
42
0.66876
81
637
4.765432
0.234568
0.142487
0.181347
0.233161
0.764249
0.764249
0.764249
0.764249
0.764249
0.764249
0
0
0.185243
637
27
43
23.592593
0.743738
0
0
0.588235
0
0
0.031397
0
0
0
0
0
0
1
0.294118
false
0
0.117647
0
0.705882
0
0
0
0
null
0
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
9
c5f24ee4223e2f2cbd1d090457013ca8da67c414
3,297
py
Python
tests/dictlrn/test_onlinecdl.py
nikzasel/sporco
cc6cc8fb38d92cf61e2bb7a41660bf17c12f05e4
[ "BSD-3-Clause" ]
1
2019-07-23T11:27:41.000Z
2019-07-23T11:27:41.000Z
tests/dictlrn/test_onlinecdl.py
wxwoods/sporco
7b0eefea8b6c720ab9a4998a7c55237445765738
[ "BSD-3-Clause" ]
null
null
null
tests/dictlrn/test_onlinecdl.py
wxwoods/sporco
7b0eefea8b6c720ab9a4998a7c55237445765738
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division from builtins import object import numpy as np from sporco.dictlrn import onlinecdl class TestSet01(object): def setup_method(self, method): N = 16 Nd = 5 M = 4 K = 3 np.random.seed(12345) self.D0 = np.random.randn(Nd, Nd, M) self.S = np.random.randn(N, N, K) def test_01(self): lmbda = 1e-1 opt = onlinecdl.OnlineConvBPDNDictLearn.Options() try: b = onlinecdl.OnlineConvBPDNDictLearn(self.D0, lmbda, opt=opt) for it in range(10): img_index = np.random.randint(0, self.S.shape[-1]) b.solve(self.S[..., img_index]) except Exception as e: print(e) assert 0 def test_02(self): lmbda = 1e-1 opt = onlinecdl.OnlineConvBPDNDictLearn.Options() try: b = onlinecdl.OnlineConvBPDNDictLearn(self.D0, lmbda, opt=opt) for it in range(10): img_index = np.random.randint(0, self.S.shape[-1]) b.solve(self.S[..., [img_index]]) except Exception as e: print(e) assert 0 def test_03(self): lmbda = 1e-1 W = np.random.randn(*self.S.shape[0:2]) opt = onlinecdl.OnlineConvBPDNMaskDictLearn.Options() try: b = onlinecdl.OnlineConvBPDNMaskDictLearn(self.D0, lmbda, opt=opt) for it in range(10): img_index = np.random.randint(0, self.S.shape[-1]) b.solve(self.S[..., img_index], W) except Exception as e: print(e) assert 0 class TestSet02(object): def setup_method(self, method): N = 16 Nc = 3 Nd = 5 M = 4 K = 3 np.random.seed(12345) self.D0 = np.random.randn(Nd, Nd, Nc, M) self.S = np.random.randn(N, N, Nc, K) def test_01(self): lmbda = 1e-1 opt = onlinecdl.OnlineConvBPDNDictLearn.Options() try: b = onlinecdl.OnlineConvBPDNDictLearn(self.D0, lmbda, opt=opt) for it in range(10): img_index = np.random.randint(0, self.S.shape[-1]) b.solve(self.S[..., img_index]) except Exception as e: print(e) assert 0 def test_02(self): lmbda = 1e-1 opts = onlinecdl.OnlineConvBPDNDictLearn.Options( {'CBPDN': {'MaxMainIter': 50, 'AutoRho': {'Enabled': False}}}) try: b = onlinecdl.OnlineConvBPDNDictLearn(self.D0, lmbda, opt=opts) for it in range(10): img_index = np.random.randint(0, self.S.shape[-1]) b.solve(self.S[..., [img_index]]) except Exception as e: print(e) assert 0 def test_03(self): lmbda = 1e-1 W = np.random.randn(*self.S.shape[0:3]) opt = onlinecdl.OnlineConvBPDNMaskDictLearn.Options() try: b = onlinecdl.OnlineConvBPDNMaskDictLearn(self.D0, lmbda, opt=opt) for it in range(10): img_index = np.random.randint(0, self.S.shape[-1]) b.solve(self.S[..., img_index], W) except Exception as e: print(e) assert 0
28.669565
78
0.532909
413
3,297
4.196126
0.174334
0.046163
0.046163
0.041546
0.875361
0.875361
0.875361
0.875361
0.784189
0.784189
0
0.043336
0.349105
3,297
114
79
28.921053
0.764212
0
0
0.826087
0
0
0.009099
0
0
0
0
0
0.065217
1
0.086957
false
0
0.043478
0
0.152174
0.065217
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
c5f996a0a018ba7924ffb50632d8e91f9bdfe4d8
11,948
py
Python
regress/tests-flowdb.py
fp7-ofelia/VeRTIGO
11f39f819196c8352611852435dea17bc6a2292f
[ "BSD-3-Clause" ]
2
2016-10-12T08:20:00.000Z
2017-05-09T13:13:18.000Z
regress/tests-flowdb.py
fp7-ofelia/VeRTIGO
11f39f819196c8352611852435dea17bc6a2292f
[ "BSD-3-Clause" ]
null
null
null
regress/tests-flowdb.py
fp7-ofelia/VeRTIGO
11f39f819196c8352611852435dea17bc6a2292f
[ "BSD-3-Clause" ]
1
2020-10-01T07:57:34.000Z
2020-10-01T07:57:34.000Z
#!/usr/bin/python from fvregress import * import string # really? you have to do this? import sys import xmlrpclib # start up a flowvisor with 1 switch (default) and two guests #h= HyperTest(guests=[('localhost',54321),('localhost',54322)], # hyperargs=["-v0", "-a", "flowvisor-conf.d-base", "ptcp:%d"% HyperTest.OFPORT],valgrind=valgrindArgs) wantPause = True def test_failed(s): s = "TEST FAILED!!!: " + s print s raise Exception(s) def test_flowdb(s, count, test_type, display=False): print "Testing getSwitchFlowDB: %s" % test_type flows = s.api.getSwitchFlowDB("1") print "Correctly got %d flows" % len(flows) if display: for flow in flows: print "==== Got flow " for key,val in flow.iteritems(): print " %s=%s" % (key,val) if len(flows) != count: test_failed("Wanted %d flows, got %d" % (count, len(flows))) print " SUCCESS" print "Testing getSliceRewriteDB %s" % test_type rewriteDB = s.api.getSliceRewriteDB("alice","1") print "Correctly got %d rewrites" % len(rewriteDB) if display: for flow, rewrites in rewriteDB.iteritems(): print "==== Got original: %s" % flow for rewrite in rewrites: print "--------- Rewrite" for key,val in rewrite.iteritems(): print " => %s=%s" % (key,val) if len(rewriteDB) != count: test_failed("Wanted %d rewrites, got %d" % (count, len(rewriteDB))) print " SUCCESS" try: h= FvRegress() port=16633 h.addController("alice", 54321) h.addController("bob", 54322) if len(sys.argv) > 1 : wantPause = False port=int(sys.argv[1]) timeout=60 h.useAlreadyRunningFlowVisor(port) else: wantPause = False timeout=5 h.spawnFlowVisor(configFile="tests-flowdb.xml") h.lamePause() h.addSwitch(name='switch1',port=port) h.addSwitch(name='switch2',port=port) user = "fvadmin" passwd = "0fw0rk" rpcport = 18080 s = xmlrpclib.ServerProxy("https://" + user + ":" + passwd + "@localhost:" + str(rpcport) + "/xmlrpc") s.verbose=True if wantPause: doPause("start tests") #################################### Start Tests flow_mod1 = FvRegress.OFVERSION + \ '''0e 00 50 40 00 90 b6 00 00 00 00 00 00 00 00 00 00 00 02 00 0c 29 c6 36 8d ff ff 00 00 08 06 00 02 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 80 00 00 00 01 6f 00 00 00 01 00 00 00 08 00 02 00 00''' flow_mod2 = FvRegress.OFVERSION + \ '''0e 00 50 40 00 90 b6 00 00 00 00 00 00 00 00 00 00 00 02 22 0c 29 c6 36 8d ff ff 00 00 08 06 00 02 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 80 00 00 00 01 6f 00 00 00 01 00 00 00 08 00 02 00 00''' flow_mod3 = FvRegress.OFVERSION + \ '''0e 00 50 40 00 90 b6 00 00 00 00 00 00 00 00 00 00 00 02 33 0c 29 c6 36 8d ff ff 00 00 08 06 00 02 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 80 00 00 00 01 6f 00 00 00 01 00 00 00 08 ff fc 00 00''' flow_mod3_after = FvRegress.OFVERSION + \ '''0e 00 58 00 00 01 04 00 00 00 00 00 00 00 00 00 00 00 02 33 0c 29 c6 36 8d ff ff 00 00 08 06 00 02 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 80 00 00 00 01 6f 00 00 00 01 00 00 00 08 00 02 00 00 00 00 00 08 00 03 00 00''' h.runTest(name="flowdb install",timeout=timeout, events= [ # send flow_mod, make sure it succeeds TestEvent( "send","guest",'alice', flow_mod1), TestEvent( "recv","switch",'switch1', flow_mod1), TestEvent( "send","guest",'alice', flow_mod2), TestEvent( "recv","switch",'switch1', flow_mod2), # this test sends an OFPP_ALL and make sures it expands # FIXME: fix API so we can test if the expand worked... # right now, this test is half-assed TestEvent( "send","guest",'alice', flow_mod3), TestEvent( "recv","switch",'switch1', flow_mod3_after), ]) #################################### test_flowdb(s, 0, "flowdb disabled") #################################### Start Tests print "Testing setConfig track_flows=True" try: if not s.api.setConfig("flowvisor!track_flows","True"): test_failed("setConfig returned False") else: print " SUCCESS" except StandardError,e : test_failed("setConfig returned: %s" % str(e)) #################################### Start Tests flow_mod1 = FvRegress.OFVERSION + \ '''0e 00 50 40 00 90 b6 00 00 00 00 00 00 00 00 00 00 00 02 00 0c 29 c6 36 8d ff ff 00 00 08 06 00 02 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 80 00 00 00 01 6f 00 00 00 01 00 00 00 08 00 02 00 00''' flow_mod2 = FvRegress.OFVERSION + \ '''0e 00 50 40 00 90 b6 00 00 00 00 00 00 00 00 00 00 00 02 22 0c 29 c6 36 8d ff ff 00 00 08 06 00 02 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 80 00 00 00 01 6f 00 00 00 01 00 00 00 08 00 02 00 00''' flow_mod3 = FvRegress.OFVERSION + \ '''0e 00 50 40 00 90 b6 00 00 00 00 00 00 00 00 00 00 00 02 33 0c 29 c6 36 8d ff ff 00 00 08 06 00 02 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 80 00 00 00 01 6f 00 00 00 01 00 00 00 08 ff fc 00 00''' flow_mod3_after = FvRegress.OFVERSION + \ '''0e 00 58 00 00 01 04 00 00 00 00 00 00 00 00 00 00 00 02 33 0c 29 c6 36 8d ff ff 00 00 08 06 00 02 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 80 00 00 00 01 6f 00 00 00 01 00 00 00 08 00 02 00 00 00 00 00 08 00 03 00 00''' h.runTest(name="flowdb install",timeout=timeout, events= [ # send flow_mod, make sure it succeeds TestEvent( "send","guest",'alice', flow_mod1), TestEvent( "recv","switch",'switch1', flow_mod1), TestEvent( "send","guest",'alice', flow_mod2), TestEvent( "recv","switch",'switch1', flow_mod2), # this test sends an OFPP_ALL and make sures it expands # FIXME: fix API so we can test if the expand worked... # right now, this test is half-assed TestEvent( "send","guest",'alice', flow_mod3), TestEvent( "recv","switch",'switch1', flow_mod3_after), ]) #################################### test_flowdb(s, 3, "flowdb enabled") #################################### flow_expire1 = FvRegress.OFVERSION + \ '''0b 00 58 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 02 00 0c 29 c6 36 8d ff ff 00 00 08 06 00 02 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 0b 00 00 00 00 00 00 00 00 00 00 01 e1 00 00 00 00 00 00 02 58 ''' h.runTest(name="flowdb flow remove",timeout=timeout, events= [ # send flow_mod, make sure it succeeds TestEvent( "send","switch",'switch1', flow_expire1), TestEvent( "recv","guest",'alice', flow_expire1), ]) ######################################### test_flowdb(s, 2, "flow removed") ######################################### flow_del_all = FvRegress.OFVERSION + \ '''0e 00 48 40 00 90 b6 ff ff ff ff 00 00 00 00 00 00 00 02 00 0c 29 c6 36 8d ff ff 00 00 08 06 00 00 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 05 00 00 80 00 00 00 01 6f 00 00 00 01''' fm_expand1 = FvRegress.OFVERSION + \ '''0e 00 48 00 00 01 08 00 3f ff fa 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 05 00 00 80 00 00 00 01 6f 00 00 00 01''' fm_expand2 = FvRegress.OFVERSION + \ '''0e 00 48 00 00 01 08 00 3f ff fa 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 05 00 00 80 00 00 00 01 6f 00 00 00 01''' fm_expand3 = FvRegress.OFVERSION + \ '''0e 00 48 00 00 01 08 00 3f ff fa 00 02 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 05 00 00 80 00 00 00 01 6f 00 00 00 01''' fm_expand4 = FvRegress.OFVERSION + \ '''0e 00 48 00 00 01 08 00 3f ff fa 00 02 00 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 05 00 00 80 00 00 00 01 6f 00 00 00 01''' fm_expand5 = FvRegress.OFVERSION + \ '''0e 00 48 00 00 01 08 00 3f ff fa 00 03 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 05 00 00 80 00 00 00 01 6f 00 00 00 01''' fm_expand6 = FvRegress.OFVERSION + \ '''0e 00 48 00 00 01 08 00 3f ff fa 00 03 00 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 01 f9 7b c0 01 f9 79 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 05 00 00 80 00 00 00 01 6f 00 00 00 01''' h.runTest(name="flowdb del all",timeout=timeout, events= [ # send flow_mod, make sure it succeeds TestEvent( "send","guest",'alice', flow_del_all), TestEvent( "recv","switch",'switch1', fm_expand1), TestEvent( "recv","switch",'switch1', fm_expand2), TestEvent( "recv","switch",'switch1', fm_expand3), TestEvent( "recv","switch",'switch1', fm_expand4), TestEvent( "recv","switch",'switch1', fm_expand5), TestEvent( "recv","switch",'switch1', fm_expand6), ]) ######################################### test_flowdb(s, 0, "flow all deleted", display=True) ######################################### # more tests for this setup HERE #################################### End Tests finally: if wantPause: doPause("start cleanup") h.cleanup()
48.177419
106
0.495146
1,902
11,948
3.076761
0.109884
0.394395
0.454204
0.490772
0.690362
0.643541
0.643199
0.63944
0.630212
0.630212
0
0.322102
0.396384
11,948
247
107
48.37247
0.489323
0.065534
0
0.327731
0
0
0.176537
0.003936
0
0
0
0.008097
0
0
null
null
0.016807
0.033613
null
null
0.117647
0
0
0
null
1
1
1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
7
a867b25698e7e0c6daf40b3bdf5e385d10f1dc3a
55
py
Python
surrol/algorithms/__init__.py
rokas-bendikas/SurRoL
4b347469c61ea2893e67062ac5be630f088e01bc
[ "MIT" ]
null
null
null
surrol/algorithms/__init__.py
rokas-bendikas/SurRoL
4b347469c61ea2893e67062ac5be630f088e01bc
[ "MIT" ]
null
null
null
surrol/algorithms/__init__.py
rokas-bendikas/SurRoL
4b347469c61ea2893e67062ac5be630f088e01bc
[ "MIT" ]
null
null
null
from surrol.algorithms.td3_her_demo import TD3_HER_DEMO
55
55
0.909091
10
55
4.6
0.7
0.26087
0.434783
0
0
0
0
0
0
0
0
0.038462
0.054545
55
1
55
55
0.846154
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
7
a8c64395e01c9318901b714cd96014f6ff75f0d3
2,999
py
Python
py/g1/backgrounds/tests/test_consoles.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
3
2016-01-04T06:28:52.000Z
2020-09-20T13:18:40.000Z
py/g1/backgrounds/tests/test_consoles.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
null
null
null
py/g1/backgrounds/tests/test_consoles.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
null
null
null
import unittest import unittest.mock from g1.backgrounds import consoles class ConsolesTest(unittest.TestCase): def setUp(self): super().setUp() self.mock_sock = unittest.mock.Mock(spec_set=['send', 'recv']) self.console = consoles.SocketConsole(self.mock_sock) def assert_buffer(self, buffer, lines): self.assertEqual(self.console._SocketConsole__buffer, buffer) self.assertEqual(self.console._SocketConsole__lines, lines) def test_raw_input_one_byte_per_chunk(self): data = b'hello\r\nworld\n\r\n\n\nfoobar' self.mock_sock.recv.side_effect = ( [data[i:i + 1] for i in range(len(data))] + [b''] ) self.assert_buffer([], []) self.assertEqual(self.console.raw_input(), 'hello') self.assert_buffer([], []) self.assertEqual(self.console.raw_input(), 'world') self.assert_buffer([], []) self.assertEqual(self.console.raw_input(), '') self.assert_buffer([], []) self.assertEqual(self.console.raw_input(), '') self.assert_buffer([], []) self.assertEqual(self.console.raw_input(), '') self.assert_buffer([], []) self.assertEqual(self.console.raw_input(), 'foobar') self.assert_buffer([], [None]) with self.assertRaises(EOFError): self.console.raw_input() self.assert_buffer([], [None]) with self.assertRaises(EOFError): self.console.raw_input() self.assert_buffer([], [None]) def test_raw_input_one_chunk(self): data = b'hello\r\nworld\n\r\n\n\nfoobar' self.mock_sock.recv.side_effect = [data, b''] self.assert_buffer([], []) self.assertEqual(self.console.raw_input(), 'hello') self.assert_buffer([b'foobar'], ['world', '', '', '']) self.assertEqual(self.console.raw_input(), 'world') self.assert_buffer([b'foobar'], ['', '', '']) self.assertEqual(self.console.raw_input(), '') self.assert_buffer([b'foobar'], ['', '']) self.assertEqual(self.console.raw_input(), '') self.assert_buffer([b'foobar'], ['']) self.assertEqual(self.console.raw_input(), '') self.assert_buffer([b'foobar'], []) self.assertEqual(self.console.raw_input(), 'foobar') self.assert_buffer([], [None]) with self.assertRaises(EOFError): self.console.raw_input() self.assert_buffer([], [None]) with self.assertRaises(EOFError): self.console.raw_input() self.assert_buffer([], [None]) def test_raw_input_empty(self): self.mock_sock.recv.return_value = b'' self.assert_buffer([], []) with self.assertRaises(EOFError): self.console.raw_input() self.assert_buffer([], [None]) with self.assertRaises(EOFError): self.console.raw_input() self.assert_buffer([], [None]) if __name__ == '__main__': unittest.main()
31.904255
70
0.605202
343
2,999
5.069971
0.172012
0.151811
0.193214
0.196665
0.79586
0.731455
0.731455
0.731455
0.731455
0.731455
0
0.000865
0.22941
2,999
93
71
32.247312
0.751623
0
0
0.617647
0
0
0.047683
0.020007
0
0
0
0
0.617647
1
0.073529
false
0
0.044118
0
0.132353
0
0
0
0
null
0
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
8
a8cb78fb9280036792e4cb5982fa8763ba08faea
116
py
Python
src/masonite/inertia/helpers.py
girardinsamuel/inertia-masonite
aeda235f5ab7df4c51e914d099fdfe307df7c2ea
[ "MIT" ]
1
2020-11-09T12:22:53.000Z
2020-11-09T12:22:53.000Z
src/masonite/inertia/helpers.py
girardinsamuel/inertia-masonite
aeda235f5ab7df4c51e914d099fdfe307df7c2ea
[ "MIT" ]
9
2020-09-18T13:00:40.000Z
2020-09-23T21:28:42.000Z
src/masonite/inertia/helpers.py
girardinsamuel/inertia-masonite
aeda235f5ab7df4c51e914d099fdfe307df7c2ea
[ "MIT" ]
null
null
null
from jinja2 import Markup def inertia(): return Markup("<div id='app' data-page='{{ page | safe }}'></div>")
16.571429
71
0.612069
16
116
4.4375
0.8125
0
0
0
0
0
0
0
0
0
0
0.010526
0.181034
116
6
72
19.333333
0.736842
0
0
0
0
0
0.434783
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
1
1
0
0
7
a8cd951e2e4738d63d81a3c380a033ea4416f9ac
100
py
Python
example_python_proj/my_print.py
ryansingman/example-python-proj
9c165ce7262e6f27b1d561c7d1e132b01f3f1f1d
[ "MIT" ]
null
null
null
example_python_proj/my_print.py
ryansingman/example-python-proj
9c165ce7262e6f27b1d561c7d1e132b01f3f1f1d
[ "MIT" ]
null
null
null
example_python_proj/my_print.py
ryansingman/example-python-proj
9c165ce7262e6f27b1d561c7d1e132b01f3f1f1d
[ "MIT" ]
1
2021-04-14T23:14:19.000Z
2021-04-14T23:14:19.000Z
from typing import Any def my_print(print_str: str) -> None: print(f"my_print: {print_str}")
14.285714
37
0.69
17
100
3.823529
0.588235
0.215385
0.369231
0.461538
0
0
0
0
0
0
0
0
0.18
100
6
38
16.666667
0.792683
0
0
0
0
0
0.212121
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0.666667
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
1
0
9
7640228a0e5b815ce20e5e88e3e0aa0c1f7871f8
20,788
py
Python
tests/popmon/analysis/test_functions.py
Sharath302/popmon
43755048ad419109afabaca6c81b50b4e39c60b7
[ "MIT" ]
265
2020-04-27T20:02:23.000Z
2022-03-31T15:23:44.000Z
tests/popmon/analysis/test_functions.py
Sharath302/popmon
43755048ad419109afabaca6c81b50b4e39c60b7
[ "MIT" ]
46
2020-05-22T16:10:01.000Z
2022-01-26T15:31:10.000Z
tests/popmon/analysis/test_functions.py
Sharath302/popmon
43755048ad419109afabaca6c81b50b4e39c60b7
[ "MIT" ]
20
2020-04-30T07:09:52.000Z
2022-03-27T05:58:53.000Z
import numpy as np import pandas as pd import pytest from popmon import resources from popmon.analysis.apply_func import ApplyFunc from popmon.analysis.comparison import ( ExpandingNormHistComparer, ReferenceNormHistComparer, RollingNormHistComparer, ) from popmon.analysis.functions import ( expand, expand_norm_hist_mean_cov, expanding_hist, normalized_hist_mean_cov, relative_chi_squared, roll, roll_norm_hist_mean_cov, rolling_hist, ) from popmon.base import Pipeline from popmon.hist.hist_splitter import HistSplitter from popmon.io import JsonReader def test_roll(): df = pd.DataFrame({"a": np.arange(100)}) rdf = roll(df, window=5, shift=1) arr = rdf["a"].values[-1] check = np.array([94, 95, 96, 97, 98]) np.testing.assert_array_equal(arr, check) def test_expand(): df = pd.DataFrame({"a": np.arange(10)}) edf = expand(df, shift=1) arr = edf["a"].values[-1] check = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8]) np.testing.assert_array_equal(arr, check) def test_expanding_hist(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), ApplyFunc( apply_to_key="output_hist", apply_funcs=[ { "func": expanding_hist, "shift": 1, "suffix": "sum", "entire": True, "hist_name": "histogram", } ], ), ] ) datastore = pipeline.transform(datastore={}) df = datastore["output_hist"]["num_employees"] h = df["histogram_sum"].values[-1] bin_entries = h.bin_entries() check = np.array( [ 11.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, ] ) np.testing.assert_array_almost_equal(bin_entries, check) def test_rolling_hist(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), ApplyFunc( apply_to_key="output_hist", apply_funcs=[ { "func": rolling_hist, "window": 5, "shift": 1, "suffix": "sum", "entire": True, "hist_name": "histogram", } ], ), ] ) datastore = pipeline.transform(datastore={}) df = datastore["output_hist"]["num_employees"] h = df["histogram_sum"].values[-2] bin_entries = h.bin_entries() check = np.array( [ 4.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, ] ) np.testing.assert_array_almost_equal(bin_entries, check) def test_normalized_hist_mean_cov(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), ApplyFunc( apply_to_key="output_hist", assign_to_key="output_hist", apply_funcs=[{"func": normalized_hist_mean_cov, "suffix": ""}], ), ] ) datastore = pipeline.transform(datastore={}) assert "output_hist" in datastore for f in [ "A_score", "A_score:num_employees", "bankrupt", "country", "num_employees", ]: assert f in datastore["output_hist"] df = datastore["output_hist"]["A_score"] check = np.array( [ [0.22916667, -0.01041667, -0.0625, -0.13541667, -0.02083333], [-0.01041667, 0.015625, 0.01041667, -0.01354167, -0.00208333], [-0.0625, 0.01041667, 0.12916667, -0.06458333, -0.0125], [-0.13541667, -0.01354167, -0.06458333, 0.240625, -0.02708333], [-0.02083333, -0.00208333, -0.0125, -0.02708333, 0.0625], ] ) for hm, hc, hb in zip( df["histogram_mean"].values, df["histogram_cov"].values, df["histogram_binning"].values, ): np.testing.assert_array_almost_equal( hm, [0.3125, 0.03125, 0.1875, 0.40625, 0.0625] ) np.testing.assert_array_almost_equal(hb, [1.5, 2.5, 3.5, 4.5, 5.5]) np.testing.assert_array_almost_equal(hc, check) def test_roll_norm_hist_mean_cov(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), ApplyFunc( apply_to_key="output_hist", apply_funcs=[ { "func": roll_norm_hist_mean_cov, "hist_name": "histogram", "window": 5, "shift": 1, "suffix": "", "entire": True, } ], ), ] ) datastore = pipeline.transform(datastore={}) assert "output_hist" in datastore for f in [ "A_score", "A_score:num_employees", "bankrupt", "country", "num_employees", ]: assert f in datastore["output_hist"] df = datastore["output_hist"]["num_employees"] mean = df["histogram_mean"].values[-2] check = np.array( [ 0.8, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, ] ) np.testing.assert_array_almost_equal(mean, check) def test_expand_norm_hist_mean_cov(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), ApplyFunc( apply_to_key="output_hist", apply_funcs=[ { "func": expand_norm_hist_mean_cov, "hist_name": "histogram", "shift": 1, "suffix": "", "entire": True, } ], ), ] ) datastore = pipeline.transform(datastore={}) assert "output_hist" in datastore for f in [ "A_score", "A_score:num_employees", "bankrupt", "country", "num_employees", ]: assert f in datastore["output_hist"] df = datastore["output_hist"]["num_employees"] mean = df["histogram_mean"].values[-2] check = np.array( [ 0.56666667, 0.03333333, 0.03333333, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.06666667, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.06666667, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.06666667, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03333333, 0.06666667, 0.06666667, ] ) np.testing.assert_array_almost_equal(mean, check) @pytest.mark.filterwarnings("ignore:invalid value encountered in true_divide") def test_chi_squared1(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), ApplyFunc( apply_to_key="output_hist", apply_funcs=[ { "func": roll_norm_hist_mean_cov, "hist_name": "histogram", "window": 5, "shift": 1, "suffix": "", "entire": True, } ], ), ApplyFunc( apply_to_key="output_hist", apply_funcs=[{"func": relative_chi_squared, "suffix": "", "axis": 1}], ), ] ) datastore = pipeline.transform(datastore={}) assert "output_hist" in datastore for f in [ "A_score", "A_score:num_employees", "bankrupt", "country", "num_employees", ]: assert f in datastore["output_hist"] df = datastore["output_hist"]["A_score"] np.testing.assert_almost_equal(df["chi2"][6], 4.25) df = datastore["output_hist"]["A_score:num_employees"] np.testing.assert_almost_equal(df["chi2"][-2], 2.1333333333333315) df = datastore["output_hist"]["bankrupt"] np.testing.assert_almost_equal(df["chi2"][6], 0.40000000000000024) df = datastore["output_hist"]["country"] np.testing.assert_almost_equal(df["chi2"][5], 0.8999999999999994) df = datastore["output_hist"]["num_employees"] np.testing.assert_almost_equal(df["chi2"][5], 0.849999999999999) @pytest.mark.filterwarnings("ignore:invalid value encountered in true_divide") def test_chi_squared2(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), ApplyFunc( apply_to_key="output_hist", apply_funcs=[ { "func": expand_norm_hist_mean_cov, "hist_name": "histogram", "shift": 1, "suffix": "", "entire": True, } ], ), ApplyFunc( apply_to_key="output_hist", apply_funcs=[{"func": relative_chi_squared, "suffix": "", "axis": 1}], ), ] ) datastore = pipeline.transform(datastore={}) assert "output_hist" in datastore for f in [ "A_score", "A_score:num_employees", "bankrupt", "country", "num_employees", ]: assert f in datastore["output_hist"] df = datastore["output_hist"]["A_score"] np.testing.assert_almost_equal(df["chi2"][-1], 9.891821919006366) df = datastore["output_hist"]["A_score:num_employees"] np.testing.assert_almost_equal(df["chi2"][-2], 3.217532467532462) df = datastore["output_hist"]["bankrupt"] np.testing.assert_almost_equal(df["chi2"][-1], 0.23767605633802757) df = datastore["output_hist"]["country"] np.testing.assert_almost_equal(df["chi2"][-1], 1.3717532467532458) df = datastore["output_hist"]["num_employees"] np.testing.assert_almost_equal(df["chi2"][-1], 1.1858766233766194) def test_chi_ReferenceNormHistComparer(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), ReferenceNormHistComparer( reference_key="output_hist", assign_to_key="output_hist", store_key="comparisons", ), ] ) datastore = pipeline.transform(datastore={}) assert "comparisons" in datastore for f in [ "A_score", "A_score:num_employees", "bankrupt", "country", "num_employees", ]: assert f in datastore["comparisons"] df = datastore["comparisons"]["A_score"] np.testing.assert_almost_equal(df["chi2"][0], 2.2884111855886022) def test_chi_ExpandingNormHistComparer(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), ExpandingNormHistComparer(read_key="output_hist", store_key="comparisons"), ] ) datastore = pipeline.transform(datastore={}) assert "comparisons" in datastore for f in [ "A_score", "A_score:num_employees", "bankrupt", "country", "num_employees", ]: assert f in datastore["comparisons"] df = datastore["comparisons"]["A_score"] np.testing.assert_almost_equal(df["chi2"][-1], 9.891821919006366) def test_chi_RollingNormHistComparer(): hist_list = [ "date:country", "date:bankrupt", "date:num_employees", "date:A_score", "date:A_score:num_employees", ] pipeline = Pipeline( modules=[ JsonReader( file_path=resources.data("example_histogram.json"), store_key="example_hist", ), HistSplitter( read_key="example_hist", store_key="output_hist", features=hist_list ), RollingNormHistComparer( read_key="output_hist", store_key="comparisons", window=10 ), ] ) datastore = pipeline.transform(datastore={}) assert "comparisons" in datastore for f in [ "A_score", "A_score:num_employees", "bankrupt", "country", "num_employees", ]: assert f in datastore["comparisons"] df = datastore["comparisons"]["A_score"] np.testing.assert_almost_equal(df["chi2"][-1], 37.61910112359518)
24.31345
87
0.425774
2,140
20,788
3.945327
0.074299
0.134076
0.196849
0.256781
0.836077
0.83051
0.808362
0.801966
0.779344
0.768921
0
0.10493
0.452617
20,788
854
88
24.34192
0.637051
0
0
0.821293
0
0
0.150327
0.033192
0
0
0
0
0.048162
1
0.015209
false
0
0.012674
0
0.027883
0
0
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
7659f06a99755b6ba54ee8abea5095ea2bb893a9
119
py
Python
runSpider_tuji8.py
lang564321/bm
4d1f7e83eb92d68a2aa1825637a0c6bcbdaf4ebb
[ "Apache-2.0" ]
null
null
null
runSpider_tuji8.py
lang564321/bm
4d1f7e83eb92d68a2aa1825637a0c6bcbdaf4ebb
[ "Apache-2.0" ]
null
null
null
runSpider_tuji8.py
lang564321/bm
4d1f7e83eb92d68a2aa1825637a0c6bcbdaf4ebb
[ "Apache-2.0" ]
null
null
null
from scrapy import cmdline # cmdline.execute('scrapy crawl tuji8'.split()) cmdline.execute(['scrapy','crawl','tuji8'])
29.75
47
0.739496
15
119
5.866667
0.533333
0.318182
0.454545
0.568182
0.681818
0
0
0
0
0
0
0.018182
0.07563
119
3
48
39.666667
0.781818
0.378151
0
0
0
0
0.222222
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
768b2b209ab18ecc8d925bdc2064b920145939fb
2,833
py
Python
inpaint/model/transformer/transformer_method.py
Janspiry/A-Demo-for-Image-Inpainting-by-React
e1951027d10677a1fd4463b05c7acf473481decb
[ "MIT" ]
2
2021-12-07T03:13:32.000Z
2021-12-26T04:44:40.000Z
inpaint/model/transformer/transformer_method.py
Janspiry/A-Demo-for-Image-Inpainting-by-React
e1951027d10677a1fd4463b05c7acf473481decb
[ "MIT" ]
null
null
null
inpaint/model/transformer/transformer_method.py
Janspiry/A-Demo-for-Image-Inpainting-by-React
e1951027d10677a1fd4463b05c7acf473481decb
[ "MIT" ]
null
null
null
from .transformer import TransformerLayer from .transformer_withmask import TransformerLayer as Mask_TransformerLayer from .swin_transformer import TransformerModule as Swin_TransformerLayer import torch import torch.nn as nn class TransformerBlock(nn.Module): def __init__(self, size, patch_size, MiniTransFormer=None, use_local=False, use_global=False): super(TransformerBlock, self).__init__() model_dim = 256 num_layers = 6 num_heads = 8 ffn_dim = 512 self.p = patch_size # patch_size if MiniTransFormer is not None: model_dim, num_layers, num_heads, ffn_dim = MiniTransFormer self.transformer_global = TransformerLayer( size=size, patch_size=patch_size, MiniTransFormer=MiniTransFormer ) self.transformer_local = Swin_TransformerLayer( in_channels=size[0], hidden_dimension=model_dim, layers=2, patch_size=patch_size, num_heads=num_heads, window_size=8, relative_pos_embedding=True ) self.use_local = use_local self.use_global = use_global assert self.use_local or self.use_global, 'self.use_local and self.use_global are false.' def forward(self, x): b, c, h, w = x.size() if(self.use_global): x = self.transformer_global(x) if(self.use_local): x = self.transformer_local(x) return x class MaskTransformer(nn.Module): def __init__(self, size, patch_size, MiniTransFormer=None, use_local=False, use_global=False): super(MaskTransformer, self).__init__() model_dim = 256 num_layers = 6 num_heads = 8 ffn_dim = 512 self.p = patch_size # patch_size if MiniTransFormer is not None: model_dim, num_layers, num_heads, ffn_dim = MiniTransFormer self.transformer_global = Mask_TransformerLayer( size=size, patch_size=patch_size, MiniTransFormer=MiniTransFormer ) self.transformer_local = Swin_TransformerLayer( in_channels=size[0], hidden_dimension=model_dim, layers=2, patch_size=patch_size, num_heads=num_heads, window_size=8, relative_pos_embedding=True ) self.use_local = use_local self.use_global = use_global assert self.use_local or self.use_global, 'self.use_local and self.use_global are false.' def forward(self, x, masks): b, c, h, w = x.size() if(self.use_global): x = self.transformer_global(x, masks=masks) if(self.use_local): x = self.transformer_local(x) return x
35.4125
98
0.622661
337
2,833
4.934718
0.189911
0.067348
0.078172
0.064943
0.82742
0.82742
0.82742
0.82742
0.82742
0.82742
0
0.011162
0.304271
2,833
80
99
35.4125
0.832572
0.007413
0
0.739726
0
0
0.032028
0
0
0
0
0
0.027397
1
0.054795
false
0
0.068493
0
0.178082
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
76b8facb45d00e50020ec79a7fac2651f00e7262
641
py
Python
tests/exts/test_flask_cache.py
soasme/rio
e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2
[ "MIT" ]
null
null
null
tests/exts/test_flask_cache.py
soasme/rio
e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2
[ "MIT" ]
14
2016-04-14T04:18:41.000Z
2016-05-12T03:46:37.000Z
tests/exts/test_flask_cache.py
soasme/rio
e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2
[ "MIT" ]
1
2016-04-06T08:54:20.000Z
2016-04-06T08:54:20.000Z
# -*- coding: utf-8 -*- from pytest import fixture, mark from rio.core import cache @mark.xfail def test_cache_function_call(app): def hello_world(k1, k2): return {'k1': 'v1', 'k2': 'v2'} assert not cache.get(':hello_world:k1:v1:k2:v2') assert cache.run(hello_world, k1='v1', k2='v2') assert cache.get(':hello_world:k1:v1:k2:v2') == {'k1': 'v1', 'k2': 'v2'} def test_clean_cache_function_call(app): def hello_world(k1, k2): return {'k1': 'v1', 'k2': 'v2'} cache.run(hello_world, k1='v1', k2='v2') cache.clean(hello_world, k1='v1', k2='v2') assert not cache.get(':hello_world:k1:v1:k2:v2')
30.52381
76
0.624025
106
641
3.632075
0.273585
0.093506
0.14026
0.187013
0.74026
0.727273
0.727273
0.701299
0.467532
0.467532
0
0.077213
0.171607
641
20
77
32.05
0.647834
0.032761
0
0.4
0
0
0.174757
0.116505
0
0
0
0
0.266667
1
0.266667
false
0
0.133333
0.133333
0.533333
0
0
0
0
null
0
0
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
7
76ba2e07432140136b1d60384110ec3b744dea96
5,564
py
Python
complex_venv/lib/python3.7/site-packages/test/test_depth_for_building_subgraph.py
lubianat/complex_bot
e0ddabcc0487c52b14fb94950c5a812f0bdb2283
[ "MIT" ]
1
2021-10-06T00:21:10.000Z
2021-10-06T00:21:10.000Z
complex_venv/lib/python3.7/site-packages/test/test_depth_for_building_subgraph.py
lubianat/complex_bot
e0ddabcc0487c52b14fb94950c5a812f0bdb2283
[ "MIT" ]
14
2021-01-15T21:51:38.000Z
2021-11-10T10:08:22.000Z
complex_venv/lib/python3.7/site-packages/test/test_depth_for_building_subgraph.py
lubianat/complex_bot
e0ddabcc0487c52b14fb94950c5a812f0bdb2283
[ "MIT" ]
1
2021-01-18T10:32:56.000Z
2021-01-18T10:32:56.000Z
import unittest from shexer.shaper import Shaper from test.const import default_namespaces from test.t_utils import number_of_shapes, shape_contains_constraint class TestDepthBuildingSubGraph(unittest.TestCase): """ These test cannot be too precise, since they are made against "live" content in Wikidata. Also, two of them are commented, as they consume too much time to finish """ def test_1_not_all_classes_format(self): shape_map_raw = "SPARQL'select ?p where " \ "{ ?p <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q14660> } " \ "LIMIT 10'@<Flag>" shaper = Shaper(shape_map_raw=shape_map_raw, url_endpoint="https://query.wikidata.org/sparql", namespaces_dict=default_namespaces(), instantiation_property="http://www.wikidata.org/prop/direct/P31", disable_comments=True, depth_for_building_subgraph=1, track_classes_for_entities_at_last_depth_level=False, all_classes_mode=False) str_result = shaper.shex_graph(string_output=True) self.assertTrue(number_of_shapes(str_result) == 1) self.assertTrue(shape_contains_constraint(target_str=str_result, shape="<Flag>", constraint="<http://www.wikidata.org/prop/direct/P31> " "[<http://www.wikidata.org/entity/Q14660>]")) def test_1_all_classes_format(self): shape_map_raw = "SPARQL'select ?p where " \ "{ ?p <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q14660> } " \ "LIMIT 10'@<Flag>" shaper = Shaper(shape_map_raw=shape_map_raw, url_endpoint="https://query.wikidata.org/sparql", namespaces_dict=default_namespaces(), instantiation_property="http://www.wikidata.org/prop/direct/P31", disable_comments=True, depth_for_building_subgraph=1, track_classes_for_entities_at_last_depth_level=False, all_classes_mode=True) str_result = shaper.shex_graph(string_output=True) self.assertTrue(number_of_shapes(str_result) > 1) self.assertTrue(number_of_shapes(str_result) < 10) self.assertTrue(shape_contains_constraint(target_str=str_result, shape="<Flag>", constraint="<http://www.wikidata.org/prop/direct/P31> " "[<http://www.wikidata.org/entity/Q14660>]")) # def test_2_not_all_classes_format(self): # shape_map_raw = "SPARQL'select ?p where " \ # "{ ?p <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q14660> } " \ # "LIMIT 10'@<Flag>" # shaper = Shaper(shape_map_raw=shape_map_raw, # url_endpoint="https://query.wikidata.org/sparql", # namespaces_dict=default_namespaces(), # instantiation_property="http://www.wikidata.org/prop/direct/P31", # disable_comments=True, # depth_for_building_subgraph=2, # track_classes_for_entities_at_last_depth_level=False, # all_classes_mode=False) # str_result = shaper.shex_graph(string_output=True) # self.assertTrue(number_of_shapes(str_result) == 1) # self.assertTrue(shape_contains_constraint(target_str=str_result, # shape="<Flag>", # constraint="<http://www.wikidata.org/prop/direct/P31> " # "[<http://www.wikidata.org/entity/Q14660>]")) # # def test_2_all_classes_format(self): # shape_map_raw = "SPARQL'select ?p where " \ # "{ ?p <http://www.wikidata.org/prop/direct/P31> <http://www.wikidata.org/entity/Q14660> } " \ # "LIMIT 10'@<Flag>" # shaper = Shaper(shape_map_raw=shape_map_raw, # url_endpoint="https://query.wikidata.org/sparql", # namespaces_dict=default_namespaces(), # instantiation_property="http://www.wikidata.org/prop/direct/P31", # disable_comments=True, # depth_for_building_subgraph=2, # track_classes_for_entities_at_last_depth_level=False, # all_classes_mode=True) # str_result = shaper.shex_graph(string_output=True) # self.assertTrue(number_of_shapes(str_result) > 10) # self.assertTrue(shape_contains_constraint(target_str=str_result, # shape="<Flag>", # constraint="<http://www.wikidata.org/prop/direct/P31> " # "[<http://www.wikidata.org/entity/Q14660>]"))
61.822222
120
0.526959
551
5,564
5.032668
0.177858
0.095204
0.108186
0.129823
0.885323
0.885323
0.885323
0.885323
0.885323
0.885323
0
0.024793
0.369339
5,564
90
121
61.822222
0.76546
0.446801
0
0.714286
0
0.047619
0.19775
0
0
0
0
0
0.119048
1
0.047619
false
0
0.095238
0
0.166667
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
4f1341f54b27e589ec4496a268d990f1463adfa1
970
py
Python
test/test_add_group.py
18kotov/python_test_learning
08bc41c921b6d51fc1bab5d239e3f871f25439ba
[ "Apache-2.0" ]
null
null
null
test/test_add_group.py
18kotov/python_test_learning
08bc41c921b6d51fc1bab5d239e3f871f25439ba
[ "Apache-2.0" ]
null
null
null
test/test_add_group.py
18kotov/python_test_learning
08bc41c921b6d51fc1bab5d239e3f871f25439ba
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from model.group import Group def test_add_group(app): app.group.open_groups_page() old_groups=app.group.get_group_list() group=Group(group_name="ddfg", header="4fff", footer="fbhj") app.group.create(group) app.group.return_to_groups_page() new_groups = app.group.get_group_list() assert len(old_groups) + 1 == len(new_groups) old_groups.append(group) assert sorted(old_groups, key=Group.id_or_max) == sorted(new_groups, key=Group.id_or_max) def test_add_empty_group(app): app.group.open_groups_page() old_groups = app.group.get_group_list() group = Group(group_name="", header="", footer="") app.group.create(group) app.group.return_to_groups_page() new_groups = app.group.get_group_list() assert len(old_groups) + 1 == len(new_groups) old_groups.append(group) assert sorted(old_groups, key=Group.id_or_max) == sorted(new_groups, key=Group.id_or_max)
23.658537
93
0.702062
150
970
4.226667
0.246667
0.126183
0.088328
0.107256
0.84858
0.84858
0.84858
0.84858
0.84858
0.84858
0
0.00492
0.161856
970
40
94
24.25
0.774908
0.021649
0
0.761905
0
0
0.012766
0
0
0
0
0
0.190476
1
0.095238
false
0
0.047619
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
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
4f72083bc49d6689050d30b7ec34a1274c9c207f
3,248
py
Python
tests/cmake/test_command.py
arjo129/ros_build_assistant
9c8420230713a43f73390d75d19bd7a7a751474d
[ "MIT" ]
null
null
null
tests/cmake/test_command.py
arjo129/ros_build_assistant
9c8420230713a43f73390d75d19bd7a7a751474d
[ "MIT" ]
null
null
null
tests/cmake/test_command.py
arjo129/ros_build_assistant
9c8420230713a43f73390d75d19bd7a7a751474d
[ "MIT" ]
null
null
null
from ros_build_assistant.parser.cmake.grammar import Command, CombinatorState import unittest def parse_item(inp): bc = Command() for x in inp: res, data = bc.next_char(x) return res,data class TestCommandArguments(unittest.TestCase): def test_command_argument_1(self): #normal operation inp = "find_package ( CATKIN_PACKAGES\nroscpp\n\t#octomap_msgs\n\t)" res, data = parse_item(inp) self.assertEqual(res, CombinatorState.FINISHED) self.assertDictEqual(data, {'command': 'find_package', 'type': 'command', 'separator': {'body': ' ', 'type': 'whitespace'}, 'parameters': {'body': [{'type': 'lparenthesis'}, {'body': ' ', 'type': 'whitespace'}, {'body': {'body': 'CATKIN_PACKAGES', 'type': 'unquoted_argument'}, 'type': 'argument', 'argument_type': 'unquoted'}, {'body': '\n', 'type': 'whitespace'}, {'body': {'body': 'roscpp', 'type': 'unquoted_argument'}, 'type': 'argument', 'argument_type': 'unquoted'}, {'body': '\n\t', 'type': 'whitespace'}, {'comment': 'line', 'body': {'body': 'octomap_msgs', 'type': 'line_comment'}, 'type': 'comment'}, {'body': '\t', 'type': 'whitespace'}, {'type': 'rparenthesis'}], 'type': 'argument_list'}}) def test_command_argument_2(self): #normal operation inp = "find_package( CATKIN_PACKAGES\nroscpp\n\t#octomap_msgs\n\t)" res, data = parse_item(inp) self.assertEqual(res, CombinatorState.FINISHED) self.assertDictEqual(data, {'command': 'find_package', 'type': 'command', 'separator': {}, 'parameters': {'body': [{'type': 'lparenthesis'}, {'body': ' ', 'type': 'whitespace'}, {'body': {'body': 'CATKIN_PACKAGES', 'type': 'unquoted_argument'}, 'type': 'argument', 'argument_type': 'unquoted'}, {'body': '\n', 'type': 'whitespace'}, {'body': {'body': 'roscpp', 'type': 'unquoted_argument'}, 'type': 'argument', 'argument_type': 'unquoted'}, {'body': '\n\t', 'type': 'whitespace'}, {'comment': 'line', 'body': {'body': 'octomap_msgs', 'type': 'line_comment'}, 'type': 'comment'}, {'body': '\t', 'type': 'whitespace'}, {'type': 'rparenthesis'}], 'type': 'argument_list'}}) def test_command_idempotency_1(self): #normal operation inp = "find_package ( CATKIN_PACKAGES\nroscpp\n\t#octomap_msgs\n\t)" res, data = parse_item(inp) self.assertEqual(res, CombinatorState.FINISHED) out = Command().code_gen(data) self.assertEqual(inp, out) def test_command_idempotency_2(self): #normal operation inp = "find_package( CATKIN_PACKAGES\nroscpp\n\t#octomap_msgs\n\t)" res, data = parse_item(inp) self.assertEqual(res, CombinatorState.FINISHED) out = Command().code_gen(data) self.assertEqual(inp, out)
49.969231
141
0.536946
312
3,248
5.423077
0.198718
0.01182
0.035461
0.052009
0.840426
0.840426
0.840426
0.840426
0.840426
0.840426
0
0.001733
0.289409
3,248
65
142
49.969231
0.731369
0.019704
0
0.740741
0
0
0.323483
0.056586
0
0
0
0
0.148148
1
0.092593
false
0
0.037037
0
0.166667
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
4f919a24782764249d40651ffd6b62dda7d51fa2
4,627
py
Python
ipython_log.py
EibhinnLee/pands-project
3e2ad56331c88e41d3c6e425405c91c49694d823
[ "MIT" ]
null
null
null
ipython_log.py
EibhinnLee/pands-project
3e2ad56331c88e41d3c6e425405c91c49694d823
[ "MIT" ]
null
null
null
ipython_log.py
EibhinnLee/pands-project
3e2ad56331c88e41d3c6e425405c91c49694d823
[ "MIT" ]
null
null
null
# IPython log file get_ipython().run_line_magic('logstart', '') import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt df df = pd.read_csv('Iris_dataset.txt') df df['PW'] df.info() ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y ='SW', color ='red', label = 'setosa') ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y ='SW', color ='red', label = 'setosa') df[df.Species=='Iris-versicolor'].plot.scatter(x='SW', y='SL', color = 'blue', label = 'versicolor', ax = ax) ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y ='SW', color ='red', label = 'setosa') x = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y ='SW', color ='red', label = 'setosa') ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y ='SW', color ='red', label = 'setosa') df[df.Species ...: =='Iris-versicolor'].plot.scatter(x='SW', y='SL', color = 'blue', label = 'versicolor', ax = ax) ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y='SW', color='red', label='setosa') df[df.Species=='Iris-versicolor'].plot.scatter(x='SL', y='SW', color='green', label='versicolor', ax=ax) df[df.Species=='Iris-virginica'].plot.scatter(x='SL', y='SW', color='blue', label='virginica', ax=ax) ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y='SW', color='red', label='setosa') df[df.Species=='Iris-versicolor'].plot.scatter(x='SL', y='SW', color='green', label='versicolor', ax=ax) df[df.Species=='Iris-virginica'].plot.scatter(x='SL', y='SW', color='blue', label='virginica', ax=ax) ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y='SW', color='red', label='setosa') df[df.Species=='Iris-versicolor'].plot.scatter(x='SL', y='SW', color='green', label='versicolor', ax=ax) df[df.Species=='Iris-virginica'].plot.scatter(x='SL', y='SW', color='blue', label='virginica', ax=ax) sns.FaceGrid(df, hue="Species",size = 4).map(plt.scatter,"SW","SL").add_legend sns.FaceGrid(df, hue="Species",size = 4).map(plt.scatter,"SW","SL").add_legend ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y='SW', color='red', label='setosa') ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y='SW', color='red', label='setosa') ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y='SW', color='red', label='setosa') ax ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y='SW', color='red', label='setosa') df[df.Species=='Iris-versicolor'].plot.scatter(x='SL', y='SW', color='green', label='versicolor', ax=ax) df[df.Species=='Iris-virginica'].plot.scatter(x='SL', y='SW', color='blue', label='virginica', ax=ax) df pp = df[df.Species=='Iris-setosa'].plot.scatter(x='PL', y='PW', color='red', label='setosa') df[df.Species=='Iris-versicolor'].plot.scatter(x='PL', y='PW', color='green', label='versicolor', ax=ax) df[df.Species=='Iris-virginica'].plot.scatter(x='PL', y='PW', color='blue', label='virginica', ax=ax) df.plot(kind = 'scatter', x = 'SL', y = 'SW') plt.scatter(group.index) plot.scatter(group.index) ax = df[df.Species=='Iris-setosa'].plot.scatter(x='SL', y='SW', color='red', label='setosa') df[df.Species=='Iris-versicolor'].plot.scatter(x='SL', y='SW', color='green', label='versicolor', ax=ax) df["species"].value_counts() sns.FacetGrid(df, hue="species", size=5) \ .map(plt.scatter, "sepal length (cm)", "sepal width (cm)") \ .add_legend() sns.pairplot(df.drop("target", axis=1), hue="species", size=3) sns.set_style("whitegrid"); sns.FacetGrid(df, hue="Species", size = 4).map(plt.scatter,"SL","SW").add_legend() df exit()
112.853659
635
0.496434
583
4,627
3.921098
0.125214
0.050744
0.129921
0.177165
0.842957
0.83727
0.819773
0.79965
0.772091
0.772091
0
0.001852
0.299978
4,627
40
636
115.675
0.703921
0.003458
0
0.394737
0
0
0.19527
0
0
0
0
0
0
0
null
null
0
0.105263
null
null
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
9