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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6fc4a2daf6b759ba8bc4213dc5af6877f7f9f9b2 | 42,977 | py | Python | pybind/slxos/v16r_1_00b/mpls_state/rsvp/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/mpls_state/rsvp/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/mpls_state/rsvp/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from decimal import Decimal
from bitarray import bitarray
import __builtin__
import statistics
import igp_sync
import interfaces
import sessions
import neighbors
class rsvp(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module brocade-mpls-operational - based on the path /mpls-state/rsvp. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: MPLS RSVP Operational Information
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_rest_name', '_extmethods', '__protocol_status','__refresh_interval','__refresh_multiple','__transport_address','__delay_resv_sending','__backup_bandwidth_requirement','__msgid_epoch','__statistics','__igp_sync','__interfaces','__sessions','__neighbors',)
_yang_name = 'rsvp'
_rest_name = 'rsvp'
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
path_helper_ = kwargs.pop("path_helper", None)
if path_helper_ is False:
self._path_helper = False
elif path_helper_ is not None and isinstance(path_helper_, xpathhelper.YANGPathHelper):
self._path_helper = path_helper_
elif hasattr(self, "_parent"):
path_helper_ = getattr(self._parent, "_path_helper", False)
self._path_helper = path_helper_
else:
self._path_helper = False
extmethods = kwargs.pop("extmethods", None)
if extmethods is False:
self._extmethods = False
elif extmethods is not None and isinstance(extmethods, dict):
self._extmethods = extmethods
elif hasattr(self, "_parent"):
extmethods = getattr(self._parent, "_extmethods", None)
self._extmethods = extmethods
else:
self._extmethods = False
self.__neighbors = YANGDynClass(base=YANGListType("neighbor_ip_addr",neighbors.neighbors, yang_name="neighbors", rest_name="neighbors", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-ip-addr', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-neighbor', u'cli-suppress-show-path': None}}), is_container='list', yang_name="neighbors", rest_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-neighbor', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
self.__delay_resv_sending = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="delay-resv-sending", rest_name="delay-resv-sending", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)
self.__transport_address = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}), is_leaf=True, yang_name="transport-address", rest_name="transport-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='inet:ipv4-address', is_config=False)
self.__msgid_epoch = YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="msgid-epoch", rest_name="msgid-epoch", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint32', is_config=False)
self.__sessions = YANGDynClass(base=YANGListType("dest_ip_addr src_ip_addr tunnel_id session_role",sessions.sessions, yang_name="sessions", rest_name="sessions", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='dest-ip-addr src-ip-addr tunnel-id session-role', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-session', u'cli-suppress-show-path': None}}), is_container='list', yang_name="sessions", rest_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-session', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
self.__interfaces = YANGDynClass(base=YANGListType("interface_index",interfaces.interfaces, yang_name="interfaces", rest_name="interfaces", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-index', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-interface', u'cli-suppress-show-path': None}}), is_container='list', yang_name="interfaces", rest_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-interface', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
self.__protocol_status = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="protocol-status", rest_name="protocol-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)
self.__refresh_multiple = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="refresh-multiple", rest_name="refresh-multiple", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint16', is_config=False)
self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', presence=False, yang_name="statistics", rest_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-statistics', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='container', is_config=False)
self.__igp_sync = YANGDynClass(base=igp_sync.igp_sync, is_container='container', presence=False, yang_name="igp-sync", rest_name="igp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-igp-sync', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='container', is_config=False)
self.__backup_bandwidth_requirement = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup-bandwidth-requirement", rest_name="backup-bandwidth-requirement", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)
self.__refresh_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="refresh-interval", rest_name="refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint16', is_config=False)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'mpls-state', u'rsvp']
def _rest_path(self):
if hasattr(self, "_parent"):
if self._rest_name:
return self._parent._rest_path()+[self._rest_name]
else:
return self._parent._rest_path()
else:
return [u'mpls-state', u'rsvp']
def _get_protocol_status(self):
"""
Getter method for protocol_status, mapped from YANG variable /mpls_state/rsvp/protocol_status (boolean)
YANG Description: RSVP protocol status (enabled or disabled)
"""
return self.__protocol_status
def _set_protocol_status(self, v, load=False):
"""
Setter method for protocol_status, mapped from YANG variable /mpls_state/rsvp/protocol_status (boolean)
If this variable is read-only (config: false) in the
source YANG file, then _set_protocol_status is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_protocol_status() directly.
YANG Description: RSVP protocol status (enabled or disabled)
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="protocol-status", rest_name="protocol-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """protocol_status must be of a type compatible with boolean""",
'defined-type': "boolean",
'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="protocol-status", rest_name="protocol-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)""",
})
self.__protocol_status = t
if hasattr(self, '_set'):
self._set()
def _unset_protocol_status(self):
self.__protocol_status = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="protocol-status", rest_name="protocol-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)
def _get_refresh_interval(self):
"""
Getter method for refresh_interval, mapped from YANG variable /mpls_state/rsvp/refresh_interval (uint16)
YANG Description: Refresh interval (R)
"""
return self.__refresh_interval
def _set_refresh_interval(self, v, load=False):
"""
Setter method for refresh_interval, mapped from YANG variable /mpls_state/rsvp/refresh_interval (uint16)
If this variable is read-only (config: false) in the
source YANG file, then _set_refresh_interval is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_refresh_interval() directly.
YANG Description: Refresh interval (R)
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="refresh-interval", rest_name="refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint16', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """refresh_interval must be of a type compatible with uint16""",
'defined-type': "uint16",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="refresh-interval", rest_name="refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint16', is_config=False)""",
})
self.__refresh_interval = t
if hasattr(self, '_set'):
self._set()
def _unset_refresh_interval(self):
self.__refresh_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="refresh-interval", rest_name="refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint16', is_config=False)
def _get_refresh_multiple(self):
"""
Getter method for refresh_multiple, mapped from YANG variable /mpls_state/rsvp/refresh_multiple (uint16)
YANG Description: Refresh multiple (K)
"""
return self.__refresh_multiple
def _set_refresh_multiple(self, v, load=False):
"""
Setter method for refresh_multiple, mapped from YANG variable /mpls_state/rsvp/refresh_multiple (uint16)
If this variable is read-only (config: false) in the
source YANG file, then _set_refresh_multiple is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_refresh_multiple() directly.
YANG Description: Refresh multiple (K)
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="refresh-multiple", rest_name="refresh-multiple", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint16', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """refresh_multiple must be of a type compatible with uint16""",
'defined-type': "uint16",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="refresh-multiple", rest_name="refresh-multiple", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint16', is_config=False)""",
})
self.__refresh_multiple = t
if hasattr(self, '_set'):
self._set()
def _unset_refresh_multiple(self):
self.__refresh_multiple = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="refresh-multiple", rest_name="refresh-multiple", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint16', is_config=False)
def _get_transport_address(self):
"""
Getter method for transport_address, mapped from YANG variable /mpls_state/rsvp/transport_address (inet:ipv4-address)
YANG Description: Transport Address
"""
return self.__transport_address
def _set_transport_address(self, v, load=False):
"""
Setter method for transport_address, mapped from YANG variable /mpls_state/rsvp/transport_address (inet:ipv4-address)
If this variable is read-only (config: false) in the
source YANG file, then _set_transport_address is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_transport_address() directly.
YANG Description: Transport Address
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}), is_leaf=True, yang_name="transport-address", rest_name="transport-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='inet:ipv4-address', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """transport_address must be of a type compatible with inet:ipv4-address""",
'defined-type': "inet:ipv4-address",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}), is_leaf=True, yang_name="transport-address", rest_name="transport-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='inet:ipv4-address', is_config=False)""",
})
self.__transport_address = t
if hasattr(self, '_set'):
self._set()
def _unset_transport_address(self):
self.__transport_address = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}), is_leaf=True, yang_name="transport-address", rest_name="transport-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='inet:ipv4-address', is_config=False)
def _get_delay_resv_sending(self):
"""
Getter method for delay_resv_sending, mapped from YANG variable /mpls_state/rsvp/delay_resv_sending (boolean)
YANG Description: Delayed RESV sending
"""
return self.__delay_resv_sending
def _set_delay_resv_sending(self, v, load=False):
"""
Setter method for delay_resv_sending, mapped from YANG variable /mpls_state/rsvp/delay_resv_sending (boolean)
If this variable is read-only (config: false) in the
source YANG file, then _set_delay_resv_sending is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_delay_resv_sending() directly.
YANG Description: Delayed RESV sending
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="delay-resv-sending", rest_name="delay-resv-sending", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """delay_resv_sending must be of a type compatible with boolean""",
'defined-type': "boolean",
'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="delay-resv-sending", rest_name="delay-resv-sending", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)""",
})
self.__delay_resv_sending = t
if hasattr(self, '_set'):
self._set()
def _unset_delay_resv_sending(self):
self.__delay_resv_sending = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="delay-resv-sending", rest_name="delay-resv-sending", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)
def _get_backup_bandwidth_requirement(self):
"""
Getter method for backup_bandwidth_requirement, mapped from YANG variable /mpls_state/rsvp/backup_bandwidth_requirement (boolean)
YANG Description: Backup bandwidth requirement's interpretation
"""
return self.__backup_bandwidth_requirement
def _set_backup_bandwidth_requirement(self, v, load=False):
"""
Setter method for backup_bandwidth_requirement, mapped from YANG variable /mpls_state/rsvp/backup_bandwidth_requirement (boolean)
If this variable is read-only (config: false) in the
source YANG file, then _set_backup_bandwidth_requirement is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_backup_bandwidth_requirement() directly.
YANG Description: Backup bandwidth requirement's interpretation
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="backup-bandwidth-requirement", rest_name="backup-bandwidth-requirement", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """backup_bandwidth_requirement must be of a type compatible with boolean""",
'defined-type': "boolean",
'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup-bandwidth-requirement", rest_name="backup-bandwidth-requirement", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)""",
})
self.__backup_bandwidth_requirement = t
if hasattr(self, '_set'):
self._set()
def _unset_backup_bandwidth_requirement(self):
self.__backup_bandwidth_requirement = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup-bandwidth-requirement", rest_name="backup-bandwidth-requirement", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='boolean', is_config=False)
def _get_msgid_epoch(self):
"""
Getter method for msgid_epoch, mapped from YANG variable /mpls_state/rsvp/msgid_epoch (uint32)
YANG Description: Message id epoch
"""
return self.__msgid_epoch
def _set_msgid_epoch(self, v, load=False):
"""
Setter method for msgid_epoch, mapped from YANG variable /mpls_state/rsvp/msgid_epoch (uint32)
If this variable is read-only (config: false) in the
source YANG file, then _set_msgid_epoch is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_msgid_epoch() directly.
YANG Description: Message id epoch
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="msgid-epoch", rest_name="msgid-epoch", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint32', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """msgid_epoch must be of a type compatible with uint32""",
'defined-type': "uint32",
'generated-type': """YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="msgid-epoch", rest_name="msgid-epoch", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint32', is_config=False)""",
})
self.__msgid_epoch = t
if hasattr(self, '_set'):
self._set()
def _unset_msgid_epoch(self):
self.__msgid_epoch = YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="msgid-epoch", rest_name="msgid-epoch", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint32', is_config=False)
def _get_statistics(self):
"""
Getter method for statistics, mapped from YANG variable /mpls_state/rsvp/statistics (container)
YANG Description: MPLS RSVP global statistics
"""
return self.__statistics
def _set_statistics(self, v, load=False):
"""
Setter method for statistics, mapped from YANG variable /mpls_state/rsvp/statistics (container)
If this variable is read-only (config: false) in the
source YANG file, then _set_statistics is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_statistics() directly.
YANG Description: MPLS RSVP global statistics
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=statistics.statistics, is_container='container', presence=False, yang_name="statistics", rest_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-statistics', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='container', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """statistics must be of a type compatible with container""",
'defined-type': "container",
'generated-type': """YANGDynClass(base=statistics.statistics, is_container='container', presence=False, yang_name="statistics", rest_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-statistics', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='container', is_config=False)""",
})
self.__statistics = t
if hasattr(self, '_set'):
self._set()
def _unset_statistics(self):
self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', presence=False, yang_name="statistics", rest_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-statistics', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='container', is_config=False)
def _get_igp_sync(self):
"""
Getter method for igp_sync, mapped from YANG variable /mpls_state/rsvp/igp_sync (container)
YANG Description: MPLS Rsvp IGP Synchronization information
"""
return self.__igp_sync
def _set_igp_sync(self, v, load=False):
"""
Setter method for igp_sync, mapped from YANG variable /mpls_state/rsvp/igp_sync (container)
If this variable is read-only (config: false) in the
source YANG file, then _set_igp_sync is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_igp_sync() directly.
YANG Description: MPLS Rsvp IGP Synchronization information
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=igp_sync.igp_sync, is_container='container', presence=False, yang_name="igp-sync", rest_name="igp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-igp-sync', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='container', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """igp_sync must be of a type compatible with container""",
'defined-type': "container",
'generated-type': """YANGDynClass(base=igp_sync.igp_sync, is_container='container', presence=False, yang_name="igp-sync", rest_name="igp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-igp-sync', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='container', is_config=False)""",
})
self.__igp_sync = t
if hasattr(self, '_set'):
self._set()
def _unset_igp_sync(self):
self.__igp_sync = YANGDynClass(base=igp_sync.igp_sync, is_container='container', presence=False, yang_name="igp-sync", rest_name="igp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-igp-sync', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='container', is_config=False)
def _get_interfaces(self):
"""
Getter method for interfaces, mapped from YANG variable /mpls_state/rsvp/interfaces (list)
YANG Description: MPLS RSVP interface information
"""
return self.__interfaces
def _set_interfaces(self, v, load=False):
"""
Setter method for interfaces, mapped from YANG variable /mpls_state/rsvp/interfaces (list)
If this variable is read-only (config: false) in the
source YANG file, then _set_interfaces is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_interfaces() directly.
YANG Description: MPLS RSVP interface information
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGListType("interface_index",interfaces.interfaces, yang_name="interfaces", rest_name="interfaces", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-index', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-interface', u'cli-suppress-show-path': None}}), is_container='list', yang_name="interfaces", rest_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-interface', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """interfaces must be of a type compatible with list""",
'defined-type': "list",
'generated-type': """YANGDynClass(base=YANGListType("interface_index",interfaces.interfaces, yang_name="interfaces", rest_name="interfaces", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-index', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-interface', u'cli-suppress-show-path': None}}), is_container='list', yang_name="interfaces", rest_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-interface', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)""",
})
self.__interfaces = t
if hasattr(self, '_set'):
self._set()
def _unset_interfaces(self):
self.__interfaces = YANGDynClass(base=YANGListType("interface_index",interfaces.interfaces, yang_name="interfaces", rest_name="interfaces", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='interface-index', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-interface', u'cli-suppress-show-path': None}}), is_container='list', yang_name="interfaces", rest_name="interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-interface', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
def _get_sessions(self):
"""
Getter method for sessions, mapped from YANG variable /mpls_state/rsvp/sessions (list)
YANG Description: MPLS RSVP Sessions
"""
return self.__sessions
def _set_sessions(self, v, load=False):
"""
Setter method for sessions, mapped from YANG variable /mpls_state/rsvp/sessions (list)
If this variable is read-only (config: false) in the
source YANG file, then _set_sessions is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_sessions() directly.
YANG Description: MPLS RSVP Sessions
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGListType("dest_ip_addr src_ip_addr tunnel_id session_role",sessions.sessions, yang_name="sessions", rest_name="sessions", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='dest-ip-addr src-ip-addr tunnel-id session-role', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-session', u'cli-suppress-show-path': None}}), is_container='list', yang_name="sessions", rest_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-session', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """sessions must be of a type compatible with list""",
'defined-type': "list",
'generated-type': """YANGDynClass(base=YANGListType("dest_ip_addr src_ip_addr tunnel_id session_role",sessions.sessions, yang_name="sessions", rest_name="sessions", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='dest-ip-addr src-ip-addr tunnel-id session-role', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-session', u'cli-suppress-show-path': None}}), is_container='list', yang_name="sessions", rest_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-session', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)""",
})
self.__sessions = t
if hasattr(self, '_set'):
self._set()
def _unset_sessions(self):
self.__sessions = YANGDynClass(base=YANGListType("dest_ip_addr src_ip_addr tunnel_id session_role",sessions.sessions, yang_name="sessions", rest_name="sessions", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='dest-ip-addr src-ip-addr tunnel-id session-role', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-session', u'cli-suppress-show-path': None}}), is_container='list', yang_name="sessions", rest_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-session', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
def _get_neighbors(self):
"""
Getter method for neighbors, mapped from YANG variable /mpls_state/rsvp/neighbors (list)
YANG Description: RSVP Neighbor Operational Information
"""
return self.__neighbors
def _set_neighbors(self, v, load=False):
"""
Setter method for neighbors, mapped from YANG variable /mpls_state/rsvp/neighbors (list)
If this variable is read-only (config: false) in the
source YANG file, then _set_neighbors is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_neighbors() directly.
YANG Description: RSVP Neighbor Operational Information
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGListType("neighbor_ip_addr",neighbors.neighbors, yang_name="neighbors", rest_name="neighbors", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-ip-addr', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-neighbor', u'cli-suppress-show-path': None}}), is_container='list', yang_name="neighbors", rest_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-neighbor', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """neighbors must be of a type compatible with list""",
'defined-type': "list",
'generated-type': """YANGDynClass(base=YANGListType("neighbor_ip_addr",neighbors.neighbors, yang_name="neighbors", rest_name="neighbors", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-ip-addr', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-neighbor', u'cli-suppress-show-path': None}}), is_container='list', yang_name="neighbors", rest_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-neighbor', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)""",
})
self.__neighbors = t
if hasattr(self, '_set'):
self._set()
def _unset_neighbors(self):
self.__neighbors = YANGDynClass(base=YANGListType("neighbor_ip_addr",neighbors.neighbors, yang_name="neighbors", rest_name="neighbors", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-ip-addr', extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-neighbor', u'cli-suppress-show-path': None}}), is_container='list', yang_name="neighbors", rest_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-rsvp-neighbor', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
protocol_status = __builtin__.property(_get_protocol_status)
refresh_interval = __builtin__.property(_get_refresh_interval)
refresh_multiple = __builtin__.property(_get_refresh_multiple)
transport_address = __builtin__.property(_get_transport_address)
delay_resv_sending = __builtin__.property(_get_delay_resv_sending)
backup_bandwidth_requirement = __builtin__.property(_get_backup_bandwidth_requirement)
msgid_epoch = __builtin__.property(_get_msgid_epoch)
statistics = __builtin__.property(_get_statistics)
igp_sync = __builtin__.property(_get_igp_sync)
interfaces = __builtin__.property(_get_interfaces)
sessions = __builtin__.property(_get_sessions)
neighbors = __builtin__.property(_get_neighbors)
_pyangbind_elements = {'protocol_status': protocol_status, 'refresh_interval': refresh_interval, 'refresh_multiple': refresh_multiple, 'transport_address': transport_address, 'delay_resv_sending': delay_resv_sending, 'backup_bandwidth_requirement': backup_bandwidth_requirement, 'msgid_epoch': msgid_epoch, 'statistics': statistics, 'igp_sync': igp_sync, 'interfaces': interfaces, 'sessions': sessions, 'neighbors': neighbors, }
| 76.335702 | 824 | 0.748051 | 5,808 | 42,977 | 5.296832 | 0.040806 | 0.043557 | 0.050969 | 0.035106 | 0.877129 | 0.848784 | 0.831101 | 0.814393 | 0.808022 | 0.797621 | 0 | 0.008997 | 0.11548 | 42,977 | 562 | 825 | 76.47153 | 0.800284 | 0.157177 | 0 | 0.485623 | 0 | 0.047923 | 0.408399 | 0.229023 | 0 | 0 | 0 | 0 | 0 | 1 | 0.124601 | false | 0 | 0.041534 | 0 | 0.277955 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
6fce00b9af2a31898e244321bb75a44ba57a5883 | 198 | py | Python | src/pacman/lib/models/sine_curve.py | sebastian-zieba/PACMAN | 2eb1e4b450c97dc28d5a05b3ebddd80706cfca79 | [
"MIT"
] | 1 | 2022-03-23T10:26:33.000Z | 2022-03-23T10:26:33.000Z | src/pacman/lib/models/sine_curve.py | sebastian-zieba/PACMAN | 2eb1e4b450c97dc28d5a05b3ebddd80706cfca79 | [
"MIT"
] | null | null | null | src/pacman/lib/models/sine_curve.py | sebastian-zieba/PACMAN | 2eb1e4b450c97dc28d5a05b3ebddd80706cfca79 | [
"MIT"
] | 1 | 2022-03-29T13:37:31.000Z | 2022-03-29T13:37:31.000Z | import numpy as np
def get_phaselc(t, p, data, v_num):
return 1.+p.amp1[v_num]*np.cos(2.*np.pi*(t-p.theta1[v_num])/p.per[v_num]) + p.amp2[v_num]*np.cos(4.*np.pi*(t-p.theta2[v_num])/p.per[v_num])
| 33 | 140 | 0.661616 | 50 | 198 | 2.46 | 0.46 | 0.227642 | 0.121951 | 0.146341 | 0.195122 | 0.195122 | 0 | 0 | 0 | 0 | 0 | 0.038462 | 0.080808 | 198 | 5 | 141 | 39.6 | 0.637363 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
6fcf9c2d7fe2987d76bfac30e1d6729b0a9d7ec9 | 215 | py | Python | efficientnet/__init__.py | Lornatang/EfficientNet | 1b8718735888aa21fbef78b825af1dacd3c257a2 | [
"Apache-2.0"
] | 4 | 2020-01-12T01:02:04.000Z | 2020-04-10T00:32:05.000Z | efficientnet/__init__.py | Lornatang/EfficientNet | 1b8718735888aa21fbef78b825af1dacd3c257a2 | [
"Apache-2.0"
] | null | null | null | efficientnet/__init__.py | Lornatang/EfficientNet | 1b8718735888aa21fbef78b825af1dacd3c257a2 | [
"Apache-2.0"
] | null | null | null | __version__ = "0.3.1"
from .model import EfficientNet
from .utils import GlobalParams
from .utils import BlockArgs
from .utils import BlockDecoder
from .utils import efficientnet
from .utils import get_model_params
| 26.875 | 35 | 0.823256 | 30 | 215 | 5.7 | 0.466667 | 0.263158 | 0.438596 | 0.315789 | 0.385965 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015957 | 0.125581 | 215 | 7 | 36 | 30.714286 | 0.893617 | 0 | 0 | 0 | 0 | 0 | 0.023256 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.857143 | 0 | 0.857143 | 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 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
6ffd0886d4a70bb1de0f7217771e26bf12458003 | 37,749 | py | Python | instances/passenger_demand/pas-20210421-2109-int12e/80.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int12e/80.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int12e/80.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 2846
passenger_arriving = (
(4, 6, 12, 1, 0, 0, 5, 10, 4, 7, 1, 0), # 0
(2, 11, 7, 3, 1, 0, 7, 10, 7, 1, 3, 0), # 1
(2, 2, 8, 0, 1, 0, 4, 10, 4, 3, 4, 0), # 2
(3, 6, 5, 5, 2, 0, 5, 4, 3, 4, 1, 0), # 3
(4, 10, 2, 1, 2, 0, 4, 6, 4, 3, 1, 0), # 4
(2, 4, 5, 4, 2, 0, 3, 7, 3, 7, 1, 0), # 5
(6, 2, 11, 6, 0, 0, 6, 9, 5, 3, 1, 0), # 6
(5, 6, 10, 3, 2, 0, 10, 7, 4, 4, 1, 0), # 7
(2, 14, 4, 4, 3, 0, 6, 2, 3, 1, 2, 0), # 8
(5, 9, 7, 2, 1, 0, 8, 10, 6, 8, 1, 0), # 9
(2, 3, 6, 2, 3, 0, 4, 8, 11, 9, 2, 0), # 10
(2, 10, 7, 4, 2, 0, 5, 11, 10, 4, 5, 0), # 11
(3, 7, 5, 1, 3, 0, 5, 5, 4, 2, 3, 0), # 12
(2, 9, 7, 7, 2, 0, 6, 7, 3, 3, 2, 0), # 13
(5, 1, 4, 2, 0, 0, 6, 7, 9, 5, 3, 0), # 14
(5, 12, 9, 5, 1, 0, 7, 10, 6, 2, 0, 0), # 15
(6, 11, 4, 1, 2, 0, 1, 9, 2, 2, 2, 0), # 16
(2, 10, 3, 4, 1, 0, 6, 5, 2, 3, 2, 0), # 17
(7, 6, 9, 2, 3, 0, 6, 4, 5, 1, 1, 0), # 18
(4, 7, 6, 9, 2, 0, 4, 5, 6, 4, 0, 0), # 19
(5, 11, 4, 6, 3, 0, 8, 8, 3, 3, 2, 0), # 20
(6, 7, 5, 5, 5, 0, 4, 9, 7, 4, 5, 0), # 21
(5, 7, 5, 3, 2, 0, 2, 5, 5, 5, 2, 0), # 22
(5, 8, 7, 3, 3, 0, 6, 11, 7, 5, 5, 0), # 23
(5, 9, 7, 6, 2, 0, 9, 6, 3, 3, 2, 0), # 24
(4, 8, 5, 3, 4, 0, 6, 7, 7, 1, 3, 0), # 25
(4, 7, 3, 3, 5, 0, 9, 12, 6, 6, 2, 0), # 26
(3, 6, 5, 4, 1, 0, 7, 8, 8, 4, 2, 0), # 27
(2, 11, 13, 3, 1, 0, 11, 9, 3, 9, 1, 0), # 28
(5, 6, 3, 4, 0, 0, 4, 14, 3, 3, 1, 0), # 29
(1, 11, 3, 3, 3, 0, 4, 6, 5, 5, 2, 0), # 30
(4, 10, 4, 4, 1, 0, 11, 8, 7, 8, 2, 0), # 31
(2, 10, 7, 3, 2, 0, 9, 9, 6, 5, 1, 0), # 32
(3, 8, 4, 2, 2, 0, 6, 7, 6, 3, 4, 0), # 33
(6, 7, 8, 5, 1, 0, 3, 7, 4, 4, 2, 0), # 34
(5, 10, 5, 3, 3, 0, 2, 7, 2, 3, 1, 0), # 35
(2, 8, 8, 4, 4, 0, 1, 4, 8, 3, 0, 0), # 36
(5, 8, 6, 3, 4, 0, 2, 4, 7, 8, 5, 0), # 37
(5, 5, 6, 6, 0, 0, 6, 7, 7, 6, 1, 0), # 38
(7, 9, 5, 2, 1, 0, 4, 5, 2, 1, 5, 0), # 39
(5, 10, 9, 3, 2, 0, 9, 4, 7, 5, 0, 0), # 40
(2, 10, 6, 2, 3, 0, 6, 10, 8, 4, 0, 0), # 41
(7, 8, 6, 5, 0, 0, 4, 9, 4, 6, 3, 0), # 42
(5, 8, 5, 2, 4, 0, 5, 8, 5, 4, 1, 0), # 43
(4, 9, 8, 4, 1, 0, 5, 8, 7, 4, 3, 0), # 44
(3, 5, 5, 3, 3, 0, 4, 7, 10, 4, 1, 0), # 45
(7, 9, 4, 2, 1, 0, 8, 10, 3, 4, 1, 0), # 46
(4, 7, 3, 3, 3, 0, 4, 11, 5, 3, 0, 0), # 47
(3, 9, 5, 1, 2, 0, 8, 7, 3, 3, 2, 0), # 48
(11, 8, 8, 3, 2, 0, 9, 7, 7, 3, 0, 0), # 49
(2, 6, 9, 4, 4, 0, 4, 9, 5, 5, 0, 0), # 50
(4, 10, 12, 3, 3, 0, 6, 12, 8, 4, 5, 0), # 51
(3, 4, 6, 4, 0, 0, 5, 4, 8, 5, 3, 0), # 52
(5, 7, 6, 2, 2, 0, 5, 7, 8, 3, 4, 0), # 53
(4, 10, 5, 3, 3, 0, 3, 8, 5, 8, 1, 0), # 54
(6, 10, 7, 5, 1, 0, 4, 11, 2, 4, 0, 0), # 55
(7, 7, 7, 3, 5, 0, 2, 7, 2, 5, 2, 0), # 56
(4, 5, 2, 4, 3, 0, 4, 10, 4, 3, 1, 0), # 57
(2, 8, 6, 9, 2, 0, 3, 7, 1, 7, 2, 0), # 58
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 59
)
station_arriving_intensity = (
(3.1795818700614573, 8.15575284090909, 9.59308322622108, 7.603532608695652, 8.571634615384614, 5.708152173913044), # 0
(3.20942641205736, 8.246449918455387, 9.644898645029993, 7.6458772644927535, 8.635879807692307, 5.706206567028985), # 1
(3.238930172666081, 8.335801683501682, 9.695484147386459, 7.687289855072463, 8.69876923076923, 5.704201449275362), # 2
(3.268068107989464, 8.42371171875, 9.744802779562981, 7.727735054347824, 8.760245192307693, 5.702137092391305), # 3
(3.296815174129353, 8.510083606902358, 9.792817587832047, 7.767177536231884, 8.82025, 5.700013768115941), # 4
(3.3251463271875914, 8.594820930660775, 9.839491618466152, 7.805581974637681, 8.87872596153846, 5.697831748188405), # 5
(3.353036523266023, 8.677827272727273, 9.88478791773779, 7.842913043478261, 8.935615384615383, 5.695591304347826), # 6
(3.380460718466491, 8.75900621580387, 9.92866953191945, 7.879135416666666, 8.990860576923078, 5.693292708333334), # 7
(3.40739386889084, 8.83826134259259, 9.971099507283634, 7.914213768115941, 9.044403846153847, 5.6909362318840575), # 8
(3.4338109306409126, 8.915496235795453, 10.012040890102828, 7.9481127717391304, 9.0961875, 5.68852214673913), # 9
(3.459686859818554, 8.990614478114479, 10.051456726649528, 7.980797101449276, 9.146153846153846, 5.68605072463768), # 10
(3.4849966125256073, 9.063519652251683, 10.089310063196228, 8.012231431159421, 9.194245192307692, 5.683522237318841), # 11
(3.509715144863916, 9.134115340909089, 10.125563946015424, 8.042380434782608, 9.240403846153844, 5.680936956521738), # 12
(3.5338174129353224, 9.20230512678872, 10.160181421379605, 8.071208786231884, 9.284572115384616, 5.678295153985506), # 13
(3.5572783728416737, 9.267992592592593, 10.193125535561265, 8.098681159420288, 9.326692307692307, 5.6755971014492745), # 14
(3.5800729806848106, 9.331081321022726, 10.224359334832902, 8.124762228260868, 9.36670673076923, 5.672843070652174), # 15
(3.6021761925665783, 9.391474894781144, 10.25384586546701, 8.149416666666665, 9.404557692307693, 5.6700333333333335), # 16
(3.6235629645888205, 9.449076896569863, 10.281548173736075, 8.172609148550725, 9.4401875, 5.667168161231884), # 17
(3.64420825285338, 9.503790909090908, 10.307429305912597, 8.194304347826087, 9.473538461538464, 5.664247826086956), # 18
(3.664087013462101, 9.555520515046295, 10.331452308269066, 8.214466938405796, 9.504552884615384, 5.661272599637681), # 19
(3.683174202516827, 9.604169297138045, 10.353580227077975, 8.2330615942029, 9.533173076923077, 5.658242753623187), # 20
(3.7014447761194034, 9.649640838068178, 10.373776108611827, 8.250052989130435, 9.559341346153845, 5.655158559782609), # 21
(3.7188736903716704, 9.69183872053872, 10.3920029991431, 8.26540579710145, 9.582999999999998, 5.652020289855073), # 22
(3.7354359013754754, 9.730666527251683, 10.408223944944302, 8.279084692028986, 9.604091346153846, 5.6488282155797105), # 23
(3.75110636523266, 9.76602784090909, 10.422401992287917, 8.291054347826087, 9.62255769230769, 5.645582608695652), # 24
(3.7658600380450684, 9.797826244212962, 10.434500187446444, 8.301279438405798, 9.638341346153844, 5.642283740942029), # 25
(3.779671875914545, 9.825965319865318, 10.444481576692374, 8.309724637681159, 9.651384615384615, 5.63893188405797), # 26
(3.792516834942932, 9.85034865056818, 10.452309206298198, 8.316354619565217, 9.661629807692309, 5.635527309782609), # 27
(3.804369871232075, 9.870879819023568, 10.457946122536418, 8.321134057971014, 9.66901923076923, 5.632070289855072), # 28
(3.815205940883816, 9.887462407933501, 10.461355371679518, 8.324027626811594, 9.673495192307692, 5.628561096014493), # 29
(3.8249999999999997, 9.9, 10.4625, 8.325, 9.674999999999999, 5.625), # 30
(3.834164434143222, 9.910414559659088, 10.461641938405796, 8.324824387254901, 9.674452393617022, 5.620051511744128), # 31
(3.843131010230179, 9.920691477272728, 10.459092028985506, 8.324300980392156, 9.672821276595744, 5.612429710144928), # 32
(3.8519037563938614, 9.930829474431818, 10.45488668478261, 8.323434926470588, 9.670124202127658, 5.6022092203898035), # 33
(3.860486700767263, 9.940827272727272, 10.449062318840578, 8.32223137254902, 9.666378723404256, 5.589464667666167), # 34
(3.8688838714833755, 9.950683593749998, 10.441655344202898, 8.320695465686274, 9.661602393617022, 5.574270677161419), # 35
(3.8770992966751923, 9.96039715909091, 10.432702173913043, 8.318832352941177, 9.655812765957448, 5.556701874062968), # 36
(3.885137004475703, 9.96996669034091, 10.422239221014491, 8.316647181372549, 9.64902739361702, 5.536832883558221), # 37
(3.893001023017902, 9.979390909090908, 10.410302898550723, 8.314145098039214, 9.641263829787233, 5.514738330834581), # 38
(3.900695380434782, 9.988668536931817, 10.396929619565215, 8.31133125, 9.632539627659574, 5.490492841079459), # 39
(3.908224104859335, 9.997798295454546, 10.382155797101449, 8.308210784313726, 9.62287234042553, 5.464171039480259), # 40
(3.915591224424552, 10.006778906249998, 10.366017844202899, 8.304788848039216, 9.612279521276594, 5.435847551224389), # 41
(3.9228007672634266, 10.015609090909093, 10.348552173913044, 8.301070588235293, 9.600778723404256, 5.40559700149925), # 42
(3.929856761508952, 10.024287571022725, 10.329795199275361, 8.297061151960785, 9.5883875, 5.373494015492254), # 43
(3.936763235294117, 10.032813068181818, 10.309783333333334, 8.292765686274508, 9.575123404255319, 5.339613218390804), # 44
(3.9435242167519178, 10.041184303977271, 10.288552989130435, 8.288189338235293, 9.561003989361701, 5.304029235382309), # 45
(3.9501437340153456, 10.0494, 10.266140579710147, 8.28333725490196, 9.546046808510638, 5.266816691654173), # 46
(3.956625815217391, 10.05745887784091, 10.24258251811594, 8.278214583333332, 9.530269414893617, 5.228050212393803), # 47
(3.962974488491049, 10.065359659090909, 10.217915217391303, 8.272826470588234, 9.513689361702127, 5.187804422788607), # 48
(3.9691937819693086, 10.073101065340907, 10.19217509057971, 8.26717806372549, 9.49632420212766, 5.146153948025987), # 49
(3.9752877237851663, 10.080681818181816, 10.165398550724637, 8.261274509803922, 9.478191489361702, 5.103173413293353), # 50
(3.9812603420716113, 10.088100639204544, 10.137622010869565, 8.255120955882353, 9.459308776595744, 5.0589374437781105), # 51
(3.987115664961637, 10.09535625, 10.10888188405797, 8.248722549019607, 9.439693617021277, 5.013520664667666), # 52
(3.992857720588235, 10.10244737215909, 10.079214583333332, 8.24208443627451, 9.419363563829787, 4.966997701149425), # 53
(3.9984905370843995, 10.109372727272726, 10.04865652173913, 8.235211764705882, 9.398336170212765, 4.919443178410794), # 54
(4.00401814258312, 10.116131036931817, 10.017244112318838, 8.22810968137255, 9.376628989361702, 4.87093172163918), # 55
(4.0094445652173905, 10.122721022727271, 9.985013768115941, 8.220783333333333, 9.354259574468085, 4.821537956021989), # 56
(4.014773833120205, 10.129141406250001, 9.952001902173912, 8.213237867647058, 9.331245478723403, 4.771336506746626), # 57
(4.0200099744245525, 10.135390909090907, 9.91824492753623, 8.20547843137255, 9.307604255319148, 4.7204019990005), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_arriving_acc = (
(4, 6, 12, 1, 0, 0, 5, 10, 4, 7, 1, 0), # 0
(6, 17, 19, 4, 1, 0, 12, 20, 11, 8, 4, 0), # 1
(8, 19, 27, 4, 2, 0, 16, 30, 15, 11, 8, 0), # 2
(11, 25, 32, 9, 4, 0, 21, 34, 18, 15, 9, 0), # 3
(15, 35, 34, 10, 6, 0, 25, 40, 22, 18, 10, 0), # 4
(17, 39, 39, 14, 8, 0, 28, 47, 25, 25, 11, 0), # 5
(23, 41, 50, 20, 8, 0, 34, 56, 30, 28, 12, 0), # 6
(28, 47, 60, 23, 10, 0, 44, 63, 34, 32, 13, 0), # 7
(30, 61, 64, 27, 13, 0, 50, 65, 37, 33, 15, 0), # 8
(35, 70, 71, 29, 14, 0, 58, 75, 43, 41, 16, 0), # 9
(37, 73, 77, 31, 17, 0, 62, 83, 54, 50, 18, 0), # 10
(39, 83, 84, 35, 19, 0, 67, 94, 64, 54, 23, 0), # 11
(42, 90, 89, 36, 22, 0, 72, 99, 68, 56, 26, 0), # 12
(44, 99, 96, 43, 24, 0, 78, 106, 71, 59, 28, 0), # 13
(49, 100, 100, 45, 24, 0, 84, 113, 80, 64, 31, 0), # 14
(54, 112, 109, 50, 25, 0, 91, 123, 86, 66, 31, 0), # 15
(60, 123, 113, 51, 27, 0, 92, 132, 88, 68, 33, 0), # 16
(62, 133, 116, 55, 28, 0, 98, 137, 90, 71, 35, 0), # 17
(69, 139, 125, 57, 31, 0, 104, 141, 95, 72, 36, 0), # 18
(73, 146, 131, 66, 33, 0, 108, 146, 101, 76, 36, 0), # 19
(78, 157, 135, 72, 36, 0, 116, 154, 104, 79, 38, 0), # 20
(84, 164, 140, 77, 41, 0, 120, 163, 111, 83, 43, 0), # 21
(89, 171, 145, 80, 43, 0, 122, 168, 116, 88, 45, 0), # 22
(94, 179, 152, 83, 46, 0, 128, 179, 123, 93, 50, 0), # 23
(99, 188, 159, 89, 48, 0, 137, 185, 126, 96, 52, 0), # 24
(103, 196, 164, 92, 52, 0, 143, 192, 133, 97, 55, 0), # 25
(107, 203, 167, 95, 57, 0, 152, 204, 139, 103, 57, 0), # 26
(110, 209, 172, 99, 58, 0, 159, 212, 147, 107, 59, 0), # 27
(112, 220, 185, 102, 59, 0, 170, 221, 150, 116, 60, 0), # 28
(117, 226, 188, 106, 59, 0, 174, 235, 153, 119, 61, 0), # 29
(118, 237, 191, 109, 62, 0, 178, 241, 158, 124, 63, 0), # 30
(122, 247, 195, 113, 63, 0, 189, 249, 165, 132, 65, 0), # 31
(124, 257, 202, 116, 65, 0, 198, 258, 171, 137, 66, 0), # 32
(127, 265, 206, 118, 67, 0, 204, 265, 177, 140, 70, 0), # 33
(133, 272, 214, 123, 68, 0, 207, 272, 181, 144, 72, 0), # 34
(138, 282, 219, 126, 71, 0, 209, 279, 183, 147, 73, 0), # 35
(140, 290, 227, 130, 75, 0, 210, 283, 191, 150, 73, 0), # 36
(145, 298, 233, 133, 79, 0, 212, 287, 198, 158, 78, 0), # 37
(150, 303, 239, 139, 79, 0, 218, 294, 205, 164, 79, 0), # 38
(157, 312, 244, 141, 80, 0, 222, 299, 207, 165, 84, 0), # 39
(162, 322, 253, 144, 82, 0, 231, 303, 214, 170, 84, 0), # 40
(164, 332, 259, 146, 85, 0, 237, 313, 222, 174, 84, 0), # 41
(171, 340, 265, 151, 85, 0, 241, 322, 226, 180, 87, 0), # 42
(176, 348, 270, 153, 89, 0, 246, 330, 231, 184, 88, 0), # 43
(180, 357, 278, 157, 90, 0, 251, 338, 238, 188, 91, 0), # 44
(183, 362, 283, 160, 93, 0, 255, 345, 248, 192, 92, 0), # 45
(190, 371, 287, 162, 94, 0, 263, 355, 251, 196, 93, 0), # 46
(194, 378, 290, 165, 97, 0, 267, 366, 256, 199, 93, 0), # 47
(197, 387, 295, 166, 99, 0, 275, 373, 259, 202, 95, 0), # 48
(208, 395, 303, 169, 101, 0, 284, 380, 266, 205, 95, 0), # 49
(210, 401, 312, 173, 105, 0, 288, 389, 271, 210, 95, 0), # 50
(214, 411, 324, 176, 108, 0, 294, 401, 279, 214, 100, 0), # 51
(217, 415, 330, 180, 108, 0, 299, 405, 287, 219, 103, 0), # 52
(222, 422, 336, 182, 110, 0, 304, 412, 295, 222, 107, 0), # 53
(226, 432, 341, 185, 113, 0, 307, 420, 300, 230, 108, 0), # 54
(232, 442, 348, 190, 114, 0, 311, 431, 302, 234, 108, 0), # 55
(239, 449, 355, 193, 119, 0, 313, 438, 304, 239, 110, 0), # 56
(243, 454, 357, 197, 122, 0, 317, 448, 308, 242, 111, 0), # 57
(245, 462, 363, 206, 124, 0, 320, 455, 309, 249, 113, 0), # 58
(245, 462, 363, 206, 124, 0, 320, 455, 309, 249, 113, 0), # 59
)
passenger_arriving_rate = (
(3.1795818700614573, 6.524602272727271, 5.755849935732647, 3.0414130434782605, 1.7143269230769227, 0.0, 5.708152173913044, 6.857307692307691, 4.562119565217391, 3.8372332904884314, 1.6311505681818177, 0.0), # 0
(3.20942641205736, 6.597159934764309, 5.786939187017996, 3.0583509057971012, 1.7271759615384612, 0.0, 5.706206567028985, 6.908703846153845, 4.587526358695652, 3.857959458011997, 1.6492899836910773, 0.0), # 1
(3.238930172666081, 6.668641346801345, 5.817290488431875, 3.074915942028985, 1.7397538461538458, 0.0, 5.704201449275362, 6.959015384615383, 4.612373913043478, 3.8781936589545833, 1.6671603367003363, 0.0), # 2
(3.268068107989464, 6.738969375, 5.846881667737788, 3.091094021739129, 1.7520490384615384, 0.0, 5.702137092391305, 7.0081961538461535, 4.636641032608694, 3.897921111825192, 1.68474234375, 0.0), # 3
(3.296815174129353, 6.808066885521885, 5.875690552699228, 3.106871014492753, 1.76405, 0.0, 5.700013768115941, 7.0562, 4.66030652173913, 3.9171270351328187, 1.7020167213804713, 0.0), # 4
(3.3251463271875914, 6.87585674452862, 5.903694971079691, 3.122232789855072, 1.775745192307692, 0.0, 5.697831748188405, 7.102980769230768, 4.6833491847826085, 3.9357966473864603, 1.718964186132155, 0.0), # 5
(3.353036523266023, 6.942261818181818, 5.930872750642674, 3.137165217391304, 1.7871230769230766, 0.0, 5.695591304347826, 7.148492307692306, 4.705747826086957, 3.953915167095116, 1.7355654545454544, 0.0), # 6
(3.380460718466491, 7.007204972643096, 5.95720171915167, 3.1516541666666664, 1.7981721153846155, 0.0, 5.693292708333334, 7.192688461538462, 4.727481249999999, 3.97146781276778, 1.751801243160774, 0.0), # 7
(3.40739386889084, 7.0706090740740715, 5.982659704370181, 3.165685507246376, 1.8088807692307691, 0.0, 5.6909362318840575, 7.2355230769230765, 4.7485282608695645, 3.9884398029134536, 1.7676522685185179, 0.0), # 8
(3.4338109306409126, 7.132396988636362, 6.007224534061696, 3.179245108695652, 1.8192374999999996, 0.0, 5.68852214673913, 7.2769499999999985, 4.768867663043478, 4.004816356041131, 1.7830992471590905, 0.0), # 9
(3.459686859818554, 7.1924915824915825, 6.030874035989717, 3.19231884057971, 1.829230769230769, 0.0, 5.68605072463768, 7.316923076923076, 4.7884782608695655, 4.020582690659811, 1.7981228956228956, 0.0), # 10
(3.4849966125256073, 7.250815721801346, 6.053586037917737, 3.204892572463768, 1.8388490384615384, 0.0, 5.683522237318841, 7.355396153846153, 4.807338858695652, 4.0357240252784905, 1.8127039304503365, 0.0), # 11
(3.509715144863916, 7.30729227272727, 6.0753383676092545, 3.2169521739130427, 1.8480807692307688, 0.0, 5.680936956521738, 7.392323076923075, 4.825428260869565, 4.050225578406169, 1.8268230681818176, 0.0), # 12
(3.5338174129353224, 7.361844101430976, 6.096108852827762, 3.228483514492753, 1.8569144230769232, 0.0, 5.678295153985506, 7.427657692307693, 4.84272527173913, 4.0640725685518415, 1.840461025357744, 0.0), # 13
(3.5572783728416737, 7.414394074074074, 6.115875321336759, 3.2394724637681147, 1.8653384615384612, 0.0, 5.6755971014492745, 7.461353846153845, 4.859208695652172, 4.077250214224506, 1.8535985185185184, 0.0), # 14
(3.5800729806848106, 7.46486505681818, 6.134615600899742, 3.249904891304347, 1.873341346153846, 0.0, 5.672843070652174, 7.493365384615384, 4.874857336956521, 4.089743733933161, 1.866216264204545, 0.0), # 15
(3.6021761925665783, 7.513179915824915, 6.152307519280206, 3.259766666666666, 1.8809115384615382, 0.0, 5.6700333333333335, 7.523646153846153, 4.889649999999999, 4.101538346186803, 1.8782949789562287, 0.0), # 16
(3.6235629645888205, 7.55926151725589, 6.168928904241645, 3.26904365942029, 1.8880374999999998, 0.0, 5.667168161231884, 7.552149999999999, 4.903565489130435, 4.11261926949443, 1.8898153793139725, 0.0), # 17
(3.64420825285338, 7.603032727272725, 6.184457583547558, 3.2777217391304343, 1.8947076923076926, 0.0, 5.664247826086956, 7.578830769230771, 4.916582608695652, 4.122971722365039, 1.9007581818181813, 0.0), # 18
(3.664087013462101, 7.644416412037035, 6.198871384961439, 3.285786775362318, 1.9009105769230765, 0.0, 5.661272599637681, 7.603642307692306, 4.928680163043477, 4.132580923307626, 1.9111041030092588, 0.0), # 19
(3.683174202516827, 7.683335437710435, 6.2121481362467845, 3.2932246376811594, 1.9066346153846152, 0.0, 5.658242753623187, 7.626538461538461, 4.93983695652174, 4.14143209083119, 1.9208338594276086, 0.0), # 20
(3.7014447761194034, 7.719712670454542, 6.224265665167096, 3.3000211956521737, 1.911868269230769, 0.0, 5.655158559782609, 7.647473076923076, 4.950031793478261, 4.14951044344473, 1.9299281676136355, 0.0), # 21
(3.7188736903716704, 7.753470976430976, 6.23520179948586, 3.3061623188405793, 1.9165999999999994, 0.0, 5.652020289855073, 7.666399999999998, 4.959243478260869, 4.15680119965724, 1.938367744107744, 0.0), # 22
(3.7354359013754754, 7.784533221801346, 6.244934366966581, 3.311633876811594, 1.920818269230769, 0.0, 5.6488282155797105, 7.683273076923076, 4.967450815217392, 4.163289577977721, 1.9461333054503365, 0.0), # 23
(3.75110636523266, 7.812822272727271, 6.25344119537275, 3.3164217391304347, 1.9245115384615379, 0.0, 5.645582608695652, 7.6980461538461515, 4.974632608695652, 4.168960796915166, 1.9532055681818177, 0.0), # 24
(3.7658600380450684, 7.838260995370368, 6.260700112467866, 3.320511775362319, 1.9276682692307685, 0.0, 5.642283740942029, 7.710673076923074, 4.980767663043479, 4.173800074978577, 1.959565248842592, 0.0), # 25
(3.779671875914545, 7.860772255892254, 6.266688946015424, 3.3238898550724634, 1.9302769230769228, 0.0, 5.63893188405797, 7.721107692307691, 4.985834782608695, 4.177792630676949, 1.9651930639730635, 0.0), # 26
(3.792516834942932, 7.8802789204545425, 6.2713855237789184, 3.326541847826087, 1.9323259615384616, 0.0, 5.635527309782609, 7.729303846153846, 4.98981277173913, 4.180923682519278, 1.9700697301136356, 0.0), # 27
(3.804369871232075, 7.8967038552188535, 6.2747676735218505, 3.328453623188405, 1.9338038461538458, 0.0, 5.632070289855072, 7.735215384615383, 4.992680434782608, 4.183178449014567, 1.9741759638047134, 0.0), # 28
(3.815205940883816, 7.9099699263468, 6.276813223007711, 3.3296110507246373, 1.9346990384615383, 0.0, 5.628561096014493, 7.738796153846153, 4.994416576086956, 4.184542148671807, 1.9774924815867, 0.0), # 29
(3.8249999999999997, 7.92, 6.2775, 3.3299999999999996, 1.9349999999999996, 0.0, 5.625, 7.739999999999998, 4.994999999999999, 4.185, 1.98, 0.0), # 30
(3.834164434143222, 7.92833164772727, 6.276985163043477, 3.3299297549019604, 1.9348904787234043, 0.0, 5.620051511744128, 7.739561914893617, 4.994894632352941, 4.184656775362318, 1.9820829119318175, 0.0), # 31
(3.843131010230179, 7.936553181818182, 6.275455217391303, 3.329720392156862, 1.9345642553191487, 0.0, 5.612429710144928, 7.738257021276595, 4.994580588235293, 4.1836368115942015, 1.9841382954545455, 0.0), # 32
(3.8519037563938614, 7.944663579545454, 6.272932010869566, 3.329373970588235, 1.9340248404255314, 0.0, 5.6022092203898035, 7.736099361702125, 4.994060955882353, 4.181954673913044, 1.9861658948863634, 0.0), # 33
(3.860486700767263, 7.952661818181817, 6.269437391304347, 3.3288925490196077, 1.9332757446808508, 0.0, 5.589464667666167, 7.733102978723403, 4.993338823529411, 4.179624927536231, 1.9881654545454543, 0.0), # 34
(3.8688838714833755, 7.960546874999998, 6.264993206521739, 3.328278186274509, 1.9323204787234043, 0.0, 5.574270677161419, 7.729281914893617, 4.9924172794117645, 4.176662137681159, 1.9901367187499994, 0.0), # 35
(3.8770992966751923, 7.968317727272727, 6.259621304347825, 3.3275329411764707, 1.9311625531914893, 0.0, 5.556701874062968, 7.724650212765957, 4.9912994117647065, 4.173080869565217, 1.9920794318181818, 0.0), # 36
(3.885137004475703, 7.975973352272726, 6.253343532608695, 3.3266588725490194, 1.9298054787234038, 0.0, 5.536832883558221, 7.719221914893615, 4.989988308823529, 4.168895688405796, 1.9939933380681816, 0.0), # 37
(3.893001023017902, 7.983512727272726, 6.246181739130434, 3.325658039215685, 1.9282527659574464, 0.0, 5.514738330834581, 7.713011063829786, 4.988487058823528, 4.164121159420289, 1.9958781818181814, 0.0), # 38
(3.900695380434782, 7.990934829545453, 6.238157771739129, 3.3245324999999997, 1.9265079255319146, 0.0, 5.490492841079459, 7.7060317021276585, 4.98679875, 4.1587718478260856, 1.9977337073863632, 0.0), # 39
(3.908224104859335, 7.998238636363636, 6.229293478260869, 3.32328431372549, 1.924574468085106, 0.0, 5.464171039480259, 7.698297872340424, 4.984926470588236, 4.1528623188405795, 1.999559659090909, 0.0), # 40
(3.915591224424552, 8.005423124999998, 6.219610706521739, 3.321915539215686, 1.9224559042553186, 0.0, 5.435847551224389, 7.689823617021275, 4.982873308823529, 4.146407137681159, 2.0013557812499996, 0.0), # 41
(3.9228007672634266, 8.012487272727274, 6.209131304347826, 3.320428235294117, 1.920155744680851, 0.0, 5.40559700149925, 7.680622978723404, 4.980642352941175, 4.1394208695652175, 2.0031218181818184, 0.0), # 42
(3.929856761508952, 8.01943005681818, 6.1978771195652165, 3.3188244607843136, 1.9176774999999997, 0.0, 5.373494015492254, 7.670709999999999, 4.978236691176471, 4.131918079710144, 2.004857514204545, 0.0), # 43
(3.936763235294117, 8.026250454545455, 6.18587, 3.317106274509803, 1.9150246808510636, 0.0, 5.339613218390804, 7.660098723404254, 4.975659411764705, 4.123913333333333, 2.0065626136363637, 0.0), # 44
(3.9435242167519178, 8.032947443181817, 6.1731317934782615, 3.315275735294117, 1.91220079787234, 0.0, 5.304029235382309, 7.64880319148936, 4.972913602941175, 4.115421195652174, 2.008236860795454, 0.0), # 45
(3.9501437340153456, 8.03952, 6.159684347826087, 3.313334901960784, 1.9092093617021275, 0.0, 5.266816691654173, 7.63683744680851, 4.970002352941176, 4.106456231884058, 2.00988, 0.0), # 46
(3.956625815217391, 8.045967102272726, 6.1455495108695635, 3.3112858333333324, 1.9060538829787232, 0.0, 5.228050212393803, 7.624215531914893, 4.966928749999999, 4.097033007246376, 2.0114917755681816, 0.0), # 47
(3.962974488491049, 8.052287727272727, 6.130749130434782, 3.309130588235293, 1.9027378723404254, 0.0, 5.187804422788607, 7.610951489361701, 4.96369588235294, 4.087166086956521, 2.013071931818182, 0.0), # 48
(3.9691937819693086, 8.058480852272725, 6.115305054347826, 3.306871225490196, 1.899264840425532, 0.0, 5.146153948025987, 7.597059361702128, 4.960306838235294, 4.076870036231884, 2.014620213068181, 0.0), # 49
(3.9752877237851663, 8.064545454545453, 6.099239130434782, 3.3045098039215683, 1.8956382978723403, 0.0, 5.103173413293353, 7.582553191489361, 4.956764705882353, 4.066159420289854, 2.016136363636363, 0.0), # 50
(3.9812603420716113, 8.070480511363634, 6.082573206521739, 3.302048382352941, 1.8918617553191486, 0.0, 5.0589374437781105, 7.567447021276594, 4.953072573529411, 4.055048804347826, 2.0176201278409085, 0.0), # 51
(3.987115664961637, 8.076284999999999, 6.065329130434782, 3.299489019607843, 1.8879387234042553, 0.0, 5.013520664667666, 7.551754893617021, 4.949233529411765, 4.043552753623188, 2.0190712499999997, 0.0), # 52
(3.992857720588235, 8.081957897727271, 6.047528749999999, 3.2968337745098037, 1.8838727127659571, 0.0, 4.966997701149425, 7.5354908510638285, 4.945250661764706, 4.0316858333333325, 2.020489474431818, 0.0), # 53
(3.9984905370843995, 8.08749818181818, 6.0291939130434775, 3.294084705882353, 1.8796672340425529, 0.0, 4.919443178410794, 7.5186689361702115, 4.941127058823529, 4.019462608695651, 2.021874545454545, 0.0), # 54
(4.00401814258312, 8.092904829545454, 6.010346467391303, 3.2912438725490194, 1.8753257978723403, 0.0, 4.87093172163918, 7.501303191489361, 4.936865808823529, 4.006897644927535, 2.0232262073863634, 0.0), # 55
(4.0094445652173905, 8.098176818181816, 5.991008260869564, 3.288313333333333, 1.8708519148936167, 0.0, 4.821537956021989, 7.483407659574467, 4.9324699999999995, 3.994005507246376, 2.024544204545454, 0.0), # 56
(4.014773833120205, 8.103313125, 5.971201141304347, 3.285295147058823, 1.8662490957446805, 0.0, 4.771336506746626, 7.464996382978722, 4.927942720588234, 3.980800760869564, 2.02582828125, 0.0), # 57
(4.0200099744245525, 8.108312727272725, 5.950946956521738, 3.2821913725490197, 1.8615208510638295, 0.0, 4.7204019990005, 7.446083404255318, 4.923287058823529, 3.9672979710144918, 2.0270781818181813, 0.0), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_allighting_rate = (
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 0
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 1
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 2
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 3
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 4
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 5
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 6
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 7
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 8
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 9
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 10
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 11
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 12
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 13
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 14
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 15
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 16
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 17
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 18
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 19
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 20
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 21
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 22
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 23
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 24
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 25
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 26
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 27
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 28
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 29
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 30
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 31
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 32
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 33
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 34
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 35
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 36
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 37
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 38
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 39
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 40
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 41
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 42
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 43
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 44
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 45
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 46
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 47
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 48
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 49
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 50
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 51
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 52
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 53
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 54
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 55
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 56
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 57
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 58
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 59
)
"""
parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html
"""
#initial entropy
entropy = 258194110137029475889902652135037600173
#index for seed sequence child
child_seed_index = (
1, # 0
79, # 1
)
| 112.683582 | 213 | 0.728099 | 5,147 | 37,749 | 5.337867 | 0.22382 | 0.314479 | 0.248963 | 0.471719 | 0.332387 | 0.329621 | 0.329621 | 0.329621 | 0.329621 | 0.329621 | 0 | 0.818264 | 0.119579 | 37,749 | 334 | 214 | 113.020958 | 0.008395 | 0.03208 | 0 | 0.202532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.015823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
82fb4087e710989a4ee0d718eb10593559ffe115 | 33 | py | Python | __init__.py | DivyanshuSingh96/myCalc | 8a5909bedf18b9744875b6a460e966c37e062aa6 | [
"MIT"
] | 2 | 2021-03-03T11:46:45.000Z | 2021-07-07T12:24:46.000Z | __init__.py | DivyanshuSingh96/myCalc | 8a5909bedf18b9744875b6a460e966c37e062aa6 | [
"MIT"
] | null | null | null | __init__.py | DivyanshuSingh96/myCalc | 8a5909bedf18b9744875b6a460e966c37e062aa6 | [
"MIT"
] | null | null | null | from myCalc.arithmetics import *
| 16.5 | 32 | 0.818182 | 4 | 33 | 6.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 33 | 1 | 33 | 33 | 0.931034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
d22141fda9d3ccc609128deddf2bc693eeb2e207 | 302 | py | Python | deepy/debug/debug_functions.py | uaca/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 260 | 2015-05-16T07:58:29.000Z | 2016-01-07T09:10:47.000Z | deepy/debug/debug_functions.py | uaca/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 20 | 2015-04-21T01:46:46.000Z | 2015-12-20T00:04:23.000Z | deepy/debug/debug_functions.py | zomux/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 50 | 2016-01-27T03:45:25.000Z | 2020-12-16T07:02:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import theano
def check_test_values():
theano.config.compute_test_value = 'warn'
def set_trace():
try:
from ipdb import set_trace as _set_trace
except ImportError as e:
from pdb import set_trace as _set_trace
_set_trace() | 21.571429 | 48 | 0.678808 | 45 | 302 | 4.266667 | 0.6 | 0.25 | 0.145833 | 0.166667 | 0.25 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0.004274 | 0.225166 | 302 | 14 | 49 | 21.571429 | 0.816239 | 0.139073 | 0 | 0 | 0 | 0 | 0.015444 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | true | 0 | 0.444444 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
d234d38d67639ef4c186b7bae6f5e47507b589b5 | 107 | py | Python | terrascript/cloudscale/__init__.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/cloudscale/__init__.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/cloudscale/__init__.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/cloudscale/__init__.py
import terrascript
class cloudscale(terrascript.Provider):
pass
| 15.285714 | 39 | 0.803738 | 11 | 107 | 7.454545 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121495 | 107 | 6 | 40 | 17.833333 | 0.87234 | 0.317757 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
d236980839847a5971d1e1c656471ed763715b09 | 8,063 | py | Python | dundunduh/records.py | jmhobbs/dun-dun-duh | 6100aeaa199d9f1fb1c5b046fadb2ccaa6c9aeb2 | [
"MIT"
] | 3 | 2016-10-28T12:29:22.000Z | 2017-07-19T12:50:19.000Z | dundunduh/records.py | jmhobbs/dun-dun-duh | 6100aeaa199d9f1fb1c5b046fadb2ccaa6c9aeb2 | [
"MIT"
] | 6 | 2016-01-28T17:38:49.000Z | 2021-03-25T22:03:27.000Z | dundunduh/records.py | jmhobbs/dun-dun-duh | 6100aeaa199d9f1fb1c5b046fadb2ccaa6c9aeb2 | [
"MIT"
] | 5 | 2015-08-23T18:51:52.000Z | 2016-10-28T12:29:23.000Z | # -*- coding: utf-8 -*-
import json
from datetime import datetime
from pytz import timezone
from flask import current_app
from .extensions import redis
rolling_average_lua = """
local i = redis.call('GET', KEYS[1])
local cai = redis.call('GET', KEYS[2])
i = tonumber(i)
cai = tonumber(cai)
if i == nil then
i = 0
end
if cai == nil then
cai = 0
end
cai = (tonumber(ARGV[1]) + (i * cai)) / (i + 1)
redis.call('SET', KEYS[2], cai)"""
def create_gif(slug, ip, queue_time, start_rendering, wait_duration, render_duration, store_duration, total_queue_duration):
tz = timezone(current_app.config.get('TIMEZONE', 'UTC'))
dt = datetime.fromtimestamp(queue_time)
dt = tz.localize(dt)
record = json.dumps({
"slug": slug,
"ip": ip,
"timestamp": queue_time,
"durations": {
"wait": wait_duration,
"render": render_duration,
"store": store_duration,
"total": total_queue_duration
}
})
rolling_average_script = redis.connection.register_script(rolling_average_lua)
pipe = redis.pipeline()
pipe.lpush('gifs', record)
pipe.incr('stats:created')
pipe.incr('stats:created:%d-%02d-%02d' % (dt.year, dt.month, dt.day))
pipe.incr('stats:created:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour))
pipe.incr('stats:created:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5))
rolling_average_script(keys=['stats:created', 'stats:average:total'], args=[total_queue_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:wait'], args=[wait_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:render'], args=[render_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:store'], args=[store_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:total:%d-%02d-%02d' % (dt.year, dt.month, dt.day)], args=[total_queue_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:wait:%d-%02d-%02d' % (dt.year, dt.month, dt.day)], args=[wait_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:render:%d-%02d-%02d' % (dt.year, dt.month, dt.day)], args=[render_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:store:%d-%02d-%02d' % (dt.year, dt.month, dt.day)], args=[store_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:total:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour)], args=[total_queue_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:wait:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour)], args=[wait_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:render:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour)], args=[render_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:store:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour)], args=[store_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:total:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5)], args=[total_queue_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:wait:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5)], args=[wait_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:render:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5)], args=[render_duration], client=pipe)
rolling_average_script(keys=['stats:created', 'stats:average:store:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5)], args=[store_duration], client=pipe)
pipe.execute()
def create_gif_failed(queue_time):
tz = timezone(current_app.config.get('TIMEZONE', 'UTC'))
dt = datetime.fromtimestamp(queue_time)
dt = tz.localize(dt)
pipe = redis.pipeline()
pipe.incr('stats:failed')
pipe.incr('stats:failed:%d-%02d-%02d' % (dt.year, dt.month, dt.day))
pipe.incr('stats:failed:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour))
pipe.incr('stats:failed:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5))
pipe.execute()
def create_gif_cancelled(queue_time):
tz = timezone(current_app.config.get('TIMEZONE', 'UTC'))
dt = datetime.fromtimestamp(queue_time)
dt = tz.localize(dt)
pipe = redis.pipeline()
pipe.incr('stats:cancelled')
pipe.incr('stats:cancelled:%d-%02d-%02d' % (dt.year, dt.month, dt.day))
pipe.incr('stats:cancelled:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour))
pipe.incr('stats:cancelled:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5))
pipe.execute()
def get_recent_gifs(count):
'''
Returns `count` recent GIF records sorted newest to oldest.
'''
return map(json.loads, redis.lrange('gifs', 0, count - 1))
def get_all_time_average(type):
avg = redis.get('stats:average:%s' % (type,))
if not avg:
return 0
return float(avg)
def get_daily_average(dt, type):
avg = redis.get('stats:average:%s:%d-%02d-%02d' % (type, dt.year, dt.month, dt.day))
if not avg:
return 0
return float(avg)
def get_hourly_average(dt, type):
avg = redis.get('stats:average:%s:%d-%02d-%02d %02d' % (type, dt.year, dt.month, dt.day, dt.hour))
if not avg:
return 0
return float(avg)
def get_five_minute_segment_average(dt, type):
avg = redis.get('stats:average:%s:%d-%02d-%02d %02d:%02d' % (type, dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5))
if not avg:
return 0
return float(avg)
def get_all_time_created():
count = redis.get('stats:created')
if not count:
return 0
return int(count)
def get_daily_created(dt):
count = redis.get('stats:created:%d-%02d-%02d' % (dt.year, dt.month, dt.day))
if not count:
return 0
return int(count)
def get_hourly_created(dt):
count = redis.get('stats:created:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour))
if not count:
return 0
return int(count)
def get_five_minute_segment_created(dt):
count = redis.get('stats:created:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5))
if not count:
return 0
return int(count)
def get_all_time_failed():
count = redis.get('stats:failed')
if not count:
return 0
return int(count)
def get_daily_failed(dt):
count = redis.get('stats:failed:%d-%02d-%02d' % (dt.year, dt.month, dt.day))
if not count:
return 0
return int(count)
def get_hourly_failed(dt):
count = redis.get('stats:failed:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour))
if not count:
return 0
return int(count)
def get_five_minute_segment_failed(dt):
count = redis.get('stats:failed:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5))
if not count:
return 0
return int(count)
def get_all_time_cancelled():
count = redis.get('stats:cancelled')
if not count:
return 0
return int(count)
def get_daily_cancelled(dt):
count = redis.get('stats:cancelled:%d-%02d-%02d' % (dt.year, dt.month, dt.day))
if not count:
return 0
return int(count)
def get_hourly_cancelled(dt):
count = redis.get('stats:cancelled:%d-%02d-%02d %02d' % (dt.year, dt.month, dt.day, dt.hour))
if not count:
return 0
return int(count)
def get_five_minute_segment_cancelled(dt):
count = redis.get('stats:cancelled:%d-%02d-%02d %02d:%02d' % (dt.year, dt.month, dt.day, dt.hour, (dt.minute / 5) * 5))
if not count:
return 0
return int(count)
| 36.156951 | 198 | 0.650254 | 1,233 | 8,063 | 4.145174 | 0.083536 | 0.07748 | 0.045197 | 0.083937 | 0.836823 | 0.807865 | 0.807865 | 0.797691 | 0.797691 | 0.783017 | 0 | 0.036705 | 0.168796 | 8,063 | 222 | 199 | 36.31982 | 0.725903 | 0.01017 | 0 | 0.408805 | 0 | 0.006289 | 0.230132 | 0.118644 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125786 | false | 0 | 0.031447 | 0 | 0.36478 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
9669db9712fe53f51db84a3d075e5531e78196a2 | 4,547 | py | Python | main/model/DDAE.py | kuluchen/EMMA | 76f4b2a143300ba9567c9875560b8fd6c4c57b23 | [
"MIT"
] | 2 | 2020-08-11T10:33:04.000Z | 2022-03-30T03:24:32.000Z | main/model/DDAE.py | kuluchen/EMMA | 76f4b2a143300ba9567c9875560b8fd6c4c57b23 | [
"MIT"
] | null | null | null | main/model/DDAE.py | kuluchen/EMMA | 76f4b2a143300ba9567c9875560b8fd6c4c57b23 | [
"MIT"
] | 1 | 2022-03-30T03:24:21.000Z | 2022-03-30T03:24:21.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class Dense_L(nn.Module):
def __init__(self, in_size, out_size,bias=True):
super().__init__()
self.dense = nn.Sequential(
nn.Linear(in_size, out_size, bias=True),
nn.ReLU(),
)
def forward(self, x):
out = self.dense(x)
return out
class TDNN(nn.Module):
def __init__(self, in_size, out_size, context=1, dilation=1, bias=True):
super().__init__()
self.dense = nn.Sequential(
nn.Linear(in_size*(context*2+1), out_size, bias=True),
nn.ReLU(),
)
self.context = context
self.dilation = dilation
def forward(self, x):
_,_,d = x.shape
pad_size = (0,0,self.context*self.dilation,self.context*self.dilation)
x = x.unsqueeze(1)
x = F.pad(x, pad=pad_size, mode='replicate')
x = F.unfold(
x,
(self.context*2+1, d),
stride=(1,d),
dilation=(self.dilation,1)
)
x = x.transpose(1,2).squeeze(1)
out = self.dense(x)
return out
class DDAE_01(nn.Module):
def __init__(self):
super().__init__()
self.ddae_encoder = nn.Sequential(
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
Dense_L(257,257*3,bias=True),
)
self.linear = nn.Linear(257*3, 257, bias=False)
self.ddae_decoder = nn.Sequential(
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
)
def forward(self,spec,emma):
x = self.ddae_encoder(spec)
x = self.linear(x)
out = self.ddae_decoder(x)
return out
class DDAE_02(nn.Module):
def __init__(self):
super().__init__()
self.ddae_encoder = nn.Sequential(
TDNN(275,257,bias=True),
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
Dense_L(257,257*3,bias=True),
)
self.linear = nn.Linear(257*3, 257, bias=False)
self.ddae_decoder = nn.Sequential(
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
)
def forward(self,spec,emma):
x = torch.cat((spec,emma),2)
x = self.ddae_encoder(x)
x = self.linear(x)
out = self.ddae_decoder(x)
return out
class DDAE_03(nn.Module):
def __init__(self):
super().__init__()
self.emma_encoder = nn.Sequential(
TDNN(18,18,bias=True),
TDNN(18,18,bias=True),
)
self.ddae_encoder = nn.Sequential(
TDNN(275,257,bias=True),
TDNN(257,257,bias=True),
# TDNN(257,257,bias=True),
Dense_L(257,257*3,bias=True),
)
self.linear = nn.Linear(257*3, 257, bias=False)
self.ddae_decoder = nn.Sequential(
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
)
def forward(self,spec,emma):
emma = self.emma_encoder(emma)
x = torch.cat((spec,emma),2)
x = self.ddae_encoder(x)
x = self.linear(x)
out = self.ddae_decoder(x)
return out
class DDAE_04(nn.Module):
def __init__(self):
super().__init__()
self.spec_encoder = nn.Sequential(
TDNN(257,257,bias=True),
)
self.emma_encoder = nn.Sequential(
TDNN(18,18,bias=True),
TDNN(18,18,bias=True),
)
self.ddae_encoder = nn.Sequential(
TDNN(275,257,bias=True),
TDNN(257,257,bias=True),
Dense_L(257,257*3,bias=True),
)
self.linear = nn.Linear(257*3, 257, bias=False)
self.ddae_decoder = nn.Sequential(
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
TDNN(257,257,bias=True),
)
def forward(self,spec,emma):
spec = self.spec_encoder(spec)
emma = self.emma_encoder(emma)
x = torch.cat((spec,emma),2)
x = self.ddae_encoder(x)
x = self.linear(x)
out = self.ddae_decoder(x)
return out | 28.41875 | 78 | 0.517704 | 587 | 4,547 | 3.855196 | 0.0954 | 0.13787 | 0.131242 | 0.148475 | 0.826337 | 0.824569 | 0.80601 | 0.782148 | 0.739284 | 0.711003 | 0 | 0.087264 | 0.347262 | 4,547 | 160 | 79 | 28.41875 | 0.675202 | 0.005278 | 0 | 0.686567 | 0 | 0 | 0.001996 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.089552 | false | 0 | 0.022388 | 0 | 0.201493 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
96bc41e66dae9d24f116b6b6d6d202c9a28ae216 | 155 | py | Python | hello_world/test_main.py | bertl4398/semaphore-demo-python-pants | bd6e44804f71542bbc89474c527cc61bbc5ba099 | [
"MIT"
] | 4 | 2021-05-21T13:43:08.000Z | 2021-12-29T02:36:34.000Z | hello_world/test_main.py | bertl4398/semaphore-demo-python-pants | bd6e44804f71542bbc89474c527cc61bbc5ba099 | [
"MIT"
] | null | null | null | hello_world/test_main.py | bertl4398/semaphore-demo-python-pants | bd6e44804f71542bbc89474c527cc61bbc5ba099 | [
"MIT"
] | 4 | 2021-06-25T02:32:49.000Z | 2022-03-11T19:06:40.000Z | """Tests main.py."""
from hello_world.main import message
def test_message() -> None:
"""Tests hello message."""
assert message() == "Hi world"
| 17.222222 | 36 | 0.63871 | 20 | 155 | 4.85 | 0.65 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.187097 | 155 | 8 | 37 | 19.375 | 0.769841 | 0.225806 | 0 | 0 | 0 | 0 | 0.073395 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0.333333 | true | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
7371a4ff3f0251d317e39e004c849b7266c2eb26 | 257,272 | py | Python | instances/passenger_demand/pas-20210422-1717-int8e-1/72.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210422-1717-int8e-1/72.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210422-1717-int8e-1/72.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 15280
passenger_arriving = (
(6, 3, 0, 2, 2, 0, 3, 2, 3, 0, 1, 0, 0, 4, 3, 5, 0, 5, 1, 3, 0, 3, 0, 2, 0, 0), # 0
(1, 4, 0, 2, 7, 2, 0, 1, 1, 1, 0, 0, 0, 6, 7, 1, 2, 3, 3, 1, 0, 2, 0, 1, 0, 0), # 1
(3, 3, 2, 6, 2, 0, 3, 0, 1, 1, 0, 0, 0, 8, 3, 3, 1, 3, 4, 1, 3, 1, 0, 0, 0, 0), # 2
(6, 4, 2, 4, 3, 4, 2, 2, 2, 0, 1, 0, 0, 2, 4, 1, 2, 3, 2, 3, 3, 3, 1, 0, 0, 0), # 3
(6, 3, 2, 9, 3, 2, 2, 2, 1, 1, 1, 1, 0, 7, 8, 1, 4, 3, 7, 1, 3, 2, 0, 1, 0, 0), # 4
(7, 4, 4, 5, 4, 3, 5, 0, 2, 0, 1, 1, 0, 8, 2, 4, 1, 2, 2, 4, 1, 0, 2, 1, 0, 0), # 5
(7, 5, 5, 3, 4, 2, 2, 3, 1, 0, 1, 2, 0, 4, 5, 3, 4, 9, 3, 3, 2, 1, 4, 1, 0, 0), # 6
(2, 7, 3, 2, 4, 0, 1, 3, 2, 2, 0, 0, 0, 6, 4, 6, 4, 7, 3, 2, 1, 3, 1, 0, 1, 0), # 7
(9, 3, 6, 4, 4, 6, 1, 5, 2, 3, 0, 0, 0, 10, 5, 4, 5, 5, 6, 2, 3, 4, 0, 1, 0, 0), # 8
(4, 3, 3, 2, 6, 3, 4, 3, 3, 2, 2, 1, 0, 10, 7, 4, 5, 7, 2, 2, 4, 1, 1, 0, 2, 0), # 9
(8, 7, 3, 7, 5, 0, 3, 2, 2, 0, 0, 0, 0, 4, 9, 8, 4, 6, 4, 2, 2, 2, 2, 2, 3, 0), # 10
(7, 12, 5, 6, 2, 3, 2, 2, 3, 2, 1, 0, 0, 8, 7, 7, 5, 7, 3, 2, 0, 3, 2, 0, 0, 0), # 11
(6, 5, 9, 8, 10, 5, 2, 4, 4, 1, 0, 0, 0, 8, 9, 6, 4, 7, 1, 5, 2, 3, 3, 0, 1, 0), # 12
(3, 8, 10, 7, 2, 1, 2, 2, 4, 5, 3, 0, 0, 7, 4, 3, 2, 2, 8, 2, 1, 3, 5, 0, 0, 0), # 13
(10, 7, 8, 9, 9, 2, 2, 5, 3, 1, 4, 2, 0, 13, 5, 6, 7, 11, 3, 3, 3, 3, 1, 2, 0, 0), # 14
(8, 7, 7, 7, 5, 3, 2, 1, 3, 1, 1, 0, 0, 4, 3, 9, 2, 6, 4, 6, 3, 1, 1, 3, 1, 0), # 15
(11, 8, 7, 7, 5, 2, 5, 2, 4, 3, 0, 0, 0, 7, 3, 7, 12, 7, 5, 2, 2, 2, 0, 1, 0, 0), # 16
(11, 6, 8, 6, 8, 2, 2, 4, 3, 1, 1, 1, 0, 7, 6, 3, 5, 6, 5, 1, 4, 4, 3, 1, 2, 0), # 17
(9, 7, 6, 6, 8, 3, 3, 3, 4, 1, 0, 0, 0, 9, 7, 6, 6, 8, 2, 4, 0, 8, 3, 1, 2, 0), # 18
(7, 5, 8, 11, 2, 5, 4, 1, 1, 0, 0, 1, 0, 8, 5, 7, 9, 9, 8, 3, 2, 4, 4, 0, 1, 0), # 19
(7, 13, 3, 6, 5, 3, 1, 4, 4, 1, 1, 0, 0, 4, 14, 9, 3, 5, 7, 2, 3, 6, 2, 2, 0, 0), # 20
(4, 10, 7, 2, 9, 1, 3, 0, 2, 2, 0, 0, 0, 12, 10, 6, 5, 5, 4, 2, 1, 2, 4, 2, 1, 0), # 21
(7, 7, 10, 4, 9, 3, 4, 1, 9, 2, 0, 1, 0, 6, 9, 7, 3, 9, 2, 6, 0, 4, 3, 2, 0, 0), # 22
(11, 9, 7, 6, 7, 3, 1, 1, 3, 2, 1, 1, 0, 5, 11, 3, 3, 4, 1, 2, 1, 3, 1, 2, 1, 0), # 23
(7, 10, 8, 12, 5, 0, 2, 4, 5, 2, 2, 1, 0, 7, 6, 5, 6, 5, 5, 3, 0, 4, 2, 1, 0, 0), # 24
(11, 12, 6, 6, 7, 2, 1, 5, 3, 2, 2, 0, 0, 15, 11, 7, 7, 8, 3, 3, 1, 5, 2, 0, 0, 0), # 25
(6, 12, 5, 6, 7, 1, 4, 4, 4, 3, 1, 1, 0, 8, 5, 5, 5, 6, 2, 6, 2, 4, 5, 1, 0, 0), # 26
(8, 3, 7, 11, 8, 3, 1, 8, 8, 1, 2, 0, 0, 5, 8, 10, 5, 10, 6, 4, 3, 1, 1, 2, 0, 0), # 27
(1, 9, 9, 7, 6, 2, 6, 1, 5, 1, 0, 0, 0, 7, 5, 2, 5, 9, 5, 2, 1, 3, 4, 0, 0, 0), # 28
(6, 6, 5, 5, 6, 1, 1, 2, 6, 3, 0, 0, 0, 12, 6, 5, 3, 3, 1, 3, 2, 1, 1, 4, 1, 0), # 29
(10, 8, 9, 6, 6, 1, 5, 2, 4, 3, 1, 1, 0, 9, 4, 3, 5, 5, 3, 1, 2, 3, 2, 0, 0, 0), # 30
(11, 11, 4, 10, 6, 5, 6, 0, 1, 0, 0, 0, 0, 9, 4, 6, 5, 6, 3, 3, 2, 4, 4, 2, 1, 0), # 31
(3, 7, 10, 8, 4, 1, 3, 8, 1, 4, 3, 0, 0, 6, 9, 4, 5, 9, 3, 3, 2, 4, 2, 2, 1, 0), # 32
(3, 11, 3, 4, 4, 2, 5, 3, 7, 0, 0, 0, 0, 7, 9, 4, 4, 3, 2, 6, 4, 4, 3, 1, 1, 0), # 33
(4, 8, 6, 6, 7, 3, 3, 0, 3, 1, 0, 2, 0, 9, 5, 2, 6, 6, 5, 2, 3, 2, 2, 0, 0, 0), # 34
(11, 5, 8, 3, 3, 4, 0, 5, 1, 1, 2, 0, 0, 8, 10, 5, 2, 4, 6, 5, 0, 4, 1, 3, 0, 0), # 35
(4, 9, 4, 10, 7, 3, 4, 4, 5, 2, 0, 1, 0, 6, 14, 5, 10, 3, 5, 4, 3, 3, 3, 0, 1, 0), # 36
(7, 10, 8, 9, 7, 3, 6, 1, 6, 1, 2, 2, 0, 9, 3, 2, 7, 12, 3, 3, 0, 3, 1, 1, 0, 0), # 37
(5, 5, 12, 6, 7, 3, 6, 2, 2, 0, 1, 0, 0, 8, 8, 5, 3, 4, 1, 3, 3, 6, 1, 1, 0, 0), # 38
(5, 6, 11, 5, 4, 2, 5, 1, 3, 0, 1, 0, 0, 7, 10, 14, 5, 10, 7, 2, 4, 2, 2, 2, 1, 0), # 39
(11, 9, 9, 4, 6, 3, 1, 3, 3, 1, 2, 1, 0, 8, 9, 4, 5, 6, 4, 2, 3, 0, 3, 2, 1, 0), # 40
(8, 7, 7, 4, 10, 5, 5, 0, 2, 0, 3, 2, 0, 7, 4, 6, 3, 7, 9, 3, 0, 7, 3, 1, 0, 0), # 41
(7, 9, 13, 8, 5, 1, 0, 5, 2, 2, 0, 0, 0, 12, 8, 6, 6, 7, 5, 3, 5, 5, 5, 0, 0, 0), # 42
(8, 3, 9, 9, 7, 3, 3, 2, 5, 1, 0, 1, 0, 8, 4, 8, 5, 6, 3, 4, 1, 4, 1, 2, 1, 0), # 43
(14, 6, 4, 6, 6, 2, 1, 4, 4, 2, 0, 1, 0, 9, 3, 3, 5, 7, 3, 3, 1, 2, 3, 1, 1, 0), # 44
(5, 10, 6, 6, 10, 4, 3, 4, 2, 0, 2, 0, 0, 9, 8, 2, 5, 6, 6, 3, 2, 6, 6, 1, 1, 0), # 45
(2, 6, 11, 6, 5, 3, 1, 3, 1, 3, 1, 2, 0, 7, 6, 4, 3, 5, 5, 4, 4, 1, 1, 0, 1, 0), # 46
(6, 5, 6, 8, 8, 3, 3, 4, 6, 2, 0, 0, 0, 8, 10, 10, 2, 8, 4, 8, 1, 1, 3, 1, 0, 0), # 47
(9, 6, 5, 10, 6, 4, 7, 1, 5, 2, 1, 0, 0, 11, 9, 5, 4, 2, 8, 3, 2, 3, 1, 1, 1, 0), # 48
(9, 10, 6, 11, 8, 1, 1, 2, 2, 0, 1, 0, 0, 7, 7, 7, 5, 4, 2, 3, 0, 1, 2, 1, 0, 0), # 49
(12, 9, 7, 8, 7, 3, 1, 6, 4, 1, 0, 1, 0, 3, 12, 6, 4, 10, 3, 2, 2, 3, 6, 1, 0, 0), # 50
(10, 9, 9, 10, 4, 1, 5, 2, 4, 2, 0, 0, 0, 6, 11, 9, 1, 7, 2, 2, 3, 3, 5, 0, 1, 0), # 51
(5, 7, 4, 7, 11, 4, 6, 3, 4, 1, 0, 0, 0, 9, 9, 6, 6, 7, 1, 5, 3, 3, 3, 3, 2, 0), # 52
(5, 8, 4, 7, 10, 3, 4, 3, 4, 1, 0, 1, 0, 7, 4, 3, 4, 6, 2, 1, 2, 4, 3, 0, 0, 0), # 53
(6, 6, 10, 5, 5, 2, 1, 1, 3, 1, 3, 2, 0, 10, 3, 3, 4, 3, 6, 3, 1, 3, 4, 1, 0, 0), # 54
(12, 10, 6, 7, 6, 3, 4, 1, 2, 1, 1, 2, 0, 5, 6, 6, 0, 3, 7, 3, 2, 5, 2, 5, 0, 0), # 55
(7, 4, 9, 8, 6, 2, 1, 1, 1, 2, 1, 2, 0, 11, 7, 6, 8, 7, 2, 4, 3, 6, 1, 4, 3, 0), # 56
(8, 4, 7, 6, 10, 1, 3, 3, 1, 0, 1, 0, 0, 11, 3, 3, 7, 13, 7, 1, 2, 5, 2, 1, 0, 0), # 57
(8, 9, 3, 10, 3, 5, 3, 5, 0, 1, 0, 0, 0, 6, 6, 5, 3, 4, 6, 3, 4, 3, 1, 0, 2, 0), # 58
(8, 5, 8, 10, 6, 4, 0, 0, 5, 1, 1, 0, 0, 5, 11, 6, 3, 5, 0, 0, 2, 2, 1, 1, 1, 0), # 59
(6, 10, 9, 10, 7, 2, 5, 3, 1, 1, 1, 2, 0, 7, 10, 4, 8, 8, 0, 4, 3, 3, 1, 1, 0, 0), # 60
(7, 8, 13, 9, 12, 0, 1, 4, 1, 3, 1, 0, 0, 9, 2, 6, 4, 6, 2, 2, 3, 6, 3, 1, 2, 0), # 61
(5, 8, 6, 6, 7, 1, 4, 2, 5, 1, 0, 2, 0, 4, 5, 8, 3, 5, 3, 1, 1, 1, 5, 2, 0, 0), # 62
(10, 7, 8, 10, 4, 3, 4, 4, 5, 1, 0, 0, 0, 4, 5, 6, 6, 5, 4, 2, 3, 2, 3, 0, 0, 0), # 63
(8, 10, 7, 11, 5, 2, 3, 2, 1, 0, 1, 0, 0, 7, 7, 3, 9, 2, 5, 2, 0, 3, 2, 2, 0, 0), # 64
(8, 10, 2, 10, 4, 4, 1, 4, 2, 0, 0, 1, 0, 8, 5, 4, 2, 11, 2, 4, 2, 7, 5, 3, 2, 0), # 65
(6, 4, 14, 13, 8, 6, 2, 3, 4, 2, 0, 0, 0, 9, 9, 13, 7, 3, 2, 4, 2, 3, 5, 1, 1, 0), # 66
(10, 5, 6, 10, 10, 3, 1, 2, 1, 1, 0, 0, 0, 3, 1, 3, 1, 4, 3, 2, 4, 4, 0, 3, 1, 0), # 67
(7, 10, 10, 6, 6, 3, 2, 1, 1, 2, 0, 1, 0, 13, 6, 3, 4, 8, 1, 4, 0, 5, 0, 1, 2, 0), # 68
(12, 10, 4, 4, 3, 1, 5, 8, 3, 1, 0, 1, 0, 6, 3, 3, 6, 6, 3, 3, 1, 3, 1, 1, 1, 0), # 69
(4, 8, 3, 6, 7, 2, 3, 4, 0, 2, 0, 1, 0, 6, 4, 7, 2, 4, 1, 2, 3, 2, 5, 1, 1, 0), # 70
(10, 6, 4, 8, 5, 6, 5, 1, 3, 2, 1, 2, 0, 7, 6, 4, 5, 7, 1, 0, 5, 4, 4, 2, 1, 0), # 71
(5, 13, 8, 8, 6, 3, 3, 1, 6, 2, 1, 1, 0, 6, 8, 5, 2, 6, 2, 2, 1, 7, 4, 1, 0, 0), # 72
(6, 8, 13, 7, 9, 1, 2, 6, 5, 0, 1, 1, 0, 3, 4, 8, 8, 9, 2, 3, 4, 2, 1, 2, 0, 0), # 73
(5, 8, 4, 6, 8, 3, 4, 1, 3, 1, 0, 0, 0, 9, 3, 5, 1, 3, 5, 4, 2, 4, 3, 1, 1, 0), # 74
(8, 6, 8, 9, 7, 4, 0, 2, 3, 4, 1, 0, 0, 7, 7, 3, 3, 6, 5, 2, 3, 5, 2, 2, 1, 0), # 75
(4, 6, 9, 6, 6, 2, 2, 2, 3, 3, 0, 1, 0, 4, 10, 4, 5, 6, 4, 3, 2, 1, 2, 1, 1, 0), # 76
(5, 7, 9, 7, 6, 4, 5, 0, 1, 1, 1, 0, 0, 7, 5, 8, 6, 4, 4, 5, 2, 3, 1, 1, 0, 0), # 77
(8, 8, 4, 6, 2, 3, 1, 1, 3, 2, 0, 0, 0, 12, 9, 3, 4, 5, 4, 2, 4, 3, 3, 1, 0, 0), # 78
(9, 9, 7, 10, 12, 4, 5, 4, 2, 0, 0, 0, 0, 8, 7, 10, 5, 9, 1, 5, 1, 4, 3, 1, 1, 0), # 79
(11, 7, 5, 3, 9, 2, 4, 2, 3, 1, 1, 0, 0, 5, 9, 3, 2, 7, 3, 2, 1, 2, 5, 0, 0, 0), # 80
(10, 7, 1, 3, 7, 1, 2, 1, 4, 0, 4, 0, 0, 4, 4, 3, 3, 7, 3, 1, 0, 3, 3, 1, 1, 0), # 81
(4, 8, 5, 6, 5, 3, 3, 4, 4, 1, 0, 1, 0, 8, 7, 8, 3, 7, 3, 1, 3, 1, 1, 1, 0, 0), # 82
(7, 6, 5, 5, 6, 4, 3, 0, 1, 2, 1, 0, 0, 5, 6, 6, 2, 4, 3, 4, 2, 2, 1, 1, 1, 0), # 83
(9, 6, 4, 9, 4, 2, 3, 3, 2, 1, 0, 1, 0, 10, 9, 5, 4, 5, 7, 1, 3, 1, 1, 1, 2, 0), # 84
(7, 5, 5, 4, 7, 2, 2, 1, 1, 2, 3, 0, 0, 6, 4, 5, 3, 4, 5, 2, 6, 1, 2, 0, 1, 0), # 85
(10, 4, 6, 2, 5, 5, 2, 1, 3, 1, 0, 0, 0, 3, 5, 3, 7, 3, 2, 6, 1, 4, 3, 3, 1, 0), # 86
(5, 7, 13, 6, 4, 4, 4, 3, 1, 2, 0, 1, 0, 6, 7, 3, 3, 8, 3, 3, 4, 6, 1, 0, 0, 0), # 87
(12, 5, 6, 4, 4, 4, 4, 1, 4, 3, 0, 1, 0, 14, 3, 5, 11, 2, 3, 2, 2, 3, 2, 2, 0, 0), # 88
(3, 3, 8, 4, 5, 1, 3, 2, 6, 1, 1, 1, 0, 8, 9, 5, 5, 8, 5, 2, 3, 2, 1, 1, 0, 0), # 89
(8, 4, 9, 10, 4, 5, 3, 1, 5, 3, 1, 1, 0, 6, 6, 3, 2, 4, 2, 4, 5, 5, 1, 1, 2, 0), # 90
(10, 10, 5, 7, 8, 5, 2, 1, 4, 1, 2, 0, 0, 11, 8, 5, 5, 6, 1, 4, 5, 4, 3, 2, 1, 0), # 91
(7, 7, 6, 6, 6, 0, 3, 1, 3, 3, 1, 1, 0, 10, 7, 2, 6, 3, 1, 5, 2, 4, 1, 0, 1, 0), # 92
(7, 10, 6, 4, 6, 2, 1, 5, 2, 1, 0, 0, 0, 8, 4, 2, 3, 4, 3, 1, 2, 4, 0, 1, 0, 0), # 93
(5, 6, 8, 9, 10, 3, 3, 2, 6, 2, 0, 0, 0, 10, 6, 6, 4, 7, 1, 6, 1, 3, 5, 1, 1, 0), # 94
(11, 9, 5, 10, 8, 3, 0, 0, 4, 2, 1, 1, 0, 9, 3, 6, 1, 6, 2, 2, 2, 5, 2, 1, 0, 0), # 95
(8, 6, 7, 4, 14, 2, 1, 1, 1, 2, 1, 0, 0, 7, 6, 6, 2, 9, 5, 0, 2, 4, 1, 0, 0, 0), # 96
(12, 6, 15, 5, 5, 4, 3, 4, 5, 0, 4, 0, 0, 5, 11, 6, 7, 8, 0, 1, 2, 0, 3, 1, 1, 0), # 97
(7, 5, 4, 6, 9, 4, 1, 2, 2, 4, 1, 0, 0, 12, 8, 1, 1, 7, 1, 2, 1, 4, 2, 2, 1, 0), # 98
(10, 6, 4, 1, 3, 3, 2, 7, 3, 2, 0, 2, 0, 12, 6, 7, 3, 6, 3, 1, 2, 2, 3, 1, 0, 0), # 99
(4, 5, 4, 10, 6, 2, 1, 6, 2, 0, 4, 0, 0, 10, 8, 6, 7, 5, 2, 5, 1, 4, 9, 1, 0, 0), # 100
(7, 5, 7, 7, 9, 2, 1, 1, 4, 2, 2, 0, 0, 6, 8, 3, 2, 5, 2, 2, 0, 3, 0, 1, 0, 0), # 101
(10, 9, 1, 4, 5, 1, 2, 2, 1, 0, 1, 1, 0, 10, 6, 10, 8, 3, 4, 2, 1, 4, 1, 0, 0, 0), # 102
(9, 4, 4, 4, 4, 4, 4, 2, 2, 1, 2, 0, 0, 10, 12, 4, 4, 5, 4, 2, 1, 4, 1, 1, 0, 0), # 103
(6, 7, 6, 5, 5, 4, 5, 1, 6, 1, 0, 1, 0, 3, 7, 6, 1, 5, 4, 3, 2, 5, 3, 1, 0, 0), # 104
(9, 7, 6, 6, 6, 4, 2, 2, 6, 4, 3, 0, 0, 10, 7, 3, 2, 12, 6, 2, 3, 3, 1, 2, 1, 0), # 105
(9, 9, 5, 3, 4, 3, 2, 0, 5, 1, 1, 1, 0, 8, 2, 7, 3, 10, 3, 3, 1, 3, 3, 1, 0, 0), # 106
(10, 4, 6, 5, 6, 5, 3, 2, 3, 1, 1, 0, 0, 7, 6, 5, 2, 8, 4, 4, 0, 3, 1, 0, 1, 0), # 107
(8, 6, 6, 6, 4, 2, 2, 2, 5, 1, 2, 1, 0, 5, 6, 7, 2, 4, 3, 3, 2, 1, 1, 0, 1, 0), # 108
(5, 5, 12, 9, 5, 1, 2, 3, 3, 1, 2, 1, 0, 8, 7, 5, 4, 10, 1, 5, 2, 7, 5, 2, 0, 0), # 109
(10, 5, 4, 4, 3, 1, 4, 3, 1, 1, 1, 1, 0, 5, 5, 5, 2, 6, 6, 3, 6, 2, 5, 1, 2, 0), # 110
(12, 3, 4, 6, 6, 3, 5, 2, 2, 1, 2, 1, 0, 8, 6, 4, 3, 3, 3, 1, 0, 3, 1, 5, 0, 0), # 111
(8, 5, 4, 9, 3, 3, 2, 2, 3, 2, 0, 1, 0, 7, 7, 4, 0, 6, 2, 3, 1, 3, 0, 2, 0, 0), # 112
(9, 10, 4, 4, 8, 4, 2, 3, 5, 0, 0, 1, 0, 8, 5, 9, 4, 3, 3, 2, 2, 1, 1, 2, 0, 0), # 113
(9, 9, 5, 7, 3, 4, 2, 2, 4, 0, 1, 0, 0, 4, 0, 3, 2, 7, 2, 1, 4, 3, 0, 1, 3, 0), # 114
(6, 5, 5, 7, 6, 0, 3, 2, 4, 1, 4, 1, 0, 7, 4, 4, 3, 9, 2, 3, 3, 2, 1, 4, 1, 0), # 115
(8, 8, 6, 9, 5, 2, 0, 2, 6, 0, 1, 1, 0, 8, 9, 9, 1, 7, 1, 2, 3, 5, 3, 2, 1, 0), # 116
(10, 6, 4, 4, 7, 0, 2, 2, 1, 1, 0, 1, 0, 6, 6, 6, 1, 5, 2, 3, 1, 4, 0, 2, 0, 0), # 117
(5, 4, 4, 6, 5, 2, 4, 5, 4, 1, 0, 0, 0, 5, 4, 6, 4, 4, 2, 2, 1, 4, 2, 2, 1, 0), # 118
(7, 5, 3, 8, 3, 4, 1, 0, 2, 0, 2, 1, 0, 9, 3, 5, 4, 4, 2, 2, 3, 1, 4, 1, 0, 0), # 119
(5, 8, 5, 4, 6, 4, 1, 1, 4, 0, 0, 1, 0, 12, 7, 5, 3, 7, 3, 2, 0, 5, 0, 1, 0, 0), # 120
(12, 5, 10, 6, 7, 3, 3, 1, 5, 0, 0, 0, 0, 12, 11, 1, 4, 6, 2, 0, 1, 4, 3, 0, 0, 0), # 121
(7, 7, 9, 5, 2, 8, 5, 1, 1, 0, 2, 1, 0, 9, 6, 4, 3, 3, 1, 2, 0, 5, 0, 0, 2, 0), # 122
(17, 4, 5, 10, 5, 3, 3, 1, 4, 1, 1, 1, 0, 8, 7, 2, 4, 5, 4, 1, 2, 3, 5, 1, 1, 0), # 123
(6, 3, 5, 10, 6, 4, 4, 1, 2, 0, 0, 0, 0, 11, 5, 3, 4, 14, 3, 4, 5, 2, 3, 1, 1, 0), # 124
(11, 6, 1, 7, 3, 4, 1, 1, 3, 0, 2, 0, 0, 7, 9, 5, 3, 4, 2, 1, 5, 2, 4, 3, 2, 0), # 125
(10, 6, 7, 8, 8, 5, 1, 3, 1, 4, 1, 0, 0, 7, 10, 5, 5, 7, 1, 2, 2, 3, 4, 1, 1, 0), # 126
(8, 5, 11, 8, 5, 2, 1, 1, 1, 1, 2, 0, 0, 7, 2, 3, 6, 6, 3, 3, 1, 3, 2, 1, 0, 0), # 127
(6, 12, 6, 9, 4, 2, 3, 2, 1, 1, 2, 1, 0, 9, 2, 3, 2, 4, 1, 1, 0, 1, 3, 0, 1, 0), # 128
(12, 4, 4, 5, 6, 2, 1, 1, 3, 3, 0, 1, 0, 13, 3, 7, 2, 3, 4, 1, 0, 3, 0, 1, 2, 0), # 129
(2, 4, 4, 9, 4, 3, 4, 2, 2, 0, 0, 0, 0, 6, 5, 4, 4, 3, 3, 4, 0, 0, 2, 2, 0, 0), # 130
(6, 5, 8, 6, 4, 2, 3, 0, 3, 0, 0, 0, 0, 7, 3, 7, 5, 4, 3, 0, 1, 2, 0, 2, 0, 0), # 131
(8, 9, 4, 3, 6, 1, 2, 1, 1, 2, 1, 0, 0, 8, 10, 3, 5, 2, 3, 2, 1, 1, 2, 2, 0, 0), # 132
(4, 6, 9, 7, 3, 1, 5, 5, 1, 0, 0, 0, 0, 5, 5, 3, 8, 4, 6, 2, 2, 5, 4, 2, 2, 0), # 133
(8, 3, 3, 6, 7, 1, 4, 2, 0, 0, 0, 0, 0, 6, 5, 3, 6, 7, 3, 4, 2, 5, 1, 0, 0, 0), # 134
(6, 6, 7, 3, 10, 0, 2, 1, 1, 2, 0, 0, 0, 11, 2, 2, 5, 2, 0, 4, 2, 2, 1, 1, 0, 0), # 135
(3, 4, 5, 5, 4, 2, 2, 3, 2, 1, 0, 0, 0, 7, 5, 3, 3, 8, 6, 1, 1, 6, 3, 0, 1, 0), # 136
(8, 2, 4, 3, 1, 0, 2, 1, 2, 3, 0, 2, 0, 3, 7, 3, 4, 7, 1, 0, 0, 2, 2, 0, 0, 0), # 137
(9, 2, 5, 6, 10, 2, 0, 2, 1, 1, 2, 0, 0, 11, 3, 7, 4, 5, 2, 2, 3, 0, 1, 1, 0, 0), # 138
(6, 6, 8, 8, 9, 2, 1, 2, 3, 1, 0, 1, 0, 8, 6, 6, 7, 2, 1, 3, 2, 5, 2, 2, 0, 0), # 139
(3, 4, 7, 5, 2, 4, 5, 3, 4, 0, 1, 1, 0, 10, 5, 6, 9, 6, 5, 3, 0, 2, 2, 0, 0, 0), # 140
(7, 7, 9, 4, 1, 1, 3, 2, 2, 1, 0, 0, 0, 2, 5, 6, 7, 1, 3, 1, 0, 4, 2, 1, 1, 0), # 141
(5, 2, 3, 9, 4, 4, 2, 1, 4, 2, 1, 0, 0, 5, 9, 7, 2, 9, 6, 1, 1, 2, 3, 2, 0, 0), # 142
(7, 8, 7, 3, 5, 2, 0, 1, 1, 1, 0, 0, 0, 6, 3, 6, 2, 10, 2, 3, 3, 6, 5, 1, 1, 0), # 143
(8, 4, 3, 5, 6, 5, 1, 3, 2, 0, 1, 0, 0, 10, 4, 3, 4, 9, 5, 4, 2, 3, 0, 1, 0, 0), # 144
(9, 5, 9, 7, 5, 6, 0, 4, 3, 2, 0, 0, 0, 6, 9, 4, 1, 1, 3, 2, 2, 2, 2, 2, 2, 0), # 145
(10, 7, 6, 8, 3, 3, 2, 3, 6, 1, 0, 0, 0, 3, 7, 1, 2, 7, 1, 2, 1, 1, 3, 0, 0, 0), # 146
(3, 8, 5, 12, 3, 2, 2, 4, 2, 0, 0, 1, 0, 5, 8, 1, 2, 4, 5, 1, 1, 5, 2, 0, 0, 0), # 147
(9, 3, 3, 4, 4, 0, 1, 4, 6, 4, 0, 1, 0, 7, 8, 5, 4, 5, 0, 4, 1, 3, 1, 0, 0, 0), # 148
(6, 6, 6, 4, 7, 1, 2, 1, 3, 3, 2, 0, 0, 5, 4, 3, 1, 7, 4, 2, 2, 4, 2, 1, 2, 0), # 149
(5, 6, 5, 10, 1, 2, 3, 1, 3, 1, 0, 1, 0, 4, 12, 4, 2, 6, 0, 1, 4, 2, 5, 0, 1, 0), # 150
(9, 5, 3, 4, 3, 1, 2, 4, 1, 2, 1, 0, 0, 5, 4, 5, 5, 3, 2, 1, 3, 3, 2, 0, 1, 0), # 151
(7, 2, 7, 5, 2, 3, 5, 2, 2, 1, 1, 2, 0, 9, 7, 3, 1, 6, 1, 1, 2, 1, 2, 0, 0, 0), # 152
(10, 2, 4, 3, 4, 2, 1, 2, 1, 0, 1, 0, 0, 11, 8, 2, 2, 8, 1, 1, 1, 1, 0, 0, 1, 0), # 153
(6, 2, 4, 6, 8, 0, 3, 2, 2, 2, 1, 0, 0, 13, 8, 2, 2, 6, 1, 3, 3, 1, 3, 3, 0, 0), # 154
(12, 6, 6, 7, 3, 2, 3, 1, 7, 3, 2, 1, 0, 8, 4, 5, 4, 3, 1, 2, 2, 3, 1, 1, 1, 0), # 155
(5, 3, 5, 5, 9, 1, 2, 1, 0, 0, 3, 1, 0, 5, 3, 3, 3, 7, 3, 1, 4, 2, 2, 3, 1, 0), # 156
(2, 3, 4, 6, 8, 7, 1, 2, 6, 1, 0, 0, 0, 8, 4, 5, 6, 4, 6, 2, 0, 0, 3, 1, 0, 0), # 157
(10, 5, 4, 7, 6, 0, 0, 1, 2, 1, 0, 0, 0, 4, 6, 3, 3, 3, 6, 3, 1, 5, 2, 2, 0, 0), # 158
(6, 4, 10, 4, 4, 1, 3, 0, 0, 1, 0, 1, 0, 7, 7, 10, 2, 3, 4, 1, 3, 5, 1, 1, 0, 0), # 159
(4, 4, 5, 8, 10, 1, 0, 1, 1, 1, 1, 2, 0, 7, 2, 3, 2, 5, 2, 3, 0, 1, 2, 0, 0, 0), # 160
(1, 2, 3, 5, 7, 1, 4, 3, 2, 3, 1, 0, 0, 14, 10, 9, 3, 6, 0, 3, 3, 6, 0, 0, 0, 0), # 161
(4, 7, 6, 3, 6, 3, 1, 3, 3, 2, 0, 0, 0, 6, 0, 6, 0, 9, 3, 1, 3, 5, 1, 0, 0, 0), # 162
(11, 7, 5, 4, 4, 1, 1, 1, 5, 0, 1, 0, 0, 7, 6, 3, 3, 4, 3, 0, 2, 1, 1, 1, 0, 0), # 163
(5, 1, 2, 9, 6, 2, 2, 2, 1, 2, 0, 1, 0, 4, 6, 4, 3, 4, 5, 1, 2, 1, 2, 1, 0, 0), # 164
(9, 6, 3, 3, 3, 1, 2, 2, 1, 0, 1, 1, 0, 5, 2, 4, 0, 7, 7, 7, 0, 1, 0, 0, 1, 0), # 165
(3, 3, 2, 2, 2, 3, 1, 2, 1, 0, 0, 2, 0, 5, 3, 2, 2, 6, 0, 0, 1, 1, 2, 3, 1, 0), # 166
(11, 3, 2, 6, 7, 3, 2, 1, 1, 0, 0, 0, 0, 4, 5, 0, 0, 6, 3, 1, 3, 6, 0, 0, 0, 0), # 167
(2, 2, 8, 2, 1, 3, 1, 0, 2, 1, 1, 0, 0, 7, 3, 1, 3, 2, 1, 1, 0, 2, 1, 1, 0, 0), # 168
(9, 3, 3, 3, 6, 2, 2, 5, 3, 0, 0, 0, 0, 3, 2, 4, 4, 3, 1, 2, 1, 5, 1, 3, 1, 0), # 169
(7, 2, 3, 6, 3, 0, 0, 1, 3, 0, 1, 0, 0, 6, 1, 2, 2, 7, 4, 3, 0, 0, 1, 1, 0, 0), # 170
(6, 6, 3, 4, 4, 2, 1, 4, 1, 0, 1, 0, 0, 4, 5, 3, 1, 6, 4, 2, 1, 1, 1, 1, 0, 0), # 171
(4, 4, 3, 2, 4, 2, 0, 0, 1, 0, 0, 1, 0, 4, 7, 3, 3, 3, 2, 2, 1, 1, 2, 1, 0, 0), # 172
(4, 1, 2, 2, 3, 3, 1, 3, 2, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 2, 0, 2, 1, 0, 0, 0), # 173
(4, 1, 2, 5, 1, 1, 1, 2, 2, 0, 0, 1, 0, 8, 8, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 0), # 174
(1, 0, 0, 6, 2, 4, 0, 1, 1, 0, 0, 0, 0, 4, 6, 2, 1, 3, 3, 0, 2, 0, 1, 0, 1, 0), # 175
(4, 0, 5, 0, 4, 1, 1, 1, 2, 2, 0, 0, 0, 1, 1, 3, 4, 1, 1, 2, 0, 1, 1, 0, 1, 0), # 176
(4, 7, 5, 4, 3, 1, 0, 0, 1, 0, 0, 1, 0, 2, 3, 4, 2, 1, 1, 0, 0, 1, 5, 1, 0, 0), # 177
(6, 4, 1, 4, 2, 0, 1, 1, 1, 1, 0, 0, 0, 5, 3, 3, 2, 4, 2, 1, 0, 1, 0, 1, 0, 0), # 178
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 179
)
station_arriving_intensity = (
(4.0166924626974145, 4.420230847754533, 4.169026583690005, 4.971734219090746, 4.4437484860876895, 2.5109239456298713, 3.3168284922991322, 3.7225409383835384, 4.872079249734406, 3.166412012417896, 3.3642121311084825, 3.918332062644939, 4.067104170062691), # 0
(4.283461721615979, 4.712048555315807, 4.444277273064122, 5.3001154026212935, 4.737992269979389, 2.6767868672340445, 3.535575153010955, 3.9676109783245668, 5.1937962610663275, 3.37518455382172, 3.5864769087649053, 4.176973328651484, 4.3358333179518835), # 1
(4.549378407183785, 5.0027081367127835, 4.718433828437931, 5.627190163731836, 5.0311703789997955, 2.841988091609956, 3.7534548063685635, 4.211700198323536, 5.514229445502039, 3.583131020016437, 3.8078585190210505, 4.434586121642444, 4.603491862567752), # 2
(4.81340623451725, 5.291056401549158, 4.9904086954558835, 5.951661126025659, 5.322129340801522, 3.0058724980680904, 3.9696029133183646, 4.453840925995606, 5.832108128736874, 3.7894261587409446, 4.027478729461906, 4.690148547944369, 4.869018245003381), # 3
(5.074508918732786, 5.57594015942862, 5.259114319762429, 6.272230913106056, 5.609715683037194, 3.1677849659189343, 4.183154934806767, 4.6930654889559325, 6.146161636466166, 3.993244717734143, 4.24445930767246, 4.942638713883811, 5.131350906351854), # 4
(5.331650174946809, 5.856206219954871, 5.523463147002015, 6.587602148576315, 5.892775933359424, 3.3270703744729717, 4.393246331780179, 4.928406214819674, 6.455119294385248, 4.193761444734931, 4.457922021237706, 5.191034725787318, 5.389428287706262), # 5
(5.583793718275733, 6.130701392731601, 5.782367622819093, 6.896477456039722, 6.170156619420835, 3.4830736030406912, 4.59901256518501, 5.158895431201991, 6.757710428189452, 4.390151087482207, 4.666988637742626, 5.434314689981447, 5.642188830159686), # 6
(5.829903263835975, 6.398272487362505, 6.034740192858108, 7.19755945909957, 6.440704268874043, 3.6351395309325767, 4.799589095967668, 5.383565465718042, 7.052664363574116, 4.58158839371487, 4.870780924772215, 5.671456712792743, 5.888570974805216), # 7
(6.068942526743948, 6.65776631345128, 6.279493302763517, 7.489550781359142, 6.703265409371669, 3.782613037459112, 4.994111385074558, 5.60144864598298, 7.338710426234565, 4.76724811117182, 5.068420649911457, 5.901438900547762, 6.127513162735934), # 8
(6.299875222116068, 6.908029680601619, 6.515539398179763, 7.771154046421735, 6.956686568566328, 3.924839001930787, 5.181714893452096, 5.811577299611971, 7.6145779418661395, 4.946304987591954, 5.259029580745342, 6.123239359573051, 6.35795383504493), # 9
(6.5216650650687455, 7.147909398417212, 6.7417909247512995, 8.04107187789063, 7.199814274110641, 4.061162303658086, 5.361535082046684, 6.012983754220169, 7.878996236164172, 5.117933770714171, 5.441729484858859, 6.335836196195162, 6.578831432825289), # 10
(6.7332757707184046, 7.3762522765017655, 6.957160328122573, 8.298006899369119, 7.431495053657227, 4.190927821951495, 5.532707411804733, 6.204700337422732, 8.130694634823994, 5.281309208277375, 5.615642129836999, 6.538207516740648, 6.78908439717009), # 11
(6.93367105418145, 7.591905124458958, 7.160560053938032, 8.54066173446049, 7.650575434858702, 4.313480436121496, 5.694367343672649, 6.385759376834817, 8.368402463540944, 5.435606048020458, 5.7798892832647475, 6.729331427536055, 6.987651169172428), # 12
(7.121814630574301, 7.793714751892496, 7.3509025478421295, 8.767739006768036, 7.855901945367681, 4.428165025478579, 5.845650338596845, 6.555193200071585, 8.590849048010346, 5.579999037682324, 5.933592712727095, 6.908186034907937, 7.173470189925388), # 13
(7.296670215013373, 7.980527968406071, 7.527100255479318, 8.977941339895034, 8.046321112836791, 4.5343264693332275, 5.9856918575237295, 6.7120341347481975, 8.796763713927538, 5.713662925001867, 6.0758741858090275, 7.073749445182848, 7.345479900522051), # 14
(7.457201522615084, 8.151191583603374, 7.688065622494034, 9.169971357444789, 8.220679464918646, 4.63130964699593, 6.1136273613997005, 6.855314508479805, 8.984875786987855, 5.835772457717993, 6.2058554700955355, 7.224999764687337, 7.502618742055505), # 15
(7.602372268495841, 8.304552407088106, 7.83271109453074, 9.342531683020573, 8.377823529265866, 4.718459437777168, 6.228592311171181, 6.984066648881569, 9.153914592886629, 5.945502383569597, 6.32265833317161, 7.360915099747952, 7.643825155618837), # 16
(7.73114616777206, 8.439457248463958, 7.959949117233882, 9.49432494022569, 8.516599833531071, 4.795120720987429, 6.329722167784569, 7.097322883568655, 9.302609457319187, 6.042027450295574, 6.425404542622239, 7.480473556691244, 7.768037582305133), # 17
(7.842486935560164, 8.55475291733462, 8.068692136247904, 9.624053752663423, 8.635854905366871, 4.860638375937203, 6.416152392186281, 7.194115540156209, 9.429689705980877, 6.1245224056348295, 6.513215866032407, 7.582653241843772, 7.874194463207477), # 18
(7.935358286976559, 8.649286223303795, 8.157852597217262, 9.730420743937053, 8.734435272425893, 4.914357281936967, 6.4870184453227155, 7.273476946259397, 9.533884664567024, 6.192161997326263, 6.585214070987103, 7.666432261532077, 7.961234239418957), # 19
(8.008723937137665, 8.72190397597517, 8.226342945786403, 9.812128537649883, 8.811187462360754, 4.955622318297215, 6.54145578814029, 7.334439429493374, 9.61392365877296, 6.2441209731087675, 6.64052092507132, 7.730788722082713, 8.02809535203266), # 20
(8.061547601159893, 8.771452984952447, 8.273075627599775, 9.86787975740519, 8.864958002824071, 4.983778364328429, 6.578599881585408, 7.376035317473299, 9.668536014294018, 6.279574080721244, 6.678258195870048, 7.774700729822235, 8.073716242141662), # 21
(8.092792994159664, 8.796780059839316, 8.296963088301828, 9.89637702680627, 8.89459342146846, 4.998170299341094, 6.59758618660448, 7.397296937814332, 9.696451056825532, 6.297696067902594, 6.697547650968272, 7.797146391077192, 8.097035350839063), # 22
(8.104314690674112, 8.799778875171468, 8.299938545953362, 9.899944650205763, 8.902185644826078, 5.0, 6.599843201807471, 7.399595061728395, 9.699940987654323, 6.299833818015546, 6.699966429729392, 7.799918061271147, 8.1), # 23
(8.112809930427323, 8.79802962962963, 8.299451851851853, 9.899505555555557, 8.906486090891882, 5.0, 6.598603050108934, 7.3964, 9.699473333333334, 6.29852049382716, 6.699699663299665, 7.799269135802469, 8.1), # 24
(8.121125784169264, 8.794581618655693, 8.29849108367627, 9.898636831275722, 8.910691956475603, 5.0, 6.596159122085048, 7.390123456790125, 9.69854938271605, 6.295935070873343, 6.69917071954109, 7.797988111568358, 8.1), # 25
(8.129261615238427, 8.789487517146778, 8.297069410150893, 9.897348353909464, 8.914803094736884, 5.0, 6.592549374646977, 7.380883950617285, 9.69718098765432, 6.29212056698674, 6.698384387080684, 7.7960925468678575, 8.1), # 26
(8.13721678697331, 8.7828, 8.2952, 9.89565, 8.918819358835371, 5.0, 6.587811764705883, 7.3688, 9.69538, 6.28712, 6.697345454545455, 7.793600000000001, 8.1), # 27
(8.1449906627124, 8.774571742112483, 8.292896021947874, 9.893551646090536, 8.922740601930721, 5.0, 6.581984249172921, 7.353990123456791, 9.693158271604938, 6.2809763877457705, 6.696058710562415, 7.790528029263832, 8.1), # 28
(8.1525826057942, 8.764855418381345, 8.290170644718794, 9.89106316872428, 8.926566677182576, 5.0, 6.575104784959253, 7.3365728395061724, 9.690527654320988, 6.273732748056699, 6.6945289437585735, 7.78689419295839, 8.1), # 29
(8.159991979557198, 8.753703703703705, 8.287037037037036, 9.888194444444444, 8.930297437750589, 5.0, 6.567211328976035, 7.316666666666666, 9.6875, 6.265432098765433, 6.692760942760943, 7.782716049382715, 8.1), # 30
(8.167218147339886, 8.741169272976682, 8.283508367626887, 9.88495534979424, 8.933932736794407, 5.0, 6.558341838134432, 7.2943901234567905, 9.684087160493828, 6.256117457704619, 6.6907594961965335, 7.778011156835849, 8.1), # 31
(8.174260472480764, 8.727304801097395, 8.27959780521262, 9.881355761316874, 8.937472427473677, 5.0, 6.548534269345599, 7.269861728395063, 9.680300987654322, 6.245831842706905, 6.688529392692356, 7.772797073616828, 8.1), # 32
(8.181118318318317, 8.712162962962962, 8.27531851851852, 9.877405555555555, 8.94091636294805, 5.0, 6.537826579520697, 7.243200000000001, 9.676153333333334, 6.234618271604939, 6.6860754208754205, 7.7670913580246905, 8.1), # 33
(8.187791048191048, 8.695796433470507, 8.270683676268861, 9.873114609053498, 8.944264396377173, 5.0, 6.526256725570888, 7.214523456790123, 9.671656049382719, 6.222519762231368, 6.68340236937274, 7.760911568358482, 8.1), # 34
(8.194278025437447, 8.678257887517146, 8.26570644718793, 9.868492798353909, 8.947516380920696, 5.0, 6.513862664407327, 7.183950617283951, 9.666820987654322, 6.209579332418839, 6.680515026811323, 7.754275262917239, 8.1), # 35
(8.200578613396004, 8.6596, 8.2604, 9.86355, 8.950672169738269, 5.0, 6.500682352941176, 7.151600000000001, 9.66166, 6.1958400000000005, 6.677418181818182, 7.747200000000001, 8.1), # 36
(8.20669217540522, 8.639875445816186, 8.254777503429356, 9.85829609053498, 8.953731615989538, 5.0, 6.486753748083595, 7.11759012345679, 9.656184938271606, 6.1813447828075, 6.674116623020328, 7.739703337905808, 8.1), # 37
(8.212618074803581, 8.619136899862827, 8.248852126200275, 9.85274094650206, 8.956694572834152, 5.0, 6.4721148067457435, 7.0820395061728405, 9.650407654320988, 6.166136698673983, 6.670615139044769, 7.7318028349337, 8.1), # 38
(8.218355674929589, 8.597437037037038, 8.242637037037039, 9.846894444444445, 8.959560893431762, 5.0, 6.456803485838781, 7.045066666666667, 9.644340000000001, 6.150258765432099, 6.666918518518519, 7.723516049382716, 8.1), # 39
(8.22390433912173, 8.574828532235939, 8.236145404663922, 9.84076646090535, 8.962330430942016, 5.0, 6.440857742273865, 7.006790123456792, 9.637993827160495, 6.133754000914496, 6.663031550068587, 7.714860539551899, 8.1), # 40
(8.229263430718502, 8.551364060356653, 8.229390397805213, 9.834366872427985, 8.965003038524562, 5.0, 6.424315532962156, 6.967328395061729, 9.631380987654321, 6.116665422953818, 6.658959022321986, 7.705853863740284, 8.1), # 41
(8.2344323130584, 8.527096296296298, 8.222385185185187, 9.827705555555557, 8.967578569339047, 5.0, 6.4072148148148145, 6.9268, 9.624513333333335, 6.0990360493827165, 6.654705723905725, 7.696513580246914, 8.1), # 42
(8.239410349479915, 8.50207791495199, 8.215142935528121, 9.820792386831277, 8.970056876545122, 5.0, 6.389593544743001, 6.8853234567901245, 9.617402716049384, 6.080908898033837, 6.650276443446813, 7.6868572473708285, 8.1), # 43
(8.244196903321543, 8.47636159122085, 8.2076768175583, 9.813637242798356, 8.972437813302436, 5.0, 6.371489679657872, 6.843017283950619, 9.610060987654322, 6.062326986739826, 6.645675969572266, 7.676902423411066, 8.1), # 44
(8.248791337921773, 8.450000000000001, 8.200000000000001, 9.80625, 8.974721232770637, 5.0, 6.352941176470589, 6.800000000000001, 9.6025, 6.043333333333334, 6.640909090909091, 7.666666666666666, 8.1), # 45
(8.253193016619106, 8.423045816186557, 8.192125651577504, 9.798640534979425, 8.976906988109373, 5.0, 6.333985992092311, 6.756390123456791, 9.594731604938271, 6.023970955647005, 6.635980596084299, 7.656167535436672, 8.1), # 46
(8.257401302752028, 8.39555171467764, 8.18406694101509, 9.790818724279836, 8.978994932478294, 5.0, 6.3146620834341975, 6.712306172839506, 9.586767654320989, 6.004282871513489, 6.630895273724903, 7.64542258802012, 8.1), # 47
(8.261415559659037, 8.367570370370371, 8.175837037037038, 9.782794444444447, 8.980984919037049, 5.0, 6.295007407407407, 6.667866666666668, 9.57862, 5.984312098765432, 6.625657912457912, 7.634449382716049, 8.1), # 48
(8.26523515067863, 8.339154458161865, 8.167449108367627, 9.774577572016462, 8.982876800945286, 5.0, 6.275059920923102, 6.623190123456791, 9.57030049382716, 5.964101655235483, 6.6202733009103385, 7.623265477823503, 8.1), # 49
(8.268859439149294, 8.310356652949247, 8.15891632373114, 9.766177983539094, 8.984670431362652, 5.0, 6.25485758089244, 6.578395061728395, 9.56182098765432, 5.943694558756287, 6.61474622770919, 7.611888431641519, 8.1), # 50
(8.272287788409528, 8.28122962962963, 8.150251851851852, 9.757605555555557, 8.9863656634488, 5.0, 6.23443834422658, 6.5336, 9.553193333333335, 5.923133827160494, 6.609081481481482, 7.600335802469137, 8.1), # 51
(8.275519561797823, 8.251826063100138, 8.141468861454047, 9.748870164609054, 8.987962350363372, 5.0, 6.213840167836683, 6.488923456790123, 9.54442938271605, 5.90246247828075, 6.603283850854222, 7.588625148605397, 8.1), # 52
(8.278554122652675, 8.222198628257889, 8.132580521262005, 9.739981687242798, 8.989460345266023, 5.0, 6.1931010086339064, 6.444483950617284, 9.535540987654322, 5.881723529949703, 6.597358124454421, 7.576774028349337, 8.1), # 53
(8.281390834312573, 8.192400000000001, 8.1236, 9.73095, 8.990859501316402, 5.0, 6.172258823529412, 6.400399999999999, 9.52654, 5.86096, 6.59130909090909, 7.5648, 8.1), # 54
(8.284029060116017, 8.162482853223594, 8.114540466392318, 9.721784979423868, 8.992159671674152, 5.0, 6.151351569434358, 6.35679012345679, 9.517438271604938, 5.84021490626429, 6.585141538845242, 7.552720621856425, 8.1), # 55
(8.286468163401498, 8.132499862825789, 8.105415089163237, 9.712496502057613, 8.993360709498928, 5.0, 6.130417203259905, 6.313772839506173, 9.508247654320988, 5.819531266575218, 6.578860256889887, 7.54055345221765, 8.1), # 56
(8.288707507507507, 8.102503703703704, 8.096237037037039, 9.703094444444446, 8.994462467950374, 5.0, 6.109493681917211, 6.271466666666668, 9.498980000000001, 5.798952098765433, 6.572470033670034, 7.528316049382716, 8.1), # 57
(8.290746455772544, 8.072547050754459, 8.087019478737998, 9.693588683127572, 8.99546480018814, 5.0, 6.088618962317438, 6.2299901234567905, 9.489647160493828, 5.778520420667582, 6.565975657812697, 7.516025971650663, 8.1), # 58
(8.292584371535098, 8.042682578875171, 8.077775582990398, 9.683989094650206, 8.996367559371876, 5.0, 6.067831001371743, 6.189461728395062, 9.480260987654322, 5.758279250114313, 6.55938191794488, 7.503700777320531, 8.1), # 59
(8.294220618133663, 8.012962962962964, 8.068518518518518, 9.674305555555556, 8.99717059866123, 5.0, 6.0471677559912855, 6.15, 9.470833333333335, 5.738271604938272, 6.552693602693603, 7.491358024691358, 8.1), # 60
(8.295654558906731, 7.983440877914953, 8.05926145404664, 9.664547942386832, 8.997873771215849, 5.0, 6.026667183087227, 6.1117234567901235, 9.461376049382716, 5.718540502972108, 6.545915500685871, 7.4790152720621865, 8.1), # 61
(8.296885557192804, 7.954168998628258, 8.050017558299041, 9.654726131687244, 8.998476930195388, 5.0, 6.006367239570725, 6.074750617283951, 9.451900987654321, 5.699128962048469, 6.539052400548697, 7.4666900777320535, 8.1), # 62
(8.297912976330368, 7.9252, 8.0408, 9.644850000000002, 8.998979928759486, 5.0, 5.986305882352941, 6.039200000000001, 9.44242, 5.68008, 6.532109090909092, 7.4544, 8.1), # 63
(8.298736179657919, 7.896586556927298, 8.0316219478738, 9.634929423868314, 8.999382620067799, 5.0, 5.966521068345034, 6.005190123456791, 9.432944938271605, 5.661436634659351, 6.5250903603940635, 7.442162597165067, 8.1), # 64
(8.29935453051395, 7.86838134430727, 8.02249657064472, 9.624974279835392, 8.999684857279973, 5.0, 5.947050754458163, 5.972839506172839, 9.423487654320988, 5.643241883859168, 6.518000997630629, 7.429995427526291, 8.1), # 65
(8.299767392236957, 7.840637037037038, 8.013437037037038, 9.614994444444445, 8.999886493555659, 5.0, 5.927932897603486, 5.942266666666668, 9.414060000000001, 5.625538765432099, 6.510845791245791, 7.417916049382717, 8.1), # 66
(8.299974128165434, 7.813406310013717, 8.004456515775034, 9.604999794238683, 8.999987382054504, 5.0, 5.909205454692165, 5.913590123456792, 9.404673827160494, 5.608370297210792, 6.5036295298665685, 7.405942021033379, 8.1), # 67
(8.29983329158466, 7.786598911456259, 7.9955247599451305, 9.594913392377887, 8.999902364237876, 4.99990720926688, 5.890812155863717, 5.88667508001829, 9.395270278920897, 5.591696353317733, 6.496228790832301, 7.394024017519794, 8.099900120027435), # 68
(8.298513365539453, 7.75939641577061, 7.98639074074074, 9.584226811594203, 8.99912854030501, 4.999173662551441, 5.872214545077291, 5.860079012345679, 9.385438271604938, 5.575045112563544, 6.487890271132376, 7.38177517868746, 8.099108796296298), # 69
(8.295908630047116, 7.731673967874684, 7.977014746227709, 9.572869699409555, 8.997599451303154, 4.9977290047248895, 5.853328107649096, 5.833561957018748, 9.375122313671698, 5.558335619570188, 6.478519109220864, 7.369138209034247, 8.097545867626888), # 70
(8.292055728514343, 7.703448134873224, 7.967400068587105, 9.560858803005905, 8.995334463003308, 4.995596646852614, 5.8341613276311906, 5.807132693187015, 9.364337768632831, 5.541568287474112, 6.468149896627089, 7.356122349770172, 8.095231910150892), # 71
(8.286991304347827, 7.674735483870967, 7.9575499999999995, 9.548210869565217, 8.99235294117647, 4.992800000000001, 5.81472268907563, 5.7808, 9.353100000000001, 5.524743529411765, 6.456817224880384, 7.342736842105264, 8.0921875), # 72
(8.280752000954257, 7.6455525819726535, 7.947467832647462, 9.534942646269458, 8.988674251593642, 4.989362475232434, 5.795020676034474, 5.754572656607225, 9.341424371284866, 5.507861758519595, 6.444555685510071, 7.328990927249535, 8.0884332133059), # 73
(8.273374461740323, 7.615915996283022, 7.937156858710562, 9.52107088030059, 8.98431776002582, 4.985307483615303, 5.775063772559778, 5.728459442158208, 9.329326245999086, 5.49092338793405, 6.431399870045485, 7.314893846413014, 8.083989626200276), # 74
(8.26489533011272, 7.5858422939068095, 7.92662037037037, 9.50661231884058, 8.97930283224401, 4.980658436213993, 5.754860462703601, 5.7024691358024695, 9.31682098765432, 5.473928830791576, 6.417384370015949, 7.300454840805718, 8.078877314814816), # 75
(8.255351249478142, 7.55534804194876, 7.915861659807956, 9.49158370907139, 8.973648834019205, 4.975438744093889, 5.734419230517997, 5.6766105166895295, 9.303923959762232, 5.4568785002286235, 6.402543776950793, 7.2856831516376666, 8.073116855281206), # 76
(8.244778863243274, 7.524449807513609, 7.904884019204388, 9.476001798174986, 8.967375131122408, 4.9696718183203785, 5.7137485600550235, 5.650892363968908, 9.290650525834478, 5.43977280938164, 6.38691268237935, 7.270588020118885, 8.06672882373114), # 77
(8.233214814814815, 7.493164157706095, 7.893690740740741, 9.459883333333334, 8.96050108932462, 4.963381069958848, 5.69285693536674, 5.625323456790124, 9.277016049382715, 5.422612171387073, 6.370525677830941, 7.255178687459391, 8.059733796296298), # 78
(8.220695747599452, 7.461507659630958, 7.88228511659808, 9.443245061728396, 8.953046074396838, 4.956589910074683, 5.671752840505201, 5.5999125743026985, 9.26303589391861, 5.405396999381371, 6.353417354834898, 7.239464394869204, 8.052152349108367), # 79
(8.207258305003878, 7.429496880392938, 7.870670438957475, 9.426103730542136, 8.945029452110063, 4.949321749733272, 5.650444759522465, 5.574668495656151, 9.248725422953818, 5.388127706500981, 6.335622304920551, 7.223454383558348, 8.04400505829904), # 80
(8.192939130434784, 7.397148387096775, 7.85885, 9.408476086956524, 8.936470588235293, 4.9416, 5.628941176470589, 5.549600000000001, 9.2341, 5.370804705882353, 6.317175119617225, 7.207157894736842, 8.0353125), # 81
(8.177774867298861, 7.364478746847206, 7.8468270919067225, 9.390378878153516, 8.927388848543533, 4.933448071940254, 5.607250575401629, 5.524715866483768, 9.219174988568815, 5.353428410661933, 6.298110390454251, 7.190584169614709, 8.026095250342937), # 82
(8.161802159002804, 7.331504526748971, 7.834605006858711, 9.371828851315083, 8.917803598805778, 4.924889376619419, 5.585381440367643, 5.500024874256973, 9.203965752171925, 5.335999233976169, 6.278462708960955, 7.17374244940197, 8.016373885459535), # 83
(8.145057648953301, 7.29824229390681, 7.822187037037037, 9.35284275362319, 8.907734204793028, 4.915947325102881, 5.563342255420687, 5.475535802469135, 9.188487654320987, 5.3185175889615115, 6.258266666666667, 7.156641975308642, 8.006168981481482), # 84
(8.127577980557048, 7.264708615425461, 7.80957647462277, 9.333437332259797, 8.897200032276286, 4.906645328456029, 5.54114150461282, 5.451257430269777, 9.172756058527662, 5.300983888754405, 6.237556855100715, 7.13929198854475, 7.995501114540467), # 85
(8.10939979722073, 7.230920058409665, 7.796776611796983, 9.313629334406873, 8.886220447026547, 4.897006797744247, 5.518787671996097, 5.4271985368084135, 9.156786328303614, 5.283398546491299, 6.216367865792428, 7.121701730320315, 7.984390860768176), # 86
(8.090559742351045, 7.1968931899641575, 7.7837907407407405, 9.293435507246377, 8.874814814814817, 4.887055144032922, 5.496289241622575, 5.403367901234568, 9.140593827160496, 5.265761975308642, 6.194734290271132, 7.103880441845354, 7.972858796296297), # 87
(8.071094459354686, 7.162644577193681, 7.7706221536351165, 9.27287259796028, 8.863002501412089, 4.876813778387441, 5.473654697544313, 5.37977430269776, 9.124193918609969, 5.248074588342881, 6.172690720066159, 7.085837364329892, 7.960925497256517), # 88
(8.051040591638339, 7.128190787202974, 7.75727414266118, 9.251957353730543, 8.850802872589366, 4.8663061118731905, 5.4508925238133665, 5.356426520347508, 9.107601966163696, 5.230336798730466, 6.150271746706835, 7.067581738983948, 7.948611539780521), # 89
(8.030434782608696, 7.093548387096774, 7.74375, 9.230706521739132, 8.838235294117649, 4.855555555555556, 5.428011204481793, 5.333333333333333, 9.090833333333334, 5.2125490196078434, 6.1275119617224885, 7.049122807017544, 7.9359375000000005), # 90
(8.00931367567245, 7.058733943979822, 7.730053017832647, 9.20913684916801, 8.825319131767932, 4.8445855204999235, 5.405019223601649, 5.3105035208047555, 9.073903383630546, 5.194711664111461, 6.104445956642448, 7.0304698096406995, 7.922923954046638), # 91
(7.9877139142362985, 7.023764024956858, 7.716186488340192, 9.187265083199142, 8.812073751311223, 4.833419417771681, 5.381925065224994, 5.287945861911295, 9.056827480566987, 5.176825145377768, 6.081108322996043, 7.011631988063439, 7.909591478052126), # 92
(7.965672141706924, 6.988655197132617, 7.702153703703704, 9.165107971014494, 8.798518518518518, 4.822080658436214, 5.358737213403881, 5.26566913580247, 9.039620987654322, 5.15888987654321, 6.0575336523126, 6.992618583495776, 7.895960648148147), # 93
(7.943225001491024, 6.953424027611842, 7.6879579561042535, 9.142682259796029, 8.784672799160816, 4.810592653558909, 5.335464152190369, 5.243682121627802, 9.022299268404208, 5.140906270744238, 6.033756536121448, 6.973438837147739, 7.882052040466393), # 94
(7.920409136995288, 6.9180870834992705, 7.673602537722909, 9.120004696725712, 8.770555959009119, 4.798978814205152, 5.312114365636515, 5.221993598536809, 9.004877686328305, 5.122874741117297, 6.009811565951917, 6.954101990229344, 7.867886231138546), # 95
(7.89726119162641, 6.882660931899643, 7.659090740740742, 9.097092028985507, 8.756187363834423, 4.787262551440329, 5.288696337794377, 5.200612345679013, 8.987371604938271, 5.104795700798839, 5.985733333333334, 6.934617283950619, 7.853483796296297), # 96
(7.873817808791078, 6.847162139917697, 7.64442585733882, 9.07396100375738, 8.741586379407732, 4.775467276329827, 5.265218552716011, 5.179547142203933, 8.969796387745772, 5.086669562925308, 5.961556429795026, 6.914993959521576, 7.838865312071332), # 97
(7.850115631895988, 6.811607274658171, 7.629611179698216, 9.050628368223297, 8.726772371500042, 4.763616399939035, 5.241689494453475, 5.158806767261089, 8.952167398262459, 5.068496740633154, 5.937315446866325, 6.895241258152239, 7.824051354595337), # 98
(7.826191304347827, 6.776012903225807, 7.614650000000001, 9.027110869565218, 8.711764705882354, 4.751733333333333, 5.218117647058825, 5.138400000000001, 8.9345, 5.050277647058824, 5.913044976076556, 6.875368421052632, 7.8090625000000005), # 99
(7.80208146955329, 6.740395592725341, 7.59954561042524, 9.00342525496511, 8.696582748325667, 4.739841487578113, 5.194511494584116, 5.118335619570188, 8.916809556470051, 5.032012695338767, 5.888779608955048, 6.855384689432774, 7.79391932441701), # 100
(7.777822770919068, 6.704771910261517, 7.584301303155008, 8.979588271604939, 8.681245864600985, 4.727964273738759, 5.17087952108141, 5.09862240512117, 8.899111431184272, 5.013702298609431, 5.86455393703113, 6.835299304502683, 7.7786424039780515), # 101
(7.753451851851853, 6.669158422939069, 7.56892037037037, 8.955616666666668, 8.665773420479303, 4.7161251028806594, 5.1472302106027605, 5.07926913580247, 8.881420987654321, 4.995346870007263, 5.840402551834131, 6.815121507472385, 7.763252314814816), # 102
(7.729005355758336, 6.633571697862738, 7.5534061042524, 8.93152718733226, 8.650184781731623, 4.704347386069197, 5.123572047200224, 5.060284590763604, 8.86375358939186, 4.976946822668712, 5.816360044893379, 6.794860539551898, 7.747769633058984), # 103
(7.704519926045208, 6.598028302137263, 7.537761796982167, 8.907336580783683, 8.634499314128943, 4.692654534369761, 5.099913514925861, 5.041677549154093, 8.846124599908551, 4.958502569730225, 5.792461007738201, 6.774525641951243, 7.732214934842251), # 104
(7.680032206119162, 6.562544802867383, 7.5219907407407405, 8.883061594202898, 8.618736383442267, 4.681069958847737, 5.076263097831727, 5.023456790123458, 8.82854938271605, 4.940014524328251, 5.768740031897927, 6.754126055880443, 7.716608796296296), # 105
(7.655578839386891, 6.527137767157839, 7.5060962277091905, 8.858718974771874, 8.602915355442589, 4.669617070568511, 5.052629279969876, 5.005631092821217, 8.811043301326016, 4.921483099599236, 5.745231708901884, 6.733671022549515, 7.700971793552812), # 106
(7.631196469255085, 6.491823762113369, 7.490081550068588, 8.83432546967257, 8.587055595900912, 4.65831928059747, 5.0290205453923695, 4.988209236396892, 8.793621719250115, 4.9029087086796315, 5.721970630279402, 6.713169783168484, 7.685324502743484), # 107
(7.606921739130435, 6.456619354838711, 7.473950000000001, 8.809897826086958, 8.571176470588235, 4.647200000000001, 5.0054453781512604, 4.9712000000000005, 8.7763, 4.884291764705883, 5.698991387559809, 6.69263157894737, 7.669687500000001), # 108
(7.582791292419635, 6.421541112438604, 7.4577048696845, 8.785452791196994, 8.55529734527556, 4.636282639841488, 4.98191226229861, 4.954612162780065, 8.759093507087334, 4.865632680814438, 5.676328572272432, 6.67206565109619, 7.654081361454047), # 109
(7.558841772529373, 6.38660560201779, 7.441349451303157, 8.761007112184648, 8.539437585733884, 4.625590611187319, 4.9584296818864715, 4.938454503886603, 8.742017604023777, 4.846931870141747, 5.654016775946601, 6.651481240824971, 7.638526663237312), # 110
(7.535109822866345, 6.351829390681004, 7.424887037037038, 8.736577536231884, 8.523616557734206, 4.615147325102881, 4.935006120966905, 4.922735802469136, 8.725087654320989, 4.828189745824256, 5.632090590111643, 6.630887589343731, 7.623043981481482), # 111
(7.51163208683724, 6.317229045532987, 7.408320919067217, 8.712180810520666, 8.507853627047528, 4.6049761926535595, 4.911650063591967, 4.907464837677184, 8.708319021490626, 4.809406720998413, 5.610584606296888, 6.6102939378624885, 7.607653892318244), # 112
(7.488403378962436, 6.282878895028762, 7.391694262601655, 8.687867105993632, 8.492140544138964, 4.595095815371611, 4.888420770925416, 4.892682055024485, 8.691770249006897, 4.790643789290184, 5.589539124922293, 6.589754349203543, 7.592355120674577), # 113
(7.465184718320052, 6.249117746820429, 7.375236540017295, 8.663831537021869, 8.476314683653062, 4.585483686823921, 4.865614566728464, 4.878569007604096, 8.675695228570449, 4.772252134330226, 5.568995469690558, 6.56952973769038, 7.577020331328028), # 114
(7.441907922403196, 6.215957758946438, 7.358957546165854, 8.640067604145424, 8.460326142310882, 4.576114809999011, 4.84324772015325, 4.865122123422967, 8.660099982935032, 4.754260262390462, 5.548923609141675, 6.549630066047081, 7.561605305328301), # 115
(7.418543898590108, 6.183350625033362, 7.342825751987099, 8.616532920213123, 8.444150821107023, 4.566967101829678, 4.821283854022315, 4.852304250319195, 8.644945071382265, 4.736634686759638, 5.529284745017185, 6.530018557989877, 7.546085807804713), # 116
(7.395063554259018, 6.151248038707777, 7.326809628420789, 8.593185098073794, 8.427764621036088, 4.558018479248712, 4.799686591158202, 4.840078236130868, 8.630191053193762, 4.719341920726503, 5.510040079058626, 6.5106584372350005, 7.53043760388658), # 117
(7.371437796788169, 6.119601693596259, 7.310877646406694, 8.569981750576266, 8.411143443092675, 4.549246859188911, 4.7784195543834524, 4.828406928696078, 8.615798487651148, 4.7023484775798075, 5.49115081300754, 6.49151292749868, 7.51463645870322), # 118
(7.347637533555794, 6.088363283325384, 7.294998276884579, 8.546880490569364, 8.394263188271378, 4.540630158583066, 4.757446366520605, 4.817253175852916, 8.601727934036035, 4.685620870608298, 5.4725781486054625, 6.472545252497148, 7.498658137383946), # 119
(7.323633671940129, 6.057484501521727, 7.27913999079421, 8.523838930901915, 8.377099757566798, 4.532146294363972, 4.736730650392203, 4.806579825439474, 8.587939951630046, 4.669125613100724, 5.454283287593933, 6.453718635946638, 7.482478405058078), # 120
(7.299397119319415, 6.026917041811863, 7.26327125907535, 8.500814684422748, 8.359629051973535, 4.523773183464424, 4.716236028820784, 4.796349725293846, 8.574395099714799, 4.652829218345837, 5.436227431714493, 6.434996301563378, 7.466073026854929), # 121
(7.274898783071883, 5.996612597822369, 7.247360552667769, 8.477765363980685, 8.341826972486187, 4.515488742817215, 4.695926124628894, 4.786525723254119, 8.561053937571911, 4.636698199632382, 5.4183717827086815, 6.416341473063601, 7.4494177679038165), # 122
(7.250109570575775, 5.9665228631798195, 7.231376342511229, 8.454648582424555, 8.323669420099353, 4.50727088935514, 4.675764560639071, 4.7770706671583865, 8.547877024483004, 4.62069907024911, 5.400677542318036, 6.397717374163538, 7.432488393334058), # 123
(7.225000389209324, 5.93659953151079, 7.215287099545496, 8.43142195260319, 8.30513229580763, 4.499097540010991, 4.655714959673856, 4.767947404844741, 8.534824919729692, 4.604798343484769, 5.383105912284096, 6.3790872285794205, 7.4152606682749695), # 124
(7.199542146350767, 5.9067942964418565, 7.199061294710339, 8.408043087365408, 8.286191500605618, 4.490946611717565, 4.635740944555791, 4.759118784151273, 8.521858182593595, 4.588962532628107, 5.3656180943484015, 6.360414260027479, 7.397710357855863), # 125
(7.1737057493783425, 5.877058851599596, 7.182667398945519, 8.384469599560044, 8.266822935487914, 4.482796021407654, 4.615806138107416, 4.750547652916074, 8.508937372356334, 4.573158150967874, 5.348175290252491, 6.341661692223948, 7.379813227206063), # 126
(7.147462105670289, 5.84734489061058, 7.166073883190804, 8.36065910203592, 8.247002501449119, 4.474623686014052, 4.595874163151275, 4.742196858977237, 8.496023048299525, 4.557351711792819, 5.3307387017379035, 6.322792748885053, 7.361545041454879), # 127
(7.120782122604837, 5.817604107101388, 7.14924921838596, 8.336569207641865, 8.226706099483833, 4.466407522469555, 4.575908642509906, 4.73402925017285, 8.483075769704788, 4.5415097283916905, 5.3132695305461795, 6.303770653727031, 7.34288156573163), # 128
(7.093636707560226, 5.787788194698593, 7.132161875470752, 8.312157529226706, 8.20590963058665, 4.458125447706956, 4.555873199005851, 4.726007674341008, 8.47005609585374, 4.5255987140532365, 5.2957289784188575, 6.284558630466109, 7.323798565165631), # 129
(7.065996767914694, 5.757848847028773, 7.1147803253849435, 8.28738167963927, 8.18458899575217, 4.449755378659047, 4.53573145546165, 4.7180949793198, 8.456924586028, 4.509585182066206, 5.278078247097476, 6.2651199028185225, 7.3042718048861985), # 130
(7.037833211046475, 5.727737757718502, 7.097073039068305, 8.262199271728381, 8.162720095974995, 4.441275232258625, 4.515447034699847, 4.71025401294732, 8.443641799509189, 4.493435645719348, 5.260278538323575, 6.2454176945004996, 7.2842770500226495), # 131
(7.009116944333808, 5.697406620394355, 7.079008487460597, 8.23656791834287, 8.140278832249724, 4.432662925438482, 4.49498355954298, 4.7024476230616585, 8.430168295578923, 4.4771166183014115, 5.2422910538386915, 6.225415229228274, 7.263790065704301), # 132
(6.979818875154931, 5.666807128682908, 7.060555141501587, 8.210445232331562, 8.11724110557095, 4.423896375131413, 4.474304652813592, 4.694638657500906, 8.416464633518821, 4.460594613101146, 5.224076995384369, 6.205075730718074, 7.242786617060469), # 133
(6.949909910888076, 5.635890976210739, 7.041681472131043, 8.183788826543283, 8.093582816933274, 4.414953498270212, 4.453373937334223, 4.686789964103155, 8.402491372610504, 4.443836143407299, 5.205597564702143, 6.184362422686133, 7.221242469220467), # 134
(6.919360958911483, 5.604609856604419, 7.022355950288727, 8.156556313826863, 8.069279867331296, 4.405812211787674, 4.432155035927415, 4.678864390706496, 8.388209072135584, 4.426807722508621, 5.186813963533554, 6.163238528848682, 7.199133387313616), # 135
(6.888142926603388, 5.572915463490528, 7.002547046914407, 8.128705307031124, 8.044308157759614, 4.396450432616592, 4.410611571415708, 4.670824785149022, 8.373578291375685, 4.409475863693858, 5.167687393620142, 6.1416672729219535, 7.176435136469229), # 136
(6.856226721342027, 5.540759490495638, 6.982223232947849, 8.100193419004901, 8.018643589212827, 4.386846077689759, 4.388707166621645, 4.662633995268823, 8.358559589612426, 4.391807080251762, 5.1481790567034444, 6.119611878622176, 7.153123481816621), # 137
(6.823583250505639, 5.508093631246327, 6.961352979328814, 8.070978262597011, 7.992262062685535, 4.376977063939971, 4.366405444367763, 4.654254868903992, 8.343113526127425, 4.373767885471078, 5.128250154525002, 6.097035569665582, 7.129174188485113), # 138
(6.790183421472455, 5.4748695793691695, 6.939904756997072, 8.041017450656287, 7.965139479172333, 4.366821308300021, 4.343670027476608, 4.64565025389262, 8.327200660202298, 4.355324792640558, 5.107861888826353, 6.073901569768405, 7.104563021604015), # 139
(6.755998141620719, 5.44103902849074, 6.91784703689239, 8.010268596031556, 7.937251739667824, 4.356356727702703, 4.320464538770717, 4.636782998072797, 8.310781551118666, 4.336444315048949, 5.086975461349035, 6.050173102646873, 7.079265746302652), # 140
(6.720998318328665, 5.406553672237617, 6.895148289954529, 7.978689311571642, 7.908574745166603, 4.345561239080812, 4.296752601072636, 4.6276159492826165, 8.293816758158144, 4.317092965985001, 5.065552073834591, 6.02581339201722, 7.053258127710331), # 141
(6.685154858974525, 5.371365204236373, 6.871776987123257, 7.946237210125377, 7.87908439666327, 4.334412759367142, 4.272497837204901, 4.6181119553601695, 8.276266840602354, 4.2972372587374625, 5.043552928024558, 6.000785661595676, 7.026515930956373), # 142
(6.64843867093654, 5.335425318113585, 6.8477015993383406, 7.91286990454158, 7.848756595152423, 4.322889205494485, 4.247663869990055, 4.608233864143545, 8.258092357732918, 4.276843706595082, 5.020939225660475, 5.975053135098472, 6.999014921170094), # 143
(6.610820661592948, 5.298685707495829, 6.822890597539542, 7.878545007669086, 7.817567241628663, 4.310968494395637, 4.222214322250639, 4.597944523470839, 8.239253868831447, 4.255878822846608, 4.997672168483881, 5.948579036241839, 6.970730863480812), # 144
(6.572271738321982, 5.26109806600968, 6.797312452666631, 7.843220132356716, 7.785492237086586, 4.298628543003392, 4.196112816809195, 4.587206781180141, 8.219711933179564, 4.23430912078079, 4.973712958236316, 5.921326588742011, 6.94163952301784), # 145
(6.5327628085018805, 5.2226140872817135, 6.770935635659374, 7.806852891453301, 7.7525074825207945, 4.285847268250545, 4.169322976488264, 4.575983485109542, 8.199427110058885, 4.212101113686376, 4.949022796659319, 5.893259016315216, 6.911716664910495), # 146
(6.49226477951088, 5.1831854649385045, 6.743728617457528, 7.769400897807664, 7.718588878925882, 4.272602587069886, 4.141808424110385, 4.564237483097132, 8.178359958751033, 4.189221314852117, 4.923562885494429, 5.864339542677689, 6.8809380542880945), # 147
(6.450748558727217, 5.142763892606631, 6.715659869000866, 7.730821764268637, 7.683712327296449, 4.258872416394214, 4.113532782498101, 4.551931622981006, 8.156471038537623, 4.1656362375667575, 4.897294426483186, 5.8345313915456565, 6.8492794562799535), # 148
(6.40818505352913, 5.101301063912665, 6.686697861229155, 7.691073103685042, 7.647853728627097, 4.24463467315632, 4.084459674473953, 4.539028752599253, 8.13372090870027, 4.1413123951190505, 4.870178621367128, 5.803797786635354, 6.81671663601539), # 149
(6.364545171294852, 5.058748672483183, 6.656811065082156, 7.65011252890571, 7.610988983912421, 4.229867274288999, 4.054552722860481, 4.525491719789965, 8.110070128520602, 4.116216300797741, 4.8421766718877945, 5.772101951663011, 6.783225358623717), # 150
(6.31979981940262, 5.015058411944763, 6.625967951499634, 7.607897652779464, 7.573093994147022, 4.214548136725044, 4.023775550480226, 4.511283372391235, 8.085479257280232, 4.090314467891583, 4.813249779786724, 5.739407110344858, 6.748781389234255), # 151
(6.273919905230675, 4.970181975923978, 6.594136991421362, 7.5643860881551355, 7.534144660325495, 4.198655177397251, 3.992091780155732, 4.496366558241153, 8.059908854260776, 4.06357340968932, 4.7833591468054575, 5.705676486397127, 6.713360492976318), # 152
(6.226876336157249, 4.924071058047406, 6.561286655787095, 7.519535447881546, 7.4941168834424445, 4.182166313238413, 3.9594650347095355, 4.48070412517781, 8.03331947874386, 4.035959639479703, 4.752465974685533, 5.670873303536052, 6.676938434979222), # 153
(6.178640019560583, 4.87667735194162, 6.527385415536607, 7.473303344807528, 7.452986564492464, 4.165059461181324, 3.9258589369641825, 4.464258921039298, 8.005671690011093, 4.0074396705514825, 4.72053146516849, 5.63496078547786, 6.639490980372286), # 154
(6.129181862818909, 4.827952551233196, 6.492401741609661, 7.425647391781903, 7.410729604470157, 4.147312538158777, 3.891237109742209, 4.446993793663709, 7.976926047344103, 3.9779800161934036, 4.687516819995866, 5.597902155938786, 6.600993894284821), # 155
(6.078472773310465, 4.7778483495487105, 6.456304104946021, 7.3765252016535, 7.367321904370119, 4.128903461103569, 3.85556317586616, 4.428871590889135, 7.947043110024501, 3.9475471896942183, 4.6533832409092035, 5.559660638635059, 6.561422941846148), # 156
(6.02648365841349, 4.726316440514739, 6.419060976485454, 7.32589438727115, 7.322739365186948, 4.109810146948491, 3.8188007581585754, 4.409855160553666, 7.915983437333911, 3.9161077043426733, 4.618091929650039, 5.52019945728291, 6.520753888185581), # 157
(5.971744757124192, 4.672362496617807, 6.378873563121885, 7.271815665320995, 7.274944884696798, 4.088819581053688, 3.780085376742286, 4.388637561879498, 7.881329673279279, 3.882692733032915, 4.580476602031154, 5.478079651355472, 6.477188687532276), # 158
(5.9058294135827225, 4.610452255679582, 6.32539025472239, 7.203181727030763, 7.212153047825303, 4.058951718405683, 3.734570210708573, 4.357770826211506, 7.829141808977716, 3.8418247952789963, 4.533933548495195, 5.425090018946487, 6.420342117536156), # 159
(5.827897675923448, 4.540077382832571, 6.257536766364711, 7.118862008327088, 7.133136105077437, 4.019473036838147, 3.6817949987070273, 4.316479351621878, 7.757940181782921, 3.792964521490315, 4.477807606887632, 5.360401559110278, 6.349136487114865), # 160
(5.738577643668768, 4.461696694464375, 6.1760375775282474, 7.019658003005382, 7.038714499425691, 3.970861793256251, 3.622145156805501, 4.265280426487824, 7.668663813599214, 3.7365265545367503, 4.412593323679766, 5.284613975126057, 6.264299235855278), # 161
(5.638497416341085, 4.375769006962591, 6.0816171676923965, 6.9063712048610615, 6.929708673842564, 3.9135962445651646, 3.5560061010718473, 4.204691339186562, 7.56225172633091, 3.6729255372881853, 4.338785245342897, 5.198326970273035, 6.166557803344267), # 162
(5.528285093462799, 4.2827531367148195, 5.975000016336562, 6.779803107689547, 6.806939071300551, 3.848154647670058, 3.4837632475739206, 4.1352293780953, 7.439642941882325, 3.6025761126145, 4.2568779183483265, 5.102140247830427, 6.0566396291687035), # 163
(5.408568774556308, 4.183107900108657, 5.856910602940141, 6.640755205286254, 6.6712261347721515, 3.7750152594761035, 3.405802012379573, 4.0574118315912555, 7.301776482157779, 3.525892923385575, 4.167365889167357, 4.996653511077443, 5.935272152915463), # 164
(5.279976559144014, 4.077292113531706, 5.728073406982535, 6.490028991446602, 6.523390307229859, 3.6946563368884693, 3.3225078115566578, 3.971755988051637, 7.149591369061584, 3.4432906124712908, 4.0707437042712895, 4.882466463293296, 5.803182814171416), # 165
(5.143136546748318, 3.9657645933715635, 5.589212907943143, 6.328425959966001, 6.3642520316461715, 3.607556136812327, 3.234266061173029, 3.878779135853662, 6.984026624498059, 3.35518382274153, 3.9675059101314236, 4.760178807757201, 5.661099052523436), # 166
(4.998676836891619, 3.8489841560158298, 5.441053585301364, 6.156747604639875, 6.194631750993584, 3.514192916152847, 3.14146217729654, 3.7789985633745413, 6.80602127037152, 3.2619871970661714, 3.858147053219062, 4.630390247748367, 5.509748307558397), # 167
(4.847225529096317, 3.727409617852103, 5.284319918536599, 5.975795419263637, 6.015349908244594, 3.415044931815199, 3.0444815759950434, 3.672931558991488, 6.616514328586284, 3.1641153783150977, 3.743161680005505, 4.493700486546009, 5.34985801886317), # 168
(4.689410722884812, 3.6014997952679835, 5.119736387128247, 5.786370897632707, 5.827226946371696, 3.310590440704556, 2.9437096733363934, 3.561095411081716, 6.416444821046671, 3.0619830093581895, 3.623044336962055, 4.350709227429338, 5.182155626024628), # 169
(4.525860517779507, 3.47171350465107, 4.948027470555708, 5.589275533542496, 5.631083308347387, 3.2013076997260854, 2.8395318853884426, 3.444007408022438, 6.206751769656991, 2.9560047330653263, 3.498289570560013, 4.202016173677567, 5.007368568629644), # 170
(4.3572030133028, 3.3385095623889605, 4.7699176482983825, 5.385310820788429, 5.427739437144165, 3.087674965784959, 2.7323336282190445, 3.3221848381908665, 5.9883741963215655, 2.846595192306391, 3.3693919272706787, 4.048221028569909, 4.826224286265092), # 171
(4.184066308977092, 3.2023467848692557, 4.586131399835669, 5.175278253165917, 5.218015775734523, 2.970170495786347, 2.6225003178960526, 3.1961449899642167, 5.762251122944709, 2.734169029951264, 3.2368459535653553, 3.889923495385577, 4.639450218517843), # 172
(4.007078504324784, 3.063683988479554, 4.39739320464697, 4.959979324470381, 5.002732767090961, 2.84927254663542, 2.51041737048732, 3.066405151719699, 5.529321571430739, 2.6191408888698255, 3.1011461959153426, 3.72772327740378, 4.44777380497477), # 173
(3.8268676988682753, 2.9229799896074544, 4.204427542211682, 4.740215528497233, 4.782710854185973, 2.725459375237348, 2.3964702020607005, 2.9334826118345285, 5.290524563683971, 2.5019254119319574, 2.9627872007919422, 3.5622200779037345, 4.251922485222747), # 174
(3.6440619921299646, 2.7806936046405557, 4.007958892009206, 4.516788359041894, 4.558770479992055, 2.599209238497303, 2.2810442286840464, 2.797894658685917, 5.046799121608725, 2.3829372420075394, 2.8222635146664556, 3.3940136001646515, 4.052623698848646), # 175
(3.459289483632255, 2.6372836499664585, 3.8087117335189427, 4.29049930989978, 4.331732087481704, 2.4710003933204536, 2.164524866425212, 2.6601585806510792, 4.799084267109314, 2.2625910219664536, 2.680069684010184, 3.2237035474657434, 3.8506048854393393), # 176
(3.273178272897546, 2.493208941972761, 3.607410546220291, 4.062149874866306, 4.102416119627419, 2.3413110966119706, 2.0472975313520503, 2.5207916661072263, 4.548319022090056, 2.1413013946785795, 2.536700255294429, 3.051889623086223, 3.6465934845817), # 177
(3.0863564594482376, 2.348928297047063, 3.404779809592651, 3.832541547736893, 3.871643019401691, 2.210619605277026, 1.929747639532414, 2.3803112034315723, 4.295442408455268, 2.0194830030138, 2.39264977499049, 2.879171530305302, 3.4413169358626017), # 178
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 179
)
passenger_arriving_acc = (
(6, 3, 0, 2, 2, 0, 3, 2, 3, 0, 1, 0, 0, 4, 3, 5, 0, 5, 1, 3, 0, 3, 0, 2, 0, 0), # 0
(7, 7, 0, 4, 9, 2, 3, 3, 4, 1, 1, 0, 0, 10, 10, 6, 2, 8, 4, 4, 0, 5, 0, 3, 0, 0), # 1
(10, 10, 2, 10, 11, 2, 6, 3, 5, 2, 1, 0, 0, 18, 13, 9, 3, 11, 8, 5, 3, 6, 0, 3, 0, 0), # 2
(16, 14, 4, 14, 14, 6, 8, 5, 7, 2, 2, 0, 0, 20, 17, 10, 5, 14, 10, 8, 6, 9, 1, 3, 0, 0), # 3
(22, 17, 6, 23, 17, 8, 10, 7, 8, 3, 3, 1, 0, 27, 25, 11, 9, 17, 17, 9, 9, 11, 1, 4, 0, 0), # 4
(29, 21, 10, 28, 21, 11, 15, 7, 10, 3, 4, 2, 0, 35, 27, 15, 10, 19, 19, 13, 10, 11, 3, 5, 0, 0), # 5
(36, 26, 15, 31, 25, 13, 17, 10, 11, 3, 5, 4, 0, 39, 32, 18, 14, 28, 22, 16, 12, 12, 7, 6, 0, 0), # 6
(38, 33, 18, 33, 29, 13, 18, 13, 13, 5, 5, 4, 0, 45, 36, 24, 18, 35, 25, 18, 13, 15, 8, 6, 1, 0), # 7
(47, 36, 24, 37, 33, 19, 19, 18, 15, 8, 5, 4, 0, 55, 41, 28, 23, 40, 31, 20, 16, 19, 8, 7, 1, 0), # 8
(51, 39, 27, 39, 39, 22, 23, 21, 18, 10, 7, 5, 0, 65, 48, 32, 28, 47, 33, 22, 20, 20, 9, 7, 3, 0), # 9
(59, 46, 30, 46, 44, 22, 26, 23, 20, 10, 7, 5, 0, 69, 57, 40, 32, 53, 37, 24, 22, 22, 11, 9, 6, 0), # 10
(66, 58, 35, 52, 46, 25, 28, 25, 23, 12, 8, 5, 0, 77, 64, 47, 37, 60, 40, 26, 22, 25, 13, 9, 6, 0), # 11
(72, 63, 44, 60, 56, 30, 30, 29, 27, 13, 8, 5, 0, 85, 73, 53, 41, 67, 41, 31, 24, 28, 16, 9, 7, 0), # 12
(75, 71, 54, 67, 58, 31, 32, 31, 31, 18, 11, 5, 0, 92, 77, 56, 43, 69, 49, 33, 25, 31, 21, 9, 7, 0), # 13
(85, 78, 62, 76, 67, 33, 34, 36, 34, 19, 15, 7, 0, 105, 82, 62, 50, 80, 52, 36, 28, 34, 22, 11, 7, 0), # 14
(93, 85, 69, 83, 72, 36, 36, 37, 37, 20, 16, 7, 0, 109, 85, 71, 52, 86, 56, 42, 31, 35, 23, 14, 8, 0), # 15
(104, 93, 76, 90, 77, 38, 41, 39, 41, 23, 16, 7, 0, 116, 88, 78, 64, 93, 61, 44, 33, 37, 23, 15, 8, 0), # 16
(115, 99, 84, 96, 85, 40, 43, 43, 44, 24, 17, 8, 0, 123, 94, 81, 69, 99, 66, 45, 37, 41, 26, 16, 10, 0), # 17
(124, 106, 90, 102, 93, 43, 46, 46, 48, 25, 17, 8, 0, 132, 101, 87, 75, 107, 68, 49, 37, 49, 29, 17, 12, 0), # 18
(131, 111, 98, 113, 95, 48, 50, 47, 49, 25, 17, 9, 0, 140, 106, 94, 84, 116, 76, 52, 39, 53, 33, 17, 13, 0), # 19
(138, 124, 101, 119, 100, 51, 51, 51, 53, 26, 18, 9, 0, 144, 120, 103, 87, 121, 83, 54, 42, 59, 35, 19, 13, 0), # 20
(142, 134, 108, 121, 109, 52, 54, 51, 55, 28, 18, 9, 0, 156, 130, 109, 92, 126, 87, 56, 43, 61, 39, 21, 14, 0), # 21
(149, 141, 118, 125, 118, 55, 58, 52, 64, 30, 18, 10, 0, 162, 139, 116, 95, 135, 89, 62, 43, 65, 42, 23, 14, 0), # 22
(160, 150, 125, 131, 125, 58, 59, 53, 67, 32, 19, 11, 0, 167, 150, 119, 98, 139, 90, 64, 44, 68, 43, 25, 15, 0), # 23
(167, 160, 133, 143, 130, 58, 61, 57, 72, 34, 21, 12, 0, 174, 156, 124, 104, 144, 95, 67, 44, 72, 45, 26, 15, 0), # 24
(178, 172, 139, 149, 137, 60, 62, 62, 75, 36, 23, 12, 0, 189, 167, 131, 111, 152, 98, 70, 45, 77, 47, 26, 15, 0), # 25
(184, 184, 144, 155, 144, 61, 66, 66, 79, 39, 24, 13, 0, 197, 172, 136, 116, 158, 100, 76, 47, 81, 52, 27, 15, 0), # 26
(192, 187, 151, 166, 152, 64, 67, 74, 87, 40, 26, 13, 0, 202, 180, 146, 121, 168, 106, 80, 50, 82, 53, 29, 15, 0), # 27
(193, 196, 160, 173, 158, 66, 73, 75, 92, 41, 26, 13, 0, 209, 185, 148, 126, 177, 111, 82, 51, 85, 57, 29, 15, 0), # 28
(199, 202, 165, 178, 164, 67, 74, 77, 98, 44, 26, 13, 0, 221, 191, 153, 129, 180, 112, 85, 53, 86, 58, 33, 16, 0), # 29
(209, 210, 174, 184, 170, 68, 79, 79, 102, 47, 27, 14, 0, 230, 195, 156, 134, 185, 115, 86, 55, 89, 60, 33, 16, 0), # 30
(220, 221, 178, 194, 176, 73, 85, 79, 103, 47, 27, 14, 0, 239, 199, 162, 139, 191, 118, 89, 57, 93, 64, 35, 17, 0), # 31
(223, 228, 188, 202, 180, 74, 88, 87, 104, 51, 30, 14, 0, 245, 208, 166, 144, 200, 121, 92, 59, 97, 66, 37, 18, 0), # 32
(226, 239, 191, 206, 184, 76, 93, 90, 111, 51, 30, 14, 0, 252, 217, 170, 148, 203, 123, 98, 63, 101, 69, 38, 19, 0), # 33
(230, 247, 197, 212, 191, 79, 96, 90, 114, 52, 30, 16, 0, 261, 222, 172, 154, 209, 128, 100, 66, 103, 71, 38, 19, 0), # 34
(241, 252, 205, 215, 194, 83, 96, 95, 115, 53, 32, 16, 0, 269, 232, 177, 156, 213, 134, 105, 66, 107, 72, 41, 19, 0), # 35
(245, 261, 209, 225, 201, 86, 100, 99, 120, 55, 32, 17, 0, 275, 246, 182, 166, 216, 139, 109, 69, 110, 75, 41, 20, 0), # 36
(252, 271, 217, 234, 208, 89, 106, 100, 126, 56, 34, 19, 0, 284, 249, 184, 173, 228, 142, 112, 69, 113, 76, 42, 20, 0), # 37
(257, 276, 229, 240, 215, 92, 112, 102, 128, 56, 35, 19, 0, 292, 257, 189, 176, 232, 143, 115, 72, 119, 77, 43, 20, 0), # 38
(262, 282, 240, 245, 219, 94, 117, 103, 131, 56, 36, 19, 0, 299, 267, 203, 181, 242, 150, 117, 76, 121, 79, 45, 21, 0), # 39
(273, 291, 249, 249, 225, 97, 118, 106, 134, 57, 38, 20, 0, 307, 276, 207, 186, 248, 154, 119, 79, 121, 82, 47, 22, 0), # 40
(281, 298, 256, 253, 235, 102, 123, 106, 136, 57, 41, 22, 0, 314, 280, 213, 189, 255, 163, 122, 79, 128, 85, 48, 22, 0), # 41
(288, 307, 269, 261, 240, 103, 123, 111, 138, 59, 41, 22, 0, 326, 288, 219, 195, 262, 168, 125, 84, 133, 90, 48, 22, 0), # 42
(296, 310, 278, 270, 247, 106, 126, 113, 143, 60, 41, 23, 0, 334, 292, 227, 200, 268, 171, 129, 85, 137, 91, 50, 23, 0), # 43
(310, 316, 282, 276, 253, 108, 127, 117, 147, 62, 41, 24, 0, 343, 295, 230, 205, 275, 174, 132, 86, 139, 94, 51, 24, 0), # 44
(315, 326, 288, 282, 263, 112, 130, 121, 149, 62, 43, 24, 0, 352, 303, 232, 210, 281, 180, 135, 88, 145, 100, 52, 25, 0), # 45
(317, 332, 299, 288, 268, 115, 131, 124, 150, 65, 44, 26, 0, 359, 309, 236, 213, 286, 185, 139, 92, 146, 101, 52, 26, 0), # 46
(323, 337, 305, 296, 276, 118, 134, 128, 156, 67, 44, 26, 0, 367, 319, 246, 215, 294, 189, 147, 93, 147, 104, 53, 26, 0), # 47
(332, 343, 310, 306, 282, 122, 141, 129, 161, 69, 45, 26, 0, 378, 328, 251, 219, 296, 197, 150, 95, 150, 105, 54, 27, 0), # 48
(341, 353, 316, 317, 290, 123, 142, 131, 163, 69, 46, 26, 0, 385, 335, 258, 224, 300, 199, 153, 95, 151, 107, 55, 27, 0), # 49
(353, 362, 323, 325, 297, 126, 143, 137, 167, 70, 46, 27, 0, 388, 347, 264, 228, 310, 202, 155, 97, 154, 113, 56, 27, 0), # 50
(363, 371, 332, 335, 301, 127, 148, 139, 171, 72, 46, 27, 0, 394, 358, 273, 229, 317, 204, 157, 100, 157, 118, 56, 28, 0), # 51
(368, 378, 336, 342, 312, 131, 154, 142, 175, 73, 46, 27, 0, 403, 367, 279, 235, 324, 205, 162, 103, 160, 121, 59, 30, 0), # 52
(373, 386, 340, 349, 322, 134, 158, 145, 179, 74, 46, 28, 0, 410, 371, 282, 239, 330, 207, 163, 105, 164, 124, 59, 30, 0), # 53
(379, 392, 350, 354, 327, 136, 159, 146, 182, 75, 49, 30, 0, 420, 374, 285, 243, 333, 213, 166, 106, 167, 128, 60, 30, 0), # 54
(391, 402, 356, 361, 333, 139, 163, 147, 184, 76, 50, 32, 0, 425, 380, 291, 243, 336, 220, 169, 108, 172, 130, 65, 30, 0), # 55
(398, 406, 365, 369, 339, 141, 164, 148, 185, 78, 51, 34, 0, 436, 387, 297, 251, 343, 222, 173, 111, 178, 131, 69, 33, 0), # 56
(406, 410, 372, 375, 349, 142, 167, 151, 186, 78, 52, 34, 0, 447, 390, 300, 258, 356, 229, 174, 113, 183, 133, 70, 33, 0), # 57
(414, 419, 375, 385, 352, 147, 170, 156, 186, 79, 52, 34, 0, 453, 396, 305, 261, 360, 235, 177, 117, 186, 134, 70, 35, 0), # 58
(422, 424, 383, 395, 358, 151, 170, 156, 191, 80, 53, 34, 0, 458, 407, 311, 264, 365, 235, 177, 119, 188, 135, 71, 36, 0), # 59
(428, 434, 392, 405, 365, 153, 175, 159, 192, 81, 54, 36, 0, 465, 417, 315, 272, 373, 235, 181, 122, 191, 136, 72, 36, 0), # 60
(435, 442, 405, 414, 377, 153, 176, 163, 193, 84, 55, 36, 0, 474, 419, 321, 276, 379, 237, 183, 125, 197, 139, 73, 38, 0), # 61
(440, 450, 411, 420, 384, 154, 180, 165, 198, 85, 55, 38, 0, 478, 424, 329, 279, 384, 240, 184, 126, 198, 144, 75, 38, 0), # 62
(450, 457, 419, 430, 388, 157, 184, 169, 203, 86, 55, 38, 0, 482, 429, 335, 285, 389, 244, 186, 129, 200, 147, 75, 38, 0), # 63
(458, 467, 426, 441, 393, 159, 187, 171, 204, 86, 56, 38, 0, 489, 436, 338, 294, 391, 249, 188, 129, 203, 149, 77, 38, 0), # 64
(466, 477, 428, 451, 397, 163, 188, 175, 206, 86, 56, 39, 0, 497, 441, 342, 296, 402, 251, 192, 131, 210, 154, 80, 40, 0), # 65
(472, 481, 442, 464, 405, 169, 190, 178, 210, 88, 56, 39, 0, 506, 450, 355, 303, 405, 253, 196, 133, 213, 159, 81, 41, 0), # 66
(482, 486, 448, 474, 415, 172, 191, 180, 211, 89, 56, 39, 0, 509, 451, 358, 304, 409, 256, 198, 137, 217, 159, 84, 42, 0), # 67
(489, 496, 458, 480, 421, 175, 193, 181, 212, 91, 56, 40, 0, 522, 457, 361, 308, 417, 257, 202, 137, 222, 159, 85, 44, 0), # 68
(501, 506, 462, 484, 424, 176, 198, 189, 215, 92, 56, 41, 0, 528, 460, 364, 314, 423, 260, 205, 138, 225, 160, 86, 45, 0), # 69
(505, 514, 465, 490, 431, 178, 201, 193, 215, 94, 56, 42, 0, 534, 464, 371, 316, 427, 261, 207, 141, 227, 165, 87, 46, 0), # 70
(515, 520, 469, 498, 436, 184, 206, 194, 218, 96, 57, 44, 0, 541, 470, 375, 321, 434, 262, 207, 146, 231, 169, 89, 47, 0), # 71
(520, 533, 477, 506, 442, 187, 209, 195, 224, 98, 58, 45, 0, 547, 478, 380, 323, 440, 264, 209, 147, 238, 173, 90, 47, 0), # 72
(526, 541, 490, 513, 451, 188, 211, 201, 229, 98, 59, 46, 0, 550, 482, 388, 331, 449, 266, 212, 151, 240, 174, 92, 47, 0), # 73
(531, 549, 494, 519, 459, 191, 215, 202, 232, 99, 59, 46, 0, 559, 485, 393, 332, 452, 271, 216, 153, 244, 177, 93, 48, 0), # 74
(539, 555, 502, 528, 466, 195, 215, 204, 235, 103, 60, 46, 0, 566, 492, 396, 335, 458, 276, 218, 156, 249, 179, 95, 49, 0), # 75
(543, 561, 511, 534, 472, 197, 217, 206, 238, 106, 60, 47, 0, 570, 502, 400, 340, 464, 280, 221, 158, 250, 181, 96, 50, 0), # 76
(548, 568, 520, 541, 478, 201, 222, 206, 239, 107, 61, 47, 0, 577, 507, 408, 346, 468, 284, 226, 160, 253, 182, 97, 50, 0), # 77
(556, 576, 524, 547, 480, 204, 223, 207, 242, 109, 61, 47, 0, 589, 516, 411, 350, 473, 288, 228, 164, 256, 185, 98, 50, 0), # 78
(565, 585, 531, 557, 492, 208, 228, 211, 244, 109, 61, 47, 0, 597, 523, 421, 355, 482, 289, 233, 165, 260, 188, 99, 51, 0), # 79
(576, 592, 536, 560, 501, 210, 232, 213, 247, 110, 62, 47, 0, 602, 532, 424, 357, 489, 292, 235, 166, 262, 193, 99, 51, 0), # 80
(586, 599, 537, 563, 508, 211, 234, 214, 251, 110, 66, 47, 0, 606, 536, 427, 360, 496, 295, 236, 166, 265, 196, 100, 52, 0), # 81
(590, 607, 542, 569, 513, 214, 237, 218, 255, 111, 66, 48, 0, 614, 543, 435, 363, 503, 298, 237, 169, 266, 197, 101, 52, 0), # 82
(597, 613, 547, 574, 519, 218, 240, 218, 256, 113, 67, 48, 0, 619, 549, 441, 365, 507, 301, 241, 171, 268, 198, 102, 53, 0), # 83
(606, 619, 551, 583, 523, 220, 243, 221, 258, 114, 67, 49, 0, 629, 558, 446, 369, 512, 308, 242, 174, 269, 199, 103, 55, 0), # 84
(613, 624, 556, 587, 530, 222, 245, 222, 259, 116, 70, 49, 0, 635, 562, 451, 372, 516, 313, 244, 180, 270, 201, 103, 56, 0), # 85
(623, 628, 562, 589, 535, 227, 247, 223, 262, 117, 70, 49, 0, 638, 567, 454, 379, 519, 315, 250, 181, 274, 204, 106, 57, 0), # 86
(628, 635, 575, 595, 539, 231, 251, 226, 263, 119, 70, 50, 0, 644, 574, 457, 382, 527, 318, 253, 185, 280, 205, 106, 57, 0), # 87
(640, 640, 581, 599, 543, 235, 255, 227, 267, 122, 70, 51, 0, 658, 577, 462, 393, 529, 321, 255, 187, 283, 207, 108, 57, 0), # 88
(643, 643, 589, 603, 548, 236, 258, 229, 273, 123, 71, 52, 0, 666, 586, 467, 398, 537, 326, 257, 190, 285, 208, 109, 57, 0), # 89
(651, 647, 598, 613, 552, 241, 261, 230, 278, 126, 72, 53, 0, 672, 592, 470, 400, 541, 328, 261, 195, 290, 209, 110, 59, 0), # 90
(661, 657, 603, 620, 560, 246, 263, 231, 282, 127, 74, 53, 0, 683, 600, 475, 405, 547, 329, 265, 200, 294, 212, 112, 60, 0), # 91
(668, 664, 609, 626, 566, 246, 266, 232, 285, 130, 75, 54, 0, 693, 607, 477, 411, 550, 330, 270, 202, 298, 213, 112, 61, 0), # 92
(675, 674, 615, 630, 572, 248, 267, 237, 287, 131, 75, 54, 0, 701, 611, 479, 414, 554, 333, 271, 204, 302, 213, 113, 61, 0), # 93
(680, 680, 623, 639, 582, 251, 270, 239, 293, 133, 75, 54, 0, 711, 617, 485, 418, 561, 334, 277, 205, 305, 218, 114, 62, 0), # 94
(691, 689, 628, 649, 590, 254, 270, 239, 297, 135, 76, 55, 0, 720, 620, 491, 419, 567, 336, 279, 207, 310, 220, 115, 62, 0), # 95
(699, 695, 635, 653, 604, 256, 271, 240, 298, 137, 77, 55, 0, 727, 626, 497, 421, 576, 341, 279, 209, 314, 221, 115, 62, 0), # 96
(711, 701, 650, 658, 609, 260, 274, 244, 303, 137, 81, 55, 0, 732, 637, 503, 428, 584, 341, 280, 211, 314, 224, 116, 63, 0), # 97
(718, 706, 654, 664, 618, 264, 275, 246, 305, 141, 82, 55, 0, 744, 645, 504, 429, 591, 342, 282, 212, 318, 226, 118, 64, 0), # 98
(728, 712, 658, 665, 621, 267, 277, 253, 308, 143, 82, 57, 0, 756, 651, 511, 432, 597, 345, 283, 214, 320, 229, 119, 64, 0), # 99
(732, 717, 662, 675, 627, 269, 278, 259, 310, 143, 86, 57, 0, 766, 659, 517, 439, 602, 347, 288, 215, 324, 238, 120, 64, 0), # 100
(739, 722, 669, 682, 636, 271, 279, 260, 314, 145, 88, 57, 0, 772, 667, 520, 441, 607, 349, 290, 215, 327, 238, 121, 64, 0), # 101
(749, 731, 670, 686, 641, 272, 281, 262, 315, 145, 89, 58, 0, 782, 673, 530, 449, 610, 353, 292, 216, 331, 239, 121, 64, 0), # 102
(758, 735, 674, 690, 645, 276, 285, 264, 317, 146, 91, 58, 0, 792, 685, 534, 453, 615, 357, 294, 217, 335, 240, 122, 64, 0), # 103
(764, 742, 680, 695, 650, 280, 290, 265, 323, 147, 91, 59, 0, 795, 692, 540, 454, 620, 361, 297, 219, 340, 243, 123, 64, 0), # 104
(773, 749, 686, 701, 656, 284, 292, 267, 329, 151, 94, 59, 0, 805, 699, 543, 456, 632, 367, 299, 222, 343, 244, 125, 65, 0), # 105
(782, 758, 691, 704, 660, 287, 294, 267, 334, 152, 95, 60, 0, 813, 701, 550, 459, 642, 370, 302, 223, 346, 247, 126, 65, 0), # 106
(792, 762, 697, 709, 666, 292, 297, 269, 337, 153, 96, 60, 0, 820, 707, 555, 461, 650, 374, 306, 223, 349, 248, 126, 66, 0), # 107
(800, 768, 703, 715, 670, 294, 299, 271, 342, 154, 98, 61, 0, 825, 713, 562, 463, 654, 377, 309, 225, 350, 249, 126, 67, 0), # 108
(805, 773, 715, 724, 675, 295, 301, 274, 345, 155, 100, 62, 0, 833, 720, 567, 467, 664, 378, 314, 227, 357, 254, 128, 67, 0), # 109
(815, 778, 719, 728, 678, 296, 305, 277, 346, 156, 101, 63, 0, 838, 725, 572, 469, 670, 384, 317, 233, 359, 259, 129, 69, 0), # 110
(827, 781, 723, 734, 684, 299, 310, 279, 348, 157, 103, 64, 0, 846, 731, 576, 472, 673, 387, 318, 233, 362, 260, 134, 69, 0), # 111
(835, 786, 727, 743, 687, 302, 312, 281, 351, 159, 103, 65, 0, 853, 738, 580, 472, 679, 389, 321, 234, 365, 260, 136, 69, 0), # 112
(844, 796, 731, 747, 695, 306, 314, 284, 356, 159, 103, 66, 0, 861, 743, 589, 476, 682, 392, 323, 236, 366, 261, 138, 69, 0), # 113
(853, 805, 736, 754, 698, 310, 316, 286, 360, 159, 104, 66, 0, 865, 743, 592, 478, 689, 394, 324, 240, 369, 261, 139, 72, 0), # 114
(859, 810, 741, 761, 704, 310, 319, 288, 364, 160, 108, 67, 0, 872, 747, 596, 481, 698, 396, 327, 243, 371, 262, 143, 73, 0), # 115
(867, 818, 747, 770, 709, 312, 319, 290, 370, 160, 109, 68, 0, 880, 756, 605, 482, 705, 397, 329, 246, 376, 265, 145, 74, 0), # 116
(877, 824, 751, 774, 716, 312, 321, 292, 371, 161, 109, 69, 0, 886, 762, 611, 483, 710, 399, 332, 247, 380, 265, 147, 74, 0), # 117
(882, 828, 755, 780, 721, 314, 325, 297, 375, 162, 109, 69, 0, 891, 766, 617, 487, 714, 401, 334, 248, 384, 267, 149, 75, 0), # 118
(889, 833, 758, 788, 724, 318, 326, 297, 377, 162, 111, 70, 0, 900, 769, 622, 491, 718, 403, 336, 251, 385, 271, 150, 75, 0), # 119
(894, 841, 763, 792, 730, 322, 327, 298, 381, 162, 111, 71, 0, 912, 776, 627, 494, 725, 406, 338, 251, 390, 271, 151, 75, 0), # 120
(906, 846, 773, 798, 737, 325, 330, 299, 386, 162, 111, 71, 0, 924, 787, 628, 498, 731, 408, 338, 252, 394, 274, 151, 75, 0), # 121
(913, 853, 782, 803, 739, 333, 335, 300, 387, 162, 113, 72, 0, 933, 793, 632, 501, 734, 409, 340, 252, 399, 274, 151, 77, 0), # 122
(930, 857, 787, 813, 744, 336, 338, 301, 391, 163, 114, 73, 0, 941, 800, 634, 505, 739, 413, 341, 254, 402, 279, 152, 78, 0), # 123
(936, 860, 792, 823, 750, 340, 342, 302, 393, 163, 114, 73, 0, 952, 805, 637, 509, 753, 416, 345, 259, 404, 282, 153, 79, 0), # 124
(947, 866, 793, 830, 753, 344, 343, 303, 396, 163, 116, 73, 0, 959, 814, 642, 512, 757, 418, 346, 264, 406, 286, 156, 81, 0), # 125
(957, 872, 800, 838, 761, 349, 344, 306, 397, 167, 117, 73, 0, 966, 824, 647, 517, 764, 419, 348, 266, 409, 290, 157, 82, 0), # 126
(965, 877, 811, 846, 766, 351, 345, 307, 398, 168, 119, 73, 0, 973, 826, 650, 523, 770, 422, 351, 267, 412, 292, 158, 82, 0), # 127
(971, 889, 817, 855, 770, 353, 348, 309, 399, 169, 121, 74, 0, 982, 828, 653, 525, 774, 423, 352, 267, 413, 295, 158, 83, 0), # 128
(983, 893, 821, 860, 776, 355, 349, 310, 402, 172, 121, 75, 0, 995, 831, 660, 527, 777, 427, 353, 267, 416, 295, 159, 85, 0), # 129
(985, 897, 825, 869, 780, 358, 353, 312, 404, 172, 121, 75, 0, 1001, 836, 664, 531, 780, 430, 357, 267, 416, 297, 161, 85, 0), # 130
(991, 902, 833, 875, 784, 360, 356, 312, 407, 172, 121, 75, 0, 1008, 839, 671, 536, 784, 433, 357, 268, 418, 297, 163, 85, 0), # 131
(999, 911, 837, 878, 790, 361, 358, 313, 408, 174, 122, 75, 0, 1016, 849, 674, 541, 786, 436, 359, 269, 419, 299, 165, 85, 0), # 132
(1003, 917, 846, 885, 793, 362, 363, 318, 409, 174, 122, 75, 0, 1021, 854, 677, 549, 790, 442, 361, 271, 424, 303, 167, 87, 0), # 133
(1011, 920, 849, 891, 800, 363, 367, 320, 409, 174, 122, 75, 0, 1027, 859, 680, 555, 797, 445, 365, 273, 429, 304, 167, 87, 0), # 134
(1017, 926, 856, 894, 810, 363, 369, 321, 410, 176, 122, 75, 0, 1038, 861, 682, 560, 799, 445, 369, 275, 431, 305, 168, 87, 0), # 135
(1020, 930, 861, 899, 814, 365, 371, 324, 412, 177, 122, 75, 0, 1045, 866, 685, 563, 807, 451, 370, 276, 437, 308, 168, 88, 0), # 136
(1028, 932, 865, 902, 815, 365, 373, 325, 414, 180, 122, 77, 0, 1048, 873, 688, 567, 814, 452, 370, 276, 439, 310, 168, 88, 0), # 137
(1037, 934, 870, 908, 825, 367, 373, 327, 415, 181, 124, 77, 0, 1059, 876, 695, 571, 819, 454, 372, 279, 439, 311, 169, 88, 0), # 138
(1043, 940, 878, 916, 834, 369, 374, 329, 418, 182, 124, 78, 0, 1067, 882, 701, 578, 821, 455, 375, 281, 444, 313, 171, 88, 0), # 139
(1046, 944, 885, 921, 836, 373, 379, 332, 422, 182, 125, 79, 0, 1077, 887, 707, 587, 827, 460, 378, 281, 446, 315, 171, 88, 0), # 140
(1053, 951, 894, 925, 837, 374, 382, 334, 424, 183, 125, 79, 0, 1079, 892, 713, 594, 828, 463, 379, 281, 450, 317, 172, 89, 0), # 141
(1058, 953, 897, 934, 841, 378, 384, 335, 428, 185, 126, 79, 0, 1084, 901, 720, 596, 837, 469, 380, 282, 452, 320, 174, 89, 0), # 142
(1065, 961, 904, 937, 846, 380, 384, 336, 429, 186, 126, 79, 0, 1090, 904, 726, 598, 847, 471, 383, 285, 458, 325, 175, 90, 0), # 143
(1073, 965, 907, 942, 852, 385, 385, 339, 431, 186, 127, 79, 0, 1100, 908, 729, 602, 856, 476, 387, 287, 461, 325, 176, 90, 0), # 144
(1082, 970, 916, 949, 857, 391, 385, 343, 434, 188, 127, 79, 0, 1106, 917, 733, 603, 857, 479, 389, 289, 463, 327, 178, 92, 0), # 145
(1092, 977, 922, 957, 860, 394, 387, 346, 440, 189, 127, 79, 0, 1109, 924, 734, 605, 864, 480, 391, 290, 464, 330, 178, 92, 0), # 146
(1095, 985, 927, 969, 863, 396, 389, 350, 442, 189, 127, 80, 0, 1114, 932, 735, 607, 868, 485, 392, 291, 469, 332, 178, 92, 0), # 147
(1104, 988, 930, 973, 867, 396, 390, 354, 448, 193, 127, 81, 0, 1121, 940, 740, 611, 873, 485, 396, 292, 472, 333, 178, 92, 0), # 148
(1110, 994, 936, 977, 874, 397, 392, 355, 451, 196, 129, 81, 0, 1126, 944, 743, 612, 880, 489, 398, 294, 476, 335, 179, 94, 0), # 149
(1115, 1000, 941, 987, 875, 399, 395, 356, 454, 197, 129, 82, 0, 1130, 956, 747, 614, 886, 489, 399, 298, 478, 340, 179, 95, 0), # 150
(1124, 1005, 944, 991, 878, 400, 397, 360, 455, 199, 130, 82, 0, 1135, 960, 752, 619, 889, 491, 400, 301, 481, 342, 179, 96, 0), # 151
(1131, 1007, 951, 996, 880, 403, 402, 362, 457, 200, 131, 84, 0, 1144, 967, 755, 620, 895, 492, 401, 303, 482, 344, 179, 96, 0), # 152
(1141, 1009, 955, 999, 884, 405, 403, 364, 458, 200, 132, 84, 0, 1155, 975, 757, 622, 903, 493, 402, 304, 483, 344, 179, 97, 0), # 153
(1147, 1011, 959, 1005, 892, 405, 406, 366, 460, 202, 133, 84, 0, 1168, 983, 759, 624, 909, 494, 405, 307, 484, 347, 182, 97, 0), # 154
(1159, 1017, 965, 1012, 895, 407, 409, 367, 467, 205, 135, 85, 0, 1176, 987, 764, 628, 912, 495, 407, 309, 487, 348, 183, 98, 0), # 155
(1164, 1020, 970, 1017, 904, 408, 411, 368, 467, 205, 138, 86, 0, 1181, 990, 767, 631, 919, 498, 408, 313, 489, 350, 186, 99, 0), # 156
(1166, 1023, 974, 1023, 912, 415, 412, 370, 473, 206, 138, 86, 0, 1189, 994, 772, 637, 923, 504, 410, 313, 489, 353, 187, 99, 0), # 157
(1176, 1028, 978, 1030, 918, 415, 412, 371, 475, 207, 138, 86, 0, 1193, 1000, 775, 640, 926, 510, 413, 314, 494, 355, 189, 99, 0), # 158
(1182, 1032, 988, 1034, 922, 416, 415, 371, 475, 208, 138, 87, 0, 1200, 1007, 785, 642, 929, 514, 414, 317, 499, 356, 190, 99, 0), # 159
(1186, 1036, 993, 1042, 932, 417, 415, 372, 476, 209, 139, 89, 0, 1207, 1009, 788, 644, 934, 516, 417, 317, 500, 358, 190, 99, 0), # 160
(1187, 1038, 996, 1047, 939, 418, 419, 375, 478, 212, 140, 89, 0, 1221, 1019, 797, 647, 940, 516, 420, 320, 506, 358, 190, 99, 0), # 161
(1191, 1045, 1002, 1050, 945, 421, 420, 378, 481, 214, 140, 89, 0, 1227, 1019, 803, 647, 949, 519, 421, 323, 511, 359, 190, 99, 0), # 162
(1202, 1052, 1007, 1054, 949, 422, 421, 379, 486, 214, 141, 89, 0, 1234, 1025, 806, 650, 953, 522, 421, 325, 512, 360, 191, 99, 0), # 163
(1207, 1053, 1009, 1063, 955, 424, 423, 381, 487, 216, 141, 90, 0, 1238, 1031, 810, 653, 957, 527, 422, 327, 513, 362, 192, 99, 0), # 164
(1216, 1059, 1012, 1066, 958, 425, 425, 383, 488, 216, 142, 91, 0, 1243, 1033, 814, 653, 964, 534, 429, 327, 514, 362, 192, 100, 0), # 165
(1219, 1062, 1014, 1068, 960, 428, 426, 385, 489, 216, 142, 93, 0, 1248, 1036, 816, 655, 970, 534, 429, 328, 515, 364, 195, 101, 0), # 166
(1230, 1065, 1016, 1074, 967, 431, 428, 386, 490, 216, 142, 93, 0, 1252, 1041, 816, 655, 976, 537, 430, 331, 521, 364, 195, 101, 0), # 167
(1232, 1067, 1024, 1076, 968, 434, 429, 386, 492, 217, 143, 93, 0, 1259, 1044, 817, 658, 978, 538, 431, 331, 523, 365, 196, 101, 0), # 168
(1241, 1070, 1027, 1079, 974, 436, 431, 391, 495, 217, 143, 93, 0, 1262, 1046, 821, 662, 981, 539, 433, 332, 528, 366, 199, 102, 0), # 169
(1248, 1072, 1030, 1085, 977, 436, 431, 392, 498, 217, 144, 93, 0, 1268, 1047, 823, 664, 988, 543, 436, 332, 528, 367, 200, 102, 0), # 170
(1254, 1078, 1033, 1089, 981, 438, 432, 396, 499, 217, 145, 93, 0, 1272, 1052, 826, 665, 994, 547, 438, 333, 529, 368, 201, 102, 0), # 171
(1258, 1082, 1036, 1091, 985, 440, 432, 396, 500, 217, 145, 94, 0, 1276, 1059, 829, 668, 997, 549, 440, 334, 530, 370, 202, 102, 0), # 172
(1262, 1083, 1038, 1093, 988, 443, 433, 399, 502, 217, 145, 94, 0, 1276, 1062, 829, 668, 1000, 549, 442, 334, 532, 371, 202, 102, 0), # 173
(1266, 1084, 1040, 1098, 989, 444, 434, 401, 504, 217, 145, 95, 0, 1284, 1070, 831, 670, 1002, 551, 443, 336, 533, 373, 204, 103, 0), # 174
(1267, 1084, 1040, 1104, 991, 448, 434, 402, 505, 217, 145, 95, 0, 1288, 1076, 833, 671, 1005, 554, 443, 338, 533, 374, 204, 104, 0), # 175
(1271, 1084, 1045, 1104, 995, 449, 435, 403, 507, 219, 145, 95, 0, 1289, 1077, 836, 675, 1006, 555, 445, 338, 534, 375, 204, 105, 0), # 176
(1275, 1091, 1050, 1108, 998, 450, 435, 403, 508, 219, 145, 96, 0, 1291, 1080, 840, 677, 1007, 556, 445, 338, 535, 380, 205, 105, 0), # 177
(1281, 1095, 1051, 1112, 1000, 450, 436, 404, 509, 220, 145, 96, 0, 1296, 1083, 843, 679, 1011, 558, 446, 338, 536, 380, 206, 105, 0), # 178
(1281, 1095, 1051, 1112, 1000, 450, 436, 404, 509, 220, 145, 96, 0, 1296, 1083, 843, 679, 1011, 558, 446, 338, 536, 380, 206, 105, 0), # 179
)
passenger_arriving_rate = (
(4.0166924626974145, 4.051878277108322, 3.4741888197416713, 3.72880066431806, 2.962498990725126, 1.4647056349507583, 1.6584142461495661, 1.5510587243264744, 1.6240264165781353, 0.7916030031044742, 0.5607020218514138, 0.32652767188707826, 0.0, 4.067104170062691, 3.5918043907578605, 2.803510109257069, 2.374809009313422, 3.2480528331562706, 2.171482214057064, 1.6584142461495661, 1.0462183106791132, 1.481249495362563, 1.2429335547726867, 0.6948377639483343, 0.36835257064621113, 0.0), # 0
(4.283461721615979, 4.319377842372822, 3.703564394220102, 3.97508655196597, 3.1586615133195926, 1.561459005886526, 1.7677875765054776, 1.6531712409685695, 1.7312654203554425, 0.8437961384554302, 0.5977461514608177, 0.34808111072095704, 0.0, 4.3358333179518835, 3.8288922179305267, 2.9887307573040878, 2.53138841536629, 3.462530840710885, 2.3144397373559973, 1.7677875765054776, 1.1153278613475186, 1.5793307566597963, 1.3250288506553236, 0.7407128788440204, 0.39267071294298395, 0.0), # 1
(4.549378407183785, 4.585815791986718, 3.9320281903649423, 4.220392622798877, 3.3541135859998636, 1.6578263867724743, 1.8767274031842818, 1.7548750826348067, 1.838076481834013, 0.8957827550041094, 0.6346430865035085, 0.3695488434702037, 0.0, 4.603491862567752, 4.06503727817224, 3.173215432517542, 2.6873482650123277, 3.676152963668026, 2.4568251156887295, 1.8767274031842818, 1.1841617048374817, 1.6770567929999318, 1.4067975409329592, 0.7864056380729886, 0.41689234472606534, 0.0), # 2
(4.81340623451725, 4.850135034753395, 4.1586739128799035, 4.463745844519244, 3.548086227201014, 1.7534256238730528, 1.9848014566591823, 1.8557670524981693, 1.9440360429122914, 0.9473565396852364, 0.6712464549103178, 0.3908457123286974, 0.0, 4.869018245003381, 4.299302835615671, 3.356232274551589, 2.8420696190557084, 3.8880720858245827, 2.598073873497437, 1.9848014566591823, 1.2524468741950376, 1.774043113600507, 1.487915281506415, 0.8317347825759807, 0.4409213667957632, 0.0), # 3
(5.074508918732786, 5.111278479476234, 4.382595266468691, 4.704173184829542, 3.7398104553581293, 1.8478745634527118, 2.0915774674033836, 1.9554439537316386, 2.048720545488722, 0.998311179433536, 0.7074098846120768, 0.41188655949031766, 0.0, 5.131350906351854, 4.530752154393493, 3.5370494230603833, 2.9949335383006073, 4.097441090977444, 2.737621535224294, 2.0915774674033836, 1.3199104024662227, 1.8699052276790646, 1.5680577282765145, 0.8765190532937384, 0.46466167995238505, 0.0), # 4
(5.331650174946809, 5.368189034958631, 4.602885955835013, 4.940701611432236, 3.9285172889062823, 1.9407910517759004, 2.1966231658900894, 2.0535025895081978, 2.151706431461749, 1.048440361183733, 0.7429870035396177, 0.43258622714894324, 0.0, 5.389428287706262, 4.758448498638375, 3.7149350176980884, 3.145321083551198, 4.303412862923498, 2.8749036253114766, 2.1966231658900894, 1.3862793226970715, 1.9642586444531411, 1.6469005371440792, 0.9205771911670025, 0.48801718499623925, 0.0), # 5
(5.583793718275733, 5.619809610003967, 4.8186396856825775, 5.172358092029792, 4.113437746280557, 2.03179293510707, 2.299506282592505, 2.1495397630008295, 2.2525701427298173, 1.097537771870552, 0.777831439623771, 0.45285955749845397, 0.0, 5.642188830159686, 4.981455132482993, 3.889157198118855, 3.2926133156116553, 4.5051402854596345, 3.0093556682011613, 2.299506282592505, 1.4512806679336214, 2.0567188731402783, 1.724119364009931, 0.9637279371365156, 0.5108917827276335, 0.0), # 6
(5.829903263835975, 5.86508311341563, 5.02895016071509, 5.398169594324678, 4.293802845916028, 2.1204980597106697, 2.399794547983834, 2.2431522773825177, 2.350888121191372, 1.1453970984287176, 0.8117968207953693, 0.47262139273272863, 0.0, 5.888570974805216, 5.198835320060014, 4.058984103976846, 3.436191295286152, 4.701776242382744, 3.1404131883355246, 2.399794547983834, 1.514641471221907, 2.146901422958014, 1.799389864774893, 1.0057900321430182, 0.5331893739468755, 0.0), # 7
(6.068942526743948, 6.102952453997006, 5.232911085636264, 5.617163086019357, 4.468843606247779, 2.2065242718511486, 2.497055692537279, 2.333936935826242, 2.446236808744855, 1.1918120277929551, 0.8447367749852429, 0.49178657504564693, 0.0, 6.127513162735934, 5.409652325502115, 4.223683874926214, 3.5754360833788645, 4.89247361748971, 3.2675117101567386, 2.497055692537279, 1.5760887656079634, 2.2344218031238894, 1.872387695339786, 1.046582217127253, 0.5548138594542734, 0.0), # 8
(6.299875222116068, 6.332360540551483, 5.429616165149803, 5.828365534816301, 4.637791045710885, 2.2894894177929594, 2.590857446726048, 2.421490541504988, 2.538192647288713, 1.2365762468979886, 0.8765049301242238, 0.5102699466310877, 0.0, 6.35795383504493, 5.612969412941963, 4.382524650621119, 3.709728740693965, 5.076385294577426, 3.390086758106983, 2.590857446726048, 1.635349584137828, 2.3188955228554424, 1.9427885116054342, 1.0859232330299606, 0.5756691400501349, 0.0), # 9
(6.5216650650687455, 6.552250281882444, 5.6181591039594165, 6.0308039084179725, 4.799876182740427, 2.3690113438005502, 2.680767541023342, 2.505409897591737, 2.6263320787213904, 1.279483442678543, 0.9069549141431433, 0.5279863496829302, 0.0, 6.578831432825289, 5.807849846512232, 4.534774570715716, 3.838450328035629, 5.252664157442781, 3.5075738566284325, 2.680767541023342, 1.6921509598575357, 2.3999380913702133, 2.010267969472658, 1.1236318207918834, 0.5956591165347678, 0.0), # 10
(6.7332757707184046, 6.761564586793285, 5.797633606768811, 6.223505174526839, 4.954330035771484, 2.444707896138372, 2.7663537059023664, 2.585291807259472, 2.7102315449413314, 1.320327302069344, 0.9359403549728333, 0.5448506263950541, 0.0, 6.78908439717009, 5.993356890345594, 4.679701774864166, 3.9609819062080316, 5.420463089882663, 3.619408530163261, 2.7663537059023664, 1.7462199258131228, 2.477165017885742, 2.07450172484228, 1.1595267213537623, 0.6146876897084805, 0.0), # 11
(6.93367105418145, 6.959246364087378, 5.9671333782816935, 6.405496300845368, 5.100383623239134, 2.516196921070873, 2.8471836718363246, 2.6607330736811736, 2.789467487846981, 1.3589015120051147, 0.9633148805441247, 0.5607776189613379, 0.0, 6.987651169172428, 6.168553808574717, 4.816574402720623, 4.0767045360153435, 5.578934975693962, 3.7250263031536432, 2.8471836718363246, 1.7972835150506232, 2.550191811619567, 2.135165433615123, 1.1934266756563388, 0.63265876037158, 0.0), # 12
(7.121814630574301, 7.144238522568122, 6.125752123201774, 6.575804255076027, 5.237267963578454, 2.5830962648625047, 2.9228251692984224, 2.731330500029827, 2.863616349336782, 1.3949997594205812, 0.9889321187878493, 0.5756821695756614, 0.0, 7.173470189925388, 6.332503865332275, 4.944660593939246, 4.184999278261743, 5.727232698673564, 3.8238627000417584, 2.9228251692984224, 1.8450687606160747, 2.618633981789227, 2.1919347516920094, 1.225150424640355, 0.6494762293243748, 0.0), # 13
(7.296670215013373, 7.315483971038899, 6.272583546232765, 6.733456004921276, 5.3642140752245275, 2.6450237737777162, 2.9928459287618647, 2.7966808894784156, 2.932254571309179, 1.428415731250467, 1.0126456976348381, 0.5894791204319041, 0.0, 7.345479900522051, 6.484270324750944, 5.06322848817419, 4.285247193751401, 5.864509142618358, 3.9153532452697823, 2.9928459287618647, 1.8893026955555114, 2.6821070376122638, 2.244485334973759, 1.254516709246553, 0.6650439973671727, 0.0), # 14
(7.457201522615084, 7.471925618303093, 6.406721352078362, 6.877478518083592, 5.480452976612431, 2.701597294080959, 3.0568136806998503, 2.8563810451999188, 2.9949585956626184, 1.4589431144294984, 1.0343092450159228, 0.6020833137239449, 0.0, 7.502618742055505, 6.622916450963392, 5.171546225079613, 4.376829343288494, 5.989917191325237, 3.9989334632798865, 3.0568136806998503, 1.9297123529149707, 2.7402264883062153, 2.2924928393611976, 1.2813442704156726, 0.6792659653002813, 0.0), # 15
(7.602372268495841, 7.612506373164098, 6.527259245442284, 7.006898762265429, 5.585215686177244, 2.7524346720366815, 3.1142961555855906, 2.9100277703673205, 3.0513048642955427, 1.4863755958923994, 1.0537763888619351, 0.6134095916456628, 0.0, 7.643825155618837, 6.747505508102289, 5.268881944309675, 4.459126787677198, 6.102609728591085, 4.074038878514249, 3.1142961555855906, 1.9660247657404866, 2.792607843088622, 2.3356329207551436, 1.3054518490884568, 0.692046033924009, 0.0), # 16
(7.73114616777206, 7.736169144425294, 6.6332909310282355, 7.120743705169268, 5.677733222354047, 2.7971537539093334, 3.1648610838922844, 2.9572178681536063, 3.1008698191063955, 1.510506862573894, 1.0709007571037066, 0.6233727963909371, 0.0, 7.768037582305133, 6.857100760300307, 5.354503785518533, 4.531520587721681, 6.201739638212791, 4.140105015415049, 3.1648610838922844, 1.9979669670780953, 2.8388666111770235, 2.373581235056423, 1.3266581862056472, 0.7032881040386633, 0.0), # 17
(7.842486935560164, 7.841856840890068, 6.723910113539921, 7.218040314497568, 5.757236603577914, 2.8353723859633684, 3.2080761960931405, 2.9975481417317535, 3.1432299019936254, 1.5311306014087078, 1.085535977672068, 0.6318877701536477, 0.0, 7.874194463207477, 6.950765471690124, 5.427679888360339, 4.593391804226123, 6.286459803987251, 4.196567398424455, 3.2080761960931405, 2.0252659899738346, 2.878618301788957, 2.406013438165856, 1.344782022707984, 0.7128960764445517, 0.0), # 18
(7.935358286976559, 7.928512371361812, 6.798210497681052, 7.29781555795279, 5.822956848283928, 2.866708414463231, 3.2435092226613578, 3.030615394274749, 3.1779615548556746, 1.5480404993315662, 1.0975356784978507, 0.6388693551276732, 0.0, 7.961234239418957, 7.027562906404404, 5.4876783924892525, 4.644121497994697, 6.355923109711349, 4.242861551984649, 3.2435092226613578, 2.0476488674737365, 2.911478424141964, 2.4326051859842637, 1.3596420995362106, 0.720773851941983, 0.0), # 19
(8.008723937137665, 7.995078644643906, 6.855285788155336, 7.359096403237412, 5.874124974907169, 2.8907796856733756, 3.270727894070145, 3.0560164289555725, 3.2046412195909864, 1.5610302432771923, 1.106753487511887, 0.6442323935068929, 0.0, 8.02809535203266, 7.08655632857582, 5.533767437559434, 4.683090729831576, 6.409282439181973, 4.278423000537802, 3.270727894070145, 2.0648426326238396, 2.9370624874535847, 2.4530321344124713, 1.3710571576310673, 0.7268253313312643, 0.0), # 20
(8.061547601159893, 8.040498569539743, 6.89422968966648, 7.400909818053892, 5.909972001882714, 2.90720404585825, 3.289299940792704, 3.0733480489472083, 3.222845338098006, 1.5698935201803115, 1.113043032645008, 0.6478917274851863, 0.0, 8.073716242141662, 7.1268090023370485, 5.56521516322504, 4.709680560540933, 6.445690676196012, 4.302687268526092, 3.289299940792704, 2.0765743184701786, 2.954986000941357, 2.466969939351298, 1.378845937933296, 0.730954415412704, 0.0), # 21
(8.092792994159664, 8.063715054852706, 6.91413590691819, 7.422282770104703, 5.92972894764564, 2.915599341282305, 3.29879309330224, 3.0822070574226386, 3.2321503522751773, 1.574424016975649, 1.1162579418280456, 0.6497621992564327, 0.0, 8.097035350839063, 7.147384191820759, 5.581289709140227, 4.723272050926946, 6.464300704550355, 4.315089880391694, 3.29879309330224, 2.0825709580587892, 2.96486447382282, 2.474094256701568, 1.3828271813836381, 0.7330650049866098, 0.0), # 22
(8.104314690674112, 8.066463968907179, 6.916615454961135, 7.424958487654322, 5.9347904298840515, 2.916666666666667, 3.2999216009037355, 3.0831646090534983, 3.2333136625514407, 1.574958454503887, 1.1166610716215655, 0.6499931717725956, 0.0, 8.1, 7.149924889498552, 5.583305358107827, 4.72487536351166, 6.466627325102881, 4.316430452674898, 3.2999216009037355, 2.0833333333333335, 2.9673952149420257, 2.474986162551441, 1.3833230909922272, 0.7333149062642891, 0.0), # 23
(8.112809930427323, 8.06486049382716, 6.916209876543211, 7.4246291666666675, 5.937657393927921, 2.916666666666667, 3.299301525054467, 3.0818333333333334, 3.2331577777777776, 1.5746301234567905, 1.1166166105499442, 0.6499390946502058, 0.0, 8.1, 7.149330041152263, 5.583083052749721, 4.72389037037037, 6.466315555555555, 4.314566666666667, 3.299301525054467, 2.0833333333333335, 2.9688286969639606, 2.4748763888888896, 1.3832419753086422, 0.7331691358024692, 0.0), # 24
(8.121125784169264, 8.06169981710105, 6.915409236396892, 7.423977623456791, 5.940461304317068, 2.916666666666667, 3.298079561042524, 3.0792181069958855, 3.2328497942386836, 1.5739837677183361, 1.1165284532568485, 0.6498323426306966, 0.0, 8.1, 7.148155768937661, 5.5826422662842425, 4.7219513031550076, 6.465699588477367, 4.31090534979424, 3.298079561042524, 2.0833333333333335, 2.970230652158534, 2.474659207818931, 1.3830818472793784, 0.7328818015546411, 0.0), # 25
(8.129261615238427, 8.057030224051212, 6.914224508459078, 7.423011265432098, 5.943202063157923, 2.916666666666667, 3.2962746873234887, 3.0753683127572025, 3.23239366255144, 1.5730301417466854, 1.1163973978467807, 0.6496743789056548, 0.0, 8.1, 7.146418167962202, 5.581986989233903, 4.719090425240055, 6.46478732510288, 4.305515637860084, 3.2962746873234887, 2.0833333333333335, 2.9716010315789614, 2.4743370884773666, 1.3828449016918156, 0.732457293095565, 0.0), # 26
(8.13721678697331, 8.0509, 6.9126666666666665, 7.4217375, 5.945879572556914, 2.916666666666667, 3.2939058823529415, 3.0703333333333336, 3.231793333333333, 1.5717800000000004, 1.1162242424242426, 0.6494666666666669, 0.0, 8.1, 7.144133333333334, 5.581121212121213, 4.715339999999999, 6.463586666666666, 4.298466666666667, 3.2939058823529415, 2.0833333333333335, 2.972939786278457, 2.4739125000000004, 1.3825333333333334, 0.7319000000000001, 0.0), # 27
(8.1449906627124, 8.043357430269776, 6.910746684956561, 7.420163734567902, 5.948493734620481, 2.916666666666667, 3.2909921245864604, 3.06416255144033, 3.231052757201646, 1.570244096936443, 1.116009785093736, 0.6492106691053194, 0.0, 8.1, 7.141317360158513, 5.580048925468679, 4.710732290809328, 6.462105514403292, 4.289827572016462, 3.2909921245864604, 2.0833333333333335, 2.9742468673102405, 2.4733879115226345, 1.3821493369913125, 0.731214311842707, 0.0), # 28
(8.1525826057942, 8.0344508001829, 6.908475537265661, 7.41829737654321, 5.951044451455051, 2.916666666666667, 3.2875523924796264, 3.0569053497942384, 3.2301758847736624, 1.5684331870141752, 1.1157548239597623, 0.6489078494131992, 0.0, 8.1, 7.13798634354519, 5.578774119798812, 4.705299561042525, 6.460351769547325, 4.279667489711934, 3.2875523924796264, 2.0833333333333335, 2.9755222257275253, 2.4727657921810704, 1.3816951074531325, 0.7304046181984455, 0.0), # 29
(8.159991979557198, 8.02422839506173, 6.905864197530864, 7.416145833333333, 5.953531625167059, 2.916666666666667, 3.2836056644880176, 3.048611111111111, 3.2291666666666665, 1.5663580246913587, 1.115460157126824, 0.648559670781893, 0.0, 8.1, 7.134156378600823, 5.57730078563412, 4.699074074074074, 6.458333333333333, 4.268055555555556, 3.2836056644880176, 2.0833333333333335, 2.9767658125835297, 2.4720486111111115, 1.3811728395061729, 0.7294753086419755, 0.0), # 30
(8.167218147339886, 8.012738500228625, 6.902923639689073, 7.41371651234568, 5.955955157862938, 2.916666666666667, 3.279170919067216, 3.039329218106996, 3.2280290534979423, 1.5640293644261551, 1.1151265826994223, 0.6481675964029875, 0.0, 8.1, 7.129843560432862, 5.575632913497111, 4.692088093278464, 6.456058106995885, 4.2550609053497945, 3.279170919067216, 2.0833333333333335, 2.977977578931469, 2.4712388374485603, 1.3805847279378145, 0.7284307727480569, 0.0), # 31
(8.174260472480764, 8.000029401005945, 6.899664837677183, 7.411016820987655, 5.958314951649118, 2.916666666666667, 3.2742671346727996, 3.029109053497943, 3.226766995884774, 1.5614579606767267, 1.1147548987820595, 0.6477330894680691, 0.0, 8.1, 7.125063984148759, 5.573774493910297, 4.684373882030179, 6.453533991769548, 4.24075267489712, 3.2742671346727996, 2.0833333333333335, 2.979157475824559, 2.470338940329219, 1.3799329675354366, 0.7272754000914496, 0.0), # 32
(8.181118318318317, 7.986149382716048, 6.896098765432099, 7.408054166666666, 5.960610908632033, 2.916666666666667, 3.2689132897603486, 3.0180000000000002, 3.2253844444444444, 1.5586545679012351, 1.114345903479237, 0.6472576131687243, 0.0, 8.1, 7.119833744855966, 5.571729517396184, 4.6759637037037045, 6.450768888888889, 4.225200000000001, 3.2689132897603486, 2.0833333333333335, 2.9803054543160163, 2.469351388888889, 1.37921975308642, 0.7260135802469135, 0.0), # 33
(8.187791048191048, 7.971146730681298, 6.892236396890718, 7.404835956790124, 5.962842930918115, 2.916666666666667, 3.263128362785444, 3.006051440329218, 3.2238853497942395, 1.5556299405578424, 1.1139003948954567, 0.6467426306965403, 0.0, 8.1, 7.114168937661942, 5.569501974477284, 4.666889821673526, 6.447770699588479, 4.208472016460905, 3.263128362785444, 2.0833333333333335, 2.9814214654590576, 2.468278652263375, 1.3784472793781437, 0.724649702789209, 0.0), # 34
(8.194278025437447, 7.95506973022405, 6.888088705989941, 7.401369598765432, 5.965010920613797, 2.916666666666667, 3.2569313322036635, 2.9933127572016467, 3.2222736625514408, 1.5523948331047102, 1.1134191711352206, 0.6461896052431033, 0.0, 8.1, 7.108085657674136, 5.5670958556761025, 4.657184499314129, 6.4445473251028815, 4.1906378600823055, 3.2569313322036635, 2.0833333333333335, 2.9825054603068986, 2.4671231995884777, 1.3776177411979884, 0.7231881572930956, 0.0), # 35
(8.200578613396004, 7.937966666666665, 6.8836666666666675, 7.3976625, 5.967114779825512, 2.916666666666667, 3.250341176470588, 2.979833333333334, 3.220553333333333, 1.5489600000000006, 1.1129030303030305, 0.6456000000000002, 0.0, 8.1, 7.101600000000001, 5.564515151515152, 4.64688, 6.441106666666666, 4.1717666666666675, 3.250341176470588, 2.0833333333333335, 2.983557389912756, 2.4658875000000005, 1.3767333333333336, 0.7216333333333333, 0.0), # 36
(8.20669217540522, 7.919885825331503, 6.8789812528577965, 7.393722067901235, 5.969154410659692, 2.916666666666667, 3.2433768740417976, 2.9656625514403294, 3.218728312757202, 1.5453361957018754, 1.1123527705033882, 0.6449752781588174, 0.0, 8.1, 7.09472805974699, 5.561763852516941, 4.636008587105625, 6.437456625514404, 4.1519275720164615, 3.2433768740417976, 2.0833333333333335, 2.984577205329846, 2.4645740226337454, 1.3757962505715595, 0.7199896204846822, 0.0), # 37
(8.212618074803581, 7.9008754915409245, 6.874043438500229, 7.389555709876545, 5.971129715222768, 2.916666666666667, 3.2360574033728717, 2.9508497942386835, 3.2168025514403293, 1.5415341746684963, 1.111769189840795, 0.6443169029111417, 0.0, 8.1, 7.087485932022558, 5.558845949203975, 4.624602524005487, 6.433605102880659, 4.131189711934157, 3.2360574033728717, 2.0833333333333335, 2.985564857611384, 2.4631852366255154, 1.3748086877000458, 0.7182614083219023, 0.0), # 38
(8.218355674929589, 7.880983950617284, 6.868864197530866, 7.3851708333333335, 5.973040595621175, 2.916666666666667, 3.2284017429193903, 2.9354444444444447, 3.21478, 1.5375646913580252, 1.1111530864197532, 0.6436263374485597, 0.0, 8.1, 7.079889711934156, 5.555765432098766, 4.612694074074074, 6.42956, 4.109622222222223, 3.2284017429193903, 2.0833333333333335, 2.9865202978105874, 2.4617236111111116, 1.3737728395061732, 0.7164530864197532, 0.0), # 39
(8.22390433912173, 7.860259487882944, 6.863454503886603, 7.380574845679012, 5.974886953961343, 2.916666666666667, 3.2204288711369324, 2.9194958847736636, 3.212664609053498, 1.5334385002286244, 1.1105052583447648, 0.6429050449626583, 0.0, 8.1, 7.071955494589241, 5.552526291723823, 4.600315500685872, 6.425329218106996, 4.087294238683129, 3.2204288711369324, 2.0833333333333335, 2.9874434769806717, 2.460191615226338, 1.3726909007773205, 0.714569044352995, 0.0), # 40
(8.229263430718502, 7.838750388660264, 6.857825331504345, 7.375775154320989, 5.976668692349708, 2.916666666666667, 3.212157766481078, 2.903053497942387, 3.210460329218107, 1.529166355738455, 1.1098265037203312, 0.6421544886450238, 0.0, 8.1, 7.06369937509526, 5.549132518601655, 4.587499067215363, 6.420920658436214, 4.0642748971193425, 3.212157766481078, 2.0833333333333335, 2.988334346174854, 2.4585917181069967, 1.371565066300869, 0.7126136716963878, 0.0), # 41
(8.2344323130584, 7.816504938271606, 6.85198765432099, 7.370779166666668, 5.978385712892697, 2.916666666666667, 3.2036074074074072, 2.886166666666667, 3.2081711111111115, 1.5247590123456796, 1.1091176206509543, 0.641376131687243, 0.0, 8.1, 7.0551374485596705, 5.5455881032547705, 4.574277037037037, 6.416342222222223, 4.040633333333334, 3.2036074074074072, 2.0833333333333335, 2.9891928564463486, 2.4569263888888897, 1.370397530864198, 0.7105913580246915, 0.0), # 42
(8.239410349479915, 7.7935714220393235, 6.845952446273435, 7.3655942901234575, 5.980037917696748, 2.916666666666667, 3.1947967723715003, 2.868884773662552, 3.2058009053497942, 1.5202272245084596, 1.1083794072411357, 0.6405714372809025, 0.0, 8.1, 7.046285810089926, 5.541897036205678, 4.5606816735253775, 6.4116018106995885, 4.016438683127573, 3.1947967723715003, 2.0833333333333335, 2.990018958848374, 2.4551980967078197, 1.369190489254687, 0.7085064929126659, 0.0), # 43
(8.244196903321543, 7.769998125285779, 6.839730681298583, 7.360227932098766, 5.981625208868291, 2.916666666666667, 3.185744839828936, 2.8512572016460913, 3.2033536625514403, 1.515581746684957, 1.1076126615953779, 0.639741868617589, 0.0, 8.1, 7.037160554793477, 5.538063307976889, 4.54674524005487, 6.4067073251028805, 3.9917600823045283, 3.185744839828936, 2.0833333333333335, 2.9908126044341454, 2.4534093106995893, 1.3679461362597167, 0.7063634659350709, 0.0), # 44
(8.248791337921773, 7.745833333333334, 6.833333333333335, 7.354687500000001, 5.983147488513758, 2.916666666666667, 3.1764705882352944, 2.833333333333334, 3.2008333333333328, 1.510833333333334, 1.106818181818182, 0.638888888888889, 0.0, 8.1, 7.027777777777777, 5.534090909090909, 4.532500000000001, 6.4016666666666655, 3.9666666666666672, 3.1764705882352944, 2.0833333333333335, 2.991573744256879, 2.4515625000000005, 1.366666666666667, 0.7041666666666668, 0.0), # 45
(8.253193016619106, 7.721125331504343, 6.8267713763145865, 7.348980401234568, 5.984604658739582, 2.916666666666667, 3.1669929960461554, 2.81516255144033, 3.198243868312757, 1.5059927389117518, 1.10599676601405, 0.6380139612863894, 0.0, 8.1, 7.018153574150282, 5.5299838300702495, 4.517978216735254, 6.396487736625514, 3.941227572016462, 3.1669929960461554, 2.0833333333333335, 2.992302329369791, 2.4496601337448567, 1.3653542752629175, 0.7019204846822131, 0.0), # 46
(8.257401302752028, 7.695922405121171, 6.8200557841792415, 7.3431140432098765, 5.985996621652196, 2.916666666666667, 3.1573310417170988, 2.7967942386831277, 3.195589218106996, 1.5010707178783727, 1.105149212287484, 0.6371185490016767, 0.0, 8.1, 7.008304039018443, 5.525746061437419, 4.503212153635117, 6.391178436213992, 3.915511934156379, 3.1573310417170988, 2.0833333333333335, 2.992998310826098, 2.4477046810699594, 1.3640111568358484, 0.6996293095564702, 0.0), # 47
(8.261415559659037, 7.670272839506174, 6.8131975308641985, 7.3370958333333345, 5.987323279358032, 2.916666666666667, 3.1475037037037037, 2.7782777777777783, 3.1928733333333335, 1.4960780246913583, 1.1042763187429856, 0.6362041152263375, 0.0, 8.1, 6.998245267489711, 5.521381593714927, 4.488234074074074, 6.385746666666667, 3.88958888888889, 3.1475037037037037, 2.0833333333333335, 2.993661639679016, 2.445698611111112, 1.3626395061728398, 0.6972975308641977, 0.0), # 48
(8.26523515067863, 7.644224919981709, 6.806207590306356, 7.330933179012346, 5.9885845339635235, 2.916666666666667, 3.137529960461551, 2.7596625514403295, 3.190100164609053, 1.491025413808871, 1.1033788834850566, 0.6352721231519587, 0.0, 8.1, 6.987993354671545, 5.5168944174252825, 4.473076241426613, 6.380200329218106, 3.8635275720164617, 3.137529960461551, 2.0833333333333335, 2.9942922669817618, 2.443644393004116, 1.3612415180612714, 0.6949295381801555, 0.0), # 49
(8.268859439149294, 7.617826931870143, 6.799096936442616, 7.324633487654321, 5.989780287575101, 2.916666666666667, 3.12742879044622, 2.7409979423868314, 3.1872736625514397, 1.485923639689072, 1.1024577046181985, 0.6343240359701267, 0.0, 8.1, 6.977564395671393, 5.512288523090993, 4.457770919067215, 6.3745473251028795, 3.8373971193415644, 3.12742879044622, 2.0833333333333335, 2.9948901437875506, 2.441544495884774, 1.3598193872885234, 0.692529721079104, 0.0), # 50
(8.272287788409528, 7.591127160493827, 6.791876543209877, 7.318204166666668, 5.9909104422991994, 2.916666666666667, 3.11721917211329, 2.7223333333333333, 3.184397777777778, 1.4807834567901237, 1.1015135802469138, 0.6333613168724281, 0.0, 8.1, 6.966974485596708, 5.507567901234569, 4.44235037037037, 6.368795555555556, 3.811266666666667, 3.11721917211329, 2.0833333333333335, 2.9954552211495997, 2.4394013888888897, 1.3583753086419754, 0.6901024691358025, 0.0), # 51
(8.275519561797823, 7.564173891175126, 6.78455738454504, 7.311652623456791, 5.991974900242248, 2.916666666666667, 3.1069200839183413, 2.7037181069958844, 3.18147646090535, 1.4756156195701877, 1.1005473084757038, 0.6323854290504498, 0.0, 8.1, 6.956239719554947, 5.502736542378519, 4.4268468587105625, 6.3629529218107, 3.7852053497942384, 3.1069200839183413, 2.0833333333333335, 2.995987450121124, 2.437217541152264, 1.356911476909008, 0.6876521719250116, 0.0), # 52
(8.278554122652675, 7.537015409236398, 6.777150434385004, 7.304986265432099, 5.992973563510682, 2.916666666666667, 3.0965505043169532, 2.6852016460905355, 3.1785136625514405, 1.470430882487426, 1.0995596874090703, 0.6313978356957782, 0.0, 8.1, 6.945376192653559, 5.4977984370453505, 4.411292647462277, 6.357027325102881, 3.7592823045267494, 3.0965505043169532, 2.0833333333333335, 2.996486781755341, 2.4349954218107, 1.355430086877001, 0.6851832190214908, 0.0), # 53
(8.281390834312573, 7.5097000000000005, 6.769666666666667, 7.2982125, 5.993906334210934, 2.916666666666667, 3.086129411764706, 2.6668333333333334, 3.1755133333333334, 1.4652400000000003, 1.098551515151515, 0.6304000000000001, 0.0, 8.1, 6.9344, 5.492757575757575, 4.395720000000001, 6.351026666666667, 3.7335666666666665, 3.086129411764706, 2.0833333333333335, 2.996953167105467, 2.4327375000000004, 1.3539333333333334, 0.6827000000000002, 0.0), # 54
(8.284029060116017, 7.482275948788294, 6.762117055326932, 7.291338734567901, 5.994773114449434, 2.916666666666667, 3.075675784717179, 2.6486625514403292, 3.1724794238683125, 1.4600537265660727, 1.0975235898075406, 0.6293933851547021, 0.0, 8.1, 6.923327236701723, 5.487617949037702, 4.380161179698217, 6.344958847736625, 3.708127572016461, 3.075675784717179, 2.0833333333333335, 2.997386557224717, 2.4304462448559674, 1.3524234110653865, 0.6802069044352995, 0.0), # 55
(8.286468163401498, 7.454791540923639, 6.754512574302698, 7.28437237654321, 5.995573806332619, 2.916666666666667, 3.0652086016299527, 2.6307386831275723, 3.169415884773662, 1.4548828166438048, 1.0964767094816479, 0.6283794543514709, 0.0, 8.1, 6.912173997866179, 5.482383547408239, 4.364648449931414, 6.338831769547324, 3.6830341563786013, 3.0652086016299527, 2.0833333333333335, 2.9977869031663094, 2.4281241255144037, 1.3509025148605398, 0.6777083219021491, 0.0), # 56
(8.288707507507507, 7.427295061728395, 6.746864197530866, 7.277320833333334, 5.996308311966915, 2.916666666666667, 3.0547468409586056, 2.613111111111112, 3.166326666666667, 1.4497380246913585, 1.0954116722783391, 0.627359670781893, 0.0, 8.1, 6.900956378600823, 5.477058361391695, 4.349214074074075, 6.332653333333334, 3.6583555555555565, 3.0547468409586056, 2.0833333333333335, 2.9981541559834577, 2.425773611111112, 1.3493728395061733, 0.6752086419753087, 0.0), # 57
(8.290746455772544, 7.39983479652492, 6.739182898948332, 7.270191512345679, 5.99697653345876, 2.916666666666667, 3.044309481158719, 2.595829218106996, 3.163215720164609, 1.4446301051668957, 1.0943292763021162, 0.6263354976375554, 0.0, 8.1, 6.889690474013108, 5.471646381510581, 4.333890315500686, 6.326431440329218, 3.6341609053497947, 3.044309481158719, 2.0833333333333335, 2.99848826672938, 2.4233971707818935, 1.3478365797896665, 0.6727122542295383, 0.0), # 58
(8.292584371535098, 7.372459030635573, 6.731479652491998, 7.262991820987654, 5.9975783729145835, 2.916666666666667, 3.0339155006858713, 2.578942386831276, 3.160086995884774, 1.4395698125285785, 1.0932303196574802, 0.6253083981100444, 0.0, 8.1, 6.878392379210486, 5.4661515982874, 4.318709437585735, 6.320173991769548, 3.6105193415637866, 3.0339155006858713, 2.0833333333333335, 2.9987891864572918, 2.420997273662552, 1.3462959304984, 0.6702235482395976, 0.0), # 59
(8.294220618133663, 7.345216049382717, 6.723765432098765, 7.255729166666667, 5.998113732440819, 2.916666666666667, 3.0235838779956428, 2.5625000000000004, 3.156944444444445, 1.4345679012345682, 1.092115600448934, 0.6242798353909466, 0.0, 8.1, 6.867078189300411, 5.460578002244669, 4.303703703703704, 6.31388888888889, 3.5875000000000004, 3.0235838779956428, 2.0833333333333335, 2.9990568662204096, 2.4185763888888894, 1.3447530864197532, 0.6677469135802471, 0.0), # 60
(8.295654558906731, 7.3181541380887065, 6.716051211705533, 7.248410956790124, 5.998582514143899, 2.916666666666667, 3.0133335915436135, 2.5465514403292184, 3.1537920164609052, 1.4296351257430273, 1.0909859167809788, 0.623251272671849, 0.0, 8.1, 6.855763999390337, 5.454929583904893, 4.2889053772290815, 6.3075840329218105, 3.5651720164609055, 3.0133335915436135, 2.0833333333333335, 2.9992912570719494, 2.4161369855967085, 1.3432102423411068, 0.6652867398262462, 0.0), # 61
(8.296885557192804, 7.291321582075903, 6.708347965249201, 7.241044598765433, 5.998984620130258, 2.916666666666667, 3.0031836197853625, 2.5311460905349796, 3.1506336625514404, 1.4247822405121175, 1.0898420667581163, 0.6222241731443379, 0.0, 8.1, 6.844465904587715, 5.449210333790581, 4.274346721536352, 6.301267325102881, 3.5436045267489718, 3.0031836197853625, 2.0833333333333335, 2.999492310065129, 2.4136815329218115, 1.3416695930498403, 0.6628474165523549, 0.0), # 62
(8.297912976330368, 7.264766666666667, 6.700666666666668, 7.233637500000001, 5.999319952506323, 2.916666666666667, 2.9931529411764703, 2.5163333333333338, 3.147473333333333, 1.4200200000000003, 1.0886848484848488, 0.6212000000000001, 0.0, 8.1, 6.8332, 5.443424242424244, 4.26006, 6.294946666666666, 3.5228666666666677, 2.9931529411764703, 2.0833333333333335, 2.9996599762531617, 2.411212500000001, 1.3401333333333336, 0.6604333333333334, 0.0), # 63
(8.298736179657919, 7.2385376771833565, 6.693018289894834, 7.226197067901236, 5.999588413378532, 2.916666666666667, 2.983260534172517, 2.5021625514403296, 3.1443149794238683, 1.415359158664838, 1.0875150600656773, 0.6201802164304223, 0.0, 8.1, 6.821982380734645, 5.437575300328387, 4.246077475994513, 6.288629958847737, 3.5030275720164616, 2.983260534172517, 2.0833333333333335, 2.999794206689266, 2.408732355967079, 1.3386036579789669, 0.6580488797439416, 0.0), # 64
(8.29935453051395, 7.212682898948331, 6.685413808870599, 7.218730709876544, 5.999789904853316, 2.916666666666667, 2.9735253772290813, 2.4886831275720165, 3.1411625514403294, 1.4108104709647922, 1.0863334996051048, 0.619166285627191, 0.0, 8.1, 6.8108291418991, 5.431667498025524, 4.232431412894376, 6.282325102880659, 3.484156378600823, 2.9735253772290813, 2.0833333333333335, 2.999894952426658, 2.4062435699588485, 1.33708276177412, 0.6556984453589393, 0.0), # 65
(8.299767392236957, 7.187250617283952, 6.677864197530865, 7.211245833333334, 5.999924329037105, 2.916666666666667, 2.963966448801743, 2.475944444444445, 3.13802, 1.406384691358025, 1.085140965207632, 0.6181596707818932, 0.0, 8.1, 6.799756378600824, 5.425704826038159, 4.2191540740740745, 6.27604, 3.466322222222223, 2.963966448801743, 2.0833333333333335, 2.9999621645185526, 2.4037486111111117, 1.3355728395061732, 0.6533864197530866, 0.0), # 66
(8.299974128165434, 7.162289117512574, 6.670380429812529, 7.203749845679012, 5.999991588036336, 2.916666666666667, 2.9546027273460824, 2.4639958847736634, 3.1348912757201646, 1.4020925743026982, 1.0839382549777616, 0.617161835086115, 0.0, 8.1, 6.788780185947264, 5.419691274888807, 4.206277722908094, 6.269782551440329, 3.4495942386831286, 2.9546027273460824, 2.0833333333333335, 2.999995794018168, 2.401249948559671, 1.3340760859625058, 0.6511171925011432, 0.0), # 67
(8.29983329158466, 7.137715668834903, 6.662937299954276, 7.196185044283415, 5.999934909491917, 2.916612538739013, 2.9454060779318585, 2.452781283340954, 3.131756759640299, 1.3979240883294335, 1.0827047984720504, 0.6161686681266496, 0.0, 8.099900120027435, 6.777855349393144, 5.413523992360251, 4.1937722649883, 6.263513519280598, 3.433893796677336, 2.9454060779318585, 2.0832946705278665, 2.9999674547459585, 2.398728348094472, 1.3325874599908551, 0.648883242621355, 0.0), # 68
(8.298513365539453, 7.112780047789725, 6.655325617283951, 7.188170108695652, 5.999419026870006, 2.916184636488341, 2.9361072725386457, 2.4416995884773662, 3.1284794238683125, 1.3937612781408861, 1.0813150451887295, 0.6151479315572884, 0.0, 8.099108796296298, 6.766627247130171, 5.406575225943647, 4.181283834422658, 6.256958847736625, 3.4183794238683127, 2.9361072725386457, 2.0829890260631005, 2.999709513435003, 2.396056702898551, 1.33106512345679, 0.6466163679808842, 0.0), # 69
(8.295908630047116, 7.087367803885127, 6.647512288523091, 7.179652274557166, 5.998399634202102, 2.9153419194228523, 2.926664053824548, 2.4306508154244786, 3.1250407712238992, 1.3895839048925471, 1.079753184870144, 0.614094850752854, 0.0, 8.097545867626888, 6.755043358281393, 5.3987659243507204, 4.168751714677641, 6.2500815424477985, 3.40291114159427, 2.926664053824548, 2.082387085302037, 2.999199817101051, 2.393217424852389, 1.3295024577046182, 0.6443061639895571, 0.0), # 70
(8.292055728514343, 7.061494123633789, 6.639500057155922, 7.170644102254428, 5.9968896420022055, 2.9140980439973583, 2.9170806638155953, 2.4196386221612562, 3.1214459228776104, 1.3853920718685282, 1.0780249827711816, 0.613010195814181, 0.0, 8.095231910150892, 6.743112153955991, 5.390124913855908, 4.1561762156055835, 6.242891845755221, 3.387494071025759, 2.9170806638155953, 2.081498602855256, 2.9984448210011028, 2.3902147007514767, 1.3279000114311843, 0.6419540112394354, 0.0), # 71
(8.286991304347827, 7.035174193548387, 6.631291666666667, 7.161158152173913, 5.994901960784313, 2.9124666666666674, 2.907361344537815, 2.408666666666667, 3.1177, 1.3811858823529415, 1.0761362041467308, 0.6118947368421054, 0.0, 8.0921875, 6.730842105263158, 5.380681020733653, 4.143557647058824, 6.2354, 3.3721333333333336, 2.907361344537815, 2.080333333333334, 2.9974509803921565, 2.3870527173913048, 1.3262583333333333, 0.6395612903225807, 0.0), # 72
(8.280752000954257, 7.008423200141599, 6.622889860539551, 7.151206984702094, 5.992449501062428, 2.9104614438855867, 2.897510338017237, 2.397738606919677, 3.113808123761622, 1.376965439629899, 1.0740926142516787, 0.6107492439374613, 0.0, 8.0884332133059, 6.7182416833120735, 5.370463071258393, 4.130896318889696, 6.227616247523244, 3.356834049687548, 2.897510338017237, 2.0789010313468475, 2.996224750531214, 2.383735661567365, 1.3245779721079105, 0.6371293818310545, 0.0), # 73
(8.273374461740323, 6.981256329926103, 6.614297382258802, 7.140803160225442, 5.989545173350547, 2.908096032108927, 2.887531886279889, 2.3868581008992535, 3.1097754153330284, 1.3727308469835127, 1.0718999783409144, 0.6095744872010845, 0.0, 8.083989626200276, 6.705319359211929, 5.359499891704571, 4.118192540950537, 6.219550830666057, 3.3416013412589547, 2.887531886279889, 2.0772114515063764, 2.9947725866752735, 2.380267720075148, 1.3228594764517605, 0.6346596663569185, 0.0), # 74
(8.26489533011272, 6.953688769414575, 6.605516975308642, 7.129959239130434, 5.986201888162673, 2.905384087791496, 2.8774302313518003, 2.376028806584362, 3.1056069958847736, 1.3684822076978942, 1.069564061669325, 0.6083712367338099, 0.0, 8.078877314814816, 6.692083604071907, 5.347820308346624, 4.105446623093682, 6.211213991769547, 3.3264403292181073, 2.8774302313518003, 2.0752743484224974, 2.9931009440813363, 2.3766530797101453, 1.3211033950617284, 0.6321535244922342, 0.0), # 75
(8.255351249478142, 6.925735705119696, 6.596551383173297, 7.118687781803542, 5.982432556012803, 2.9023392673881023, 2.8672096152589983, 2.365254381953971, 3.1013079865874102, 1.364219625057156, 1.067090629491799, 0.6071402626364722, 0.0, 8.073116855281206, 6.678542889001194, 5.335453147458995, 4.092658875171468, 6.2026159731748205, 3.311356134735559, 2.8672096152589983, 2.0730994767057873, 2.9912162780064016, 2.372895927267848, 1.3193102766346596, 0.6296123368290635, 0.0), # 76
(8.244778863243274, 6.897412323554141, 6.587403349336991, 7.10700134863124, 5.9782500874149385, 2.8989752273535543, 2.8568742800275118, 2.354538484987045, 3.0968835086114925, 1.3599432023454103, 1.0644854470632252, 0.6058823350099072, 0.0, 8.06672882373114, 6.664705685108978, 5.322427235316125, 4.07982960703623, 6.193767017222985, 3.296353878981863, 2.8568742800275118, 2.0706965909668247, 2.9891250437074692, 2.369000449543747, 1.3174806698673982, 0.6270374839594675, 0.0), # 77
(8.233214814814815, 6.8687338112305865, 6.578075617283951, 7.0949125, 5.97366739288308, 2.895305624142661, 2.84642846768337, 2.343884773662552, 3.092338683127571, 1.3556530428467686, 1.0617542796384905, 0.6045982239549493, 0.0, 8.059733796296298, 6.650580463504441, 5.308771398192452, 4.066959128540305, 6.184677366255142, 3.2814386831275724, 2.84642846768337, 2.0680754458161865, 2.98683369644154, 2.364970833333334, 1.3156151234567903, 0.624430346475508, 0.0), # 78
(8.220695747599452, 6.8397153546617115, 6.5685709304984, 7.082433796296296, 5.968697382931225, 2.891344114210232, 2.8358764202526006, 2.333296905959458, 3.0876786313062032, 1.351349249845343, 1.058902892472483, 0.6032886995724337, 0.0, 8.052152349108367, 6.63617569529677, 5.294514462362415, 4.0540477495360285, 6.1753572626124065, 3.266615668343241, 2.8358764202526006, 2.0652457958644517, 2.9843486914656125, 2.3608112654320994, 1.3137141860996802, 0.6217923049692465, 0.0), # 79
(8.207258305003878, 6.810372140360193, 6.558892032464563, 7.069577797906602, 5.963352968073375, 2.8871043540110755, 2.8252223797612324, 2.3227785398567296, 3.0829084743179394, 1.3470319266252455, 1.055937050820092, 0.6019545319631957, 0.0, 8.04400505829904, 6.621499851595152, 5.2796852541004595, 4.041095779875736, 6.165816948635879, 3.2518899557994216, 2.8252223797612324, 2.0622173957221968, 2.9816764840366874, 2.3565259326355346, 1.3117784064929128, 0.619124740032745, 0.0), # 80
(8.192939130434784, 6.78071935483871, 6.5490416666666675, 7.056357065217393, 5.957647058823529, 2.8826000000000005, 2.8144705882352943, 2.3123333333333336, 3.078033333333333, 1.3427011764705885, 1.0528625199362043, 0.6005964912280702, 0.0, 8.0353125, 6.606561403508772, 5.264312599681022, 4.028103529411765, 6.156066666666666, 3.237266666666667, 2.8144705882352943, 2.059, 2.9788235294117644, 2.3521190217391315, 1.3098083333333335, 0.6164290322580647, 0.0), # 81
(8.177774867298861, 6.750772184609939, 6.539022576588936, 7.042784158615137, 5.951592565695688, 2.877844708631815, 2.8036252877008145, 2.301964944368237, 3.0730583295229383, 1.3383571026654835, 1.0496850650757086, 0.5992153474678925, 0.0, 8.026095250342937, 6.5913688221468165, 5.248425325378542, 4.0150713079964495, 6.146116659045877, 3.2227509221155315, 2.8036252877008145, 2.0556033633084394, 2.975796282847844, 2.3475947195383795, 1.3078045153177873, 0.6137065622372673, 0.0), # 82
(8.161802159002804, 6.720545816186557, 6.528837505715592, 7.028871638486312, 5.945202399203851, 2.8728521363613275, 2.7926907201838214, 2.2916770309404058, 3.067988584057308, 1.3339998084940425, 1.0464104514934927, 0.5978118707834975, 0.0, 8.016373885459535, 6.575930578618472, 5.232052257467463, 4.001999425482127, 6.135977168114616, 3.208347843316568, 2.7926907201838214, 2.052037240258091, 2.9726011996019257, 2.3429572128287712, 1.3057675011431187, 0.6109587105624144, 0.0), # 83
(8.145057648953301, 6.690055436081242, 6.518489197530864, 7.014632065217392, 5.938489469862018, 2.867635939643347, 2.7816711277103434, 2.2814732510288067, 3.0628292181069954, 1.329629397240378, 1.0430444444444447, 0.5963868312757202, 0.0, 8.006168981481482, 6.560255144032922, 5.215222222222223, 3.9888881917211334, 6.125658436213991, 3.194062551440329, 2.7816711277103434, 2.0483113854595336, 2.969244734931009, 2.338210688405798, 1.303697839506173, 0.6081868578255676, 0.0), # 84
(8.127577980557048, 6.659316230806673, 6.507980395518976, 7.000077999194847, 5.931466688184191, 2.862209774932684, 2.77057075230641, 2.2713572626124074, 3.057585352842554, 1.3252459721886014, 1.0395928091834528, 0.5949409990453959, 0.0, 7.995501114540467, 6.544350989499354, 5.197964045917263, 3.9757379165658033, 6.115170705685108, 3.17990016765737, 2.77057075230641, 2.0444355535233454, 2.9657333440920954, 2.3333593330649496, 1.3015960791037953, 0.6053923846187885, 0.0), # 85
(8.10939979722073, 6.6283433868755255, 6.497313843164153, 6.985222000805154, 5.924146964684365, 2.8565872986841443, 2.7593938359980483, 2.2613327236701726, 3.0522621094345377, 1.320849636622825, 1.0360613109654049, 0.5934751441933597, 0.0, 7.984390860768176, 6.528226586126955, 5.180306554827023, 3.9625489098684747, 6.104524218869075, 3.1658658131382413, 2.7593938359980483, 2.040419499060103, 2.9620734823421824, 2.3284073336017186, 1.2994627686328306, 0.6025766715341389, 0.0), # 86
(8.090559742351045, 6.597152090800478, 6.486492283950617, 6.970076630434782, 5.9165432098765445, 2.8507821673525378, 2.7481446208112876, 2.2514032921810703, 3.0468646090534985, 1.3164404938271608, 1.0324557150451887, 0.5919900368204463, 0.0, 7.972858796296297, 6.511890405024908, 5.162278575225944, 3.9493214814814817, 6.093729218106997, 3.1519646090534983, 2.7481446208112876, 2.036272976680384, 2.9582716049382722, 2.3233588768115947, 1.2972984567901236, 0.5997410991636799, 0.0), # 87
(8.071094459354686, 6.565757529094207, 6.475518461362597, 6.95465444847021, 5.908668334274726, 2.8448080373926743, 2.7368273487721564, 2.2415726261240665, 3.0413979728699894, 1.3120186470857205, 1.0287817866776934, 0.5904864470274911, 0.0, 7.960925497256517, 6.495350917302401, 5.143908933388466, 3.9360559412571607, 6.082795945739979, 3.138201676573693, 2.7368273487721564, 2.032005740994767, 2.954334167137363, 2.3182181494900704, 1.2951036922725196, 0.5968870480994735, 0.0), # 88
(8.051040591638339, 6.534174888269392, 6.464395118884317, 6.938968015297907, 5.90053524839291, 2.8386785652593614, 2.7254462619066833, 2.2318443834781285, 3.035867322054565, 1.3075841996826167, 1.025045291117806, 0.5889651449153291, 0.0, 7.948611539780521, 6.478616594068619, 5.125226455589029, 3.9227525990478496, 6.07173464410913, 3.12458213686938, 2.7254462619066833, 2.0276275466138296, 2.950267624196455, 2.312989338432636, 1.2928790237768635, 0.5940158989335812, 0.0), # 89
(8.030434782608696, 6.502419354838709, 6.453125000000001, 6.923029891304349, 5.892156862745098, 2.8324074074074077, 2.7140056022408965, 2.2222222222222223, 3.030277777777778, 1.303137254901961, 1.021251993620415, 0.5874269005847954, 0.0, 7.9359375000000005, 6.461695906432748, 5.106259968102074, 3.9094117647058826, 6.060555555555556, 3.111111111111111, 2.7140056022408965, 2.0231481481481484, 2.946078431372549, 2.3076766304347833, 1.2906250000000001, 0.5911290322580646, 0.0), # 90
(8.00931367567245, 6.470506115314836, 6.441710848193873, 6.906852636876007, 5.883546087845287, 2.826008220291622, 2.7025096118008247, 2.2127098003353147, 3.024634461210182, 1.2986779160278654, 1.0174076594404082, 0.585872484136725, 0.0, 7.922923954046638, 6.444597325503974, 5.0870382972020405, 3.8960337480835956, 6.049268922420364, 3.097793720469441, 2.7025096118008247, 2.0185773002083014, 2.9417730439226437, 2.302284212292003, 1.2883421696387747, 0.5882278286649852, 0.0), # 91
(7.9877139142362985, 6.438450356210453, 6.43015540695016, 6.890448812399356, 5.874715834207482, 2.8194946603668143, 2.690962532612497, 2.203310775796373, 3.018942493522329, 1.2942062863444421, 1.013518053832674, 0.5843026656719533, 0.0, 7.909591478052126, 6.427329322391485, 5.067590269163369, 3.8826188590333257, 6.037884987044658, 3.0846350861149223, 2.690962532612497, 2.0139247574048675, 2.937357917103741, 2.296816270799786, 1.2860310813900322, 0.5853136687464049, 0.0), # 92
(7.965672141706924, 6.406267264038233, 6.418461419753087, 6.873830978260871, 5.865679012345678, 2.8128803840877916, 2.6793686067019404, 2.1940288065843623, 3.013206995884774, 1.2897224691358027, 1.0095889420521, 0.5827182152913147, 0.0, 7.895960648148147, 6.409900368204461, 5.0479447102605, 3.8691674074074074, 6.026413991769548, 3.0716403292181074, 2.6793686067019404, 2.0092002743484225, 2.932839506172839, 2.291276992753624, 1.2836922839506175, 0.5823879330943849, 0.0), # 93
(7.943225001491024, 6.373972025310855, 6.406631630086878, 6.857011694847022, 5.856448532773877, 2.806179047909364, 2.6677320760951844, 2.1848675506782507, 3.007433089468069, 1.2852265676860597, 1.005626089353575, 0.581119903095645, 0.0, 7.882052040466393, 6.392318934052094, 5.028130446767873, 3.855679703058178, 6.014866178936138, 3.058814570949551, 2.6677320760951844, 2.0044136056495456, 2.9282242663869384, 2.2856705649490077, 1.2813263260173757, 0.5794520023009869, 0.0), # 94
(7.920409136995288, 6.341579826540998, 6.394668781435757, 6.840003522544284, 5.847037306006079, 2.799404308286339, 2.6560571828182575, 2.1758306660570037, 3.001625895442768, 1.2807186852793244, 1.0016352609919863, 0.5795084991857787, 0.0, 7.867886231138546, 6.374593491043566, 5.008176304959932, 3.8421560558379726, 6.003251790885536, 3.046162932479805, 2.6560571828182575, 1.9995745059188135, 2.9235186530030397, 2.2800011741814283, 1.2789337562871517, 0.5765072569582727, 0.0), # 95
(7.89726119162641, 6.30910585424134, 6.382575617283951, 6.8228190217391305, 5.8374582425562815, 2.7925698216735255, 2.6443481688971886, 2.1669218106995887, 2.995790534979424, 1.27619892519971, 0.9976222222222224, 0.5778847736625516, 0.0, 7.853483796296297, 6.356732510288067, 4.988111111111112, 3.828596775599129, 5.991581069958848, 3.0336905349794243, 2.6443481688971886, 1.9946927297668038, 2.9187291212781408, 2.2742730072463773, 1.2765151234567904, 0.5735550776583037, 0.0), # 96
(7.873817808791078, 6.276565294924556, 6.370354881115684, 6.805470752818035, 5.827724252938488, 2.7856892445257326, 2.6326092763580053, 2.1581446425849724, 2.9899321292485905, 1.2716673907313272, 0.9935927382991712, 0.576249496626798, 0.0, 7.838865312071332, 6.338744462894778, 4.967963691495855, 3.8150021721939806, 5.979864258497181, 3.0214024996189615, 2.6326092763580053, 1.9897780318040947, 2.913862126469244, 2.2684902509393456, 1.2740709762231368, 0.5705968449931414, 0.0), # 97
(7.850115631895988, 6.243973335103323, 6.35800931641518, 6.787971276167473, 5.817848247666694, 2.7787762332977706, 2.6208447472267373, 2.1495028196921204, 2.9840557994208194, 1.2671241851582886, 0.9895525744777209, 0.5746034381793533, 0.0, 7.824051354595337, 6.320637819972885, 4.947762872388605, 3.801372555474865, 5.968111598841639, 3.0093039475689687, 2.6208447472267373, 1.9848401666412645, 2.908924123833347, 2.2626570920558247, 1.2716018632830361, 0.5676339395548476, 0.0), # 98
(7.826191304347827, 6.211345161290323, 6.3455416666666675, 6.770333152173913, 5.807843137254903, 2.7718444444444446, 2.6090588235294123, 2.1410000000000005, 2.9781666666666666, 1.2625694117647062, 0.9855074960127594, 0.5729473684210528, 0.0, 7.8090625000000005, 6.302421052631579, 4.927537480063797, 3.787708235294118, 5.956333333333333, 2.9974000000000007, 2.6090588235294123, 1.9798888888888888, 2.9039215686274513, 2.256777717391305, 1.2691083333333337, 0.564667741935484, 0.0), # 99
(7.80208146955329, 6.178695959998229, 6.332954675354367, 6.752568941223833, 5.797721832217111, 2.764907534420566, 2.597255747292058, 2.1326398414875785, 2.9722698521566837, 1.258003173834692, 0.9814632681591747, 0.5712820574527312, 0.0, 7.79391932441701, 6.284102631980042, 4.907316340795873, 3.774009521504075, 5.944539704313367, 2.98569577808261, 2.597255747292058, 1.9749339531575472, 2.8988609161085557, 2.250856313741278, 1.2665909350708735, 0.5616996327271119, 0.0), # 100
(7.777822770919068, 6.1460409177397235, 6.320251085962506, 6.734691203703704, 5.787497243067323, 2.757979159680943, 2.585439760540705, 2.124426002133821, 2.9663704770614236, 1.253425574652358, 0.9774256561718551, 0.5696082753752236, 0.0, 7.7786424039780515, 6.265691029127459, 4.887128280859275, 3.760276723957073, 5.932740954122847, 2.9741964029873493, 2.585439760540705, 1.9699851140578162, 2.8937486215336614, 2.244897067901235, 1.2640502171925014, 0.5587309925217931, 0.0), # 101
(7.753451851851853, 6.11339522102748, 6.307433641975309, 6.716712500000001, 5.7771822803195345, 2.7510729766803848, 2.5736151053013803, 2.1163621399176957, 2.9604736625514403, 1.248836717501816, 0.9734004253056887, 0.5679267922893655, 0.0, 7.763252314814816, 6.24719471518302, 4.867002126528443, 3.746510152505447, 5.920947325102881, 2.962906995884774, 2.5736151053013803, 1.965052126200275, 2.8885911401597673, 2.2389041666666674, 1.261486728395062, 0.5557632019115891, 0.0), # 102
(7.729005355758336, 6.080774056374176, 6.294505086877001, 6.698645390499196, 5.766789854487748, 2.7442026418736987, 2.561786023600112, 2.1084519128181682, 2.9545845297972866, 1.2442367056671781, 0.9693933408155633, 0.5662383782959916, 0.0, 7.747769633058984, 6.228622161255906, 4.846966704077817, 3.7327101170015338, 5.909169059594573, 2.951832677945436, 2.561786023600112, 1.960144744195499, 2.883394927243874, 2.2328817968330656, 1.2589010173754003, 0.5527976414885616, 0.0), # 103
(7.704519926045208, 6.048192610292491, 6.281468164151806, 6.680502435587762, 5.756332876085962, 2.7373818117156943, 2.5499567574629305, 2.1006989788142056, 2.948708199969517, 1.2396256424325565, 0.9654101679563669, 0.564543803495937, 0.0, 7.732214934842251, 6.209981838455306, 4.827050839781834, 3.7188769272976687, 5.897416399939034, 2.9409785703398876, 2.5499567574629305, 1.9552727226540672, 2.878166438042981, 2.2268341451959213, 1.2562936328303613, 0.549835691844772, 0.0), # 104
(7.680032206119162, 6.015666069295101, 6.268325617283951, 6.662296195652173, 5.745824255628177, 2.7306241426611804, 2.5381315489158633, 2.0931069958847743, 2.942849794238683, 1.235003631082063, 0.961456671982988, 0.562843837990037, 0.0, 7.716608796296296, 6.1912822178904054, 4.80728335991494, 3.705010893246188, 5.885699588477366, 2.930349794238684, 2.5381315489158633, 1.9504458161865572, 2.8729121278140886, 2.220765398550725, 1.2536651234567902, 0.546878733572282, 0.0), # 105
(7.655578839386891, 5.983209619894685, 6.255080189757659, 6.644039231078905, 5.735276903628392, 2.723943291164965, 2.526314639984938, 2.0856796220088403, 2.9370144337753388, 1.2303707748998092, 0.9575386181503142, 0.5611392518791264, 0.0, 7.700971793552812, 6.172531770670389, 4.787693090751571, 3.691112324699427, 5.8740288675506775, 2.9199514708123764, 2.526314639984938, 1.9456737794035461, 2.867638451814196, 2.214679743692969, 1.2510160379515318, 0.5439281472631533, 0.0), # 106
(7.631196469255085, 5.950838448603921, 6.241734625057157, 6.625744102254428, 5.724703730600607, 2.7173529136818577, 2.5145102726961848, 2.0784205151653716, 2.931207239750038, 1.225727177169908, 0.9536617717132337, 0.5594308152640404, 0.0, 7.685324502743484, 6.153738967904443, 4.768308858566169, 3.6771815315097234, 5.862414479500076, 2.9097887212315205, 2.5145102726961848, 1.9409663669156128, 2.8623518653003037, 2.208581367418143, 1.2483469250114314, 0.5409853135094475, 0.0), # 107
(7.606921739130435, 5.918567741935485, 6.228291666666668, 6.607423369565218, 5.714117647058822, 2.7108666666666674, 2.5027226890756302, 2.0713333333333335, 2.9254333333333333, 1.221072941176471, 0.9498318979266349, 0.5577192982456142, 0.0, 7.669687500000001, 6.134912280701755, 4.749159489633174, 3.6632188235294123, 5.850866666666667, 2.899866666666667, 2.5027226890756302, 1.9363333333333337, 2.857058823529411, 2.20247445652174, 1.2456583333333338, 0.538051612903226, 0.0), # 108
(7.582791292419635, 5.886412686402053, 6.214754058070417, 6.589089593397745, 5.70353156351704, 2.7044982065742014, 2.490956131149305, 2.064421734491694, 2.9196978356957777, 1.2164081702036098, 0.9460547620454054, 0.5560054709246826, 0.0, 7.654081361454047, 6.116060180171507, 4.730273810227027, 3.6492245106108285, 5.839395671391555, 2.8901904282883715, 2.490956131149305, 1.9317844332672867, 2.85176578175852, 2.196363197799249, 1.2429508116140835, 0.5351284260365504, 0.0), # 109
(7.558841772529373, 5.854388468516307, 6.201124542752631, 6.570755334138486, 5.692958390489256, 2.6982611898592697, 2.4792148409432357, 2.0576893766194178, 2.9140058680079255, 1.211732967535437, 0.9423361293244336, 0.554290103402081, 0.0, 7.638526663237312, 6.0971911374228895, 4.711680646622168, 3.63519890260631, 5.828011736015851, 2.880765127267185, 2.4792148409432357, 1.9273294213280499, 2.846479195244628, 2.1902517780461626, 1.2402249085505264, 0.5322171335014826, 0.0), # 110
(7.535109822866345, 5.82251027479092, 6.187405864197532, 6.552433152173913, 5.68241103848947, 2.6921692729766806, 2.4675030604834527, 2.0511399176954734, 2.9083625514403293, 1.2070474364560642, 0.9386817650186072, 0.5525739657786443, 0.0, 7.623043981481482, 6.078313623565086, 4.693408825093036, 3.621142309368192, 5.816725102880659, 2.871595884773663, 2.4675030604834527, 1.9229780521262005, 2.841205519244735, 2.1841443840579715, 1.2374811728395065, 0.5293191158900837, 0.0), # 111
(7.51163208683724, 5.790793291738572, 6.173600765889348, 6.5341356078905, 5.671902418031685, 2.686236112381243, 2.4558250317959835, 2.0447770156988265, 2.9027730071635416, 1.2023516802496035, 0.9350974343828147, 0.5508578281552075, 0.0, 7.607653892318244, 6.059436109707281, 4.675487171914074, 3.6070550407488096, 5.805546014327083, 2.862687821978357, 2.4558250317959835, 1.9187400802723165, 2.8359512090158425, 2.178045202630167, 1.2347201531778695, 0.5264357537944157, 0.0), # 112
(7.488403378962436, 5.759305653776365, 6.159745218834713, 6.515900329495224, 5.661427029425976, 2.6804725589667733, 2.444210385462708, 2.038617522926869, 2.8972567496689656, 1.1976609473225461, 0.9315898541537156, 0.549146195766962, 0.0, 7.592355120674577, 6.0406081534365805, 4.657949270768578, 3.592982841967638, 5.794513499337931, 2.8540645320976163, 2.444210385462708, 1.914623256404838, 2.830713514712988, 2.1719667764984085, 1.2319490437669427, 0.5235732412523969, 0.0), # 113
(7.465184718320052, 5.728357934585393, 6.146030450014413, 6.497873652766401, 5.6508764557687075, 2.674865483980621, 2.432807283364232, 2.0327370865017067, 2.891898409523483, 1.1930630335825567, 0.9281659116150931, 0.5474608114741984, 0.0, 7.577020331328028, 6.022068926216181, 4.640829558075465, 3.5791891007476693, 5.783796819046966, 2.8458319211023895, 2.432807283364232, 1.9106182028433005, 2.8254382278843537, 2.1659578842554676, 1.2292060900028827, 0.5207598122350358, 0.0), # 114
(7.441907922403196, 5.697961279034234, 6.132464621804878, 6.480050703109068, 5.640217428207254, 2.669400305832757, 2.421623860076625, 2.027134218092903, 2.886699994311677, 1.1885650655976157, 0.9248206015236127, 0.5458025055039235, 0.0, 7.561605305328301, 6.003827560543158, 4.6241030076180625, 3.5656951967928463, 5.773399988623354, 2.8379879053300643, 2.421623860076625, 1.9067145041662548, 2.820108714103627, 2.1600169010363564, 1.226492924360976, 0.5179964799122032, 0.0), # 115
(7.418543898590108, 5.668071406280581, 6.119021459989249, 6.462399690159842, 5.629433880738015, 2.664064142733979, 2.4106419270111576, 2.021793437632998, 2.8816483571274216, 1.1841586716899097, 0.9215474575028644, 0.5441682131658231, 0.0, 7.546085807804713, 5.985850344824053, 4.607737287514321, 3.5524760150697285, 5.763296714254843, 2.8305108126861973, 2.4106419270111576, 1.9029029590956992, 2.8147169403690073, 2.154133230053281, 1.22380429199785, 0.5152792187527803, 0.0), # 116
(7.395063554259018, 5.638644035482129, 6.105674690350658, 6.444888823555345, 5.6185097473573915, 2.6588441128950824, 2.399843295579101, 2.0166992650545286, 2.8767303510645874, 1.179835480181626, 0.9183400131764379, 0.5425548697695834, 0.0, 7.53043760388658, 5.968103567465417, 4.591700065882189, 3.5395064405448773, 5.753460702129175, 2.8233789710763397, 2.399843295579101, 1.8991743663536302, 2.8092548736786958, 2.148296274518449, 1.2211349380701317, 0.5126040032256481, 0.0), # 117
(7.371437796788169, 5.60963488579657, 6.092398038672245, 6.427486312932199, 5.607428962061783, 2.6537273345268653, 2.3892097771917262, 2.0118362202900326, 2.871932829217049, 1.175587119394952, 0.9151918021679234, 0.5409594106248901, 0.0, 7.51463645870322, 5.950553516873789, 4.575959010839616, 3.5267613581848556, 5.743865658434098, 2.8165707084060454, 2.3892097771917262, 1.8955195246620464, 2.8037144810308914, 2.142495437644067, 1.218479607734449, 0.5099668077996883, 0.0), # 118
(7.347637533555794, 5.580999676381602, 6.079165230737149, 6.410160367927023, 5.5961754588475845, 2.648700925840122, 2.3787231832603024, 2.0071888232720485, 2.867242644678678, 1.1714052176520746, 0.9120963581009105, 0.5393787710414291, 0.0, 7.498658137383946, 5.933166481455719, 4.560481790504553, 3.5142156529562234, 5.734485289357356, 2.810064352580868, 2.3787231832603024, 1.8919292327429442, 2.7980877294237922, 2.1367201226423416, 1.21583304614743, 0.507363606943782, 0.0), # 119
(7.323633671940129, 5.552694126394916, 6.065949992328509, 6.392879198176436, 5.584733171711198, 2.6437520050456507, 2.3683653251961014, 2.0027415939331146, 2.8626466505433488, 1.1672814032751813, 0.909047214598989, 0.5378098863288866, 0.0, 7.482478405058078, 5.915908749617751, 4.545236072994944, 3.501844209825543, 5.7252933010866975, 2.80383823150636, 2.3683653251961014, 1.8883942893183219, 2.792366585855599, 2.1309597327254792, 1.2131899984657017, 0.5047903751268107, 0.0), # 120
(7.299397119319415, 5.524673954994208, 6.052726049229459, 6.3756110133170605, 5.573086034649023, 2.638867690354248, 2.358118014410392, 1.9984790522057692, 2.858131699904933, 1.1632073045864595, 0.906037905285749, 0.5362496917969483, 0.0, 7.466073026854929, 5.898746609766429, 4.530189526428744, 3.489621913759378, 5.716263399809866, 2.797870673088077, 2.358118014410392, 1.884905493110177, 2.7865430173245116, 2.1252036711056874, 1.2105452098458918, 0.5022430868176554, 0.0), # 121
(7.274898783071883, 5.496894881337171, 6.039467127223141, 6.358324022985514, 5.561217981657458, 2.634035099976709, 2.347963062314447, 1.9943857180225497, 2.8536846458573035, 1.1591745499080957, 0.9030619637847803, 0.5346951227553002, 0.0, 7.4494177679038165, 5.8816463503083005, 4.515309818923901, 3.4775236497242865, 5.707369291714607, 2.7921400052315697, 2.347963062314447, 1.8814536428405064, 2.780608990828729, 2.119441340995172, 1.2078934254446283, 0.49971771648519747, 0.0), # 122
(7.250109570575775, 5.469312624581501, 6.026146952092692, 6.340986436818417, 5.549112946732902, 2.629241352123832, 2.3378822803195356, 1.9904461113159944, 2.8492923414943343, 1.1551747675622777, 0.9001129237196728, 0.5331431145136282, 0.0, 7.432488393334058, 5.864574259649909, 4.500564618598363, 3.4655243026868323, 5.698584682988669, 2.7866245558423923, 2.3378822803195356, 1.8780295372313083, 2.774556473366451, 2.1136621456061393, 1.2052293904185383, 0.49721023859831837, 0.0), # 123
(7.225000389209324, 5.441882903884891, 6.012739249621247, 6.323566464452393, 5.536754863871753, 2.624473565006412, 2.327857479836928, 1.9866447520186423, 2.844941639909897, 1.1511995858711925, 0.897184318714016, 0.5315906023816185, 0.0, 7.4152606682749695, 5.847496626197802, 4.4859215935700805, 3.4535987576135767, 5.689883279819794, 2.781302652826099, 2.327857479836928, 1.87462397500458, 2.7683774319358765, 2.107855488150798, 1.2025478499242495, 0.49471662762589924, 0.0), # 124
(7.199542146350767, 5.414561438405035, 5.99921774559195, 6.306032315524057, 5.524127667070411, 2.619718856835246, 2.3178704722778956, 1.9829661600630304, 2.840619394197865, 1.147240633157027, 0.8942696823914004, 0.5300345216689567, 0.0, 7.397710357855863, 5.8303797383585225, 4.471348411957002, 3.4417218994710805, 5.68123878839573, 2.7761526240882426, 2.3178704722778956, 1.8712277548823186, 2.7620638335352057, 2.1020107718413525, 1.19984354911839, 0.49223285803682143, 0.0), # 125
(7.1737057493783425, 5.387303947299629, 5.985556165787933, 6.288352199670033, 5.511215290325276, 2.614964345821132, 2.307903069053708, 1.9793948553816976, 2.8363124574521112, 1.1432895377419687, 0.8913625483754153, 0.5284718076853291, 0.0, 7.379813227206063, 5.813189884538619, 4.4568127418770755, 3.4298686132259055, 5.6726249149042225, 2.7711527975343766, 2.307903069053708, 1.8678316755865225, 2.755607645162638, 2.0961173998900113, 1.1971112331575866, 0.4897549042999664, 0.0), # 126
(7.147462105670289, 5.360066149726364, 5.9717282359923365, 6.27049432652694, 5.498001667632746, 2.610197150174864, 2.2979370815756375, 1.975915357907182, 2.832007682766508, 1.139337927948205, 0.8884564502896507, 0.5268993957404212, 0.0, 7.361545041454879, 5.795893353144632, 4.442282251448253, 3.4180137838446143, 5.664015365533016, 2.766281501070055, 2.2979370815756375, 1.8644265358391885, 2.749000833816373, 2.0901647755089803, 1.1943456471984675, 0.487278740884215, 0.0), # 127
(7.120782122604837, 5.332803764842939, 5.957707681988301, 6.252426905731399, 5.484470732989221, 2.6054043881072406, 2.287954321254953, 1.9725121875720208, 2.827691923234929, 1.1353774320979229, 0.8855449217576967, 0.5253142211439193, 0.0, 7.34288156573163, 5.778456432583111, 4.427724608788483, 3.4061322962937677, 5.655383846469858, 2.7615170626008294, 2.287954321254953, 1.8610031343623146, 2.7422353664946106, 2.084142301910467, 1.1915415363976603, 0.4848003422584491, 0.0), # 128
(7.093636707560226, 5.305472511807044, 5.9434682295589605, 6.2341181469200295, 5.4706064203911, 2.600573177829058, 2.2779365995029255, 1.9691698643087534, 2.823352031951247, 1.1313996785133094, 0.882621496403143, 0.5237132192055092, 0.0, 7.323798565165631, 5.7608454112606, 4.413107482015715, 3.3941990355399274, 5.646704063902494, 2.756837810032255, 2.2779365995029255, 1.8575522698778983, 2.73530321019555, 2.078039382306677, 1.188693645911792, 0.48231568289154947, 0.0), # 129
(7.065996767914694, 5.2780281097763755, 5.9289836044874535, 6.215536259729452, 5.45639266383478, 2.595690637551111, 2.267865727730825, 1.9658729080499169, 2.818974862009333, 1.1273962955165517, 0.8796797078495794, 0.522093325234877, 0.0, 7.3042718048861985, 5.743026577583645, 4.398398539247896, 3.3821888865496543, 5.637949724018666, 2.7522220712698835, 2.267865727730825, 1.8540647411079363, 2.72819633191739, 2.0718454199098177, 1.1857967208974907, 0.4798207372523978, 0.0), # 130
(7.037833211046475, 5.250426277908626, 5.914227532556921, 6.196649453796286, 5.441813397316663, 2.590743885484198, 2.2577235173499237, 1.9626058387280498, 2.814547266503063, 1.1233589114298372, 0.8767130897205959, 0.5204514745417084, 0.0, 7.2842770500226495, 5.724966219958791, 4.383565448602979, 3.370076734289511, 5.629094533006126, 2.74764817421927, 2.2577235173499237, 1.850531346774427, 2.7209066986583315, 2.0655498179320957, 1.1828455065113843, 0.4773114798098752, 0.0), # 131
(7.009116944333808, 5.222622735361492, 5.8991737395504975, 6.1774259387571515, 5.4268525548331485, 2.5857200398391145, 2.24749177977149, 1.959353176275691, 2.8100560985263074, 1.119279154575353, 0.8737151756397821, 0.5187846024356896, 0.0, 7.263790065704301, 5.706630626792584, 4.36857587819891, 3.3578374637260584, 5.620112197052615, 2.7430944467859675, 2.24749177977149, 1.8469428855993675, 2.7134262774165743, 2.0591419795857178, 1.1798347479100997, 0.474783885032863, 0.0), # 132
(6.979818875154931, 5.194573201292665, 5.883795951251323, 6.1578339242486715, 5.411494070380632, 2.5806062188266576, 2.237152326406796, 1.9560994406253773, 2.80548821117294, 1.1151486532752868, 0.8706794992307283, 0.5170896442265063, 0.0, 7.242786617060469, 5.687986086491568, 4.353397496153641, 3.3454459598258595, 5.61097642234588, 2.7385392168755285, 2.237152326406796, 1.8432901563047555, 2.705747035190316, 2.052611308082891, 1.1767591902502648, 0.4722339273902424, 0.0), # 133
(6.949909910888076, 5.166233394859844, 5.868067893442536, 6.137841619907462, 5.395721877955516, 2.575389540657624, 2.2266869686671114, 1.9528291517096479, 2.8008304575368346, 1.1109590358518249, 0.8675995941170239, 0.5153635352238445, 0.0, 7.221242469220467, 5.668998887462289, 4.3379979705851195, 3.3328771075554737, 5.601660915073669, 2.7339608123935073, 2.2266869686671114, 1.8395639576125886, 2.697860938977758, 2.0459472066358213, 1.1736135786885074, 0.46965758135089497, 0.0), # 134
(6.919360958911483, 5.137559035220717, 5.851963291907273, 6.117417235370148, 5.379519911554198, 2.57005712354281, 2.2160775179637073, 1.9495268294610402, 2.796069690711861, 1.1067019306271555, 0.8644689939222592, 0.5136032107373902, 0.0, 7.199133387313616, 5.649635318111292, 4.322344969611295, 3.320105791881466, 5.592139381423722, 2.7293375612454565, 2.2160775179637073, 1.835755088244864, 2.689759955777099, 2.0391390784567163, 1.1703926583814546, 0.4670508213837017, 0.0), # 135
(6.888142926603388, 5.108505841532984, 5.835455872428673, 6.096528980273343, 5.362872105173076, 2.564596085693012, 2.205305785707854, 1.9461769938120925, 2.7911927637918947, 1.1023689659234648, 0.8612812322700237, 0.5118056060768296, 0.0, 7.176435136469229, 5.629861666845124, 4.306406161350118, 3.3071068977703937, 5.5823855275837895, 2.72464779133693, 2.205305785707854, 1.8318543469235802, 2.681436052586538, 2.0321763267577815, 1.1670911744857346, 0.46440962195754404, 0.0), # 136
(6.856226721342027, 5.079029532954335, 5.818519360789875, 6.075145064253675, 5.345762392808551, 2.558993545319026, 2.1943535833108223, 1.942764164695343, 2.7861865298708084, 1.0979517700629406, 0.8580298427839075, 0.5099676565518481, 0.0, 7.153123481816621, 5.609644222070328, 4.290149213919538, 3.293855310188821, 5.572373059741617, 2.7198698305734803, 2.1943535833108223, 1.8278525323707329, 2.6728811964042754, 2.0250483547512257, 1.1637038721579749, 0.46172995754130325, 0.0), # 137
(6.823583250505639, 5.0490858286424665, 5.801127482774012, 6.053233696947759, 5.3281747084570235, 2.5532366206316497, 2.1832027221838817, 1.9392728620433302, 2.781037842042475, 1.0934419713677697, 0.8547083590875004, 0.508086297472132, 0.0, 7.129174188485113, 5.58894927219345, 4.273541795437502, 3.280325914103308, 5.56207568408495, 2.7149820068606623, 2.1832027221838817, 1.8237404433083213, 2.6640873542285117, 2.017744565649253, 1.1602254965548024, 0.45900780260386065, 0.0), # 138
(6.790183421472455, 5.018630447755072, 5.783253964164227, 6.030763087992216, 5.3100929861148884, 2.547312429841679, 2.171835013738304, 1.9356876057885917, 2.775733553400766, 1.0888311981601397, 0.8513103148043922, 0.5061584641473672, 0.0, 7.104563021604015, 5.567743105621037, 4.256551574021961, 3.2664935944804183, 5.551467106801532, 2.709962648104028, 2.171835013738304, 1.8195088784583422, 2.6550464930574442, 2.0102543626640723, 1.1566507928328456, 0.4562391316140975, 0.0), # 139
(6.755998141620719, 4.987619109449845, 5.764872530743658, 6.007701447023667, 5.291501159778549, 2.5412080911599104, 2.1602322693853586, 1.9319929158636655, 2.770260517039555, 1.0841110787622374, 0.8478292435581727, 0.5041810918872395, 0.0, 7.079265746302652, 5.545992010759633, 4.2391462177908625, 3.2523332362867117, 5.54052103407911, 2.704790082209132, 2.1602322693853586, 1.8151486365427931, 2.6457505798892744, 2.0025671490078896, 1.1529745061487318, 0.45341991904089507, 0.0), # 140
(6.720998318328665, 4.956007532884482, 5.745956908295441, 5.984016983678732, 5.272383163444402, 2.5349107227971404, 2.148376300536318, 1.9281733122010902, 2.7646055860527143, 1.0792732414962505, 0.844258678972432, 0.502151116001435, 0.0, 7.053258127710331, 5.523662276015784, 4.221293394862159, 3.2378197244887508, 5.529211172105429, 2.6994426370815265, 2.148376300536318, 1.8106505162836717, 2.636191581722201, 1.994672327892911, 1.1491913816590882, 0.4505461393531348, 0.0), # 141
(6.685154858974525, 4.923751437216675, 5.726480822602714, 5.959677907594033, 5.252722931108846, 2.5284074429641663, 2.1362489186024507, 1.924213314733404, 2.7587556135341176, 1.0743093146843659, 0.8405921546707598, 0.5000654717996397, 0.0, 7.026515930956373, 5.500720189796036, 4.202960773353798, 3.222927944053097, 5.517511227068235, 2.6938986406267658, 2.1362489186024507, 1.806005316402976, 2.626361465554423, 1.9865593025313446, 1.1452961645205428, 0.4476137670196978, 0.0), # 142
(6.64843867093654, 4.890806541604119, 5.706417999448617, 5.934652428406185, 5.232504396768282, 2.521685369871783, 2.1238319349950276, 1.920097443393144, 2.7526974525776393, 1.0692109266487708, 0.8368232042767458, 0.4979210945915394, 0.0, 6.999014921170094, 5.477132040506932, 4.184116021383729, 3.207632779946312, 5.505394905155279, 2.6881364207504017, 2.1238319349950276, 1.8012038356227023, 2.616252198384141, 1.9782174761353954, 1.1412835998897235, 0.44461877650946546, 0.0), # 143
(6.610820661592948, 4.857128565204509, 5.685742164616285, 5.908908755751814, 5.2117114944191085, 2.5147316217307885, 2.1111071611253194, 1.9158102181128498, 2.746417956277149, 1.0639697057116522, 0.8329453614139802, 0.49571491968682, 0.0, 6.970730863480812, 5.452864116555019, 4.164726807069901, 3.191909117134956, 5.492835912554298, 2.6821343053579896, 2.1111071611253194, 1.796236872664849, 2.6058557472095543, 1.9696362519172719, 1.1371484329232573, 0.44155714229131915, 0.0), # 144
(6.572271738321982, 4.82267322717554, 5.6644270438888595, 5.882415099267537, 5.190328158057724, 2.507533316751979, 2.0980564084045974, 1.9113361588250588, 2.739903977726521, 1.0585772801951978, 0.8289521597060527, 0.4934438823951677, 0.0, 6.94163952301784, 5.4278827063468436, 4.144760798530264, 3.175731840585593, 5.479807955453042, 2.6758706223550823, 2.0980564084045974, 1.7910952262514135, 2.595164079028862, 1.9608050330891795, 1.132885408777772, 0.4384248388341401, 0.0), # 145
(6.5327628085018805, 4.787396246674904, 5.642446363049478, 5.855139668589976, 5.16833832168053, 2.5000775731461515, 2.084661488244132, 1.906659785462309, 2.7331423700196282, 1.0530252784215943, 0.8248371327765532, 0.4911049180262681, 0.0, 6.911716664910495, 5.402154098288948, 4.124185663882766, 3.1590758352647823, 5.4662847400392565, 2.669323699647233, 2.084661488244132, 1.7857696951043938, 2.584169160840265, 1.9517132228633256, 1.1284892726098958, 0.4352178406068095, 0.0), # 146
(6.49226477951088, 4.751253342860296, 5.619773847881273, 5.827050673355748, 5.145725919283921, 2.4923515091241004, 2.0709042120551926, 1.9017656179571385, 2.7261199862503442, 1.0473053287130294, 0.8205938142490716, 0.48869496188980743, 0.0, 6.8809380542880945, 5.375644580787881, 4.102969071245358, 3.1419159861390877, 5.4522399725006885, 2.662471865139994, 2.0709042120551926, 1.7802510779457859, 2.5728629596419603, 1.9423502244519164, 1.1239547695762548, 0.43193212207820875, 0.0), # 147
(6.450748558727217, 4.714200234889411, 5.596383224167389, 5.798116323201478, 5.1224748848643, 2.4843422428966253, 2.0567663912490506, 1.8966381762420859, 2.718823679512541, 1.0414090593916896, 0.8162157377471978, 0.48621094929547143, 0.0, 6.8492794562799535, 5.348320442250185, 4.081078688735989, 3.124227178175068, 5.437647359025082, 2.6552934467389204, 2.0567663912490506, 1.7745301734975893, 2.56123744243215, 1.9327054410671598, 1.1192766448334779, 0.42856365771721927, 0.0), # 148
(6.40818505352913, 4.676192641919942, 5.572248217690963, 5.768304827763782, 5.098569152418064, 2.4760368926745198, 2.0422298372369765, 1.8912619802496888, 2.71124030290009, 1.0353280987797628, 0.8116964368945213, 0.48364981555294617, 0.0, 6.81671663601539, 5.320147971082407, 4.058482184472607, 3.1059842963392876, 5.42248060580018, 2.6477667723495646, 2.0422298372369765, 1.7685977804817998, 2.549284576209032, 1.922768275921261, 1.1144496435381928, 0.42510842199272214, 0.0), # 149
(6.364545171294852, 4.6371862831095845, 5.54734255423513, 5.737584396679283, 5.0739926559416135, 2.467422576668583, 2.0272763614302405, 1.8856215499124855, 2.7033567095068674, 1.0290540751994355, 0.8070294453146325, 0.48100849597191764, 0.0, 6.783225358623717, 5.291093455691093, 4.035147226573162, 3.0871622255983056, 5.406713419013735, 2.63987016987748, 2.0272763614302405, 1.7624446976204164, 2.5369963279708068, 1.912528132226428, 1.1094685108470261, 0.4215623893735987, 0.0), # 150
(6.31979981940262, 4.597136877616033, 5.521639959583029, 5.705923239584598, 5.048729329431348, 2.4584864130896094, 2.011887775240113, 1.8797014051630145, 2.695159752426744, 1.0225786169728959, 0.8022082966311207, 0.4782839258620715, 0.0, 6.748781389234255, 5.261123184482786, 4.011041483155603, 3.067735850918687, 5.390319504853488, 2.6315819672282204, 2.011887775240113, 1.7560617236354352, 2.524364664715674, 1.9019744131948664, 1.1043279919166058, 0.41792153432873036, 0.0), # 151
(6.273919905230675, 4.55600014459698, 5.495114159517802, 5.673289566116352, 5.022763106883663, 2.4492155201483965, 1.996045890077866, 1.8734860659338137, 2.686636284753592, 1.0158933524223301, 0.7972265244675764, 0.475473040533094, 0.0, 6.713360492976318, 5.230203445864033, 3.9861326223378812, 3.04768005726699, 5.373272569507184, 2.622880492307339, 1.996045890077866, 1.7494396572488546, 2.5113815534418316, 1.8910965220387843, 1.0990228319035604, 0.4141818313269982, 0.0), # 152
(6.226876336157249, 4.5137318032101215, 5.467738879822579, 5.63965158591116, 4.996077922294963, 2.4395970160557408, 1.9797325173547677, 1.8669600521574208, 2.677773159581286, 1.008989909869926, 0.7920776624475889, 0.472572775294671, 0.0, 6.676938434979222, 5.19830052824138, 3.9603883122379444, 3.0269697296097773, 5.355546319162572, 2.6137440730203894, 1.9797325173547677, 1.742569297182672, 2.4980389611474814, 1.879883861970387, 1.093547775964516, 0.41033925483728384, 0.0), # 153
(6.178640019560583, 4.4702875726131515, 5.439487846280506, 5.604977508605646, 4.968657709661643, 2.429618019022439, 1.9629294684820913, 1.8601078837663743, 2.6685572300036977, 1.0018599176378709, 0.7867552441947484, 0.4695800654564884, 0.0, 6.639490980372286, 5.165380720021371, 3.9337762209737415, 3.005579752913612, 5.337114460007395, 2.604151037272924, 1.9629294684820913, 1.7354414421588849, 2.4843288548308213, 1.8683258362018824, 1.0878975692561013, 0.40638977932846837, 0.0), # 154
(6.129181862818909, 4.425623171963762, 5.410334784674718, 5.569235543836427, 4.940486402980104, 2.419265647259287, 1.9456185548711045, 1.852914080693212, 2.6589753491147006, 0.9944950040483511, 0.7812528033326445, 0.4664918463282322, 0.0, 6.600993894284821, 5.131410309610554, 3.906264016663222, 2.983485012145053, 5.317950698229401, 2.594079712970497, 1.9456185548711045, 1.7280468908994906, 2.470243201490052, 1.856411847945476, 1.0820669569349437, 0.402329379269433, 0.0), # 155
(6.078472773310465, 4.3796943204196515, 5.3802534207883514, 5.532393901240125, 4.911547936246746, 2.408527018977082, 1.92778158793308, 1.845363162870473, 2.649014370008167, 0.9868867974235548, 0.7755638734848673, 0.46330505321958826, 0.0, 6.561422941846148, 5.09635558541547, 3.8778193674243364, 2.960660392270664, 5.298028740016334, 2.5835084280186624, 1.92778158793308, 1.720376442126487, 2.455773968123373, 1.8441313004133755, 1.0760506841576702, 0.39815402912905923, 0.0), # 156
(6.02648365841349, 4.332456737138511, 5.349217480404546, 5.494420790453363, 4.881826243457965, 2.39738925238662, 1.9094003790792877, 1.8374396502306942, 2.63866114577797, 0.9790269260856685, 0.7696819882750067, 0.4600166214402426, 0.0, 6.520753888185581, 5.060182835842667, 3.848409941375033, 2.937080778257005, 5.27732229155594, 2.5724155103229718, 1.9094003790792877, 1.7124208945618713, 2.4409131217289826, 1.831473596817788, 1.0698434960809091, 0.3938597033762283, 0.0), # 157
(5.971744757124192, 4.28299895523299, 5.315727969268237, 5.453861748990747, 4.849963256464532, 2.3851447556146512, 1.890042688371143, 1.8285989841164574, 2.6271098910930926, 0.9706731832582289, 0.7634127670051923, 0.45650663761295607, 0.0, 6.477188687532276, 5.021573013742516, 3.817063835025962, 2.912019549774686, 5.254219782186185, 2.5600385777630406, 1.890042688371143, 1.7036748254390366, 2.424981628232266, 1.8179539163302492, 1.0631455938536476, 0.38936354138481727, 0.0), # 158
(5.9058294135827225, 4.226247901039617, 5.271158545601992, 5.402386295273073, 4.808102031883535, 2.3677218357366487, 1.8672851053542865, 1.8157378442547942, 2.609713936325905, 0.9604561988197493, 0.7556555914158659, 0.4520908349122073, 0.0, 6.420342117536156, 4.97299918403428, 3.7782779570793297, 2.8813685964592475, 5.21942787265181, 2.542032981956712, 1.8672851053542865, 1.6912298826690346, 2.4040510159417674, 1.8007954317576913, 1.0542317091203985, 0.3842043546399652, 0.0), # 159
(5.827897675923448, 4.161737600929857, 5.214613971970593, 5.339146506245316, 4.755424070051625, 2.344692604822253, 1.8408974993535137, 1.7985330631757823, 2.5859800605943066, 0.948241130372579, 0.7463012678146054, 0.4467001299258565, 0.0, 6.349136487114865, 4.913701429184421, 3.731506339073027, 2.844723391117736, 5.171960121188613, 2.5179462884460952, 1.8408974993535137, 1.6747804320158948, 2.3777120350258123, 1.7797155020817725, 1.0429227943941186, 0.3783397819027143, 0.0), # 160
(5.738577643668768, 4.0898886365923435, 5.146697981273539, 5.264743502254037, 4.69247633295046, 2.3163360460661466, 1.8110725784027506, 1.7772001777032602, 2.556221271199738, 0.9341316386341878, 0.7354322206132944, 0.44038449792717144, 0.0, 6.264299235855278, 4.844229477198885, 3.6771611030664717, 2.8023949159025627, 5.112442542399476, 2.4880802487845646, 1.8110725784027506, 1.6545257471901047, 2.34623816647523, 1.754914500751346, 1.029339596254708, 0.37180805787203125, 0.0), # 161
(5.638497416341085, 4.011121589715708, 5.068014306410331, 5.179778403645797, 4.619805782561709, 2.282931142663013, 1.7780030505359237, 1.7519547246610676, 2.5207505754436363, 0.9182313843220465, 0.7231308742238162, 0.43319391418941966, 0.0, 6.166557803344267, 4.765133056083616, 3.615654371119081, 2.754694152966139, 5.041501150887273, 2.4527366145254947, 1.7780030505359237, 1.630665101902152, 2.3099028912808546, 1.7265928012152658, 1.0136028612820662, 0.36464741724688265, 0.0), # 162
(5.528285093462799, 3.9258570419885843, 4.979166680280469, 5.084852330767161, 4.537959380867034, 2.244756877807534, 1.7418816237869603, 1.7230122408730417, 2.4798809806274416, 0.9006440281536252, 0.7094796530580545, 0.42517835398586895, 0.0, 6.0566396291687035, 4.676961893844558, 3.5473982652902722, 2.701932084460875, 4.959761961254883, 2.4122171372222585, 1.7418816237869603, 1.6033977698625244, 2.268979690433517, 1.6949507769223873, 0.9958333360560938, 0.356896094726235, 0.0), # 163
(5.408568774556308, 3.834515575099602, 4.8807588357834515, 4.980566403964691, 4.447484089848101, 2.2020922346943936, 1.7029010061897865, 1.6905882631630231, 2.433925494052593, 0.881473230846394, 0.6945609815278929, 0.4163877925897869, 0.0, 5.935272152915463, 4.580265718487656, 3.472804907639464, 2.644419692539181, 4.867850988105186, 2.3668235684282326, 1.7029010061897865, 1.5729230247817099, 2.2237420449240504, 1.660188801321564, 0.9761517671566904, 0.34859232500905474, 0.0), # 164
(5.279976559144014, 3.7375177707373965, 4.773394505818779, 4.867521743584952, 4.348926871486572, 2.155216196518274, 1.6612539057783289, 1.6548983283548488, 2.383197123020528, 0.8608226531178229, 0.678457284045215, 0.4068722052744414, 0.0, 5.803182814171416, 4.475594258018854, 3.3922864202260747, 2.582467959353468, 4.766394246041056, 2.3168576596967885, 1.6612539057783289, 1.5394401403701956, 2.174463435743286, 1.622507247861651, 0.954678901163756, 0.33977434279430885, 0.0), # 165
(5.143136546748318, 3.6352842105905996, 4.657677423285953, 4.746319469974501, 4.242834687764114, 2.1044077464738575, 1.6171330305865146, 1.6161579732723592, 2.328008874832686, 0.8387959556853827, 0.661250985021904, 0.39668156731310017, 0.0, 5.661099052523436, 4.363497240444101, 3.3062549251095197, 2.5163878670561473, 4.656017749665372, 2.262621162581303, 1.6171330305865146, 1.5031483903384697, 2.121417343882057, 1.5821064899915007, 0.9315354846571906, 0.33048038278096364, 0.0), # 166
(4.998676836891619, 3.528235476347844, 4.53421132108447, 4.617560703479906, 4.129754500662389, 2.0499458677558273, 1.57073108864827, 1.5745827347393924, 2.2686737567905064, 0.8154967992665431, 0.6430245088698437, 0.3858658539790306, 0.0, 5.509748307558397, 4.244524393769336, 3.215122544349218, 2.4464903977996286, 4.537347513581013, 2.2044158286351494, 1.57073108864827, 1.4642470483970196, 2.0648772503311945, 1.5391869011599693, 0.9068422642168941, 0.32074867966798587, 0.0), # 167
(4.847225529096317, 3.416792149697761, 4.403599932113832, 4.481846564447728, 4.010233272163062, 1.9921095435588663, 1.5222407879975217, 1.5303881495797866, 2.205504776195428, 0.7910288445787746, 0.6238602800009175, 0.3744750405455008, 0.0, 5.34985801886317, 4.119225446000509, 3.1193014000045878, 2.3730865337363234, 4.411009552390856, 2.1425434094117013, 1.5222407879975217, 1.4229353882563331, 2.005116636081531, 1.4939488548159094, 0.8807199864227666, 0.31061746815434194, 0.0), # 168
(4.689410722884812, 3.3013748123289846, 4.26644698927354, 4.33977817322453, 3.884817964247797, 1.9311777570776578, 1.4718548366681967, 1.4837897546173817, 2.1388149403488903, 0.7654957523395476, 0.6038407228270092, 0.3625591022857782, 0.0, 5.182155626024628, 3.9881501251435596, 3.019203614135046, 2.296487257018642, 4.277629880697781, 2.0773056564643344, 1.4718548366681967, 1.3794126836268983, 1.9424089821238986, 1.4465927244081769, 0.853289397854708, 0.30012498293899864, 0.0), # 169
(4.525860517779507, 3.1824040459301473, 4.12335622546309, 4.191956650156872, 3.7540555388982577, 1.8674294915068832, 1.4197659426942213, 1.435003086676016, 2.0689172565523304, 0.7390011832663317, 0.5830482617600022, 0.3501680144731306, 0.0, 5.007368568629644, 3.8518481592044362, 2.9152413088000113, 2.217003549798995, 4.137834513104661, 2.0090043213464224, 1.4197659426942213, 1.3338782082192022, 1.8770277694491289, 1.3973188833856243, 0.824671245092618, 0.28930945872092256, 0.0), # 170
(4.3572030133028, 3.06030043218988, 3.9749313735819856, 4.038983115591321, 3.61849295809611, 1.801143730041226, 1.3661668141095222, 1.3842436825795277, 1.9961247321071884, 0.7116487980765979, 0.5615653212117798, 0.33735175238082576, 0.0, 4.826224286265092, 3.710869276189083, 2.807826606058899, 2.134946394229793, 3.992249464214377, 1.9379411556113388, 1.3661668141095222, 1.2865312357437328, 1.809246479048055, 1.3463277051971074, 0.7949862747163972, 0.27820913019908006, 0.0), # 171
(4.184066308977092, 2.9354845527968174, 3.8217761665297245, 3.881458689874438, 3.4786771838230153, 1.7325994558753692, 1.3112501589480263, 1.331727079151757, 1.9207503743149028, 0.6835422574878162, 0.5394743255942259, 0.3241602912821315, 0.0, 4.639450218517843, 3.5657632041034453, 2.6973716279711297, 2.050626772463448, 3.8415007486298056, 1.8644179108124599, 1.3112501589480263, 1.237571039910978, 1.7393385919115076, 1.2938195632914795, 0.764355233305945, 0.26686223207243803, 0.0), # 172
(4.007078504324784, 2.808376989439591, 3.664494337205808, 3.7199844933527855, 3.3351551780606408, 1.6620756522039952, 1.25520868524366, 1.2776688132165412, 1.8431071904769127, 0.6547852222174565, 0.5168576993192239, 0.310643606450315, 0.0, 4.44777380497477, 3.417079670953465, 2.584288496596119, 1.9643556666523692, 3.6862143809538255, 1.7887363385031578, 1.25520868524366, 1.187196894431425, 1.6675775890303204, 1.2399948311175955, 0.7328988674411617, 0.25530699903996285, 0.0), # 173
(3.8268676988682753, 2.6793983238068333, 3.503689618509735, 3.5551616463729245, 3.1884739027906486, 1.5898513022217866, 1.1982351010303502, 1.2222844215977202, 1.763508187894657, 0.6254813529829895, 0.4937978667986571, 0.2968516731586446, 0.0, 4.251922485222747, 3.26536840474509, 2.468989333993285, 1.8764440589489682, 3.527016375789314, 1.7111981902368083, 1.1982351010303502, 1.1356080730155618, 1.5942369513953243, 1.1850538821243084, 0.700737923701947, 0.24358166580062124, 0.0), # 174
(3.6440619921299646, 2.548969137587176, 3.3399657433410055, 3.3875912692814207, 3.039180319994703, 1.5162053891234268, 1.1405221143420232, 1.165789441119132, 1.682266373869575, 0.595734310501885, 0.4703772524444093, 0.28283446668038764, 0.0, 4.052623698848646, 3.1111791334842636, 2.3518862622220467, 1.7872029315056546, 3.36453274773915, 1.632105217566785, 1.1405221143420232, 1.0830038493738763, 1.5195901599973516, 1.1291970897604737, 0.6679931486682011, 0.23172446705337968, 0.0), # 175
(3.459289483632255, 2.4175100124692537, 3.173926444599119, 3.2178744824248353, 2.8878213916544695, 1.441416896103598, 1.082262433212606, 1.1083994086046165, 1.5996947557031045, 0.5656477554916135, 0.44667828066836407, 0.268641962288812, 0.0, 3.8506048854393393, 2.9550615851769315, 2.23339140334182, 1.69694326647484, 3.199389511406209, 1.551759172046463, 1.082262433212606, 1.0295834972168558, 1.4439106958272347, 1.0726248274749453, 0.6347852889198239, 0.2197736374972049, 0.0), # 176
(3.273178272897546, 2.2854415301416977, 3.006175455183576, 3.0466124061497295, 2.7349440797516125, 1.365764806356983, 1.0236487656760251, 1.050329860878011, 1.5161063406966853, 0.535325348669645, 0.4227833758824049, 0.2543241352571853, 0.0, 3.6465934845817, 2.7975654878290377, 2.113916879412024, 1.6059760460089345, 3.0322126813933705, 1.4704618052292153, 1.0236487656760251, 0.9755462902549877, 1.3674720398758062, 1.0155374687165768, 0.6012350910367152, 0.20776741183106345, 0.0), # 177
(3.0863564594482376, 2.153184272293141, 2.8373165079938762, 2.87440616080267, 2.581095346267794, 1.2895281030782653, 0.964873819766207, 0.9917963347631552, 1.431814136151756, 0.5048707507534501, 0.39877496249841504, 0.2399309608587752, 0.0, 3.4413169358626017, 2.6392405694465264, 1.993874812492075, 1.51461225226035, 2.863628272303512, 1.3885148686684172, 0.964873819766207, 0.9210915021987609, 1.290547673133897, 0.9581353869342235, 0.5674633015987752, 0.1957440247539219, 0.0), # 178
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 179
)
passenger_allighting_rate = (
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 0
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 1
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 2
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 3
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 4
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 5
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 6
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 7
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 8
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 9
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 10
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 11
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 12
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 13
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 14
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 15
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 16
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 17
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 18
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 19
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 20
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 21
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 22
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 23
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 24
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 25
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 26
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 27
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 28
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 29
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 30
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 31
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 32
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 33
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 34
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 35
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 36
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 37
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 38
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 39
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 40
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 41
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 42
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 43
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 44
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 45
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 46
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 47
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 48
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 49
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 50
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 51
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 52
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 53
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 54
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 55
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 56
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 57
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 58
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 59
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 60
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 61
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 62
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 63
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 64
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 65
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 66
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 67
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 68
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 69
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 70
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 71
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 72
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 73
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 74
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 75
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 76
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 77
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 78
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 79
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 80
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 81
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 82
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 83
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 84
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 85
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 86
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 87
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 88
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 89
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 90
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 91
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 92
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 93
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 94
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 95
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 96
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 97
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 98
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 99
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 100
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 101
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 102
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 103
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 104
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 105
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 106
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 107
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 108
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 109
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 110
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 111
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 112
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 113
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 114
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 115
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 116
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 117
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 118
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 119
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 120
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 121
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 122
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 123
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 124
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 125
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 126
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 127
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 128
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 129
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 130
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 131
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 132
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 133
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 134
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 135
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 136
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 137
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 138
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 139
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 140
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 141
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 142
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 143
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 144
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 145
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 146
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 147
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 148
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 149
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 150
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 151
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 152
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 153
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 154
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 155
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 156
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 157
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 158
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 159
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 160
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 161
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 162
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 163
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 164
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 165
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 166
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 167
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 168
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 169
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 170
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 171
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 172
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 173
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 174
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 175
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 176
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 177
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 178
(0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1, 0, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 0.07692307692307693, 1), # 179
)
"""
parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html
"""
#initial entropy
entropy = 8991598675325360468762009371570610170
#index for seed sequence child
child_seed_index = (
1, # 0
71, # 1
)
| 275.157219 | 493 | 0.768634 | 32,987 | 257,272 | 5.994392 | 0.211993 | 0.360479 | 0.345914 | 0.655416 | 0.380591 | 0.37249 | 0.367923 | 0.366204 | 0.366042 | 0.365951 | 0 | 0.849143 | 0.096139 | 257,272 | 934 | 494 | 275.45182 | 0.0012 | 0.015591 | 0 | 0.200873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.005459 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
73799f33286dcc8dce43e001f996f53d1f904c88 | 18 | py | Python | src/nkmodel/__init__.py | elplatt/elp_nkmodel | 16265a29efe48a388bc15f3003f62fb86ffd7022 | [
"BSD-3-Clause"
] | 1 | 2022-02-17T20:58:58.000Z | 2022-02-17T20:58:58.000Z | src/nkmodel/__init__.py | elplatt/elp_nkmodel | 16265a29efe48a388bc15f3003f62fb86ffd7022 | [
"BSD-3-Clause"
] | null | null | null | src/nkmodel/__init__.py | elplatt/elp_nkmodel | 16265a29efe48a388bc15f3003f62fb86ffd7022 | [
"BSD-3-Clause"
] | 2 | 2021-06-09T05:21:58.000Z | 2022-02-17T20:59:30.000Z | from .nk import *
| 9 | 17 | 0.666667 | 3 | 18 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 18 | 1 | 18 | 18 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
7385a9d64f3a19e562f865e1dbd65785405200b5 | 629 | py | Python | tests/expectations/python-expr/apply-mask-image-exp3.py | nipeone/histolab | 78854423df04c95c7168d03a95ae8665e3e957d8 | [
"Apache-2.0"
] | 149 | 2020-06-23T17:56:04.000Z | 2022-03-26T05:51:08.000Z | tests/expectations/python-expr/apply-mask-image-exp3.py | nipeone/histolab | 78854423df04c95c7168d03a95ae8665e3e957d8 | [
"Apache-2.0"
] | 245 | 2020-06-22T22:56:06.000Z | 2022-03-28T03:18:11.000Z | tests/expectations/python-expr/apply-mask-image-exp3.py | MPBA/histolab | 1dffe88aa04022567c70bbb78f96a860d73a599b | [
"Apache-2.0"
] | 31 | 2020-06-23T17:56:36.000Z | 2022-02-07T07:41:26.000Z | [
[
[23, 153, 214, 226],
[82, 172, 200, 90],
[179, 178, 109, 250],
[178, 23, 132, 171],
[159, 104, 98, 179],
],
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
[
[172, 206, 47, 28],
[185, 136, 220, 130],
[183, 196, 147, 210],
[156, 142, 209, 193],
[135, 0, 153, 39],
],
[
[45, 157, 13, 187],
[98, 234, 128, 112],
[11, 19, 126, 139],
[215, 185, 148, 125],
[66, 240, 220, 101],
],
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
]
| 24.192308 | 75 | 0.324324 | 100 | 629 | 2.04 | 0.52 | 0.372549 | 0.529412 | 0.666667 | 0.196078 | 0.196078 | 0.196078 | 0.196078 | 0.196078 | 0.196078 | 0 | 0.552846 | 0.413355 | 629 | 25 | 76 | 25.16 | 0 | 0 | 0 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
73b81e21e63966b0f1260ba45e8a7db96437534a | 208 | py | Python | SybilRanking/__init__.py | mikeitexpert/osn-sybilranking | 4f4fd65808d39f9e6d1a44ed5fe3b95f17e77aa3 | [
"MIT"
] | 3 | 2019-03-11T15:30:08.000Z | 2021-03-04T18:25:26.000Z | SybilRanking/__init__.py | mikeitexpert/osn-sybilranking | 4f4fd65808d39f9e6d1a44ed5fe3b95f17e77aa3 | [
"MIT"
] | null | null | null | SybilRanking/__init__.py | mikeitexpert/osn-sybilranking | 4f4fd65808d39f9e6d1a44ed5fe3b95f17e77aa3 | [
"MIT"
] | 3 | 2019-10-31T08:52:23.000Z | 2022-03-24T07:32:28.000Z | # name = "SybilRanking"
# from .ranker import ranker
# print( "SybilRanking.__path__ = ", __path__ )
import SybilRanking.ranker
import SybilRanking.model
import SybilRanking.settings
import SybilRanking.test
| 26 | 47 | 0.798077 | 22 | 208 | 7.181818 | 0.454545 | 0.455696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 208 | 7 | 48 | 29.714286 | 0.858696 | 0.451923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
73c270e57ef6198c1f8ac0da53164d47451d706b | 158 | py | Python | info/info/email_info.py | temi4000/Infoeducatie | a6b93c39291411a8dc4c33c60b946629412e7a81 | [
"Apache-2.0"
] | 2 | 2018-07-22T18:51:39.000Z | 2019-05-25T21:24:30.000Z | info/info/email_info.py | TemianMihai/Biosferra | a6b93c39291411a8dc4c33c60b946629412e7a81 | [
"Apache-2.0"
] | 79 | 2018-07-09T08:44:22.000Z | 2018-07-31T21:57:21.000Z | info/info/email_info.py | temi4000/Infoeducatie | a6b93c39291411a8dc4c33c60b946629412e7a81 | [
"Apache-2.0"
] | 1 | 2018-07-26T14:10:17.000Z | 2018-07-26T14:10:17.000Z | EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'biosferra.noreplay@gmail.com'
EMAIL_HOST_PASSWORD = 'qlufedistokkeklp'
EMAIL_PORT = 587
| 26.333333 | 48 | 0.803797 | 23 | 158 | 5.173913 | 0.652174 | 0.226891 | 0.218487 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.020979 | 0.094937 | 158 | 5 | 49 | 31.6 | 0.811189 | 0 | 0 | 0 | 0 | 0 | 0.367089 | 0.177215 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
73e82e6fdd6eac3578fde215ccb3d34c4d09811a | 10,502 | py | Python | tests/components/switch/test_template.py | davidedmundson/home-assistant | cd02563552ffc28239fa17c79a5d9bc0013bd5ac | [
"MIT"
] | null | null | null | tests/components/switch/test_template.py | davidedmundson/home-assistant | cd02563552ffc28239fa17c79a5d9bc0013bd5ac | [
"MIT"
] | null | null | null | tests/components/switch/test_template.py | davidedmundson/home-assistant | cd02563552ffc28239fa17c79a5d9bc0013bd5ac | [
"MIT"
] | 1 | 2018-11-20T17:44:08.000Z | 2018-11-20T17:44:08.000Z | """
tests.components.switch.template
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests template switch.
"""
import homeassistant.components as core
import homeassistant.components.switch as switch
from homeassistant.const import (
STATE_ON,
STATE_OFF)
from tests.common import get_test_home_assistant
class TestTemplateSwitch:
""" Test the Template switch. """
def setup_method(self, method):
self.hass = get_test_home_assistant()
self.calls = []
def record_call(service):
self.calls.append(service)
self.hass.services.register('test', 'automation', record_call)
def teardown_method(self, method):
""" Stop down stuff we started. """
self.hass.stop()
def test_template_state_text(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': {
'value_template':
"{{ states.switch.test_state.state }}",
'turn_on': {
'service': 'switch.turn_on',
'entity_id': 'switch.test_state'
},
'turn_off': {
'service': 'switch.turn_off',
'entity_id': 'switch.test_state'
},
}
}
}
})
state = self.hass.states.set('switch.test_state', STATE_ON)
self.hass.pool.block_till_done()
state = self.hass.states.get('switch.test_template_switch')
assert state.state == STATE_ON
state = self.hass.states.set('switch.test_state', STATE_OFF)
self.hass.pool.block_till_done()
state = self.hass.states.get('switch.test_template_switch')
assert state.state == STATE_OFF
def test_template_state_boolean_on(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': {
'value_template':
"{{ 1 == 1 }}",
'turn_on': {
'service': 'switch.turn_on',
'entity_id': 'switch.test_state'
},
'turn_off': {
'service': 'switch.turn_off',
'entity_id': 'switch.test_state'
},
}
}
}
})
state = self.hass.states.get('switch.test_template_switch')
assert state.state == STATE_ON
def test_template_state_boolean_off(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': {
'value_template':
"{{ 1 == 2 }}",
'turn_on': {
'service': 'switch.turn_on',
'entity_id': 'switch.test_state'
},
'turn_off': {
'service': 'switch.turn_off',
'entity_id': 'switch.test_state'
},
}
}
}
})
state = self.hass.states.get('switch.test_template_switch')
assert state.state == STATE_OFF
def test_template_syntax_error(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': {
'value_template':
"{% if rubbish %}",
'turn_on': {
'service': 'switch.turn_on',
'entity_id': 'switch.test_state'
},
'turn_off': {
'service': 'switch.turn_off',
'entity_id': 'switch.test_state'
},
}
}
}
})
state = self.hass.states.set('switch.test_state', STATE_ON)
self.hass.pool.block_till_done()
state = self.hass.states.get('switch.test_template_switch')
assert state.state == 'unavailable'
def test_invalid_name_does_not_create(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test INVALID switch': {
'value_template':
"{{ rubbish }",
'turn_on': {
'service': 'switch.turn_on',
'entity_id': 'switch.test_state'
},
'turn_off': {
'service': 'switch.turn_off',
'entity_id': 'switch.test_state'
},
}
}
}
})
assert self.hass.states.all() == []
def test_invalid_switch_does_not_create(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': 'Invalid'
}
}
})
assert self.hass.states.all() == []
def test_no_switches_does_not_create(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template'
}
})
assert self.hass.states.all() == []
def test_missing_template_does_not_create(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': {
'not_value_template':
"{{ states.switch.test_state.state }}",
'turn_on': {
'service': 'switch.turn_on',
'entity_id': 'switch.test_state'
},
'turn_off': {
'service': 'switch.turn_off',
'entity_id': 'switch.test_state'
},
}
}
}
})
assert self.hass.states.all() == []
def test_missing_on_does_not_create(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': {
'value_template':
"{{ states.switch.test_state.state }}",
'not_on': {
'service': 'switch.turn_on',
'entity_id': 'switch.test_state'
},
'turn_off': {
'service': 'switch.turn_off',
'entity_id': 'switch.test_state'
},
}
}
}
})
assert self.hass.states.all() == []
def test_missing_off_does_not_create(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': {
'value_template':
"{{ states.switch.test_state.state }}",
'turn_on': {
'service': 'switch.turn_on',
'entity_id': 'switch.test_state'
},
'not_off': {
'service': 'switch.turn_off',
'entity_id': 'switch.test_state'
},
}
}
}
})
assert self.hass.states.all() == []
def test_on_action(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': {
'value_template':
"{{ states.switch.test_state.state }}",
'turn_on': {
'service': 'test.automation'
},
'turn_off': {
'service': 'switch.turn_off',
'entity_id': 'switch.test_state'
},
}
}
}
})
self.hass.states.set('switch.test_state', STATE_OFF)
self.hass.pool.block_till_done()
state = self.hass.states.get('switch.test_template_switch')
assert state.state == STATE_OFF
core.switch.turn_on(self.hass, 'switch.test_template_switch')
self.hass.pool.block_till_done()
assert 1 == len(self.calls)
def test_off_action(self):
assert switch.setup(self.hass, {
'switch': {
'platform': 'template',
'switches': {
'test_template_switch': {
'value_template':
"{{ states.switch.test_state.state }}",
'turn_on': {
'service': 'switch.turn_on',
'entity_id': 'switch.test_state'
},
'turn_off': {
'service': 'test.automation'
},
}
}
}
})
self.hass.states.set('switch.test_state', STATE_ON)
self.hass.pool.block_till_done()
state = self.hass.states.get('switch.test_template_switch')
assert state.state == STATE_ON
core.switch.turn_off(self.hass, 'switch.test_template_switch')
self.hass.pool.block_till_done()
assert 1 == len(self.calls)
| 34.097403 | 70 | 0.410684 | 820 | 10,502 | 4.990244 | 0.087805 | 0.082111 | 0.106305 | 0.079179 | 0.831378 | 0.821848 | 0.821848 | 0.814516 | 0.805474 | 0.805474 | 0 | 0.001088 | 0.474862 | 10,502 | 307 | 71 | 34.208469 | 0.740888 | 0.013807 | 0 | 0.636364 | 0 | 0 | 0.231208 | 0.040921 | 0 | 0 | 0 | 0 | 0.102273 | 1 | 0.056818 | false | 0 | 0.015152 | 0 | 0.075758 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
fb54a673ffd03462308ea1e265b2b2ecb7bedfb7 | 204 | py | Python | dace/libraries/pblas/__init__.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | 227 | 2019-03-15T23:39:06.000Z | 2022-03-30T07:49:08.000Z | dace/libraries/pblas/__init__.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | 834 | 2019-07-31T22:49:31.000Z | 2022-03-28T14:01:32.000Z | dace/libraries/pblas/__init__.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | 64 | 2019-03-19T05:40:37.000Z | 2022-03-11T15:02:42.000Z | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
from dace.library import register_library
from .nodes import *
from .environments import *
register_library(__name__, "pblas")
| 29.142857 | 75 | 0.79902 | 28 | 204 | 5.607143 | 0.714286 | 0.178344 | 0.267516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.045198 | 0.132353 | 204 | 6 | 76 | 34 | 0.841808 | 0.357843 | 0 | 0 | 0 | 0 | 0.03876 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.75 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
fb5a74ab5e8a4f2fb413c6039661a24d31ce884d | 34 | py | Python | random2.py | spitis/stable-baselines | f62cd6698b2427c0fb5ac452b9059a59b22cde81 | [
"MIT"
] | null | null | null | random2.py | spitis/stable-baselines | f62cd6698b2427c0fb5ac452b9059a59b22cde81 | [
"MIT"
] | 2 | 2018-11-14T22:53:17.000Z | 2018-11-15T00:06:40.000Z | random2.py | spitis/stable-baselines | f62cd6698b2427c0fb5ac452b9059a59b22cde81 | [
"MIT"
] | null | null | null | import tensorflow
print('hi tf')
| 8.5 | 17 | 0.735294 | 5 | 34 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147059 | 34 | 3 | 18 | 11.333333 | 0.862069 | 0 | 0 | 0 | 0 | 0 | 0.147059 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 6 |
fbc720a87a6ced96ed233ff39d2a776b9d2b25d2 | 226 | py | Python | python/1186.encode-and-decode-tinyurl.py | Ubastic/lintcode | 9f600eece075410221a24859331a810503c76014 | [
"MIT"
] | 6 | 2019-10-02T02:24:49.000Z | 2021-11-18T10:08:07.000Z | python/1186.encode-and-decode-tinyurl.py | Ubastic/lintcode | 9f600eece075410221a24859331a810503c76014 | [
"MIT"
] | 1 | 2020-02-28T03:42:36.000Z | 2020-03-07T09:26:00.000Z | src/1186.encode-and-decode-tinyurl/1186.encode-and-decode-tinyurl.py | jiangshanmeta/lintcode | 7d7003825b5a7b9fd5b0be57aa2d84391e0d1fa5 | [
"MIT"
] | 2 | 2020-07-25T08:42:38.000Z | 2021-05-07T06:16:46.000Z | class Solution:
def encode(self, longUrl):
# Encodes a URL to a shortened URL.
return longUrl
def decode(self, shortUrl):
# Decodes a shortened URL to its original URL.
return shortUrl
| 25.111111 | 54 | 0.632743 | 29 | 226 | 4.931034 | 0.586207 | 0.06993 | 0.181818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.309735 | 226 | 8 | 55 | 28.25 | 0.916667 | 0.345133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0.4 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
8394a34165e880feea2cdd7b4177973bbcb51274 | 54 | py | Python | argostranslatefiles/__init__.py | PJ-Finlay/argos-translate-files | 0753eccfbbc6d9d88ecabe6eddc4d39ac4c39e2d | [
"MIT"
] | 5 | 2021-11-08T18:50:27.000Z | 2022-03-28T14:12:19.000Z | argostranslatefiles/__init__.py | PJ-Finlay/argos-translate-files | 0753eccfbbc6d9d88ecabe6eddc4d39ac4c39e2d | [
"MIT"
] | 1 | 2021-12-26T08:13:48.000Z | 2021-12-26T13:33:47.000Z | argostranslatefiles/__init__.py | PJ-Finlay/argos-translate-files | 0753eccfbbc6d9d88ecabe6eddc4d39ac4c39e2d | [
"MIT"
] | 2 | 2021-11-08T18:50:38.000Z | 2021-12-25T20:52:28.000Z | from argostranslatefiles.argostranslatefiles import *
| 27 | 53 | 0.888889 | 4 | 54 | 12 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.074074 | 54 | 1 | 54 | 54 | 0.96 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
83eec13763de06117eb87bc69ed5b63d4ec3f9c3 | 2,900 | py | Python | colour/appearance/__init__.py | JGoldstone/colour | 6829b363d5f0682bff0f4826995e7ceac189ff28 | [
"BSD-3-Clause"
] | null | null | null | colour/appearance/__init__.py | JGoldstone/colour | 6829b363d5f0682bff0f4826995e7ceac189ff28 | [
"BSD-3-Clause"
] | null | null | null | colour/appearance/__init__.py | JGoldstone/colour | 6829b363d5f0682bff0f4826995e7ceac189ff28 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from .hunt import (
InductionFactors_Hunt,
VIEWING_CONDITIONS_HUNT,
CAM_Specification_Hunt,
XYZ_to_Hunt,
)
from .atd95 import CAM_Specification_ATD95, XYZ_to_ATD95
from .ciecam02 import (
InductionFactors_CIECAM02,
VIEWING_CONDITIONS_CIECAM02,
CAM_KWARGS_CIECAM02_sRGB,
CAM_Specification_CIECAM02,
XYZ_to_CIECAM02,
CIECAM02_to_XYZ,
)
from .cam16 import (
InductionFactors_CAM16,
VIEWING_CONDITIONS_CAM16,
CAM_Specification_CAM16,
XYZ_to_CAM16,
CAM16_to_XYZ,
)
from .hke import (
HKE_NAYATANI1997_METHODS,
HelmholtzKohlrausch_effect_object_Nayatani1997,
HelmholtzKohlrausch_effect_luminous_Nayatani1997,
)
from .hke import coefficient_q_Nayatani1997, coefficient_K_Br_Nayatani1997
from .kim2009 import (
InductionFactors_Kim2009,
VIEWING_CONDITIONS_KIM2009,
MediaParameters_Kim2009,
MEDIA_PARAMETERS_KIM2009,
CAM_Specification_Kim2009,
XYZ_to_Kim2009,
Kim2009_to_XYZ,
)
from .llab import (
InductionFactors_LLAB,
VIEWING_CONDITIONS_LLAB,
CAM_Specification_LLAB,
XYZ_to_LLAB,
)
from .nayatani95 import CAM_Specification_Nayatani95, XYZ_to_Nayatani95
from .rlab import (
VIEWING_CONDITIONS_RLAB,
D_FACTOR_RLAB,
CAM_Specification_RLAB,
XYZ_to_RLAB,
)
from .zcam import (
InductionFactors_ZCAM,
VIEWING_CONDITIONS_ZCAM,
CAM_Specification_ZCAM,
XYZ_to_ZCAM,
ZCAM_to_XYZ,
)
__all__ = [
'InductionFactors_Hunt',
'VIEWING_CONDITIONS_HUNT',
'CAM_Specification_Hunt',
'XYZ_to_Hunt',
]
__all__ += [
'CAM_Specification_ATD95',
'XYZ_to_ATD95',
]
__all__ += [
'InductionFactors_CIECAM02',
'VIEWING_CONDITIONS_CIECAM02',
'CAM_KWARGS_CIECAM02_sRGB',
'CAM_Specification_CIECAM02',
'XYZ_to_CIECAM02',
'CIECAM02_to_XYZ',
]
__all__ += [
'InductionFactors_CAM16',
'VIEWING_CONDITIONS_CAM16',
'CAM_Specification_CAM16',
'XYZ_to_CAM16',
'CAM16_to_XYZ',
]
__all__ += [
'HKE_NAYATANI1997_METHODS',
'HelmholtzKohlrausch_effect_object_Nayatani1997',
'HelmholtzKohlrausch_effect_luminous_Nayatani1997',
]
__all__ += [
'coefficient_q_Nayatani1997',
'coefficient_K_Br_Nayatani1997',
]
__all__ += [
'InductionFactors_Kim2009',
'VIEWING_CONDITIONS_KIM2009',
'MediaParameters_Kim2009',
'MEDIA_PARAMETERS_KIM2009',
'CAM_Specification_Kim2009',
'XYZ_to_Kim2009',
'Kim2009_to_XYZ',
]
__all__ += [
'InductionFactors_LLAB',
'VIEWING_CONDITIONS_LLAB',
'CAM_Specification_LLAB',
'XYZ_to_LLAB',
]
__all__ += [
'CAM_Specification_Nayatani95',
'XYZ_to_Nayatani95',
]
__all__ += [
'VIEWING_CONDITIONS_RLAB',
'D_FACTOR_RLAB',
'CAM_Specification_RLAB',
'XYZ_to_RLAB',
]
__all__ += [
'InductionFactors_ZCAM',
'VIEWING_CONDITIONS_ZCAM',
'CAM_Specification_ZCAM',
'XYZ_to_ZCAM',
'ZCAM_to_XYZ',
]
| 22.834646 | 74 | 0.735172 | 305 | 2,900 | 6.288525 | 0.131148 | 0.150156 | 0.016684 | 0.037539 | 0.890511 | 0.890511 | 0.815433 | 0.763295 | 0.763295 | 0.763295 | 0 | 0.070889 | 0.177931 | 2,900 | 126 | 75 | 23.015873 | 0.733641 | 0.007241 | 0 | 0.081301 | 0 | 0 | 0.326382 | 0.264164 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.089431 | 0 | 0.089431 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
8600f11d58ca40e3c274297b0d75e4888c620f0b | 26 | py | Python | source/rpg_game/__init__.py | caitlingbailey/python-oop | 4d853bdc90bba76dc205effd4c5b3830bc114d3e | [
"MIT"
] | null | null | null | source/rpg_game/__init__.py | caitlingbailey/python-oop | 4d853bdc90bba76dc205effd4c5b3830bc114d3e | [
"MIT"
] | null | null | null | source/rpg_game/__init__.py | caitlingbailey/python-oop | 4d853bdc90bba76dc205effd4c5b3830bc114d3e | [
"MIT"
] | null | null | null | from .main import rpg_game | 26 | 26 | 0.846154 | 5 | 26 | 4.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 26 | 1 | 26 | 26 | 0.913043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
86011f52f9f7662cffe7016ecdab9966c6d8903d | 89 | py | Python | Chapter 08/ch8_17.py | bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE | f6a4194684515495d00aa38347a725dd08f39a0c | [
"MIT"
] | null | null | null | Chapter 08/ch8_17.py | bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE | f6a4194684515495d00aa38347a725dd08f39a0c | [
"MIT"
] | null | null | null | Chapter 08/ch8_17.py | bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE | f6a4194684515495d00aa38347a725dd08f39a0c | [
"MIT"
] | null | null | null | num=[10,20]
n= 30
num.append(n)
m=40
num.append(m)
print(num)
#[10,20,30,40] | 11.125 | 19 | 0.550562 | 19 | 89 | 2.578947 | 0.473684 | 0.204082 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.231884 | 0.224719 | 89 | 8 | 20 | 11.125 | 0.478261 | 0.146067 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.166667 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f7a7974084152f2142df22345332892195f74b8e | 111 | py | Python | excript/aulas/aula96_funcao_aninhada.py | victorers1/anotacoes_curso_python | c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e | [
"MIT"
] | null | null | null | excript/aulas/aula96_funcao_aninhada.py | victorers1/anotacoes_curso_python | c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e | [
"MIT"
] | null | null | null | excript/aulas/aula96_funcao_aninhada.py | victorers1/anotacoes_curso_python | c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e | [
"MIT"
] | null | null | null | def func():
print("func")
def func_interna():
print("func_interna")
func_interna()
func() | 13.875 | 29 | 0.576577 | 13 | 111 | 4.692308 | 0.307692 | 0.540984 | 0.491803 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.261261 | 111 | 8 | 30 | 13.875 | 0.743902 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0 | 0 | 0.333333 | 0.333333 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f7a8b316b4a0c2c4a51b054b9f020b35a4286d96 | 10,285 | py | Python | scale/metrics/test/test_views.py | kfconsultant/scale | 28618aee07ceed9e4a6eb7b8d0e6f05b31d8fd6b | [
"Apache-2.0"
] | null | null | null | scale/metrics/test/test_views.py | kfconsultant/scale | 28618aee07ceed9e4a6eb7b8d0e6f05b31d8fd6b | [
"Apache-2.0"
] | null | null | null | scale/metrics/test/test_views.py | kfconsultant/scale | 28618aee07ceed9e4a6eb7b8d0e6f05b31d8fd6b | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from __future__ import absolute_import
import json
import django
import django.utils.timezone as timezone
import datetime
from rest_framework import status
from rest_framework.test import APITestCase, APITransactionTestCase
import job.test.utils as job_test_utils
import metrics.test.utils as metrics_test_utils
from util import rest
class TestMetricsViewV6(APITestCase):
def setUp(self):
django.setup()
rest.login_client(self.client)
def test_successful(self):
"""Tests successfully calling the metrics view."""
url = '/v6/metrics/'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertGreaterEqual(len(result['results']), 1)
for entry in result['results']:
if entry['name'] == 'job-types':
self.assertGreaterEqual(len(entry['groups']), 1)
self.assertGreaterEqual(len(entry['columns']), 1)
self.assertFalse('choices' in entry)
class TestMetricsViewV6(APITestCase):
def setUp(self):
django.setup()
rest.login_client(self.client)
def test_successful(self):
"""Tests successfully calling the metrics view."""
url = '/v6/metrics/'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertGreaterEqual(len(result['results']), 1)
for entry in result['results']:
if entry['name'] == 'job-types':
self.assertGreaterEqual(len(entry['groups']), 1)
self.assertGreaterEqual(len(entry['columns']), 1)
self.assertFalse('choices' in entry)
class TestMetricDetailsViewV6(APITransactionTestCase):
def setUp(self):
django.setup()
rest.login_client(self.client)
job_test_utils.create_seed_job_type()
def test_successful(self):
"""Tests successfully calling the metric details view."""
url = '/v6/metrics/job-types/'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertEqual(result['name'], 'job-types')
self.assertGreaterEqual(len(result['groups']), 1)
self.assertGreaterEqual(len(result['columns']), 1)
self.assertEqual(len(result['choices']), 1)
class TestMetricPlotViewV6(APITransactionTestCase):
def setUp(self):
django.setup()
rest.login_client(self.client)
self.job_type1 = job_test_utils.create_seed_job_type()
metrics_test_utils.create_job_type(job_type=self.job_type1, completed_count=8, failed_count=2, total_count=10)
self.job_type2 = job_test_utils.create_seed_job_type()
metrics_test_utils.create_job_type(job_type=self.job_type2, job_time_sum=220, job_time_min=20, job_time_max=200,
job_time_avg=110)
self.job_type3 = job_test_utils.create_seed_job_type()
metrics_test_utils.create_job_type(job_type=self.job_type3, job_time_sum=1100, job_time_min=100,
job_time_max=1000, job_time_avg=550)
def test_successful(self):
"""Tests successfully calling the metric plot view."""
url = '/v6/metrics/job-types/plot-data/'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertGreaterEqual(len(result['results']), 1)
for entry in result['results']:
self.assertIsNotNone(entry['values'])
if entry['values']:
self.assertIsNotNone(entry['column'])
self.assertIsNotNone(entry['min_x'])
self.assertIsNotNone(entry['max_x'])
self.assertIsNotNone(entry['min_y'])
self.assertIsNotNone(entry['max_y'])
self.assertFalse('id' in entry['values'][0])
def test_choices(self):
"""Tests successfully calling the metric plot view with choice filters."""
url = '/v6/metrics/job-types/plot-data/?choice_id=%s&choice_id=%s' % (self.job_type1.id, self.job_type2.id)
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertGreaterEqual(len(result['results']), 1)
job_type_ids = [self.job_type1.id, self.job_type2.id]
for entry in result['results']:
self.assertIsNotNone(entry['values'])
if entry['values']:
self.assertIsNotNone(entry['column'])
self.assertIsNotNone(entry['min_x'])
self.assertIsNotNone(entry['max_x'])
self.assertIsNotNone(entry['min_y'])
self.assertIsNotNone(entry['max_y'])
self.assertIn(entry['values'][0]['id'], job_type_ids)
def test_single_choice(self):
"""Tests successfully calling the metric plot view with a single choice filter."""
url = '/v6/metrics/job-types/plot-data/?choice_id=%s' % self.job_type1.id
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertGreaterEqual(len(result['results']), 1)
for entry in result['results']:
self.assertIsNotNone(entry['values'])
if entry['values']:
self.assertIsNotNone(entry['column'])
self.assertIsNotNone(entry['min_x'])
self.assertIsNotNone(entry['max_x'])
self.assertIsNotNone(entry['min_y'])
self.assertIsNotNone(entry['max_y'])
self.assertEqual(entry['values'][0]['id'], self.job_type1.id)
def test_columns(self):
"""Tests successfully calling the metric plot view with column filters."""
url = '/v6/metrics/job-types/plot-data/?column=completed_count&column=failed_count'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertEqual(len(result['results']), 2)
def test_groups(self):
"""Tests successfully calling the metric plot view with group filters."""
url = '/v6/metrics/job-types/plot-data/?group=overview'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertEqual(len(result['results']), 4)
def test_aggregate_sum(self):
"""Tests successfully calling the metric plot view using a sum aggregate."""
url = '/v6/metrics/job-types/plot-data/?column=job_time_sum'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertEqual(len(result['results']), 1)
self.assertEqual(result['results'][0]['values'][0]['value'], 1320)
def test_aggregate_min(self):
"""Tests successfully calling the metric plot view using a minimum aggregate."""
url = '/v6/metrics/job-types/plot-data/?column=job_time_min'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertEqual(len(result['results']), 1)
self.assertEqual(result['results'][0]['values'][0]['value'], 20)
def test_aggregate_max(self):
"""Tests successfully calling the metric plot view using a maximum aggregate."""
url = '/v6/metrics/job-types/plot-data/?column=job_time_max'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertEqual(len(result['results']), 1)
self.assertEqual(result['results'][0]['values'][0]['value'], 1000)
def test_aggregate_avg(self):
"""Tests successfully calling the metric plot view using an average aggregate."""
url = '/v6/metrics/job-types/plot-data/?column=job_time_avg'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertEqual(len(result['results']), 1)
self.assertEqual(result['results'][0]['values'][0]['value'], 330)
def test_by_hour(self):
"""Tests successfully binning the metric plot view by hour."""
# Create job type for two hours prior
job_type4 = job_test_utils.create_seed_job_type()
occurred = timezone.now() - datetime.timedelta(hours=2)
metrics_test_utils.create_job_type(job_type=job_type4, occurred=occurred, job_time_sum=2200, job_time_min=200,
job_time_max=2000, job_time_avg=200)
# Create job type for one hour prior
job_type5 = job_test_utils.create_seed_job_type()
occurred = timezone.now() - datetime.timedelta(hours=1)
metrics_test_utils.create_job_type(job_type=job_type5, occurred=occurred, job_time_sum=1100, job_time_min=100,
job_time_max=1000, job_time_avg=100)
url = '/v6/metrics/job-types/plot-data/?column=job_time_avg'
response = self.client.generic('GET', url)
self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)
result = json.loads(response.content)
self.assertEqual(len(result['results']), 1)
self.assertEqual(len(result['results'][0]['values']), 3)
| 40.976096 | 120 | 0.651726 | 1,253 | 10,285 | 5.177973 | 0.107741 | 0.064735 | 0.066584 | 0.050092 | 0.827219 | 0.809494 | 0.800092 | 0.78807 | 0.765721 | 0.699137 | 0 | 0.022069 | 0.224599 | 10,285 | 251 | 121 | 40.976096 | 0.791473 | 0.087409 | 0 | 0.625 | 0 | 0 | 0.11191 | 0.057833 | 0 | 0 | 0 | 0 | 0.363095 | 1 | 0.10119 | false | 0 | 0.065476 | 0 | 0.190476 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f7c678bda9151ec3869781121531b964cfcdf796 | 887 | py | Python | nesmdb/convert.py | youngmg1995/NES-Music-Maker | aeda10a541cfd439cfa46c45e63411e0d98e41c1 | [
"MIT"
] | 3 | 2020-06-26T22:02:35.000Z | 2021-11-20T19:24:33.000Z | nesmdb/convert.py | youngmg1995/NES-Music-Maker | aeda10a541cfd439cfa46c45e63411e0d98e41c1 | [
"MIT"
] | null | null | null | nesmdb/convert.py | youngmg1995/NES-Music-Maker | aeda10a541cfd439cfa46c45e63411e0d98e41c1 | [
"MIT"
] | null | null | null | import nesmdb.vgm
import nesmdb.score
def seprsco_to_vgm(seprsco):
exprsco = nesmdb.score.seprsco_to_exprsco(seprsco)
rawsco = nesmdb.score.exprsco_to_rawsco(exprsco)
ndf = nesmdb.score.rawsco_to_ndf(rawsco)
ndr = nesmdb.vgm.ndf_to_ndr(ndf)
vgm = nesmdb.vgm.ndr_to_vgm(ndr)
return vgm
def seprsco_to_wav(seprsco):
exprsco = nesmdb.score.seprsco_to_exprsco(seprsco)
rawsco = nesmdb.score.exprsco_to_rawsco(exprsco)
ndf = nesmdb.score.rawsco_to_ndf(rawsco)
ndr = nesmdb.vgm.ndf_to_ndr(ndf)
vgm = nesmdb.vgm.ndr_to_vgm(ndr)
wav = nesmdb.vgm.vgm_to_wav(vgm)
return wav
def blndsco_to_wav(blndsco):
exprsco = nesmdb.score.blndsco_to_exprsco(blndsco)
rawsco = nesmdb.score.exprsco_to_rawsco(exprsco)
ndf = nesmdb.score.rawsco_to_ndf(rawsco)
ndr = nesmdb.vgm.ndf_to_ndr(ndf)
vgm = nesmdb.vgm.ndr_to_vgm(ndr)
wav = nesmdb.vgm.vgm_to_wav(vgm)
return wav | 31.678571 | 52 | 0.768884 | 146 | 887 | 4.39726 | 0.09589 | 0.17134 | 0.084112 | 0.11215 | 0.791277 | 0.791277 | 0.791277 | 0.791277 | 0.791277 | 0.791277 | 0 | 0 | 0.122886 | 887 | 28 | 53 | 31.678571 | 0.825193 | 0 | 0 | 0.72 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.12 | false | 0 | 0.08 | 0 | 0.32 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f7eb24935af516bf0c1e47e2fa0006ba5f75b447 | 30,666 | py | Python | nustar_gen/wrappers.py | rmludlam/nustar-gen-utils | 96e76f7bf4c16fb0bb7d1d99fdfdaa0f6010b320 | [
"MIT"
] | null | null | null | nustar_gen/wrappers.py | rmludlam/nustar-gen-utils | 96e76f7bf4c16fb0bb7d1d99fdfdaa0f6010b320 | [
"MIT"
] | null | null | null | nustar_gen/wrappers.py | rmludlam/nustar-gen-utils | 96e76f7bf4c16fb0bb7d1d99fdfdaa0f6010b320 | [
"MIT"
] | null | null | null | import os, stat
import warnings
from nustar_gen.utils import energy_to_chan, validate_det1_region
from astropy import units as u
def make_spectra(infile, mod, src_reg,
mode='01', bgd_reg='None', outpath='None', runmkarf='yes', extended='no'):
'''
Generate a script to run nuproducts to extract a source (and optionally
a background) spectrum along with their response files.
Always runs numkrmf and numkarf for now.
Parameters
----------
infile: str
Full path to the input event file.
mod: str
'A' or 'B'
src_reg: str
Full path to source region.
Other Parameters
-------------------
bgd_reg: str
If not 'None', then must be the full path to the background region file
barycorr: bool
outpath: str
Optional. Default is to put the lightcurves in the same location as infile
mode: str
Optional. Used primarily if you're doing mode06 analysis and need to specify
output names that are more complicated.
'''
from astropy.io.fits import getheader
# Make sure environment is set up properly
_check_environment()
# Check to see that all files exist:
assert os.path.isfile(infile), 'make_spectra: infile does not exist!'
assert os.path.isfile(src_reg), 'make_spectra: src_reg does not exist!'
if bgd_reg != 'None':
assert os.path.isfile(bgd_reg), 'make_spectra: bgd_reg does not exist!'
bkgextract='yes'
else:
bkgextract='no'
reg_base = os.path.basename(src_reg)
reg_base = os.path.splitext(reg_base)[0]
evdir = os.path.dirname(infile)
seqid = os.path.basename(os.path.dirname(evdir))
if outpath == 'None':
outdir = evdir
else:
outdir = outpath
try:
os.makedirs(outpath)
except FileExistsError:
# directory already exists
pass
stemout = f'nu{seqid}{mod}{mode}_{reg_base}'
lc_script = outdir+f'/runspec_{stemout}.sh'
with open(lc_script, 'w') as f:
f.write('nuproducts imagefile=NONE lcfile=NONE bkglcfile=NONE ')
f.write(f'runmkarf={runmkarf} extended={extended} runmkrmf=yes ')
f.write(f'indir={evdir} outdir={outdir} instrument=FPM{mod} ')
f.write(f'steminputs=nu{seqid} stemout={stemout} ')
f.write(f'srcregionfile={src_reg} ')
if bkgextract == 'no':
f.write(f'bkgextract=no ')
else:
f.write(f'bkgextract=yes bkgregionfile={bgd_reg} ')
f.write('clobber=yes')
os.chmod(lc_script, stat.S_IRWXG+stat.S_IRWXU)
return lc_script
def make_lightcurve(infile, mod, src_reg,
barycorr=False, time_bin=100*u.s, mode='01',
bgd_reg='None', outpath='None', elow=3, ehigh=20):
'''
Generate a script to run nuproducts
Parameters
----------
infile: str
Full path to the input event file.
mod: str
'A' or 'B'
src_reg: str
Full path to source region.
Other Parameters
-------------------
bgd_reg: str
If not 'None', then must be the full path to the background region file
barycorr: bool
Default is 'False'. If 'True', then queries the infile for the OBJ J2000
coordinates and uses these for the barycenter correction.
elow: float
Low-eneryg bound. Default is 3 keV.
ehigh: float
High-energy bound. Default is 20 keV.
outpath: str
Optional. Default is to put the lightcurves in the same location as infile
mode: str
Optional. Used primarily if you're doing mode06 analysis and need to specify
output names that are more complicated.
'''
from astropy.io.fits import getheader
# Make sure environment is set up properly
_check_environment()
# Check to see that all files exist:
assert os.path.isfile(infile), 'make_lightcurve: infile does not exist!'
assert os.path.isfile(src_reg), 'make_lightcurve: src_reg does not exist!'
if bgd_reg != 'None':
assert os.path.isfile(bgd_reg), 'make_lightcurve: bgd_reg does not exist!'
bkgextract='yes'
else:
bkgextract='no'
reg_base = os.path.basename(src_reg)
reg_base = os.path.splitext(reg_base)[0]
evdir = os.path.dirname(infile)
seqid = os.path.basename(os.path.dirname(evdir))
if outpath == 'None':
outdir = evdir
else:
outdir = outpath
try:
os.makedirs(outdir)
except FileExistsError:
# directory already exists
pass
time_bin = (time_bin.to(u.s)).value
stemout = f'nu{seqid}{mod}{mode}_{reg_base}_{elow}to{ehigh}_{time_bin:3.4}s'
lc_script = outdir+f'/runlc_{stemout}.sh'
pi_low = energy_to_chan(elow)
pi_high = energy_to_chan(ehigh)
with open(lc_script, 'w') as f:
f.write('nuproducts phafile=NONE bkgphafile=NONE imagefile=NONE ')
f.write(f'runmkarf=no runmkrmf=no pilow={pi_low} pihigh={pi_high} ')
f.write(f'indir={evdir} outdir={outdir} instrument=FPM{mod} ')
f.write(f'steminputs=nu{seqid} stemout={stemout} ')
f.write(f'srcregionfile={src_reg} ')
if bkgextract == 'no':
f.write(f'bkgextract=no ')
else:
f.write(f'bkgextract=yes bkgregionfile={bgd_reg} ')
f.write(f'binsize={time_bin} ')
if barycorr:
attorb=evdir+f'/nu{seqid}{mod}.attorb'
hdr = getheader(infile)
ra = hdr['RA_OBJ']
dec = hdr['DEC_OBJ']
f.write(f'barycorr=yes srcra_barycorr={ra} srcdec_barycorr={dec} ')
f.write(f'orbitfile={attorb} ')
f.write('clobber=yes')
os.chmod(lc_script, stat.S_IRWXG+stat.S_IRWXU)
return lc_script
def make_exposure_map(obs, mod, vign_energy = False,
det_expo=False, evf=False):
'''
Create a script to run nuexpoomap. Returns the script name.
Parameters
----------
obs: nustar_gen.info.Observation(), required
A valid observation metadata.
mod: str
'A' or 'B'
Other Parameters
----------------
vign_energy: float, optional
Energy where you want to apply the vignetting. Default is no vignetting.
det_expo : boolean, optional, default=False
Whether or not to retain the DET1 exposure map file
'''
import glob
# Make sure environment is set up properly
_check_environment()
# Locate the mast file, attfile, which are what you need for inputs.
evdir = obs.evdir
# Find the mast file. glob is necessary to handle .gz or .fits extensions:
mastaspectfile = glob.glob(evdir+'/nu'+obs.seqid+'*mast*')[0]
# Find the attitude file:
attfile = glob.glob(evdir+'/nu'+obs.seqid+'*att.fits')[0]
# Find the det1reffile:
det1reffile = glob.glob(evdir+'/nu'+obs.seqid+mod+'_det1.fits')[0]
# Only do this for A01, since that's all that matters
# Override this with evfile keyword:
if evf is False:
evfile = obs.science_files[mod][0]
assert '01' in evfile, f'make_exposure_map: Not an 01 event file: {evfile}'
else:
evfile=evf
# Construct the nuexpomap call:
print(obs.seqid, mod)
expo_script = obs.out_path+'/runexpo_'+obs.seqid+mod+'.sh'
expo = open(expo_script, 'w')
cmd_string = 'nuexpomap '
cmd_string += f'infile={evfile} '
if vign_energy is not False:
cmd_string+=f'vignflag=yes energy={vign_energy} '
else:
cmd_string += 'vignflag=no '
cmd_string += f'mastaspectfile={mastaspectfile} '
cmd_string += f'attfile={attfile} '
cmd_string += f'det1reffile={det1reffile} '
sky_expo_file = obs.out_path+'/nu'+obs.seqid+mod+'_sky_expo.fits'
cmd_string += f'expomapfile={sky_expo_file} '
if det_expo:
det_expo_file = obs.out_path+'/nu'+obs.seqid+mod+'_det1_expo.fits'
cmd_string += f'det1instrfile={det_expo_file} '
cmd_string += 'clobber=yes '
expo.write(cmd_string)
expo.close()
os.chmod(expo_script, stat.S_IRWXG+stat.S_IRWXU)
return expo_script
def make_image(infile, elow = 3, ehigh = 20, clobber=True, outpath=False, usrgti=False):
'''
Spawn an xselect instance that produces the image in the energy range.
Parameters
----------
infile: str
Full path tot eh file that you want to process
elow: float
Low-energy band for the image
ehigh: float
High-energy band for the image
Other Parameters
----------------
clobber: boolean, optional, default=True
Overwrite existing files?
outpath: str, optional, default=os.path.dirname(infile)
Set the destination for output. Defaults to same location as infile.
usrgti : str, optional, default = False
Use a GTI file to time-fitler the data (see nustar_gen.utils.make_usr_gti)
If False, do nothing.
Return
-------
outfile: str
The full path to the output image.
'''
# Make sure environment is set up properly
_check_environment()
# Check if input file exists:
try:
with open(infile) as f:
pass
except IOError:
raise IOError("make_image: File does not exist %s" % (infile))
if not outpath:
outdir=os.path.dirname(infile)
else:
outdir=outpath
try:
os.makedirs(outdir)
except FileExistsError:
# directory already exists
pass
# Trim the filename:
sname=os.path.basename(infile)
if sname.endswith('.gz'):
sname = os.path.splitext(sname)[0]
sname = os.path.splitext(sname)[0]
if usrgti is not False:
rshort = os.path.basename(usrgti)
rname = os.path.splitext(rshort)[0]
sname += f'_{rname}'
# Generate outfile name
outfile = outdir+sname+f'_{elow}to{ehigh}keV.fits'
if (os.path.exists(outfile)):
if (~clobber):
warnings.warn('make_image: %s exists, use clobber=True to regenerate' % (outfile))
else:
os.system("rm "+outfile)
xsel_file = _make_xselect_commands(infile, outfile, elow, ehigh, usrgti=usrgti)
os.system("xselect @"+xsel_file)
os.system("rm -r -f "+xsel_file)
return outfile
def extract_sky_events(infile, regfile, clobber=True, outpath=False):
'''
Spawn an xselect instance that produces a new event file screened using a sky ds9
region file.
Parameters
----------
infile: str
Full path to the event file that you want to process
regfile: str
Full path to a ds9 region file (in sky coordinates) to be used to filter
the events.
Other Parameters
----------------
clobber: boolean, optional, default=True
Overwrite existing files?
outpath: str, optional, default=os.path.dirname(infile)
Set the destination for output. Defaults to same location as infile.
Return
-------
outfile: str
The full path to the output image.
'''
# Make sure environment is set up properly
_check_environment()
# Check if input file exists:
try:
with open(infile) as f:
pass
except IOError:
raise IOError("extract_det1_events: File does not exist %s" % (infile))
try:
with open(regfile) as f:
pass
except IOError:
raise IOError("extract_det1_events: File does not exist %s" % (regfile))
if not outpath:
outdir=os.path.dirname(infile)
else:
outdir=outpath
# Trim the filename:
sname=os.path.basename(infile)
if sname.endswith('.gz'):
sname = os.path.splitext(sname)[0]
sname = os.path.splitext(sname)[0]
rshort = os.path.basename(regfile)
rname = os.path.splitext(rshort)[0]
# Generate outfile name
outfile = outdir + '/'+sname+f'_{rname}.evt'
if (os.path.exists(outfile)) & (~clobber):
warnings.warn('extract_sky_events: %s exists, use clobber=True to regenerate' % (outfile))
else:
os.system("rm "+outfile)
xsel_file = _make_xselect_commands_sky_evts(infile, outfile, regfile)
os.system("xselect @"+xsel_file)
os.system("rm -r -f "+xsel_file)
return outfile
def barycenter_events(obs, infile, mod='A'):
'''
Run barycorr on an event file.
Parameters
--------------------
obs: nustar_gen.info.Observation
An instance of the Observation class
infile: str
Full path to input file
mod: str
Module to use. 'A' or 'B'
Other Parameters
-------------------
TO BE IMPLEMENTED
clockfile: str
Path to the clockfile you want to use. Default is to use the CALDB clockfile
'''
# Locate the attorb file:
evdir = obs.evdir
attorb = f'{obs.evdir}nu{obs.seqid}{mod}.attorb'
# Trim the filename:
if obs.out_path is False:
outdir = os.path.dirname(infile)
print(outdir)
else:
outdir = obs.out_path
sname=os.path.basename(infile)
sname=os.path.splitext(sname)[0]
# Generate outfile name
outfile = outdir + '/'+sname+f'_barycorr.fits'
bary_sh = outdir+'/run_bary_'+sname+'.sh'
with open(bary_sh, 'w') as f:
f.write(f'barycorr infile={infile} clobber=yes ')
f.write(f'outfile={outfile} orbitfiles={attorb} ')
f.write(f'ra={obs.source_position.ra.deg} dec={obs.source_position.dec.deg} ')
os.environ['HEADASNOQUERY'] = ""
os.environ['HEADASPROMPT'] = "/dev/null"
os.chmod(bary_sh, stat.S_IRWXG+stat.S_IRWXU)
os.system(f'{bary_sh}')
return outfile
def apply_gti(infile, gtifile, clobber=True, outpath=False):
'''
Spawn an xselect instance that produces a new event file screened using GTI file
Parameters
----------
infile: str
Full path to the event file that you want to process
regfile: str
Full path to a ds9 region file (in sky coordinates) to be used to filter
the events.
Other Parameters
----------------
clobber: boolean, optional, default=True
Overwrite existing files?
outpath: str, optional, default=os.path.dirname(infile)
Set the destination for output. Defaults to same location as infile.
Return
-------
outfile: str
The full path to the output image.
'''
# Make sure environment is set up properly
_check_environment()
# Check if input file exists:
try:
with open(infile) as f:
pass
except IOError:
raise IOError("apply_gti: File does not exist %s" % (infile))
try:
with open(gtifile) as f:
pass
except IOError:
raise IOError("apply_gti: File does not exist %s" % (gtifile))
if not outpath:
outdir=os.path.dirname(infile)
else:
outdir=outpath
# Trim the filename:
sname=os.path.basename(infile)
if sname.endswith('.gz'):
sname = os.path.splitext(sname)[0]
sname = os.path.splitext(sname)[0]
rshort = os.path.basename(gtifile)
rname = os.path.splitext(rshort)[0]
# Generate outfile name
outfile = outdir + '/'+sname+f'_{rname}.evt'
if (os.path.exists(outfile)) & (~clobber):
warnings.warn('apply_gti: %s exists, use clobber=True to regenerate' % (outfile))
else:
os.system("rm "+outfile)
xsel_file = _make_xselect_commands_apply_gti(infile, outfile, gtifile)
os.system("xselect @"+xsel_file)
os.system("rm -r -f "+xsel_file)
return outfile
def _make_xselect_commands_apply_gti(infile, outfile, gtifile):
'''
Helper script to generate the xselect commands to extract events from
a given sky region.
'''
import glob
for oldfile in glob.glob("session1*"):
os.system(f"rm {oldfile}")
xsel=open("xsel.xco","w")
xsel.write("session1\n")
xsel.write("read events \n")
evdir=os.path.dirname(infile)
xsel.write(f'{evdir} \n ' )
evfile = os.path.basename(infile)
xsel.write(f'{evfile} \n ')
xsel.write('yes \n')
xsel.write(f'filter time \n')
xsel.write('file \n')
xsel.write(f'{gtifile}\n')
xsel.write('extract events\n')
xsel.write("save events\n")
xsel.write("%s \n" % outfile)
xsel.write('n \n')
xsel.write('exit\n')
xsel.write('n \n')
xsel.close()
return 'xsel.xco'
def _make_xselect_commands_sky_evts(infile, outfile, regfile):
'''
Helper script to generate the xselect commands to extract events from
a given sky region.
'''
import glob
for oldfile in glob.glob("session1*"):
os.system(f"rm {oldfile}")
xsel=open("xsel.xco","w")
xsel.write("session1\n")
xsel.write("read events \n")
evdir=os.path.dirname(infile)
xsel.write(f'{evdir} \n ' )
evfile = os.path.basename(infile)
xsel.write(f'{evfile} \n ')
xsel.write('yes \n')
xsel.write(f'filter region {regfile} \n')
xsel.write("extract events\n")
xsel.write("save events\n")
xsel.write("%s \n" % outfile)
xsel.write('n \n')
xsel.write('exit\n')
xsel.write('n \n')
xsel.close()
return 'xsel.xco'
def _make_xselect_commands(infile, outfile, elow, ehigh, usrgti=False):
'''
Helper script to generate the xselect commands to make an image in a given NuSTAR range
'''
xsel=open("xsel.xco","w")
xsel.write("session1\n")
xsel.write("read events \n")
evdir=os.path.dirname(infile)
xsel.write(f'{evdir} \n ' )
evfile = os.path.basename(infile)
xsel.write(f'{evfile} \n ')
xsel.write('yes \n')
pi_low = energy_to_chan(elow)
pi_high = energy_to_chan(ehigh)
if usrgti is not False:
xsel.write(f'filter time \n')
xsel.write('file \n')
xsel.write(f'{usrgti}\n')
xsel.write('extract events\n')
xsel.write('filter pha_cutoff {} {} \n'.format(pi_low, pi_high))
xsel.write('set xybinsize 1\n')
xsel.write("extract image\n")
xsel.write("save image\n")
xsel.write("%s \n" % outfile)
xsel.write('exit\n')
xsel.write('n \n')
xsel.close()
return 'xsel.xco'
def _check_environment():
try:
if ("CALDB" in os.environ) & ("HEADAS" in os.environ):
pass
except IOerror:
raise IOError("Environment variables $CALDB and $HEADAS not set")
###
###
###
###
###
###
# From here down are DET1 methods
###
###
###
###
###
###
def make_det1_image(infile, elow = 3, ehigh = 20, clobber=True, outpath=False):
'''
Spawn an xselect instance that produces a DET1 image in the energy range.
Parameters
----------
infile: str
Full path tot eh file that you want to process
elow: float
Low-energy band for the image
ehigh: float
High-energy band for the image
Other Parameters
----------------
clobber: boolean, optional, default=True
Overwrite existing files?
outpath: str, optional, default=os.path.dirname(infile)
Set the destination for output. Defaults to same location as infile.
Return
-------
outfile: str
The full path to the output image.
'''
# Make sure environment is set up properly
_check_environment()
# Check if input file exists:
try:
with open(infile) as f:
pass
except IOError:
raise IOError("make_image: File does not exist %s" % (infile))
if not outpath:
outdir=os.path.dirname(infile)
else:
outdir=outpath
# Trime the filename:
sname=os.path.basename(infile)
if sname.endswith('.gz'):
sname = os.path.splitext(sname)[0]
sname = os.path.splitext(sname)[0]
# Generate outfile name
outfile = outdir + '/'+sname+f'_{elow}to{ehigh}keV_det1.fits'
if (os.path.exists(outfile)) & (~clobber):
warnings.warn('make_image: %s exists, use clobber=True to regenerate' % (outfile))
else:
os.system("rm "+outfile)
xsel_file = _make_xselect_commands_det1(infile, outfile, elow, ehigh)
os.system("xselect @"+xsel_file)
os.system("rm -r -f "+xsel_file)
return outfile
def extract_det1_events(infile, regfile, clobber=True, outpath=False):
'''
Spawn an xselect instance that produces a new event file screened using a det1 region
file.
Parameters
----------
infile: str
Full path to the event file that you want to process
regfile: str
Full path to a ds9 region file (in physical coordinates) to be used to filter
the events.
Other Parameters
----------------
clobber: boolean, optional, default=True
Overwrite existing files?
outpath: str, optional, default=os.path.dirname(infile)
Set the destination for output. Defaults to same location as infile.
Return
-------
outfile: str
The full path to the output image.
'''
# Make sure environment is set up properly
_check_environment()
# Make sure region file is correctly formatted
validate_det1_region(regfile)
# Check if input file exists:
try:
with open(infile) as f:
pass
except IOError:
raise IOError("extract_det1_events: File does not exist %s" % (infile))
try:
with open(regfile) as f:
pass
except IOError:
raise IOError("extract_det1_events: File does not exist %s" % (regfile))
if not outpath:
outdir=os.path.dirname(infile)
else:
outdir=outpath
# Trim the filename:
sname=os.path.basename(infile)
if sname.endswith('.gz'):
sname = os.path.splitext(sname)[0]
sname = os.path.splitext(sname)[0]
rshort = os.path.basename(regfile)
rname = os.path.splitext(rshort)[0]
# Generate outfile name
outfile = outdir + '/'+sname+f'_{rname}.evt'
if (os.path.exists(outfile)) & (~clobber):
warnings.warn('extract_det1_events: %s exists, use clobber=True to regenerate' % (outfile))
else:
os.system("rm "+outfile)
xsel_file = _make_xselect_commands_det1_evts(infile, outfile, regfile)
os.system("xselect @"+xsel_file)
os.system("rm -r -f "+xsel_file)
return outfile
def make_det1_lightcurve(infile, mod, obs,
time_bin=100*u.s, mode='01',
elow=3, ehigh=20, stemout=False, gtifile=False):
'''
Generate a script to run nuproducts to make a lightcurve using the whole
FoV and turning off all vignetting and PSF effects. Assumes that infile
has already been filtered using extract_det1_events().
Parameters
----------
infile: str
Full path to the input event file. This should be pre-filtered by
by extract_det1_events
mod: str
'A' or 'B'
obs: nustar_gen.info.Observation
Observation meta data
Other Parameters
-------------------
elow: float, optional, default = 3 keV
Low-energy bound
ehigh: float, optional, default is 20 keV
High-energy bound
mode: str, optional, default is '01'
Optional. Used to specify stemout if you're doing mode06 analysis and want
to specify output names that are more complicated.
gtifile: str
Path to a GTI file. If this is set, then this is passed to nuproducts.
stemout: str, optional
Use the specified stemout string when calling nuproducts. Otherwise
uses the default value.
'''
from astropy.io.fits import getheader
# Make sure environment is set up properly
_check_environment()
# Check to see that all files exist:
assert os.path.isfile(infile), 'make_det1_lightcurve: infile does not exist!'
# evdir = os.path.dirname(infile)
evdir = obs.evdir
seqid = obs.seqid
# seqid = os.path.basename(os.path.dirname(evdir))
outdir = obs.out_path
# if outpath is None:
# outdir = evdir
# else:
# outdir = outpath
hdr = getheader(infile)
ra = hdr['RA_OBJ']
dec = hdr['DEC_OBJ']
time_bin = int((time_bin.to(u.s)).value)
if stemout is False:
stemout = f'nu{seqid}{mod}{mode}_full_FoV_{elow}to{ehigh}_{time_bin}s'
lc_script = f'{outdir}/rundet1lc_{stemout}.sh'
pi_low = energy_to_chan(elow)
pi_high = energy_to_chan(ehigh)
with open(lc_script, 'w') as f:
f.write('nuproducts phafile=NONE bkgphafile=NONE imagefile=NONE ')
f.write(f'infile={infile} ')
f.write('runmkarf=no runmkrmf=no ')
f.write(f'indir={evdir} outdir={outdir} instrument=FPM{mod} ')
f.write(f'steminputs=nu{seqid} stemout={stemout} ')
f.write(f'pilow={pi_low} pihigh={pi_high} ')
f.write(f'bkgextract=no ')
f.write(f'binsize={time_bin} ')
f.write(f'srcra={ra} srcdec={dec} srcregionfile=DEFAULT srcradius=299 ')
# Turn off all of the time-dependent corrections for the pointing here
f.write(f'lcpsfflag=no lcexpoflag=no lcvignflag=no ')
if (gtifile != False):
f.write(f'usrgtifile={gtifile} ')
f.write('clobber=yes')
os.chmod(lc_script, stat.S_IRWXG+stat.S_IRWXU)
return lc_script
def make_det1_spectra(infile, mod, obs,
stemout=False, gtifile=False):
'''
Generate a script to run nuproducts to extract a source
spectrum along with the associated RMF.
Assumes that infile has already been filtered using extract_det1_events().
Always runs numkrmf, never runs numkarf. Never extract background.
Parameters
----------
infile: str
Full path to the input event file. This should be pre-filtered by
by extract_det1_events
mod: str
'A' or 'B'
obs: nustar_gen.info.Observation
Observation meta data
Other Parameters
-------------------
stemout: str
Optional. Use the specified stemout string when calling nuproducts. Otherwise
uses the default value.
gtifile: str
Path to a GTI file. If this is set, then this is passed to nuproducts.
**NOTE** As of now proper treatment of this being barycenter corrected (or not)
is not supported. If you're doing pulsar analysis, please write your own version.
'''
# from astropy.io.fits import getheader
from os.path import basename
# Make sure environment is set up properly
_check_environment()
# Check to see that all files exist:
assert os.path.isfile(infile), f'make_det1_spectra: {infile} does not exist!'
# assert os.path.isfile(src_reg), 'make_det1_spectra: src_reg does not exist!'
bkgextract='no'
evdir = obs.evdir
seqid = obs.seqid
outdir = obs.out_path
# Construct the output file name:
# hdr = getheader(infile)
ra =obs.source_position.ra.deg
dec = obs.source_position.dec.deg
# if outpath == 'None':
# outdir = evdir
# else:
# outdir = outpath
# try:
# os.makedirs(outdir)
# except FileExistsError:
# # directory already exists
# pass
# stemout = f'nu{seqid}{mod}{mode}_{reg_base}_det1'
# Use the default stemout unless this is set
if stemout is False:
stemout = basename(infile).split('.')[0]
lc_script = outdir+f'/rundet1spec_{stemout}.sh'
with open(lc_script, 'w') as f:
f.write('nuproducts imagefile=NONE lcfile=NONE bkglcfile=NONE ')
f.write(f'infile={infile} ')
f.write('runmkarf=no runmkrmf=yes ')
f.write(f'indir={evdir} outdir={outdir} instrument=FPM{mod} ')
f.write(f'steminputs=nu{seqid} stemout={stemout} ')
f.write(f'srcra={ra} srcdec={dec} srcregionfile=DEFAULT srcradius=299 ')
if (gtifile != False):
f.write(f'usrgtifile={gtifile} ')
f.write(f'runbackscale=no ')
f.write(f'bkgextract=no ')
f.write('clobber=yes')
os.chmod(lc_script, stat.S_IRWXG+stat.S_IRWXU)
return lc_script
def _make_xselect_commands_det1_evts(infile, outfile, regfile):
'''
Helper script to generate the xselect commands to extract events from
a given region.
'''
import glob
for oldfile in glob.glob("session1*"):
os.system(f"rm {oldfile}")
xsel=open("xsel.xco","w")
xsel.write("session1\n")
xsel.write("read events \n")
evdir=os.path.dirname(infile)
xsel.write(f'{evdir} \n ' )
evfile = os.path.basename(infile)
xsel.write(f'{evfile} \n ')
xsel.write('yes \n')
xsel.write('set xyname\n')
xsel.write('DET1X\n')
xsel.write('DET1Y\n')
xsel.write(f'filter region {regfile} \n')
xsel.write("extract events\n")
xsel.write("save events\n")
xsel.write("%s \n" % outfile)
xsel.write('n \n')
xsel.write('exit\n')
xsel.write('n \n')
xsel.close()
return 'xsel.xco'
def _make_xselect_commands_det1(infile, outfile, elow, ehigh):
'''
Helper script to generate the xselect commands to make an image in a
given NuSTAR energy range
'''
import glob
for oldfile in glob.glob("session1*"):
os.system(f"rm {oldfile}")
xsel=open("xsel.xco","w")
xsel.write("session1\n")
xsel.write("read events \n")
evdir=os.path.dirname(infile)
xsel.write(f'{evdir} \n ' )
evfile = os.path.basename(infile)
xsel.write(f'{evfile} \n ')
xsel.write('yes \n')
xsel.write('set xyname\n')
xsel.write('DET1X\n')
xsel.write('DET1Y\n')
pi_low = energy_to_chan(elow)
pi_high = energy_to_chan(ehigh)
xsel.write('filter pha_cutoff {} {} \n'.format(pi_low, pi_high))
xsel.write('set xybinsize 1\n')
xsel.write("extract image\n")
xsel.write("save image\n")
xsel.write("%s \n" % outfile)
xsel.write('exit\n')
xsel.write('n \n')
xsel.close()
return 'xsel.xco'
| 27.878182 | 99 | 0.6066 | 4,047 | 30,666 | 4.511984 | 0.09785 | 0.024315 | 0.026287 | 0.01977 | 0.796276 | 0.773494 | 0.747097 | 0.736747 | 0.715663 | 0.705805 | 0 | 0.006027 | 0.27493 | 30,666 | 1,099 | 100 | 27.903549 | 0.815201 | 0.322768 | 0 | 0.740741 | 0 | 0.004115 | 0.229608 | 0.035855 | 0 | 0 | 0 | 0 | 0.018519 | 1 | 0.034979 | false | 0.024691 | 0.026749 | 0 | 0.09465 | 0.004115 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
f7f1464000e18fed759b53d82c0c419935b3e977 | 33 | py | Python | interpret/__init__.py | haochunchang/explain-ECG-diagnosis | 6799ad38a71e2392192919d123548bdce5059541 | [
"MIT"
] | null | null | null | interpret/__init__.py | haochunchang/explain-ECG-diagnosis | 6799ad38a71e2392192919d123548bdce5059541 | [
"MIT"
] | null | null | null | interpret/__init__.py | haochunchang/explain-ECG-diagnosis | 6799ad38a71e2392192919d123548bdce5059541 | [
"MIT"
] | 1 | 2022-02-07T20:03:11.000Z | 2022-02-07T20:03:11.000Z | from .Explainer import Explainer
| 16.5 | 32 | 0.848485 | 4 | 33 | 7 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 33 | 1 | 33 | 33 | 0.965517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
79199dac9959a4a75552d04329e9a79769a82337 | 186 | py | Python | mayan/apps/metadata/cleanup.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | 3 | 2020-02-03T11:58:51.000Z | 2020-10-20T03:52:21.000Z | mayan/apps/metadata/cleanup.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | null | null | null | mayan/apps/metadata/cleanup.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | 2 | 2020-10-24T11:10:06.000Z | 2021-03-03T20:05:38.000Z | from __future__ import absolute_import
def cleanup():
from .models import MetadataType, MetadataSet
MetadataType.objects.all().delete()
MetadataSet.objects.all().delete()
| 20.666667 | 49 | 0.747312 | 20 | 186 | 6.7 | 0.6 | 0.149254 | 0.238806 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.150538 | 186 | 8 | 50 | 23.25 | 0.848101 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | true | 0 | 0.4 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
7939c6f68b223f3aa92eca17ed8f7d367a5ec23e | 47 | py | Python | __init__.py | rakshitraj/findFire | 0263aa92a1790f10fa13a243acee48207b3f63b3 | [
"MIT"
] | 1 | 2021-07-12T03:41:15.000Z | 2021-07-12T03:41:15.000Z | __init__.py | rakshitraj/findFire | 0263aa92a1790f10fa13a243acee48207b3f63b3 | [
"MIT"
] | null | null | null | __init__.py | rakshitraj/findFire | 0263aa92a1790f10fa13a243acee48207b3f63b3 | [
"MIT"
] | null | null | null | print ("Initializing modules from findFire...") | 47 | 47 | 0.765957 | 5 | 47 | 7.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085106 | 47 | 1 | 47 | 47 | 0.837209 | 0 | 0 | 0 | 0 | 0 | 0.770833 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
f705942f8f1cc804e3b4671a85ed097d24911237 | 27 | py | Python | __init__.py | JDavidMoreno/meditative_cards | b935a422037c4f3ed076ce1bcd5bcdcbe24f1565 | [
"MIT"
] | null | null | null | __init__.py | JDavidMoreno/meditative_cards | b935a422037c4f3ed076ce1bcd5bcdcbe24f1565 | [
"MIT"
] | null | null | null | __init__.py | JDavidMoreno/meditative_cards | b935a422037c4f3ed076ce1bcd5bcdcbe24f1565 | [
"MIT"
] | 1 | 2021-04-03T18:00:14.000Z | 2021-04-03T18:00:14.000Z |
from . import controllers
| 9 | 25 | 0.777778 | 3 | 27 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.185185 | 27 | 2 | 26 | 13.5 | 0.954545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
f71e2402789d811aef5d0e4eab5187008fe4414f | 103 | py | Python | realtimenet/feature_extractors/__init__.py | floriandotpy/20bn-realtimenet | 6cf6359606ccb3cb205fb65dd102402bc84255e2 | [
"MIT"
] | 2 | 2021-03-03T09:36:49.000Z | 2022-03-18T06:36:54.000Z | realtimenet/feature_extractors/__init__.py | mc261670164/20bn-realtimenet | 6d1e21c3ccd3ff7d15af2927a31f1012ae9853e9 | [
"MIT"
] | 1 | 2021-03-10T08:38:03.000Z | 2021-03-10T10:48:13.000Z | realtimenet/feature_extractors/__init__.py | floriandotpy/20bn-realtimenet | 6cf6359606ccb3cb205fb65dd102402bc84255e2 | [
"MIT"
] | 1 | 2022-01-26T02:45:18.000Z | 2022-01-26T02:45:18.000Z | from .mobilenet import StridedInflatedMobileNetV2
from .efficientnet import StridedInflatedEfficientNet | 51.5 | 53 | 0.912621 | 8 | 103 | 11.75 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010417 | 0.067961 | 103 | 2 | 53 | 51.5 | 0.96875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
f72b8af740fb1cc78203d79551f725c340162fdf | 49 | py | Python | typings/bl_rna_utils/__init__.py | Argmaster/PyR3 | 6786bcb6a101fe4bd4cc50fe43767b8178504b15 | [
"MIT"
] | 2 | 2021-12-12T18:51:52.000Z | 2022-02-23T09:49:16.000Z | typings/bl_rna_utils/__init__.py | Argmaster/PyR3 | 6786bcb6a101fe4bd4cc50fe43767b8178504b15 | [
"MIT"
] | 2 | 2021-11-08T12:09:02.000Z | 2021-12-12T23:01:12.000Z | typings/bl_rna_utils/__init__.py | Argmaster/PyR3 | 6786bcb6a101fe4bd4cc50fe43767b8178504b15 | [
"MIT"
] | null | null | null | import sys
import typing
from . import data_path
| 12.25 | 23 | 0.816327 | 8 | 49 | 4.875 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.163265 | 49 | 3 | 24 | 16.333333 | 0.95122 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
e3957f84fe0e286070de738a5e2e34cf4fb545ef | 25 | py | Python | nukochan/libs/__init__.py | nekonium/NekoniumBalanceSnapshotTool | bebc2edcd5f92cd489011a5ec4ea84ba8f9834de | [
"MIT"
] | null | null | null | nukochan/libs/__init__.py | nekonium/NekoniumBalanceSnapshotTool | bebc2edcd5f92cd489011a5ec4ea84ba8f9834de | [
"MIT"
] | null | null | null | nukochan/libs/__init__.py | nekonium/NekoniumBalanceSnapshotTool | bebc2edcd5f92cd489011a5ec4ea84ba8f9834de | [
"MIT"
] | null | null | null | from .db import SqliteDb
| 12.5 | 24 | 0.8 | 4 | 25 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 25 | 1 | 25 | 25 | 0.952381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
e3e89a05443e994a2f65bfa69fa02e4cf9da2fcc | 18,904 | py | Python | src/conv_units.py | Malmactor/maze-solver | 5cd5ab136b23e223991ea5043262b6c88781d396 | [
"MIT"
] | null | null | null | src/conv_units.py | Malmactor/maze-solver | 5cd5ab136b23e223991ea5043262b6c88781d396 | [
"MIT"
] | null | null | null | src/conv_units.py | Malmactor/maze-solver | 5cd5ab136b23e223991ea5043262b6c88781d396 | [
"MIT"
] | null | null | null | import tensorflow as tf
def print_variable_info():
"""auxiliary function to print trainable variables"""
var_list = tf.trainable_variables()
total = 0
for var in var_list:
num = 1
for dim in var.shape:
num *= int(dim)
print("{}: {}, {}".format(var.name, str(var.shape), num))
total += num
print("Total parameters: {}".format(total))
def conv_bn_act(op, shape, stride, name, init, training, bn_momentum, act, padding='SAME'):
"""
:param padding:
:param op: input node
:param shape: kernel shape
:param stride: convolution stride
:param name: node name
:param init: initializer
:param training: batch normalization training flag
:param bn_momentum: batch normalization momentum
:param act: activation function
:param padding: padding requirement
:return: post activation node
"""
kernel = tf.get_variable("kernel_weights" + name, shape, initializer=init)
conv = tf.nn.convolution(op, kernel, padding, strides=stride, name="conv" + name)
bn = tf.layers.batch_normalization(conv, momentum=bn_momentum, training=training)
post = act(bn)
return post
def conv_bn(op, shape, stride, name, init, training, bn_momentum, padding='SAME'):
"""
:param padding:
:param op: input node
:param shape: kernel shape
:param stride: convolution stride
:param name: node name
:param init: initializer
:param training: batch normalization training flag
:param bn_momentum: batch normalization momentum
:param padding: padding requirement
:return: post activation node
"""
kernel = tf.get_variable("kernel_weights" + name, shape, initializer=init)
conv = tf.nn.convolution(op, kernel, padding, strides=stride, name="conv" + name)
bn = tf.layers.batch_normalization(conv, momentum=bn_momentum, training=training)
return bn
def branch4_avgpool_5x5(
ops,
scope='branch4_avgpool_5x5',
init=tf.contrib.layers.xavier_initializer_conv2d(uniform=False),
training=True,
bn_momentum=0.9,
act=tf.nn.relu,
out_channel=32
):
"""
:param ops: input node
:param scope: namescope of this layer
:param init: initializer for convolution kernels
:param training: training flag for batch_norm layer
:param bn_momentum: batch normalization momentum
:param act: activation function
:param out_channel: output channels for each branch, advised to be smaller than or equal to input channels
:return: output node
"""
# get input channel number
in_channel = ops.shape[-1]
# convolution branches
with tf.variable_scope(scope):
# 1x1 branch
branch0 = conv_bn_act(ops, [1, 1, in_channel, out_channel // 4], [1, 1], "_0_a_1x1", init, training,
bn_momentum, act)
# 1x1, 3x3 branch
branch1 = conv_bn_act(ops, [1, 1, in_channel, out_channel // 8], [1, 1], "_1_a_1x1", init, training,
bn_momentum, act)
branch1 = conv_bn_act(branch1, [3, 3, out_channel // 8, out_channel // 4], [1, 1], "_1_b_3x3", init, training,
bn_momentum, act)
# 1x1, 3x3, 3x3 branch
branch2 = conv_bn_act(ops, [1, 1, in_channel, out_channel // 8], [1, 1], "_2_a_1x1", init, training,
bn_momentum, act)
branch2 = conv_bn_act(branch2, [3, 3, out_channel // 8, out_channel // 4], [1, 1], "_2_b_3x3", init, training,
bn_momentum, act)
branch2 = conv_bn_act(branch2, [3, 3, out_channel // 4, out_channel // 4], [1, 1], "_2_c_3x3", init, training,
bn_momentum, act)
# 3x3 avg_pool, 1x1 branch
branch3 = tf.nn.avg_pool(ops, [1, 3, 3, 1], [1, 1, 1, 1], 'SAME')
branch3 = conv_bn_act(branch3, [1, 1, in_channel, out_channel // 4], [1, 1], "_3_a_1x1", init, training,
bn_momentum, act)
# channel concatenation
return tf.concat(axis=3, values=[branch0, branch1, branch2, branch3])
def branch4_res_5x5(
ops,
scope='branch4_res_5x5',
init=tf.contrib.layers.xavier_initializer_conv2d(uniform=False),
training=True,
bn_momentum=0.9,
act=tf.nn.relu,
):
"""
:param ops: input node
:param scope: namescope of this layer
:param init: initializer for convolution kernels
:param training: training flag for batch_norm layer
:param bn_momentum: batch normalization momentum
:param act: activation function
:return: output node
"""
# get input channel number
in_channel = ops.shape[-1]
# convolution tower
with tf.variable_scope(scope):
# 3 tower branches
# 1x1 branch
branch0 = conv_bn_act(ops, [1, 1, in_channel, in_channel // 8], [1, 1], "_0_a_1x1", init, training, bn_momentum,
act)
# 1x1, 3x3 branch
branch1 = conv_bn_act(ops, [1, 1, in_channel, in_channel // 8], [1, 1], "_1_a_1x1", init, training, bn_momentum,
act)
branch1 = conv_bn_act(branch1, [3, 3, in_channel // 8, in_channel // 8], [1, 1], "_1_b_3x3", init, training,
bn_momentum, act)
# 1x1, 3x3, 3x3 branch
branch2 = conv_bn_act(ops, [1, 1, in_channel, in_channel // 8], [1, 1], "_2_a_1x1", init, training, bn_momentum,
act)
branch2 = conv_bn_act(branch2, [3, 3, in_channel // 8, in_channel * 3 // 16], [1, 1], "_2_b_3x3", init,
training, bn_momentum, act)
branch2 = conv_bn_act(branch2, [3, 3, in_channel * 3 // 16, in_channel // 4], [1, 1], "_2_c_3x3", init,
training, bn_momentum, act)
# tower top convolution
concat = tf.concat(axis=3, values=[branch0, branch1, branch2])
tower = conv_bn(concat, [1, 1, in_channel // 2, in_channel], [1, 1], "_tower_a_1x1", init, training,
bn_momentum)
# residual summation
return ops + tower
def branch3_maxpool_downsample_5x5(
ops,
scope='branch3_maxpool_downsample_5x5',
init=tf.contrib.layers.xavier_initializer_conv2d(uniform=False),
training=True,
bn_momentum=0.9,
act=tf.nn.relu
):
"""
:param ops: input node
:param scope: namescope of this layer
:param init: initializer for convolution kernels
:param training: training flag for batch_norm layer
:param bn_momentum: batch normalization momentum
:param act: activation function
:return: output node
"""
# get input channel number
in_channel = ops.shape[-1]
# convolution branches
with tf.variable_scope(scope):
# 3x3 branch
branch0 = conv_bn_act(ops, [3, 3, in_channel, in_channel // 2], [2, 2], "_0_a_3x3", init, training, bn_momentum,
act, 'VALID')
# 1x1, 3x3, 3x3 branch
branch1 = conv_bn_act(ops, [1, 1, in_channel, in_channel // 4], [1, 1], "_1_a_1x1", init, training, bn_momentum,
act)
branch1 = conv_bn_act(branch1, [3, 3, in_channel // 4, in_channel * 3 // 8], [1, 1], "_1_b_3x3", init, training,
bn_momentum, act)
branch1 = conv_bn_act(branch1, [3, 3, in_channel * 3 // 8, in_channel // 2], [2, 2], "_1_c_3x3", init, training,
bn_momentum, act, 'VALID')
# max pooling branch
branch2 = tf.nn.max_pool(ops, [1, 3, 3, 1], [1, 2, 2, 1], padding='VALID')
# channel concatenation
return tf.concat(axis=3, values=[branch0, branch1, branch2])
def branch4_avgpool_13x13(
ops,
scope='branch3_avgpool_13x13',
init=tf.contrib.layers.xavier_initializer_conv2d(uniform=False),
training=True,
bn_momentum=0.9,
act=tf.nn.relu,
out_channel=64
):
"""
:param ops: input node
:param scope: namescope of this layer
:param init: initializer for convolution kernels
:param training: training flag for batch_norm layer
:param bn_momentum: batch normalization momentum
:param act: activation function
:param out_channel: output channel number
:return: output node
"""
# get input channel number
in_channel = ops.shape[-1]
# convolution branches
with tf.variable_scope(scope):
# 1x1 branch
branch0 = conv_bn_act(ops, [1, 1, in_channel, out_channel * 3 // 8], [1, 1], "_0_a_1x1", init, training,
bn_momentum, act)
# 1x1, 1x7, 7x1 branch
branch1 = conv_bn_act(ops, [1, 1, in_channel, out_channel // 8], [1, 1], "_1_a_1x1", init, training,
bn_momentum, act)
branch1 = conv_bn_act(branch1, [1, 7, out_channel // 8, out_channel * 3 // 16], [1, 1], "_1_b_1x7", init,
training, bn_momentum, act)
branch1 = conv_bn_act(branch1, [7, 1, out_channel * 3 // 16, out_channel // 4], [1, 1], "_1_c_7x1", init,
training, bn_momentum, act)
# 1x1, 7x1, 1x7, 7x1, 1x7 branch
branch2 = conv_bn_act(ops, [1, 1, in_channel, out_channel // 8], [1, 1], "_2_a_1x1", init, training,
bn_momentum, act)
branch2 = conv_bn_act(branch2, [7, 1, out_channel // 8, out_channel * 3 // 16], [1, 1], "_2_b_7x1", init,
training, bn_momentum, act)
branch2 = conv_bn_act(branch2, [1, 7, out_channel * 3 // 16, out_channel // 4], [1, 1], "_2_c_1x7", init,
training, bn_momentum, act)
branch2 = conv_bn_act(branch2, [7, 1, out_channel // 4, out_channel // 4], [1, 1], "_2_d_7x1", init,
training, bn_momentum, act)
branch2 = conv_bn_act(branch2, [1, 7, out_channel // 4, out_channel // 4], [1, 1], "_2_e_1x7", init,
training, bn_momentum, act)
# avgpool, 1x1 branch
branch3 = tf.nn.avg_pool(ops, [1, 3, 3, 1], [1, 1, 1, 1], 'SAME')
branch3 = conv_bn_act(branch3, [1, 1, in_channel, out_channel // 8], [1, 1], "_3_a_1x1", init, training,
bn_momentum, act)
# channel concatenation
return tf.concat(axis=3, values=[branch0, branch1, branch2, branch3])
def branch3_res_7x7(
ops,
scope='branch3_res_7x7',
init=tf.contrib.layers.xavier_initializer_conv2d(uniform=False),
training=True,
bn_momentum=0.9,
act=tf.nn.relu,
):
"""
:param ops: input node
:param scope: namescope of this layer
:param init: initializer for convolution kernels
:param training: training flag for batch_norm layer
:param bn_momentum: batch normalization momentum
:param act: activation function
:return: output node
"""
# get input channel number
in_channel = ops.shape[-1]
# convolution tower
with tf.variable_scope(scope):
# 3 tower branches
# 1x1 branch
branch0 = conv_bn_act(ops, [1, 1, in_channel, in_channel // 4], [1, 1], "_0_a_1x1", init, training, bn_momentum,
act)
# 1x1, 1x7, 7x1 branch
branch1 = conv_bn_act(ops, [1, 1, in_channel, in_channel // 8], [1, 1], "_1_a_1x1", init, training, bn_momentum,
act)
branch1 = conv_bn_act(branch1, [1, 7, in_channel // 8, in_channel * 3 // 16], [1, 1], "_1_b_1x7", init,
training, bn_momentum, act)
branch1 = conv_bn_act(branch1, [7, 1, in_channel * 3 // 16, in_channel // 4], [1, 1], "_1_c_7x1", init,
training, bn_momentum, act)
# 1x1 tower branch
concat = tf.concat(axis=3, values=[branch0, branch1])
tower = conv_bn(concat, [1, 1, in_channel // 2, in_channel], [1, 1], "_tower_a_1x1", init, training,
bn_momentum)
# residual summation
return ops + tower
def branch3_maxpool_downsample_9x9(
ops,
scope='branch3_maxpool_downsample_9x9',
init=tf.contrib.layers.xavier_initializer_conv2d(uniform=False),
training=True,
bn_momentum=0.9,
act=tf.nn.relu
):
"""
:param ops: input node
:param scope: namescope of this layer
:param init: initializer for convolution kernels
:param training: training flag for batch_norm layer
:param bn_momentum: batch normalization momentum
:param act: activation function
:return: output node
"""
# get input channel number
in_channel = ops.shape[-1]
# convolution branches
with tf.variable_scope(scope):
# 1x1, 3x3 branch
branch0 = conv_bn_act(ops, [1, 1, in_channel, in_channel // 8], [1, 1], "_0_a_1x1", init, training, bn_momentum,
act)
branch0 = conv_bn_act(branch0, [3, 3, in_channel // 8, in_channel // 8], [2, 2], "_0_b_3x3", init, training,
bn_momentum, act, 'VALID')
# 1x1, 1x7, 7x1, 3x3 branch
branch1 = conv_bn_act(ops, [1, 1, in_channel, in_channel // 4], [1, 1], "_1_a_1x1", init, training, bn_momentum,
act)
branch1 = conv_bn_act(branch1, [1, 7, in_channel // 4, in_channel // 4], [1, 1], "_1_b_1x7", init, training,
bn_momentum, act)
branch1 = conv_bn_act(branch1, [7, 1, in_channel // 4, in_channel * 3 // 8], [1, 1], "_1_c_7x1", init, training,
bn_momentum, act)
branch1 = conv_bn_act(branch1, [3, 3, in_channel * 3 // 8, in_channel * 3 // 8], [2, 2], "_1_d_3x3", init,
training, bn_momentum, act, 'VALID')
# max pooling branch
branch2 = tf.nn.max_pool(ops, [1, 3, 3, 1], [1, 2, 2, 1], padding='VALID')
# channel concatenation
return tf.concat(axis=3, values=[branch0, branch1, branch2])
def branch6_avgpool_5x5_downchannel(
ops,
scope='branch6_avgpool_5x5_downchannel',
init=tf.contrib.layers.xavier_initializer_conv2d(uniform=False),
training=True,
bn_momentum=0.9,
act=tf.nn.relu,
out_channel=24
):
"""
:param ops: input node
:param scope: namescope of this layer
:param init: initializer for convolution kernels
:param training: training flag for batch_norm layer
:param bn_momentum: batch normalization momentum
:param act: activation function
:param out_channel: output channel number
:return: output node
"""
# get input channel number
in_channel = ops.shape[-1]
# convolution tower
with tf.variable_scope(scope):
# 1x1 branch
branch0 = conv_bn_act(ops, [1, 1, in_channel, out_channel // 6], [1, 1], "_0_a_1x1", init, training,
bn_momentum, act)
# 1x1, (1x3, 3x1) branches
branch1_2 = conv_bn_act(ops, [1, 1, in_channel, out_channel // 4], [1, 1], "_1_2_a_1x1", init, training,
bn_momentum, act)
branch1 = conv_bn_act(branch1_2, [1, 3, out_channel // 4, out_channel // 6], [1, 1], "_1_b_1x3", init, training,
bn_momentum, act)
branch2 = conv_bn_act(branch1_2, [3, 1, out_channel // 4, out_channel // 6], [1, 1], "_2_b_3x1", init, training,
bn_momentum, act)
# 1x1, 3x1, 1x3, (1x3, 3x1) branches
branch3_4 = conv_bn_act(ops, [1, 1, in_channel, out_channel // 2], [1, 1], "_3_4_a_1x1", init, training,
bn_momentum, act)
branch3_4 = conv_bn_act(branch3_4, [3, 1, out_channel // 2, out_channel // 3], [1, 1], "_3_4_b_3x1", init,
training, bn_momentum, act)
branch3_4 = conv_bn_act(branch3_4, [1, 3, out_channel // 3, out_channel // 4], [1, 1], "_3_4_c_1x3", init,
training, bn_momentum, act)
branch3 = conv_bn_act(branch3_4, [1, 3, out_channel // 4, out_channel // 6], [1, 1], "_3_d_1x3", init, training,
bn_momentum, act)
branch4 = conv_bn_act(branch3_4, [3, 1, out_channel // 4, out_channel // 6], [1, 1], "_4_d_3x1", init, training,
bn_momentum, act)
# avgpool, 1x1 branch
branch5 = tf.nn.avg_pool(ops, [1, 3, 3, 1], [1, 1, 1, 1], 'SAME')
branch5 = conv_bn_act(branch5, [1, 1, in_channel, out_channel // 6], [1, 1], "_5_a_1x1", init, training,
bn_momentum, act)
# channel concatenation
return tf.concat(axis=3, values=[branch0, branch1, branch2, branch3, branch4, branch5])
def fc_dropout(
ops,
out_nodes,
scope='fully_connected',
init=tf.contrib.layers.xavier_initializer(uniform=False),
training=True,
bn_momentum=0.9,
act=tf.nn.relu,
keep_prob=0.9
):
"""
:param ops: input node
:param scope: namescope of this layer
:param out_nodes: output node number
:param init: initializer for weights
:param training: training flag for batch normalization layer
:param bn_momentum: batch normalization momentum
:param act: activation function
:param keep_prob: keeping probability for dropout layer
:return: output node
"""
in_nodes = ops.shape[-1]
with tf.variable_scope(scope):
weights = tf.get_variable("weights", [in_nodes, out_nodes], initializer=init)
fc = tf.matmul(ops, weights)
bn = tf.layers.batch_normalization(fc, momentum=bn_momentum, training=training)
activations = act(bn)
return tf.nn.dropout(activations, keep_prob)
def global_avg_dropout(
ops,
scope='global_avg_dropout',
keep_prob=0.9
):
"""
:param ops: input node
:param scope: namescope of this layer
:param keep_prob: keeping probability for dropout layer
:return: output node
"""
_, width, height, _ = ops.shape
with tf.variable_scope(scope):
avg = tf.nn.avg_pool(ops, [1, width, height, 1], [1, width, height, 1], 'VALID')
return tf.nn.dropout(avg, keep_prob)
if __name__ == '__main__':
input_node = tf.placeholder('float32', [16, 50, 50, 16])
output_node = branch4_avgpool_5x5(input_node, out_channel=32)
output_node = branch4_res_5x5(output_node)
output_node = branch3_maxpool_downsample_5x5(output_node)
output_node = branch4_avgpool_13x13(output_node)
output_node = branch3_res_7x7(output_node)
output_node = branch3_maxpool_downsample_9x9(output_node)
output_node = branch6_avgpool_5x5_downchannel(output_node)
print_variable_info()
print(output_node.shape) | 40.393162 | 120 | 0.595588 | 2,504 | 18,904 | 4.260383 | 0.0627 | 0.01856 | 0.066929 | 0.105174 | 0.866329 | 0.841582 | 0.824147 | 0.808961 | 0.77709 | 0.753843 | 0 | 0.061873 | 0.287823 | 18,904 | 468 | 121 | 40.393162 | 0.730521 | 0.22281 | 0 | 0.581967 | 0 | 0 | 0.052557 | 0.007901 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04918 | false | 0 | 0.004098 | 0 | 0.098361 | 0.020492 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
e3f85910ad619b6f999288bc9c166c24f6d39f52 | 43 | py | Python | Attack_SplitNN/src/attacksplitnn/splitnn/__init__.py | EduardaChagas/Cybersecurity-FL | 52db1a31e71e021f2ce57231a27341c4c080ad3b | [
"MIT"
] | 10 | 2021-04-16T00:38:34.000Z | 2022-02-11T01:28:52.000Z | Attack_SplitNN/src/attacksplitnn/splitnn/__init__.py | EduardaChagas/Cybersecurity-FL | 52db1a31e71e021f2ce57231a27341c4c080ad3b | [
"MIT"
] | 7 | 2021-03-27T04:49:06.000Z | 2021-06-20T06:16:32.000Z | Attack_SplitNN/src/attacksplitnn/splitnn/__init__.py | EduardaChagas/Cybersecurity-FL | 52db1a31e71e021f2ce57231a27341c4c080ad3b | [
"MIT"
] | 3 | 2021-07-07T21:55:52.000Z | 2022-03-17T21:17:51.000Z | from .model import Client, Server, SplitNN
| 21.5 | 42 | 0.790698 | 6 | 43 | 5.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.139535 | 43 | 1 | 43 | 43 | 0.918919 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
54268c8e1cef4e995585e22e8c51248b16eb6023 | 37,843 | py | Python | tests/fabric/test_crypto.py | aidtechnology/nephos-1 | a591741b596cf39b1974fe358784230b97e89e15 | [
"Apache-2.0"
] | 1 | 2019-05-21T03:47:54.000Z | 2019-05-21T03:47:54.000Z | tests/fabric/test_crypto.py | aidtechnology/nephos-1 | a591741b596cf39b1974fe358784230b97e89e15 | [
"Apache-2.0"
] | null | null | null | tests/fabric/test_crypto.py | aidtechnology/nephos-1 | a591741b596cf39b1974fe358784230b97e89e15 | [
"Apache-2.0"
] | null | null | null | from copy import deepcopy
from unittest.mock import call, patch, Mock
import pytest
from nephos.fabric.crypto import (
CryptoInfo,
check_id,
register_id,
enroll_id,
create_admin,
admin_creds,
copy_secret,
msp_secrets,
admin_msp,
item_to_secret,
id_to_secrets,
cacerts_to_secrets,
setup_id,
setup_nodes,
genesis_block,
channel_tx,
PWD,
)
class TestChechId:
@patch("nephos.fabric.crypto.sleep")
@patch("nephos.fabric.crypto.get_helm_pod")
def test_check_id(self, mock_get_pod, mock_sleep):
mock_executor = Mock()
mock_get_pod.side_effect = [mock_executor]
mock_executor.execute.side_effect = [
(None, "no rows in result set") # List identities
]
check_id("a-namespace", "a-ca", "an-ord")
mock_get_pod.assert_called_once_with(
namespace="a-namespace", release="a-ca", app="hlf-ca", verbose=False
)
mock_executor.execute.assert_called_once_with(
"fabric-ca-client identity list --id an-ord"
)
mock_sleep.assert_not_called()
@patch("nephos.fabric.crypto.sleep")
@patch("nephos.fabric.crypto.get_helm_pod")
def test_check_id_again(self, mock_get_pod, mock_sleep):
mock_executor = Mock()
mock_get_pod.side_effect = [mock_executor]
mock_executor.execute.side_effect = [("an-ord", None)] # List identities
check_id("a-namespace", "a-ca", "an-ord", verbose=True)
mock_get_pod.assert_called_once_with(
namespace="a-namespace", release="a-ca", app="hlf-ca", verbose=True
)
mock_executor.execute.assert_called_once_with(
"fabric-ca-client identity list --id an-ord"
)
mock_sleep.assert_not_called()
@patch("nephos.fabric.crypto.sleep")
@patch("nephos.fabric.crypto.get_helm_pod")
def test_check_id_serverconnection(self, mock_get_pod, mock_sleep):
mock_executor = Mock()
mock_get_pod.side_effect = [mock_executor]
mock_executor.execute.side_effect = [
(None, "could not connect to server"), # List identities
(None, "no rows in result set"), # List identities
]
check_id("a-namespace", "a-ca", "an-ord", verbose=False)
mock_get_pod.assert_called_once_with(
namespace="a-namespace", release="a-ca", app="hlf-ca", verbose=False
)
mock_executor.execute.assert_has_calls(
[
call("fabric-ca-client identity list --id an-ord"),
call("fabric-ca-client identity list --id an-ord"),
]
)
mock_sleep.assert_called_once_with(15)
@patch("nephos.fabric.crypto.sleep")
@patch("nephos.fabric.crypto.get_helm_pod")
def test_check_id_admin(self, mock_get_pod, mock_sleep):
mock_executor = Mock()
mock_get_pod.side_effect = [mock_executor]
mock_executor.execute.side_effect = [
(None, "no rows in result set") # List identities
]
check_id("a-namespace", "a-ca", "an-admin")
mock_get_pod.assert_called_once_with(
namespace="a-namespace", release="a-ca", app="hlf-ca", verbose=False
)
mock_executor.execute.assert_called_once_with(
"fabric-ca-client identity list --id an-admin"
)
mock_sleep.assert_not_called()
class TestRegisterId:
@patch("nephos.fabric.crypto.sleep")
@patch("nephos.fabric.crypto.get_helm_pod")
@patch("nephos.fabric.crypto.check_id")
def test_register_id(self, mock_check_id, mock_get_pod, mock_sleep):
mock_executor = Mock()
mock_check_id.side_effect = [False]
mock_get_pod.side_effect = [mock_executor]
mock_executor.execute.side_effect = [("Register", None)] # Register identities
register_id("a-namespace", "a-ca", "an-ord", "a-password", "orderer")
mock_get_pod.assert_called_once_with(
namespace="a-namespace", release="a-ca", app="hlf-ca", verbose=False
)
mock_executor.execute.assert_has_calls(
[
call(
"fabric-ca-client register --id.name an-ord --id.secret a-password --id.type orderer"
)
]
)
mock_sleep.assert_not_called()
@patch("nephos.fabric.crypto.sleep")
@patch("nephos.fabric.crypto.get_helm_pod")
@patch("nephos.fabric.crypto.check_id")
def test_register_id_again(self, mock_check_id, mock_get_pod, mock_sleep):
mock_executor = Mock()
mock_check_id.side_effect = [True]
mock_get_pod.side_effect = [mock_executor]
register_id(
"a-namespace", "a-ca", "an-ord", "a-password", "orderer", verbose=True
)
mock_get_pod.assert_called_once_with(
namespace="a-namespace", release="a-ca", app="hlf-ca", verbose=True
)
mock_executor.execute.assert_not_called()
mock_sleep.assert_not_called()
@patch("nephos.fabric.crypto.sleep")
@patch("nephos.fabric.crypto.get_helm_pod")
@patch("nephos.fabric.crypto.check_id")
def test_register_id_error(self, mock_check_id, mock_get_pod, mock_sleep):
mock_executor = Mock()
mock_check_id.side_effect = [False]
mock_get_pod.side_effect = [mock_executor]
mock_executor.execute.side_effect = [
(None, "connection error"), # Error registering identities
("Register", None), # Register identities
]
register_id("a-namespace", "a-ca", "an-ord", "a-password", "orderer")
mock_get_pod.assert_called_once_with(
namespace="a-namespace", release="a-ca", app="hlf-ca", verbose=False
)
mock_executor.execute.assert_has_calls(
[
call(
"fabric-ca-client register --id.name an-ord --id.secret a-password --id.type orderer"
),
call(
"fabric-ca-client register --id.name an-ord --id.secret a-password --id.type orderer"
),
]
)
mock_sleep.assert_called_once_with(15)
@patch("nephos.fabric.crypto.sleep")
@patch("nephos.fabric.crypto.get_helm_pod")
@patch("nephos.fabric.crypto.check_id")
def test_register_id_admin(self, mock_check_id, mock_get_pod, mock_sleep):
mock_executor = Mock()
mock_check_id.side_effect = [False]
mock_get_pod.side_effect = [mock_executor]
mock_executor.execute.side_effect = [("Register", None)] # Register identities
register_id("a-namespace", "a-ca", "an-admin", "a-password", admin=True)
mock_get_pod.assert_called_once_with(
namespace="a-namespace", release="a-ca", app="hlf-ca", verbose=False
)
mock_executor.execute.assert_called_once_with(
"fabric-ca-client register --id.name an-admin --id.secret a-password --id.type client"
+ " --id.attrs 'admin=true:ecert'"
)
mock_sleep.assert_not_called()
class TestEnrollId:
OPTS = {
"core": {"dir_crypto": "./crypto"},
"cas": {"a-ca": {"namespace": "ca-namespace", "tls_cert": "./tls_cert.pem"}},
}
@patch("nephos.fabric.crypto.isdir")
@patch("nephos.fabric.crypto.ingress_read")
@patch("nephos.fabric.crypto.execute_until_success")
@patch("nephos.fabric.crypto.abspath")
def test_enroll_id(
self, mock_abspath, mock_execute_until_success, mock_ingress_read, mock_isdir
):
mock_ingress_read.side_effect = [["an-ingress"]]
mock_isdir.side_effect = [False]
mock_abspath.side_effect = ["/home/nephos/tls_cert.pem"]
enroll_id(self.OPTS, "a-ca", "an-ord", "a-password")
mock_ingress_read.assert_called_once_with(
"a-ca-hlf-ca", namespace="ca-namespace", verbose=False
)
mock_abspath.assert_called_once_with("./tls_cert.pem")
mock_isdir.assert_called_once_with("./crypto/an-ord_MSP")
mock_execute_until_success.assert_called_once_with(
"FABRIC_CA_CLIENT_HOME=./crypto fabric-ca-client enroll "
+ "-u https://an-ord:a-password@an-ingress -M ./crypto/an-ord_MSP "
+ "--tls.certfiles /home/nephos/tls_cert.pem"
)
@patch("nephos.fabric.crypto.isdir")
@patch("nephos.fabric.crypto.ingress_read")
@patch("nephos.fabric.crypto.execute_until_success")
@patch("nephos.fabric.crypto.abspath")
def test_enroll_id_again(
self, mock_abspath, mock_execute_until_success, mock_ingress_read, mock_isdir
):
mock_ingress_read.side_effect = [["an-ingress"]]
mock_isdir.side_effect = [True]
mock_abspath.side_effect = ["/home/nephos/tls_cert.pem"]
enroll_id(self.OPTS, "a-ca", "a-peer", "a-password")
mock_ingress_read.assert_called_once_with(
"a-ca-hlf-ca", namespace="ca-namespace", verbose=False
)
mock_isdir.assert_called_once_with("./crypto/a-peer_MSP")
mock_execute_until_success.assert_not_called()
@patch("nephos.fabric.crypto.isdir")
@patch("nephos.fabric.crypto.ingress_read")
@patch("nephos.fabric.crypto.execute_until_success")
@patch("nephos.fabric.crypto.abspath")
def test_enroll_verbose(
self, mock_abspath, mock_execute_until_success, mock_ingress_read, mock_isdir
):
mock_ingress_read.side_effect = [["an-ingress"]]
mock_isdir.side_effect = [False]
mock_abspath.side_effect = ["/home/nephos/tls_cert.pem"]
enroll_id(self.OPTS, "a-ca", "a-peer", "a-password", verbose=True)
mock_ingress_read.assert_called_once_with(
"a-ca-hlf-ca", namespace="ca-namespace", verbose=True
)
mock_isdir.assert_called_once_with("./crypto/a-peer_MSP")
mock_execute_until_success.assert_called_once_with(
"FABRIC_CA_CLIENT_HOME=./crypto fabric-ca-client enroll "
+ "-u https://a-peer:a-password@an-ingress -M ./crypto/a-peer_MSP "
+ "--tls.certfiles /home/nephos/tls_cert.pem"
)
class TestCreateAdmin:
OPTS = {
"core": {"dir_config": "./config", "dir_crypto": "./crypto"},
"msps": {
"a_MSP": {
"ca": "a-ca",
"org_admin": "an_admin",
"org_adminpw": "a_password",
}
},
"cas": {"a-ca": {"namespace": "ca-namespace", "tls_cert": "./tls_cert.pem"}},
}
@patch("nephos.fabric.crypto.register_id")
@patch("nephos.fabric.crypto.listdir")
@patch("nephos.fabric.crypto.isdir")
@patch("nephos.fabric.crypto.ingress_read")
@patch("nephos.fabric.crypto.execute")
@patch("nephos.fabric.crypto.abspath")
def test_ca_create_admin(
self,
mock_abspath,
mock_execute,
mock_ingress_read,
mock_isdir,
mock_listdir,
mock_register_id,
):
mock_isdir.side_effect = [False]
mock_listdir.side_effect = [False]
mock_ingress_read.side_effect = [["an-ingress"]]
mock_abspath.side_effect = ["/home/nephos/tls_cert.pem"]
create_admin(self.OPTS, "a_MSP")
mock_ingress_read.assert_called_once_with(
"a-ca-hlf-ca", namespace="ca-namespace", verbose=False
)
mock_register_id.assert_called_once_with(
"ca-namespace", "a-ca", "an_admin", "a_password", admin=True, verbose=False
)
mock_isdir.assert_called_once_with("./crypto/a_MSP/keystore")
mock_listdir.assert_not_called()
mock_abspath.assert_called_once_with("./tls_cert.pem")
mock_execute.assert_called_once_with(
"FABRIC_CA_CLIENT_HOME=./config fabric-ca-client enroll "
+ "-u https://an_admin:a_password@an-ingress -M ./crypto/a_MSP --tls.certfiles /home/nephos/tls_cert.pem",
verbose=False,
)
@patch("nephos.fabric.crypto.register_id")
@patch("nephos.fabric.crypto.listdir")
@patch("nephos.fabric.crypto.isdir")
@patch("nephos.fabric.crypto.ingress_read")
@patch("nephos.fabric.crypto.execute")
@patch("nephos.fabric.crypto.abspath")
def test_ca_create_admin_again(
self,
mock_abspath,
mock_execute,
mock_ingress_read,
mock_isdir,
mock_listdir,
mock_register_id,
):
mock_isdir.side_effect = [True]
mock_listdir.side_effect = [True]
mock_ingress_read.side_effect = [["an-ingress"]]
mock_abspath.side_effect = ["/home/nephos/tls_cert.pem"]
create_admin(self.OPTS, "a_MSP", verbose=True)
mock_ingress_read.assert_called_once_with(
"a-ca-hlf-ca", namespace="ca-namespace", verbose=True
)
mock_register_id.assert_called_once_with(
"ca-namespace", "a-ca", "an_admin", "a_password", admin=True, verbose=True
)
mock_isdir.assert_called_once_with("./crypto/a_MSP/keystore")
mock_listdir.assert_called_once_with("./crypto/a_MSP/keystore")
mock_abspath.assert_not_called()
mock_execute.assert_not_called()
class TestAdminCreds:
OPTS = {"msps": {"an-msp": {"namespace": "msp-ns", "org_admin": "an-admin"}}}
@patch("nephos.fabric.crypto.credentials_secret")
def test_admin_creds(self, mock_credentials_secret):
mock_credentials_secret.side_effect = [{"CA_PASSWORD": "a_password"}]
admin_creds(self.OPTS, "an-msp")
mock_credentials_secret.assert_called_once_with(
"hlf--an-admin-admincred",
"msp-ns",
username="an-admin",
password=None,
verbose=False,
)
assert self.OPTS["msps"]["an-msp"].get("org_adminpw") == "a_password"
@patch("nephos.fabric.crypto.credentials_secret")
def test_admin_creds_again(self, mock_credentials_secret):
mock_credentials_secret.side_effect = [{"CA_PASSWORD": "a_password"}]
admin_creds(self.OPTS, "an-msp", verbose=True)
mock_credentials_secret.assert_called_once_with(
"hlf--an-admin-admincred",
"msp-ns",
username="an-admin",
password="a_password",
verbose=True,
)
assert self.OPTS["msps"]["an-msp"].get("org_adminpw") == "a_password"
class TestCopySecret:
@patch("nephos.fabric.crypto.shutil")
@patch("nephos.fabric.crypto.makedirs")
@patch("nephos.fabric.crypto.isfile")
@patch("nephos.fabric.crypto.isdir")
@patch("nephos.fabric.crypto.glob")
def test_copy_secret(
self, mock_glob, mock_isdir, mock_isfile, mock_makedirs, mock_shutil
):
mock_glob.side_effect = [["./a_dir/a_MSP/signcerts/cert.pem"]]
mock_isfile.side_effect = [False]
mock_isdir.side_effect = [False]
copy_secret("./a_dir/a_MSP/signcerts", "./a_dir/a_MSP/admincerts")
mock_glob.assert_called_once_with("./a_dir/a_MSP/signcerts/*")
mock_isfile.assert_called_once_with("./a_dir/a_MSP/admincerts/cert.pem")
mock_isdir.assert_called_once_with("./a_dir/a_MSP/admincerts")
mock_makedirs.assert_called_once_with("./a_dir/a_MSP/admincerts")
mock_shutil.copy.assert_called_once_with(
"./a_dir/a_MSP/signcerts/cert.pem", "./a_dir/a_MSP/admincerts/cert.pem"
)
@patch("nephos.fabric.crypto.shutil")
@patch("nephos.fabric.crypto.makedirs")
@patch("nephos.fabric.crypto.isfile")
@patch("nephos.fabric.crypto.isdir")
@patch("nephos.fabric.crypto.glob")
def test_copy_secret_again(
self, mock_glob, mock_isdir, mock_isfile, mock_makedirs, mock_shutil
):
mock_glob.side_effect = [["./a_dir/a_MSP/signcerts/cert.pem"]]
mock_isfile.side_effect = [True]
copy_secret("./a_dir/a_MSP/signcerts", "./a_dir/a_MSP/admincerts")
mock_glob.assert_called_once_with("./a_dir/a_MSP/signcerts/*")
mock_isfile.assert_called_once_with("./a_dir/a_MSP/admincerts/cert.pem")
mock_isdir.assert_not_called()
mock_makedirs.assert_not_called()
mock_shutil.copy.assert_not_called()
@patch("nephos.fabric.crypto.shutil")
@patch("nephos.fabric.crypto.makedirs")
@patch("nephos.fabric.crypto.isfile")
@patch("nephos.fabric.crypto.isdir")
@patch("nephos.fabric.crypto.glob")
def test_copy_secret_fail(
self, mock_glob, mock_isdir, mock_isfile, mock_makedirs, mock_shutil
):
mock_glob.side_effect = [[]]
with pytest.raises(ValueError):
copy_secret("./a_dir/a_MSP/signcerts", "./a_dir/a_MSP/admincerts")
mock_glob.assert_called_once_with("./a_dir/a_MSP/signcerts/*")
mock_isfile.assert_not_called()
mock_isdir.assert_not_called()
mock_makedirs.assert_not_called()
mock_shutil.copy.assert_not_called()
# TODO: Add verbose test
class TestMspSecrets:
OPTS = {
"core": {"dir_crypto": "./crypto"},
"cas": {"a-ca": {}},
"msps": {
"a_MSP": {"namespace": "msp-ns", "org_admin": "an-admin", "ca": "a-ca"}
},
}
@patch("nephos.fabric.crypto.id_to_secrets")
@patch("nephos.fabric.crypto.glob")
@patch("nephos.fabric.crypto.copy_secret")
@patch("nephos.fabric.crypto.cacerts_to_secrets")
def test_msp_secrets(
self, mock_cacerts_to_secrets, mock_copy_secret, mock_glob, mock_id_to_secrets
):
opts = deepcopy(self.OPTS)
msp_secrets(opts, "a_MSP")
mock_glob.assert_not_called()
mock_copy_secret.assert_called_once_with(
"./crypto/a_MSP/signcerts", "./crypto/a_MSP/admincerts"
)
mock_cacerts_to_secrets.assert_called_once_with(
"msp-ns", "./crypto/a_MSP", "an-admin", verbose=False
)
mock_id_to_secrets.assert_called_once_with(
"msp-ns", "./crypto/a_MSP", "an-admin", verbose=False
)
@patch("nephos.fabric.crypto.id_to_secrets")
@patch("nephos.fabric.crypto.glob")
@patch("nephos.fabric.crypto.copy_secret")
@patch("nephos.fabric.crypto.cacerts_to_secrets")
def test_msp_secrets_cryptogen(
self, mock_cacerts_to_secrets, mock_copy_secret, mock_glob, mock_id_to_secrets
):
mock_glob.side_effect = [
[
"./crypto/crypto-config/ordererOrganizations/msp-ns.domain/users/Admin@msp-ns.domain/msp"
]
]
opts = deepcopy(self.OPTS)
opts["cas"] = {}
msp_secrets(opts, "a_MSP")
mock_glob.assert_called_once_with(
"./crypto/crypto-config/*Organizations/msp-ns*/users/Admin*/msp"
)
mock_copy_secret.assert_called_once_with(
"./crypto/crypto-config/ordererOrganizations/msp-ns.domain/users/Admin@msp-ns.domain/msp/signcerts",
"./crypto/crypto-config/ordererOrganizations/msp-ns.domain/users/Admin@msp-ns.domain/msp/admincerts",
)
mock_cacerts_to_secrets.assert_called_once_with(
"msp-ns",
"./crypto/crypto-config/ordererOrganizations/msp-ns.domain/users/Admin@msp-ns.domain/msp",
"an-admin",
verbose=False,
)
mock_id_to_secrets.assert_called_once_with(
"msp-ns",
"./crypto/crypto-config/ordererOrganizations/msp-ns.domain/users/Admin@msp-ns.domain/msp",
"an-admin",
verbose=False,
)
@patch("nephos.fabric.crypto.id_to_secrets")
@patch("nephos.fabric.crypto.glob")
@patch("nephos.fabric.crypto.copy_secret")
@patch("nephos.fabric.crypto.cacerts_to_secrets")
def test_msp_secrets_cryptogen_fail(
self, mock_cacerts_to_secrets, mock_copy_secret, mock_glob, mock_id_to_secrets
):
mock_glob.side_effect = [
[
"./crypto/crypto-config/ordererOrganizations/msp-ns.domain/users/Admin@msp-ns.domain/msp",
"./crypto/crypto-config/peerOrganizations/msp-ns.domain/users/Admin@msp-ns.domain/msp",
]
]
opts = deepcopy(self.OPTS)
opts["cas"] = {}
with pytest.raises(ValueError):
msp_secrets(opts, "a_MSP")
mock_glob.assert_called_once_with(
"./crypto/crypto-config/*Organizations/msp-ns*/users/Admin*/msp"
)
mock_copy_secret.assert_not_called()
mock_cacerts_to_secrets.assert_not_called()
mock_id_to_secrets.assert_not_called()
# TODO: Add verbosity test
class TestAdminMsp:
OPTS = {
"core": {"dir_config": "./a-dir"},
"cas": {"a-ca": {}},
"msps": {
"an-msp": {"namespace": "msp-ns", "ca": "a-ca", "org_admin": "an_admin"}
},
}
@patch("nephos.fabric.crypto.ns_create")
@patch("nephos.fabric.crypto.msp_secrets")
@patch("nephos.fabric.crypto.create_admin")
@patch("nephos.fabric.crypto.admin_creds")
def test_admin_msp(
self, mock_ca_creds, mock_create_admin, mock_msp_secrets, mock_ns_create
):
opts = deepcopy(self.OPTS)
admin_msp(opts, "an-msp")
mock_ns_create.assert_called_once_with("msp-ns", verbose=False)
mock_ca_creds.assert_called_once_with(opts, "an-msp", verbose=False)
mock_create_admin.assert_called_once_with(opts, "an-msp", verbose=False)
mock_msp_secrets.assert_called_once_with(opts, "an-msp", verbose=False)
@patch("nephos.fabric.crypto.ns_create")
@patch("nephos.fabric.crypto.msp_secrets")
@patch("nephos.fabric.crypto.create_admin")
@patch("nephos.fabric.crypto.admin_creds")
def test_admin_msp_cryptogen(
self, mock_ca_creds, mock_create_admin, mock_msp_secrets, mock_ns_create
):
opts = deepcopy(self.OPTS)
opts["cas"] = {}
admin_msp(opts, "an-msp")
mock_ns_create.assert_called_once_with("msp-ns", verbose=False)
mock_ca_creds.assert_not_called()
mock_create_admin.assert_not_called()
mock_msp_secrets.assert_called_once_with(opts, "an-msp", verbose=False)
class TestItemToSecret:
@patch("nephos.fabric.crypto.print")
@patch("nephos.fabric.crypto.crypto_secret")
def test_item_to_secret(self, mock_crypto_secret, mock_print):
item_to_secret(
"msp-ns",
"./crypto",
"a-user",
CryptoInfo("a-type", "a_subfolder", "a-key", True),
)
mock_crypto_secret.assert_called_once_with(
"hlf--a-user-a-type",
"msp-ns",
file_path="./crypto/a_subfolder",
key="a-key",
verbose=False,
)
mock_print.assert_not_called()
@patch("nephos.fabric.crypto.print")
@patch("nephos.fabric.crypto.crypto_secret")
def test_item_to_secret_unrequired(self, mock_crypto_secret, mock_print):
mock_crypto_secret.side_effect = [Exception()]
item_to_secret(
"msp-ns",
"./crypto",
"a-user",
CryptoInfo("a-type", "a_subfolder", "a-key", False),
)
mock_crypto_secret.assert_called_once_with(
"hlf--a-user-a-type",
"msp-ns",
file_path="./crypto/a_subfolder",
key="a-key",
verbose=False,
)
mock_print.assert_called_once_with(
'No ./crypto/a_subfolder found, so secret "hlf--a-user-a-type" was not created'
)
@patch("nephos.fabric.crypto.print")
@patch("nephos.fabric.crypto.crypto_secret")
def test_item_to_secret_failed(self, mock_crypto_secret, mock_print):
mock_crypto_secret.side_effect = [Exception()]
with pytest.raises(Exception):
item_to_secret(
"msp-ns",
"./crypto",
"a-user",
CryptoInfo("a-type", "a_subfolder", "a-key", True),
)
mock_crypto_secret.assert_called_once_with(
"hlf--a-user-a-type",
"msp-ns",
file_path="./crypto/a_subfolder",
key="a-key",
verbose=False,
)
mock_print.assert_not_called()
class TestIdToSecrets:
@patch("nephos.fabric.crypto.item_to_secret")
def test_id_to_secrets(self, mock_item_to_secret):
mock_item_to_secret.side_effect = [None, None]
id_to_secrets("msp-ns", "./crypto", "a-user")
mock_item_to_secret.assert_has_calls(
[
call(
"msp-ns",
"./crypto",
"a-user",
CryptoInfo("idcert", "signcerts", "cert.pem", True),
verbose=False,
),
call(
"msp-ns",
"./crypto",
"a-user",
CryptoInfo("idkey", "keystore", "key.pem", True),
verbose=False,
),
]
)
@patch("nephos.fabric.crypto.item_to_secret")
def test_id_to_secrets_nocert(self, mock_item_to_secret):
mock_item_to_secret.side_effect = [Exception()]
with pytest.raises(Exception):
id_to_secrets("msp-ns", "./crypto", "a-user", verbose=True)
mock_item_to_secret.assert_called_once_with(
"msp-ns",
"./crypto",
"a-user",
CryptoInfo("idcert", "signcerts", "cert.pem", True),
verbose=True,
)
class TestCaCertsToSecrets:
@patch("nephos.fabric.crypto.item_to_secret")
def test_cacerts_to_secrets(self, mock_item_to_secret):
mock_item_to_secret.side_effect = [None, None]
cacerts_to_secrets("msp-ns", "./crypto", "a-user")
mock_item_to_secret.assert_has_calls(
[
call(
"msp-ns",
"./crypto",
"a-user",
CryptoInfo("cacert", "cacerts", "cacert.pem", True),
verbose=False,
),
call(
"msp-ns",
"./crypto",
"a-user",
CryptoInfo(
"caintcert",
"intermediatecerts",
"intermediatecacert.pem",
False,
),
verbose=False,
),
]
)
@patch("nephos.fabric.crypto.item_to_secret")
def test_cacerts_to_secrets_nocacert(self, mock_item_to_secret):
mock_item_to_secret.side_effect = [Exception()]
with pytest.raises(Exception):
cacerts_to_secrets("msp-ns", "./crypto", "a-user")
mock_item_to_secret.assert_called_once_with(
"msp-ns",
"./crypto",
"a-user",
CryptoInfo("cacert", "cacerts", "cacert.pem", True),
verbose=False,
)
class TestSetupId:
OPTS = {
"core": {"dir_crypto": "./crypto"},
"cas": {
"ca-ord": {"namespace": "ca-namespace"},
"ca-peer": {"namespace": "ca-namespace"},
},
"msps": {
"ord_MSP": {"ca": "ca-ord", "namespace": "ord-ns"},
"peer_MSP": {"ca": "ca-peer", "namespace": "peer-ns"},
},
"peers": {"names": ["peer0"], "msp": "peer_MSP"},
"orderers": {"names": ["ord0"], "msp": "ord_MSP"},
}
@patch("nephos.fabric.crypto.register_id")
@patch("nephos.fabric.crypto.enroll_id")
@patch("nephos.fabric.crypto.id_to_secrets")
@patch("nephos.fabric.crypto.glob")
@patch("nephos.fabric.crypto.credentials_secret")
def test_setup_id(
self,
mock_credentials_secret,
mock_glob,
mock_id_to_secrets,
mock_enroll_id,
mock_register_id,
):
opts = deepcopy(self.OPTS)
mock_credentials_secret.side_effect = [
{"CA_USERNAME": "peer0", "CA_PASSWORD": "peer0-pw"}
]
mock_enroll_id.side_effect = ["./peer0_MSP"]
setup_id(opts, "peer_MSP", "peer0", "peer")
mock_credentials_secret.assert_called_once_with(
"hlf--peer0-cred", "peer-ns", username="peer0", verbose=False
)
mock_register_id.assert_called_once_with(
"ca-namespace", "ca-peer", "peer0", "peer0-pw", "peer", verbose=False
)
mock_enroll_id.assert_called_once_with(
opts, "ca-peer", "peer0", "peer0-pw", verbose=False
)
mock_glob.assert_not_called()
mock_id_to_secrets.assert_called_once_with(
namespace="peer-ns", msp_path="./peer0_MSP", username="peer0", verbose=False
)
@patch("nephos.fabric.crypto.register_id")
@patch("nephos.fabric.crypto.enroll_id")
@patch("nephos.fabric.crypto.id_to_secrets")
@patch("nephos.fabric.crypto.glob")
@patch("nephos.fabric.crypto.credentials_secret")
def test_setup_id_ord(
self,
mock_credentials_secret,
mock_glob,
mock_id_to_secrets,
mock_enroll_id,
mock_register_id,
):
opts = deepcopy(self.OPTS)
mock_credentials_secret.side_effect = [
{"CA_USERNAME": "ord0", "CA_PASSWORD": "ord0-pw"}
]
mock_enroll_id.side_effect = ["./ord0_MSP"]
setup_id(opts, "ord_MSP", "ord0", "orderer")
mock_credentials_secret.assert_called_once_with(
"hlf--ord0-cred", "ord-ns", username="ord0", verbose=False
)
mock_register_id.assert_called_once_with(
"ca-namespace", "ca-ord", "ord0", "ord0-pw", "orderer", verbose=False
)
mock_enroll_id.assert_called_once_with(
opts, "ca-ord", "ord0", "ord0-pw", verbose=False
)
mock_glob.assert_not_called()
mock_id_to_secrets.assert_called_once_with(
namespace="ord-ns", msp_path="./ord0_MSP", username="ord0", verbose=False
)
@patch("nephos.fabric.crypto.register_id")
@patch("nephos.fabric.crypto.enroll_id")
@patch("nephos.fabric.crypto.id_to_secrets")
@patch("nephos.fabric.crypto.glob")
@patch("nephos.fabric.crypto.credentials_secret")
def test_setup_id_cryptogen(
self,
mock_credentials_secret,
mock_glob,
mock_id_to_secrets,
mock_enroll_id,
mock_register_id,
):
opts = deepcopy(self.OPTS)
opts["cas"] = {}
mock_glob.side_effect = [
[
"./crypto/crypto-config/peerOrganizations/peer-ns.domain/peers/peer0.domain/msp"
]
]
setup_id(opts, "peer_MSP", "peer0", "peer")
mock_credentials_secret.assert_not_called()
mock_register_id.assert_not_called()
mock_enroll_id.assert_not_called()
mock_glob.assert_called_once_with(
"./crypto/crypto-config/peerOrganizations/peer-ns*/peers/peer0*/msp"
)
mock_id_to_secrets.assert_called_once_with(
namespace="peer-ns",
msp_path="./crypto/crypto-config/peerOrganizations/peer-ns.domain/peers/peer0.domain/msp",
username="peer0",
verbose=False,
)
@patch("nephos.fabric.crypto.register_id")
@patch("nephos.fabric.crypto.enroll_id")
@patch("nephos.fabric.crypto.id_to_secrets")
@patch("nephos.fabric.crypto.glob")
@patch("nephos.fabric.crypto.credentials_secret")
def test_setup_id_cryptogen_fail(
self,
mock_credentials_secret,
mock_glob,
mock_id_to_secrets,
mock_enroll_id,
mock_register_id,
):
opts = deepcopy(self.OPTS)
opts["cas"] = {}
mock_glob.side_effect = [
[
"./crypto/crypto-config/peerOrganizations/peer-ns.domain/peers/peer0.domain/msp",
"./crypto/crypto-config/peerOrganizations/peer-ns.domain/peers/peer0.another-domain/msp",
]
]
with pytest.raises(ValueError):
setup_id(opts, "peer_MSP", "peer0", "peer")
mock_credentials_secret.assert_not_called()
mock_register_id.assert_not_called()
mock_enroll_id.assert_not_called()
mock_glob.assert_called_once_with(
"./crypto/crypto-config/peerOrganizations/peer-ns*/peers/peer0*/msp"
)
mock_id_to_secrets.assert_not_called()
class TestSetupNodes:
OPTS = {
"cas": {
"ca-ord": {"namespace": "ca-namespace"},
"ca-peer": {"namespace": "ca-namespace"},
},
"msps": {
"ord_MSP": {"ca": "ca-ord", "namespace": "ord-ns"},
"peer_MSP": {"ca": "ca-peer", "namespace": "peer-ns"},
},
"peers": {"names": ["peer0", "peer1"], "msp": "peer_MSP"},
"orderers": {"names": ["ord0"], "msp": "ord_MSP"},
}
@patch("nephos.fabric.crypto.setup_id")
def test_setup_nodes(self, mock_setup_id):
setup_nodes(self.OPTS, "peer")
mock_setup_id.assert_has_calls(
[
call(self.OPTS, "peer_MSP", "peer0", "peer", verbose=False),
call(self.OPTS, "peer_MSP", "peer1", "peer", verbose=False),
]
)
@patch("nephos.fabric.crypto.setup_id")
def test_setup_nodes_ord(self, mock_setup_id):
setup_nodes(self.OPTS, "orderer", verbose=True)
mock_setup_id.assert_has_calls(
[call(self.OPTS, "ord_MSP", "ord0", "orderer", verbose=True)]
)
class TestGenesisBlock:
OPTS = {
"core": {"dir_config": "./config", "dir_crypto": "./crypto"},
"msps": {"ord_MSP": {"namespace": "ord-ns"}},
"orderers": {"secret_genesis": "a-genesis-secret", "msp": "ord_MSP"},
}
@patch("nephos.fabric.crypto.secret_from_file")
@patch("nephos.fabric.crypto.print")
@patch("nephos.fabric.crypto.exists")
@patch("nephos.fabric.crypto.execute")
@patch("nephos.fabric.crypto.chdir")
def test_blocks(
self, mock_chdir, mock_execute, mock_exists, mock_print, mock_secret_from_file
):
mock_exists.side_effect = [False, False]
genesis_block(self.OPTS)
mock_chdir.assert_has_calls([call("./config"), call(PWD)])
mock_exists.assert_called_once_with("./crypto/genesis.block")
mock_execute.assert_called_once_with(
"configtxgen -profile OrdererGenesis -outputBlock ./crypto/genesis.block",
verbose=False,
)
mock_print.assert_not_called()
mock_secret_from_file.assert_called_once_with(
secret="a-genesis-secret",
namespace="ord-ns",
key="genesis.block",
filename="./crypto/genesis.block",
verbose=False,
)
@patch("nephos.fabric.crypto.secret_from_file")
@patch("nephos.fabric.crypto.print")
@patch("nephos.fabric.crypto.exists")
@patch("nephos.fabric.crypto.execute")
@patch("nephos.fabric.crypto.chdir")
def test_again(
self, mock_chdir, mock_execute, mock_exists, mock_print, mock_secret_from_file
):
mock_exists.side_effect = [True, True]
genesis_block(self.OPTS, True)
mock_chdir.assert_has_calls([call("./config"), call(PWD)])
mock_exists.assert_called_once_with("./crypto/genesis.block")
mock_execute.assert_not_called()
mock_print.assert_called_once_with("./crypto/genesis.block already exists")
mock_secret_from_file.assert_called_once_with(
secret="a-genesis-secret",
namespace="ord-ns",
key="genesis.block",
filename="./crypto/genesis.block",
verbose=True,
)
class TestChannelTx:
OPTS = {
"core": {"dir_config": "./config", "dir_crypto": "./crypto"},
"msps": {"peer_MSP": {"namespace": "peer-ns"}},
"peers": {
"channel_name": "a-channel",
"channel_profile": "AProfile",
"msp": "peer_MSP",
"secret_channel": "a-channel-secret",
},
}
@patch("nephos.fabric.crypto.secret_from_file")
@patch("nephos.fabric.crypto.print")
@patch("nephos.fabric.crypto.exists")
@patch("nephos.fabric.crypto.execute")
@patch("nephos.fabric.crypto.chdir")
def test_blocks(
self, mock_chdir, mock_execute, mock_exists, mock_print, mock_secret_from_file
):
mock_exists.side_effect = [False, False]
channel_tx(self.OPTS)
mock_chdir.assert_has_calls([call("./config"), call(PWD)])
mock_exists.assert_called_once_with("./crypto/a-channel.tx")
mock_execute.assert_called_once_with(
"configtxgen -profile AProfile -channelID a-channel -outputCreateChannelTx ./crypto/a-channel.tx",
verbose=False,
)
mock_print.assert_not_called()
mock_secret_from_file.assert_called_once_with(
secret="a-channel-secret",
namespace="peer-ns",
key="a-channel.tx",
filename="./crypto/a-channel.tx",
verbose=False,
)
@patch("nephos.fabric.crypto.secret_from_file")
@patch("nephos.fabric.crypto.print")
@patch("nephos.fabric.crypto.exists")
@patch("nephos.fabric.crypto.execute")
@patch("nephos.fabric.crypto.chdir")
def test_again(
self, mock_chdir, mock_execute, mock_exists, mock_print, mock_secret_from_file
):
mock_exists.side_effect = [True, True]
channel_tx(self.OPTS, True)
mock_chdir.assert_has_calls([call("./config"), call(PWD)])
mock_exists.assert_called_once_with("./crypto/a-channel.tx")
mock_execute.assert_not_called()
mock_print.assert_called_once_with("./crypto/a-channel.tx already exists")
mock_secret_from_file.assert_called_once_with(
secret="a-channel-secret",
namespace="peer-ns",
key="a-channel.tx",
filename="./crypto/a-channel.tx",
verbose=True,
)
| 38.615306 | 118 | 0.614988 | 4,564 | 37,843 | 4.792287 | 0.042068 | 0.073519 | 0.110278 | 0.139859 | 0.913771 | 0.901609 | 0.884967 | 0.873537 | 0.843178 | 0.82617 | 0 | 0.001582 | 0.248263 | 37,843 | 979 | 119 | 38.65475 | 0.76726 | 0.005708 | 0 | 0.664105 | 0 | 0.020856 | 0.294484 | 0.171767 | 0 | 0 | 0 | 0.001021 | 0.150384 | 1 | 0.043908 | false | 0.027442 | 0.004391 | 0 | 0.074643 | 0.023052 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
5836c0c0a812983e6ecde85f67763900c9f0dac0 | 12,990 | py | Python | tests/test_vertex.py | tscizzle/pygraph | b6fe9e21bd30ae4249d02a1818b49351575fa98e | [
"MIT"
] | 1 | 2017-04-09T21:58:28.000Z | 2017-04-09T21:58:28.000Z | tests/test_vertex.py | tscizzle/graphpy | b6fe9e21bd30ae4249d02a1818b49351575fa98e | [
"MIT"
] | null | null | null | tests/test_vertex.py | tscizzle/graphpy | b6fe9e21bd30ae4249d02a1818b49351575fa98e | [
"MIT"
] | null | null | null | """
Tests for vertex.py
"""
from graphpy.edge import UndirectedEdge, DirectedEdge
from graphpy.vertex import UndirectedVertex, DirectedVertex
import unittest
################################################################################
# #
# Undirected #
# #
################################################################################
class TestUndirectedVertex(unittest.TestCase):
def test_create_undirected_vertex(self):
""" Create an undirected vertex """
v0 = UndirectedVertex(val='v0')
self.assertEqual(v0.val, 'v0')
self.assertEqual(set(v0.edges), set())
def test_undirected_vertex_val(self):
""" Get an undirected vertex's val property """
v0 = UndirectedVertex(val='v0')
self.assertEqual(v0.val, 'v0')
with self.assertRaises(AttributeError):
v0.val = ''
def test_undirected_vertex_edges(self):
""" Get an undirected vertex's edges property """
v0 = UndirectedVertex(val='v0')
v1 = UndirectedVertex(val='v1')
v2 = UndirectedVertex(val='v2')
e00 = UndirectedEdge((v0, v0))
e01 = UndirectedEdge((v0, v1))
e02 = UndirectedEdge((v0, v2))
v0.add_edge(e00)
v0.add_edge(e01)
v1.add_edge(e01)
v0.add_edge(e02)
v2.add_edge(e02)
self.assertEqual(set(v0.edges), set([e00, e01, e02]))
self.assertEqual(set(v1.edges), set([e01]))
self.assertEqual(set(v2.edges), set([e02]))
with self.assertRaises(AttributeError):
v0.edges = set()
def test_undirected_vertex_has_self_edge(self):
""" Get an undirected vertex's has_self_edge property """
v0 = UndirectedVertex(val='v0')
v1 = UndirectedVertex(val='v1')
v2 = UndirectedVertex(val='v2')
e00 = UndirectedEdge((v0, v0))
e01 = UndirectedEdge((v0, v1))
e11 = UndirectedEdge((v1, v1))
e02 = UndirectedEdge((v0, v2))
v0.add_edge(e00)
v0.add_edge(e01)
v1.add_edge(e01)
v0.add_edge(e02)
v2.add_edge(e02)
self.assertTrue(v0.has_self_edge)
self.assertFalse(v1.has_self_edge)
self.assertFalse(v2.has_self_edge)
with self.assertRaises(AttributeError):
v0.has_self_edge = True
v1.add_edge(e11)
v0.remove_edge(e00)
self.assertFalse(v0.has_self_edge)
self.assertTrue(v1.has_self_edge)
self.assertFalse(v2.has_self_edge)
def test_undirected_vertex_neighbors_and_degree(self):
""" Get undirected vertices' neighbors and degree properties """
v0 = UndirectedVertex(val='v0')
v1 = UndirectedVertex(val='v1')
v2 = UndirectedVertex(val='v2')
e00 = UndirectedEdge((v0, v0))
e01 = UndirectedEdge((v0, v1))
e02 = UndirectedEdge((v0, v2))
v0.add_edge(e01)
v0.add_edge(e02)
self.assertEqual(set(v0.neighbors), set([v1, v2]))
with self.assertRaises(AttributeError):
v0.neighbors = set()
self.assertEqual(v0.degree, 2)
with self.assertRaises(AttributeError):
v0.degree = 0
v0.add_edge(e00)
self.assertEqual(set(v0.neighbors), set([v0, v1, v2]))
self.assertEqual(v0.degree, 4)
def test_undirected_vertex_add_edge(self):
""" Add an edge to an undirected vertex """
v0 = UndirectedVertex(val='v0')
v1 = UndirectedVertex(val='v1')
v2 = UndirectedVertex(val='v2')
e00 = UndirectedEdge((v0, v0))
e01 = UndirectedEdge((v0, v1))
e10 = UndirectedEdge((v1, v0))
e02 = UndirectedEdge((v0, v2))
v0.add_edge(e00)
v0.add_edge(e01)
self.assertTrue(e00 in v0)
self.assertTrue(e01 in v0)
self.assertTrue(e10 in v0)
self.assertFalse(e02 in v0)
def test_undirected_vertex_remove_edge(self):
""" Remove an edge from an undirected vertex """
v0 = UndirectedVertex(val='v0')
v1 = UndirectedVertex(val='v1')
v2 = UndirectedVertex(val='v2')
e01 = UndirectedEdge((v0, v1))
e10 = UndirectedEdge((v1, v0))
e02 = UndirectedEdge((v0, v2))
v0.add_edge(e01)
v0.add_edge(e02)
v0.remove_edge(e01)
self.assertFalse(e01 in v0)
self.assertFalse(e10 in v0)
self.assertTrue(e02 in v0)
v0.remove_edge(e02)
self.assertFalse(e01 in v0)
self.assertFalse(e10 in v0)
self.assertFalse(e02 in v0)
def test_undirected_vertex_get(self):
""" Get an attribute of an undirected vertex """
v0 = UndirectedVertex(val='v0', attrs={'city': 'Modena'})
self.assertEqual(v0.get('city'), 'Modena')
self.assertIsNone(v0.get('notthere'))
def test_undirected_vertex_set(self):
""" Set an attribute of an undirected vertex """
v0 = UndirectedVertex(val='v0')
v0.set('city', 'Modena')
self.assertEqual(v0.attrs, {'city': 'Modena'})
v0.set(0, 1)
self.assertEqual(v0.attrs, {'city': 'Modena', 0: 1})
def test_undirected_vertex_has_attr(self):
""" Check if an undirected vertex has a particular attribute """
v0 = UndirectedVertex(val='v0', attrs={'city': 'Modena', 0: 1})
self.assertTrue(v0.has_attr('city'))
self.assertFalse(v0.has_attr('town'))
v0.del_attr('city')
self.assertFalse(v0.has_attr('city'))
def test_undirected_vertex_del_attr(self):
""" Delete an attribute of an undirected vertex """
v0 = UndirectedVertex(val='v0', attrs={'city': 'Modena', 0: 1})
v0.del_attr('city')
self.assertEqual(v0.attrs, {0: 1})
v0.del_attr(0)
self.assertEqual(v0.attrs, {})
def test_undirected_vertex_already_has_edge(self):
""" An undirected vertex should not be able to add an edge that it
already has """
v0 = UndirectedVertex(val='v0')
v1 = UndirectedVertex(val='v1')
e01 = UndirectedEdge((v0, v1))
v0.add_edge(e01)
with self.assertRaises(ValueError):
v0.add_edge(e01)
try:
v1.add_edge(e01)
except ValueError:
self.fail("Adding the edge (v0, v1) to v0 should not stop the edge "
"(v0, v1) from being added to v1.")
def test_undirected_vertex_not_part_of_edge(self):
""" An undirected vertex should not be able add an edge which doesn't
have it as a vertex """
v0 = UndirectedVertex(val='v0')
v1 = UndirectedVertex(val='v1')
v2 = UndirectedVertex(val='v2')
e12 = UndirectedEdge((v1, v2))
with self.assertRaises(ValueError):
v0.add_edge(e12)
################################################################################
# #
# Directed #
# #
################################################################################
class TestDirectedVertex(unittest.TestCase):
def test_create_directed_vertex(self):
""" Create a directed vertex """
v0 = DirectedVertex(val='v0')
self.assertEqual(v0.val, 'v0')
self.assertEqual(set(v0.edges), set())
def test_directed_vertex_val(self):
""" Get a directed vertex's val property """
v0 = DirectedVertex(val='v0')
self.assertEqual(v0.val, 'v0')
with self.assertRaises(AttributeError):
v0.val = ''
def test_directed_vertex_edges(self):
""" Get a directed vertex's edges property """
v0 = DirectedVertex(val='v0')
v1 = DirectedVertex(val='v1')
v2 = DirectedVertex(val='v2')
e00 = DirectedEdge((v0, v0))
e01 = DirectedEdge((v0, v1))
e20 = DirectedEdge((v2, v0))
v0.add_edge(e00)
v0.add_edge(e01)
v1.add_edge(e01)
v0.add_edge(e20)
v2.add_edge(e20)
self.assertEqual(set(v0.edges), set([e00, e01, e20]))
self.assertEqual(set(v1.edges), set([e01]))
self.assertEqual(set(v2.edges), set([e20]))
with self.assertRaises(AttributeError):
v0.edges = set()
def test_directed_vertex_outs_and_ins_and_degrees(self):
""" Get directed vertices' outs, ins, out_degree, and in_degree
properties """
v0 = DirectedVertex(val='v0')
v1 = DirectedVertex(val='v1')
v2 = DirectedVertex(val='v2')
e00 = DirectedEdge((v0, v0))
e01 = DirectedEdge((v0, v1))
e02 = DirectedEdge((v0, v2))
e10 = DirectedEdge((v1, v0))
v0.add_edge(e00)
v0.add_edge(e01)
v0.add_edge(e02)
v0.add_edge(e10)
self.assertEqual(set(v0.outs), set([v0, v1, v2]))
self.assertEqual(set(v0.ins), set([v0, v1]))
self.assertEqual(v0.out_degree, 3)
self.assertEqual(v0.in_degree, 2)
self.assertEqual(v0.degree, 5)
def test_directed_vertex_add_edge(self):
""" Add an edge to a directed vertex """
v0 = DirectedVertex(val='v0')
v1 = DirectedVertex(val='v1')
v2 = DirectedVertex(val='v2')
e01 = DirectedEdge((v0, v1))
e10 = DirectedEdge((v1, v0))
e02 = DirectedEdge((v0, v2))
v0.add_edge(e01)
self.assertTrue(e01 in v0)
self.assertFalse(e10 in v0)
self.assertFalse(e02 in v0)
def test_directed_vertex_remove_edge(self):
""" Remove an edge from a directed vertex """
v0 = DirectedVertex(val='v0')
v1 = DirectedVertex(val='v1')
v2 = DirectedVertex(val='v2')
e01 = DirectedEdge((v0, v1))
e10 = DirectedEdge((v1, v0))
e02 = DirectedEdge((v0, v2))
v0.add_edge(e01)
v0.add_edge(e10)
v0.add_edge(e02)
v0.remove_edge(e01)
self.assertFalse(e01 in v0)
self.assertTrue(e10 in v0)
self.assertTrue(e02 in v0)
v0.remove_edge(e02)
self.assertFalse(e01 in v0)
self.assertTrue(e10 in v0)
self.assertFalse(e02 in v0)
def test_directed_vertex_get(self):
""" Get an attribute of a directed vertex """
v0 = DirectedVertex(val='v0', attrs={'city': 'Modena'})
self.assertEqual(v0.get('city'), 'Modena')
self.assertIsNone(v0.get('notthere'))
def test_directed_vertex_set(self):
""" Set an attribute of an directed vertex """
v0 = DirectedVertex(val='v0')
v0.set('city', 'Modena')
self.assertEqual(v0.attrs, {'city': 'Modena'})
v0.set(0, 1)
self.assertEqual(v0.attrs, {'city': 'Modena', 0: 1})
def test_undirected_vertex_has_attr(self):
""" Check if a directed vertex has a particular attribute """
v0 = DirectedVertex(val='v0', attrs={'city': 'Modena', 0: 1})
self.assertTrue(v0.has_attr('city'))
self.assertFalse(v0.has_attr('town'))
v0.del_attr('city')
self.assertFalse(v0.has_attr('city'))
def test_directed_vertex_del_attr(self):
""" Delete an attribute of a directed vertex """
v0 = DirectedVertex(val='v0', attrs={'city': 'Modena', 0: 1})
v0.del_attr('city')
self.assertEqual(v0.attrs, {0: 1})
v0.del_attr(0)
self.assertEqual(v0.attrs, {})
def test_directed_vertex_already_has_edge(self):
""" A directed vertex should not be able to add an edge that it already
has """
v0 = DirectedVertex(val='v0')
v1 = DirectedVertex(val='v1')
e01 = DirectedEdge((v0, v1))
e10 = DirectedEdge((v1, v0))
v0.add_edge(e01)
with self.assertRaises(ValueError):
v0.add_edge(e01)
try:
v1.add_edge(e01)
except ValueError:
self.fail("Adding the edge (v0, v1) to v0 should not stop the edge "
"(v0, v1) from being added to v1.")
try:
v0.add_edge(e10)
except ValueError:
self.fail("There should be no exception because (v1 -> v0) is a "
"different edge than (v0 -> v1) for a directed vertex.")
def test_directed_vertex_not_part_of_edge(self):
""" A directed vertex should not be able add an edge which doesn't have
it as a vertex """
v0 = DirectedVertex(val='v0')
v1 = DirectedVertex(val='v1')
v2 = DirectedVertex(val='v2')
e12 = DirectedEdge((v1, v2))
with self.assertRaises(ValueError):
v0.add_edge(e12)
if __name__ == '__main__':
unittest.main()
| 32.638191 | 80 | 0.556813 | 1,521 | 12,990 | 4.633136 | 0.074293 | 0.04172 | 0.039591 | 0.042429 | 0.833404 | 0.792252 | 0.739322 | 0.718036 | 0.661984 | 0.615297 | 0 | 0.062377 | 0.296536 | 12,990 | 397 | 81 | 32.720403 | 0.708798 | 0.123788 | 0 | 0.762264 | 0 | 0 | 0.055224 | 0 | 0 | 0 | 0 | 0 | 0.283019 | 1 | 0.09434 | false | 0 | 0.011321 | 0 | 0.113208 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
586c977a99a033b3175c79188af15d56a019d674 | 23,072 | py | Python | backend/data_export/tests/test_repositories.py | WojciechKusa/doccano | 6013413474be20094be8662131e44b2fc3fb88f6 | [
"MIT"
] | null | null | null | backend/data_export/tests/test_repositories.py | WojciechKusa/doccano | 6013413474be20094be8662131e44b2fc3fb88f6 | [
"MIT"
] | null | null | null | backend/data_export/tests/test_repositories.py | WojciechKusa/doccano | 6013413474be20094be8662131e44b2fc3fb88f6 | [
"MIT"
] | null | null | null | import unittest
from model_mommy import mommy
from ..pipeline.repositories import (
FileRepository,
IntentDetectionSlotFillingRepository,
RelationExtractionRepository,
Seq2seqRepository,
SequenceLabelingRepository,
Speech2TextRepository,
TextClassificationRepository,
)
from projects.models import (
DOCUMENT_CLASSIFICATION,
IMAGE_CLASSIFICATION,
INTENT_DETECTION_AND_SLOT_FILLING,
SEQ2SEQ,
SEQUENCE_LABELING,
SPEECH2TEXT,
)
from projects.tests.utils import prepare_project
class TestRepository(unittest.TestCase):
def assert_records(self, repository, expected, confirmed_only=False):
records = list(repository.list(export_approved=confirmed_only))
self.assertEqual(len(records), len(expected))
for record, expect in zip(records, expected):
self.assertEqual(record.data, expect["data"])
self.assertEqual(record.label, expect["label"])
self.assertEqual(record.user, expect["user"])
class TestTextClassificationRepository(TestRepository):
def prepare_data(self, project):
self.confirmed_example = mommy.make("Example", project=project.item, text="confirmed")
self.category1 = mommy.make("Category", example=self.confirmed_example, user=project.admin)
self.category2 = mommy.make("Category", example=self.confirmed_example, user=project.annotator)
mommy.make("ExampleState", example=self.confirmed_example, confirmed_by=project.admin)
self.unconfirmed_example = mommy.make("Example", project=project.item, text="unconfirmed")
def test_list(self):
project = prepare_project(DOCUMENT_CLASSIFICATION)
repository = TextClassificationRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": [self.category1.label.text],
"user": project.admin.username,
},
{
"data": self.confirmed_example.text,
"label": [self.category2.label.text],
"user": project.annotator.username,
},
{"data": self.unconfirmed_example.text, "label": [], "user": "unknown"},
]
self.assert_records(repository, expected)
def test_list_on_collaborative_annotation(self):
project = prepare_project(DOCUMENT_CLASSIFICATION, collaborative_annotation=True)
repository = TextClassificationRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": [self.category1.label.text, self.category2.label.text],
"user": "all",
},
{
"data": self.unconfirmed_example.text,
"label": [],
"user": "all",
},
]
self.assert_records(repository, expected)
def test_list_confirmed_example_only(self):
project = prepare_project(DOCUMENT_CLASSIFICATION)
repository = TextClassificationRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": [self.category1.label.text],
"user": project.admin.username,
},
{
"data": self.confirmed_example.text,
"label": [self.category2.label.text],
"user": project.annotator.username,
},
]
self.assert_records(repository, expected, confirmed_only=True)
class TestSeq2seqRepository(TestRepository):
def prepare_data(self, project):
self.confirmed_example = mommy.make("Example", project=project.item, text="confirmed")
self.text1 = mommy.make("TextLabel", example=self.confirmed_example, user=project.admin)
self.text2 = mommy.make("TextLabel", example=self.confirmed_example, user=project.annotator)
mommy.make("ExampleState", example=self.confirmed_example, confirmed_by=project.admin)
self.unconfirmed_example = mommy.make("Example", project=project.item, text="unconfirmed")
def test_list(self):
project = prepare_project(SEQ2SEQ)
repository = Seq2seqRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": [self.text1.text],
"user": project.admin.username,
},
{
"data": self.confirmed_example.text,
"label": [self.text2.text],
"user": project.annotator.username,
},
{"data": self.unconfirmed_example.text, "label": [], "user": "unknown"},
]
self.assert_records(repository, expected)
def test_list_on_collaborative_annotation(self):
project = prepare_project(SEQ2SEQ, collaborative_annotation=True)
repository = Seq2seqRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": [self.text1.text, self.text2.text],
"user": "all",
},
{
"data": self.unconfirmed_example.text,
"label": [],
"user": "all",
},
]
self.assert_records(repository, expected)
def test_list_confirmed_example_only(self):
project = prepare_project(SEQ2SEQ)
repository = Seq2seqRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": [self.text1.text],
"user": project.admin.username,
},
{
"data": self.confirmed_example.text,
"label": [self.text2.text],
"user": project.annotator.username,
},
]
self.assert_records(repository, expected, confirmed_only=True)
class TestIntentDetectionSlotFillingRepository(TestRepository):
def prepare_data(self, project):
self.confirmed_example = mommy.make("Example", project=project.item, text="confirmed")
self.category1 = mommy.make("Category", example=self.confirmed_example, user=project.admin)
self.category2 = mommy.make("Category", example=self.confirmed_example, user=project.annotator)
self.span = mommy.make("Span", example=self.confirmed_example, user=project.admin, start_offset=0, end_offset=1)
mommy.make("ExampleState", example=self.confirmed_example, confirmed_by=project.admin)
self.unconfirmed_example = mommy.make("Example", project=project.item, text="unconfirmed")
def test_list(self):
project = prepare_project(INTENT_DETECTION_AND_SLOT_FILLING)
repository = IntentDetectionSlotFillingRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": {
"cats": [self.category1.label.text],
"entities": [(self.span.start_offset, self.span.end_offset, self.span.label.text)],
},
"user": project.admin.username,
},
{
"data": self.confirmed_example.text,
"label": {
"cats": [self.category2.label.text],
"entities": [],
},
"user": project.annotator.username,
},
{"data": self.unconfirmed_example.text, "label": {"cats": [], "entities": []}, "user": "unknown"},
]
self.assert_records(repository, expected)
def test_list_on_collaborative_annotation(self):
project = prepare_project(INTENT_DETECTION_AND_SLOT_FILLING, collaborative_annotation=True)
repository = IntentDetectionSlotFillingRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": {
"cats": [self.category1.label.text, self.category2.label.text],
"entities": [(self.span.start_offset, self.span.end_offset, self.span.label.text)],
},
"user": "all",
},
{"data": self.unconfirmed_example.text, "label": {"cats": [], "entities": []}, "user": "all"},
]
self.assert_records(repository, expected)
def test_list_confirmed_example_only(self):
project = prepare_project(INTENT_DETECTION_AND_SLOT_FILLING)
repository = IntentDetectionSlotFillingRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": {
"cats": [self.category1.label.text],
"entities": [(self.span.start_offset, self.span.end_offset, self.span.label.text)],
},
"user": project.admin.username,
},
{
"data": self.confirmed_example.text,
"label": {
"cats": [self.category2.label.text],
"entities": [],
},
"user": project.annotator.username,
},
]
self.assert_records(repository, expected, confirmed_only=True)
class TestSequenceLabelingRepository(TestRepository):
def prepare_data(self, project):
self.confirmed_example = mommy.make("Example", project=project.item, text="confirmed")
self.span1 = mommy.make(
"Span", example=self.confirmed_example, user=project.admin, start_offset=0, end_offset=1
)
self.span2 = mommy.make(
"Span", example=self.confirmed_example, user=project.annotator, start_offset=1, end_offset=2
)
mommy.make("ExampleState", example=self.confirmed_example, confirmed_by=project.admin)
self.unconfirmed_example = mommy.make("Example", project=project.item, text="unconfirmed")
def test_list(self):
project = prepare_project(SEQUENCE_LABELING)
repository = SequenceLabelingRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": [(self.span1.start_offset, self.span1.end_offset, self.span1.label.text)],
"user": project.admin.username,
},
{
"data": self.confirmed_example.text,
"label": [(self.span2.start_offset, self.span2.end_offset, self.span2.label.text)],
"user": project.annotator.username,
},
{"data": self.unconfirmed_example.text, "label": [], "user": "unknown"},
]
self.assert_records(repository, expected)
def test_list_on_collaborative_annotation(self):
project = prepare_project(SEQUENCE_LABELING, collaborative_annotation=True)
repository = SequenceLabelingRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": [
(self.span1.start_offset, self.span1.end_offset, self.span1.label.text),
(self.span2.start_offset, self.span2.end_offset, self.span2.label.text),
],
"user": "all",
},
{"data": self.unconfirmed_example.text, "label": [], "user": "all"},
]
self.assert_records(repository, expected)
def test_list_confirmed_example_only(self):
project = prepare_project(SEQUENCE_LABELING)
repository = SequenceLabelingRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.text,
"label": [(self.span1.start_offset, self.span1.end_offset, self.span1.label.text)],
"user": project.admin.username,
},
{
"data": self.confirmed_example.text,
"label": [(self.span2.start_offset, self.span2.end_offset, self.span2.label.text)],
"user": project.annotator.username,
},
]
self.assert_records(repository, expected, confirmed_only=True)
class TestRelationExtractionRepository(TestRepository):
def test_list(self):
project = prepare_project(SEQUENCE_LABELING, use_relation=True)
confirmed_example = mommy.make("Example", project=project.item, text="example")
span1 = mommy.make("Span", example=confirmed_example, user=project.admin, start_offset=0, end_offset=1)
span2 = mommy.make("Span", example=confirmed_example, user=project.admin, start_offset=1, end_offset=2)
relation = mommy.make("Relation", from_id=span1, to_id=span2, example=confirmed_example, user=project.admin)
mommy.make("ExampleState", example=confirmed_example, confirmed_by=project.admin)
unconfirmed_example = mommy.make("Example", project=project.item, text="unconfirmed")
repository = RelationExtractionRepository(project.item)
expected = [
{
"data": confirmed_example.text,
"label": {
"entities": [
{
"id": span1.id,
"start_offset": span1.start_offset,
"end_offset": span1.end_offset,
"label": span1.label.text,
},
{
"id": span2.id,
"start_offset": span2.start_offset,
"end_offset": span2.end_offset,
"label": span2.label.text,
},
],
"relations": [
{"id": relation.id, "from_id": span1.id, "to_id": span2.id, "type": relation.type.text}
],
},
"user": project.admin.username,
},
{"data": unconfirmed_example.text, "label": {"entities": [], "relations": []}, "user": "unknown"},
]
self.assert_records(repository, expected)
def test_list_on_collaborative_annotation(self):
project = prepare_project(SEQUENCE_LABELING, collaborative_annotation=True, use_relation=True)
example = mommy.make("Example", project=project.item, text="example")
span1 = mommy.make("Span", example=example, user=project.admin, start_offset=0, end_offset=1)
span2 = mommy.make("Span", example=example, user=project.annotator, start_offset=1, end_offset=2)
relation = mommy.make("Relation", from_id=span1, to_id=span2, example=example, user=project.admin)
repository = RelationExtractionRepository(project.item)
expected = [
{
"data": example.text,
"label": {
"entities": [
{
"id": span1.id,
"start_offset": span1.start_offset,
"end_offset": span1.end_offset,
"label": span1.label.text,
},
{
"id": span2.id,
"start_offset": span2.start_offset,
"end_offset": span2.end_offset,
"label": span2.label.text,
},
],
"relations": [
{"id": relation.id, "from_id": span1.id, "to_id": span2.id, "type": relation.type.text}
],
},
"user": "all",
}
]
self.assert_records(repository, expected)
def test_list_confirmed_example_only(self):
project = prepare_project(SEQUENCE_LABELING, use_relation=True)
confirmed_example = mommy.make("Example", project=project.item, text="example")
span1 = mommy.make("Span", example=confirmed_example, user=project.admin, start_offset=0, end_offset=1)
span2 = mommy.make("Span", example=confirmed_example, user=project.admin, start_offset=1, end_offset=2)
relation = mommy.make("Relation", from_id=span1, to_id=span2, example=confirmed_example, user=project.admin)
mommy.make("ExampleState", example=confirmed_example, confirmed_by=project.admin)
mommy.make("Example", project=project.item, text="unconfirmed")
repository = RelationExtractionRepository(project.item)
expected = [
{
"data": confirmed_example.text,
"label": {
"entities": [
{
"id": span1.id,
"start_offset": span1.start_offset,
"end_offset": span1.end_offset,
"label": span1.label.text,
},
{
"id": span2.id,
"start_offset": span2.start_offset,
"end_offset": span2.end_offset,
"label": span2.label.text,
},
],
"relations": [
{"id": relation.id, "from_id": span1.id, "to_id": span2.id, "type": relation.type.text}
],
},
"user": project.admin.username,
},
]
self.assert_records(repository, expected, confirmed_only=True)
class TestSpeech2TextRepository(TestRepository):
def prepare_data(self, project):
self.confirmed_example = mommy.make("Example", project=project.item)
self.text1 = mommy.make("TextLabel", example=self.confirmed_example, user=project.admin)
self.text2 = mommy.make("TextLabel", example=self.confirmed_example, user=project.annotator)
mommy.make("ExampleState", example=self.confirmed_example, confirmed_by=project.admin)
self.unconfirmed_example = mommy.make("Example", project=project.item, text="unconfirmed")
def test_list(self):
project = prepare_project(SPEECH2TEXT)
repository = Speech2TextRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.upload_name,
"label": [self.text1.text],
"user": project.admin.username,
},
{
"data": self.confirmed_example.upload_name,
"label": [self.text2.text],
"user": project.annotator.username,
},
{"data": self.unconfirmed_example.upload_name, "label": [], "user": "unknown"},
]
self.assert_records(repository, expected)
def test_list_on_collaborative_annotation(self):
project = prepare_project(SPEECH2TEXT, collaborative_annotation=True)
repository = Speech2TextRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.upload_name,
"label": [self.text1.text, self.text2.text],
"user": "all",
},
{"data": self.unconfirmed_example.upload_name, "label": [], "user": "all"},
]
self.assert_records(repository, expected)
def test_list_confirmed_example_only(self):
project = prepare_project(SPEECH2TEXT)
repository = Speech2TextRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.upload_name,
"label": [self.text1.text],
"user": project.admin.username,
},
{
"data": self.confirmed_example.upload_name,
"label": [self.text2.text],
"user": project.annotator.username,
},
]
self.assert_records(repository, expected, confirmed_only=True)
class TestFileRepository(TestRepository):
def prepare_data(self, project):
self.confirmed_example = mommy.make("Example", project=project.item, text="example")
self.category1 = mommy.make("Category", example=self.confirmed_example, user=project.admin)
self.category2 = mommy.make("Category", example=self.confirmed_example, user=project.annotator)
mommy.make("ExampleState", example=self.confirmed_example, confirmed_by=project.admin)
self.unconfirmed_example = mommy.make("Example", project=project.item, text="unconfirmed")
def test_list(self):
project = prepare_project(IMAGE_CLASSIFICATION)
repository = FileRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.upload_name,
"label": [self.category1.label.text],
"user": project.admin.username,
},
{
"data": self.confirmed_example.upload_name,
"label": [self.category2.label.text],
"user": project.annotator.username,
},
{"data": self.unconfirmed_example.upload_name, "label": [], "user": "unknown"},
]
self.assert_records(repository, expected)
def test_list_on_collaborative_annotation(self):
project = prepare_project(IMAGE_CLASSIFICATION, collaborative_annotation=True)
repository = FileRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.upload_name,
"label": [self.category1.label.text, self.category2.label.text],
"user": "all",
},
{"data": self.unconfirmed_example.upload_name, "label": [], "user": "all"},
]
self.assert_records(repository, expected)
def test_list_confirmed_example_only(self):
project = prepare_project(IMAGE_CLASSIFICATION)
repository = FileRepository(project.item)
self.prepare_data(project)
expected = [
{
"data": self.confirmed_example.upload_name,
"label": [self.category1.label.text],
"user": project.admin.username,
},
{
"data": self.confirmed_example.upload_name,
"label": [self.category2.label.text],
"user": project.annotator.username,
},
]
self.assert_records(repository, expected, confirmed_only=True)
| 43.287054 | 120 | 0.574506 | 2,104 | 23,072 | 6.126901 | 0.05038 | 0.091847 | 0.085331 | 0.055853 | 0.916996 | 0.906602 | 0.898379 | 0.898379 | 0.89737 | 0.889846 | 0 | 0.008663 | 0.309596 | 23,072 | 532 | 121 | 43.368421 | 0.800615 | 0 | 0 | 0.6417 | 0 | 0 | 0.068915 | 0 | 0 | 0 | 0 | 0 | 0.052632 | 1 | 0.05668 | false | 0 | 0.010121 | 0 | 0.082996 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
545bead31e3d24ad423edc561195f640d50c0198 | 8,921 | py | Python | diffxpy/unit_test/test_constrained.py | felix0097/diffxpy | 5b37c4fafeb35e7d682d899648a598ea0ad0ed12 | [
"BSD-3-Clause"
] | null | null | null | diffxpy/unit_test/test_constrained.py | felix0097/diffxpy | 5b37c4fafeb35e7d682d899648a598ea0ad0ed12 | [
"BSD-3-Clause"
] | null | null | null | diffxpy/unit_test/test_constrained.py | felix0097/diffxpy | 5b37c4fafeb35e7d682d899648a598ea0ad0ed12 | [
"BSD-3-Clause"
] | null | null | null | import logging
import unittest
import numpy as np
import pandas as pd
import scipy.stats as stats
from batchglm.api.models.tf1.glm_nb import Simulator
import diffxpy.api as de
class TestConstrained(unittest.TestCase):
def test_forfatal_from_string(self):
"""
Test if _from_string interface is working.
n_cells is constant as the design matrix and constraints depend on it.
"""
logging.getLogger("tensorflow").setLevel(logging.ERROR)
logging.getLogger("batchglm").setLevel(logging.WARNING)
logging.getLogger("diffxpy").setLevel(logging.WARNING)
np.random.seed(1)
n_cells = 2000
n_genes = 2
sim = Simulator(num_observations=n_cells, num_features=n_genes)
sim.generate_sample_description(num_batches=0, num_conditions=0)
sim.generate()
# Build design matrix:
dmat = np.zeros([n_cells, 6])
dmat[:, 0] = 1
dmat[:500, 1] = 1 # bio rep 1
dmat[500:1000, 2] = 1 # bio rep 2
dmat[1000:1500, 3] = 1 # bio rep 3
dmat[1500:2000, 4] = 1 # bio rep 4
dmat[1000:2000, 5] = 1 # condition effect
coefficient_names = ['intercept', 'bio1', 'bio2', 'bio3', 'bio4', 'treatment1']
dmat_est = pd.DataFrame(data=dmat, columns=coefficient_names)
dmat_est_loc, _ = de.utils.design_matrix(dmat=dmat_est, return_type="dataframe")
dmat_est_scale, _ = de.utils.design_matrix(dmat=dmat_est, return_type="dataframe")
# Build constraints:
constraints_loc = de.utils.constraint_matrix_from_string(
dmat=dmat_est_loc.values,
coef_names=dmat_est_loc.columns,
constraints=["bio1+bio2=0", "bio3+bio4=0"]
)
constraints_scale = de.utils.constraint_matrix_from_string(
dmat=dmat_est_scale.values,
coef_names=dmat_est_scale.columns,
constraints=["bio1+bio2=0", "bio3+bio4=0"]
)
test = de.test.wald(
data=sim.input_data,
dmat_loc=dmat_est_loc,
dmat_scale=dmat_est_scale,
constraints_loc=constraints_loc,
constraints_scale=constraints_scale,
coef_to_test=["treatment1"]
)
_ = test.summary()
def test_forfatal_from_dict(self):
"""
Test if dictionary-based constraint interface is working.
"""
logging.getLogger("tensorflow").setLevel(logging.ERROR)
logging.getLogger("batchglm").setLevel(logging.WARNING)
logging.getLogger("diffxpy").setLevel(logging.WARNING)
np.random.seed(1)
n_cells = 2000
n_genes = 2
sim = Simulator(num_observations=n_cells, num_features=n_genes)
sim.generate_sample_description(num_batches=0, num_conditions=0)
sim.generate()
# Build design matrix:
sample_description = pd.DataFrame({
"cond": ["cond"+str(i // 1000) for i in range(n_cells)],
"batch": ["batch"+str(i // 500) for i in range(n_cells)]
})
test = de.test.wald(
data=sim.input_data,
sample_description=sample_description,
formula_loc="~1+cond+batch",
formula_scale="~1+cond+batch",
constraints_loc={"batch": "cond"},
constraints_scale={"batch": "cond"},
coef_to_test=["cond[T.cond1]"]
)
_ = test.summary()
def test_null_distribution_wald_constrained(self, n_genes: int = 100):
"""
Test if de.wald() with constraints generates a uniform p-value distribution
if it is given data simulated based on the null model. Returns the p-value
of the two-side Kolmgorov-Smirnov test for equality of the observed
p-value distribution and a uniform distribution.
n_cells is constant as the design matrix and constraints depend on it.
:param n_genes: Number of genes to simulate (number of tests).
"""
logging.getLogger("tensorflow").setLevel(logging.ERROR)
logging.getLogger("batchglm").setLevel(logging.WARNING)
logging.getLogger("diffxpy").setLevel(logging.WARNING)
np.random.seed(1)
n_cells = 2000
sim = Simulator(num_observations=n_cells, num_features=n_genes)
sim.generate_sample_description(num_batches=0, num_conditions=0)
sim.generate()
# Build design matrix:
sample_description = pd.DataFrame({
"cond": ["cond" + str(i // 1000) for i in range(n_cells)],
"batch": ["batch" + str(i // 500) for i in range(n_cells)]
})
test = de.test.wald(
data=sim.input_data,
sample_description=sample_description,
formula_loc="~1+cond+batch",
formula_scale="~1+cond+batch",
constraints_loc={"batch": "cond"},
constraints_scale={"batch": "cond"},
coef_to_test=["cond[T.cond1]"]
)
_ = test.summary()
# Compare p-value distribution under null model against uniform distribution.
pval_h0 = stats.kstest(test.pval, 'uniform').pvalue
logging.getLogger("diffxpy").info('KS-test pvalue for null model match of wald(): %f' % pval_h0)
assert pval_h0 > 0.05, "KS-Test failed: pval_h0 is <= 0.05!"
return True
def _test_null_distribution_wald_constrained_2layer(self, n_genes: int = 100):
"""
Test if de.wald() with constraints generates a uniform p-value distribution
if it is given data simulated based on the null model. Returns the p-value
of the two-side Kolmgorov-Smirnov test for equality of the observed
p-value distribution and a uniform distribution.
n_cells is constant as the design matrix and constraints depend on it.
:param n_genes: Number of genes to simulate (number of tests).
"""
logging.getLogger("tensorflow").setLevel(logging.ERROR)
logging.getLogger("batchglm").setLevel(logging.WARNING)
logging.getLogger("diffxpy").setLevel(logging.WARNING)
np.random.seed(1)
n_cells = 12000
sim = Simulator(num_observations=n_cells, num_features=n_genes)
sim.generate_sample_description(num_batches=0, num_conditions=0)
sim.generate()
# Build design matrix:
dmat = np.zeros([n_cells, 14])
dmat[:, 0] = 1
dmat[6000:12000, 1] = 1 # condition effect
dmat[:1000, 2] = 1 # bio rep 1 - treated 1
dmat[1000:3000, 3] = 1 # bio rep 2 - treated 2
dmat[3000:5000, 4] = 1 # bio rep 3 - treated 3
dmat[5000:6000, 5] = 1 # bio rep 4 - treated 4
dmat[6000:7000, 6] = 1 # bio rep 5 - untreated 1
dmat[7000:9000, 7] = 1 # bio rep 6 - untreated 2
dmat[9000:11000, 8] = 1 # bio rep 7 - untreated 3
dmat[11000:12000, 9] = 1 # bio rep 8 - untreated 4
dmat[1000:2000, 10] = 1 # tech rep 1
dmat[7000:8000, 10] = 1 # tech rep 1
dmat[2000:3000, 11] = 1 # tech rep 2
dmat[8000:9000, 11] = 1 # tech rep 2
dmat[3000:4000, 12] = 1 # tech rep 3
dmat[9000:10000, 12] = 1 # tech rep 3
dmat[4000:5000, 13] = 1 # tech rep 4
dmat[10000:11000, 13] = 1 # tech rep 4
coefficient_names = ['intercept', 'treatment1',
'bio1', 'bio2', 'bio3', 'bio4', 'bio5', 'bio6', 'bio7', 'bio8',
'tech1', 'tech2', 'tech3', 'tech4']
dmat_est = pd.DataFrame(data=dmat, columns=coefficient_names)
dmat_est_loc = de.utils.design_matrix(dmat=dmat_est, return_type="dataframe")
dmat_est_scale = de.utils.design_matrix(dmat=dmat_est.iloc[:, [0]], return_type="dataframe")
# Build constraints:
constraints_loc = de.utils.constraint_matrix_from_string(
dmat=dmat_est_loc.values,
coef_names=dmat_est_loc.columns,
constraints=["bio1+bio2=0",
"bio3+bio4=0",
"bio5+bio6=0",
"bio7+bio8=0",
"tech1+tech2=0",
"tech3+tech4=0"]
)
constraints_scale = None
test = de.test.wald(
data=sim.input_data,
dmat_loc=dmat_est_loc,
dmat_scale=dmat_est_scale,
constraints_loc=constraints_loc,
constraints_scale=constraints_scale,
coef_to_test=["treatment1"]
)
_ = test.summary()
# Compare p-value distribution under null model against uniform distribution.
pval_h0 = stats.kstest(test.pval, 'uniform').pvalue
logging.getLogger("diffxpy").info('KS-test pvalue for null model match of wald(): %f' % pval_h0)
assert pval_h0 > 0.05, "KS-Test failed: pval_h0 is <= 0.05!"
return True
if __name__ == '__main__':
unittest.main()
| 38.619048 | 104 | 0.60565 | 1,138 | 8,921 | 4.579086 | 0.16696 | 0.026866 | 0.01612 | 0.026099 | 0.803493 | 0.790443 | 0.758588 | 0.758588 | 0.751679 | 0.743235 | 0 | 0.061052 | 0.283937 | 8,921 | 230 | 105 | 38.786957 | 0.754696 | 0.179464 | 0 | 0.597484 | 0 | 0 | 0.102672 | 0 | 0 | 0 | 0 | 0 | 0.012579 | 1 | 0.025157 | false | 0 | 0.044025 | 0 | 0.08805 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
54677b5166c822f0bf8c05965790dc8c9ab0362c | 114 | py | Python | pypict/__init__.py | cheuora/pypict | 062fd6c70af202f767b6c8a674c92082db922b15 | [
"MIT"
] | null | null | null | pypict/__init__.py | cheuora/pypict | 062fd6c70af202f767b6c8a674c92082db922b15 | [
"MIT"
] | null | null | null | pypict/__init__.py | cheuora/pypict | 062fd6c70af202f767b6c8a674c92082db922b15 | [
"MIT"
] | null | null | null | from pypict._version import __version__
from pypict.api import Task
from pypict.capi import PAIRWISE_GENERATION
| 19 | 43 | 0.850877 | 16 | 114 | 5.6875 | 0.5625 | 0.32967 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122807 | 114 | 5 | 44 | 22.8 | 0.91 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
5468937169742274234438b95ccc5975f43d3ffc | 113,640 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/_models.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/cognitiveservices/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/_models.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/cognitiveservices/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/_models.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"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.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
from msrest.exceptions import HttpOperationError
class ResponseBase(Model):
"""ResponseBase.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: Identifiable
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
"""
_validation = {
'_type': {'required': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
}
_subtype_map = {
'_type': {'Identifiable': 'Identifiable'}
}
def __init__(self, **kwargs):
super(ResponseBase, self).__init__(**kwargs)
self._type = None
class Identifiable(ResponseBase):
"""Defines the identity of a resource.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: Response
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
}
_subtype_map = {
'_type': {'Response': 'Response'}
}
def __init__(self, **kwargs):
super(Identifiable, self).__init__(**kwargs)
self.id = None
self._type = 'Identifiable'
class Response(Identifiable):
"""Defines a response. All schemas that could be returned at the root of a
response should inherit from this.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: Thing, SearchResponse, Answer, ErrorResponse
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
}
_subtype_map = {
'_type': {'Thing': 'Thing', 'SearchResponse': 'SearchResponse', 'Answer': 'Answer', 'ErrorResponse': 'ErrorResponse'}
}
def __init__(self, **kwargs):
super(Response, self).__init__(**kwargs)
self.contractual_rules = None
self.web_search_url = None
self._type = 'Response'
class Thing(Response):
"""Thing.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: Place, Organization, CreativeWork, Intangible
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
}
_subtype_map = {
'_type': {'Place': 'Place', 'Organization': 'Organization', 'CreativeWork': 'CreativeWork', 'Intangible': 'Intangible'}
}
def __init__(self, **kwargs):
super(Thing, self).__init__(**kwargs)
self.name = None
self.url = None
self.image = None
self.description = None
self.entity_presentation_info = None
self.bing_id = None
self._type = 'Thing'
class Place(Thing):
"""Defines information about a local entity, such as a restaurant or hotel.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: CivicStructure, LocalBusiness, TouristAttraction
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
}
_subtype_map = {
'_type': {'CivicStructure': 'CivicStructure', 'LocalBusiness': 'LocalBusiness', 'TouristAttraction': 'TouristAttraction'}
}
def __init__(self, **kwargs):
super(Place, self).__init__(**kwargs)
self.address = None
self.telephone = None
self._type = 'Place'
class CivicStructure(Place):
"""CivicStructure.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: Airport
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
}
_subtype_map = {
'_type': {'Airport': 'Airport'}
}
def __init__(self, **kwargs):
super(CivicStructure, self).__init__(**kwargs)
self._type = 'CivicStructure'
class Airport(CivicStructure):
"""Airport.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
:ivar iata_code:
:vartype iata_code: str
:ivar icao_code:
:vartype icao_code: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
'iata_code': {'readonly': True},
'icao_code': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
'iata_code': {'key': 'iataCode', 'type': 'str'},
'icao_code': {'key': 'icaoCode', 'type': 'str'},
}
def __init__(self, **kwargs):
super(Airport, self).__init__(**kwargs)
self.iata_code = None
self.icao_code = None
self._type = 'Airport'
class Answer(Response):
"""Answer.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: SearchResultsAnswer
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
}
_subtype_map = {
'_type': {'SearchResultsAnswer': 'SearchResultsAnswer'}
}
def __init__(self, **kwargs):
super(Answer, self).__init__(**kwargs)
self._type = 'Answer'
class ContractualRulesContractualRule(Model):
"""ContractualRulesContractualRule.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ContractualRulesAttribution
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar target_property_name: The name of the field that the rule applies
to.
:vartype target_property_name: str
:param _type: Required. Constant filled by server.
:type _type: str
"""
_validation = {
'target_property_name': {'readonly': True},
'_type': {'required': True},
}
_attribute_map = {
'target_property_name': {'key': 'targetPropertyName', 'type': 'str'},
'_type': {'key': '_type', 'type': 'str'},
}
_subtype_map = {
'_type': {'ContractualRules/Attribution': 'ContractualRulesAttribution'}
}
def __init__(self, **kwargs):
super(ContractualRulesContractualRule, self).__init__(**kwargs)
self.target_property_name = None
self._type = None
class ContractualRulesAttribution(ContractualRulesContractualRule):
"""ContractualRulesAttribution.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ContractualRulesLicenseAttribution,
ContractualRulesLinkAttribution, ContractualRulesMediaAttribution,
ContractualRulesTextAttribution
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar target_property_name: The name of the field that the rule applies
to.
:vartype target_property_name: str
:param _type: Required. Constant filled by server.
:type _type: str
:ivar must_be_close_to_content: A Boolean value that determines whether
the contents of the rule must be placed in close proximity to the field
that the rule applies to. If true, the contents must be placed in close
proximity. If false, or this field does not exist, the contents may be
placed at the caller's discretion.
:vartype must_be_close_to_content: bool
"""
_validation = {
'target_property_name': {'readonly': True},
'_type': {'required': True},
'must_be_close_to_content': {'readonly': True},
}
_attribute_map = {
'target_property_name': {'key': 'targetPropertyName', 'type': 'str'},
'_type': {'key': '_type', 'type': 'str'},
'must_be_close_to_content': {'key': 'mustBeCloseToContent', 'type': 'bool'},
}
_subtype_map = {
'_type': {'ContractualRules/LicenseAttribution': 'ContractualRulesLicenseAttribution', 'ContractualRules/LinkAttribution': 'ContractualRulesLinkAttribution', 'ContractualRules/MediaAttribution': 'ContractualRulesMediaAttribution', 'ContractualRules/TextAttribution': 'ContractualRulesTextAttribution'}
}
def __init__(self, **kwargs):
super(ContractualRulesAttribution, self).__init__(**kwargs)
self.must_be_close_to_content = None
self._type = 'ContractualRules/Attribution'
class ContractualRulesLicenseAttribution(ContractualRulesAttribution):
"""Defines a contractual rule for license attribution.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar target_property_name: The name of the field that the rule applies
to.
:vartype target_property_name: str
:param _type: Required. Constant filled by server.
:type _type: str
:ivar must_be_close_to_content: A Boolean value that determines whether
the contents of the rule must be placed in close proximity to the field
that the rule applies to. If true, the contents must be placed in close
proximity. If false, or this field does not exist, the contents may be
placed at the caller's discretion.
:vartype must_be_close_to_content: bool
:ivar license: The license under which the content may be used.
:vartype license:
~azure.cognitiveservices.search.entitysearch.models.License
:ivar license_notice: The license to display next to the targeted field.
:vartype license_notice: str
"""
_validation = {
'target_property_name': {'readonly': True},
'_type': {'required': True},
'must_be_close_to_content': {'readonly': True},
'license': {'readonly': True},
'license_notice': {'readonly': True},
}
_attribute_map = {
'target_property_name': {'key': 'targetPropertyName', 'type': 'str'},
'_type': {'key': '_type', 'type': 'str'},
'must_be_close_to_content': {'key': 'mustBeCloseToContent', 'type': 'bool'},
'license': {'key': 'license', 'type': 'License'},
'license_notice': {'key': 'licenseNotice', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ContractualRulesLicenseAttribution, self).__init__(**kwargs)
self.license = None
self.license_notice = None
self._type = 'ContractualRules/LicenseAttribution'
class ContractualRulesLinkAttribution(ContractualRulesAttribution):
"""Defines a contractual rule for link attribution.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar target_property_name: The name of the field that the rule applies
to.
:vartype target_property_name: str
:param _type: Required. Constant filled by server.
:type _type: str
:ivar must_be_close_to_content: A Boolean value that determines whether
the contents of the rule must be placed in close proximity to the field
that the rule applies to. If true, the contents must be placed in close
proximity. If false, or this field does not exist, the contents may be
placed at the caller's discretion.
:vartype must_be_close_to_content: bool
:param text: Required. The attribution text.
:type text: str
:param url: Required. The URL to the provider's website. Use text and URL
to create the hyperlink.
:type url: str
:ivar optional_for_list_display: Indicates whether this provider's
attribution is optional.
:vartype optional_for_list_display: bool
"""
_validation = {
'target_property_name': {'readonly': True},
'_type': {'required': True},
'must_be_close_to_content': {'readonly': True},
'text': {'required': True},
'url': {'required': True},
'optional_for_list_display': {'readonly': True},
}
_attribute_map = {
'target_property_name': {'key': 'targetPropertyName', 'type': 'str'},
'_type': {'key': '_type', 'type': 'str'},
'must_be_close_to_content': {'key': 'mustBeCloseToContent', 'type': 'bool'},
'text': {'key': 'text', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'optional_for_list_display': {'key': 'optionalForListDisplay', 'type': 'bool'},
}
def __init__(self, **kwargs):
super(ContractualRulesLinkAttribution, self).__init__(**kwargs)
self.text = kwargs.get('text', None)
self.url = kwargs.get('url', None)
self.optional_for_list_display = None
self._type = 'ContractualRules/LinkAttribution'
class ContractualRulesMediaAttribution(ContractualRulesAttribution):
"""Defines a contractual rule for media attribution.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar target_property_name: The name of the field that the rule applies
to.
:vartype target_property_name: str
:param _type: Required. Constant filled by server.
:type _type: str
:ivar must_be_close_to_content: A Boolean value that determines whether
the contents of the rule must be placed in close proximity to the field
that the rule applies to. If true, the contents must be placed in close
proximity. If false, or this field does not exist, the contents may be
placed at the caller's discretion.
:vartype must_be_close_to_content: bool
:ivar url: The URL that you use to create of hyperlink of the media
content. For example, if the target is an image, you would use the URL to
make the image clickable.
:vartype url: str
"""
_validation = {
'target_property_name': {'readonly': True},
'_type': {'required': True},
'must_be_close_to_content': {'readonly': True},
'url': {'readonly': True},
}
_attribute_map = {
'target_property_name': {'key': 'targetPropertyName', 'type': 'str'},
'_type': {'key': '_type', 'type': 'str'},
'must_be_close_to_content': {'key': 'mustBeCloseToContent', 'type': 'bool'},
'url': {'key': 'url', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ContractualRulesMediaAttribution, self).__init__(**kwargs)
self.url = None
self._type = 'ContractualRules/MediaAttribution'
class ContractualRulesTextAttribution(ContractualRulesAttribution):
"""Defines a contractual rule for text attribution.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar target_property_name: The name of the field that the rule applies
to.
:vartype target_property_name: str
:param _type: Required. Constant filled by server.
:type _type: str
:ivar must_be_close_to_content: A Boolean value that determines whether
the contents of the rule must be placed in close proximity to the field
that the rule applies to. If true, the contents must be placed in close
proximity. If false, or this field does not exist, the contents may be
placed at the caller's discretion.
:vartype must_be_close_to_content: bool
:param text: Required. The attribution text. Text attribution applies to
the entity as a whole and should be displayed immediately following the
entity presentation. If there are multiple text or link attribution rules
that do not specify a target, you should concatenate them and display them
using a "Data from:" label.
:type text: str
:ivar optional_for_list_display: Indicates whether this provider's
attribution is optional.
:vartype optional_for_list_display: bool
"""
_validation = {
'target_property_name': {'readonly': True},
'_type': {'required': True},
'must_be_close_to_content': {'readonly': True},
'text': {'required': True},
'optional_for_list_display': {'readonly': True},
}
_attribute_map = {
'target_property_name': {'key': 'targetPropertyName', 'type': 'str'},
'_type': {'key': '_type', 'type': 'str'},
'must_be_close_to_content': {'key': 'mustBeCloseToContent', 'type': 'bool'},
'text': {'key': 'text', 'type': 'str'},
'optional_for_list_display': {'key': 'optionalForListDisplay', 'type': 'bool'},
}
def __init__(self, **kwargs):
super(ContractualRulesTextAttribution, self).__init__(**kwargs)
self.text = kwargs.get('text', None)
self.optional_for_list_display = None
self._type = 'ContractualRules/TextAttribution'
class CreativeWork(Thing):
"""CreativeWork.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: MediaObject, License
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar thumbnail_url: The URL to a thumbnail of the item.
:vartype thumbnail_url: str
:ivar provider: The source of the creative work.
:vartype provider:
list[~azure.cognitiveservices.search.entitysearch.models.Thing]
:ivar text:
:vartype text: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'thumbnail_url': {'readonly': True},
'provider': {'readonly': True},
'text': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'},
'provider': {'key': 'provider', 'type': '[Thing]'},
'text': {'key': 'text', 'type': 'str'},
}
_subtype_map = {
'_type': {'MediaObject': 'MediaObject', 'License': 'License'}
}
def __init__(self, **kwargs):
super(CreativeWork, self).__init__(**kwargs)
self.thumbnail_url = None
self.provider = None
self.text = None
self._type = 'CreativeWork'
class LocalBusiness(Place):
"""LocalBusiness.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: EntertainmentBusiness, FoodEstablishment, LodgingBusiness
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
:ivar price_range: $$.
:vartype price_range: str
:ivar panoramas:
:vartype panoramas:
list[~azure.cognitiveservices.search.entitysearch.models.ImageObject]
:ivar is_permanently_closed:
:vartype is_permanently_closed: bool
:ivar tag_line:
:vartype tag_line: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
'price_range': {'readonly': True},
'panoramas': {'readonly': True},
'is_permanently_closed': {'readonly': True},
'tag_line': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
'price_range': {'key': 'priceRange', 'type': 'str'},
'panoramas': {'key': 'panoramas', 'type': '[ImageObject]'},
'is_permanently_closed': {'key': 'isPermanentlyClosed', 'type': 'bool'},
'tag_line': {'key': 'tagLine', 'type': 'str'},
}
_subtype_map = {
'_type': {'EntertainmentBusiness': 'EntertainmentBusiness', 'FoodEstablishment': 'FoodEstablishment', 'LodgingBusiness': 'LodgingBusiness'}
}
def __init__(self, **kwargs):
super(LocalBusiness, self).__init__(**kwargs)
self.price_range = None
self.panoramas = None
self.is_permanently_closed = None
self.tag_line = None
self._type = 'LocalBusiness'
class EntertainmentBusiness(LocalBusiness):
"""EntertainmentBusiness.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: MovieTheater
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
:ivar price_range: $$.
:vartype price_range: str
:ivar panoramas:
:vartype panoramas:
list[~azure.cognitiveservices.search.entitysearch.models.ImageObject]
:ivar is_permanently_closed:
:vartype is_permanently_closed: bool
:ivar tag_line:
:vartype tag_line: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
'price_range': {'readonly': True},
'panoramas': {'readonly': True},
'is_permanently_closed': {'readonly': True},
'tag_line': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
'price_range': {'key': 'priceRange', 'type': 'str'},
'panoramas': {'key': 'panoramas', 'type': '[ImageObject]'},
'is_permanently_closed': {'key': 'isPermanentlyClosed', 'type': 'bool'},
'tag_line': {'key': 'tagLine', 'type': 'str'},
}
_subtype_map = {
'_type': {'MovieTheater': 'MovieTheater'}
}
def __init__(self, **kwargs):
super(EntertainmentBusiness, self).__init__(**kwargs)
self._type = 'EntertainmentBusiness'
class SearchResultsAnswer(Answer):
"""SearchResultsAnswer.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: Entities, Places
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar query_context:
:vartype query_context:
~azure.cognitiveservices.search.entitysearch.models.QueryContext
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'query_context': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'query_context': {'key': 'queryContext', 'type': 'QueryContext'},
}
_subtype_map = {
'_type': {'Entities': 'Entities', 'Places': 'Places'}
}
def __init__(self, **kwargs):
super(SearchResultsAnswer, self).__init__(**kwargs)
self.query_context = None
self._type = 'SearchResultsAnswer'
class Entities(SearchResultsAnswer):
"""Defines an entity answer.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar query_context:
:vartype query_context:
~azure.cognitiveservices.search.entitysearch.models.QueryContext
:ivar query_scenario: The supported query scenario. This field is set to
DominantEntity or DisambiguationItem. The field is set to DominantEntity
if Bing determines that only a single entity satisfies the request. For
example, a book, movie, person, or attraction. If multiple entities could
satisfy the request, the field is set to DisambiguationItem. For example,
if the request uses the generic title of a movie franchise, the entity's
type would likely be DisambiguationItem. But, if the request specifies a
specific title from the franchise, the entity's type would likely be
DominantEntity. Possible values include: 'DominantEntity',
'DominantEntityWithDisambiguation', 'Disambiguation', 'List',
'ListWithPivot'. Default value: "DominantEntity" .
:vartype query_scenario: str or
~azure.cognitiveservices.search.entitysearch.models.EntityQueryScenario
:param value: Required. A list of entities.
:type value:
list[~azure.cognitiveservices.search.entitysearch.models.Thing]
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'query_context': {'readonly': True},
'query_scenario': {'readonly': True},
'value': {'required': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'query_context': {'key': 'queryContext', 'type': 'QueryContext'},
'query_scenario': {'key': 'queryScenario', 'type': 'str'},
'value': {'key': 'value', 'type': '[Thing]'},
}
def __init__(self, **kwargs):
super(Entities, self).__init__(**kwargs)
self.query_scenario = None
self.value = kwargs.get('value', None)
self._type = 'Entities'
class EntitiesEntityPresentationInfo(Model):
"""Defines additional information about an entity such as type hints.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param entity_scenario: Required. The supported scenario. Possible values
include: 'DominantEntity', 'DisambiguationItem', 'ListItem'. Default
value: "DominantEntity" .
:type entity_scenario: str or
~azure.cognitiveservices.search.entitysearch.models.EntityScenario
:ivar entity_type_hints: A list of hints that indicate the entity's type.
The list could contain a single hint such as Movie or a list of hints such
as Place, LocalBusiness, Restaurant. Each successive hint in the array
narrows the entity's type.
:vartype entity_type_hints: list[str or
~azure.cognitiveservices.search.entitysearch.models.EntityType]
:ivar entity_type_display_hint: A display version of the entity hint. For
example, if entityTypeHints is Artist, this field may be set to American
Singer.
:vartype entity_type_display_hint: str
"""
_validation = {
'entity_scenario': {'required': True},
'entity_type_hints': {'readonly': True},
'entity_type_display_hint': {'readonly': True},
}
_attribute_map = {
'entity_scenario': {'key': 'entityScenario', 'type': 'str'},
'entity_type_hints': {'key': 'entityTypeHints', 'type': '[str]'},
'entity_type_display_hint': {'key': 'entityTypeDisplayHint', 'type': 'str'},
}
def __init__(self, **kwargs):
super(EntitiesEntityPresentationInfo, self).__init__(**kwargs)
self.entity_scenario = kwargs.get('entity_scenario', "DominantEntity")
self.entity_type_hints = None
self.entity_type_display_hint = None
class Error(Model):
"""Defines the error that occurred.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param code: Required. The error code that identifies the category of
error. Possible values include: 'None', 'ServerError', 'InvalidRequest',
'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'.
Default value: "None" .
:type code: str or
~azure.cognitiveservices.search.entitysearch.models.ErrorCode
:ivar sub_code: The error code that further helps to identify the error.
Possible values include: 'UnexpectedError', 'ResourceError',
'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue',
'HttpNotAllowed', 'Blocked', 'AuthorizationMissing',
'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired'
:vartype sub_code: str or
~azure.cognitiveservices.search.entitysearch.models.ErrorSubCode
:param message: Required. A description of the error.
:type message: str
:ivar more_details: A description that provides additional information
about the error.
:vartype more_details: str
:ivar parameter: The parameter in the request that caused the error.
:vartype parameter: str
:ivar value: The parameter's value in the request that was not valid.
:vartype value: str
"""
_validation = {
'code': {'required': True},
'sub_code': {'readonly': True},
'message': {'required': True},
'more_details': {'readonly': True},
'parameter': {'readonly': True},
'value': {'readonly': True},
}
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'sub_code': {'key': 'subCode', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'more_details': {'key': 'moreDetails', 'type': 'str'},
'parameter': {'key': 'parameter', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}
def __init__(self, **kwargs):
super(Error, self).__init__(**kwargs)
self.code = kwargs.get('code', "None")
self.sub_code = None
self.message = kwargs.get('message', None)
self.more_details = None
self.parameter = None
self.value = None
class ErrorResponse(Response):
"""The top-level response that represents a failed request.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:param errors: Required. A list of errors that describe the reasons why
the request failed.
:type errors:
list[~azure.cognitiveservices.search.entitysearch.models.Error]
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'errors': {'required': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'errors': {'key': 'errors', 'type': '[Error]'},
}
def __init__(self, **kwargs):
super(ErrorResponse, self).__init__(**kwargs)
self.errors = kwargs.get('errors', None)
self._type = 'ErrorResponse'
class ErrorResponseException(HttpOperationError):
"""Server responded with exception of type: 'ErrorResponse'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""
def __init__(self, deserialize, response, *args):
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)
class FoodEstablishment(LocalBusiness):
"""FoodEstablishment.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: Restaurant
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
:ivar price_range: $$.
:vartype price_range: str
:ivar panoramas:
:vartype panoramas:
list[~azure.cognitiveservices.search.entitysearch.models.ImageObject]
:ivar is_permanently_closed:
:vartype is_permanently_closed: bool
:ivar tag_line:
:vartype tag_line: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
'price_range': {'readonly': True},
'panoramas': {'readonly': True},
'is_permanently_closed': {'readonly': True},
'tag_line': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
'price_range': {'key': 'priceRange', 'type': 'str'},
'panoramas': {'key': 'panoramas', 'type': '[ImageObject]'},
'is_permanently_closed': {'key': 'isPermanentlyClosed', 'type': 'bool'},
'tag_line': {'key': 'tagLine', 'type': 'str'},
}
_subtype_map = {
'_type': {'Restaurant': 'Restaurant'}
}
def __init__(self, **kwargs):
super(FoodEstablishment, self).__init__(**kwargs)
self._type = 'FoodEstablishment'
class LodgingBusiness(LocalBusiness):
"""LodgingBusiness.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: Hotel
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
:ivar price_range: $$.
:vartype price_range: str
:ivar panoramas:
:vartype panoramas:
list[~azure.cognitiveservices.search.entitysearch.models.ImageObject]
:ivar is_permanently_closed:
:vartype is_permanently_closed: bool
:ivar tag_line:
:vartype tag_line: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
'price_range': {'readonly': True},
'panoramas': {'readonly': True},
'is_permanently_closed': {'readonly': True},
'tag_line': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
'price_range': {'key': 'priceRange', 'type': 'str'},
'panoramas': {'key': 'panoramas', 'type': '[ImageObject]'},
'is_permanently_closed': {'key': 'isPermanentlyClosed', 'type': 'bool'},
'tag_line': {'key': 'tagLine', 'type': 'str'},
}
_subtype_map = {
'_type': {'Hotel': 'Hotel'}
}
def __init__(self, **kwargs):
super(LodgingBusiness, self).__init__(**kwargs)
self._type = 'LodgingBusiness'
class Hotel(LodgingBusiness):
"""Hotel.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
:ivar price_range: $$.
:vartype price_range: str
:ivar panoramas:
:vartype panoramas:
list[~azure.cognitiveservices.search.entitysearch.models.ImageObject]
:ivar is_permanently_closed:
:vartype is_permanently_closed: bool
:ivar tag_line:
:vartype tag_line: str
:ivar hotel_class:
:vartype hotel_class: str
:ivar amenities:
:vartype amenities: list[str]
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
'price_range': {'readonly': True},
'panoramas': {'readonly': True},
'is_permanently_closed': {'readonly': True},
'tag_line': {'readonly': True},
'hotel_class': {'readonly': True},
'amenities': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
'price_range': {'key': 'priceRange', 'type': 'str'},
'panoramas': {'key': 'panoramas', 'type': '[ImageObject]'},
'is_permanently_closed': {'key': 'isPermanentlyClosed', 'type': 'bool'},
'tag_line': {'key': 'tagLine', 'type': 'str'},
'hotel_class': {'key': 'hotelClass', 'type': 'str'},
'amenities': {'key': 'amenities', 'type': '[str]'},
}
def __init__(self, **kwargs):
super(Hotel, self).__init__(**kwargs)
self.hotel_class = None
self.amenities = None
self._type = 'Hotel'
class MediaObject(CreativeWork):
"""MediaObject.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ImageObject
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar thumbnail_url: The URL to a thumbnail of the item.
:vartype thumbnail_url: str
:ivar provider: The source of the creative work.
:vartype provider:
list[~azure.cognitiveservices.search.entitysearch.models.Thing]
:ivar text:
:vartype text: str
:ivar content_url: Original URL to retrieve the source (file) for the
media object (e.g the source URL for the image).
:vartype content_url: str
:ivar host_page_url: URL of the page that hosts the media object.
:vartype host_page_url: str
:ivar width: The width of the source media object, in pixels.
:vartype width: int
:ivar height: The height of the source media object, in pixels.
:vartype height: int
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'thumbnail_url': {'readonly': True},
'provider': {'readonly': True},
'text': {'readonly': True},
'content_url': {'readonly': True},
'host_page_url': {'readonly': True},
'width': {'readonly': True},
'height': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'},
'provider': {'key': 'provider', 'type': '[Thing]'},
'text': {'key': 'text', 'type': 'str'},
'content_url': {'key': 'contentUrl', 'type': 'str'},
'host_page_url': {'key': 'hostPageUrl', 'type': 'str'},
'width': {'key': 'width', 'type': 'int'},
'height': {'key': 'height', 'type': 'int'},
}
_subtype_map = {
'_type': {'ImageObject': 'ImageObject'}
}
def __init__(self, **kwargs):
super(MediaObject, self).__init__(**kwargs)
self.content_url = None
self.host_page_url = None
self.width = None
self.height = None
self._type = 'MediaObject'
class ImageObject(MediaObject):
"""Defines an image.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar thumbnail_url: The URL to a thumbnail of the item.
:vartype thumbnail_url: str
:ivar provider: The source of the creative work.
:vartype provider:
list[~azure.cognitiveservices.search.entitysearch.models.Thing]
:ivar text:
:vartype text: str
:ivar content_url: Original URL to retrieve the source (file) for the
media object (e.g the source URL for the image).
:vartype content_url: str
:ivar host_page_url: URL of the page that hosts the media object.
:vartype host_page_url: str
:ivar width: The width of the source media object, in pixels.
:vartype width: int
:ivar height: The height of the source media object, in pixels.
:vartype height: int
:ivar thumbnail: The URL to a thumbnail of the image
:vartype thumbnail:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'thumbnail_url': {'readonly': True},
'provider': {'readonly': True},
'text': {'readonly': True},
'content_url': {'readonly': True},
'host_page_url': {'readonly': True},
'width': {'readonly': True},
'height': {'readonly': True},
'thumbnail': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'},
'provider': {'key': 'provider', 'type': '[Thing]'},
'text': {'key': 'text', 'type': 'str'},
'content_url': {'key': 'contentUrl', 'type': 'str'},
'host_page_url': {'key': 'hostPageUrl', 'type': 'str'},
'width': {'key': 'width', 'type': 'int'},
'height': {'key': 'height', 'type': 'int'},
'thumbnail': {'key': 'thumbnail', 'type': 'ImageObject'},
}
def __init__(self, **kwargs):
super(ImageObject, self).__init__(**kwargs)
self.thumbnail = None
self._type = 'ImageObject'
class Intangible(Thing):
"""Intangible.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: StructuredValue
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
}
_subtype_map = {
'_type': {'StructuredValue': 'StructuredValue'}
}
def __init__(self, **kwargs):
super(Intangible, self).__init__(**kwargs)
self._type = 'Intangible'
class License(CreativeWork):
"""Defines the license under which the text or photo may be used.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar thumbnail_url: The URL to a thumbnail of the item.
:vartype thumbnail_url: str
:ivar provider: The source of the creative work.
:vartype provider:
list[~azure.cognitiveservices.search.entitysearch.models.Thing]
:ivar text:
:vartype text: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'thumbnail_url': {'readonly': True},
'provider': {'readonly': True},
'text': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'},
'provider': {'key': 'provider', 'type': '[Thing]'},
'text': {'key': 'text', 'type': 'str'},
}
def __init__(self, **kwargs):
super(License, self).__init__(**kwargs)
self._type = 'License'
class MovieTheater(EntertainmentBusiness):
"""MovieTheater.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
:ivar price_range: $$.
:vartype price_range: str
:ivar panoramas:
:vartype panoramas:
list[~azure.cognitiveservices.search.entitysearch.models.ImageObject]
:ivar is_permanently_closed:
:vartype is_permanently_closed: bool
:ivar tag_line:
:vartype tag_line: str
:ivar screen_count:
:vartype screen_count: int
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
'price_range': {'readonly': True},
'panoramas': {'readonly': True},
'is_permanently_closed': {'readonly': True},
'tag_line': {'readonly': True},
'screen_count': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
'price_range': {'key': 'priceRange', 'type': 'str'},
'panoramas': {'key': 'panoramas', 'type': '[ImageObject]'},
'is_permanently_closed': {'key': 'isPermanentlyClosed', 'type': 'bool'},
'tag_line': {'key': 'tagLine', 'type': 'str'},
'screen_count': {'key': 'screenCount', 'type': 'int'},
}
def __init__(self, **kwargs):
super(MovieTheater, self).__init__(**kwargs)
self.screen_count = None
self._type = 'MovieTheater'
class Organization(Thing):
"""Defines an organization.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
}
def __init__(self, **kwargs):
super(Organization, self).__init__(**kwargs)
self._type = 'Organization'
class Places(SearchResultsAnswer):
"""Defines a local entity answer.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar query_context:
:vartype query_context:
~azure.cognitiveservices.search.entitysearch.models.QueryContext
:param value: Required. A list of local entities, such as restaurants or
hotels.
:type value:
list[~azure.cognitiveservices.search.entitysearch.models.Thing]
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'query_context': {'readonly': True},
'value': {'required': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'query_context': {'key': 'queryContext', 'type': 'QueryContext'},
'value': {'key': 'value', 'type': '[Thing]'},
}
def __init__(self, **kwargs):
super(Places, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self._type = 'Places'
class StructuredValue(Intangible):
"""StructuredValue.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: PostalAddress
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
}
_subtype_map = {
'_type': {'PostalAddress': 'PostalAddress'}
}
def __init__(self, **kwargs):
super(StructuredValue, self).__init__(**kwargs)
self._type = 'StructuredValue'
class PostalAddress(StructuredValue):
"""Defines a postal address.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar street_address:
:vartype street_address: str
:ivar address_locality: The city where the street address is located. For
example, Seattle.
:vartype address_locality: str
:ivar address_subregion:
:vartype address_subregion: str
:ivar address_region: The state or province code where the street address
is located. This could be the two-letter code. For example, WA, or the
full name , Washington.
:vartype address_region: str
:ivar postal_code: The zip code or postal code where the street address is
located. For example, 98052.
:vartype postal_code: str
:ivar post_office_box_number:
:vartype post_office_box_number: str
:ivar address_country: The country/region where the street address is
located. This could be the two-letter ISO code. For example, US, or the
full name, United States.
:vartype address_country: str
:ivar country_iso: The two letter ISO code of this country. For example,
US.
:vartype country_iso: str
:ivar neighborhood: The neighborhood where the street address is located.
For example, Westlake.
:vartype neighborhood: str
:ivar address_region_abbreviation: Region Abbreviation. For example, WA.
:vartype address_region_abbreviation: str
:ivar text: The complete address. For example, 2100 Westlake Ave N,
Bellevue, WA 98052.
:vartype text: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'street_address': {'readonly': True},
'address_locality': {'readonly': True},
'address_subregion': {'readonly': True},
'address_region': {'readonly': True},
'postal_code': {'readonly': True},
'post_office_box_number': {'readonly': True},
'address_country': {'readonly': True},
'country_iso': {'readonly': True},
'neighborhood': {'readonly': True},
'address_region_abbreviation': {'readonly': True},
'text': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'street_address': {'key': 'streetAddress', 'type': 'str'},
'address_locality': {'key': 'addressLocality', 'type': 'str'},
'address_subregion': {'key': 'addressSubregion', 'type': 'str'},
'address_region': {'key': 'addressRegion', 'type': 'str'},
'postal_code': {'key': 'postalCode', 'type': 'str'},
'post_office_box_number': {'key': 'postOfficeBoxNumber', 'type': 'str'},
'address_country': {'key': 'addressCountry', 'type': 'str'},
'country_iso': {'key': 'countryIso', 'type': 'str'},
'neighborhood': {'key': 'neighborhood', 'type': 'str'},
'address_region_abbreviation': {'key': 'addressRegionAbbreviation', 'type': 'str'},
'text': {'key': 'text', 'type': 'str'},
}
def __init__(self, **kwargs):
super(PostalAddress, self).__init__(**kwargs)
self.street_address = None
self.address_locality = None
self.address_subregion = None
self.address_region = None
self.postal_code = None
self.post_office_box_number = None
self.address_country = None
self.country_iso = None
self.neighborhood = None
self.address_region_abbreviation = None
self.text = None
self._type = 'PostalAddress'
class QueryContext(Model):
"""Defines the query context that Bing used for the request.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param original_query: Required. The query string as specified in the
request.
:type original_query: str
:ivar altered_query: The query string used by Bing to perform the query.
Bing uses the altered query string if the original query string contained
spelling mistakes. For example, if the query string is "saling downwind",
the altered query string will be "sailing downwind". This field is
included only if the original query string contains a spelling mistake.
:vartype altered_query: str
:ivar alteration_override_query: The query string to use to force Bing to
use the original string. For example, if the query string is "saling
downwind", the override query string will be "+saling downwind". Remember
to encode the query string which results in "%2Bsaling+downwind". This
field is included only if the original query string contains a spelling
mistake.
:vartype alteration_override_query: str
:ivar adult_intent: A Boolean value that indicates whether the specified
query has adult intent. The value is true if the query has adult intent;
otherwise, false.
:vartype adult_intent: bool
:ivar ask_user_for_location: A Boolean value that indicates whether Bing
requires the user's location to provide accurate results. If you specified
the user's location by using the X-MSEdge-ClientIP and X-Search-Location
headers, you can ignore this field. For location aware queries, such as
"today's weather" or "restaurants near me" that need the user's location
to provide accurate results, this field is set to true. For location aware
queries that include the location (for example, "Seattle weather"), this
field is set to false. This field is also set to false for queries that
are not location aware, such as "best sellers".
:vartype ask_user_for_location: bool
"""
_validation = {
'original_query': {'required': True},
'altered_query': {'readonly': True},
'alteration_override_query': {'readonly': True},
'adult_intent': {'readonly': True},
'ask_user_for_location': {'readonly': True},
}
_attribute_map = {
'original_query': {'key': 'originalQuery', 'type': 'str'},
'altered_query': {'key': 'alteredQuery', 'type': 'str'},
'alteration_override_query': {'key': 'alterationOverrideQuery', 'type': 'str'},
'adult_intent': {'key': 'adultIntent', 'type': 'bool'},
'ask_user_for_location': {'key': 'askUserForLocation', 'type': 'bool'},
}
def __init__(self, **kwargs):
super(QueryContext, self).__init__(**kwargs)
self.original_query = kwargs.get('original_query', None)
self.altered_query = None
self.alteration_override_query = None
self.adult_intent = None
self.ask_user_for_location = None
class Restaurant(FoodEstablishment):
"""Restaurant.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
:ivar price_range: $$.
:vartype price_range: str
:ivar panoramas:
:vartype panoramas:
list[~azure.cognitiveservices.search.entitysearch.models.ImageObject]
:ivar is_permanently_closed:
:vartype is_permanently_closed: bool
:ivar tag_line:
:vartype tag_line: str
:ivar accepts_reservations:
:vartype accepts_reservations: bool
:ivar reservation_url:
:vartype reservation_url: str
:ivar serves_cuisine:
:vartype serves_cuisine: list[str]
:ivar menu_url:
:vartype menu_url: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
'price_range': {'readonly': True},
'panoramas': {'readonly': True},
'is_permanently_closed': {'readonly': True},
'tag_line': {'readonly': True},
'accepts_reservations': {'readonly': True},
'reservation_url': {'readonly': True},
'serves_cuisine': {'readonly': True},
'menu_url': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
'price_range': {'key': 'priceRange', 'type': 'str'},
'panoramas': {'key': 'panoramas', 'type': '[ImageObject]'},
'is_permanently_closed': {'key': 'isPermanentlyClosed', 'type': 'bool'},
'tag_line': {'key': 'tagLine', 'type': 'str'},
'accepts_reservations': {'key': 'acceptsReservations', 'type': 'bool'},
'reservation_url': {'key': 'reservationUrl', 'type': 'str'},
'serves_cuisine': {'key': 'servesCuisine', 'type': '[str]'},
'menu_url': {'key': 'menuUrl', 'type': 'str'},
}
def __init__(self, **kwargs):
super(Restaurant, self).__init__(**kwargs)
self.accepts_reservations = None
self.reservation_url = None
self.serves_cuisine = None
self.menu_url = None
self._type = 'Restaurant'
class SearchResponse(Response):
"""Defines the top-level object that the response includes when the request
succeeds.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar query_context: An object that contains the query string that Bing
used for the request. This object contains the query string as entered by
the user. It may also contain an altered query string that Bing used for
the query if the query string contained a spelling mistake.
:vartype query_context:
~azure.cognitiveservices.search.entitysearch.models.QueryContext
:ivar entities: A list of entities that are relevant to the search query.
:vartype entities:
~azure.cognitiveservices.search.entitysearch.models.Entities
:ivar places: A list of local entities such as restaurants or hotels that
are relevant to the query.
:vartype places:
~azure.cognitiveservices.search.entitysearch.models.Places
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'query_context': {'readonly': True},
'entities': {'readonly': True},
'places': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'query_context': {'key': 'queryContext', 'type': 'QueryContext'},
'entities': {'key': 'entities', 'type': 'Entities'},
'places': {'key': 'places', 'type': 'Places'},
}
def __init__(self, **kwargs):
super(SearchResponse, self).__init__(**kwargs)
self.query_context = None
self.entities = None
self.places = None
self._type = 'SearchResponse'
class TouristAttraction(Place):
"""TouristAttraction.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar contractual_rules: A list of rules that you must adhere to if you
display the item.
:vartype contractual_rules:
list[~azure.cognitiveservices.search.entitysearch.models.ContractualRulesContractualRule]
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image:
:vartype image:
~azure.cognitiveservices.search.entitysearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar entity_presentation_info: Additional information about the entity
such as hints that you can use to determine the entity's type. To
determine the entity's type, use the entityScenario and entityTypeHint
fields.
:vartype entity_presentation_info:
~azure.cognitiveservices.search.entitysearch.models.EntitiesEntityPresentationInfo
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar address: The postal address of where the entity is located
:vartype address:
~azure.cognitiveservices.search.entitysearch.models.PostalAddress
:ivar telephone: The entity's telephone number
:vartype telephone: str
"""
_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'contractual_rules': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'entity_presentation_info': {'readonly': True},
'bing_id': {'readonly': True},
'address': {'readonly': True},
'telephone': {'readonly': True},
}
_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'contractual_rules': {'key': 'contractualRules', 'type': '[ContractualRulesContractualRule]'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'entity_presentation_info': {'key': 'entityPresentationInfo', 'type': 'EntitiesEntityPresentationInfo'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'address': {'key': 'address', 'type': 'PostalAddress'},
'telephone': {'key': 'telephone', 'type': 'str'},
}
def __init__(self, **kwargs):
super(TouristAttraction, self).__init__(**kwargs)
self._type = 'TouristAttraction'
| 40.355114 | 309 | 0.64824 | 12,870 | 113,640 | 5.58446 | 0.038539 | 0.05443 | 0.018199 | 0.058437 | 0.812917 | 0.796792 | 0.787748 | 0.78182 | 0.772443 | 0.771497 | 0 | 0.000181 | 0.220679 | 113,640 | 2,815 | 310 | 40.369449 | 0.811364 | 0.486985 | 0 | 0.685641 | 0 | 0 | 0.395674 | 0.083159 | 0 | 0 | 0 | 0 | 0 | 1 | 0.033135 | false | 0 | 0.001699 | 0 | 0.147833 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
54a6b081f00613d4f178b10bb324325c7b9ff556 | 122 | py | Python | synbio/picklists/__init__.py | Imperial-iGEM/synbio | 6f27ed514d9f904ca14f9055820d3922adbfe307 | [
"MIT"
] | 12 | 2019-09-20T15:47:27.000Z | 2021-12-29T19:40:02.000Z | synbio/picklists/__init__.py | Imperial-iGEM/synbio | 6f27ed514d9f904ca14f9055820d3922adbfe307 | [
"MIT"
] | 11 | 2019-08-08T20:57:27.000Z | 2020-07-29T14:27:08.000Z | synbio/picklists/__init__.py | Imperial-iGEM/synbio | 6f27ed514d9f904ca14f9055820d3922adbfe307 | [
"MIT"
] | 3 | 2019-09-16T14:30:01.000Z | 2021-12-29T03:47:36.000Z | """Picklist generators."""
from .hamilton import to_hamilton
from .labcyte import to_labcyte
from .tecan import to_tecan
| 20.333333 | 33 | 0.795082 | 17 | 122 | 5.529412 | 0.470588 | 0.255319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122951 | 122 | 5 | 34 | 24.4 | 0.878505 | 0.163934 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
54ab359dd23aff800e869e07e43d4a846cdbe206 | 44 | py | Python | pdvalidate/__init__.py | S3DEV/pdvalidate | 810b7d0aed72e2df54f5b66176bb5d829b569ba5 | [
"MIT"
] | 1 | 2021-04-14T10:03:38.000Z | 2021-04-14T10:03:38.000Z | pdvalidate/__init__.py | S3DEV/pdvalidate | 810b7d0aed72e2df54f5b66176bb5d829b569ba5 | [
"MIT"
] | null | null | null | pdvalidate/__init__.py | S3DEV/pdvalidate | 810b7d0aed72e2df54f5b66176bb5d829b569ba5 | [
"MIT"
] | null | null | null | from pdvalidate._version import __version__
| 22 | 43 | 0.886364 | 5 | 44 | 6.8 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 44 | 1 | 44 | 44 | 0.85 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
49c2d06aa77f4afa239121b61e5a7003b6da77a3 | 85,194 | py | Python | venv/lib/python3.7/site-packages/google/protobuf/util/json_format_proto3_pb2.py | nicholasadamou/StockBird | 257396479667863d4ee122ea46adb86087c9aa78 | [
"Apache-2.0"
] | 8 | 2020-05-14T12:40:52.000Z | 2022-03-28T05:38:37.000Z | venv/lib/python3.7/site-packages/google/protobuf/util/json_format_proto3_pb2.py | nicholasadamou/StockBird | 257396479667863d4ee122ea46adb86087c9aa78 | [
"Apache-2.0"
] | 15 | 2020-01-28T23:14:29.000Z | 2022-02-10T00:40:40.000Z | venv/lib/python3.7/site-packages/google/protobuf/util/json_format_proto3_pb2.py | nicholasadamou/StockBird | 257396479667863d4ee122ea46adb86087c9aa78 | [
"Apache-2.0"
] | 8 | 2020-04-17T12:18:15.000Z | 2021-02-23T08:48:40.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/util/json_format_proto3.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
from google.protobuf import unittest_pb2 as google_dot_protobuf_dot_unittest__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='google/protobuf/util/json_format_proto3.proto',
package='proto3',
syntax='proto3',
serialized_options=_b('\n\030com.google.protobuf.utilB\020JsonFormatProto3'),
serialized_pb=_b('\n-google/protobuf/util/json_format_proto3.proto\x12\x06proto3\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1egoogle/protobuf/unittest.proto\"\x1c\n\x0bMessageType\x12\r\n\x05value\x18\x01 \x01(\x05\"\x94\x05\n\x0bTestMessage\x12\x12\n\nbool_value\x18\x01 \x01(\x08\x12\x13\n\x0bint32_value\x18\x02 \x01(\x05\x12\x13\n\x0bint64_value\x18\x03 \x01(\x03\x12\x14\n\x0cuint32_value\x18\x04 \x01(\r\x12\x14\n\x0cuint64_value\x18\x05 \x01(\x04\x12\x13\n\x0b\x66loat_value\x18\x06 \x01(\x02\x12\x14\n\x0c\x64ouble_value\x18\x07 \x01(\x01\x12\x14\n\x0cstring_value\x18\x08 \x01(\t\x12\x13\n\x0b\x62ytes_value\x18\t \x01(\x0c\x12$\n\nenum_value\x18\n \x01(\x0e\x32\x10.proto3.EnumType\x12*\n\rmessage_value\x18\x0b \x01(\x0b\x32\x13.proto3.MessageType\x12\x1b\n\x13repeated_bool_value\x18\x15 \x03(\x08\x12\x1c\n\x14repeated_int32_value\x18\x16 \x03(\x05\x12\x1c\n\x14repeated_int64_value\x18\x17 \x03(\x03\x12\x1d\n\x15repeated_uint32_value\x18\x18 \x03(\r\x12\x1d\n\x15repeated_uint64_value\x18\x19 \x03(\x04\x12\x1c\n\x14repeated_float_value\x18\x1a \x03(\x02\x12\x1d\n\x15repeated_double_value\x18\x1b \x03(\x01\x12\x1d\n\x15repeated_string_value\x18\x1c \x03(\t\x12\x1c\n\x14repeated_bytes_value\x18\x1d \x03(\x0c\x12-\n\x13repeated_enum_value\x18\x1e \x03(\x0e\x32\x10.proto3.EnumType\x12\x33\n\x16repeated_message_value\x18\x1f \x03(\x0b\x32\x13.proto3.MessageType\"\xd4\x01\n\tTestOneof\x12\x1b\n\x11oneof_int32_value\x18\x01 \x01(\x05H\x00\x12\x1c\n\x12oneof_string_value\x18\x02 \x01(\tH\x00\x12\x1b\n\x11oneof_bytes_value\x18\x03 \x01(\x0cH\x00\x12,\n\x10oneof_enum_value\x18\x04 \x01(\x0e\x32\x10.proto3.EnumTypeH\x00\x12\x32\n\x13oneof_message_value\x18\x05 \x01(\x0b\x32\x13.proto3.MessageTypeH\x00\x42\r\n\x0boneof_value\"\xe1\x04\n\x07TestMap\x12.\n\x08\x62ool_map\x18\x01 \x03(\x0b\x32\x1c.proto3.TestMap.BoolMapEntry\x12\x30\n\tint32_map\x18\x02 \x03(\x0b\x32\x1d.proto3.TestMap.Int32MapEntry\x12\x30\n\tint64_map\x18\x03 \x03(\x0b\x32\x1d.proto3.TestMap.Int64MapEntry\x12\x32\n\nuint32_map\x18\x04 \x03(\x0b\x32\x1e.proto3.TestMap.Uint32MapEntry\x12\x32\n\nuint64_map\x18\x05 \x03(\x0b\x32\x1e.proto3.TestMap.Uint64MapEntry\x12\x32\n\nstring_map\x18\x06 \x03(\x0b\x32\x1e.proto3.TestMap.StringMapEntry\x1a.\n\x0c\x42oolMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a/\n\rInt32MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a/\n\rInt64MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x30\n\x0eUint32MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x30\n\x0eUint64MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x30\n\x0eStringMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"\x85\x06\n\rTestNestedMap\x12\x34\n\x08\x62ool_map\x18\x01 \x03(\x0b\x32\".proto3.TestNestedMap.BoolMapEntry\x12\x36\n\tint32_map\x18\x02 \x03(\x0b\x32#.proto3.TestNestedMap.Int32MapEntry\x12\x36\n\tint64_map\x18\x03 \x03(\x0b\x32#.proto3.TestNestedMap.Int64MapEntry\x12\x38\n\nuint32_map\x18\x04 \x03(\x0b\x32$.proto3.TestNestedMap.Uint32MapEntry\x12\x38\n\nuint64_map\x18\x05 \x03(\x0b\x32$.proto3.TestNestedMap.Uint64MapEntry\x12\x38\n\nstring_map\x18\x06 \x03(\x0b\x32$.proto3.TestNestedMap.StringMapEntry\x12\x32\n\x07map_map\x18\x07 \x03(\x0b\x32!.proto3.TestNestedMap.MapMapEntry\x1a.\n\x0c\x42oolMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a/\n\rInt32MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a/\n\rInt64MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x30\n\x0eUint32MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x30\n\x0eUint64MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x30\n\x0eStringMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x44\n\x0bMapMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.proto3.TestNestedMap:\x02\x38\x01\"{\n\rTestStringMap\x12\x38\n\nstring_map\x18\x01 \x03(\x0b\x32$.proto3.TestStringMap.StringMapEntry\x1a\x30\n\x0eStringMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xee\x07\n\x0bTestWrapper\x12.\n\nbool_value\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x30\n\x0bint32_value\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x30\n\x0bint64_value\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12\x32\n\x0cuint32_value\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x32\n\x0cuint64_value\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.UInt64Value\x12\x30\n\x0b\x66loat_value\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.FloatValue\x12\x32\n\x0c\x64ouble_value\x18\x07 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12\x32\n\x0cstring_value\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12\x30\n\x0b\x62ytes_value\x18\t \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x37\n\x13repeated_bool_value\x18\x0b \x03(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x39\n\x14repeated_int32_value\x18\x0c \x03(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x39\n\x14repeated_int64_value\x18\r \x03(\x0b\x32\x1b.google.protobuf.Int64Value\x12;\n\x15repeated_uint32_value\x18\x0e \x03(\x0b\x32\x1c.google.protobuf.UInt32Value\x12;\n\x15repeated_uint64_value\x18\x0f \x03(\x0b\x32\x1c.google.protobuf.UInt64Value\x12\x39\n\x14repeated_float_value\x18\x10 \x03(\x0b\x32\x1b.google.protobuf.FloatValue\x12;\n\x15repeated_double_value\x18\x11 \x03(\x0b\x32\x1c.google.protobuf.DoubleValue\x12;\n\x15repeated_string_value\x18\x12 \x03(\x0b\x32\x1c.google.protobuf.StringValue\x12\x39\n\x14repeated_bytes_value\x18\x13 \x03(\x0b\x32\x1b.google.protobuf.BytesValue\"n\n\rTestTimestamp\x12)\n\x05value\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0erepeated_value\x18\x02 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\"k\n\x0cTestDuration\x12(\n\x05value\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\x0erepeated_value\x18\x02 \x03(\x0b\x32\x19.google.protobuf.Duration\":\n\rTestFieldMask\x12)\n\x05value\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"e\n\nTestStruct\x12&\n\x05value\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12/\n\x0erepeated_value\x18\x02 \x03(\x0b\x32\x17.google.protobuf.Struct\"\\\n\x07TestAny\x12#\n\x05value\x18\x01 \x01(\x0b\x32\x14.google.protobuf.Any\x12,\n\x0erepeated_value\x18\x02 \x03(\x0b\x32\x14.google.protobuf.Any\"b\n\tTestValue\x12%\n\x05value\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Value\x12.\n\x0erepeated_value\x18\x02 \x03(\x0b\x32\x16.google.protobuf.Value\"n\n\rTestListValue\x12)\n\x05value\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.ListValue\x12\x32\n\x0erepeated_value\x18\x02 \x03(\x0b\x32\x1a.google.protobuf.ListValue\"\x89\x01\n\rTestBoolValue\x12\x12\n\nbool_value\x18\x01 \x01(\x08\x12\x34\n\x08\x62ool_map\x18\x02 \x03(\x0b\x32\".proto3.TestBoolValue.BoolMapEntry\x1a.\n\x0c\x42oolMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"+\n\x12TestCustomJsonName\x12\x15\n\x05value\x18\x01 \x01(\x05R\x06@value\"J\n\x0eTestExtensions\x12\x38\n\nextensions\x18\x01 \x01(\x0b\x32$.protobuf_unittest.TestAllExtensions\"\x84\x01\n\rTestEnumValue\x12%\n\x0b\x65num_value1\x18\x01 \x01(\x0e\x32\x10.proto3.EnumType\x12%\n\x0b\x65num_value2\x18\x02 \x01(\x0e\x32\x10.proto3.EnumType\x12%\n\x0b\x65num_value3\x18\x03 \x01(\x0e\x32\x10.proto3.EnumType*\x1c\n\x08\x45numType\x12\x07\n\x03\x46OO\x10\x00\x12\x07\n\x03\x42\x41R\x10\x01\x42,\n\x18\x63om.google.protobuf.utilB\x10JsonFormatProto3b\x06proto3')
,
dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,google_dot_protobuf_dot_unittest__pb2.DESCRIPTOR,])
_ENUMTYPE = _descriptor.EnumDescriptor(
name='EnumType',
full_name='proto3.EnumType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='FOO', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BAR', index=1, number=1,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=4793,
serialized_end=4821,
)
_sym_db.RegisterEnumDescriptor(_ENUMTYPE)
EnumType = enum_type_wrapper.EnumTypeWrapper(_ENUMTYPE)
FOO = 0
BAR = 1
_MESSAGETYPE = _descriptor.Descriptor(
name='MessageType',
full_name='proto3.MessageType',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='proto3.MessageType.value', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=277,
serialized_end=305,
)
_TESTMESSAGE = _descriptor.Descriptor(
name='TestMessage',
full_name='proto3.TestMessage',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='bool_value', full_name='proto3.TestMessage.bool_value', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='int32_value', full_name='proto3.TestMessage.int32_value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='int64_value', full_name='proto3.TestMessage.int64_value', index=2,
number=3, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='uint32_value', full_name='proto3.TestMessage.uint32_value', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='uint64_value', full_name='proto3.TestMessage.uint64_value', index=4,
number=5, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='float_value', full_name='proto3.TestMessage.float_value', index=5,
number=6, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='double_value', full_name='proto3.TestMessage.double_value', index=6,
number=7, type=1, cpp_type=5, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='string_value', full_name='proto3.TestMessage.string_value', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='bytes_value', full_name='proto3.TestMessage.bytes_value', index=8,
number=9, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='enum_value', full_name='proto3.TestMessage.enum_value', index=9,
number=10, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='message_value', full_name='proto3.TestMessage.message_value', index=10,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_bool_value', full_name='proto3.TestMessage.repeated_bool_value', index=11,
number=21, type=8, cpp_type=7, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_int32_value', full_name='proto3.TestMessage.repeated_int32_value', index=12,
number=22, type=5, cpp_type=1, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_int64_value', full_name='proto3.TestMessage.repeated_int64_value', index=13,
number=23, type=3, cpp_type=2, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_uint32_value', full_name='proto3.TestMessage.repeated_uint32_value', index=14,
number=24, type=13, cpp_type=3, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_uint64_value', full_name='proto3.TestMessage.repeated_uint64_value', index=15,
number=25, type=4, cpp_type=4, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_float_value', full_name='proto3.TestMessage.repeated_float_value', index=16,
number=26, type=2, cpp_type=6, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_double_value', full_name='proto3.TestMessage.repeated_double_value', index=17,
number=27, type=1, cpp_type=5, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_string_value', full_name='proto3.TestMessage.repeated_string_value', index=18,
number=28, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_bytes_value', full_name='proto3.TestMessage.repeated_bytes_value', index=19,
number=29, type=12, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_enum_value', full_name='proto3.TestMessage.repeated_enum_value', index=20,
number=30, type=14, cpp_type=8, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_message_value', full_name='proto3.TestMessage.repeated_message_value', index=21,
number=31, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=308,
serialized_end=968,
)
_TESTONEOF = _descriptor.Descriptor(
name='TestOneof',
full_name='proto3.TestOneof',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='oneof_int32_value', full_name='proto3.TestOneof.oneof_int32_value', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='oneof_string_value', full_name='proto3.TestOneof.oneof_string_value', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='oneof_bytes_value', full_name='proto3.TestOneof.oneof_bytes_value', index=2,
number=3, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='oneof_enum_value', full_name='proto3.TestOneof.oneof_enum_value', index=3,
number=4, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='oneof_message_value', full_name='proto3.TestOneof.oneof_message_value', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='oneof_value', full_name='proto3.TestOneof.oneof_value',
index=0, containing_type=None, fields=[]),
],
serialized_start=971,
serialized_end=1183,
)
_TESTMAP_BOOLMAPENTRY = _descriptor.Descriptor(
name='BoolMapEntry',
full_name='proto3.TestMap.BoolMapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestMap.BoolMapEntry.key', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestMap.BoolMapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1501,
serialized_end=1547,
)
_TESTMAP_INT32MAPENTRY = _descriptor.Descriptor(
name='Int32MapEntry',
full_name='proto3.TestMap.Int32MapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestMap.Int32MapEntry.key', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestMap.Int32MapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1549,
serialized_end=1596,
)
_TESTMAP_INT64MAPENTRY = _descriptor.Descriptor(
name='Int64MapEntry',
full_name='proto3.TestMap.Int64MapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestMap.Int64MapEntry.key', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestMap.Int64MapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1598,
serialized_end=1645,
)
_TESTMAP_UINT32MAPENTRY = _descriptor.Descriptor(
name='Uint32MapEntry',
full_name='proto3.TestMap.Uint32MapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestMap.Uint32MapEntry.key', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestMap.Uint32MapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1647,
serialized_end=1695,
)
_TESTMAP_UINT64MAPENTRY = _descriptor.Descriptor(
name='Uint64MapEntry',
full_name='proto3.TestMap.Uint64MapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestMap.Uint64MapEntry.key', index=0,
number=1, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestMap.Uint64MapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1697,
serialized_end=1745,
)
_TESTMAP_STRINGMAPENTRY = _descriptor.Descriptor(
name='StringMapEntry',
full_name='proto3.TestMap.StringMapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestMap.StringMapEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestMap.StringMapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1747,
serialized_end=1795,
)
_TESTMAP = _descriptor.Descriptor(
name='TestMap',
full_name='proto3.TestMap',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='bool_map', full_name='proto3.TestMap.bool_map', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='int32_map', full_name='proto3.TestMap.int32_map', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='int64_map', full_name='proto3.TestMap.int64_map', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='uint32_map', full_name='proto3.TestMap.uint32_map', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='uint64_map', full_name='proto3.TestMap.uint64_map', index=4,
number=5, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='string_map', full_name='proto3.TestMap.string_map', index=5,
number=6, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[_TESTMAP_BOOLMAPENTRY, _TESTMAP_INT32MAPENTRY, _TESTMAP_INT64MAPENTRY, _TESTMAP_UINT32MAPENTRY, _TESTMAP_UINT64MAPENTRY, _TESTMAP_STRINGMAPENTRY, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1186,
serialized_end=1795,
)
_TESTNESTEDMAP_BOOLMAPENTRY = _descriptor.Descriptor(
name='BoolMapEntry',
full_name='proto3.TestNestedMap.BoolMapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestNestedMap.BoolMapEntry.key', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestNestedMap.BoolMapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1501,
serialized_end=1547,
)
_TESTNESTEDMAP_INT32MAPENTRY = _descriptor.Descriptor(
name='Int32MapEntry',
full_name='proto3.TestNestedMap.Int32MapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestNestedMap.Int32MapEntry.key', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestNestedMap.Int32MapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1549,
serialized_end=1596,
)
_TESTNESTEDMAP_INT64MAPENTRY = _descriptor.Descriptor(
name='Int64MapEntry',
full_name='proto3.TestNestedMap.Int64MapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestNestedMap.Int64MapEntry.key', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestNestedMap.Int64MapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1598,
serialized_end=1645,
)
_TESTNESTEDMAP_UINT32MAPENTRY = _descriptor.Descriptor(
name='Uint32MapEntry',
full_name='proto3.TestNestedMap.Uint32MapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestNestedMap.Uint32MapEntry.key', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestNestedMap.Uint32MapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1647,
serialized_end=1695,
)
_TESTNESTEDMAP_UINT64MAPENTRY = _descriptor.Descriptor(
name='Uint64MapEntry',
full_name='proto3.TestNestedMap.Uint64MapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestNestedMap.Uint64MapEntry.key', index=0,
number=1, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestNestedMap.Uint64MapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1697,
serialized_end=1745,
)
_TESTNESTEDMAP_STRINGMAPENTRY = _descriptor.Descriptor(
name='StringMapEntry',
full_name='proto3.TestNestedMap.StringMapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestNestedMap.StringMapEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestNestedMap.StringMapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1747,
serialized_end=1795,
)
_TESTNESTEDMAP_MAPMAPENTRY = _descriptor.Descriptor(
name='MapMapEntry',
full_name='proto3.TestNestedMap.MapMapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestNestedMap.MapMapEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestNestedMap.MapMapEntry.value', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2503,
serialized_end=2571,
)
_TESTNESTEDMAP = _descriptor.Descriptor(
name='TestNestedMap',
full_name='proto3.TestNestedMap',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='bool_map', full_name='proto3.TestNestedMap.bool_map', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='int32_map', full_name='proto3.TestNestedMap.int32_map', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='int64_map', full_name='proto3.TestNestedMap.int64_map', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='uint32_map', full_name='proto3.TestNestedMap.uint32_map', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='uint64_map', full_name='proto3.TestNestedMap.uint64_map', index=4,
number=5, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='string_map', full_name='proto3.TestNestedMap.string_map', index=5,
number=6, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='map_map', full_name='proto3.TestNestedMap.map_map', index=6,
number=7, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[_TESTNESTEDMAP_BOOLMAPENTRY, _TESTNESTEDMAP_INT32MAPENTRY, _TESTNESTEDMAP_INT64MAPENTRY, _TESTNESTEDMAP_UINT32MAPENTRY, _TESTNESTEDMAP_UINT64MAPENTRY, _TESTNESTEDMAP_STRINGMAPENTRY, _TESTNESTEDMAP_MAPMAPENTRY, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1798,
serialized_end=2571,
)
_TESTSTRINGMAP_STRINGMAPENTRY = _descriptor.Descriptor(
name='StringMapEntry',
full_name='proto3.TestStringMap.StringMapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestStringMap.StringMapEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestStringMap.StringMapEntry.value', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2648,
serialized_end=2696,
)
_TESTSTRINGMAP = _descriptor.Descriptor(
name='TestStringMap',
full_name='proto3.TestStringMap',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='string_map', full_name='proto3.TestStringMap.string_map', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[_TESTSTRINGMAP_STRINGMAPENTRY, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2573,
serialized_end=2696,
)
_TESTWRAPPER = _descriptor.Descriptor(
name='TestWrapper',
full_name='proto3.TestWrapper',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='bool_value', full_name='proto3.TestWrapper.bool_value', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='int32_value', full_name='proto3.TestWrapper.int32_value', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='int64_value', full_name='proto3.TestWrapper.int64_value', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='uint32_value', full_name='proto3.TestWrapper.uint32_value', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='uint64_value', full_name='proto3.TestWrapper.uint64_value', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='float_value', full_name='proto3.TestWrapper.float_value', index=5,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='double_value', full_name='proto3.TestWrapper.double_value', index=6,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='string_value', full_name='proto3.TestWrapper.string_value', index=7,
number=8, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='bytes_value', full_name='proto3.TestWrapper.bytes_value', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_bool_value', full_name='proto3.TestWrapper.repeated_bool_value', index=9,
number=11, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_int32_value', full_name='proto3.TestWrapper.repeated_int32_value', index=10,
number=12, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_int64_value', full_name='proto3.TestWrapper.repeated_int64_value', index=11,
number=13, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_uint32_value', full_name='proto3.TestWrapper.repeated_uint32_value', index=12,
number=14, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_uint64_value', full_name='proto3.TestWrapper.repeated_uint64_value', index=13,
number=15, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_float_value', full_name='proto3.TestWrapper.repeated_float_value', index=14,
number=16, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_double_value', full_name='proto3.TestWrapper.repeated_double_value', index=15,
number=17, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_string_value', full_name='proto3.TestWrapper.repeated_string_value', index=16,
number=18, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_bytes_value', full_name='proto3.TestWrapper.repeated_bytes_value', index=17,
number=19, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2699,
serialized_end=3705,
)
_TESTTIMESTAMP = _descriptor.Descriptor(
name='TestTimestamp',
full_name='proto3.TestTimestamp',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestTimestamp.value', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_value', full_name='proto3.TestTimestamp.repeated_value', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=3707,
serialized_end=3817,
)
_TESTDURATION = _descriptor.Descriptor(
name='TestDuration',
full_name='proto3.TestDuration',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestDuration.value', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_value', full_name='proto3.TestDuration.repeated_value', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=3819,
serialized_end=3926,
)
_TESTFIELDMASK = _descriptor.Descriptor(
name='TestFieldMask',
full_name='proto3.TestFieldMask',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestFieldMask.value', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=3928,
serialized_end=3986,
)
_TESTSTRUCT = _descriptor.Descriptor(
name='TestStruct',
full_name='proto3.TestStruct',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestStruct.value', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_value', full_name='proto3.TestStruct.repeated_value', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=3988,
serialized_end=4089,
)
_TESTANY = _descriptor.Descriptor(
name='TestAny',
full_name='proto3.TestAny',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestAny.value', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_value', full_name='proto3.TestAny.repeated_value', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=4091,
serialized_end=4183,
)
_TESTVALUE = _descriptor.Descriptor(
name='TestValue',
full_name='proto3.TestValue',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestValue.value', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_value', full_name='proto3.TestValue.repeated_value', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=4185,
serialized_end=4283,
)
_TESTLISTVALUE = _descriptor.Descriptor(
name='TestListValue',
full_name='proto3.TestListValue',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestListValue.value', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='repeated_value', full_name='proto3.TestListValue.repeated_value', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=4285,
serialized_end=4395,
)
_TESTBOOLVALUE_BOOLMAPENTRY = _descriptor.Descriptor(
name='BoolMapEntry',
full_name='proto3.TestBoolValue.BoolMapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='proto3.TestBoolValue.BoolMapEntry.key', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestBoolValue.BoolMapEntry.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1501,
serialized_end=1547,
)
_TESTBOOLVALUE = _descriptor.Descriptor(
name='TestBoolValue',
full_name='proto3.TestBoolValue',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='bool_value', full_name='proto3.TestBoolValue.bool_value', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='bool_map', full_name='proto3.TestBoolValue.bool_map', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[_TESTBOOLVALUE_BOOLMAPENTRY, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=4398,
serialized_end=4535,
)
_TESTCUSTOMJSONNAME = _descriptor.Descriptor(
name='TestCustomJsonName',
full_name='proto3.TestCustomJsonName',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='proto3.TestCustomJsonName.value', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='@value', file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=4537,
serialized_end=4580,
)
_TESTEXTENSIONS = _descriptor.Descriptor(
name='TestExtensions',
full_name='proto3.TestExtensions',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='extensions', full_name='proto3.TestExtensions.extensions', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=4582,
serialized_end=4656,
)
_TESTENUMVALUE = _descriptor.Descriptor(
name='TestEnumValue',
full_name='proto3.TestEnumValue',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='enum_value1', full_name='proto3.TestEnumValue.enum_value1', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='enum_value2', full_name='proto3.TestEnumValue.enum_value2', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='enum_value3', full_name='proto3.TestEnumValue.enum_value3', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=4659,
serialized_end=4791,
)
_TESTMESSAGE.fields_by_name['enum_value'].enum_type = _ENUMTYPE
_TESTMESSAGE.fields_by_name['message_value'].message_type = _MESSAGETYPE
_TESTMESSAGE.fields_by_name['repeated_enum_value'].enum_type = _ENUMTYPE
_TESTMESSAGE.fields_by_name['repeated_message_value'].message_type = _MESSAGETYPE
_TESTONEOF.fields_by_name['oneof_enum_value'].enum_type = _ENUMTYPE
_TESTONEOF.fields_by_name['oneof_message_value'].message_type = _MESSAGETYPE
_TESTONEOF.oneofs_by_name['oneof_value'].fields.append(
_TESTONEOF.fields_by_name['oneof_int32_value'])
_TESTONEOF.fields_by_name['oneof_int32_value'].containing_oneof = _TESTONEOF.oneofs_by_name['oneof_value']
_TESTONEOF.oneofs_by_name['oneof_value'].fields.append(
_TESTONEOF.fields_by_name['oneof_string_value'])
_TESTONEOF.fields_by_name['oneof_string_value'].containing_oneof = _TESTONEOF.oneofs_by_name['oneof_value']
_TESTONEOF.oneofs_by_name['oneof_value'].fields.append(
_TESTONEOF.fields_by_name['oneof_bytes_value'])
_TESTONEOF.fields_by_name['oneof_bytes_value'].containing_oneof = _TESTONEOF.oneofs_by_name['oneof_value']
_TESTONEOF.oneofs_by_name['oneof_value'].fields.append(
_TESTONEOF.fields_by_name['oneof_enum_value'])
_TESTONEOF.fields_by_name['oneof_enum_value'].containing_oneof = _TESTONEOF.oneofs_by_name['oneof_value']
_TESTONEOF.oneofs_by_name['oneof_value'].fields.append(
_TESTONEOF.fields_by_name['oneof_message_value'])
_TESTONEOF.fields_by_name['oneof_message_value'].containing_oneof = _TESTONEOF.oneofs_by_name['oneof_value']
_TESTMAP_BOOLMAPENTRY.containing_type = _TESTMAP
_TESTMAP_INT32MAPENTRY.containing_type = _TESTMAP
_TESTMAP_INT64MAPENTRY.containing_type = _TESTMAP
_TESTMAP_UINT32MAPENTRY.containing_type = _TESTMAP
_TESTMAP_UINT64MAPENTRY.containing_type = _TESTMAP
_TESTMAP_STRINGMAPENTRY.containing_type = _TESTMAP
_TESTMAP.fields_by_name['bool_map'].message_type = _TESTMAP_BOOLMAPENTRY
_TESTMAP.fields_by_name['int32_map'].message_type = _TESTMAP_INT32MAPENTRY
_TESTMAP.fields_by_name['int64_map'].message_type = _TESTMAP_INT64MAPENTRY
_TESTMAP.fields_by_name['uint32_map'].message_type = _TESTMAP_UINT32MAPENTRY
_TESTMAP.fields_by_name['uint64_map'].message_type = _TESTMAP_UINT64MAPENTRY
_TESTMAP.fields_by_name['string_map'].message_type = _TESTMAP_STRINGMAPENTRY
_TESTNESTEDMAP_BOOLMAPENTRY.containing_type = _TESTNESTEDMAP
_TESTNESTEDMAP_INT32MAPENTRY.containing_type = _TESTNESTEDMAP
_TESTNESTEDMAP_INT64MAPENTRY.containing_type = _TESTNESTEDMAP
_TESTNESTEDMAP_UINT32MAPENTRY.containing_type = _TESTNESTEDMAP
_TESTNESTEDMAP_UINT64MAPENTRY.containing_type = _TESTNESTEDMAP
_TESTNESTEDMAP_STRINGMAPENTRY.containing_type = _TESTNESTEDMAP
_TESTNESTEDMAP_MAPMAPENTRY.fields_by_name['value'].message_type = _TESTNESTEDMAP
_TESTNESTEDMAP_MAPMAPENTRY.containing_type = _TESTNESTEDMAP
_TESTNESTEDMAP.fields_by_name['bool_map'].message_type = _TESTNESTEDMAP_BOOLMAPENTRY
_TESTNESTEDMAP.fields_by_name['int32_map'].message_type = _TESTNESTEDMAP_INT32MAPENTRY
_TESTNESTEDMAP.fields_by_name['int64_map'].message_type = _TESTNESTEDMAP_INT64MAPENTRY
_TESTNESTEDMAP.fields_by_name['uint32_map'].message_type = _TESTNESTEDMAP_UINT32MAPENTRY
_TESTNESTEDMAP.fields_by_name['uint64_map'].message_type = _TESTNESTEDMAP_UINT64MAPENTRY
_TESTNESTEDMAP.fields_by_name['string_map'].message_type = _TESTNESTEDMAP_STRINGMAPENTRY
_TESTNESTEDMAP.fields_by_name['map_map'].message_type = _TESTNESTEDMAP_MAPMAPENTRY
_TESTSTRINGMAP_STRINGMAPENTRY.containing_type = _TESTSTRINGMAP
_TESTSTRINGMAP.fields_by_name['string_map'].message_type = _TESTSTRINGMAP_STRINGMAPENTRY
_TESTWRAPPER.fields_by_name['bool_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._BOOLVALUE
_TESTWRAPPER.fields_by_name['int32_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._INT32VALUE
_TESTWRAPPER.fields_by_name['int64_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._INT64VALUE
_TESTWRAPPER.fields_by_name['uint32_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._UINT32VALUE
_TESTWRAPPER.fields_by_name['uint64_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._UINT64VALUE
_TESTWRAPPER.fields_by_name['float_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._FLOATVALUE
_TESTWRAPPER.fields_by_name['double_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._DOUBLEVALUE
_TESTWRAPPER.fields_by_name['string_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._STRINGVALUE
_TESTWRAPPER.fields_by_name['bytes_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._BYTESVALUE
_TESTWRAPPER.fields_by_name['repeated_bool_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._BOOLVALUE
_TESTWRAPPER.fields_by_name['repeated_int32_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._INT32VALUE
_TESTWRAPPER.fields_by_name['repeated_int64_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._INT64VALUE
_TESTWRAPPER.fields_by_name['repeated_uint32_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._UINT32VALUE
_TESTWRAPPER.fields_by_name['repeated_uint64_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._UINT64VALUE
_TESTWRAPPER.fields_by_name['repeated_float_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._FLOATVALUE
_TESTWRAPPER.fields_by_name['repeated_double_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._DOUBLEVALUE
_TESTWRAPPER.fields_by_name['repeated_string_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._STRINGVALUE
_TESTWRAPPER.fields_by_name['repeated_bytes_value'].message_type = google_dot_protobuf_dot_wrappers__pb2._BYTESVALUE
_TESTTIMESTAMP.fields_by_name['value'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
_TESTTIMESTAMP.fields_by_name['repeated_value'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
_TESTDURATION.fields_by_name['value'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
_TESTDURATION.fields_by_name['repeated_value'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
_TESTFIELDMASK.fields_by_name['value'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
_TESTSTRUCT.fields_by_name['value'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_TESTSTRUCT.fields_by_name['repeated_value'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
_TESTANY.fields_by_name['value'].message_type = google_dot_protobuf_dot_any__pb2._ANY
_TESTANY.fields_by_name['repeated_value'].message_type = google_dot_protobuf_dot_any__pb2._ANY
_TESTVALUE.fields_by_name['value'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE
_TESTVALUE.fields_by_name['repeated_value'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE
_TESTLISTVALUE.fields_by_name['value'].message_type = google_dot_protobuf_dot_struct__pb2._LISTVALUE
_TESTLISTVALUE.fields_by_name['repeated_value'].message_type = google_dot_protobuf_dot_struct__pb2._LISTVALUE
_TESTBOOLVALUE_BOOLMAPENTRY.containing_type = _TESTBOOLVALUE
_TESTBOOLVALUE.fields_by_name['bool_map'].message_type = _TESTBOOLVALUE_BOOLMAPENTRY
_TESTEXTENSIONS.fields_by_name['extensions'].message_type = google_dot_protobuf_dot_unittest__pb2._TESTALLEXTENSIONS
_TESTENUMVALUE.fields_by_name['enum_value1'].enum_type = _ENUMTYPE
_TESTENUMVALUE.fields_by_name['enum_value2'].enum_type = _ENUMTYPE
_TESTENUMVALUE.fields_by_name['enum_value3'].enum_type = _ENUMTYPE
DESCRIPTOR.message_types_by_name['MessageType'] = _MESSAGETYPE
DESCRIPTOR.message_types_by_name['TestMessage'] = _TESTMESSAGE
DESCRIPTOR.message_types_by_name['TestOneof'] = _TESTONEOF
DESCRIPTOR.message_types_by_name['TestMap'] = _TESTMAP
DESCRIPTOR.message_types_by_name['TestNestedMap'] = _TESTNESTEDMAP
DESCRIPTOR.message_types_by_name['TestStringMap'] = _TESTSTRINGMAP
DESCRIPTOR.message_types_by_name['TestWrapper'] = _TESTWRAPPER
DESCRIPTOR.message_types_by_name['TestTimestamp'] = _TESTTIMESTAMP
DESCRIPTOR.message_types_by_name['TestDuration'] = _TESTDURATION
DESCRIPTOR.message_types_by_name['TestFieldMask'] = _TESTFIELDMASK
DESCRIPTOR.message_types_by_name['TestStruct'] = _TESTSTRUCT
DESCRIPTOR.message_types_by_name['TestAny'] = _TESTANY
DESCRIPTOR.message_types_by_name['TestValue'] = _TESTVALUE
DESCRIPTOR.message_types_by_name['TestListValue'] = _TESTLISTVALUE
DESCRIPTOR.message_types_by_name['TestBoolValue'] = _TESTBOOLVALUE
DESCRIPTOR.message_types_by_name['TestCustomJsonName'] = _TESTCUSTOMJSONNAME
DESCRIPTOR.message_types_by_name['TestExtensions'] = _TESTEXTENSIONS
DESCRIPTOR.message_types_by_name['TestEnumValue'] = _TESTENUMVALUE
DESCRIPTOR.enum_types_by_name['EnumType'] = _ENUMTYPE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
MessageType = _reflection.GeneratedProtocolMessageType('MessageType', (_message.Message,), {
'DESCRIPTOR' : _MESSAGETYPE,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.MessageType)
})
_sym_db.RegisterMessage(MessageType)
TestMessage = _reflection.GeneratedProtocolMessageType('TestMessage', (_message.Message,), {
'DESCRIPTOR' : _TESTMESSAGE,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestMessage)
})
_sym_db.RegisterMessage(TestMessage)
TestOneof = _reflection.GeneratedProtocolMessageType('TestOneof', (_message.Message,), {
'DESCRIPTOR' : _TESTONEOF,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestOneof)
})
_sym_db.RegisterMessage(TestOneof)
TestMap = _reflection.GeneratedProtocolMessageType('TestMap', (_message.Message,), {
'BoolMapEntry' : _reflection.GeneratedProtocolMessageType('BoolMapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTMAP_BOOLMAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestMap.BoolMapEntry)
})
,
'Int32MapEntry' : _reflection.GeneratedProtocolMessageType('Int32MapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTMAP_INT32MAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestMap.Int32MapEntry)
})
,
'Int64MapEntry' : _reflection.GeneratedProtocolMessageType('Int64MapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTMAP_INT64MAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestMap.Int64MapEntry)
})
,
'Uint32MapEntry' : _reflection.GeneratedProtocolMessageType('Uint32MapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTMAP_UINT32MAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestMap.Uint32MapEntry)
})
,
'Uint64MapEntry' : _reflection.GeneratedProtocolMessageType('Uint64MapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTMAP_UINT64MAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestMap.Uint64MapEntry)
})
,
'StringMapEntry' : _reflection.GeneratedProtocolMessageType('StringMapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTMAP_STRINGMAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestMap.StringMapEntry)
})
,
'DESCRIPTOR' : _TESTMAP,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestMap)
})
_sym_db.RegisterMessage(TestMap)
_sym_db.RegisterMessage(TestMap.BoolMapEntry)
_sym_db.RegisterMessage(TestMap.Int32MapEntry)
_sym_db.RegisterMessage(TestMap.Int64MapEntry)
_sym_db.RegisterMessage(TestMap.Uint32MapEntry)
_sym_db.RegisterMessage(TestMap.Uint64MapEntry)
_sym_db.RegisterMessage(TestMap.StringMapEntry)
TestNestedMap = _reflection.GeneratedProtocolMessageType('TestNestedMap', (_message.Message,), {
'BoolMapEntry' : _reflection.GeneratedProtocolMessageType('BoolMapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTNESTEDMAP_BOOLMAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestNestedMap.BoolMapEntry)
})
,
'Int32MapEntry' : _reflection.GeneratedProtocolMessageType('Int32MapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTNESTEDMAP_INT32MAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestNestedMap.Int32MapEntry)
})
,
'Int64MapEntry' : _reflection.GeneratedProtocolMessageType('Int64MapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTNESTEDMAP_INT64MAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestNestedMap.Int64MapEntry)
})
,
'Uint32MapEntry' : _reflection.GeneratedProtocolMessageType('Uint32MapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTNESTEDMAP_UINT32MAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestNestedMap.Uint32MapEntry)
})
,
'Uint64MapEntry' : _reflection.GeneratedProtocolMessageType('Uint64MapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTNESTEDMAP_UINT64MAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestNestedMap.Uint64MapEntry)
})
,
'StringMapEntry' : _reflection.GeneratedProtocolMessageType('StringMapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTNESTEDMAP_STRINGMAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestNestedMap.StringMapEntry)
})
,
'MapMapEntry' : _reflection.GeneratedProtocolMessageType('MapMapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTNESTEDMAP_MAPMAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestNestedMap.MapMapEntry)
})
,
'DESCRIPTOR' : _TESTNESTEDMAP,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestNestedMap)
})
_sym_db.RegisterMessage(TestNestedMap)
_sym_db.RegisterMessage(TestNestedMap.BoolMapEntry)
_sym_db.RegisterMessage(TestNestedMap.Int32MapEntry)
_sym_db.RegisterMessage(TestNestedMap.Int64MapEntry)
_sym_db.RegisterMessage(TestNestedMap.Uint32MapEntry)
_sym_db.RegisterMessage(TestNestedMap.Uint64MapEntry)
_sym_db.RegisterMessage(TestNestedMap.StringMapEntry)
_sym_db.RegisterMessage(TestNestedMap.MapMapEntry)
TestStringMap = _reflection.GeneratedProtocolMessageType('TestStringMap', (_message.Message,), {
'StringMapEntry' : _reflection.GeneratedProtocolMessageType('StringMapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTSTRINGMAP_STRINGMAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestStringMap.StringMapEntry)
})
,
'DESCRIPTOR' : _TESTSTRINGMAP,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestStringMap)
})
_sym_db.RegisterMessage(TestStringMap)
_sym_db.RegisterMessage(TestStringMap.StringMapEntry)
TestWrapper = _reflection.GeneratedProtocolMessageType('TestWrapper', (_message.Message,), {
'DESCRIPTOR' : _TESTWRAPPER,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestWrapper)
})
_sym_db.RegisterMessage(TestWrapper)
TestTimestamp = _reflection.GeneratedProtocolMessageType('TestTimestamp', (_message.Message,), {
'DESCRIPTOR' : _TESTTIMESTAMP,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestTimestamp)
})
_sym_db.RegisterMessage(TestTimestamp)
TestDuration = _reflection.GeneratedProtocolMessageType('TestDuration', (_message.Message,), {
'DESCRIPTOR' : _TESTDURATION,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestDuration)
})
_sym_db.RegisterMessage(TestDuration)
TestFieldMask = _reflection.GeneratedProtocolMessageType('TestFieldMask', (_message.Message,), {
'DESCRIPTOR' : _TESTFIELDMASK,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestFieldMask)
})
_sym_db.RegisterMessage(TestFieldMask)
TestStruct = _reflection.GeneratedProtocolMessageType('TestStruct', (_message.Message,), {
'DESCRIPTOR' : _TESTSTRUCT,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestStruct)
})
_sym_db.RegisterMessage(TestStruct)
TestAny = _reflection.GeneratedProtocolMessageType('TestAny', (_message.Message,), {
'DESCRIPTOR' : _TESTANY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestAny)
})
_sym_db.RegisterMessage(TestAny)
TestValue = _reflection.GeneratedProtocolMessageType('TestValue', (_message.Message,), {
'DESCRIPTOR' : _TESTVALUE,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestValue)
})
_sym_db.RegisterMessage(TestValue)
TestListValue = _reflection.GeneratedProtocolMessageType('TestListValue', (_message.Message,), {
'DESCRIPTOR' : _TESTLISTVALUE,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestListValue)
})
_sym_db.RegisterMessage(TestListValue)
TestBoolValue = _reflection.GeneratedProtocolMessageType('TestBoolValue', (_message.Message,), {
'BoolMapEntry' : _reflection.GeneratedProtocolMessageType('BoolMapEntry', (_message.Message,), {
'DESCRIPTOR' : _TESTBOOLVALUE_BOOLMAPENTRY,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestBoolValue.BoolMapEntry)
})
,
'DESCRIPTOR' : _TESTBOOLVALUE,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestBoolValue)
})
_sym_db.RegisterMessage(TestBoolValue)
_sym_db.RegisterMessage(TestBoolValue.BoolMapEntry)
TestCustomJsonName = _reflection.GeneratedProtocolMessageType('TestCustomJsonName', (_message.Message,), {
'DESCRIPTOR' : _TESTCUSTOMJSONNAME,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestCustomJsonName)
})
_sym_db.RegisterMessage(TestCustomJsonName)
TestExtensions = _reflection.GeneratedProtocolMessageType('TestExtensions', (_message.Message,), {
'DESCRIPTOR' : _TESTEXTENSIONS,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestExtensions)
})
_sym_db.RegisterMessage(TestExtensions)
TestEnumValue = _reflection.GeneratedProtocolMessageType('TestEnumValue', (_message.Message,), {
'DESCRIPTOR' : _TESTENUMVALUE,
'__module__' : 'google.protobuf.util.json_format_proto3_pb2'
# @@protoc_insertion_point(class_scope:proto3.TestEnumValue)
})
_sym_db.RegisterMessage(TestEnumValue)
DESCRIPTOR._options = None
_TESTMAP_BOOLMAPENTRY._options = None
_TESTMAP_INT32MAPENTRY._options = None
_TESTMAP_INT64MAPENTRY._options = None
_TESTMAP_UINT32MAPENTRY._options = None
_TESTMAP_UINT64MAPENTRY._options = None
_TESTMAP_STRINGMAPENTRY._options = None
_TESTNESTEDMAP_BOOLMAPENTRY._options = None
_TESTNESTEDMAP_INT32MAPENTRY._options = None
_TESTNESTEDMAP_INT64MAPENTRY._options = None
_TESTNESTEDMAP_UINT32MAPENTRY._options = None
_TESTNESTEDMAP_UINT64MAPENTRY._options = None
_TESTNESTEDMAP_STRINGMAPENTRY._options = None
_TESTNESTEDMAP_MAPMAPENTRY._options = None
_TESTSTRINGMAP_STRINGMAPENTRY._options = None
_TESTBOOLVALUE_BOOLMAPENTRY._options = None
# @@protoc_insertion_point(module_scope)
| 42.940524 | 8,019 | 0.758434 | 10,655 | 85,194 | 5.73252 | 0.035007 | 0.048068 | 0.033235 | 0.03998 | 0.809398 | 0.765832 | 0.728193 | 0.692485 | 0.650966 | 0.640586 | 0 | 0.048876 | 0.119339 | 85,194 | 1,983 | 8,020 | 42.962179 | 0.765231 | 0.027044 | 0 | 0.694429 | 1 | 0.000541 | 0.22217 | 0.167638 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.007031 | 0 | 0.007031 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
b7291419f463d61cac33a09501e23178c977235d | 34 | py | Python | lib/torcs/__init__.py | RedwanNewaz/Keras-Torcs-DRL | c438933be40c7725da99231f35d50417c849c10a | [
"MIT"
] | null | null | null | lib/torcs/__init__.py | RedwanNewaz/Keras-Torcs-DRL | c438933be40c7725da99231f35d50417c849c10a | [
"MIT"
] | null | null | null | lib/torcs/__init__.py | RedwanNewaz/Keras-Torcs-DRL | c438933be40c7725da99231f35d50417c849c10a | [
"MIT"
] | null | null | null | from .snakeoil3_gym import Client
| 17 | 33 | 0.852941 | 5 | 34 | 5.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033333 | 0.117647 | 34 | 1 | 34 | 34 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
3fe30068dbf679cfd1d70540e56cc10551d96a4c | 23 | py | Python | __init__.py | fmiko/webscraper | f255310f610a193913a36b6f46591b5dc3ea36b8 | [
"MIT"
] | null | null | null | __init__.py | fmiko/webscraper | f255310f610a193913a36b6f46591b5dc3ea36b8 | [
"MIT"
] | null | null | null | __init__.py | fmiko/webscraper | f255310f610a193913a36b6f46591b5dc3ea36b8 | [
"MIT"
] | null | null | null | from pyscrape import *
| 11.5 | 22 | 0.782609 | 3 | 23 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.173913 | 23 | 1 | 23 | 23 | 0.947368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
b76f903b09cdecf7d4ced22ba2c51dac1f703774 | 41 | py | Python | ddcz/models/__init__.py | ItIsI-Orient/graveyard | 4b1c1be90b6f1362aa43c65899bb3676ffccbeb9 | [
"MIT"
] | null | null | null | ddcz/models/__init__.py | ItIsI-Orient/graveyard | 4b1c1be90b6f1362aa43c65899bb3676ffccbeb9 | [
"MIT"
] | null | null | null | ddcz/models/__init__.py | ItIsI-Orient/graveyard | 4b1c1be90b6f1362aa43c65899bb3676ffccbeb9 | [
"MIT"
] | null | null | null | from .used import *
from .legacy import * | 20.5 | 21 | 0.731707 | 6 | 41 | 5 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170732 | 41 | 2 | 21 | 20.5 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
b7d3bb654f701a022630fbb0d940fb139dc3b219 | 9,570 | py | Python | tests/test_wpe.py | speechdnn/nara_wpe | 89db94e4938d4afc68736022819852e1bbea95e2 | [
"MIT"
] | 6 | 2019-08-02T01:59:50.000Z | 2022-02-21T12:28:11.000Z | tests/test_wpe.py | nd1511/nara_wpe | 1d33f9862950ac8a6d42613e15247b72d68dfef5 | [
"MIT"
] | null | null | null | tests/test_wpe.py | nd1511/nara_wpe | 1d33f9862950ac8a6d42613e15247b72d68dfef5 | [
"MIT"
] | 6 | 2019-11-23T05:07:16.000Z | 2021-07-06T12:22:57.000Z | """
Run all tests with:
nosetests -w tests/
"""
import unittest
import numpy.testing as tc
import numpy as np
from nara_wpe import wpe
from nara_wpe.test_utils import retry
class TestWPE(unittest.TestCase):
def setUp(self):
self.T = np.random.randint(100, 120)
self.D = np.random.randint(2, 8)
self.K = np.random.randint(3, 5)
self.delay = np.random.randint(0, 2)
self.Y = np.random.normal(size=(self.D, self.T)) \
+ 1j * np.random.normal(size=(self.D, self.T))
def test_correlations_v1_vs_v2_toy_example(self):
K = 3
delay = 1
Y = np.asarray(
[
[11, 12, 13, 14],
[41, 22, 23, 24]
], dtype=np.float32
)
inverse_power = wpe.get_power_inverse(Y)
R_desired, r_desired = wpe.get_correlations(Y, inverse_power, K, delay)
R_actual, r_actual = wpe.get_correlations_v2(Y, inverse_power, K, delay)
tc.assert_allclose(R_actual, R_desired)
tc.assert_allclose(r_actual, r_desired)
def test_correlations_v1_vs_v2(self):
inverse_power = wpe.get_power_inverse(self.Y)
R_desired, r_desired = wpe.get_correlations(
self.Y, inverse_power, self.K, self.delay
)
R_actual, r_actual = wpe.get_correlations_v2(
self.Y, inverse_power, self.K, self.delay
)
tc.assert_allclose(R_actual, R_desired)
tc.assert_allclose(r_actual, r_desired)
@retry(5)
def test_filter_operation_v1_vs_v4(self):
filter_matrix_conj = np.random.normal(size=(self.K, self.D, self.D)) \
+ 1j * np.random.normal(size=(self.K, self.D, self.D))
desired = wpe.perform_filter_operation(
self.Y, filter_matrix_conj, self.K, self.delay
)
actual = wpe.perform_filter_operation_v4(
self.Y, filter_matrix_conj, self.K, self.delay
)
tc.assert_allclose(desired, actual)
def test_correlations_narrow_v1_vs_v5(self):
inverse_power = wpe.get_power_inverse(self.Y)
R_desired, r_desired = wpe.get_correlations_narrow(
self.Y, inverse_power, self.K, self.delay
)
R_actual, r_actual = wpe.get_correlations_narrow_v5(
self.Y, inverse_power, self.K, self.delay
)
tc.assert_allclose(R_actual, R_desired)
tc.assert_allclose(r_actual, r_desired)
def test_correlations_narrow_v1_vs_v6(self):
inverse_power = wpe.get_power_inverse(self.Y)
R_desired, r_desired = wpe.get_correlations_narrow(
self.Y, inverse_power, self.K, self.delay
)
s = (Ellipsis, slice(self.delay + self.K - 1, None))
Y_tilde = wpe.build_y_tilde(self.Y, self.K, self.delay)
R_actual, r_actual = wpe.get_correlations_v6(
self.Y[s], Y_tilde[s], inverse_power[s]
)
tc.assert_allclose(R_actual.conj(), R_desired)
tc.assert_allclose(
r_actual.conj(),
np.swapaxes(r_desired, 1, 2).reshape(-1, r_desired.shape[-1]),
rtol=1e-5, atol=1e-5
)
@retry(5)
def test_filter_matrix_conj_v1_vs_v5(self):
inverse_power = wpe.get_power_inverse(self.Y)
correlation_matrix, correlation_vector = wpe.get_correlations(
self.Y, inverse_power, self.K, self.delay
)
desired = wpe.get_filter_matrix_conj(
correlation_matrix, correlation_vector, self.K, self.D
)
actual = wpe.get_filter_matrix_conj_v5(
self.Y, inverse_power, self.K, self.delay
)
tc.assert_allclose(actual, desired, atol=1e-6)
@retry(5)
def test_filter_matrix_conj_v1_vs_v7(self):
inverse_power = wpe.get_power_inverse(self.Y)
correlation_matrix, correlation_vector = wpe.get_correlations(
self.Y, inverse_power, self.K, self.delay
)
desired = wpe.get_filter_matrix_conj(
correlation_matrix, correlation_vector, self.K, self.D
)
s = [Ellipsis, slice(self.delay + self.K - 1, None)]
Y_tilde = wpe.build_y_tilde(self.Y, self.K, self.delay)
actual = wpe.get_filter_matrix_v7(
self.Y, Y_tilde=Y_tilde, inverse_power=inverse_power,
)
tc.assert_allclose(
actual.conj(),
np.swapaxes(desired, 1, 2).reshape(-1, desired.shape[-1]),
atol=1e-6
)
@retry(5)
def test_delay_zero_cancels_all(self):
delay = 0
X_hat = wpe.wpe(self.Y, self.K, delay=delay)
# Beginning is never zero. It is a copy of input signal.
tc.assert_allclose(
X_hat[:, delay + self.K - 1:],
np.zeros_like(X_hat[:, delay + self.K - 1:]),
atol=1e-6
)
@retry(5)
def test_wpe_v0_vs_v7(self):
desired = wpe.wpe_v0(self.Y, self.K, self.delay, statistics_mode='full')
actual = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v0(self.Y, self.K, self.delay, statistics_mode='valid')
actual = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='valid')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v6(self.Y, self.K, self.delay, statistics_mode='valid')
actual = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='full')
tc.assert_raises(AssertionError, tc.assert_array_equal, desired, actual)
@retry(5)
def test_wpe_v6_vs_v7(self):
desired = wpe.wpe_v6(self.Y, self.K, self.delay, statistics_mode='full')
actual = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v6(self.Y, self.K, self.delay, statistics_mode='valid')
actual = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='valid')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v6(self.Y, self.K, self.delay, statistics_mode='valid')
actual = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='full')
tc.assert_raises(AssertionError, tc.assert_array_equal, desired, actual)
@retry(5)
def test_wpe_v8(self):
desired = wpe.wpe_v6(self.Y, self.K, self.delay, statistics_mode='valid')
actual = wpe.wpe_v8(self.Y, self.K, self.delay, statistics_mode='valid')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='valid')
actual = wpe.wpe_v8(self.Y, self.K, self.delay, statistics_mode='valid')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v6(self.Y, self.K, self.delay, statistics_mode='full')
actual = wpe.wpe_v8(self.Y, self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='full')
actual = wpe.wpe_v8(self.Y, self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
@retry(5)
def test_wpe_multi_freq(self):
desired = wpe.wpe_v0(self.Y, self.K, self.delay, statistics_mode='full')
desired = [desired, desired]
actual = wpe.wpe_v0(np.array([self.Y, self.Y]), self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='full')
desired = [desired, desired]
actual = wpe.wpe_v7(np.array([self.Y, self.Y]), self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v6(self.Y, self.K, self.delay, statistics_mode='full')
desired = [desired, desired]
actual = wpe.wpe_v6(np.array([self.Y, self.Y]), self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v8(self.Y, self.K, self.delay, statistics_mode='full')
desired = [desired, desired]
actual = wpe.wpe_v8(np.array([self.Y, self.Y]), self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
@retry(5)
def test_wpe_batched_multi_freq(self):
def to_batched_multi_freq(x):
return np.array([
[x, x*2],
[x*3, x*4],
[x*5, x*6],
])
Y_batched_multi_freq = to_batched_multi_freq(self.Y)
tc.assert_raises(NotImplementedError, wpe.wpe_v0, Y_batched_multi_freq, self.K, self.delay, statistics_mode='full')
desired = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='full')
desired = to_batched_multi_freq(desired)
actual = wpe.wpe_v7(Y_batched_multi_freq, self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v6(self.Y, self.K, self.delay, statistics_mode='full')
desired = to_batched_multi_freq(desired)
actual = wpe.wpe_v6(Y_batched_multi_freq, self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
desired = wpe.wpe_v8(self.Y, self.K, self.delay, statistics_mode='full')
desired = to_batched_multi_freq(desired)
actual = wpe.wpe_v8(Y_batched_multi_freq, self.K, self.delay, statistics_mode='full')
tc.assert_allclose(actual, desired, atol=1e-6)
| 40.897436 | 123 | 0.636364 | 1,401 | 9,570 | 4.117773 | 0.089222 | 0.050269 | 0.079563 | 0.114058 | 0.844167 | 0.820593 | 0.788352 | 0.780205 | 0.75663 | 0.728896 | 0 | 0.022201 | 0.237513 | 9,570 | 233 | 124 | 41.072961 | 0.768398 | 0.010345 | 0 | 0.497382 | 0 | 0 | 0.015851 | 0 | 0 | 0 | 0 | 0 | 0.157068 | 1 | 0.078534 | false | 0 | 0.026178 | 0.005236 | 0.115183 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
4d40a2735369a0575f2e9ddc2eef67fa6bd65682 | 65 | py | Python | pflacg/__init__.py | ericlincc/Parameter-free-LaCG | c2d61d5e6b5eb5c29f0bf74b8f4beaa2cbbc4282 | [
"MIT"
] | null | null | null | pflacg/__init__.py | ericlincc/Parameter-free-LaCG | c2d61d5e6b5eb5c29f0bf74b8f4beaa2cbbc4282 | [
"MIT"
] | null | null | null | pflacg/__init__.py | ericlincc/Parameter-free-LaCG | c2d61d5e6b5eb5c29f0bf74b8f4beaa2cbbc4282 | [
"MIT"
] | null | null | null | from pflacg.algorithms import *
from pflacg.experiments import *
| 21.666667 | 32 | 0.815385 | 8 | 65 | 6.625 | 0.625 | 0.377358 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.123077 | 65 | 2 | 33 | 32.5 | 0.929825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
4dba2b70fa9ae61569cc7bd52c17176cec9d67f6 | 10,424 | py | Python | contentcuration/contentcuration/tests/viewsets/test_clipboard.py | kollivier/studio | 9089780858ae9870421056b4e6e5659ae854db57 | [
"MIT"
] | 1 | 2019-03-30T18:14:25.000Z | 2019-03-30T18:14:25.000Z | contentcuration/contentcuration/tests/viewsets/test_clipboard.py | kollivier/studio | 9089780858ae9870421056b4e6e5659ae854db57 | [
"MIT"
] | 2 | 2019-04-06T07:06:08.000Z | 2019-04-08T23:33:53.000Z | contentcuration/contentcuration/tests/viewsets/test_clipboard.py | MisRob/studio | 92a5c780c8952f7d37db38952483ab7a28d3cb9d | [
"MIT"
] | 1 | 2020-10-20T05:21:56.000Z | 2020-10-20T05:21:56.000Z | from __future__ import absolute_import
import uuid
from django.core.management import call_command
from django.core.urlresolvers import reverse
from le_utils.constants import content_kinds
from contentcuration import models
from contentcuration.tests import testdata
from contentcuration.tests.base import StudioAPITestCase
from contentcuration.viewsets.sync.constants import CLIPBOARD
from contentcuration.viewsets.sync.utils import generate_create_event
from contentcuration.viewsets.sync.utils import generate_delete_event
from contentcuration.viewsets.sync.utils import generate_update_event
class SyncTestCase(StudioAPITestCase):
@classmethod
def setUpClass(cls):
cls.create_bucket()
super(SyncTestCase, cls).setUpClass()
@classmethod
def tearDownClass(cls):
super(SyncTestCase, cls).tearDownClass()
cls.create_bucket()
@classmethod
def setUpTestData(cls):
call_command("loadconstants")
cls.user = testdata.user()
cls.channel = testdata.channel()
cls.channel.viewers.add(cls.user)
@property
def sync_url(self):
return reverse("sync")
@property
def clipboard_metadata(self):
return {
"id": uuid.uuid4().hex,
"kind": content_kinds.VIDEO,
"parent": self.user.clipboard_tree_id,
"source_node_id": self.channel.main_tree.get_descendants()
.filter(kind_id=content_kinds.VIDEO)
.first()
.node_id,
"source_channel_id": self.channel.id,
}
@property
def clipboard_db_metadata(self):
return {
"id": uuid.uuid4().hex,
"kind_id": content_kinds.VIDEO,
"parent_id": self.user.clipboard_tree_id,
"source_node_id": self.channel.main_tree.get_descendants()
.filter(kind_id=content_kinds.VIDEO)
.first()
.node_id,
"source_channel_id": self.channel.id,
}
def test_create_clipboard(self):
self.client.force_authenticate(user=self.user)
clipboard = self.clipboard_metadata
response = self.client.post(
self.sync_url,
[generate_create_event(clipboard["id"], CLIPBOARD, clipboard)],
format="json",
)
self.assertEqual(response.status_code, 200, response.content)
try:
models.ContentNode.objects.get(id=clipboard["id"])
except models.ContentNode.DoesNotExist:
self.fail("ContentNode was not created")
def test_create_clipboard_with_null_extra_fields(self):
self.client.force_authenticate(user=self.user)
clipboard = self.clipboard_metadata
clipboard["extra_fields"] = None
response = self.client.post(
self.sync_url,
[generate_create_event(clipboard["id"], CLIPBOARD, clipboard)],
format="json",
)
self.assertEqual(response.status_code, 200, response.content)
try:
models.ContentNode.objects.get(id=clipboard["id"])
except models.ContentNode.DoesNotExist:
self.fail("ContentNode was not created")
def test_create_clipboard_with_parent(self):
channel = testdata.channel()
channel.editors.add(self.user)
self.client.force_authenticate(user=self.user)
clipboard = self.clipboard_metadata
clipboard["parent"] = channel.main_tree_id
response = self.client.post(
self.sync_url,
[generate_create_event(clipboard["id"], CLIPBOARD, clipboard)],
format="json",
)
self.assertEqual(response.status_code, 200, response.content)
try:
new_node = models.ContentNode.objects.get(id=clipboard["id"])
except models.ContentNode.DoesNotExist:
self.fail("ContentNode was not created")
self.assertEqual(new_node.parent_id, channel.main_tree_id)
def test_create_clipboards(self):
self.client.force_authenticate(user=self.user)
clipboard1 = self.clipboard_metadata
clipboard2 = self.clipboard_metadata
response = self.client.post(
self.sync_url,
[
generate_create_event(clipboard1["id"], CLIPBOARD, clipboard1),
generate_create_event(clipboard2["id"], CLIPBOARD, clipboard2),
],
format="json",
)
self.assertEqual(response.status_code, 200, response.content)
try:
models.ContentNode.objects.get(id=clipboard1["id"])
except models.ContentNode.DoesNotExist:
self.fail("ContentNode 1 was not created")
try:
models.ContentNode.objects.get(id=clipboard2["id"])
except models.ContentNode.DoesNotExist:
self.fail("ContentNode 2 was not created")
def test_update_clipboard_extra_fields(self):
clipboard = models.ContentNode.objects.create(**self.clipboard_db_metadata)
node_id1 = uuid.uuid4().hex
self.client.force_authenticate(user=self.user)
response = self.client.post(
self.sync_url,
[
generate_update_event(
clipboard.id,
CLIPBOARD,
{"extra_fields.excluded_descendants.{}".format(node_id1): True},
)
],
format="json",
)
self.assertEqual(response.status_code, 200, response.content)
self.assertTrue(
models.ContentNode.objects.get(id=clipboard.id).extra_fields[
"excluded_descendants"
][node_id1]
)
node_id2 = uuid.uuid4().hex
response = self.client.post(
self.sync_url,
[
generate_update_event(
clipboard.id,
CLIPBOARD,
{"extra_fields.excluded_descendants.{}".format(node_id2): True},
)
],
format="json",
)
self.assertEqual(response.status_code, 200, response.content)
self.assertTrue(
models.ContentNode.objects.get(id=clipboard.id).extra_fields[
"excluded_descendants"
][node_id1]
)
self.assertTrue(
models.ContentNode.objects.get(id=clipboard.id).extra_fields[
"excluded_descendants"
][node_id2]
)
def test_delete_clipboard(self):
clipboard = models.ContentNode.objects.create(**self.clipboard_db_metadata)
self.client.force_authenticate(user=self.user)
response = self.client.post(
self.sync_url,
[generate_delete_event(clipboard.id, CLIPBOARD)],
format="json",
)
self.assertEqual(response.status_code, 200, response.content)
try:
models.ContentNode.objects.get(id=clipboard.id)
self.fail("ContentNode was not deleted")
except models.ContentNode.DoesNotExist:
pass
def test_delete_clipboards(self):
clipboard1 = models.ContentNode.objects.create(**self.clipboard_db_metadata)
clipboard2 = models.ContentNode.objects.create(**self.clipboard_db_metadata)
self.client.force_authenticate(user=self.user)
response = self.client.post(
self.sync_url,
[
generate_delete_event(clipboard1.id, CLIPBOARD),
generate_delete_event(clipboard2.id, CLIPBOARD),
],
format="json",
)
self.assertEqual(response.status_code, 200, response.content)
try:
models.ContentNode.objects.get(id=clipboard1.id)
self.fail("ContentNode 1 was not deleted")
except models.ContentNode.DoesNotExist:
pass
try:
models.ContentNode.objects.get(id=clipboard2.id)
self.fail("ContentNode 2 was not deleted")
except models.ContentNode.DoesNotExist:
pass
class CRUDTestCase(StudioAPITestCase):
@classmethod
def setUpClass(cls):
cls.create_bucket()
super(CRUDTestCase, cls).setUpClass()
@classmethod
def tearDownClass(cls):
super(CRUDTestCase, cls).tearDownClass()
cls.create_bucket()
@classmethod
def setUpTestData(cls):
call_command("loadconstants")
cls.user = testdata.user()
cls.channel = testdata.channel()
cls.channel.viewers.add(cls.user)
@property
def clipboard_metadata(self):
return {
"id": uuid.uuid4().hex,
"kind": content_kinds.VIDEO,
"parent": self.user.clipboard_tree_id,
"source_node_id": self.channel.main_tree.get_descendants()
.filter(kind_id=content_kinds.VIDEO)
.first()
.node_id,
"source_channel_id": self.channel.id,
}
@property
def clipboard_db_metadata(self):
return {
"id": uuid.uuid4().hex,
"kind_id": content_kinds.VIDEO,
"parent_id": self.user.clipboard_tree_id,
"source_node_id": self.channel.main_tree.get_descendants()
.filter(kind_id=content_kinds.VIDEO)
.first()
.node_id,
"source_channel_id": self.channel.id,
}
def test_create_clipboard(self):
self.client.force_authenticate(user=self.user)
clipboard = self.clipboard_metadata
response = self.client.post(
reverse("clipboard-list"), clipboard, format="json",
)
self.assertEqual(response.status_code, 201, response.content)
try:
models.ContentNode.objects.get(id=clipboard["id"])
except models.ContentNode.DoesNotExist:
self.fail("ContentNode was not created")
def test_delete_clipboard(self):
clipboard = models.ContentNode.objects.create(**self.clipboard_db_metadata)
self.client.force_authenticate(user=self.user)
response = self.client.delete(
reverse("clipboard-detail", kwargs={"pk": clipboard.id})
)
self.assertEqual(response.status_code, 204, response.content)
try:
models.ContentNode.objects.get(id=clipboard.id)
self.fail("ContentNode was not deleted")
except models.ContentNode.DoesNotExist:
pass
| 34.979866 | 84 | 0.620299 | 1,070 | 10,424 | 5.862617 | 0.105607 | 0.075881 | 0.068867 | 0.055954 | 0.835167 | 0.827674 | 0.819066 | 0.795791 | 0.706839 | 0.686434 | 0 | 0.008125 | 0.279739 | 10,424 | 297 | 85 | 35.097643 | 0.827384 | 0 | 0 | 0.69084 | 0 | 0 | 0.070223 | 0.006907 | 0 | 0 | 0 | 0 | 0.053435 | 1 | 0.076336 | false | 0.015267 | 0.045802 | 0.019084 | 0.148855 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
4dbe81d96ecd29000176f7b8960213b15db82b26 | 105 | py | Python | flask_demo/app/home/__init__.py | SummerWater/Python_Flask_Movie_project | a38bd096be7b69951da40398898a147e7210efed | [
"MIT"
] | null | null | null | flask_demo/app/home/__init__.py | SummerWater/Python_Flask_Movie_project | a38bd096be7b69951da40398898a147e7210efed | [
"MIT"
] | null | null | null | flask_demo/app/home/__init__.py | SummerWater/Python_Flask_Movie_project | a38bd096be7b69951da40398898a147e7210efed | [
"MIT"
] | null | null | null | # coding:utf8
from flask import Blueprint
home = Blueprint('home', __name__)
import app.home.views | 17.5 | 35 | 0.733333 | 14 | 105 | 5.214286 | 0.714286 | 0.356164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011494 | 0.171429 | 105 | 6 | 36 | 17.5 | 0.827586 | 0.104762 | 0 | 0 | 0 | 0 | 0.045455 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0.666667 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
4df199b45bd58996f91840e366366c7ae4908213 | 263 | py | Python | MODELS/Line.py | seyedalirahimi/BorsAnalysis | c6bd611ba0a8d29fd5a3437898810fdc0a380945 | [
"MIT"
] | null | null | null | MODELS/Line.py | seyedalirahimi/BorsAnalysis | c6bd611ba0a8d29fd5a3437898810fdc0a380945 | [
"MIT"
] | null | null | null | MODELS/Line.py | seyedalirahimi/BorsAnalysis | c6bd611ba0a8d29fd5a3437898810fdc0a380945 | [
"MIT"
] | null | null | null | class Line:
def __init__(self, point1, point2):
self.point1 = point1
self.point2 = point2
def __str__(self):
return f'({self.point1}) - ({self.point2})'
def __repr__(self):
return f'({self.point1}) - ({self.point2})'
| 23.909091 | 51 | 0.574144 | 31 | 263 | 4.483871 | 0.354839 | 0.28777 | 0.345324 | 0.215827 | 0.446043 | 0.446043 | 0.446043 | 0 | 0 | 0 | 0 | 0.051813 | 0.26616 | 263 | 10 | 52 | 26.3 | 0.668394 | 0 | 0 | 0.25 | 0 | 0 | 0.250951 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.375 | false | 0 | 0 | 0.25 | 0.75 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
12dd7302a4021024cac9aa6fb9a4365ebfb7d872 | 124 | py | Python | order-services/app/order_api/__init__.py | SalAlba/flask-microservices | 8625e8fb3352d3704a17796635e95bbef25f1d06 | [
"MIT"
] | null | null | null | order-services/app/order_api/__init__.py | SalAlba/flask-microservices | 8625e8fb3352d3704a17796635e95bbef25f1d06 | [
"MIT"
] | null | null | null | order-services/app/order_api/__init__.py | SalAlba/flask-microservices | 8625e8fb3352d3704a17796635e95bbef25f1d06 | [
"MIT"
] | null | null | null | from flask import Blueprint
order_blueprint = Blueprint('order', __name__, template_folder='templates')
from . import routes | 41.333333 | 75 | 0.814516 | 15 | 124 | 6.333333 | 0.666667 | 0.294737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.096774 | 124 | 3 | 76 | 41.333333 | 0.848214 | 0 | 0 | 0 | 0 | 0 | 0.112 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0.666667 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 6 |
12e8820a3c59df974e3238094514ed3e40343556 | 171,220 | py | Python | esociallib/v2_04/evtTabEstab.py | akretion/esociallib | 2472d68b45610638cf10d87aeed48b917ebae6d8 | [
"MIT"
] | 6 | 2018-02-16T09:59:35.000Z | 2021-09-01T20:40:02.000Z | esociallib/v2_04/evtTabEstab.py | akretion/esociallib | 2472d68b45610638cf10d87aeed48b917ebae6d8 | [
"MIT"
] | 2 | 2018-02-02T19:32:21.000Z | 2019-01-25T14:43:05.000Z | esociallib/v2_04/evtTabEstab.py | akretion/esociallib | 2472d68b45610638cf10d87aeed48b917ebae6d8 | [
"MIT"
] | 2 | 2018-05-03T17:16:38.000Z | 2021-04-02T19:17:31.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Tue Oct 10 00:42:26 2017 by generateDS.py version 2.28b.
# Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
#
# Command line options:
# ('--no-process-includes', '')
# ('-o', 'esociallib/v2_04/evtTabEstab.py')
#
# Command line arguments:
# schemas/v2_04/evtTabEstab.xsd
#
# Command line:
# /usr/local/bin/generateDS --no-process-includes -o "esociallib/v2_04/evtTabEstab.py" schemas/v2_04/evtTabEstab.xsd
#
# Current working directory (os.getcwd()):
# esociallib
#
import sys
import re as re_
import base64
import datetime as datetime_
import warnings as warnings_
try:
from lxml import etree as etree_
except ImportError:
from xml.etree import ElementTree as etree_
Validate_simpletypes_ = True
if sys.version_info.major == 2:
BaseStrType_ = basestring
else:
BaseStrType_ = str
def parsexml_(infile, parser=None, **kwargs):
if parser is None:
# Use the lxml ElementTree compatible parser so that, e.g.,
# we ignore comments.
try:
parser = etree_.ETCompatXMLParser()
except AttributeError:
# fallback to xml.etree
parser = etree_.XMLParser()
doc = etree_.parse(infile, parser=parser, **kwargs)
return doc
#
# Namespace prefix definition table (and other attributes, too)
#
# The module generatedsnamespaces, if it is importable, must contain
# a dictionary named GeneratedsNamespaceDefs. This Python dictionary
# should map element type names (strings) to XML schema namespace prefix
# definitions. The export method for any class for which there is
# a namespace prefix definition, will export that definition in the
# XML representation of that element. See the export method of
# any generated element type class for a example of the use of this
# table.
# A sample table is:
#
# # File: generatedsnamespaces.py
#
# GenerateDSNamespaceDefs = {
# "ElementtypeA": "http://www.xxx.com/namespaceA",
# "ElementtypeB": "http://www.xxx.com/namespaceB",
# }
#
try:
from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ImportError:
GenerateDSNamespaceDefs_ = {}
#
# The root super-class for element type classes
#
# Calls to the methods in these classes are generated by generateDS.py.
# You can replace these methods by re-implementing the following class
# in a module named generatedssuper.py.
try:
from generatedssuper import GeneratedsSuper
except ImportError as exp:
class GeneratedsSuper(object):
tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
class _FixedOffsetTZ(datetime_.tzinfo):
def __init__(self, offset, name):
self.__offset = datetime_.timedelta(minutes=offset)
self.__name = name
def utcoffset(self, dt):
return self.__offset
def tzname(self, dt):
return self.__name
def dst(self, dt):
return None
def gds_format_string(self, input_data, input_name=''):
return input_data
def gds_validate_string(self, input_data, node=None, input_name=''):
if not input_data:
return ''
else:
return input_data
def gds_format_base64(self, input_data, input_name=''):
return base64.b64encode(input_data)
def gds_validate_base64(self, input_data, node=None, input_name=''):
return input_data
def gds_format_integer(self, input_data, input_name=''):
return '%d' % input_data
def gds_validate_integer(self, input_data, node=None, input_name=''):
return input_data
def gds_format_integer_list(self, input_data, input_name=''):
return '%s' % ' '.join(input_data)
def gds_validate_integer_list(
self, input_data, node=None, input_name=''):
values = input_data.split()
for value in values:
try:
int(value)
except (TypeError, ValueError):
raise_parse_error(node, 'Requires sequence of integers')
return values
def gds_format_float(self, input_data, input_name=''):
return ('%.15f' % input_data).rstrip('0')
def gds_validate_float(self, input_data, node=None, input_name=''):
return input_data
def gds_format_float_list(self, input_data, input_name=''):
return '%s' % ' '.join(input_data)
def gds_validate_float_list(
self, input_data, node=None, input_name=''):
values = input_data.split()
for value in values:
try:
float(value)
except (TypeError, ValueError):
raise_parse_error(node, 'Requires sequence of floats')
return values
def gds_format_double(self, input_data, input_name=''):
return '%e' % input_data
def gds_validate_double(self, input_data, node=None, input_name=''):
return input_data
def gds_format_double_list(self, input_data, input_name=''):
return '%s' % ' '.join(input_data)
def gds_validate_double_list(
self, input_data, node=None, input_name=''):
values = input_data.split()
for value in values:
try:
float(value)
except (TypeError, ValueError):
raise_parse_error(node, 'Requires sequence of doubles')
return values
def gds_format_boolean(self, input_data, input_name=''):
return ('%s' % input_data).lower()
def gds_validate_boolean(self, input_data, node=None, input_name=''):
return input_data
def gds_format_boolean_list(self, input_data, input_name=''):
return '%s' % ' '.join(input_data)
def gds_validate_boolean_list(
self, input_data, node=None, input_name=''):
values = input_data.split()
for value in values:
if value not in ('true', '1', 'false', '0', ):
raise_parse_error(
node,
'Requires sequence of booleans '
'("true", "1", "false", "0")')
return values
def gds_validate_datetime(self, input_data, node=None, input_name=''):
return input_data
def gds_format_datetime(self, input_data, input_name=''):
if input_data.microsecond == 0:
_svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (
input_data.year,
input_data.month,
input_data.day,
input_data.hour,
input_data.minute,
input_data.second,
)
else:
_svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (
input_data.year,
input_data.month,
input_data.day,
input_data.hour,
input_data.minute,
input_data.second,
('%f' % (float(input_data.microsecond) / 1000000))[2:],
)
if input_data.tzinfo is not None:
tzoff = input_data.tzinfo.utcoffset(input_data)
if tzoff is not None:
total_seconds = tzoff.seconds + (86400 * tzoff.days)
if total_seconds == 0:
_svalue += 'Z'
else:
if total_seconds < 0:
_svalue += '-'
total_seconds *= -1
else:
_svalue += '+'
hours = total_seconds // 3600
minutes = (total_seconds - (hours * 3600)) // 60
_svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
return _svalue
@classmethod
def gds_parse_datetime(cls, input_data):
tz = None
if input_data[-1] == 'Z':
tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
input_data = input_data[:-1]
else:
results = GeneratedsSuper.tzoff_pattern.search(input_data)
if results is not None:
tzoff_parts = results.group(2).split(':')
tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
if results.group(1) == '-':
tzoff *= -1
tz = GeneratedsSuper._FixedOffsetTZ(
tzoff, results.group(0))
input_data = input_data[:-6]
time_parts = input_data.split('.')
if len(time_parts) > 1:
micro_seconds = int(float('0.' + time_parts[1]) * 1000000)
input_data = '%s.%s' % (time_parts[0], micro_seconds, )
dt = datetime_.datetime.strptime(
input_data, '%Y-%m-%dT%H:%M:%S.%f')
else:
dt = datetime_.datetime.strptime(
input_data, '%Y-%m-%dT%H:%M:%S')
dt = dt.replace(tzinfo=tz)
return dt
def gds_validate_date(self, input_data, node=None, input_name=''):
return input_data
def gds_format_date(self, input_data, input_name=''):
_svalue = '%04d-%02d-%02d' % (
input_data.year,
input_data.month,
input_data.day,
)
try:
if input_data.tzinfo is not None:
tzoff = input_data.tzinfo.utcoffset(input_data)
if tzoff is not None:
total_seconds = tzoff.seconds + (86400 * tzoff.days)
if total_seconds == 0:
_svalue += 'Z'
else:
if total_seconds < 0:
_svalue += '-'
total_seconds *= -1
else:
_svalue += '+'
hours = total_seconds // 3600
minutes = (total_seconds - (hours * 3600)) // 60
_svalue += '{0:02d}:{1:02d}'.format(
hours, minutes)
except AttributeError:
pass
return _svalue
@classmethod
def gds_parse_date(cls, input_data):
tz = None
if input_data[-1] == 'Z':
tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
input_data = input_data[:-1]
else:
results = GeneratedsSuper.tzoff_pattern.search(input_data)
if results is not None:
tzoff_parts = results.group(2).split(':')
tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
if results.group(1) == '-':
tzoff *= -1
tz = GeneratedsSuper._FixedOffsetTZ(
tzoff, results.group(0))
input_data = input_data[:-6]
dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')
dt = dt.replace(tzinfo=tz)
return dt.date()
def gds_validate_time(self, input_data, node=None, input_name=''):
return input_data
def gds_format_time(self, input_data, input_name=''):
if input_data.microsecond == 0:
_svalue = '%02d:%02d:%02d' % (
input_data.hour,
input_data.minute,
input_data.second,
)
else:
_svalue = '%02d:%02d:%02d.%s' % (
input_data.hour,
input_data.minute,
input_data.second,
('%f' % (float(input_data.microsecond) / 1000000))[2:],
)
if input_data.tzinfo is not None:
tzoff = input_data.tzinfo.utcoffset(input_data)
if tzoff is not None:
total_seconds = tzoff.seconds + (86400 * tzoff.days)
if total_seconds == 0:
_svalue += 'Z'
else:
if total_seconds < 0:
_svalue += '-'
total_seconds *= -1
else:
_svalue += '+'
hours = total_seconds // 3600
minutes = (total_seconds - (hours * 3600)) // 60
_svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
return _svalue
def gds_validate_simple_patterns(self, patterns, target):
# pat is a list of lists of strings/patterns. We should:
# - AND the outer elements
# - OR the inner elements
found1 = True
for patterns1 in patterns:
found2 = False
for patterns2 in patterns1:
if re_.search(patterns2, target) is not None:
found2 = True
break
if not found2:
found1 = False
break
return found1
@classmethod
def gds_parse_time(cls, input_data):
tz = None
if input_data[-1] == 'Z':
tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
input_data = input_data[:-1]
else:
results = GeneratedsSuper.tzoff_pattern.search(input_data)
if results is not None:
tzoff_parts = results.group(2).split(':')
tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
if results.group(1) == '-':
tzoff *= -1
tz = GeneratedsSuper._FixedOffsetTZ(
tzoff, results.group(0))
input_data = input_data[:-6]
if len(input_data.split('.')) > 1:
dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')
else:
dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')
dt = dt.replace(tzinfo=tz)
return dt.time()
def gds_str_lower(self, instring):
return instring.lower()
def get_path_(self, node):
path_list = []
self.get_path_list_(node, path_list)
path_list.reverse()
path = '/'.join(path_list)
return path
Tag_strip_pattern_ = re_.compile(r'\{.*\}')
def get_path_list_(self, node, path_list):
if node is None:
return
tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
if tag:
path_list.append(tag)
self.get_path_list_(node.getparent(), path_list)
def get_class_obj_(self, node, default_class=None):
class_obj1 = default_class
if 'xsi' in node.nsmap:
classname = node.get('{%s}type' % node.nsmap['xsi'])
if classname is not None:
names = classname.split(':')
if len(names) == 2:
classname = names[1]
class_obj2 = globals().get(classname)
if class_obj2 is not None:
class_obj1 = class_obj2
return class_obj1
def gds_build_any(self, node, type_name=None):
return None
@classmethod
def gds_reverse_node_mapping(cls, mapping):
return dict(((v, k) for k, v in mapping.iteritems()))
@staticmethod
def gds_encode(instring):
if sys.version_info.major == 2:
return instring.encode(ExternalEncoding)
else:
return instring
@staticmethod
def convert_unicode(instring):
if isinstance(instring, str):
result = quote_xml(instring)
elif sys.version_info.major == 2 and isinstance(instring, unicode):
result = quote_xml(instring).encode('utf8')
else:
result = GeneratedsSuper.gds_encode(str(instring))
return result
def __eq__(self, other):
if type(self) != type(other):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
return not self.__eq__(other)
def getSubclassFromModule_(module, class_):
'''Get the subclass of a class from a specific module.'''
name = class_.__name__ + 'Sub'
if hasattr(module, name):
return getattr(module, name)
else:
return None
#
# If you have installed IPython you can uncomment and use the following.
# IPython is available from http://ipython.scipy.org/.
#
## from IPython.Shell import IPShellEmbed
## args = ''
## ipshell = IPShellEmbed(args,
## banner = 'Dropping into IPython',
## exit_msg = 'Leaving Interpreter, back to program.')
# Then use the following line where and when you want to drop into the
# IPython shell:
# ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')
#
# Globals
#
ExternalEncoding = 'ascii'
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')
CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)
# Change this to redirect the generated superclass module to use a
# specific subclass module.
CurrentSubclassModule_ = None
#
# Support/utility functions.
#
def showIndent(outfile, level, pretty_print=True):
if pretty_print:
for idx in range(level):
outfile.write(' ')
def quote_xml(inStr):
"Escape markup chars, but do not modify CDATA sections."
if not inStr:
return ''
s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
s2 = ''
pos = 0
matchobjects = CDATA_pattern_.finditer(s1)
for mo in matchobjects:
s3 = s1[pos:mo.start()]
s2 += quote_xml_aux(s3)
s2 += s1[mo.start():mo.end()]
pos = mo.end()
s3 = s1[pos:]
s2 += quote_xml_aux(s3)
return s2
def quote_xml_aux(inStr):
s1 = inStr.replace('&', '&')
s1 = s1.replace('<', '<')
s1 = s1.replace('>', '>')
return s1
def quote_attrib(inStr):
s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
s1 = s1.replace('&', '&')
s1 = s1.replace('<', '<')
s1 = s1.replace('>', '>')
if '"' in s1:
if "'" in s1:
s1 = '"%s"' % s1.replace('"', """)
else:
s1 = "'%s'" % s1
else:
s1 = '"%s"' % s1
return s1
def quote_python(inStr):
s1 = inStr
if s1.find("'") == -1:
if s1.find('\n') == -1:
return "'%s'" % s1
else:
return "'''%s'''" % s1
else:
if s1.find('"') != -1:
s1 = s1.replace('"', '\\"')
if s1.find('\n') == -1:
return '"%s"' % s1
else:
return '"""%s"""' % s1
def get_all_text_(node):
if node.text is not None:
text = node.text
else:
text = ''
for child in node:
if child.tail is not None:
text += child.tail
return text
def find_attr_value_(attr_name, node):
attrs = node.attrib
attr_parts = attr_name.split(':')
value = None
if len(attr_parts) == 1:
value = attrs.get(attr_name)
elif len(attr_parts) == 2:
prefix, name = attr_parts
namespace = node.nsmap.get(prefix)
if namespace is not None:
value = attrs.get('{%s}%s' % (namespace, name, ))
return value
class GDSParseError(Exception):
pass
def raise_parse_error(node, msg):
msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )
raise GDSParseError(msg)
class MixedContainer:
# Constants for category:
CategoryNone = 0
CategoryText = 1
CategorySimple = 2
CategoryComplex = 3
# Constants for content_type:
TypeNone = 0
TypeText = 1
TypeString = 2
TypeInteger = 3
TypeFloat = 4
TypeDecimal = 5
TypeDouble = 6
TypeBoolean = 7
TypeBase64 = 8
def __init__(self, category, content_type, name, value):
self.category = category
self.content_type = content_type
self.name = name
self.value = value
def getCategory(self):
return self.category
def getContenttype(self, content_type):
return self.content_type
def getValue(self):
return self.value
def getName(self):
return self.name
def export(self, outfile, level, name, namespace,
pretty_print=True):
if self.category == MixedContainer.CategoryText:
# Prevent exporting empty content as empty lines.
if self.value.strip():
outfile.write(self.value)
elif self.category == MixedContainer.CategorySimple:
self.exportSimple(outfile, level, name)
else: # category == MixedContainer.CategoryComplex
self.value.export(
outfile, level, namespace, name,
pretty_print=pretty_print)
def exportSimple(self, outfile, level, name):
if self.content_type == MixedContainer.TypeString:
outfile.write('<%s>%s</%s>' % (
self.name, self.value, self.name))
elif self.content_type == MixedContainer.TypeInteger or \
self.content_type == MixedContainer.TypeBoolean:
outfile.write('<%s>%d</%s>' % (
self.name, self.value, self.name))
elif self.content_type == MixedContainer.TypeFloat or \
self.content_type == MixedContainer.TypeDecimal:
outfile.write('<%s>%f</%s>' % (
self.name, self.value, self.name))
elif self.content_type == MixedContainer.TypeDouble:
outfile.write('<%s>%g</%s>' % (
self.name, self.value, self.name))
elif self.content_type == MixedContainer.TypeBase64:
outfile.write('<%s>%s</%s>' % (
self.name,
base64.b64encode(self.value),
self.name))
def to_etree(self, element):
if self.category == MixedContainer.CategoryText:
# Prevent exporting empty content as empty lines.
if self.value.strip():
if len(element) > 0:
if element[-1].tail is None:
element[-1].tail = self.value
else:
element[-1].tail += self.value
else:
if element.text is None:
element.text = self.value
else:
element.text += self.value
elif self.category == MixedContainer.CategorySimple:
subelement = etree_.SubElement(
element, '%s' % self.name)
subelement.text = self.to_etree_simple()
else: # category == MixedContainer.CategoryComplex
self.value.to_etree(element)
def to_etree_simple(self):
if self.content_type == MixedContainer.TypeString:
text = self.value
elif (self.content_type == MixedContainer.TypeInteger or
self.content_type == MixedContainer.TypeBoolean):
text = '%d' % self.value
elif (self.content_type == MixedContainer.TypeFloat or
self.content_type == MixedContainer.TypeDecimal):
text = '%f' % self.value
elif self.content_type == MixedContainer.TypeDouble:
text = '%g' % self.value
elif self.content_type == MixedContainer.TypeBase64:
text = '%s' % base64.b64encode(self.value)
return text
def exportLiteral(self, outfile, level, name):
if self.category == MixedContainer.CategoryText:
showIndent(outfile, level)
outfile.write(
'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
self.category, self.content_type,
self.name, self.value))
elif self.category == MixedContainer.CategorySimple:
showIndent(outfile, level)
outfile.write(
'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
self.category, self.content_type,
self.name, self.value))
else: # category == MixedContainer.CategoryComplex
showIndent(outfile, level)
outfile.write(
'model_.MixedContainer(%d, %d, "%s",\n' % (
self.category, self.content_type, self.name,))
self.value.exportLiteral(outfile, level + 1)
showIndent(outfile, level)
outfile.write(')\n')
class MemberSpec_(object):
def __init__(self, name='', data_type='', container=0,
optional=0, child_attrs=None, choice=None):
self.name = name
self.data_type = data_type
self.container = container
self.child_attrs = child_attrs
self.choice = choice
self.optional = optional
def set_name(self, name): self.name = name
def get_name(self): return self.name
def set_data_type(self, data_type): self.data_type = data_type
def get_data_type_chain(self): return self.data_type
def get_data_type(self):
if isinstance(self.data_type, list):
if len(self.data_type) > 0:
return self.data_type[-1]
else:
return 'xs:string'
else:
return self.data_type
def set_container(self, container): self.container = container
def get_container(self): return self.container
def set_child_attrs(self, child_attrs): self.child_attrs = child_attrs
def get_child_attrs(self): return self.child_attrs
def set_choice(self, choice): self.choice = choice
def get_choice(self): return self.choice
def set_optional(self, optional): self.optional = optional
def get_optional(self): return self.optional
def _cast(typ, value):
if typ is None or value is None:
return value
return typ(value)
#
# Data representation classes.
#
class eSocial(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self, evtTabEstab=None, Signature=None):
self.original_tagname_ = None
self.evtTabEstab = evtTabEstab
self.Signature = Signature
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, eSocial)
if subclass is not None:
return subclass(*args_, **kwargs_)
if eSocial.subclass:
return eSocial.subclass(*args_, **kwargs_)
else:
return eSocial(*args_, **kwargs_)
factory = staticmethod(factory)
def get_evtTabEstab(self): return self.evtTabEstab
def set_evtTabEstab(self, evtTabEstab): self.evtTabEstab = evtTabEstab
def get_Signature(self): return self.Signature
def set_Signature(self, Signature): self.Signature = Signature
def hasContent_(self):
if (
self.evtTabEstab is not None or
self.Signature is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='eSocial', namespacedef_=' xmlns:ds="http://www.w3.org/2000/09/xmldsig#" ', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('eSocial')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='eSocial')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='eSocial', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='eSocial'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='eSocial', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.evtTabEstab is not None:
self.evtTabEstab.export(outfile, level, namespace_, name_='evtTabEstab', pretty_print=pretty_print)
if self.Signature is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sSignature>%s</%sSignature>%s' % ('ds:', self.gds_encode(self.gds_format_string(quote_xml(self.Signature), input_name='Signature')), 'ds:', eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'evtTabEstab':
obj_ = evtTabEstab.factory()
obj_.build(child_)
self.evtTabEstab = obj_
obj_.original_tagname_ = 'evtTabEstab'
elif nodeName_ == 'Signature':
Signature_ = child_.text
Signature_ = self.gds_validate_string(Signature_, node, 'Signature')
self.Signature = Signature_
# end class eSocial
class evtTabEstab(GeneratedsSuper):
"""Evento tabela de estabelecimentos, obras de construção civil ou
Órgãos Públicos"""
subclass = None
superclass = None
def __init__(self, Id=None, ideEvento=None, ideEmpregador=None, infoEstab=None):
self.original_tagname_ = None
self.Id = _cast(None, Id)
self.ideEvento = ideEvento
self.ideEmpregador = ideEmpregador
self.infoEstab = infoEstab
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, evtTabEstab)
if subclass is not None:
return subclass(*args_, **kwargs_)
if evtTabEstab.subclass:
return evtTabEstab.subclass(*args_, **kwargs_)
else:
return evtTabEstab(*args_, **kwargs_)
factory = staticmethod(factory)
def get_ideEvento(self): return self.ideEvento
def set_ideEvento(self, ideEvento): self.ideEvento = ideEvento
def get_ideEmpregador(self): return self.ideEmpregador
def set_ideEmpregador(self, ideEmpregador): self.ideEmpregador = ideEmpregador
def get_infoEstab(self): return self.infoEstab
def set_infoEstab(self, infoEstab): self.infoEstab = infoEstab
def get_Id(self): return self.Id
def set_Id(self, Id): self.Id = Id
def hasContent_(self):
if (
self.ideEvento is not None or
self.ideEmpregador is not None or
self.infoEstab is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='evtTabEstab', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('evtTabEstab')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='evtTabEstab')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='evtTabEstab', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='evtTabEstab'):
if self.Id is not None and 'Id' not in already_processed:
already_processed.add('Id')
outfile.write(' Id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.Id), input_name='Id')), ))
def exportChildren(self, outfile, level, namespace_='', name_='evtTabEstab', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.ideEvento is not None:
self.ideEvento.export(outfile, level, namespace_, name_='ideEvento', pretty_print=pretty_print)
if self.ideEmpregador is not None:
self.ideEmpregador.export(outfile, level, namespace_, name_='ideEmpregador', pretty_print=pretty_print)
if self.infoEstab is not None:
self.infoEstab.export(outfile, level, namespace_, name_='infoEstab', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
value = find_attr_value_('Id', node)
if value is not None and 'Id' not in already_processed:
already_processed.add('Id')
self.Id = value
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'ideEvento':
obj_ = TIdeCadastro.factory()
obj_.build(child_)
self.ideEvento = obj_
obj_.original_tagname_ = 'ideEvento'
elif nodeName_ == 'ideEmpregador':
obj_ = TEmpregador.factory()
obj_.build(child_)
self.ideEmpregador = obj_
obj_.original_tagname_ = 'ideEmpregador'
elif nodeName_ == 'infoEstab':
obj_ = infoEstab.factory()
obj_.build(child_)
self.infoEstab = obj_
obj_.original_tagname_ = 'infoEstab'
# end class evtTabEstab
class infoEstab(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self, inclusao=None, alteracao=None, exclusao=None):
self.original_tagname_ = None
self.inclusao = inclusao
self.alteracao = alteracao
self.exclusao = exclusao
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, infoEstab)
if subclass is not None:
return subclass(*args_, **kwargs_)
if infoEstab.subclass:
return infoEstab.subclass(*args_, **kwargs_)
else:
return infoEstab(*args_, **kwargs_)
factory = staticmethod(factory)
def get_inclusao(self): return self.inclusao
def set_inclusao(self, inclusao): self.inclusao = inclusao
def get_alteracao(self): return self.alteracao
def set_alteracao(self, alteracao): self.alteracao = alteracao
def get_exclusao(self): return self.exclusao
def set_exclusao(self, exclusao): self.exclusao = exclusao
def hasContent_(self):
if (
self.inclusao is not None or
self.alteracao is not None or
self.exclusao is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='infoEstab', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('infoEstab')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='infoEstab')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='infoEstab', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='infoEstab'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='infoEstab', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.inclusao is not None:
self.inclusao.export(outfile, level, namespace_, name_='inclusao', pretty_print=pretty_print)
if self.alteracao is not None:
self.alteracao.export(outfile, level, namespace_, name_='alteracao', pretty_print=pretty_print)
if self.exclusao is not None:
self.exclusao.export(outfile, level, namespace_, name_='exclusao', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'inclusao':
obj_ = inclusao.factory()
obj_.build(child_)
self.inclusao = obj_
obj_.original_tagname_ = 'inclusao'
elif nodeName_ == 'alteracao':
obj_ = alteracao.factory()
obj_.build(child_)
self.alteracao = obj_
obj_.original_tagname_ = 'alteracao'
elif nodeName_ == 'exclusao':
obj_ = exclusao.factory()
obj_.build(child_)
self.exclusao = obj_
obj_.original_tagname_ = 'exclusao'
# end class infoEstab
class inclusao(GeneratedsSuper):
"""Inclusão de novas informações"""
subclass = None
superclass = None
def __init__(self, ideEstab=None, dadosEstab=None):
self.original_tagname_ = None
self.ideEstab = ideEstab
self.dadosEstab = dadosEstab
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, inclusao)
if subclass is not None:
return subclass(*args_, **kwargs_)
if inclusao.subclass:
return inclusao.subclass(*args_, **kwargs_)
else:
return inclusao(*args_, **kwargs_)
factory = staticmethod(factory)
def get_ideEstab(self): return self.ideEstab
def set_ideEstab(self, ideEstab): self.ideEstab = ideEstab
def get_dadosEstab(self): return self.dadosEstab
def set_dadosEstab(self, dadosEstab): self.dadosEstab = dadosEstab
def hasContent_(self):
if (
self.ideEstab is not None or
self.dadosEstab is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='inclusao', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('inclusao')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='inclusao')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='inclusao', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='inclusao'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='inclusao', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.ideEstab is not None:
self.ideEstab.export(outfile, level, namespace_, name_='ideEstab', pretty_print=pretty_print)
if self.dadosEstab is not None:
self.dadosEstab.export(outfile, level, namespace_, name_='dadosEstab', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'ideEstab':
obj_ = TIdeEstab.factory()
obj_.build(child_)
self.ideEstab = obj_
obj_.original_tagname_ = 'ideEstab'
elif nodeName_ == 'dadosEstab':
obj_ = TDadosEstab.factory()
obj_.build(child_)
self.dadosEstab = obj_
obj_.original_tagname_ = 'dadosEstab'
# end class inclusao
class alteracao(GeneratedsSuper):
"""Alteração de informações já existentes"""
subclass = None
superclass = None
def __init__(self, ideEstab=None, dadosEstab=None, novaValidade=None):
self.original_tagname_ = None
self.ideEstab = ideEstab
self.dadosEstab = dadosEstab
self.novaValidade = novaValidade
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, alteracao)
if subclass is not None:
return subclass(*args_, **kwargs_)
if alteracao.subclass:
return alteracao.subclass(*args_, **kwargs_)
else:
return alteracao(*args_, **kwargs_)
factory = staticmethod(factory)
def get_ideEstab(self): return self.ideEstab
def set_ideEstab(self, ideEstab): self.ideEstab = ideEstab
def get_dadosEstab(self): return self.dadosEstab
def set_dadosEstab(self, dadosEstab): self.dadosEstab = dadosEstab
def get_novaValidade(self): return self.novaValidade
def set_novaValidade(self, novaValidade): self.novaValidade = novaValidade
def hasContent_(self):
if (
self.ideEstab is not None or
self.dadosEstab is not None or
self.novaValidade is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='alteracao', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('alteracao')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='alteracao')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='alteracao', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='alteracao'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='alteracao', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.ideEstab is not None:
self.ideEstab.export(outfile, level, namespace_, name_='ideEstab', pretty_print=pretty_print)
if self.dadosEstab is not None:
self.dadosEstab.export(outfile, level, namespace_, name_='dadosEstab', pretty_print=pretty_print)
if self.novaValidade is not None:
self.novaValidade.export(outfile, level, namespace_, name_='novaValidade', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'ideEstab':
obj_ = TIdeEstab.factory()
obj_.build(child_)
self.ideEstab = obj_
obj_.original_tagname_ = 'ideEstab'
elif nodeName_ == 'dadosEstab':
obj_ = TDadosEstab.factory()
obj_.build(child_)
self.dadosEstab = obj_
obj_.original_tagname_ = 'dadosEstab'
elif nodeName_ == 'novaValidade':
obj_ = TPeriodoValidade.factory()
obj_.build(child_)
self.novaValidade = obj_
obj_.original_tagname_ = 'novaValidade'
# end class alteracao
class exclusao(GeneratedsSuper):
"""Exclusão de informações"""
subclass = None
superclass = None
def __init__(self, ideEstab=None):
self.original_tagname_ = None
self.ideEstab = ideEstab
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, exclusao)
if subclass is not None:
return subclass(*args_, **kwargs_)
if exclusao.subclass:
return exclusao.subclass(*args_, **kwargs_)
else:
return exclusao(*args_, **kwargs_)
factory = staticmethod(factory)
def get_ideEstab(self): return self.ideEstab
def set_ideEstab(self, ideEstab): self.ideEstab = ideEstab
def hasContent_(self):
if (
self.ideEstab is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='exclusao', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('exclusao')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='exclusao')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='exclusao', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='exclusao'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='exclusao', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.ideEstab is not None:
self.ideEstab.export(outfile, level, namespace_, name_='ideEstab', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'ideEstab':
obj_ = TIdeEstab.factory()
obj_.build(child_)
self.ideEstab = obj_
obj_.original_tagname_ = 'ideEstab'
# end class exclusao
class TIdeCadastro(GeneratedsSuper):
"""Identificação de evento de cadastro/tabelas"""
subclass = None
superclass = None
def __init__(self, tpAmb=None, procEmi=None, verProc=None):
self.original_tagname_ = None
self.tpAmb = tpAmb
self.procEmi = procEmi
self.verProc = verProc
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TIdeCadastro)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TIdeCadastro.subclass:
return TIdeCadastro.subclass(*args_, **kwargs_)
else:
return TIdeCadastro(*args_, **kwargs_)
factory = staticmethod(factory)
def get_tpAmb(self): return self.tpAmb
def set_tpAmb(self, tpAmb): self.tpAmb = tpAmb
def get_procEmi(self): return self.procEmi
def set_procEmi(self, procEmi): self.procEmi = procEmi
def get_verProc(self): return self.verProc
def set_verProc(self, verProc): self.verProc = verProc
def hasContent_(self):
if (
self.tpAmb is not None or
self.procEmi is not None or
self.verProc is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TIdeCadastro', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TIdeCadastro')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TIdeCadastro')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TIdeCadastro', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TIdeCadastro'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TIdeCadastro', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.tpAmb is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpAmb>%s</%stpAmb>%s' % (namespace_, self.gds_format_integer(self.tpAmb, input_name='tpAmb'), namespace_, eol_))
if self.procEmi is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sprocEmi>%s</%sprocEmi>%s' % (namespace_, self.gds_format_integer(self.procEmi, input_name='procEmi'), namespace_, eol_))
if self.verProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sverProc>%s</%sverProc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.verProc), input_name='verProc')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'tpAmb':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpAmb')
self.tpAmb = ival_
elif nodeName_ == 'procEmi':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'procEmi')
self.procEmi = ival_
elif nodeName_ == 'verProc':
verProc_ = child_.text
verProc_ = self.gds_validate_string(verProc_, node, 'verProc')
self.verProc = verProc_
# end class TIdeCadastro
class tpAmb(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, tpAmb)
if subclass is not None:
return subclass(*args_, **kwargs_)
if tpAmb.subclass:
return tpAmb.subclass(*args_, **kwargs_)
else:
return tpAmb(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='tpAmb', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpAmb')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpAmb')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tpAmb', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpAmb'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='tpAmb', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class tpAmb
class procEmi(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, procEmi)
if subclass is not None:
return subclass(*args_, **kwargs_)
if procEmi.subclass:
return procEmi.subclass(*args_, **kwargs_)
else:
return procEmi(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='procEmi', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('procEmi')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='procEmi')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='procEmi', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='procEmi'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='procEmi', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class procEmi
class verProc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, verProc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if verProc.subclass:
return verProc.subclass(*args_, **kwargs_)
else:
return verProc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='verProc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('verProc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='verProc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='verProc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='verProc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='verProc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class verProc
class TEmpregador(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self, tpInsc=None, nrInsc=None):
self.original_tagname_ = None
self.tpInsc = tpInsc
self.nrInsc = nrInsc
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TEmpregador)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TEmpregador.subclass:
return TEmpregador.subclass(*args_, **kwargs_)
else:
return TEmpregador(*args_, **kwargs_)
factory = staticmethod(factory)
def get_tpInsc(self): return self.tpInsc
def set_tpInsc(self, tpInsc): self.tpInsc = tpInsc
def get_nrInsc(self): return self.nrInsc
def set_nrInsc(self, nrInsc): self.nrInsc = nrInsc
def hasContent_(self):
if (
self.tpInsc is not None or
self.nrInsc is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TEmpregador', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TEmpregador')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TEmpregador')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TEmpregador', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TEmpregador'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TEmpregador', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.tpInsc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpInsc>%s</%stpInsc>%s' % (namespace_, self.gds_format_integer(self.tpInsc, input_name='tpInsc'), namespace_, eol_))
if self.nrInsc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrInsc>%s</%snrInsc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrInsc), input_name='nrInsc')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'tpInsc':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpInsc')
self.tpInsc = ival_
elif nodeName_ == 'nrInsc':
nrInsc_ = child_.text
nrInsc_ = self.gds_validate_string(nrInsc_, node, 'nrInsc')
self.nrInsc = nrInsc_
# end class TEmpregador
class tpInsc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, tpInsc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if tpInsc.subclass:
return tpInsc.subclass(*args_, **kwargs_)
else:
return tpInsc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='tpInsc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpInsc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpInsc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tpInsc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpInsc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='tpInsc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class tpInsc
class nrInsc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, nrInsc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if nrInsc.subclass:
return nrInsc.subclass(*args_, **kwargs_)
else:
return nrInsc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='nrInsc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('nrInsc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='nrInsc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='nrInsc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='nrInsc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='nrInsc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class nrInsc
class TIdeEstab(GeneratedsSuper):
"""Identificação do estabelecimento, obra ou órgão público e validade
das informações"""
subclass = None
superclass = None
def __init__(self, tpInsc=None, nrInsc=None, iniValid=None, fimValid=None):
self.original_tagname_ = None
self.tpInsc = tpInsc
self.nrInsc = nrInsc
self.iniValid = iniValid
self.fimValid = fimValid
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TIdeEstab)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TIdeEstab.subclass:
return TIdeEstab.subclass(*args_, **kwargs_)
else:
return TIdeEstab(*args_, **kwargs_)
factory = staticmethod(factory)
def get_tpInsc(self): return self.tpInsc
def set_tpInsc(self, tpInsc): self.tpInsc = tpInsc
def get_nrInsc(self): return self.nrInsc
def set_nrInsc(self, nrInsc): self.nrInsc = nrInsc
def get_iniValid(self): return self.iniValid
def set_iniValid(self, iniValid): self.iniValid = iniValid
def get_fimValid(self): return self.fimValid
def set_fimValid(self, fimValid): self.fimValid = fimValid
def hasContent_(self):
if (
self.tpInsc is not None or
self.nrInsc is not None or
self.iniValid is not None or
self.fimValid is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TIdeEstab', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TIdeEstab')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TIdeEstab')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TIdeEstab', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TIdeEstab'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TIdeEstab', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.tpInsc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpInsc>%s</%stpInsc>%s' % (namespace_, self.gds_format_integer(self.tpInsc, input_name='tpInsc'), namespace_, eol_))
if self.nrInsc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrInsc>%s</%snrInsc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrInsc), input_name='nrInsc')), namespace_, eol_))
if self.iniValid is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%siniValid>%s</%siniValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.iniValid), input_name='iniValid')), namespace_, eol_))
if self.fimValid is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sfimValid>%s</%sfimValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.fimValid), input_name='fimValid')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'tpInsc':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpInsc')
self.tpInsc = ival_
elif nodeName_ == 'nrInsc':
nrInsc_ = child_.text
nrInsc_ = self.gds_validate_string(nrInsc_, node, 'nrInsc')
self.nrInsc = nrInsc_
elif nodeName_ == 'iniValid':
iniValid_ = child_.text
iniValid_ = self.gds_validate_string(iniValid_, node, 'iniValid')
self.iniValid = iniValid_
elif nodeName_ == 'fimValid':
fimValid_ = child_.text
fimValid_ = self.gds_validate_string(fimValid_, node, 'fimValid')
self.fimValid = fimValid_
# end class TIdeEstab
class iniValid(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, iniValid)
if subclass is not None:
return subclass(*args_, **kwargs_)
if iniValid.subclass:
return iniValid.subclass(*args_, **kwargs_)
else:
return iniValid(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='iniValid', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('iniValid')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='iniValid')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='iniValid', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='iniValid'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='iniValid', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class iniValid
class fimValid(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, fimValid)
if subclass is not None:
return subclass(*args_, **kwargs_)
if fimValid.subclass:
return fimValid.subclass(*args_, **kwargs_)
else:
return fimValid(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='fimValid', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('fimValid')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='fimValid')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='fimValid', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='fimValid'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='fimValid', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class fimValid
class TDadosEstab(GeneratedsSuper):
"""Detalhamento das informações do estabelecimento/obra"""
subclass = None
superclass = None
def __init__(self, cnaePrep=None, aliqGilrat=None, infoCaepf=None, infoObra=None, infoTrab=None):
self.original_tagname_ = None
self.cnaePrep = cnaePrep
self.aliqGilrat = aliqGilrat
self.infoCaepf = infoCaepf
self.infoObra = infoObra
self.infoTrab = infoTrab
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TDadosEstab)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TDadosEstab.subclass:
return TDadosEstab.subclass(*args_, **kwargs_)
else:
return TDadosEstab(*args_, **kwargs_)
factory = staticmethod(factory)
def get_cnaePrep(self): return self.cnaePrep
def set_cnaePrep(self, cnaePrep): self.cnaePrep = cnaePrep
def get_aliqGilrat(self): return self.aliqGilrat
def set_aliqGilrat(self, aliqGilrat): self.aliqGilrat = aliqGilrat
def get_infoCaepf(self): return self.infoCaepf
def set_infoCaepf(self, infoCaepf): self.infoCaepf = infoCaepf
def get_infoObra(self): return self.infoObra
def set_infoObra(self, infoObra): self.infoObra = infoObra
def get_infoTrab(self): return self.infoTrab
def set_infoTrab(self, infoTrab): self.infoTrab = infoTrab
def hasContent_(self):
if (
self.cnaePrep is not None or
self.aliqGilrat is not None or
self.infoCaepf is not None or
self.infoObra is not None or
self.infoTrab is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TDadosEstab', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TDadosEstab')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TDadosEstab')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TDadosEstab', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TDadosEstab'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TDadosEstab', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.cnaePrep is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scnaePrep>%s</%scnaePrep>%s' % (namespace_, self.gds_format_integer(self.cnaePrep, input_name='cnaePrep'), namespace_, eol_))
if self.aliqGilrat is not None:
self.aliqGilrat.export(outfile, level, namespace_, name_='aliqGilrat', pretty_print=pretty_print)
if self.infoCaepf is not None:
self.infoCaepf.export(outfile, level, namespace_, name_='infoCaepf', pretty_print=pretty_print)
if self.infoObra is not None:
self.infoObra.export(outfile, level, namespace_, name_='infoObra', pretty_print=pretty_print)
if self.infoTrab is not None:
self.infoTrab.export(outfile, level, namespace_, name_='infoTrab', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'cnaePrep':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'cnaePrep')
self.cnaePrep = ival_
elif nodeName_ == 'aliqGilrat':
obj_ = aliqGilrat.factory()
obj_.build(child_)
self.aliqGilrat = obj_
obj_.original_tagname_ = 'aliqGilrat'
elif nodeName_ == 'infoCaepf':
obj_ = infoCaepf.factory()
obj_.build(child_)
self.infoCaepf = obj_
obj_.original_tagname_ = 'infoCaepf'
elif nodeName_ == 'infoObra':
obj_ = infoObra.factory()
obj_.build(child_)
self.infoObra = obj_
obj_.original_tagname_ = 'infoObra'
elif nodeName_ == 'infoTrab':
obj_ = infoTrab.factory()
obj_.build(child_)
self.infoTrab = obj_
obj_.original_tagname_ = 'infoTrab'
# end class TDadosEstab
class cnaePrep(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, cnaePrep)
if subclass is not None:
return subclass(*args_, **kwargs_)
if cnaePrep.subclass:
return cnaePrep.subclass(*args_, **kwargs_)
else:
return cnaePrep(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='cnaePrep', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('cnaePrep')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='cnaePrep')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='cnaePrep', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='cnaePrep'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='cnaePrep', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class cnaePrep
class aliqGilrat(GeneratedsSuper):
"""Informações de Apuração da alíquota Gilrat do Estabelecimento"""
subclass = None
superclass = None
def __init__(self, aliqRat=None, fap=None, aliqRatAjust=None, procAdmJudRat=None, procAdmJudFap=None):
self.original_tagname_ = None
self.aliqRat = aliqRat
self.fap = fap
self.aliqRatAjust = aliqRatAjust
self.procAdmJudRat = procAdmJudRat
self.procAdmJudFap = procAdmJudFap
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, aliqGilrat)
if subclass is not None:
return subclass(*args_, **kwargs_)
if aliqGilrat.subclass:
return aliqGilrat.subclass(*args_, **kwargs_)
else:
return aliqGilrat(*args_, **kwargs_)
factory = staticmethod(factory)
def get_aliqRat(self): return self.aliqRat
def set_aliqRat(self, aliqRat): self.aliqRat = aliqRat
def get_fap(self): return self.fap
def set_fap(self, fap): self.fap = fap
def get_aliqRatAjust(self): return self.aliqRatAjust
def set_aliqRatAjust(self, aliqRatAjust): self.aliqRatAjust = aliqRatAjust
def get_procAdmJudRat(self): return self.procAdmJudRat
def set_procAdmJudRat(self, procAdmJudRat): self.procAdmJudRat = procAdmJudRat
def get_procAdmJudFap(self): return self.procAdmJudFap
def set_procAdmJudFap(self, procAdmJudFap): self.procAdmJudFap = procAdmJudFap
def hasContent_(self):
if (
self.aliqRat is not None or
self.fap is not None or
self.aliqRatAjust is not None or
self.procAdmJudRat is not None or
self.procAdmJudFap is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='aliqGilrat', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('aliqGilrat')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='aliqGilrat')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='aliqGilrat', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='aliqGilrat'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='aliqGilrat', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.aliqRat is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%saliqRat>%s</%saliqRat>%s' % (namespace_, self.gds_format_integer(self.aliqRat, input_name='aliqRat'), namespace_, eol_))
if self.fap is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sfap>%s</%sfap>%s' % (namespace_, self.gds_format_float(self.fap, input_name='fap'), namespace_, eol_))
if self.aliqRatAjust is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%saliqRatAjust>%s</%saliqRatAjust>%s' % (namespace_, self.gds_format_float(self.aliqRatAjust, input_name='aliqRatAjust'), namespace_, eol_))
if self.procAdmJudRat is not None:
self.procAdmJudRat.export(outfile, level, namespace_, name_='procAdmJudRat', pretty_print=pretty_print)
if self.procAdmJudFap is not None:
self.procAdmJudFap.export(outfile, level, namespace_, name_='procAdmJudFap', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'aliqRat':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
if ival_ < 0:
raise_parse_error(child_, 'requires nonNegativeInteger')
ival_ = self.gds_validate_integer(ival_, node, 'aliqRat')
self.aliqRat = ival_
elif nodeName_ == 'fap':
sval_ = child_.text
try:
fval_ = float(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires float or double: %s' % exp)
fval_ = self.gds_validate_float(fval_, node, 'fap')
self.fap = fval_
elif nodeName_ == 'aliqRatAjust':
sval_ = child_.text
try:
fval_ = float(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires float or double: %s' % exp)
fval_ = self.gds_validate_float(fval_, node, 'aliqRatAjust')
self.aliqRatAjust = fval_
elif nodeName_ == 'procAdmJudRat':
obj_ = procAdmJudRat.factory()
obj_.build(child_)
self.procAdmJudRat = obj_
obj_.original_tagname_ = 'procAdmJudRat'
elif nodeName_ == 'procAdmJudFap':
obj_ = procAdmJudFap.factory()
obj_.build(child_)
self.procAdmJudFap = obj_
obj_.original_tagname_ = 'procAdmJudFap'
# end class aliqGilrat
class aliqRat(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, aliqRat)
if subclass is not None:
return subclass(*args_, **kwargs_)
if aliqRat.subclass:
return aliqRat.subclass(*args_, **kwargs_)
else:
return aliqRat(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='aliqRat', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('aliqRat')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='aliqRat')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='aliqRat', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='aliqRat'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='aliqRat', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class aliqRat
class fap(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, fap)
if subclass is not None:
return subclass(*args_, **kwargs_)
if fap.subclass:
return fap.subclass(*args_, **kwargs_)
else:
return fap(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='fap', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('fap')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='fap')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='fap', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='fap'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='fap', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class fap
class aliqRatAjust(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, aliqRatAjust)
if subclass is not None:
return subclass(*args_, **kwargs_)
if aliqRatAjust.subclass:
return aliqRatAjust.subclass(*args_, **kwargs_)
else:
return aliqRatAjust(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='aliqRatAjust', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('aliqRatAjust')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='aliqRatAjust')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='aliqRatAjust', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='aliqRatAjust'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='aliqRatAjust', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class aliqRatAjust
class procAdmJudRat(GeneratedsSuper):
"""Registro que identifica, em caso de existência, o processo
administrativo ou judicial em que houve decisão/sentença
favorável ao contribuinte modificando a alíquota RAT da empresa."""
subclass = None
superclass = None
def __init__(self, tpProc=None, nrProc=None, codSusp=None):
self.original_tagname_ = None
self.tpProc = tpProc
self.nrProc = nrProc
self.codSusp = codSusp
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, procAdmJudRat)
if subclass is not None:
return subclass(*args_, **kwargs_)
if procAdmJudRat.subclass:
return procAdmJudRat.subclass(*args_, **kwargs_)
else:
return procAdmJudRat(*args_, **kwargs_)
factory = staticmethod(factory)
def get_tpProc(self): return self.tpProc
def set_tpProc(self, tpProc): self.tpProc = tpProc
def get_nrProc(self): return self.nrProc
def set_nrProc(self, nrProc): self.nrProc = nrProc
def get_codSusp(self): return self.codSusp
def set_codSusp(self, codSusp): self.codSusp = codSusp
def hasContent_(self):
if (
self.tpProc is not None or
self.nrProc is not None or
self.codSusp is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='procAdmJudRat', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('procAdmJudRat')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='procAdmJudRat')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='procAdmJudRat', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='procAdmJudRat'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='procAdmJudRat', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.tpProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpProc>%s</%stpProc>%s' % (namespace_, self.gds_format_integer(self.tpProc, input_name='tpProc'), namespace_, eol_))
if self.nrProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrProc>%s</%snrProc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrProc), input_name='nrProc')), namespace_, eol_))
if self.codSusp is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodSusp>%s</%scodSusp>%s' % (namespace_, self.gds_format_integer(self.codSusp, input_name='codSusp'), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'tpProc':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpProc')
self.tpProc = ival_
elif nodeName_ == 'nrProc':
nrProc_ = child_.text
nrProc_ = self.gds_validate_string(nrProc_, node, 'nrProc')
self.nrProc = nrProc_
elif nodeName_ == 'codSusp':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'codSusp')
self.codSusp = ival_
# end class procAdmJudRat
class tpProc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, tpProc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if tpProc.subclass:
return tpProc.subclass(*args_, **kwargs_)
else:
return tpProc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='tpProc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpProc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpProc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tpProc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpProc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='tpProc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class tpProc
class nrProc(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, nrProc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if nrProc.subclass:
return nrProc.subclass(*args_, **kwargs_)
else:
return nrProc(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='nrProc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('nrProc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='nrProc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='nrProc', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='nrProc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='nrProc', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class nrProc
class codSusp(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, codSusp)
if subclass is not None:
return subclass(*args_, **kwargs_)
if codSusp.subclass:
return codSusp.subclass(*args_, **kwargs_)
else:
return codSusp(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='codSusp', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('codSusp')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='codSusp')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='codSusp', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='codSusp'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='codSusp', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class codSusp
class procAdmJudFap(GeneratedsSuper):
"""Registro que identifica, em caso de existência, o processo
administrativo/judicial em que houve decisão ou sentença
favorável ao contribuinte suspendendo ou alterando a alíquota
FAP aplicável ao contribuinte."""
subclass = None
superclass = None
def __init__(self, tpProc=None, nrProc=None, codSusp=None):
self.original_tagname_ = None
self.tpProc = tpProc
self.nrProc = nrProc
self.codSusp = codSusp
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, procAdmJudFap)
if subclass is not None:
return subclass(*args_, **kwargs_)
if procAdmJudFap.subclass:
return procAdmJudFap.subclass(*args_, **kwargs_)
else:
return procAdmJudFap(*args_, **kwargs_)
factory = staticmethod(factory)
def get_tpProc(self): return self.tpProc
def set_tpProc(self, tpProc): self.tpProc = tpProc
def get_nrProc(self): return self.nrProc
def set_nrProc(self, nrProc): self.nrProc = nrProc
def get_codSusp(self): return self.codSusp
def set_codSusp(self, codSusp): self.codSusp = codSusp
def hasContent_(self):
if (
self.tpProc is not None or
self.nrProc is not None or
self.codSusp is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='procAdmJudFap', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('procAdmJudFap')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='procAdmJudFap')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='procAdmJudFap', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='procAdmJudFap'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='procAdmJudFap', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.tpProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpProc>%s</%stpProc>%s' % (namespace_, self.gds_format_integer(self.tpProc, input_name='tpProc'), namespace_, eol_))
if self.nrProc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrProc>%s</%snrProc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrProc), input_name='nrProc')), namespace_, eol_))
if self.codSusp is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scodSusp>%s</%scodSusp>%s' % (namespace_, self.gds_format_integer(self.codSusp, input_name='codSusp'), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'tpProc':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpProc')
self.tpProc = ival_
elif nodeName_ == 'nrProc':
nrProc_ = child_.text
nrProc_ = self.gds_validate_string(nrProc_, node, 'nrProc')
self.nrProc = nrProc_
elif nodeName_ == 'codSusp':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'codSusp')
self.codSusp = ival_
# end class procAdmJudFap
class infoCaepf(GeneratedsSuper):
"""Informações relativas ao Cadastro da Atividade Econômica da Pessoa
Física - CAEPF."""
subclass = None
superclass = None
def __init__(self, tpCaepf=None):
self.original_tagname_ = None
self.tpCaepf = tpCaepf
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, infoCaepf)
if subclass is not None:
return subclass(*args_, **kwargs_)
if infoCaepf.subclass:
return infoCaepf.subclass(*args_, **kwargs_)
else:
return infoCaepf(*args_, **kwargs_)
factory = staticmethod(factory)
def get_tpCaepf(self): return self.tpCaepf
def set_tpCaepf(self, tpCaepf): self.tpCaepf = tpCaepf
def hasContent_(self):
if (
self.tpCaepf is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='infoCaepf', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('infoCaepf')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='infoCaepf')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='infoCaepf', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='infoCaepf'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='infoCaepf', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.tpCaepf is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%stpCaepf>%s</%stpCaepf>%s' % (namespace_, self.gds_format_integer(self.tpCaepf, input_name='tpCaepf'), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'tpCaepf':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'tpCaepf')
self.tpCaepf = ival_
# end class infoCaepf
class tpCaepf(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, tpCaepf)
if subclass is not None:
return subclass(*args_, **kwargs_)
if tpCaepf.subclass:
return tpCaepf.subclass(*args_, **kwargs_)
else:
return tpCaepf(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='tpCaepf', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('tpCaepf')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tpCaepf')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tpCaepf', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='tpCaepf'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='tpCaepf', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class tpCaepf
class infoObra(GeneratedsSuper):
"""Registro preenchido exclusivamente por empresa construtora
enquadrada nos Arts. 7 a 9 da Lei 12.546/2011, relacionando os
estabelecimentos inscritos no CNO, para indicar a substituição
ou não da contribuição patronal incidente sobre a remuneração
dos trabalhadores de obra de construção civil."""
subclass = None
superclass = None
def __init__(self, indSubstPatrObra=None):
self.original_tagname_ = None
self.indSubstPatrObra = indSubstPatrObra
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, infoObra)
if subclass is not None:
return subclass(*args_, **kwargs_)
if infoObra.subclass:
return infoObra.subclass(*args_, **kwargs_)
else:
return infoObra(*args_, **kwargs_)
factory = staticmethod(factory)
def get_indSubstPatrObra(self): return self.indSubstPatrObra
def set_indSubstPatrObra(self, indSubstPatrObra): self.indSubstPatrObra = indSubstPatrObra
def hasContent_(self):
if (
self.indSubstPatrObra is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='infoObra', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('infoObra')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='infoObra')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='infoObra', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='infoObra'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='infoObra', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.indSubstPatrObra is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sindSubstPatrObra>%s</%sindSubstPatrObra>%s' % (namespace_, self.gds_format_integer(self.indSubstPatrObra, input_name='indSubstPatrObra'), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'indSubstPatrObra':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'indSubstPatrObra')
self.indSubstPatrObra = ival_
# end class infoObra
class indSubstPatrObra(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, indSubstPatrObra)
if subclass is not None:
return subclass(*args_, **kwargs_)
if indSubstPatrObra.subclass:
return indSubstPatrObra.subclass(*args_, **kwargs_)
else:
return indSubstPatrObra(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='indSubstPatrObra', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('indSubstPatrObra')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='indSubstPatrObra')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='indSubstPatrObra', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='indSubstPatrObra'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='indSubstPatrObra', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class indSubstPatrObra
class infoTrab(GeneratedsSuper):
"""Informações Trabalhistas relativas ao estabelecimento"""
subclass = None
superclass = None
def __init__(self, regPt=None, infoApr=None, infoPCD=None):
self.original_tagname_ = None
self.regPt = regPt
self.infoApr = infoApr
self.infoPCD = infoPCD
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, infoTrab)
if subclass is not None:
return subclass(*args_, **kwargs_)
if infoTrab.subclass:
return infoTrab.subclass(*args_, **kwargs_)
else:
return infoTrab(*args_, **kwargs_)
factory = staticmethod(factory)
def get_regPt(self): return self.regPt
def set_regPt(self, regPt): self.regPt = regPt
def get_infoApr(self): return self.infoApr
def set_infoApr(self, infoApr): self.infoApr = infoApr
def get_infoPCD(self): return self.infoPCD
def set_infoPCD(self, infoPCD): self.infoPCD = infoPCD
def hasContent_(self):
if (
self.regPt is not None or
self.infoApr is not None or
self.infoPCD is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='infoTrab', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('infoTrab')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='infoTrab')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='infoTrab', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='infoTrab'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='infoTrab', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.regPt is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sregPt>%s</%sregPt>%s' % (namespace_, self.gds_format_integer(self.regPt, input_name='regPt'), namespace_, eol_))
if self.infoApr is not None:
self.infoApr.export(outfile, level, namespace_, name_='infoApr', pretty_print=pretty_print)
if self.infoPCD is not None:
self.infoPCD.export(outfile, level, namespace_, name_='infoPCD', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'regPt':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'regPt')
self.regPt = ival_
elif nodeName_ == 'infoApr':
obj_ = infoApr.factory()
obj_.build(child_)
self.infoApr = obj_
obj_.original_tagname_ = 'infoApr'
elif nodeName_ == 'infoPCD':
obj_ = infoPCD.factory()
obj_.build(child_)
self.infoPCD = obj_
obj_.original_tagname_ = 'infoPCD'
# end class infoTrab
class regPt(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, regPt)
if subclass is not None:
return subclass(*args_, **kwargs_)
if regPt.subclass:
return regPt.subclass(*args_, **kwargs_)
else:
return regPt(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='regPt', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('regPt')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='regPt')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='regPt', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='regPt'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='regPt', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class regPt
class infoApr(GeneratedsSuper):
"""Informações relacionadas à contratação de aprendiz"""
subclass = None
superclass = None
def __init__(self, contApr=None, nrProcJud=None, contEntEd=None, infoEntEduc=None):
self.original_tagname_ = None
self.contApr = contApr
self.nrProcJud = nrProcJud
self.contEntEd = contEntEd
if infoEntEduc is None:
self.infoEntEduc = []
else:
self.infoEntEduc = infoEntEduc
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, infoApr)
if subclass is not None:
return subclass(*args_, **kwargs_)
if infoApr.subclass:
return infoApr.subclass(*args_, **kwargs_)
else:
return infoApr(*args_, **kwargs_)
factory = staticmethod(factory)
def get_contApr(self): return self.contApr
def set_contApr(self, contApr): self.contApr = contApr
def get_nrProcJud(self): return self.nrProcJud
def set_nrProcJud(self, nrProcJud): self.nrProcJud = nrProcJud
def get_contEntEd(self): return self.contEntEd
def set_contEntEd(self, contEntEd): self.contEntEd = contEntEd
def get_infoEntEduc(self): return self.infoEntEduc
def set_infoEntEduc(self, infoEntEduc): self.infoEntEduc = infoEntEduc
def add_infoEntEduc(self, value): self.infoEntEduc.append(value)
def insert_infoEntEduc_at(self, index, value): self.infoEntEduc.insert(index, value)
def replace_infoEntEduc_at(self, index, value): self.infoEntEduc[index] = value
def hasContent_(self):
if (
self.contApr is not None or
self.nrProcJud is not None or
self.contEntEd is not None or
self.infoEntEduc
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='infoApr', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('infoApr')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='infoApr')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='infoApr', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='infoApr'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='infoApr', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.contApr is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scontApr>%s</%scontApr>%s' % (namespace_, self.gds_format_integer(self.contApr, input_name='contApr'), namespace_, eol_))
if self.nrProcJud is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrProcJud>%s</%snrProcJud>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrProcJud), input_name='nrProcJud')), namespace_, eol_))
if self.contEntEd is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scontEntEd>%s</%scontEntEd>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.contEntEd), input_name='contEntEd')), namespace_, eol_))
for infoEntEduc_ in self.infoEntEduc:
infoEntEduc_.export(outfile, level, namespace_, name_='infoEntEduc', pretty_print=pretty_print)
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'contApr':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'contApr')
self.contApr = ival_
elif nodeName_ == 'nrProcJud':
nrProcJud_ = child_.text
nrProcJud_ = self.gds_validate_string(nrProcJud_, node, 'nrProcJud')
self.nrProcJud = nrProcJud_
elif nodeName_ == 'contEntEd':
contEntEd_ = child_.text
contEntEd_ = self.gds_validate_string(contEntEd_, node, 'contEntEd')
self.contEntEd = contEntEd_
elif nodeName_ == 'infoEntEduc':
obj_ = infoEntEduc.factory()
obj_.build(child_)
self.infoEntEduc.append(obj_)
obj_.original_tagname_ = 'infoEntEduc'
# end class infoApr
class contApr(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, contApr)
if subclass is not None:
return subclass(*args_, **kwargs_)
if contApr.subclass:
return contApr.subclass(*args_, **kwargs_)
else:
return contApr(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='contApr', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('contApr')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='contApr')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='contApr', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='contApr'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='contApr', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class contApr
class nrProcJud(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, nrProcJud)
if subclass is not None:
return subclass(*args_, **kwargs_)
if nrProcJud.subclass:
return nrProcJud.subclass(*args_, **kwargs_)
else:
return nrProcJud(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='nrProcJud', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('nrProcJud')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='nrProcJud')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='nrProcJud', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='nrProcJud'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='nrProcJud', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class nrProcJud
class contEntEd(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, contEntEd)
if subclass is not None:
return subclass(*args_, **kwargs_)
if contEntEd.subclass:
return contEntEd.subclass(*args_, **kwargs_)
else:
return contEntEd(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='contEntEd', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('contEntEd')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='contEntEd')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='contEntEd', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='contEntEd'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='contEntEd', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class contEntEd
class infoEntEduc(GeneratedsSuper):
"""Identificação da(s) entidade(s) educativa(s) ou de prática
desportiva"""
subclass = None
superclass = None
def __init__(self, nrInsc=None):
self.original_tagname_ = None
self.nrInsc = nrInsc
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, infoEntEduc)
if subclass is not None:
return subclass(*args_, **kwargs_)
if infoEntEduc.subclass:
return infoEntEduc.subclass(*args_, **kwargs_)
else:
return infoEntEduc(*args_, **kwargs_)
factory = staticmethod(factory)
def get_nrInsc(self): return self.nrInsc
def set_nrInsc(self, nrInsc): self.nrInsc = nrInsc
def hasContent_(self):
if (
self.nrInsc is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='infoEntEduc', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('infoEntEduc')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='infoEntEduc')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='infoEntEduc', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='infoEntEduc'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='infoEntEduc', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.nrInsc is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrInsc>%s</%snrInsc>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrInsc), input_name='nrInsc')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'nrInsc':
nrInsc_ = child_.text
nrInsc_ = self.gds_validate_string(nrInsc_, node, 'nrInsc')
self.nrInsc = nrInsc_
# end class infoEntEduc
class infoPCD(GeneratedsSuper):
"""Informações sobre a contratação de pessoa com deficiência (PCD).
Essa informação deve ser prestada apenas no estabelecimento
"Matriz"."""
subclass = None
superclass = None
def __init__(self, contPCD=None, nrProcJud=None):
self.original_tagname_ = None
self.contPCD = contPCD
self.nrProcJud = nrProcJud
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, infoPCD)
if subclass is not None:
return subclass(*args_, **kwargs_)
if infoPCD.subclass:
return infoPCD.subclass(*args_, **kwargs_)
else:
return infoPCD(*args_, **kwargs_)
factory = staticmethod(factory)
def get_contPCD(self): return self.contPCD
def set_contPCD(self, contPCD): self.contPCD = contPCD
def get_nrProcJud(self): return self.nrProcJud
def set_nrProcJud(self, nrProcJud): self.nrProcJud = nrProcJud
def hasContent_(self):
if (
self.contPCD is not None or
self.nrProcJud is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='infoPCD', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('infoPCD')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='infoPCD')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='infoPCD', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='infoPCD'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='infoPCD', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.contPCD is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%scontPCD>%s</%scontPCD>%s' % (namespace_, self.gds_format_integer(self.contPCD, input_name='contPCD'), namespace_, eol_))
if self.nrProcJud is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%snrProcJud>%s</%snrProcJud>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.nrProcJud), input_name='nrProcJud')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'contPCD':
sval_ = child_.text
try:
ival_ = int(sval_)
except (TypeError, ValueError) as exp:
raise_parse_error(child_, 'requires integer: %s' % exp)
ival_ = self.gds_validate_integer(ival_, node, 'contPCD')
self.contPCD = ival_
elif nodeName_ == 'nrProcJud':
nrProcJud_ = child_.text
nrProcJud_ = self.gds_validate_string(nrProcJud_, node, 'nrProcJud')
self.nrProcJud = nrProcJud_
# end class infoPCD
class contPCD(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self):
self.original_tagname_ = None
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, contPCD)
if subclass is not None:
return subclass(*args_, **kwargs_)
if contPCD.subclass:
return contPCD.subclass(*args_, **kwargs_)
else:
return contPCD(*args_, **kwargs_)
factory = staticmethod(factory)
def hasContent_(self):
if (
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='contPCD', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('contPCD')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='contPCD')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='contPCD', pretty_print=pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='contPCD'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='contPCD', fromsubclass_=False, pretty_print=True):
pass
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
pass
# end class contPCD
class TPeriodoValidade(GeneratedsSuper):
subclass = None
superclass = None
def __init__(self, iniValid=None, fimValid=None):
self.original_tagname_ = None
self.iniValid = iniValid
self.fimValid = fimValid
def factory(*args_, **kwargs_):
if CurrentSubclassModule_ is not None:
subclass = getSubclassFromModule_(
CurrentSubclassModule_, TPeriodoValidade)
if subclass is not None:
return subclass(*args_, **kwargs_)
if TPeriodoValidade.subclass:
return TPeriodoValidade.subclass(*args_, **kwargs_)
else:
return TPeriodoValidade(*args_, **kwargs_)
factory = staticmethod(factory)
def get_iniValid(self): return self.iniValid
def set_iniValid(self, iniValid): self.iniValid = iniValid
def get_fimValid(self): return self.fimValid
def set_fimValid(self, fimValid): self.fimValid = fimValid
def hasContent_(self):
if (
self.iniValid is not None or
self.fimValid is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='TPeriodoValidade', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('TPeriodoValidade')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.original_tagname_ is not None:
name_ = self.original_tagname_
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='TPeriodoValidade')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='TPeriodoValidade', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
outfile.write('/>%s' % (eol_, ))
def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TPeriodoValidade'):
pass
def exportChildren(self, outfile, level, namespace_='', name_='TPeriodoValidade', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
else:
eol_ = ''
if self.iniValid is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%siniValid>%s</%siniValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.iniValid), input_name='iniValid')), namespace_, eol_))
if self.fimValid is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<%sfimValid>%s</%sfimValid>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.fimValid), input_name='fimValid')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
for child in node:
nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
self.buildChildren(child, node, nodeName_)
return self
def buildAttributes(self, node, attrs, already_processed):
pass
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
if nodeName_ == 'iniValid':
iniValid_ = child_.text
iniValid_ = self.gds_validate_string(iniValid_, node, 'iniValid')
self.iniValid = iniValid_
elif nodeName_ == 'fimValid':
fimValid_ = child_.text
fimValid_ = self.gds_validate_string(fimValid_, node, 'fimValid')
self.fimValid = fimValid_
# end class TPeriodoValidade
GDSClassesMapping = {
'dadosEstab': TDadosEstab,
'ideEmpregador': TEmpregador,
'ideEstab': TIdeEstab,
'ideEvento': TIdeCadastro,
'novaValidade': TPeriodoValidade,
}
USAGE_TEXT = """
Usage: python <Parser>.py [ -s ] <in_xml_file>
"""
def usage():
print(USAGE_TEXT)
sys.exit(1)
def get_root_tag(node):
tag = Tag_pattern_.match(node.tag).groups()[-1]
rootClass = GDSClassesMapping.get(tag)
if rootClass is None:
rootClass = globals().get(tag)
return tag, rootClass
def parse(inFileName, silence=False):
parser = None
doc = parsexml_(inFileName, parser)
rootNode = doc.getroot()
rootTag, rootClass = get_root_tag(rootNode)
if rootClass is None:
rootTag = 'eSocial'
rootClass = eSocial
rootObj = rootClass.factory()
rootObj.build(rootNode)
# Enable Python to collect the space used by the DOM.
doc = None
if not silence:
sys.stdout.write('<?xml version="1.0" ?>\n')
rootObj.export(
sys.stdout, 0, name_=rootTag,
namespacedef_='',
pretty_print=True)
return rootObj
def parseEtree(inFileName, silence=False):
parser = None
doc = parsexml_(inFileName, parser)
rootNode = doc.getroot()
rootTag, rootClass = get_root_tag(rootNode)
if rootClass is None:
rootTag = 'eSocial'
rootClass = eSocial
rootObj = rootClass.factory()
rootObj.build(rootNode)
# Enable Python to collect the space used by the DOM.
doc = None
mapping = {}
rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping)
reverse_mapping = rootObj.gds_reverse_node_mapping(mapping)
if not silence:
content = etree_.tostring(
rootElement, pretty_print=True,
xml_declaration=True, encoding="utf-8")
sys.stdout.write(content)
sys.stdout.write('\n')
return rootObj, rootElement, mapping, reverse_mapping
def parseString(inString, silence=False):
if sys.version_info.major == 2:
from StringIO import StringIO as IOBuffer
else:
from io import BytesIO as IOBuffer
parser = None
doc = parsexml_(IOBuffer(inString), parser)
rootNode = doc.getroot()
rootTag, rootClass = get_root_tag(rootNode)
if rootClass is None:
rootTag = 'eSocial'
rootClass = eSocial
rootObj = rootClass.factory()
rootObj.build(rootNode)
# Enable Python to collect the space used by the DOM.
doc = None
if not silence:
sys.stdout.write('<?xml version="1.0" ?>\n')
rootObj.export(
sys.stdout, 0, name_=rootTag,
namespacedef_='')
return rootObj
def parseLiteral(inFileName, silence=False):
parser = None
doc = parsexml_(inFileName, parser)
rootNode = doc.getroot()
rootTag, rootClass = get_root_tag(rootNode)
if rootClass is None:
rootTag = 'eSocial'
rootClass = eSocial
rootObj = rootClass.factory()
rootObj.build(rootNode)
# Enable Python to collect the space used by the DOM.
doc = None
if not silence:
sys.stdout.write('#from evtTabEstab import *\n\n')
sys.stdout.write('import evtTabEstab as model_\n\n')
sys.stdout.write('rootObj = model_.rootClass(\n')
rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
sys.stdout.write(')\n')
return rootObj
def main():
args = sys.argv[1:]
if len(args) == 1:
parse(args[0])
else:
usage()
if __name__ == '__main__':
#import pdb; pdb.set_trace()
main()
__all__ = [
"TDadosEstab",
"TEmpregador",
"TIdeCadastro",
"TIdeEstab",
"TPeriodoValidade",
"eSocial"
]
| 41.924584 | 186 | 0.60928 | 17,844 | 171,220 | 5.577785 | 0.037436 | 0.040671 | 0.025771 | 0.026113 | 0.800593 | 0.764352 | 0.741284 | 0.709384 | 0.684698 | 0.654225 | 0 | 0.003992 | 0.284645 | 171,220 | 4,083 | 187 | 41.934852 | 0.80861 | 0.030423 | 0 | 0.688847 | 1 | 0.000266 | 0.042971 | 0.006086 | 0 | 0 | 0 | 0 | 0 | 1 | 0.150652 | false | 0.033005 | 0.036998 | 0.023689 | 0.321799 | 0.081182 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
420621af0ef9ffc4ac9d85f00c5052c1f9b8114d | 2,193 | py | Python | test/util/fft_test.py | daviswert/gpytorch | b1b546eea573aead6c509c8b23ccf93bd9ce82ec | [
"MIT"
] | 1 | 2021-06-22T11:53:41.000Z | 2021-06-22T11:53:41.000Z | test/util/fft_test.py | daviswert/gpytorch | b1b546eea573aead6c509c8b23ccf93bd9ce82ec | [
"MIT"
] | null | null | null | test/util/fft_test.py | daviswert/gpytorch | b1b546eea573aead6c509c8b23ccf93bd9ce82ec | [
"MIT"
] | null | null | null | import torch
import numpy as np
from gpytorch.utils import fft
def test_fft1_computes_fft_of_1d_input():
d = 8
input = torch.randn(d)
res = fft.fft1(input)
actual = np.fft.fft(input.numpy())
assert(tuple(res.size()) == (5, 2))
res_real = res[:, 0]
res_imag = res[:, 1]
actual_real = torch.from_numpy(actual.real[:5]).float()
actual_imag = torch.from_numpy(actual.imag[:5]).float()
assert torch.norm(res_real - actual_real) < 1e-5
assert torch.norm(res_imag - actual_imag) < 1e-5
def test_fft1_computes_fft_of_nd_input():
d = 8
input = torch.randn(3, 6, d)
res = fft.fft1(input)
actual = np.fft.fft(input.numpy())
assert(tuple(res.size()) == (3, 6, 5, 2))
res_real = res[:, :, :, 0]
res_imag = res[:, :, :, 1]
actual_real = torch.from_numpy(actual.real[:, :, :5]).float()
actual_imag = torch.from_numpy(actual.imag[:, :, :5]).float()
assert torch.norm(res_real - actual_real) < 1e-5
assert torch.norm(res_imag - actual_imag) < 1e-5
def test_fft1_returns_type_of_original_input():
d = 8
input = torch.randn(3, 6, d).double()
res = fft.fft1(input)
assert isinstance(res, torch.DoubleTensor)
def test_ifft1_computes_ifft_of_1d_input():
d = 8
input = torch.randn(d)
res = fft.fft1(input)
recon = fft.ifft1(res)
assert input.size() == recon.size()
assert torch.norm(input - recon) < 1e-5
def test_ifft1_computes_ifft_of_1d_input_with_odd_size():
d = 9
input = torch.randn(d)
res = fft.fft1(input)
recon = fft.ifft1(res, input.size())
assert input.size() == recon.size()
assert torch.norm(input - recon) < 1e-5
def test_ifft1_computes_ifft_of_2d_input():
d = 8
input = torch.randn(6, d)
res = fft.fft1(input)
recon = fft.ifft1(res)
assert input.size() == recon.size()
assert torch.norm(input - recon) < 1e-5
def test_ifft1_returns_type_of_original_input():
d = 8
input = torch.randn(6, d)
res = fft.fft1(input).double()
recon = fft.ifft1(res)
assert input.size() == recon.size()
assert torch.norm(input.double() - recon) < 1e-5
assert isinstance(res, torch.DoubleTensor)
| 25.206897 | 65 | 0.641131 | 339 | 2,193 | 3.955752 | 0.144543 | 0.065623 | 0.089485 | 0.0783 | 0.909769 | 0.856078 | 0.829978 | 0.829978 | 0.806861 | 0.786726 | 0 | 0.037442 | 0.20839 | 2,193 | 86 | 66 | 25.5 | 0.735023 | 0 | 0 | 0.57377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.262295 | 1 | 0.114754 | false | 0 | 0.04918 | 0 | 0.163934 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
424289772a5f1a11e76ce3d9bceb1cff2d49bdd2 | 69,647 | py | Python | src/costmanagement/azext_costmanagement/tests/latest/test_costmanagement_scenario.py | ravithanneeru/azure-cli-extensions | e0de87f3563ae39525370e9912589aac33e7bded | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/costmanagement/azext_costmanagement/tests/latest/test_costmanagement_scenario.py | ravithanneeru/azure-cli-extensions | e0de87f3563ae39525370e9912589aac33e7bded | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/costmanagement/azext_costmanagement/tests/latest/test_costmanagement_scenario.py | ravithanneeru/azure-cli-extensions | e0de87f3563ae39525370e9912589aac33e7bded | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# import os
# import unittest
# from azure.cli.testsdk.scenario_tests import AllowLargeResponse
# from azure.cli.testsdk import ScenarioTest
# from .. import try_manual
# from azure.cli.testsdk import ResourceGroupPreparer
# from azure.cli.testsdk import StorageAccountPreparer
# TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
# @try_manual
# def setup(test, rg):
# pass
# # EXAMPLE: /Exports/put/BillingAccountCreateOrUpdateExport
# @try_manual
# def step__exports_put_billingaccountcreateorupdateexport(test, rg):
# test.cmd('az costmanagement export create '
# '--export-name "{TestExport}" '
# '--definition-type "Usage" '
# '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}'
# '}}}" '
# '--definition-dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="Resourc'
# 'eLocation" columns="PreTaxCost" '
# '--definition-dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation'
# '\\",\\"operator\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":'
# '\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{'
# '\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--definition-dataset-grouping name="SubscriptionName" type="Dimension" '
# '--definition-dataset-grouping name="Environment" type="Tag" '
# '--definition-timeframe "MonthToDate" '
# '--delivery-info-destination container="exports" resource-id="/subscriptions/{subscription_id}/resourceGro'
# 'ups/{rg}/providers/Microsoft.Storage/storageAccounts/{sa}" root-folder-path="ad-hoc" '
# '--schedule-recurrence "Weekly" '
# '--schedule-recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" '
# '--schedule-status "Active" '
# '--scope "providers/Microsoft.Billing/billingAccounts/123456"',
# checks=[])
# # EXAMPLE: /Alerts/get/BillingAccountAlerts
# @try_manual
# def step__alerts_get_billingaccountalerts(test, rg):
# test.cmd('az costmanagement alert list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789"',
# checks=[])
# # EXAMPLE: /Alerts/get/DepartmentAlerts
# @try_manual
# def step__alerts_get_departmentalerts(test, rg):
# test.cmd('az costmanagement alert list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123"',
# checks=[])
# # EXAMPLE: /Alerts/get/EnrollmentAccountAlerts
# @try_manual
# def step__alerts_get_enrollmentaccountalerts(test, rg):
# test.cmd('az costmanagement alert list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Alerts/get/ExternalBillingAccountAlerts
# @try_manual
# def step__alerts_get_externalbillingaccountalerts(test, rg):
# test.cmd('az costmanagement alert list-external '
# '--external-cloud-provider-id "100" '
# '--external-cloud-provider-type "externalBillingAccounts"',
# checks=[])
# # EXAMPLE: /Alerts/get/ExternalSubscriptionAlerts
# @try_manual
# def step__alerts_get_externalsubscriptionalerts(test, rg):
# test.cmd('az costmanagement alert list-external '
# '--external-cloud-provider-id "100" '
# '--external-cloud-provider-type "externalSubscriptions"',
# checks=[])
# # EXAMPLE: /Alerts/get/InvoiceSectionAlerts
# @try_manual
# def step__alerts_get_invoicesectionalerts(test, rg):
# test.cmd('az costmanagement alert list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/987'
# '6"',
# checks=[])
# # EXAMPLE: /Alerts/get/ResourceGroupAlerts
# @try_manual
# def step__alerts_get_resourcegroupalerts(test, rg):
# test.cmd('az costmanagement alert list '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer"',
# checks=[])
# # EXAMPLE: /Alerts/get/SubscriptionAlerts
# @try_manual
# def step__alerts_get_subscriptionalerts(test, rg):
# test.cmd('az costmanagement alert list '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Dimensions/get/BillingAccountDimensionsList-Legacy
# @try_manual
# def step__dimensions_get_billingaccountdimensionslist_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--scope "providers/Microsoft.Billing/billingAccounts/100"',
# checks=[])
# # EXAMPLE: /Dimensions/get/BillingAccountDimensionsList-Modern
# @try_manual
# def step__dimensions_get_billingaccountdimensionslist_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789"',
# checks=[])
# # EXAMPLE: /Dimensions/get/BillingAccountDimensionsListExpandAndTop-Legacy
# @try_manual
# def step__dimensions_get_billingaccountdimensionslistexpandandtop_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/100"',
# checks=[])
# # EXAMPLE: /Dimensions/get/BillingAccountDimensionsListExpandAndTop-Modern
# @try_manual
# def step__dimensions_get_billingaccountdimensionslistexpandandtop_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789"',
# checks=[])
# # EXAMPLE: /Dimensions/get/BillingAccountDimensionsListWithFilter-Legacy
# @try_manual
# def step__dimensions_get_billingaccountdimensionslistwithfilter_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--filter "properties/category eq \'resourceId\'" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/100"',
# checks=[])
# # EXAMPLE: /Dimensions/get/BillingAccountDimensionsListWithFilter-Modern
# @try_manual
# def step__dimensions_get_billingaccountdimensionslistwithfilter_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--filter "properties/category eq \'resourceId\'" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789"',
# checks=[])
# # EXAMPLE: /Dimensions/get/BillingProfileDimensionsList-Modern
# @try_manual
# def step__dimensions_get_billingprofiledimensionslist_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579"',
# checks=[])
# # EXAMPLE: /Dimensions/get/BillingProfileDimensionsListExpandAndTop-Modern
# @try_manual
# def step__dimensions_get_billingprofiledimensionslistexpandandtop_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579"',
# checks=[])
# # EXAMPLE: /Dimensions/get/BillingProfileDimensionsListWithFilter-Modern
# @try_manual
# def step__dimensions_get_billingprofiledimensionslistwithfilter_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--filter "properties/category eq \'resourceId\'" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579"',
# checks=[])
# # EXAMPLE: /Dimensions/get/CustomerDimensionsList-Modern
# @try_manual
# def step__dimensions_get_customerdimensionslist_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678"',
# checks=[])
# # EXAMPLE: /Dimensions/get/CustomerDimensionsListExpandAndTop-Modern
# @try_manual
# def step__dimensions_get_customerdimensionslistexpandandtop_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678"',
# checks=[])
# # EXAMPLE: /Dimensions/get/CustomerDimensionsListWithFilter-Modern
# @try_manual
# def step__dimensions_get_customerdimensionslistwithfilter_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--filter "properties/category eq \'resourceId\'" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678"',
# checks=[])
# # EXAMPLE: /Dimensions/get/DepartmentDimensionsList-Legacy
# @try_manual
# def step__dimensions_get_departmentdimensionslist_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/departments/123"',
# checks=[])
# # EXAMPLE: /Dimensions/get/DepartmentDimensionsListExpandAndTop-Legacy
# @try_manual
# def step__dimensions_get_departmentdimensionslistexpandandtop_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/departments/123"',
# checks=[])
# # EXAMPLE: /Dimensions/get/DepartmentDimensionsListWithFilter-Legacy
# @try_manual
# def step__dimensions_get_departmentdimensionslistwithfilter_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--filter "properties/category eq \'resourceId\'" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/departments/123"',
# checks=[])
# # EXAMPLE: /Dimensions/get/EnrollmentAccountDimensionsList-Legacy
# @try_manual
# def step__dimensions_get_enrollmentaccountdimensionslist_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Dimensions/get/EnrollmentAccountDimensionsListExpandAndTop-Legacy
# @try_manual
# def step__dimensions_get_enrollmentaccountdimensionslistexpandandtop_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Dimensions/get/EnrollmentAccountDimensionsListWithFilter-Legacy
# @try_manual
# def step__dimensions_get_enrollmentaccountdimensionslistwithfilter_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--filter "properties/category eq \'resourceId\'" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Dimensions/get/ExternalBillingAccountDimensionList
# @try_manual
# def step__dimensions_get_externalbillingaccountdimensionlist(test, rg):
# test.cmd('az costmanagement dimension by-external-cloud-provider-type '
# '--external-cloud-provider-id "100" '
# '--external-cloud-provider-type "externalBillingAccounts"',
# checks=[])
# # EXAMPLE: /Dimensions/get/ExternalSubscriptionDimensionList
# @try_manual
# def step__dimensions_get_externalsubscriptiondimensionlist(test, rg):
# test.cmd('az costmanagement dimension by-external-cloud-provider-type '
# '--external-cloud-provider-id "100" '
# '--external-cloud-provider-type "externalSubscriptions"',
# checks=[])
# # EXAMPLE: /Dimensions/get/InvoiceSectionDimensionsList-Modern
# @try_manual
# def step__dimensions_get_invoicesectiondimensionslist_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/987'
# '6"',
# checks=[])
# # EXAMPLE: /Dimensions/get/InvoiceSectionDimensionsListExpandAndTop-Modern
# @try_manual
# def step__dimensions_get_invoicesectiondimensionslistexpandandtop_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/987'
# '6"',
# checks=[])
# # EXAMPLE: /Dimensions/get/InvoiceSectionDimensionsListWithFilter-Modern
# @try_manual
# def step__dimensions_get_invoicesectiondimensionslistwithfilter_modern(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--filter "properties/category eq \'resourceId\'" '
# '--top 5 '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/987'
# '6"',
# checks=[])
# # EXAMPLE: /Dimensions/get/ManagementGroupDimensionsList-Legacy
# @try_manual
# def step__dimensions_get_managementgroupdimensionslist_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--scope "providers/Microsoft.Management/managementGroups/MyMgId"',
# checks=[])
# # EXAMPLE: /Dimensions/get/ManagementGroupDimensionsListExpandAndTop-Legacy
# @try_manual
# def step__dimensions_get_managementgroupdimensionslistexpandandtop_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "providers/Microsoft.Management/managementGroups/MyMgId"',
# checks=[])
# # EXAMPLE: /Dimensions/get/ManagementGroupDimensionsListWithFilter-Legacy
# @try_manual
# def step__dimensions_get_managementgroupdimensionslistwithfilter_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--filter "properties/category eq \'resourceId\'" '
# '--top 5 '
# '--scope "providers/Microsoft.Management/managementGroups/MyMgId"',
# checks=[])
# # EXAMPLE: /Dimensions/get/ResourceGroupDimensionsList-Legacy
# @try_manual
# def step__dimensions_get_resourcegroupdimensionslist_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando"',
# checks=[])
# # EXAMPLE: /Dimensions/get/SubscriptionDimensionsList-Legacy
# @try_manual
# def step__dimensions_get_subscriptiondimensionslist_legacy(test, rg):
# test.cmd('az costmanagement dimension list '
# '--expand "properties/data" '
# '--top 5 '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Exports/put/DepartmentCreateOrUpdateExport
# @try_manual
# def step__exports_put_departmentcreateorupdateexport(test, rg):
# test.cmd('az costmanagement export create '
# '--export-name "{TestExport}" '
# '--definition-type "Usage" '
# '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}'
# '}}}" '
# '--definition-dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="Resourc'
# 'eLocation" columns="PreTaxCost" '
# '--definition-dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation'
# '\\",\\"operator\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":'
# '\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{'
# '\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--definition-dataset-grouping name="SubscriptionName" type="Dimension" '
# '--definition-dataset-grouping name="Environment" type="Tag" '
# '--definition-timeframe "MonthToDate" '
# '--delivery-info-destination container="exports" resource-id="/subscriptions/{subscription_id}/resourceGro'
# 'ups/{rg}/providers/Microsoft.Storage/storageAccounts/{sa}" root-folder-path="ad-hoc" '
# '--schedule-recurrence "Weekly" '
# '--schedule-recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" '
# '--schedule-status "Active" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/1234"',
# checks=[])
# # EXAMPLE: /Exports/put/EnrollmentAccountCreateOrUpdateExport
# @try_manual
# def step__exports_put_enrollmentaccountcreateorupdateexport(test, rg):
# test.cmd('az costmanagement export create '
# '--export-name "{TestExport}" '
# '--definition-type "Usage" '
# '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}'
# '}}}" '
# '--definition-dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="Resourc'
# 'eLocation" columns="PreTaxCost" '
# '--definition-dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation'
# '\\",\\"operator\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":'
# '\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{'
# '\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--definition-dataset-grouping name="SubscriptionName" type="Dimension" '
# '--definition-dataset-grouping name="Environment" type="Tag" '
# '--definition-timeframe "MonthToDate" '
# '--delivery-info-destination container="exports" resource-id="/subscriptions/{subscription_id}/resourceGro'
# 'ups/{rg}/providers/Microsoft.Storage/storageAccounts/{sa}" root-folder-path="ad-hoc" '
# '--schedule-recurrence "Weekly" '
# '--schedule-recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" '
# '--schedule-status "Active" '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Exports/put/ManagementGroupCreateOrUpdateExport
# @try_manual
# def step__exports_put_managementgroupcreateorupdateexport(test, rg):
# test.cmd('az costmanagement export create '
# '--export-name "{TestExport}" '
# '--definition-type "Usage" '
# '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}'
# '}}}" '
# '--definition-dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="Resourc'
# 'eLocation" columns="PreTaxCost" '
# '--definition-dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation'
# '\\",\\"operator\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":'
# '\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{'
# '\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--definition-dataset-grouping name="SubscriptionName" type="Dimension" '
# '--definition-dataset-grouping name="Environment" type="Tag" '
# '--definition-timeframe "MonthToDate" '
# '--delivery-info-destination container="exports" resource-id="/subscriptions/{subscription_id}/resourceGro'
# 'ups/{rg}/providers/Microsoft.Storage/storageAccounts/{sa}" root-folder-path="ad-hoc" '
# '--schedule-recurrence "Weekly" '
# '--schedule-recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" '
# '--schedule-status "Active" '
# '--scope "providers/Microsoft.Management/managementGroups/TestMG"',
# checks=[])
# # EXAMPLE: /Exports/put/ResourceGroupCreateOrUpdateExport
# @try_manual
# def step__exports_put_resourcegroupcreateorupdateexport(test, rg):
# test.cmd('az costmanagement export create '
# '--export-name "{TestExport}" '
# '--definition-type "Usage" '
# '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}'
# '}}}" '
# '--definition-dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="Resourc'
# 'eLocation" columns="PreTaxCost" '
# '--definition-dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation'
# '\\",\\"operator\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":'
# '\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{'
# '\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--definition-dataset-grouping name="SubscriptionName" type="Dimension" '
# '--definition-dataset-grouping name="Environment" type="Tag" '
# '--definition-timeframe "MonthToDate" '
# '--delivery-info-destination container="exports" resource-id="/subscriptions/{subscription_id}/resourceGro'
# 'ups/{rg}/providers/Microsoft.Storage/storageAccounts/{sa}" root-folder-path="ad-hoc" '
# '--schedule-recurrence "Weekly" '
# '--schedule-recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" '
# '--schedule-status "Active" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"',
# checks=[])
# # EXAMPLE: /Exports/put/SubscriptionCreateOrUpdateExport
# @try_manual
# def step__exports_put_subscriptioncreateorupdateexport(test, rg):
# test.cmd('az costmanagement export create '
# '--export-name "{TestExport}" '
# '--definition-type "Usage" '
# '--definition-dataset-aggregation "{{\\"costSum\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}'
# '}}}" '
# '--definition-dataset-configuration columns="Date" columns="MeterId" columns="InstanceId" columns="Resourc'
# 'eLocation" columns="PreTaxCost" '
# '--definition-dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation'
# '\\",\\"operator\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":'
# '\\"Environment\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{'
# '\\"name\\":\\"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--definition-dataset-grouping name="SubscriptionName" type="Dimension" '
# '--definition-dataset-grouping name="Environment" type="Tag" '
# '--definition-timeframe "MonthToDate" '
# '--delivery-info-destination container="exports" resource-id="/subscriptions/{subscription_id}/resourceGro'
# 'ups/{rg}/providers/Microsoft.Storage/storageAccounts/{sa}" root-folder-path="ad-hoc" '
# '--schedule-recurrence "Weekly" '
# '--schedule-recurrence-period from="2018-06-01T00:00:00Z" to="2018-10-31T00:00:00Z" '
# '--schedule-status "Active" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Exports/get/ManagementGroupExecutionHistoryExport
# @try_manual
# def step__exports_get_managementgroupexecutionhistoryexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Management/managementGroups/TestMG"',
# checks=[])
# # EXAMPLE: /Exports/get/BillingAccountExecutionHistoryExport
# @try_manual
# def step__exports_get_billingaccountexecutionhistoryexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/123456"',
# checks=[])
# # EXAMPLE: /Exports/get/BillingAccountExport
# @try_manual
# def step__exports_get_billingaccountexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/123456"',
# checks=[])
# # EXAMPLE: /Exports/get/BillingAccountExportList
# @try_manual
# def step__exports_get_billingaccountexportlist(test, rg):
# test.cmd('az costmanagement export list '
# '--scope "providers/Microsoft.Billing/billingAccounts/123456"',
# checks=[])
# # EXAMPLE: /Exports/get/DepartmentExecutionHistoryExport
# @try_manual
# def step__exports_get_departmentexecutionhistoryexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/1234"',
# checks=[])
# # EXAMPLE: /Exports/get/DepartmentExport
# @try_manual
# def step__exports_get_departmentexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/1234"',
# checks=[])
# # EXAMPLE: /Exports/get/DepartmentExportList
# @try_manual
# def step__exports_get_departmentexportlist(test, rg):
# test.cmd('az costmanagement export list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/123"',
# checks=[])
# # EXAMPLE: /Exports/get/EnrollmentAccountExecutionHistoryExport
# @try_manual
# def step__exports_get_enrollmentaccountexecutionhistoryexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Exports/get/EnrollmentAccountExport
# @try_manual
# def step__exports_get_enrollmentaccountexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Exports/get/EnrollmentAccountExportList
# @try_manual
# def step__exports_get_enrollmentaccountexportlist(test, rg):
# test.cmd('az costmanagement export list '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Alerts/get/BillingProfileAlerts
# @try_manual
# def step__alerts_get_billingprofilealerts(test, rg):
# test.cmd('az costmanagement alert list '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579"',
# checks=[])
# # EXAMPLE: /Exports/get/ManagementGroupExport
# @try_manual
# def step__exports_get_managementgroupexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Management/managementGroups/TestMG"',
# checks=[])
# # EXAMPLE: /Exports/get/ManagementGroupExportList
# @try_manual
# def step__exports_get_managementgroupexportlist(test, rg):
# test.cmd('az costmanagement export list '
# '--scope "providers/Microsoft.Management/managementGroups/TestMG"',
# checks=[])
# # EXAMPLE: /Exports/get/ResourceGroupExecutionHistoryExport
# @try_manual
# def step__exports_get_resourcegroupexecutionhistoryexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"',
# checks=[])
# # EXAMPLE: /Exports/get/ResourceGroupExport
# @try_manual
# def step__exports_get_resourcegroupexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"',
# checks=[])
# # EXAMPLE: /Exports/get/ResourceGroupExportList
# @try_manual
# def step__exports_get_resourcegroupexportlist(test, rg):
# test.cmd('az costmanagement export list '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"',
# checks=[])
# # EXAMPLE: /Exports/get/SubscriptionExecutionHistoryExport
# @try_manual
# def step__exports_get_subscriptionexecutionhistoryexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Exports/get/SubscriptionExport
# @try_manual
# def step__exports_get_subscriptionexport(test, rg):
# test.cmd('az costmanagement export show '
# '--export-name "{TestExport}" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Exports/get/SubscriptionExportList
# @try_manual
# def step__exports_get_subscriptionexportlist(test, rg):
# test.cmd('az costmanagement export list '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Exports/post/BillingAccountExecuteExport
# @try_manual
# def step__exports_post_billingaccountexecuteexport(test, rg):
# test.cmd('az costmanagement export execute '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/123456"',
# checks=[])
# # EXAMPLE: /Exports/post/DepartmentExecuteExport
# @try_manual
# def step__exports_post_departmentexecuteexport(test, rg):
# test.cmd('az costmanagement export execute '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/1234"',
# checks=[])
# # EXAMPLE: /Exports/post/EnrollmentAccountExecuteExport
# @try_manual
# def step__exports_post_enrollmentaccountexecuteexport(test, rg):
# test.cmd('az costmanagement export execute '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Exports/post/ManagementGroupExecuteExport
# @try_manual
# def step__exports_post_managementgroupexecuteexport(test, rg):
# test.cmd('az costmanagement export execute '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Management/managementGroups/TestMG"',
# checks=[])
# # EXAMPLE: /Exports/post/ResourceGroupExecuteExport
# @try_manual
# def step__exports_post_resourcegroupexecuteexport(test, rg):
# test.cmd('az costmanagement export execute '
# '--export-name "{TestExport}" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"',
# checks=[])
# # EXAMPLE: /Exports/post/SubscriptionExecuteExport
# @try_manual
# def step__exports_post_subscriptionexecuteexport(test, rg):
# test.cmd('az costmanagement export execute '
# '--export-name "{TestExport}" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Forecast/post/BillingAccountForecast
# @try_manual
# def step__forecast_post_billingaccountforecast(test, rg):
# test.cmd('az costmanagement forecast usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--include-actual-cost false '
# '--include-fresh-partial-cost false '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789"',
# checks=[])
# # EXAMPLE: /Forecast/post/BillingProfileForecast
# @try_manual
# def step__forecast_post_billingprofileforecast(test, rg):
# test.cmd('az costmanagement forecast usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--include-actual-cost false '
# '--include-fresh-partial-cost false '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579"',
# checks=[])
# # EXAMPLE: /Forecast/post/DepartmentForecast
# @try_manual
# def step__forecast_post_departmentforecast(test, rg):
# test.cmd('az costmanagement forecast usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--include-actual-cost false '
# '--include-fresh-partial-cost false '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/departments/123"',
# checks=[])
# # EXAMPLE: /Forecast/post/EnrollmentAccountForecast
# @try_manual
# def step__forecast_post_enrollmentaccountforecast(test, rg):
# test.cmd('az costmanagement forecast usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--include-actual-cost false '
# '--include-fresh-partial-cost false '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Forecast/post/ExternalBillingAccountForecast
# @try_manual
# def step__forecast_post_externalbillingaccountforecast(test, rg):
# test.cmd('az costmanagement forecast external-cloud-provider-usage '
# '--external-cloud-provider-id "100" '
# '--external-cloud-provider-type "externalBillingAccounts" '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate"',
# checks=[])
# # EXAMPLE: /Forecast/post/ExternalSubscriptionForecast
# @try_manual
# def step__forecast_post_externalsubscriptionforecast(test, rg):
# test.cmd('az costmanagement forecast external-cloud-provider-usage '
# '--external-cloud-provider-id "100" '
# '--external-cloud-provider-type "externalSubscriptions" '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate"',
# checks=[])
# # EXAMPLE: /Forecast/post/InvoiceSectionForecast
# @try_manual
# def step__forecast_post_invoicesectionforecast(test, rg):
# test.cmd('az costmanagement forecast usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--include-actual-cost false '
# '--include-fresh-partial-cost false '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/987'
# '6"',
# checks=[])
# # EXAMPLE: /Forecast/post/ResourceGroupForecast
# @try_manual
# def step__forecast_post_resourcegroupforecast(test, rg):
# test.cmd('az costmanagement forecast usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--include-actual-cost false '
# '--include-fresh-partial-cost false '
# '--timeframe "MonthToDate" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer"',
# checks=[])
# # EXAMPLE: /Forecast/post/SubscriptionForecast
# @try_manual
# def step__forecast_post_subscriptionforecast(test, rg):
# test.cmd('az costmanagement forecast usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--include-actual-cost false '
# '--include-fresh-partial-cost false '
# '--timeframe "MonthToDate" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Query/post/BillingAccountQuery-Legacy
# @try_manual
# def step__query_post_billingaccountquery_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/70664866"',
# checks=[])
# # EXAMPLE: /Query/post/BillingAccountQuery-Modern
# @try_manual
# def step__query_post_billingaccountquery_modern(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789"',
# checks=[])
# # EXAMPLE: /Query/post/BillingAccountQueryGrouping-Legacy
# @try_manual
# def step__query_post_billingaccountquerygrouping_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceGroup" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "providers/Microsoft.Billing/billingAccounts/70664866"',
# checks=[])
# # EXAMPLE: /Query/post/BillingAccountQueryGrouping-Modern
# @try_manual
# def step__query_post_billingaccountquerygrouping_modern(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceGroup" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789"',
# checks=[])
# # EXAMPLE: /Query/post/BillingProfileQuery-Modern
# @try_manual
# def step__query_post_billingprofilequery_modern(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579"',
# checks=[])
# # EXAMPLE: /Query/post/BillingProfileQueryGrouping-Modern
# @try_manual
# def step__query_post_billingprofilequerygrouping_modern(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceGroup" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579"',
# checks=[])
# # EXAMPLE: /Query/post/CustomerQuery-Modern
# @try_manual
# def step__query_post_customerquery_modern(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678"',
# checks=[])
# # EXAMPLE: /Query/post/CustomerQueryGrouping-Modern
# @try_manual
# def step__query_post_customerquerygrouping_modern(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceGroup" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678"',
# checks=[])
# # EXAMPLE: /Query/post/DepartmentQuery-Legacy
# @try_manual
# def step__query_post_departmentquery_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/departments/123"',
# checks=[])
# # EXAMPLE: /Query/post/DepartmentQueryGrouping-Legacy
# @try_manual
# def step__query_post_departmentquerygrouping_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceGroup" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/departments/123"',
# checks=[])
# # EXAMPLE: /Query/post/EnrollmentAccountQuery-Legacy
# @try_manual
# def step__query_post_enrollmentaccountquery_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Query/post/EnrollmentAccountQueryGrouping-Legacy
# @try_manual
# def step__query_post_enrollmentaccountquerygrouping_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceGroup" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Query/post/ExternalBillingAccountQueryList
# @try_manual
# def step__query_post_externalbillingaccountquerylist(test, rg):
# test.cmd('az costmanagement query usage-by-external-cloud-provider-type '
# '--external-cloud-provider-id "100" '
# '--external-cloud-provider-type "externalBillingAccounts" '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate"',
# checks=[])
# # EXAMPLE: /Query/post/ExternalSubscriptionsQuery
# @try_manual
# def step__query_post_externalsubscriptionsquery(test, rg):
# test.cmd('az costmanagement query usage-by-external-cloud-provider-type '
# '--external-cloud-provider-id "100" '
# '--external-cloud-provider-type "externalSubscriptions" '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate"',
# checks=[])
# # EXAMPLE: /Query/post/InvoiceSectionQuery-Modern
# @try_manual
# def step__query_post_invoicesectionquery_modern(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/987'
# '6"',
# checks=[])
# # EXAMPLE: /Query/post/InvoiceSectionQueryGrouping-Modern
# @try_manual
# def step__query_post_invoicesectionquerygrouping_modern(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceGroup" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/987'
# '6"',
# checks=[])
# # EXAMPLE: /Query/post/ManagementGroupQuery-Legacy
# @try_manual
# def step__query_post_managementgroupquery_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "providers/Microsoft.Management/managementGroups/MyMgId"',
# checks=[])
# # EXAMPLE: /Query/post/ManagementGroupQueryGrouping-Legacy
# @try_manual
# def step__query_post_managementgroupquerygrouping_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceGroup" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "providers/Microsoft.Management/managementGroups/MyMgId"',
# checks=[])
# # EXAMPLE: /Query/post/ResourceGroupQuery-Legacy
# @try_manual
# def step__query_post_resourcegroupquery_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer"',
# checks=[])
# # EXAMPLE: /Query/post/ResourceGroupQueryGrouping-Legacy
# @try_manual
# def step__query_post_resourcegroupquerygrouping_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceType" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer"',
# checks=[])
# # EXAMPLE: /Query/post/SubscriptionQuery-Legacy
# @try_manual
# def step__query_post_subscriptionquery_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-filter "{{\\"and\\":[{{\\"or\\":[{{\\"dimension\\":{{\\"name\\":\\"ResourceLocation\\",\\"opera'
# 'tor\\":\\"In\\",\\"values\\":[\\"East US\\",\\"West Europe\\"]}}}},{{\\"tag\\":{{\\"name\\":\\"Environmen'
# 't\\",\\"operator\\":\\"In\\",\\"values\\":[\\"UAT\\",\\"Prod\\"]}}}}]}},{{\\"dimension\\":{{\\"name\\":\\'
# '"ResourceGroup\\",\\"operator\\":\\"In\\",\\"values\\":[\\"API\\"]}}}}]}}" '
# '--timeframe "MonthToDate" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Query/post/SubscriptionQueryGrouping-Legacy
# @try_manual
# def step__query_post_subscriptionquerygrouping_legacy(test, rg):
# test.cmd('az costmanagement query usage '
# '--type "Usage" '
# '--dataset-aggregation "{{\\"totalCost\\":{{\\"name\\":\\"PreTaxCost\\",\\"function\\":\\"Sum\\"}}}}" '
# '--dataset-grouping name="ResourceGroup" type="Dimension" '
# '--timeframe "TheLastMonth" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Exports/delete/DepartmentDeleteExport
# @try_manual
# def step__exports_delete_departmentdeleteexport(test, rg):
# test.cmd('az costmanagement export delete '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/12/departments/1234"',
# checks=[])
# # EXAMPLE: /Exports/delete/SubscriptionDeleteExport
# @try_manual
# def step__exports_delete_subscriptiondeleteexport(test, rg):
# test.cmd('az costmanagement export delete '
# '--export-name "{TestExport}" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000"',
# checks=[])
# # EXAMPLE: /Exports/delete/ResourceGroupDeleteExport
# @try_manual
# def step__exports_delete_resourcegroupdeleteexport(test, rg):
# test.cmd('az costmanagement export delete '
# '--export-name "{TestExport}" '
# '--scope "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"',
# checks=[])
# # EXAMPLE: /Exports/delete/ManagementGroupDeleteExport
# @try_manual
# def step__exports_delete_managementgroupdeleteexport(test, rg):
# test.cmd('az costmanagement export delete '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Management/managementGroups/TestMG"',
# checks=[])
# # EXAMPLE: /Exports/delete/EnrollmentAccountDeleteExport
# @try_manual
# def step__exports_delete_enrollmentaccountdeleteexport(test, rg):
# test.cmd('az costmanagement export delete '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456"',
# checks=[])
# # EXAMPLE: /Exports/delete/BillingAccountDeleteExport
# @try_manual
# def step__exports_delete_billingaccountdeleteexport(test, rg):
# test.cmd('az costmanagement export delete '
# '--export-name "{TestExport}" '
# '--scope "providers/Microsoft.Billing/billingAccounts/123456"',
# checks=[])
# @try_manual
# def cleanup(test, rg):
# pass
# @try_manual
# def call_scenario(test, rg):
# setup(test, rg)
# step__exports_put_billingaccountcreateorupdateexport(test, rg)
# step__alerts_get_billingaccountalerts(test, rg)
# step__alerts_get_departmentalerts(test, rg)
# step__alerts_get_enrollmentaccountalerts(test, rg)
# step__alerts_get_externalbillingaccountalerts(test, rg)
# step__alerts_get_externalsubscriptionalerts(test, rg)
# step__alerts_get_invoicesectionalerts(test, rg)
# step__alerts_get_resourcegroupalerts(test, rg)
# step__alerts_get_subscriptionalerts(test, rg)
# step__dimensions_get_billingaccountdimensionslist_legacy(test, rg)
# step__dimensions_get_billingaccountdimensionslist_modern(test, rg)
# step__dimensions_get_billingaccountdimensionslistexpandandtop_legacy(test, rg)
# step__dimensions_get_billingaccountdimensionslistexpandandtop_modern(test, rg)
# step__dimensions_get_billingaccountdimensionslistwithfilter_legacy(test, rg)
# step__dimensions_get_billingaccountdimensionslistwithfilter_modern(test, rg)
# step__dimensions_get_billingprofiledimensionslist_modern(test, rg)
# step__dimensions_get_billingprofiledimensionslistexpandandtop_modern(test, rg)
# step__dimensions_get_billingprofiledimensionslistwithfilter_modern(test, rg)
# step__dimensions_get_customerdimensionslist_modern(test, rg)
# step__dimensions_get_customerdimensionslistexpandandtop_modern(test, rg)
# step__dimensions_get_customerdimensionslistwithfilter_modern(test, rg)
# step__dimensions_get_departmentdimensionslist_legacy(test, rg)
# step__dimensions_get_departmentdimensionslistexpandandtop_legacy(test, rg)
# step__dimensions_get_departmentdimensionslistwithfilter_legacy(test, rg)
# step__dimensions_get_enrollmentaccountdimensionslist_legacy(test, rg)
# step__dimensions_get_enrollmentaccountdimensionslistexpandandtop_legacy(test, rg)
# step__dimensions_get_enrollmentaccountdimensionslistwithfilter_legacy(test, rg)
# step__dimensions_get_externalbillingaccountdimensionlist(test, rg)
# step__dimensions_get_externalsubscriptiondimensionlist(test, rg)
# step__dimensions_get_invoicesectiondimensionslist_modern(test, rg)
# step__dimensions_get_invoicesectiondimensionslistexpandandtop_modern(test, rg)
# step__dimensions_get_invoicesectiondimensionslistwithfilter_modern(test, rg)
# step__dimensions_get_managementgroupdimensionslist_legacy(test, rg)
# step__dimensions_get_managementgroupdimensionslistexpandandtop_legacy(test, rg)
# step__dimensions_get_managementgroupdimensionslistwithfilter_legacy(test, rg)
# step__dimensions_get_resourcegroupdimensionslist_legacy(test, rg)
# step__dimensions_get_subscriptiondimensionslist_legacy(test, rg)
# step__exports_put_departmentcreateorupdateexport(test, rg)
# step__exports_put_enrollmentaccountcreateorupdateexport(test, rg)
# step__exports_put_managementgroupcreateorupdateexport(test, rg)
# step__exports_put_resourcegroupcreateorupdateexport(test, rg)
# step__exports_put_subscriptioncreateorupdateexport(test, rg)
# step__exports_get_managementgroupexecutionhistoryexport(test, rg)
# step__exports_get_billingaccountexecutionhistoryexport(test, rg)
# step__exports_get_billingaccountexport(test, rg)
# step__exports_get_billingaccountexportlist(test, rg)
# step__exports_get_departmentexecutionhistoryexport(test, rg)
# step__exports_get_departmentexport(test, rg)
# step__exports_get_departmentexportlist(test, rg)
# step__exports_get_enrollmentaccountexecutionhistoryexport(test, rg)
# step__exports_get_enrollmentaccountexport(test, rg)
# step__exports_get_enrollmentaccountexportlist(test, rg)
# step__alerts_get_billingprofilealerts(test, rg)
# step__exports_get_managementgroupexport(test, rg)
# step__exports_get_managementgroupexportlist(test, rg)
# step__exports_get_resourcegroupexecutionhistoryexport(test, rg)
# step__exports_get_resourcegroupexport(test, rg)
# step__exports_get_resourcegroupexportlist(test, rg)
# step__exports_get_subscriptionexecutionhistoryexport(test, rg)
# step__exports_get_subscriptionexport(test, rg)
# step__exports_get_subscriptionexportlist(test, rg)
# step__exports_post_billingaccountexecuteexport(test, rg)
# step__exports_post_departmentexecuteexport(test, rg)
# step__exports_post_enrollmentaccountexecuteexport(test, rg)
# step__exports_post_managementgroupexecuteexport(test, rg)
# step__exports_post_resourcegroupexecuteexport(test, rg)
# step__exports_post_subscriptionexecuteexport(test, rg)
# step__forecast_post_billingaccountforecast(test, rg)
# step__forecast_post_billingprofileforecast(test, rg)
# step__forecast_post_departmentforecast(test, rg)
# step__forecast_post_enrollmentaccountforecast(test, rg)
# step__forecast_post_externalbillingaccountforecast(test, rg)
# step__forecast_post_externalsubscriptionforecast(test, rg)
# step__forecast_post_invoicesectionforecast(test, rg)
# step__forecast_post_resourcegroupforecast(test, rg)
# step__forecast_post_subscriptionforecast(test, rg)
# step__query_post_billingaccountquery_legacy(test, rg)
# step__query_post_billingaccountquery_modern(test, rg)
# step__query_post_billingaccountquerygrouping_legacy(test, rg)
# step__query_post_billingaccountquerygrouping_modern(test, rg)
# step__query_post_billingprofilequery_modern(test, rg)
# step__query_post_billingprofilequerygrouping_modern(test, rg)
# step__query_post_customerquery_modern(test, rg)
# step__query_post_customerquerygrouping_modern(test, rg)
# step__query_post_departmentquery_legacy(test, rg)
# step__query_post_departmentquerygrouping_legacy(test, rg)
# step__query_post_enrollmentaccountquery_legacy(test, rg)
# step__query_post_enrollmentaccountquerygrouping_legacy(test, rg)
# step__query_post_externalbillingaccountquerylist(test, rg)
# step__query_post_externalsubscriptionsquery(test, rg)
# step__query_post_invoicesectionquery_modern(test, rg)
# step__query_post_invoicesectionquerygrouping_modern(test, rg)
# step__query_post_managementgroupquery_legacy(test, rg)
# step__query_post_managementgroupquerygrouping_legacy(test, rg)
# step__query_post_resourcegroupquery_legacy(test, rg)
# step__query_post_resourcegroupquerygrouping_legacy(test, rg)
# step__query_post_subscriptionquery_legacy(test, rg)
# step__query_post_subscriptionquerygrouping_legacy(test, rg)
# step__exports_delete_departmentdeleteexport(test, rg)
# step__exports_delete_subscriptiondeleteexport(test, rg)
# step__exports_delete_resourcegroupdeleteexport(test, rg)
# step__exports_delete_managementgroupdeleteexport(test, rg)
# step__exports_delete_enrollmentaccountdeleteexport(test, rg)
# step__exports_delete_billingaccountdeleteexport(test, rg)
# cleanup(test, rg)
# @try_manual
# class CostManagementClientScenarioTest(ScenarioTest):
# @ResourceGroupPreparer(name_prefix='clitestcostmanagement_MYDEVTESTRG'[:7], key='rg', parameter_name='rg')
# @StorageAccountPreparer(name_prefix='clitestcostmanagement_ccmeastusdiag182'[:7], key='sa',
# resource_group_parameter_name='rg')
# def test_costmanagement(self, rg):
# self.kwargs.update({
# 'subscription_id': self.get_subscription_id()
# })
# self.kwargs.update({
# 'TestExport': 'TestExport',
# })
# call_scenario(self, rg)
| 51.06085 | 123 | 0.596465 | 5,767 | 69,647 | 7.019768 | 0.056702 | 0.031569 | 0.031717 | 0.041104 | 0.906529 | 0.896697 | 0.75407 | 0.619519 | 0.618704 | 0.61742 | 0 | 0.027212 | 0.202751 | 69,647 | 1,363 | 124 | 51.098313 | 0.701869 | 0.942998 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
428f3cd469f686c3cdce8425082dd3f4abac6496 | 94 | py | Python | attendees/persons/services/__init__.py | xjlin0/attendees | 3c337ee68c00f17cbbbe26f2e33131e57850e4ed | [
"MIT"
] | 1 | 2020-03-26T00:42:04.000Z | 2020-03-26T00:42:04.000Z | attendees/persons/services/__init__.py | xjlin0/attendees | 3c337ee68c00f17cbbbe26f2e33131e57850e4ed | [
"MIT"
] | null | null | null | attendees/persons/services/__init__.py | xjlin0/attendees | 3c337ee68c00f17cbbbe26f2e33131e57850e4ed | [
"MIT"
] | null | null | null | from .attending_service import AttendingService
from .attendee_service import AttendeeService
| 31.333333 | 47 | 0.893617 | 10 | 94 | 8.2 | 0.7 | 0.317073 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085106 | 94 | 2 | 48 | 47 | 0.953488 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
42a5b616689e163099b4ea75363113e2f474f257 | 5,986 | py | Python | tests/handlers/test_visualizations.py | zero1number/redash | caabc4afa4e60e273782a46d84099857821c6500 | [
"BSD-2-Clause"
] | 20,680 | 2015-11-16T15:38:37.000Z | 2022-03-31T21:43:43.000Z | tests/handlers/test_visualizations.py | zero1number/redash | caabc4afa4e60e273782a46d84099857821c6500 | [
"BSD-2-Clause"
] | 3,934 | 2015-11-16T14:46:49.000Z | 2022-03-31T13:22:31.000Z | tests/handlers/test_visualizations.py | zero1number/redash | caabc4afa4e60e273782a46d84099857821c6500 | [
"BSD-2-Clause"
] | 4,147 | 2015-11-17T15:57:23.000Z | 2022-03-31T11:57:43.000Z | from tests import BaseTestCase
from redash import models
class VisualizationResourceTest(BaseTestCase):
def test_create_visualization(self):
query = self.factory.create_query()
models.db.session.commit()
data = {
"query_id": query.id,
"name": "Chart",
"description": "",
"options": {},
"type": "CHART",
}
rv = self.make_request("post", "/api/visualizations", data=data)
self.assertEqual(rv.status_code, 200)
data.pop("query_id")
self.assertDictContainsSubset(data, rv.json)
def test_delete_visualization(self):
visualization = self.factory.create_visualization()
models.db.session.commit()
rv = self.make_request(
"delete", "/api/visualizations/{}".format(visualization.id)
)
self.assertEqual(rv.status_code, 200)
self.assertEqual(models.Visualization.query.count(), 0)
def test_update_visualization(self):
visualization = self.factory.create_visualization()
models.db.session.commit()
rv = self.make_request(
"post",
"/api/visualizations/{0}".format(visualization.id),
data={"name": "After Update"},
)
self.assertEqual(rv.status_code, 200)
self.assertEqual(rv.json["name"], "After Update")
def test_only_owner_collaborator_or_admin_can_create_visualization(self):
query = self.factory.create_query()
other_user = self.factory.create_user()
admin = self.factory.create_admin()
admin_from_diff_org = self.factory.create_admin(org=self.factory.create_org())
models.db.session.commit()
models.db.session.refresh(admin)
models.db.session.refresh(other_user)
models.db.session.refresh(admin_from_diff_org)
data = {
"query_id": query.id,
"name": "Chart",
"description": "",
"options": {},
"type": "CHART",
}
rv = self.make_request("post", "/api/visualizations", data=data, user=admin)
self.assertEqual(rv.status_code, 200)
rv = self.make_request(
"post", "/api/visualizations", data=data, user=other_user
)
self.assertEqual(rv.status_code, 403)
self.make_request(
"post",
"/api/queries/{}/acl".format(query.id),
data={"access_type": "modify", "user_id": other_user.id},
)
rv = self.make_request(
"post", "/api/visualizations", data=data, user=other_user
)
self.assertEqual(rv.status_code, 200)
rv = self.make_request(
"post", "/api/visualizations", data=data, user=admin_from_diff_org
)
self.assertEqual(rv.status_code, 404)
def test_only_owner_collaborator_or_admin_can_edit_visualization(self):
vis = self.factory.create_visualization()
models.db.session.flush()
path = "/api/visualizations/{}".format(vis.id)
data = {"name": "After Update"}
other_user = self.factory.create_user()
admin = self.factory.create_admin()
admin_from_diff_org = self.factory.create_admin(org=self.factory.create_org())
models.db.session.commit()
models.db.session.refresh(admin)
models.db.session.refresh(other_user)
models.db.session.refresh(admin_from_diff_org)
rv = self.make_request("post", path, user=admin, data=data)
self.assertEqual(rv.status_code, 200)
rv = self.make_request("post", path, user=other_user, data=data)
self.assertEqual(rv.status_code, 403)
self.make_request(
"post",
"/api/queries/{}/acl".format(vis.query_id),
data={"access_type": "modify", "user_id": other_user.id},
)
rv = self.make_request("post", path, user=other_user, data=data)
self.assertEqual(rv.status_code, 200)
rv = self.make_request("post", path, user=admin_from_diff_org, data=data)
self.assertEqual(rv.status_code, 404)
def test_only_owner_collaborator_or_admin_can_delete_visualization(self):
vis = self.factory.create_visualization()
models.db.session.flush()
path = "/api/visualizations/{}".format(vis.id)
other_user = self.factory.create_user()
admin = self.factory.create_admin()
admin_from_diff_org = self.factory.create_admin(org=self.factory.create_org())
models.db.session.commit()
models.db.session.refresh(admin)
models.db.session.refresh(other_user)
models.db.session.refresh(admin_from_diff_org)
rv = self.make_request("delete", path, user=admin)
self.assertEqual(rv.status_code, 200)
vis = self.factory.create_visualization()
models.db.session.commit()
path = "/api/visualizations/{}".format(vis.id)
rv = self.make_request("delete", path, user=other_user)
self.assertEqual(rv.status_code, 403)
self.make_request(
"post",
"/api/queries/{}/acl".format(vis.query_id),
data={"access_type": "modify", "user_id": other_user.id},
)
rv = self.make_request("delete", path, user=other_user)
self.assertEqual(rv.status_code, 200)
vis = self.factory.create_visualization()
models.db.session.commit()
path = "/api/visualizations/{}".format(vis.id)
rv = self.make_request("delete", path, user=admin_from_diff_org)
self.assertEqual(rv.status_code, 404)
def test_deleting_a_visualization_deletes_dashboard_widgets(self):
vis = self.factory.create_visualization()
widget = self.factory.create_widget(visualization=vis)
rv = self.make_request("delete", "/api/visualizations/{}".format(vis.id))
self.assertIsNone(
models.Widget.query.filter(models.Widget.id == widget.id).first()
)
| 36.278788 | 86 | 0.625626 | 698 | 5,986 | 5.157593 | 0.106017 | 0.067222 | 0.103889 | 0.075556 | 0.875278 | 0.862778 | 0.849444 | 0.841389 | 0.7375 | 0.7375 | 0 | 0.010371 | 0.2429 | 5,986 | 164 | 87 | 36.5 | 0.783981 | 0 | 0 | 0.689394 | 0 | 0 | 0.102072 | 0.025894 | 0 | 0 | 0 | 0 | 0.143939 | 1 | 0.05303 | false | 0 | 0.015152 | 0 | 0.075758 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
c41e2f2bd1f55b669cd15d9433abcd4d461e9242 | 43 | py | Python | 2558.py | FelisCatusKR/Baekjoon_Python3 | d84dc9421fe956001864d138b6d6ec9ebd793edf | [
"MIT"
] | null | null | null | 2558.py | FelisCatusKR/Baekjoon_Python3 | d84dc9421fe956001864d138b6d6ec9ebd793edf | [
"MIT"
] | null | null | null | 2558.py | FelisCatusKR/Baekjoon_Python3 | d84dc9421fe956001864d138b6d6ec9ebd793edf | [
"MIT"
] | null | null | null | # 2558.py
print(int(input())+int(input())) | 21.5 | 32 | 0.627907 | 8 | 43 | 3.5 | 0.75 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097561 | 0.046512 | 43 | 2 | 32 | 21.5 | 0.560976 | 0.162791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
671b5b0e11d18f552b57678e1c67f6a745d46d93 | 79 | py | Python | shopify/resources/location.py | SachinTitus/shopify_python_api | 134de8e61639957050c73da1eddbaec847c4b8cd | [
"MIT"
] | null | null | null | shopify/resources/location.py | SachinTitus/shopify_python_api | 134de8e61639957050c73da1eddbaec847c4b8cd | [
"MIT"
] | null | null | null | shopify/resources/location.py | SachinTitus/shopify_python_api | 134de8e61639957050c73da1eddbaec847c4b8cd | [
"MIT"
] | null | null | null | from ..base import ShopifyResource
class Location(ShopifyResource):
pass
| 13.166667 | 34 | 0.772152 | 8 | 79 | 7.625 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164557 | 79 | 5 | 35 | 15.8 | 0.924242 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
67587d3489b835a37d971678d918e7a3927630f6 | 13,088 | py | Python | veroviz/generateArcs.py | optimatorlab/veroviz | 4b4b7da07abbc764169223cc4cac41e19ff7031d | [
"MIT"
] | 16 | 2019-11-05T06:33:21.000Z | 2022-02-09T04:37:03.000Z | veroviz/generateArcs.py | optimatorlab/veroviz | 4b4b7da07abbc764169223cc4cac41e19ff7031d | [
"MIT"
] | 6 | 2019-11-22T09:38:01.000Z | 2021-06-18T02:08:43.000Z | veroviz/generateArcs.py | optimatorlab/veroviz | 4b4b7da07abbc764169223cc4cac41e19ff7031d | [
"MIT"
] | 4 | 2020-09-25T07:48:56.000Z | 2022-02-09T04:39:54.000Z | from veroviz._common import *
from veroviz._validation import valCreateArcsFromLocSeq
from veroviz._validation import valCreateArcsFromNodeSeq
from veroviz._createEntitiesFromList import privCreateArcsFromLocSeq
def createArcsFromLocSeq(locSeq=None, initArcs=None, startArc=1, objectID=None, leafletColor=config['VRV_DEFAULT_LEAFLETARCCOLOR'], leafletWeight=config['VRV_DEFAULT_LEAFLETARCWEIGHT'], leafletStyle=config['VRV_DEFAULT_LEAFLETARCSTYLE'], leafletOpacity=config['VRV_DEFAULT_LEAFLETARCOPACITY'], leafletCurveType=config['VRV_DEFAULT_ARCCURVETYPE'], leafletCurvature=config['VRV_DEFAULT_ARCCURVATURE'], useArrows=True, cesiumColor=config['VRV_DEFAULT_CESIUMPATHCOLOR'], cesiumWeight=config['VRV_DEFAULT_CESIUMPATHWEIGHT'], cesiumStyle=config['VRV_DEFAULT_CESIUMPATHSTYLE'], cesiumOpacity=config['VRV_DEFAULT_CESIUMPATHOPACITY'], popupText=None):
"""
Create an "arcs" dataframe from an ordered list of coordinates.
Parameters
----------
locSeq: list of lists, Required, default as None
An ordered list of locations that will be converted into an :ref:`Arcs` dataframe. The list should be formated as [[lat1, lon1], [lat2, lon2], ..., [latn, lonn]].
initArcs: :ref:`Arcs`, Optional, default as None
An :ref:`Arcs` dataframe. If provided, the arcs to be created will be appended to this dataframe.
startArc: int, Optional, default as 1
Specifies the starting index number for the arcs. This will be reflected in the `odID` column of the resulting :ref:`Arcs` dataframe. If `startArc` is less than the minimum value of the `odID` found in the dataframe specified by `initArcs`, the value of `startArc` will be ignored in favor of the smallest integer greater than the maximum existing `odID` value.
objectID: int/string, Optional, default as None
A descriptive name or index for a particular vehicle or object (e.g., 'truck 1', or 'red car').
leafletColor: string, Optional, default as "orange"
The color of the arcs when displayed in Leaflet. See :ref:`Leaflet style` for a list of available colors.
leafletWeight: int, Optional, default as 3
The pixel width of the arcs when displayed in Leaflet.
leafletStyle: string, Optional, default as 'solid'
The line style of the arcs when displayed in Leaflet. Valid options are 'solid', 'dotted', and 'dashed'. See :ref:`Leaflet style` for more information.
leafletOpacity: float in [0, 1], Optional, default as 0.8
The opacity of the arcs when displayed in Leaflet. Valid values are in the range from 0 (invisible) to 1 (no transparency).
leafletCurveType: string, Optional, default as 'straight'
The type of curve to be shown on leaflet map for :ref:Arc dataframes (curves will not be applied to :ref:Assignments dataframes). The options are 'Bezier', 'greatcircle', and 'straight'. If Bezier is provided, the leafletCurvature is also required. If greatcircle is provided, the arc follow the curvature of the Earth.
leafletCurvature: float in (-90, 90), Conditional, default as 45
If leafletCurveType is 'Bezier', then leafletCurvature is required; otherwise this argument will not be used. The curvature specifies the angle between a straight line connecting the two nodes and the curved arc emanating from those two nodes. Therefore, this value should be in the open interval (-90, 90), although values in the (-45, 45) range tend to work best.
useArrows: bool, Optional, default as True
Indicates whether arrows should be shown on the arcs when displayed in Leaflet.
cesiumColor: string, Optional, default as "orange"
The color of the arcs when displayed in Cesium. See :ref:`Cesium Style` for a list of available colors.
cesiumWeight: int, Optional, default as 3
The pixel width of the arcs when displayed in Cesium.
cesiumStyle: string, Optional, default as 'solid'
The line style of the arcs when displayed in Cesium. Valid options are 'solid', 'dotted', and 'dashed'. See :ref:`Cesium Style` for more information.
cesiumOpacity: float in [0, 1], Optional, default as 0.8
The opacity of the arcs when displayed in Cesium. Valid values are in the range from 0 (invisible) to 1 (no transparency).
popupText: string, Optional, default as None
Text (or HTML) that will be displayed when a user clicks on the arc in either Leaflet or Cesium.
Return
------
:ref:`Arcs`
An Arcs dataframe
Examples
--------
First import veroviz and check if it is the latest version
>>> import veroviz as vrv
>>> vrv.checkVersion()
Generate arcs from a given ordered list of coordinates:
>>> arcs = vrv.createArcsFromLocSeq(
... locSeq=[
... [42.1325, -78.2134],
... [42.5341, -78.3252],
... [42.3424, -78.6424]
... ])
>>> arcs
Display the arcs on a Leaflet map:
>>> vrv.createLeaflet(arcs=arcs)
This example includes all of the available function arguments.
>>> arcs = vrv.createArcsFromLocSeq(
... locSeq = [[42.1325, -78.2134],
... [42.5341, -78.3252],
... [42.3424, -78.6424]],
... initArcs = None,
... startArc = 1,
... objectID = 'car',
... leafletColor = 'orange',
... leafletWeight = 5,
... leafletStyle = 'dashed',
... leafletOpacity = 0.6,
... useArrows = False,
... cesiumColor = 'orange',
... cesiumWeight = 5,
... cesiumStyle = 'dashed',
... cesiumOpacity = 0.6,
... popupText = 'car route')
>>> vrv.createLeaflet(arcs=arcs)
"""
# validation
[valFlag, errorMsg, warningMsg] = valCreateArcsFromLocSeq(locSeq, initArcs, startArc, objectID, leafletColor, leafletWeight, leafletStyle, leafletOpacity, leafletCurveType, leafletCurvature, useArrows, cesiumColor, cesiumWeight, cesiumStyle, cesiumOpacity)
if (not valFlag):
print (errorMsg)
return
elif (config['VRV_SETTING_SHOWWARNINGMESSAGE'] and warningMsg != ""):
print (warningMsg)
arcs = privCreateArcsFromLocSeq(locSeq, initArcs, startArc, objectID, leafletColor, leafletWeight, leafletStyle, leafletOpacity, leafletCurveType, leafletCurvature, useArrows, cesiumColor, cesiumWeight, cesiumStyle, cesiumOpacity, popupText)
return arcs
def createArcsFromNodeSeq(nodeSeq=None, nodes=None, initArcs=None, startArc=1, objectID=None, leafletColor=config['VRV_DEFAULT_LEAFLETARCCOLOR'], leafletWeight=config['VRV_DEFAULT_LEAFLETARCWEIGHT'], leafletStyle=config['VRV_DEFAULT_LEAFLETARCSTYLE'], leafletOpacity=config['VRV_DEFAULT_LEAFLETARCOPACITY'], leafletCurveType=config['VRV_DEFAULT_ARCCURVETYPE'], leafletCurvature=config['VRV_DEFAULT_ARCCURVATURE'], useArrows=True, cesiumColor=config['VRV_DEFAULT_CESIUMPATHCOLOR'], cesiumWeight=config['VRV_DEFAULT_CESIUMPATHWEIGHT'], cesiumStyle=config['VRV_DEFAULT_CESIUMPATHSTYLE'], cesiumOpacity=config['VRV_DEFAULT_CESIUMPATHOPACITY'], popupText=None):
"""
Create an "arcs" dataframe from an ordered list of node IDs. The "nodes" dataframe from which these node IDs are drawn must also be specified.
Parameters
----------
nodeSeq: list, Required
An ordered list of node IDs. These IDs must be included in the `id` column of the :ref:`Nodes` dataframe specified in the `nodes` input argument to this function. The format for `nodeSeq` is [node_id_1, node_id_2, ...].
nodes: :ref:`Nodes`, Required
A :ref:`Nodes` dataframe, which must contain the individual node IDs specified in the `nodeSeq` input argument.
initArcs: :ref:`Arcs`, Optional, default as None
An :ref:`Arcs` dataframe. If provided, the arcs to be created will be appended to this dataframe.
startArc: int, Optional, default as 1
Specifies the starting index number for the arcs. This will be reflected in the `odID` column of the resulting :ref:`Arcs` dataframe. If `startArc` is less than the minimum value of the `odID` found in the dataframe specified by `initArcs`, the value of `startArc` will be ignored in favor of the smallest integer greater than the maximum existing `odID` value.
objectID: int/string, Optional, default as None
A descriptive name or index for a particular vehicle or object (e.g., 'truck 1', or 'red car').
leafletColor: string, Optional, default as "orange"
The color of the arcs when displayed in Leaflet. See :ref:`Leaflet style` for a list of available colors.
leafletWeight: int, Optional, default as 3
The pixel width of the arcs when displayed in Leaflet.
leafletStyle: string, Optional, default as 'solid'
The line style of the arcs when displayed in Leaflet. Valid options are 'solid', 'dotted', and 'dashed'. See :ref:`Leaflet style` for more information.
leafletOpacity: float in [0, 1], Optional, default as 0.8
The opacity of the arcs when displayed in Leaflet. Valid values are in the range from 0 (invisible) to 1 (no transparency).
leafletCurveType: string, Optional, default as 'straight'
The type of curve to be shown on leaflet map for :ref:Arc dataframes (curves will not be applied to :ref:Assignments dataframes). The options are 'Bezier', 'greatcircle', and 'straight'. If Bezier is provided, the leafletCurvature is also required. If greatcircle is provided, the arc follow the curvature of the Earth.
leafletCurvature: float in (-90, 90), Conditional, default as 45
If leafletCurveType is 'Bezier', then leafletCurvature is required; otherwise this argument will not be used. The curvature specifies the angle between a straight line connecting the two nodes and the curved arc emanating from those two nodes. Therefore, this value should be in the open interval (-90, 90), although values in the (-45, 45) range tend to work best.
useArrows: bool, Optional, default as True
Indicates whether arrows should be shown on the arcs when displayed in Leaflet.
cesiumColor: string, Optional, default as "orange"
The color of the arcs when displayed in Cesium. See :ref:`Cesium Style` for a list of available colors.
cesiumWeight: int, Optional, default as 3
The pixel width of the arcs when displayed in Cesium.
cesiumStyle: string, Optional, default as 'solid'
The line style of the arcs when displayed in Cesium. Valid options are 'solid', 'dotted', and 'dashed'. See :ref:`Cesium Style` for more information.
cesiumOpacity: float in [0, 1], Optional, default as 0.8
The opacity of the arcs when displayed in Cesium. Valid values are in the range from 0 (invisible) to 1 (no transparency).
popupText: string, Optional, default as None
Text (or HTML) that will be displayed when a user clicks on the arc in either Leaflet or Cesium.
Return
------
:ref:`Arcs`
An Arcs dataframe
Examples
--------
First import veroviz and check if it is the latest version
>>> import veroviz as vrv
>>> vrv.checkVersion()
Create a collection of 20 nodes:
>>> myNodes = vrv.generateNodes(
... numNodes = 20,
... nodeType = 'depot',
... nodeDistrib = 'normal',
... nodeDistribArgs = {
... 'center' : [42.30, 78.00],
... 'stdDev' : 1000
... })
>>> myNodes
Generate arcs from nodes 2-to-15 and from 15-to-8. These node IDs are found in the `id` column of the given Nodes dataframe.
>>> myArcs = vrv.createArcsFromNodeSeq(
... nodeSeq = [2, 15, 8],
... nodes = myNodes)
>>> myArcs
Display the nodes and arcs on a Leaflet map:
>>> myMap = vrv.createLeaflet(arcs=myArcs, nodes=myNodes)
>>> myMap
This example includes all of the available function arguments:
>>> moreArcs = vrv.createArcsFromNodeSeq(
... nodeSeq = [3, 16, 9],
... nodes = myNodes,
... initArcs = myArcs,
... startArc = 7,
... objectID = 'car',
... leafletColor = 'cadetblue',
... leafletWeight = 3,
... leafletStyle = 'dotted',
... leafletOpacity = 0.8,
... useArrows = False,
... cesiumColor = 'cadetblue',
... cesiumWeight = 3,
... cesiumStyle = 'dotted',
... cesiumOpacity = 0.8,
... popupText = 'car route')
>>> moreArcs
Display the nodes and arcs on a Leaflet map:
>>> vrv.createLeaflet(mapObject=myMap, arcs = moreArcs)
"""
# validation
[valFlag, errorMsg, warningMsg] = valCreateArcsFromNodeSeq(nodeSeq, nodes, initArcs, startArc, objectID, leafletColor, leafletWeight, leafletStyle, leafletOpacity, leafletCurveType, leafletCurvature, useArrows, cesiumColor, cesiumWeight, cesiumStyle, cesiumOpacity)
if (not valFlag):
print (errorMsg)
return
elif (config['VRV_SETTING_SHOWWARNINGMESSAGE'] and warningMsg != ""):
print (warningMsg)
locSeq = []
for i in range(len(nodeSeq)):
locSeq.append([
nodes.loc[nodes['id'] == nodeSeq[i]]['lat'].values[0],
nodes.loc[nodes['id'] == nodeSeq[i]]['lon'].values[0],
])
arcs = privCreateArcsFromLocSeq(locSeq, initArcs, startArc, objectID, leafletColor, leafletWeight, leafletStyle, leafletOpacity, leafletCurveType, leafletCurvature, useArrows, cesiumColor, cesiumWeight, cesiumStyle, cesiumOpacity, popupText)
return arcs
| 59.762557 | 656 | 0.713631 | 1,685 | 13,088 | 5.512166 | 0.165579 | 0.030039 | 0.051249 | 0.03876 | 0.806094 | 0.802972 | 0.791021 | 0.785745 | 0.785745 | 0.766796 | 0 | 0.017494 | 0.187653 | 13,088 | 218 | 657 | 60.036697 | 0.856095 | 0.795232 | 0 | 0.5 | 0 | 0 | 0.201121 | 0.197824 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.142857 | 0 | 0.357143 | 0.142857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
67e9b627329a156ab18c65f9fbd0dbce23188f4f | 3,350 | py | Python | tests/parser/statements/test_IfStatement.py | niyrme/NyrLang | 49c427fdd4aca4349c629fe220f3a235f305f50f | [
"MIT"
] | 3 | 2021-07-25T14:06:34.000Z | 2021-08-19T04:06:10.000Z | tests/parser/statements/test_IfStatement.py | niyrme/NyrLang | 49c427fdd4aca4349c629fe220f3a235f305f50f | [
"MIT"
] | 14 | 2021-06-19T15:31:51.000Z | 2021-08-25T14:11:24.000Z | tests/parser/statements/test_IfStatement.py | niyrme/NyrLang | 49c427fdd4aca4349c629fe220f3a235f305f50f | [
"MIT"
] | 1 | 2021-09-06T16:23:07.000Z | 2021-09-06T16:23:07.000Z | import json
from nyr.parser import node
from nyr.parser.parser import Parser
def testSimpleIfStatement():
ast = json.loads(
json.dumps(
Parser().parse("""
if (x) {
x = 1;
}
"""),
cls=node.ComplexEncoder,
),
)
expected = {
"type": "Program",
"body": [
{
"type": "IfStatement",
"test": {
"type": "Identifier",
"name": "x",
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "x",
},
"right": {
"type": "IntegerLiteral",
"value": 1,
},
},
},
],
},
"alternative": None,
},
],
}
assert ast == expected
def testIfStatementWithoutBlock():
ast = json.loads(
json.dumps(
Parser().parse("if (x) x = 1;"),
cls=node.ComplexEncoder,
),
)
expected = {
"type": "Program",
"body": [
{
"type": "IfStatement",
"test": {
"type": "Identifier",
"name": "x",
},
"consequent": {
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "x",
},
"right": {
"type": "IntegerLiteral",
"value": 1,
},
},
},
"alternative": None,
},
],
}
assert ast == expected
def testNestedIfStatement():
ast = json.loads(
json.dumps(
Parser().parse("""
if (x)
if (y) { }
else { }
"""),
cls=node.ComplexEncoder,
),
)
expected = {
"type": "Program",
"body": [
{
"type": "IfStatement",
"test": {
"type": "Identifier",
"name": "x",
},
"consequent": {
"type": "IfStatement",
"test": {
"type": "Identifier",
"name": "y",
},
"consequent": {
"type": "BlockStatement",
"body": [],
},
"alternative": {
"type": "BlockStatement",
"body": [],
},
},
"alternative": None,
},
],
}
assert ast == expected
def testIfElseStatement():
ast = json.loads(
json.dumps(
Parser().parse("""
if (x) {
x = 1;
} else {
x = 2;
}
"""),
cls=node.ComplexEncoder,
),
)
expected = {
"type": "Program",
"body": [
{
"type": "IfStatement",
"test": {
"type": "Identifier",
"name": "x",
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "x",
},
"right": {
"type": "IntegerLiteral",
"value": 1,
},
},
},
],
},
"alternative": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "x",
},
"right": {
"type": "IntegerLiteral",
"value": 2,
},
},
},
],
},
},
],
}
assert ast == expected
| 16.105769 | 39 | 0.433433 | 236 | 3,350 | 6.152542 | 0.186441 | 0.086777 | 0.11157 | 0.104683 | 0.826446 | 0.826446 | 0.779614 | 0.779614 | 0.779614 | 0.75551 | 0 | 0.003735 | 0.360597 | 3,350 | 207 | 40 | 16.183575 | 0.674136 | 0 | 0 | 0.668421 | 0 | 0 | 0.324179 | 0 | 0 | 0 | 0 | 0 | 0.021053 | 1 | 0.021053 | false | 0 | 0.015789 | 0 | 0.036842 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
db328c4779002378de0df06ef9f4057fe2c8b66e | 535 | py | Python | ex5-7.py | yiyidhuang/PythonCrashCrouse2nd | 3512f9ab8fcf32c6145604a37e2a62feddf174d1 | [
"MIT"
] | null | null | null | ex5-7.py | yiyidhuang/PythonCrashCrouse2nd | 3512f9ab8fcf32c6145604a37e2a62feddf174d1 | [
"MIT"
] | null | null | null | ex5-7.py | yiyidhuang/PythonCrashCrouse2nd | 3512f9ab8fcf32c6145604a37e2a62feddf174d1 | [
"MIT"
] | null | null | null | favorite_fruits = ['apple', 'banana', 'orange', 'watermelon']
my_fruit = 'banana'
if my_fruit in favorite_fruits:
print(f"You really like {my_fruit}")
my_fruit = "apple"
if my_fruit in favorite_fruits:
print(f"You really like {my_fruit}")
my_fruit = "orange"
if my_fruit in favorite_fruits:
print(f"You really like {my_fruit}")
my_fruit = "watermelon"
if my_fruit in favorite_fruits:
print(f"You really like {my_fruit}")
my_fruit = "cherry"
if my_fruit in favorite_fruits:
print(f"You really like {my_fruit}")
| 24.318182 | 61 | 0.719626 | 86 | 535 | 4.232558 | 0.186047 | 0.288462 | 0.123626 | 0.151099 | 0.777473 | 0.777473 | 0.777473 | 0.777473 | 0.777473 | 0.777473 | 0 | 0 | 0.160748 | 535 | 21 | 62 | 25.47619 | 0.81069 | 0 | 0 | 0.625 | 0 | 0 | 0.35514 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.3125 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
db359858d39737e5b2b8df204cf7799879fac9fe | 38,083 | py | Python | instances/passenger_demand/pas-20210421-2109-int16e/61.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int16e/61.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int16e/61.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 3603
passenger_arriving = (
(3, 5, 8, 8, 6, 0, 10, 11, 8, 3, 2, 0), # 0
(5, 10, 11, 3, 3, 0, 4, 13, 5, 2, 2, 0), # 1
(4, 13, 8, 5, 3, 0, 7, 10, 4, 3, 4, 0), # 2
(6, 6, 13, 2, 2, 0, 10, 6, 3, 5, 3, 0), # 3
(4, 10, 11, 5, 1, 0, 10, 5, 5, 3, 4, 0), # 4
(6, 6, 14, 8, 1, 0, 7, 6, 6, 5, 2, 0), # 5
(5, 12, 12, 2, 0, 0, 7, 5, 7, 5, 1, 0), # 6
(6, 7, 13, 7, 4, 0, 5, 8, 7, 4, 4, 0), # 7
(6, 14, 6, 3, 1, 0, 5, 8, 9, 6, 4, 0), # 8
(8, 8, 10, 2, 1, 0, 5, 12, 3, 0, 5, 0), # 9
(7, 8, 8, 6, 0, 0, 8, 12, 3, 0, 2, 0), # 10
(4, 8, 7, 3, 5, 0, 10, 5, 10, 6, 4, 0), # 11
(2, 9, 13, 1, 4, 0, 10, 12, 3, 6, 1, 0), # 12
(5, 9, 5, 5, 1, 0, 4, 7, 4, 6, 1, 0), # 13
(2, 12, 5, 6, 0, 0, 4, 9, 9, 5, 2, 0), # 14
(5, 11, 7, 6, 1, 0, 9, 10, 9, 7, 1, 0), # 15
(8, 9, 3, 7, 2, 0, 9, 12, 10, 3, 1, 0), # 16
(5, 12, 5, 5, 0, 0, 6, 9, 4, 2, 2, 0), # 17
(10, 5, 2, 6, 4, 0, 7, 7, 10, 4, 5, 0), # 18
(5, 13, 7, 9, 2, 0, 8, 9, 3, 3, 3, 0), # 19
(2, 9, 12, 10, 5, 0, 8, 6, 6, 8, 3, 0), # 20
(6, 9, 7, 7, 2, 0, 2, 12, 8, 4, 1, 0), # 21
(1, 14, 8, 6, 1, 0, 4, 11, 6, 8, 1, 0), # 22
(2, 6, 14, 4, 1, 0, 8, 9, 11, 6, 3, 0), # 23
(6, 14, 5, 8, 1, 0, 10, 9, 6, 6, 3, 0), # 24
(2, 11, 10, 2, 1, 0, 7, 15, 6, 4, 3, 0), # 25
(3, 9, 10, 5, 4, 0, 5, 8, 8, 3, 2, 0), # 26
(3, 12, 5, 1, 3, 0, 9, 11, 4, 6, 1, 0), # 27
(7, 15, 12, 8, 0, 0, 5, 9, 9, 5, 3, 0), # 28
(7, 11, 7, 4, 1, 0, 3, 16, 5, 4, 1, 0), # 29
(9, 9, 6, 3, 4, 0, 4, 9, 7, 4, 1, 0), # 30
(11, 12, 2, 6, 4, 0, 9, 4, 10, 5, 3, 0), # 31
(11, 15, 5, 2, 1, 0, 2, 5, 7, 5, 5, 0), # 32
(6, 11, 9, 4, 2, 0, 9, 12, 2, 7, 2, 0), # 33
(4, 13, 6, 4, 1, 0, 12, 15, 8, 8, 4, 0), # 34
(8, 12, 10, 5, 2, 0, 3, 13, 8, 6, 3, 0), # 35
(4, 11, 6, 8, 2, 0, 9, 14, 4, 5, 2, 0), # 36
(8, 15, 5, 4, 2, 0, 10, 12, 9, 7, 2, 0), # 37
(3, 8, 7, 4, 2, 0, 5, 5, 11, 6, 5, 0), # 38
(2, 7, 9, 6, 0, 0, 6, 12, 6, 4, 8, 0), # 39
(5, 10, 8, 2, 4, 0, 4, 8, 11, 6, 1, 0), # 40
(3, 10, 12, 6, 3, 0, 5, 13, 7, 5, 2, 0), # 41
(7, 12, 8, 10, 0, 0, 10, 5, 7, 4, 3, 0), # 42
(6, 9, 6, 3, 1, 0, 9, 11, 7, 5, 8, 0), # 43
(4, 5, 12, 5, 5, 0, 6, 10, 8, 8, 2, 0), # 44
(8, 8, 9, 5, 4, 0, 10, 7, 7, 4, 1, 0), # 45
(5, 17, 10, 5, 3, 0, 7, 7, 3, 3, 3, 0), # 46
(5, 8, 11, 7, 4, 0, 7, 20, 4, 10, 1, 0), # 47
(1, 6, 11, 2, 2, 0, 2, 11, 5, 2, 4, 0), # 48
(3, 14, 14, 3, 2, 0, 8, 12, 5, 4, 5, 0), # 49
(5, 13, 8, 6, 1, 0, 5, 11, 6, 3, 5, 0), # 50
(4, 7, 12, 4, 2, 0, 9, 6, 4, 4, 6, 0), # 51
(5, 9, 12, 3, 2, 0, 5, 10, 7, 3, 3, 0), # 52
(2, 7, 9, 6, 2, 0, 11, 12, 6, 2, 1, 0), # 53
(3, 15, 11, 4, 1, 0, 7, 8, 6, 1, 2, 0), # 54
(9, 13, 8, 5, 1, 0, 9, 6, 6, 3, 4, 0), # 55
(7, 16, 5, 3, 1, 0, 5, 10, 2, 9, 4, 0), # 56
(3, 11, 9, 1, 1, 0, 2, 6, 6, 5, 1, 0), # 57
(3, 7, 8, 4, 4, 0, 9, 6, 3, 5, 4, 0), # 58
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 59
)
station_arriving_intensity = (
(4.239442493415277, 10.874337121212122, 12.79077763496144, 10.138043478260869, 11.428846153846154, 7.610869565217392), # 0
(4.27923521607648, 10.995266557940518, 12.859864860039991, 10.194503019323673, 11.51450641025641, 7.608275422705315), # 1
(4.318573563554774, 11.114402244668911, 12.927312196515281, 10.249719806763286, 11.598358974358975, 7.60560193236715), # 2
(4.357424143985952, 11.231615625000002, 12.993070372750644, 10.303646739130434, 11.680326923076926, 7.60284945652174), # 3
(4.395753565505805, 11.346778142536477, 13.057090117109396, 10.356236714975847, 11.760333333333335, 7.600018357487922), # 4
(4.433528436250122, 11.459761240881035, 13.11932215795487, 10.407442632850241, 11.838301282051281, 7.597108997584541), # 5
(4.470715364354698, 11.570436363636365, 13.179717223650389, 10.457217391304349, 11.914153846153846, 7.594121739130435), # 6
(4.507280957955322, 11.678674954405162, 13.238226042559269, 10.50551388888889, 11.987814102564105, 7.591056944444445), # 7
(4.543191825187787, 11.784348456790122, 13.294799343044847, 10.552285024154589, 12.059205128205129, 7.587914975845411), # 8
(4.578414574187884, 11.88732831439394, 13.34938785347044, 10.597483695652175, 12.12825, 7.584696195652175), # 9
(4.612915813091406, 11.987485970819305, 13.401942302199371, 10.64106280193237, 12.194871794871796, 7.581400966183574), # 10
(4.646662150034143, 12.084692869668913, 13.452413417594972, 10.682975241545895, 12.25899358974359, 7.578029649758455), # 11
(4.679620193151888, 12.178820454545454, 13.500751928020566, 10.723173913043478, 12.320538461538462, 7.574582608695652), # 12
(4.71175655058043, 12.26974016905163, 13.546908561839473, 10.761611714975846, 12.37942948717949, 7.5710602053140095), # 13
(4.743037830455566, 12.357323456790127, 13.590834047415022, 10.798241545893719, 12.435589743589743, 7.567462801932367), # 14
(4.773430640913081, 12.441441761363635, 13.632479113110538, 10.833016304347826, 12.488942307692309, 7.563790760869566), # 15
(4.802901590088772, 12.521966526374861, 13.671794487289347, 10.86588888888889, 12.539410256410257, 7.560044444444445), # 16
(4.831417286118428, 12.598769195426486, 13.708730898314768, 10.896812198067634, 12.586916666666667, 7.556224214975846), # 17
(4.8589443371378405, 12.671721212121213, 13.74323907455013, 10.925739130434785, 12.631384615384619, 7.552330434782609), # 18
(4.8854493512828014, 12.740694020061728, 13.775269744358756, 10.952622584541063, 12.67273717948718, 7.5483634661835755), # 19
(4.910898936689104, 12.805559062850728, 13.804773636103969, 10.9774154589372, 12.710897435897436, 7.544323671497584), # 20
(4.935259701492538, 12.866187784090906, 13.831701478149103, 11.000070652173914, 12.74578846153846, 7.540211413043479), # 21
(4.958498253828894, 12.922451627384962, 13.856003998857469, 11.020541062801932, 12.777333333333331, 7.5360270531400975), # 22
(4.980581201833967, 12.97422203633558, 13.877631926592404, 11.038779589371982, 12.805455128205129, 7.531770954106282), # 23
(5.001475153643547, 13.021370454545455, 13.896535989717222, 11.054739130434783, 12.830076923076923, 7.52744347826087), # 24
(5.0211467173934246, 13.063768325617284, 13.91266691659526, 11.068372584541065, 12.851121794871794, 7.523044987922706), # 25
(5.039562501219393, 13.101287093153758, 13.925975435589832, 11.079632850241545, 12.86851282051282, 7.518575845410628), # 26
(5.056689113257243, 13.133798200757575, 13.936412275064265, 11.088472826086958, 12.88217307692308, 7.514036413043479), # 27
(5.072493161642767, 13.161173092031426, 13.943928163381893, 11.09484541062802, 12.89202564102564, 7.509427053140097), # 28
(5.086941254511755, 13.183283210578004, 13.948473828906026, 11.09870350241546, 12.89799358974359, 7.504748128019324), # 29
(5.1000000000000005, 13.200000000000001, 13.950000000000001, 11.100000000000001, 12.9, 7.5), # 30
(5.112219245524297, 13.213886079545453, 13.948855917874395, 11.099765849673204, 12.89926985815603, 7.4934020156588375), # 31
(5.124174680306906, 13.227588636363638, 13.945456038647343, 11.099067973856208, 12.897095035460993, 7.483239613526571), # 32
(5.135871675191815, 13.241105965909092, 13.93984891304348, 11.097913235294119, 12.893498936170213, 7.469612293853072), # 33
(5.147315601023018, 13.254436363636366, 13.93208309178744, 11.096308496732028, 12.888504964539008, 7.452619556888223), # 34
(5.158511828644501, 13.267578124999998, 13.922207125603865, 11.094260620915033, 12.882136524822696, 7.432360902881893), # 35
(5.169465728900256, 13.280529545454549, 13.91026956521739, 11.091776470588236, 12.874417021276598, 7.408935832083959), # 36
(5.180182672634271, 13.293288920454547, 13.896318961352657, 11.088862908496733, 12.865369858156027, 7.382443844744294), # 37
(5.190668030690537, 13.305854545454546, 13.8804038647343, 11.08552679738562, 12.855018439716313, 7.352984441112776), # 38
(5.200927173913044, 13.318224715909091, 13.862572826086955, 11.081775, 12.843386170212765, 7.32065712143928), # 39
(5.21096547314578, 13.330397727272729, 13.842874396135267, 11.077614379084968, 12.830496453900707, 7.285561385973679), # 40
(5.220788299232737, 13.342371874999998, 13.821357125603866, 11.073051797385622, 12.816372695035462, 7.247796734965852), # 41
(5.230401023017903, 13.354145454545458, 13.798069565217393, 11.068094117647059, 12.801038297872342, 7.207462668665667), # 42
(5.239809015345269, 13.365716761363636, 13.773060265700483, 11.06274820261438, 12.784516666666667, 7.164658687323005), # 43
(5.249017647058824, 13.377084090909092, 13.746377777777779, 11.05702091503268, 12.76683120567376, 7.119484291187739), # 44
(5.258032289002557, 13.388245738636364, 13.718070652173916, 11.050919117647059, 12.748005319148938, 7.072038980509745), # 45
(5.266858312020461, 13.399200000000002, 13.688187439613529, 11.044449673202614, 12.72806241134752, 7.022422255538898), # 46
(5.275501086956522, 13.409945170454547, 13.656776690821255, 11.037619444444445, 12.707025886524825, 6.970733616525071), # 47
(5.283965984654732, 13.420479545454548, 13.623886956521739, 11.030435294117646, 12.68491914893617, 6.9170725637181425), # 48
(5.292258375959079, 13.430801420454543, 13.589566787439615, 11.022904084967323, 12.66176560283688, 6.861538597367982), # 49
(5.300383631713555, 13.440909090909088, 13.553864734299518, 11.015032679738564, 12.63758865248227, 6.804231217724471), # 50
(5.308347122762149, 13.450800852272728, 13.516829347826087, 11.006827941176471, 12.612411702127659, 6.7452499250374816), # 51
(5.316154219948849, 13.460475, 13.47850917874396, 10.998296732026144, 12.58625815602837, 6.684694219556889), # 52
(5.3238102941176475, 13.469929829545457, 13.438952777777779, 10.98944591503268, 12.559151418439718, 6.622663601532567), # 53
(5.331320716112533, 13.479163636363635, 13.398208695652173, 10.980282352941177, 12.531114893617023, 6.559257571214393), # 54
(5.338690856777493, 13.488174715909091, 13.356325483091787, 10.970812908496733, 12.502171985815604, 6.494575628852241), # 55
(5.3459260869565215, 13.496961363636363, 13.313351690821257, 10.961044444444445, 12.472346099290782, 6.428717274695986), # 56
(5.353031777493607, 13.505521875000003, 13.269335869565218, 10.950983823529413, 12.441660638297872, 6.361782008995502), # 57
(5.360013299232737, 13.513854545454544, 13.224326570048309, 10.940637908496733, 12.410139007092198, 6.293869332000667), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_arriving_acc = (
(3, 5, 8, 8, 6, 0, 10, 11, 8, 3, 2, 0), # 0
(8, 15, 19, 11, 9, 0, 14, 24, 13, 5, 4, 0), # 1
(12, 28, 27, 16, 12, 0, 21, 34, 17, 8, 8, 0), # 2
(18, 34, 40, 18, 14, 0, 31, 40, 20, 13, 11, 0), # 3
(22, 44, 51, 23, 15, 0, 41, 45, 25, 16, 15, 0), # 4
(28, 50, 65, 31, 16, 0, 48, 51, 31, 21, 17, 0), # 5
(33, 62, 77, 33, 16, 0, 55, 56, 38, 26, 18, 0), # 6
(39, 69, 90, 40, 20, 0, 60, 64, 45, 30, 22, 0), # 7
(45, 83, 96, 43, 21, 0, 65, 72, 54, 36, 26, 0), # 8
(53, 91, 106, 45, 22, 0, 70, 84, 57, 36, 31, 0), # 9
(60, 99, 114, 51, 22, 0, 78, 96, 60, 36, 33, 0), # 10
(64, 107, 121, 54, 27, 0, 88, 101, 70, 42, 37, 0), # 11
(66, 116, 134, 55, 31, 0, 98, 113, 73, 48, 38, 0), # 12
(71, 125, 139, 60, 32, 0, 102, 120, 77, 54, 39, 0), # 13
(73, 137, 144, 66, 32, 0, 106, 129, 86, 59, 41, 0), # 14
(78, 148, 151, 72, 33, 0, 115, 139, 95, 66, 42, 0), # 15
(86, 157, 154, 79, 35, 0, 124, 151, 105, 69, 43, 0), # 16
(91, 169, 159, 84, 35, 0, 130, 160, 109, 71, 45, 0), # 17
(101, 174, 161, 90, 39, 0, 137, 167, 119, 75, 50, 0), # 18
(106, 187, 168, 99, 41, 0, 145, 176, 122, 78, 53, 0), # 19
(108, 196, 180, 109, 46, 0, 153, 182, 128, 86, 56, 0), # 20
(114, 205, 187, 116, 48, 0, 155, 194, 136, 90, 57, 0), # 21
(115, 219, 195, 122, 49, 0, 159, 205, 142, 98, 58, 0), # 22
(117, 225, 209, 126, 50, 0, 167, 214, 153, 104, 61, 0), # 23
(123, 239, 214, 134, 51, 0, 177, 223, 159, 110, 64, 0), # 24
(125, 250, 224, 136, 52, 0, 184, 238, 165, 114, 67, 0), # 25
(128, 259, 234, 141, 56, 0, 189, 246, 173, 117, 69, 0), # 26
(131, 271, 239, 142, 59, 0, 198, 257, 177, 123, 70, 0), # 27
(138, 286, 251, 150, 59, 0, 203, 266, 186, 128, 73, 0), # 28
(145, 297, 258, 154, 60, 0, 206, 282, 191, 132, 74, 0), # 29
(154, 306, 264, 157, 64, 0, 210, 291, 198, 136, 75, 0), # 30
(165, 318, 266, 163, 68, 0, 219, 295, 208, 141, 78, 0), # 31
(176, 333, 271, 165, 69, 0, 221, 300, 215, 146, 83, 0), # 32
(182, 344, 280, 169, 71, 0, 230, 312, 217, 153, 85, 0), # 33
(186, 357, 286, 173, 72, 0, 242, 327, 225, 161, 89, 0), # 34
(194, 369, 296, 178, 74, 0, 245, 340, 233, 167, 92, 0), # 35
(198, 380, 302, 186, 76, 0, 254, 354, 237, 172, 94, 0), # 36
(206, 395, 307, 190, 78, 0, 264, 366, 246, 179, 96, 0), # 37
(209, 403, 314, 194, 80, 0, 269, 371, 257, 185, 101, 0), # 38
(211, 410, 323, 200, 80, 0, 275, 383, 263, 189, 109, 0), # 39
(216, 420, 331, 202, 84, 0, 279, 391, 274, 195, 110, 0), # 40
(219, 430, 343, 208, 87, 0, 284, 404, 281, 200, 112, 0), # 41
(226, 442, 351, 218, 87, 0, 294, 409, 288, 204, 115, 0), # 42
(232, 451, 357, 221, 88, 0, 303, 420, 295, 209, 123, 0), # 43
(236, 456, 369, 226, 93, 0, 309, 430, 303, 217, 125, 0), # 44
(244, 464, 378, 231, 97, 0, 319, 437, 310, 221, 126, 0), # 45
(249, 481, 388, 236, 100, 0, 326, 444, 313, 224, 129, 0), # 46
(254, 489, 399, 243, 104, 0, 333, 464, 317, 234, 130, 0), # 47
(255, 495, 410, 245, 106, 0, 335, 475, 322, 236, 134, 0), # 48
(258, 509, 424, 248, 108, 0, 343, 487, 327, 240, 139, 0), # 49
(263, 522, 432, 254, 109, 0, 348, 498, 333, 243, 144, 0), # 50
(267, 529, 444, 258, 111, 0, 357, 504, 337, 247, 150, 0), # 51
(272, 538, 456, 261, 113, 0, 362, 514, 344, 250, 153, 0), # 52
(274, 545, 465, 267, 115, 0, 373, 526, 350, 252, 154, 0), # 53
(277, 560, 476, 271, 116, 0, 380, 534, 356, 253, 156, 0), # 54
(286, 573, 484, 276, 117, 0, 389, 540, 362, 256, 160, 0), # 55
(293, 589, 489, 279, 118, 0, 394, 550, 364, 265, 164, 0), # 56
(296, 600, 498, 280, 119, 0, 396, 556, 370, 270, 165, 0), # 57
(299, 607, 506, 284, 123, 0, 405, 562, 373, 275, 169, 0), # 58
(299, 607, 506, 284, 123, 0, 405, 562, 373, 275, 169, 0), # 59
)
passenger_arriving_rate = (
(4.239442493415277, 8.699469696969697, 7.674466580976864, 4.055217391304347, 2.2857692307692306, 0.0, 7.610869565217392, 9.143076923076922, 6.082826086956521, 5.1163110539845755, 2.174867424242424, 0.0), # 0
(4.27923521607648, 8.796213246352414, 7.715918916023995, 4.077801207729468, 2.3029012820512818, 0.0, 7.608275422705315, 9.211605128205127, 6.116701811594203, 5.1439459440159965, 2.1990533115881035, 0.0), # 1
(4.318573563554774, 8.891521795735128, 7.7563873179091685, 4.099887922705314, 2.3196717948717946, 0.0, 7.60560193236715, 9.278687179487179, 6.1498318840579715, 5.170924878606112, 2.222880448933782, 0.0), # 2
(4.357424143985952, 8.9852925, 7.795842223650386, 4.121458695652173, 2.336065384615385, 0.0, 7.60284945652174, 9.34426153846154, 6.18218804347826, 5.197228149100257, 2.246323125, 0.0), # 3
(4.395753565505805, 9.07742251402918, 7.834254070265637, 4.142494685990338, 2.352066666666667, 0.0, 7.600018357487922, 9.408266666666668, 6.213742028985508, 5.222836046843758, 2.269355628507295, 0.0), # 4
(4.433528436250122, 9.167808992704828, 7.8715932947729215, 4.1629770531400965, 2.367660256410256, 0.0, 7.597108997584541, 9.470641025641024, 6.244465579710145, 5.247728863181948, 2.291952248176207, 0.0), # 5
(4.470715364354698, 9.25634909090909, 7.907830334190233, 4.182886956521739, 2.382830769230769, 0.0, 7.594121739130435, 9.531323076923076, 6.274330434782609, 5.271886889460156, 2.3140872727272725, 0.0), # 6
(4.507280957955322, 9.34293996352413, 7.942935625535561, 4.2022055555555555, 2.397562820512821, 0.0, 7.591056944444445, 9.590251282051284, 6.303308333333334, 5.295290417023708, 2.3357349908810323, 0.0), # 7
(4.543191825187787, 9.427478765432097, 7.976879605826908, 4.220914009661835, 2.4118410256410256, 0.0, 7.587914975845411, 9.647364102564103, 6.3313710144927535, 5.317919737217938, 2.3568696913580243, 0.0), # 8
(4.578414574187884, 9.509862651515151, 8.009632712082263, 4.23899347826087, 2.4256499999999996, 0.0, 7.584696195652175, 9.702599999999999, 6.358490217391305, 5.339755141388175, 2.377465662878788, 0.0), # 9
(4.612915813091406, 9.589988776655444, 8.041165381319622, 4.256425120772947, 2.438974358974359, 0.0, 7.581400966183574, 9.755897435897436, 6.384637681159421, 5.360776920879748, 2.397497194163861, 0.0), # 10
(4.646662150034143, 9.66775429573513, 8.071448050556983, 4.273190096618357, 2.4517987179487175, 0.0, 7.578029649758455, 9.80719487179487, 6.409785144927537, 5.380965367037988, 2.4169385739337823, 0.0), # 11
(4.679620193151888, 9.743056363636363, 8.100451156812339, 4.289269565217391, 2.4641076923076923, 0.0, 7.574582608695652, 9.85643076923077, 6.433904347826087, 5.400300771208226, 2.4357640909090907, 0.0), # 12
(4.71175655058043, 9.815792135241303, 8.128145137103683, 4.304644685990338, 2.475885897435898, 0.0, 7.5710602053140095, 9.903543589743592, 6.456967028985507, 5.418763424735789, 2.4539480338103257, 0.0), # 13
(4.743037830455566, 9.8858587654321, 8.154500428449014, 4.3192966183574875, 2.4871179487179482, 0.0, 7.567462801932367, 9.948471794871793, 6.478944927536231, 5.4363336189660085, 2.471464691358025, 0.0), # 14
(4.773430640913081, 9.953153409090907, 8.179487467866322, 4.33320652173913, 2.4977884615384616, 0.0, 7.563790760869566, 9.991153846153846, 6.499809782608695, 5.452991645244214, 2.488288352272727, 0.0), # 15
(4.802901590088772, 10.017573221099887, 8.203076692373608, 4.346355555555555, 2.507882051282051, 0.0, 7.560044444444445, 10.031528205128204, 6.519533333333333, 5.468717794915738, 2.504393305274972, 0.0), # 16
(4.831417286118428, 10.079015356341188, 8.22523853898886, 4.358724879227053, 2.517383333333333, 0.0, 7.556224214975846, 10.069533333333332, 6.538087318840581, 5.483492359325907, 2.519753839085297, 0.0), # 17
(4.8589443371378405, 10.13737696969697, 8.245943444730077, 4.370295652173914, 2.5262769230769235, 0.0, 7.552330434782609, 10.105107692307694, 6.55544347826087, 5.4972956298200515, 2.5343442424242424, 0.0), # 18
(4.8854493512828014, 10.192555216049382, 8.265161846615253, 4.381049033816424, 2.534547435897436, 0.0, 7.5483634661835755, 10.138189743589743, 6.571573550724637, 5.510107897743501, 2.5481388040123454, 0.0), # 19
(4.910898936689104, 10.244447250280581, 8.282864181662381, 4.3909661835748794, 2.542179487179487, 0.0, 7.544323671497584, 10.168717948717948, 6.58644927536232, 5.5219094544415865, 2.5611118125701453, 0.0), # 20
(4.935259701492538, 10.292950227272724, 8.299020886889462, 4.400028260869565, 2.5491576923076917, 0.0, 7.540211413043479, 10.196630769230767, 6.600042391304348, 5.53268059125964, 2.573237556818181, 0.0), # 21
(4.958498253828894, 10.337961301907969, 8.313602399314481, 4.408216425120773, 2.555466666666666, 0.0, 7.5360270531400975, 10.221866666666664, 6.6123246376811595, 5.542401599542987, 2.584490325476992, 0.0), # 22
(4.980581201833967, 10.379377629068463, 8.326579155955441, 4.415511835748792, 2.5610910256410255, 0.0, 7.531770954106282, 10.244364102564102, 6.623267753623189, 5.551052770636961, 2.5948444072671157, 0.0), # 23
(5.001475153643547, 10.417096363636363, 8.337921593830332, 4.421895652173912, 2.5660153846153846, 0.0, 7.52744347826087, 10.264061538461538, 6.632843478260869, 5.558614395886888, 2.6042740909090907, 0.0), # 24
(5.0211467173934246, 10.451014660493826, 8.347600149957156, 4.427349033816426, 2.5702243589743587, 0.0, 7.523044987922706, 10.280897435897435, 6.641023550724639, 5.565066766638103, 2.6127536651234564, 0.0), # 25
(5.039562501219393, 10.481029674523006, 8.355585261353898, 4.431853140096617, 2.5737025641025637, 0.0, 7.518575845410628, 10.294810256410255, 6.647779710144927, 5.570390174235932, 2.6202574186307515, 0.0), # 26
(5.056689113257243, 10.507038560606059, 8.361847365038559, 4.435389130434783, 2.5764346153846156, 0.0, 7.514036413043479, 10.305738461538462, 6.653083695652175, 5.574564910025706, 2.6267596401515148, 0.0), # 27
(5.072493161642767, 10.52893847362514, 8.366356898029135, 4.437938164251207, 2.578405128205128, 0.0, 7.509427053140097, 10.313620512820512, 6.656907246376812, 5.5775712653527565, 2.632234618406285, 0.0), # 28
(5.086941254511755, 10.546626568462402, 8.369084297343615, 4.439481400966184, 2.579598717948718, 0.0, 7.504748128019324, 10.318394871794872, 6.659222101449276, 5.57938953156241, 2.6366566421156006, 0.0), # 29
(5.1000000000000005, 10.56, 8.370000000000001, 4.44, 2.58, 0.0, 7.5, 10.32, 6.660000000000001, 5.58, 2.64, 0.0), # 30
(5.112219245524297, 10.571108863636361, 8.369313550724637, 4.439906339869282, 2.5798539716312057, 0.0, 7.4934020156588375, 10.319415886524823, 6.659859509803923, 5.579542367149758, 2.6427772159090903, 0.0), # 31
(5.124174680306906, 10.582070909090909, 8.367273623188405, 4.439627189542483, 2.5794190070921985, 0.0, 7.483239613526571, 10.317676028368794, 6.659440784313724, 5.578182415458937, 2.6455177272727273, 0.0), # 32
(5.135871675191815, 10.592884772727274, 8.363909347826088, 4.439165294117647, 2.5786997872340423, 0.0, 7.469612293853072, 10.314799148936169, 6.658747941176471, 5.575939565217392, 2.6482211931818185, 0.0), # 33
(5.147315601023018, 10.603549090909091, 8.359249855072465, 4.438523398692811, 2.5777009929078014, 0.0, 7.452619556888223, 10.310803971631206, 6.657785098039217, 5.572833236714976, 2.6508872727272728, 0.0), # 34
(5.158511828644501, 10.614062499999998, 8.353324275362318, 4.437704248366013, 2.576427304964539, 0.0, 7.432360902881893, 10.305709219858157, 6.65655637254902, 5.568882850241546, 2.6535156249999994, 0.0), # 35
(5.169465728900256, 10.624423636363638, 8.346161739130434, 4.436710588235294, 2.5748834042553193, 0.0, 7.408935832083959, 10.299533617021277, 6.655065882352941, 5.564107826086956, 2.6561059090909094, 0.0), # 36
(5.180182672634271, 10.634631136363637, 8.337791376811595, 4.435545163398693, 2.573073971631205, 0.0, 7.382443844744294, 10.29229588652482, 6.65331774509804, 5.558527584541062, 2.6586577840909094, 0.0), # 37
(5.190668030690537, 10.644683636363636, 8.32824231884058, 4.4342107189542475, 2.5710036879432625, 0.0, 7.352984441112776, 10.28401475177305, 6.651316078431372, 5.5521615458937195, 2.661170909090909, 0.0), # 38
(5.200927173913044, 10.654579772727272, 8.317543695652173, 4.43271, 2.568677234042553, 0.0, 7.32065712143928, 10.274708936170212, 6.649065, 5.545029130434782, 2.663644943181818, 0.0), # 39
(5.21096547314578, 10.664318181818182, 8.305724637681159, 4.431045751633987, 2.566099290780141, 0.0, 7.285561385973679, 10.264397163120565, 6.646568627450981, 5.537149758454106, 2.6660795454545454, 0.0), # 40
(5.220788299232737, 10.673897499999997, 8.29281427536232, 4.429220718954248, 2.563274539007092, 0.0, 7.247796734965852, 10.253098156028368, 6.643831078431373, 5.5285428502415455, 2.6684743749999993, 0.0), # 41
(5.230401023017903, 10.683316363636365, 8.278841739130435, 4.427237647058823, 2.560207659574468, 0.0, 7.207462668665667, 10.240830638297872, 6.640856470588235, 5.519227826086957, 2.6708290909090913, 0.0), # 42
(5.239809015345269, 10.692573409090908, 8.26383615942029, 4.4250992810457515, 2.556903333333333, 0.0, 7.164658687323005, 10.227613333333332, 6.637648921568627, 5.509224106280192, 2.673143352272727, 0.0), # 43
(5.249017647058824, 10.701667272727272, 8.247826666666667, 4.422808366013072, 2.5533662411347517, 0.0, 7.119484291187739, 10.213464964539007, 6.634212549019608, 5.498551111111111, 2.675416818181818, 0.0), # 44
(5.258032289002557, 10.71059659090909, 8.23084239130435, 4.420367647058823, 2.5496010638297872, 0.0, 7.072038980509745, 10.198404255319149, 6.630551470588235, 5.487228260869566, 2.6776491477272724, 0.0), # 45
(5.266858312020461, 10.71936, 8.212912463768117, 4.417779869281045, 2.5456124822695037, 0.0, 7.022422255538898, 10.182449929078015, 6.626669803921568, 5.475274975845411, 2.67984, 0.0), # 46
(5.275501086956522, 10.727956136363636, 8.194066014492753, 4.415047777777778, 2.5414051773049646, 0.0, 6.970733616525071, 10.165620709219858, 6.6225716666666665, 5.462710676328501, 2.681989034090909, 0.0), # 47
(5.283965984654732, 10.736383636363637, 8.174332173913044, 4.412174117647059, 2.536983829787234, 0.0, 6.9170725637181425, 10.147935319148935, 6.618261176470588, 5.449554782608695, 2.6840959090909093, 0.0), # 48
(5.292258375959079, 10.744641136363633, 8.15374007246377, 4.409161633986929, 2.5323531205673757, 0.0, 6.861538597367982, 10.129412482269503, 6.613742450980394, 5.435826714975845, 2.6861602840909082, 0.0), # 49
(5.300383631713555, 10.752727272727268, 8.13231884057971, 4.406013071895425, 2.527517730496454, 0.0, 6.804231217724471, 10.110070921985816, 6.6090196078431385, 5.421545893719807, 2.688181818181817, 0.0), # 50
(5.308347122762149, 10.760640681818181, 8.110097608695652, 4.4027311764705885, 2.5224823404255314, 0.0, 6.7452499250374816, 10.089929361702126, 6.604096764705883, 5.406731739130435, 2.6901601704545453, 0.0), # 51
(5.316154219948849, 10.768379999999999, 8.087105507246376, 4.399318692810457, 2.517251631205674, 0.0, 6.684694219556889, 10.069006524822695, 6.5989780392156865, 5.391403671497584, 2.6920949999999997, 0.0), # 52
(5.3238102941176475, 10.775943863636364, 8.063371666666667, 4.395778366013072, 2.5118302836879436, 0.0, 6.622663601532567, 10.047321134751774, 6.593667549019608, 5.375581111111111, 2.693985965909091, 0.0), # 53
(5.331320716112533, 10.783330909090907, 8.038925217391304, 4.392112941176471, 2.5062229787234043, 0.0, 6.559257571214393, 10.024891914893617, 6.5881694117647065, 5.359283478260869, 2.6958327272727267, 0.0), # 54
(5.338690856777493, 10.790539772727271, 8.013795289855072, 4.388325163398693, 2.5004343971631204, 0.0, 6.494575628852241, 10.001737588652482, 6.58248774509804, 5.342530193236715, 2.697634943181818, 0.0), # 55
(5.3459260869565215, 10.79756909090909, 7.988011014492754, 4.384417777777777, 2.494469219858156, 0.0, 6.428717274695986, 9.977876879432625, 6.576626666666667, 5.325340676328502, 2.6993922727272723, 0.0), # 56
(5.353031777493607, 10.804417500000001, 7.96160152173913, 4.380393529411765, 2.4883321276595742, 0.0, 6.361782008995502, 9.953328510638297, 6.570590294117648, 5.307734347826087, 2.7011043750000003, 0.0), # 57
(5.360013299232737, 10.811083636363634, 7.934595942028984, 4.376255163398692, 2.4820278014184396, 0.0, 6.293869332000667, 9.928111205673758, 6.564382745098039, 5.289730628019323, 2.7027709090909084, 0.0), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_allighting_rate = (
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 0
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 1
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 2
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 3
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 4
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 5
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 6
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 7
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 8
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 9
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 10
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 11
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 12
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 13
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 14
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 15
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 16
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 17
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 18
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 19
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 20
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 21
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 22
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 23
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 24
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 25
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 26
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 27
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 28
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 29
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 30
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 31
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 32
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 33
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 34
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 35
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 36
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 37
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 38
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 39
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 40
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 41
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 42
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 43
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 44
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 45
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 46
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 47
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 48
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 49
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 50
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 51
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 52
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 53
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 54
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 55
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 56
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 57
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 58
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 59
)
"""
parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html
"""
#initial entropy
entropy = 258194110137029475889902652135037600173
#index for seed sequence child
child_seed_index = (
1, # 0
60, # 1
)
| 113.680597 | 214 | 0.730483 | 5,147 | 38,083 | 5.402759 | 0.231591 | 0.310702 | 0.245972 | 0.466053 | 0.326093 | 0.325662 | 0.325662 | 0.325662 | 0.325662 | 0.325662 | 0 | 0.820072 | 0.118531 | 38,083 | 334 | 215 | 114.020958 | 0.008311 | 0.031799 | 0 | 0.202532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.015823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
e1ecba45d271166cdd0cee21d7be8a6120474ad9 | 99,392 | py | Python | sigProfilerPlotting/sample_portrait.py | AlexandrovLab/SigProfilerPlotting | 1a1549de41fda13043028ef8933ad789ca039bba | [
"BSD-2-Clause"
] | 27 | 2019-06-21T03:29:03.000Z | 2022-02-28T16:51:58.000Z | build/lib/sigProfilerPlotting/sample_portrait.py | AlexandrovLab/SigProfilerPlotting | 1a1549de41fda13043028ef8933ad789ca039bba | [
"BSD-2-Clause"
] | 4 | 2019-10-16T14:45:34.000Z | 2020-11-04T17:45:42.000Z | sigProfilerPlotting/sample_portrait.py | xtmgah/SigProfilerPlotting | 8fbef65cbf74a1b07f2aa524ab5f624ca0869e52 | [
"BSD-2-Clause"
] | 18 | 2019-07-02T13:39:52.000Z | 2022-02-01T19:36:02.000Z | #!/usr/bin/env python3
#Author: Erik Bergstrom
#Contact: ebergstr@eng.ucsd.edu
import re
import os
import sys
import argparse
from collections import OrderedDict
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.font_manager
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.patches as mplpatches
def samplePortrait (sample_matrices_path, output_path, project, percentage=False):
pcawg = False
sig_probs = False
if sample_matrices_path[-1] != "/":
sample_matrices_path += "/"
sample_matrices_path += "output/"
pp = PdfPages(output_path + 'sample_portrait_' + project + '.pdf')
mutations_6 = OrderedDict()
mutations_24 = OrderedDict()
mutations_96 = OrderedDict()
mutations_384 = OrderedDict()
mutations_1536 = OrderedDict()
mutations_6144 = OrderedDict()
mutations_5 = OrderedDict()
mutations_3 = OrderedDict()
mutations_78 = OrderedDict()
mutations_312 = OrderedDict()
mutations_83 = OrderedDict()
mutations_ID96 = OrderedDict()
mutations_simple = OrderedDict()
file_example = os.listdir(sample_matrices_path + "SBS/")[1]
# if '.DS_Store' in file_example:
# file_example.remove('.DS_Store')
file_extension = file_example.split(".")[-1]
file_extension = "all"
SBS96 = True
SBS6 = True
SBS24 = True
SBS384 = True
SBS1536 = True
SBS6144 = True
ID28 = True
ID83 = True
ID96 = True
DBS78 = True
DBS312 = True
########### Gather mutation counts ##############################
try:
samples = []
with open(sample_matrices_path + "SBS/" + project + ".SBS96." + file_extension) as f:
next(f)
first_line = f.readline()
first_line = first_line.strip().split()
if first_line[0][1] == ">":
pcawg = True
if first_line[0][5] != "]" and first_line[0][1] != ">":
sys.exit("The matrix does not match the correct SBS96 format. Please check you formatting and rerun this plotting function.")
total_count = []
with open (sample_matrices_path + "SBS/" + project + ".SBS96." + file_extension) as f:
first_line = f.readline()
if pcawg:
samples = first_line.strip().split(",")
samples = samples[2:]
else:
samples = first_line.strip().split("\t")
samples = samples[1:]
for sample in samples:
mutations_96[sample] = OrderedDict()
mutations_96[sample]['C>A'] = OrderedDict()
mutations_96[sample]['C>G'] = OrderedDict()
mutations_96[sample]['C>T'] = OrderedDict()
mutations_96[sample]['T>A'] = OrderedDict()
mutations_96[sample]['T>C'] = OrderedDict()
mutations_96[sample]['T>G'] = OrderedDict()
for lines in f:
if pcawg:
line = lines.strip().split(",")
mut_type = line[0]
nuc = line[1][0] + "[" + mut_type + "]" + line[1][2]
sample_index = 2
else:
line = lines.strip().split()
nuc = line[0]
mut_type = line[0][2:5]
sample_index = 1
for sample in samples:
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
mutations_96[sample][mut_type][nuc] = mutCount
sample_index += 1
except:
SBS96 = False
print("No SBS-96 provided")
########################### SBS-6 ################################################
if True:
#try:
with open (sample_matrices_path + "SBS/" + project + ".SBS6." + file_extension) as f:
first_line = f.readline()
for sample in samples:
mutations_6[sample] = OrderedDict()
mutations_6[sample]['C>A'] = 0
mutations_6[sample]['C>G'] = 0
mutations_6[sample]['C>T'] = 0
mutations_6[sample]['T>A'] = 0
mutations_6[sample]['T>C'] = 0
mutations_6[sample]['T>G'] = 0
for lines in f:
line = lines.strip().split()
nuc = line[0]
mut_type = line[0]
sample_index = 1
for sample in samples:
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
mutations_6[sample][mut_type] = mutCount
sample_index += 1
#except:
# SBS6 = False
# print("No SBS-6 provided")
########################### SBS-24 ################################################
try:
with open (sample_matrices_path + "SBS/" + project + ".SBS24." + file_extension) as f:
first_line = f.readline()
for sample in samples:
mutations_24[sample] = OrderedDict()
mutations_24[sample]['C>A'] = [0,0]
mutations_24[sample]['C>G'] = [0,0]
mutations_24[sample]['C>T'] = [0,0]
mutations_24[sample]['T>A'] = [0,0]
mutations_24[sample]['T>C'] = [0,0]
mutations_24[sample]['T>G'] = [0,0]
for lines in f:
line = lines.strip().split()
nuc = line[0][2:]
bias = line[0][0]
if bias == 'N' or bias == 'B':
continue
else:
sample_index = 1
for sample in samples:
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
if bias == 'T':
mutations_24[sample][nuc][0] = mutCount
else:
mutations_24[sample][nuc][1] = mutCount
sample_index += 1
except:
SBS24 = False
print("No SBS-24 provided")
########################### SBS-384 ################################################
try:
with open (sample_matrices_path + "SBS/" + project + ".SBS384." + file_extension) as f:
first_line = f.readline()
for sample in samples:
mutations_384[sample] = OrderedDict()
mutations_384[sample]['C>A'] = OrderedDict()
mutations_384[sample]['C>G'] = OrderedDict()
mutations_384[sample]['C>T'] = OrderedDict()
mutations_384[sample]['T>A'] = OrderedDict()
mutations_384[sample]['T>C'] = OrderedDict()
mutations_384[sample]['T>G'] = OrderedDict()
for lines in f:
if pcawg:
line = lines.strip().split(",")
line = [x.replace('"','') for x in line]
nuc = line[2][0] + "[" + line[1] + "]" + line[2][2]
bias = line[0][0]
else:
line = lines.strip().split()
nuc = line[0][2:]
bias = line[0][0]
if bias == 'N' or bias == 'B':
continue
else:
if pcawg:
mut_type = line[1]
sample_index = 3
else:
mut_type = line[0][4:7]
sample_index = 1
for sample in samples:
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
if nuc not in mutations_384[sample][mut_type].keys():
mutations_384[sample][mut_type][nuc] = [0,0]
if bias == 'T':
mutations_384[sample][mut_type][nuc][0] = mutCount
else:
mutations_384[sample][mut_type][nuc][1] = mutCount
sample_index += 1
except:
SBS384 = False
print("No SBS-384 provided")
########################### SBS-1536 ################################################
try:
mutations_1536 = OrderedDict()
mutations_5 = OrderedDict()
mutations_3 = OrderedDict()
max_count = {}
max_all = {}
max_5 = {}
max_3 = {}
total_count = []
total_counts = {'TT':0, 'TG':0,'TC':0,'TA':0,
'GT':0,'GG':0,'GC':0,'GA':0,
'CT':0,'CG':0,'CC':0,'CA':0,
'AT':0,'AG':0,'AC':0,'AA':0,}
total_counts_5 = {'T':0, 'G':0,'C':0,'A':0}
total_counts_3 = {'T':0, 'G':0,'C':0,'A':0}
with open (sample_matrices_path + "SBS/" + project + ".SBS1536." + file_extension) as f:
first_line = f.readline()
if pcawg:
samples = first_line.strip().split(",")
samples = samples[2:]
samples = [x.replace('"','') for x in samples]
# else:
# samples = first_line.strip().split("\t")
# samples = samples[1:]
for sample in samples:
max_all[sample] = 0
max_5[sample] = 0
max_3[sample] = 0
total_counts[sample]= {'TT':0, 'TG':0,'TC':0,'TA':0,
'GT':0,'GG':0,'GC':0,'GA':0,
'CT':0,'CG':0,'CC':0,'CA':0,
'AT':0,'AG':0,'AC':0,'AA':0,}
total_counts_5[sample]= {'T':0, 'G':0,'C':0,'A':0}
total_counts_3[sample]= {'T':0, 'G':0,'C':0,'A':0}
# mutations_96[sample] = OrderedDict()
# mutations_96[sample]['C>A'] = OrderedDict()
# mutations_96[sample]['C>G'] = OrderedDict()
# mutations_96[sample]['C>T'] = OrderedDict()
# mutations_96[sample]['T>A'] = OrderedDict()
# mutations_96[sample]['T>C'] = OrderedDict()
# mutations_96[sample]['T>G'] = OrderedDict()
max_count[sample] = 0
mutations_1536[sample] = OrderedDict()
mutations_5[sample] = OrderedDict()
mutations_3[sample] = OrderedDict()
mutations_1536[sample]['C>A'] = OrderedDict()
mutations_5[sample]['C>A'] = OrderedDict()
mutations_3[sample]['C>A'] = OrderedDict()
mutations_1536[sample]['C>A'] = {'TT':OrderedDict(), 'TG':OrderedDict(), 'TC':OrderedDict(), 'TA':OrderedDict(),
'GT':OrderedDict(), 'GG':OrderedDict(), 'GC':OrderedDict(), 'GA':OrderedDict(),
'CT':OrderedDict(), 'CG':OrderedDict(), 'CC':OrderedDict(), 'CA':OrderedDict(),
'AT':OrderedDict(), 'AG':OrderedDict(), 'AC':OrderedDict(), 'AA':OrderedDict()}
mutations_5[sample]['C>A'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_3[sample]['C>A'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_1536[sample]['C>G'] = OrderedDict()
mutations_5[sample]['C>G'] = OrderedDict()
mutations_3[sample]['C>G'] = OrderedDict()
mutations_1536[sample]['C>G'] = {'TT':OrderedDict(), 'TG':OrderedDict(), 'TC':OrderedDict(), 'TA':OrderedDict(),
'GT':OrderedDict(), 'GG':OrderedDict(), 'GC':OrderedDict(), 'GA':OrderedDict(),
'CT':OrderedDict(), 'CG':OrderedDict(), 'CC':OrderedDict(), 'CA':OrderedDict(),
'AT':OrderedDict(), 'AG':OrderedDict(), 'AC':OrderedDict(), 'AA':OrderedDict()}
mutations_5[sample]['C>G'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_3[sample]['C>G'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_1536[sample]['C>T'] = OrderedDict()
mutations_5[sample]['C>T'] = OrderedDict()
mutations_3[sample]['C>T'] = OrderedDict()
mutations_1536[sample]['C>T'] = {'TT':OrderedDict(), 'TG':OrderedDict(), 'TC':OrderedDict(), 'TA':OrderedDict(),
'GT':OrderedDict(), 'GG':OrderedDict(), 'GC':OrderedDict(), 'GA':OrderedDict(),
'CT':OrderedDict(), 'CG':OrderedDict(), 'CC':OrderedDict(), 'CA':OrderedDict(),
'AT':OrderedDict(), 'AG':OrderedDict(), 'AC':OrderedDict(), 'AA':OrderedDict()}
mutations_5[sample]['C>T'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_3[sample]['C>T'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_1536[sample]['T>A'] = OrderedDict()
mutations_5[sample]['T>A'] = OrderedDict()
mutations_3[sample]['T>A'] = OrderedDict()
mutations_1536[sample]['T>A'] = {'TT':OrderedDict(), 'TG':OrderedDict(), 'TC':OrderedDict(), 'TA':OrderedDict(),
'GT':OrderedDict(), 'GG':OrderedDict(), 'GC':OrderedDict(), 'GA':OrderedDict(),
'CT':OrderedDict(), 'CG':OrderedDict(), 'CC':OrderedDict(), 'CA':OrderedDict(),
'AT':OrderedDict(), 'AG':OrderedDict(), 'AC':OrderedDict(), 'AA':OrderedDict()}
mutations_5[sample]['T>A'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_3[sample]['T>A'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_1536[sample]['T>C'] = OrderedDict()
mutations_5[sample]['T>C'] = OrderedDict()
mutations_3[sample]['T>C'] = OrderedDict()
mutations_1536[sample]['T>C'] = {'TT':OrderedDict(), 'TG':OrderedDict(), 'TC':OrderedDict(), 'TA':OrderedDict(),
'GT':OrderedDict(), 'GG':OrderedDict(), 'GC':OrderedDict(), 'GA':OrderedDict(),
'CT':OrderedDict(), 'CG':OrderedDict(), 'CC':OrderedDict(), 'CA':OrderedDict(),
'AT':OrderedDict(), 'AG':OrderedDict(), 'AC':OrderedDict(), 'AA':OrderedDict()}
mutations_5[sample]['T>C'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_3[sample]['T>C'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_1536[sample]['T>G'] = OrderedDict()
mutations_5[sample]['T>G'] = OrderedDict()
mutations_3[sample]['T>G'] = OrderedDict()
mutations_1536[sample]['T>G'] = {'TT':OrderedDict(), 'TG':OrderedDict(), 'TC':OrderedDict(), 'TA':OrderedDict(),
'GT':OrderedDict(), 'GG':OrderedDict(), 'GC':OrderedDict(), 'GA':OrderedDict(),
'CT':OrderedDict(), 'CG':OrderedDict(), 'CC':OrderedDict(), 'CA':OrderedDict(),
'AT':OrderedDict(), 'AG':OrderedDict(), 'AC':OrderedDict(), 'AA':OrderedDict()}
mutations_5[sample]['T>G'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
mutations_3[sample]['T>G'] = {'T':OrderedDict(),'G':OrderedDict(),'C':OrderedDict(),'A':OrderedDict()}
for lines in f:
if pcawg:
line = lines.strip().split(",")
line = [x.replace('"','') for x in line]
nuc = line[1][0:2] + "[" + line[0] + "]" + line[1][3:]
mut_type = line[0]
penta_key = line[1][0] + line[1][-1]
tri_key = line[1][1] + line[1][-2]
sample_index = 2
else:
line = lines.strip().split()
nuc = line[0]
mut_type = line[0][3:6]
penta_key = line[0][0] + line[0][-1]
tri_key = line[0][1] + line[0][-2]
sample_index = 1
tri = line[0][1:8]
for sample in samples:
if tri not in mutations_96[sample][mut_type]:
mutations_96[sample][mut_type][tri] = 0
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
if pcawg:
sample_ref = sample_index - 2
else:
sample_ref = sample_index - 1
if mutCount > max_count[samples[sample_ref]]:
max_count[samples[sample_ref]] = mutCount
if mutCount > max_all[sample]:
max_all[sample] = mutCount
mutations_1536[sample][mut_type][penta_key][tri_key] = mutCount
total_counts[sample][penta_key] += mutCount
total_counts_5[sample][penta_key[0]] += mutCount
total_counts_3[sample][penta_key[1]] += mutCount
penta_key_short = penta_key[0]
mutations_5[sample][mut_type][penta_key_short][tri_key] = 0
mutations_3[sample][mut_type][penta_key_short][tri_key] = 0
#mutations_96[sample][mut_type][tri] += mutCount
sample_index += 1
except:
SBS1536 = False
print("No SBS-1536 provided")
########################### ID-83 ################################################
try:
indel_types = ['1:Del:C:0', '1:Del:C:1', '1:Del:C:2', '1:Del:C:3', '1:Del:C:4', '1:Del:C:5',
'1:Del:T:0', '1:Del:T:1', '1:Del:T:2', '1:Del:T:3', '1:Del:T:4', '1:Del:T:5',
'1:Ins:C:0', '1:Ins:C:1', '1:Ins:C:2', '1:Ins:C:3', '1:Ins:C:4', '1:Ins:C:5',
'1:Ins:T:0', '1:Ins:T:1', '1:Ins:T:2', '1:Ins:T:3', '1:Ins:T:4', '1:Ins:T:5',
# >1bp INDELS
'2:Del:R:0', '2:Del:R:1', '2:Del:R:2', '2:Del:R:3', '2:Del:R:4', '2:Del:R:5',
'3:Del:R:0', '3:Del:R:1', '3:Del:R:2', '3:Del:R:3', '3:Del:R:4', '3:Del:R:5',
'4:Del:R:0', '4:Del:R:1', '4:Del:R:2', '4:Del:R:3', '4:Del:R:4', '4:Del:R:5',
'5:Del:R:0', '5:Del:R:1', '5:Del:R:2', '5:Del:R:3', '5:Del:R:4', '5:Del:R:5',
'2:Ins:R:0', '2:Ins:R:1', '2:Ins:R:2', '2:Ins:R:3', '2:Ins:R:4', '2:Ins:R:5',
'3:Ins:R:0', '3:Ins:R:1', '3:Ins:R:2', '3:Ins:R:3', '3:Ins:R:4', '3:Ins:R:5',
'4:Ins:R:0', '4:Ins:R:1', '4:Ins:R:2', '4:Ins:R:3', '4:Ins:R:4', '4:Ins:R:5',
'5:Ins:R:0', '5:Ins:R:1', '5:Ins:R:2', '5:Ins:R:3', '5:Ins:R:4', '5:Ins:R:5',
#MicroHomology INDELS
'2:Del:M:1', '3:Del:M:1', '3:Del:M:2', '4:Del:M:1', '4:Del:M:2', '4:Del:M:3',
'5:Del:M:1', '5:Del:M:2', '5:Del:M:3', '5:Del:M:4', '5:Del:M:5', '2:Ins:M:1',
'3:Ins:M:1', '3:Ins:M:2', '4:Ins:M:1', '4:Ins:M:2', '4:Ins:M:3', '5:Ins:M:1',
'5:Ins:M:2', '5:Ins:M:3', '5:Ins:M:4', '5:Ins:M:5']
mutations = OrderedDict()
with open (sample_matrices_path + "ID/" + project + ".ID83." + file_extension) as f:
first_line = f.readline()
for sample in samples:
mutations_83[sample] = OrderedDict()
mutations_83[sample]['1DelC'] = [0,0,0,0,0,0]
mutations_83[sample]['1DelT'] = [0,0,0,0,0,0]
mutations_83[sample]['1InsC'] = [0,0,0,0,0,0]
mutations_83[sample]['1InsT'] = [0,0,0,0,0,0]
mutations_83[sample]['2DelR'] = [0,0,0,0,0,0]
mutations_83[sample]['3DelR'] = [0,0,0,0,0,0]
mutations_83[sample]['4DelR'] = [0,0,0,0,0,0]
mutations_83[sample]['5DelR'] = [0,0,0,0,0,0]
mutations_83[sample]['2InsR'] = [0,0,0,0,0,0]
mutations_83[sample]['3InsR'] = [0,0,0,0,0,0]
mutations_83[sample]['3InsR'] = [0,0,0,0,0,0]
mutations_83[sample]['4InsR'] = [0,0,0,0,0,0]
mutations_83[sample]['5InsR'] = [0,0,0,0,0,0]
mutations_83[sample]['2DelM'] = [0]
mutations_83[sample]['3DelM'] = [0,0]
mutations_83[sample]['4DelM'] = [0,0,0]
mutations_83[sample]['5DelM'] = [0,0,0,0,0]
for lines in f:
if pcawg:
line = lines.strip().split(",")
line = [x.replace('"','') for x in line]
if line[1] == 'repeats':
mut_type = line[2][0] + line[0][0] + line[0][1].lower() + line[0][2].lower() + "R"
else:
mut_type = line[2][0] + line[0][0] + line[0][1].lower() + line[0][2].lower() + line[1][0]
try:
repeat_size = int(line[3])
except:
repeat_size = int(line[3][0])
if line[1] == 'MH':
repeat_size -= 1
sample_index = 4
else:
line = lines.strip().split()
if line[0] not in indel_types:
continue
categories = line[0].split(":")
mut_type = categories[0] + categories[1] + categories[2]
repeat_size = int(categories[3])
if categories[2] == 'M':
repeat_size -= 1
sample_index = 1
for sample in samples:
if mut_type in mutations_83[sample].keys():
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
mutations_83[sample][mut_type][repeat_size] = mutCount
else:
continue
sample_index += 1
except:
ID83 = False
print("No ID83 provided")
########################### ID-96 ################################################
try:
indel_types_tsb = []
tsb_I = ['T','U','N','B','Q']
indel_types = ['1:Del:C:0', '1:Del:C:1', '1:Del:C:2', '1:Del:C:3', '1:Del:C:4', '1:Del:C:5',
'1:Del:T:0', '1:Del:T:1', '1:Del:T:2', '1:Del:T:3', '1:Del:T:4', '1:Del:T:5',
'1:Ins:C:0', '1:Ins:C:1', '1:Ins:C:2', '1:Ins:C:3', '1:Ins:C:4', '1:Ins:C:5',
'1:Ins:T:0', '1:Ins:T:1', '1:Ins:T:2', '1:Ins:T:3', '1:Ins:T:4', '1:Ins:T:5',
# >1bp INDELS
'2:Del:R:0', '2:Del:R:1', '2:Del:R:2', '2:Del:R:3', '2:Del:R:4', '2:Del:R:5',
'3:Del:R:0', '3:Del:R:1', '3:Del:R:2', '3:Del:R:3', '3:Del:R:4', '3:Del:R:5',
'4:Del:R:0', '4:Del:R:1', '4:Del:R:2', '4:Del:R:3', '4:Del:R:4', '4:Del:R:5',
'5:Del:R:0', '5:Del:R:1', '5:Del:R:2', '5:Del:R:3', '5:Del:R:4', '5:Del:R:5',
'2:Ins:R:0', '2:Ins:R:1', '2:Ins:R:2', '2:Ins:R:3', '2:Ins:R:4', '2:Ins:R:5',
'3:Ins:R:0', '3:Ins:R:1', '3:Ins:R:2', '3:Ins:R:3', '3:Ins:R:4', '3:Ins:R:5',
'4:Ins:R:0', '4:Ins:R:1', '4:Ins:R:2', '4:Ins:R:3', '4:Ins:R:4', '4:Ins:R:5',
'5:Ins:R:0', '5:Ins:R:1', '5:Ins:R:2', '5:Ins:R:3', '5:Ins:R:4', '5:Ins:R:5',
#MicroHomology INDELS
'2:Del:M:1', '3:Del:M:1', '3:Del:M:2', '4:Del:M:1', '4:Del:M:2', '4:Del:M:3',
'5:Del:M:1', '5:Del:M:2', '5:Del:M:3', '5:Del:M:4', '5:Del:M:5']
for indels in indel_types:
for tsbs in tsb_I:
indel_types_tsb.append(tsbs + ":" + indels)
sig_probs = False
with open (sample_matrices_path + "ID/" + project + ".ID415." + file_extension) as f:
first_line = f.readline()
if pcawg:
samples = first_line.strip().split(",")
samples = samples[4:]
samples = [x.replace('"','') for x in samples]
else:
pass
#samples = first_line.strip().split("\t")
#samples = samples[1:]
for sample in samples:
mutations_ID96[sample] = OrderedDict()
mutations_ID96[sample]['1DelC'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['1DelT'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['1InsC'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['1InsT'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['2DelR'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['3DelR'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['4DelR'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['5DelR'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['2InsR'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['3InsR'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['3InsR'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['4InsR'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['5InsR'] = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
mutations_ID96[sample]['2DelM'] = [[0,0]]
mutations_ID96[sample]['3DelM'] = [[0,0],[0,0]]
mutations_ID96[sample]['4DelM'] = [[0,0],[0,0],[0,0]]
mutations_ID96[sample]['5DelM'] = [[0,0],[0,0],[0,0],[0,0],[0,0]]
for lines in f:
if pcawg:
line = lines.strip().split(",")
line = [x.replace('"','') for x in line]
if line[1] == 'repeats':
mut_type = line[2][0] + line[0][0] + line[0][1].lower() + line[0][2].lower() + "R"
else:
mut_type = line[2][0] + line[0][0] + line[0][1].lower() + line[0][2].lower() + line[1][0]
try:
repeat_size = int(line[3])
except:
repeat_size = int(line[3][0])
if line[1] == 'MH':
repeat_size -= 1
sample_index = 4
else:
line = lines.strip().split()
if line[0] not in indel_types_tsb:
continue
categories = line[0].split(":")
bias = categories[0]
if bias == 'B' or bias == 'N' or bias == 'Q':
continue
mut_type = categories[1] + categories[2] + categories[3]
repeat_size = int(categories[4])
if categories[3] == 'M':
repeat_size -= 1
sample_index = 1
for sample in samples:
if mut_type in mutations_ID96[sample].keys():
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
if bias == 'T':
mutations_ID96[sample][mut_type][repeat_size][0] = mutCount
else:
mutations_ID96[sample][mut_type][repeat_size][1] = mutCount
else:
continue
sample_index += 1
except:
ID96 = False
print("No ID96 provided")
########################### ID-simple ################################################
try:
indel_types = ['1:Del:C:1', '1:Del:C:2', '1:Del:C:3', '1:Del:C:4', '1:Del:C:5', '1:Del:C:6'
'1:Del:T:1', '1:Del:T:2', '1:Del:T:3', '1:Del:T:4', '1:Del:T:5', '1:Del:T:6'
'1:Ins:C:0', '1:Ins:C:1', '1:Ins:C:2', '1:Ins:C:3', '1:Ins:C:4', '1:Ins:C:5',
'1:Ins:T:0', '1:Ins:T:1', '1:Ins:T:2', '1:Ins:T:3', '1:Ins:T:4', '1:Ins:T:5',
'long_Del', 'long_Ins', 'MH', 'complex']
with open (sample_matrices_path + "ID/" + project + ".ID28." + file_extension) as f:
first_line = f.readline()
for sample in samples:
mutations_simple[sample] = OrderedDict()
mutations_simple[sample]['1DelC'] = [0,0,0,0,0,0]
mutations_simple[sample]['1DelT'] = [0,0,0,0,0,0]
mutations_simple[sample]['1InsC'] = [0,0,0,0,0,0]
mutations_simple[sample]['1InsT'] = [0,0,0,0,0,0]
mutations_simple[sample]['long_Del'] = [0]
mutations_simple[sample]['long_Ins'] = [0]
mutations_simple[sample]['MH'] = [0]
mutations_simple[sample]['complex'] = [0]
for lines in f:
line = lines.strip().split()
categories = line[0].split(":")
if len(categories) < 2:
mut_type = categories[0]
repeat_size = 0
else:
mut_type = categories[0] + categories[1] + categories[2]
repeat_size = int(categories[3])
sample_index = 1
for sample in samples:
#if mut_type in mutations[sample].keys():
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
mutations_simple[sample][mut_type][repeat_size] = mutCount
sample_index += 1
except:
ID28 = False
print("No ID28 provided")
########################### DBS-78 ################################################
try:
dinucs = ['TT>GG','TT>CG','TT>AG','TT>GC','TT>CC','TT>AC','TT>GA','TT>CA','TT>AA','AC>CA','AC>CG','AC>CT','AC>GA',
'AC>GG','AC>GT','AC>TA','AC>TG','AC>TT','CT>AA','CT>AC','CT>AG','CT>GA','CT>GC','CT>GG','CT>TG','CT>TC',
'CT>TA','AT>CA','AT>CC','AT>CG','AT>GA','AT>GC','AT>TA','TG>GT','TG>CT','TG>AT','TG>GC','TG>CC','TG>AC',
'TG>GA','TG>CA','TG>AA','CC>AA','CC>AG','CC>AT','CC>GA','CC>GG','CC>GT','CC>TA','CC>TG','CC>TT','CG>AT',
'CG>GC','CG>GT','CG>TC','CG>TA','CG>TT','TC>GT','TC>CT','TC>AT','TC>GG','TC>CG','TC>AG','TC>GA','TC>CA',
'TC>AA','GC>AA','GC>AG','GC>AT','GC>CA','GC>CG','GC>TA','TA>GT','TA>CT','TA>AT','TA>GG','TA>CG','TA>GC']
revcompl = lambda x: ''.join([{'A':'T','C':'G','G':'C','T':'A'}[B] for B in x][::-1])
mutations = OrderedDict()
with open (sample_matrices_path + "DBS/" + project + ".DBS78." + file_extension) as f:
first_line = f.readline()
for sample in samples:
mutations_78[sample] = OrderedDict()
mutations_78[sample]['AC'] = OrderedDict()
mutations_78[sample]['AT'] = OrderedDict()
mutations_78[sample]['CC'] = OrderedDict()
mutations_78[sample]['CG'] = OrderedDict()
mutations_78[sample]['CT'] = OrderedDict()
mutations_78[sample]['GC'] = OrderedDict()
mutations_78[sample]['TA'] = OrderedDict()
mutations_78[sample]['TC'] = OrderedDict()
mutations_78[sample]['TG'] = OrderedDict()
mutations_78[sample]['TT'] = OrderedDict()
for lines in f:
if pcawg:
line = lines.strip().split(",")
line = [x.replace('"','') for x in line]
mut = line[0] + ">" + line[1]
nuc = line[1]
mut_type = line[0]
if mut not in dinucs:
nuc = revcompl(nuc)
mut_type = revcompl(mut_type)
sample_index = 2
else:
line = lines.strip().split()
mut = line[0]
nuc = line[0][3:]
mut_type = line[0][0:2]
if mut not in dinucs:
nuc = revcompl(nuc)
mut_type = revcompl(mut_type)
sample_index = 1
for sample in samples:
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
mutations_78[sample][mut_type][nuc] = mutCount
sample_index += 1
except:
DBS78 = False
print("No DBS78 provided")
########################### DBS-312 ################################################
try:
revcompl = lambda x: ''.join([{'A':'T','C':'G','G':'C','T':'A'}[B] for B in x][::-1])
with open (sample_matrices_path + "DBS/" + project + ".DBS186." + file_extension) as f:
first_line = f.readline()
#samples = first_line.strip().split("\t")
#samples = samples[1:]
for sample in samples:
mutations_312[sample] = OrderedDict()
mutations_312[sample]['CC'] = OrderedDict()
mutations_312[sample]['CT'] = OrderedDict()
mutations_312[sample]['TC'] = OrderedDict()
mutations_312[sample]['TT'] = OrderedDict()
for lines in f:
line = lines.strip().split()
mut = line[0][2:]
nuc = line[0][5:]
mut_type = line[0][2:4]
bias = line[0][0]
if bias == 'N' or bias == 'B' or bias == 'Q':
continue
else:
if mut not in dinucs:
if revcompl(mut) not in dinucs:
continue
nuc = revcompl(nuc)
mut_type = revcompl(mut_type)
sample_index = 1
for sample in samples:
if percentage:
mutCount = float(line[sample_index])
if mutCount < 1 and mutCount > 0:
sig_probs = True
else:
mutCount = int(line[sample_index])
if nuc not in mutations_312[sample][mut_type]:
mutations_312[sample][mut_type][nuc] = [0,0]
if bias == 'T':
mutations_312[sample][mut_type][nuc][0] = mutCount
else:
mutations_312[sample][mut_type][nuc][1] = mutCount
sample_index += 1
except:
DBS312 = False
print("No DBS312 provided")
########### plot through each sample ####################################################
for sample in samples:
plt.rcParams['axes.linewidth'] = 2
plot1 = plt.figure(figsize=(13.2,8.35))
plt.rc('axes', edgecolor='lightgray', linewidth=0.5)
panel1 = plt.axes([0.044, 0.707, 0.172, 0.174]) # SBS-6
panel2 = plt.axes([0.262, 0.707, 0.144, 0.174]) # SBS-24
panel3 = plt.axes([0.035, 0.4595, 0.394, 0.097]) # SBS-96
panel5 = plt.axes([0.035, 0.25, 0.394, 0.097]) # SBS-1536
panel4 = plt.axes([0.035, 0.05, 0.394, 0.114]) # SBS-384
panel7 = plt.axes([0.528, 0.776, 0.455, 0.125]) # DBS-78
#panel7 = plt.axes([0.528, 0.756, 0.455, 0.125]) # DBS-78
#panel8 = plt.axes([0.783, 0.53, 0.2, 0.15]) # DBS-312
panel8 = plt.axes([0.783, 0.55, 0.2, 0.15]) # DBS-312
panel9 = plt.axes([0.528, 0.3, 0.455, 0.155]) # ID-78
panel10 = plt.axes([0.528, 0.05, 0.455, 0.155]) # ID-96
# panel11 = plt.axes([0.528, 0.53, 0.15, 0.15]) # ID-simple
panel11 = plt.axes([0.528, 0.55, 0.15, 0.15]) # ID-simple
panel12 = plt.axes([0.035, 0.352, 0.394, 0.0485]) # 1536-middle
panel13 = plt.axes([0.035, 0.406, 0.394, 0.0485]) # 1536-top
plt.text(.02, .96, sample, fontsize=20, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
# plt.text(.03, .93, "SBS", fontsize=15, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
# plt.text(.5, .94, "DBS", fontsize=15, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
# plt.text(.5, .69, "Indels", fontsize=15, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
############### plot SBS-96 ##############################################
if SBS96:
total_count = sum(sum(nuc.values()) for nuc in mutations_96[sample].values())
plt.rcParams['axes.linewidth'] = 2
xlabels = []
x = 0.4
ymax = 0
colors = [[3/256,189/256,239/256], [1/256,1/256,1/256],[228/256,41/256,38/256], [203/256,202/256,202/256], [162/256,207/256,99/256], [236/256,199/256,197/256]]
i = 0
for key in mutations_96[sample]:
for seq in mutations_96[sample][key]:
xlabels.append(seq[0]+seq[2]+seq[6])
if percentage:
if total_count > 0:
panel3.bar(x, mutations_96[sample][key][seq]/total_count*100,width=0.4,color=colors[i],align='center', zorder=1000)
if mutations_96[sample][key][seq]/total_count*100 > ymax:
ymax = mutations_96[sample][key][seq]/total_count*100
else:
panel3.bar(x, mutations_96[sample][key][seq],width=0.4,color=colors[i],align='center', zorder=1000)
if mutations_96[sample][key][seq] > ymax:
ymax = mutations_96[sample][key][seq]
x += 1
i += 1
x = .036
y3 = .56
y = int(ymax*1.25)
y2 = y+2
for i in range(0, 6, 1):
panel3.add_patch(plt.Rectangle((x,y3), .064, .005, facecolor=colors[i], clip_on=False, transform=plt.gcf().transFigure))
x += .0657
yText = y3 + 0.01
plt.text(.055, yText, 'C>A', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.125, yText, 'C>G', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.19, yText, 'C>T', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.255, yText, 'T>A', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.32, yText, 'T>C', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.385, yText, 'T>G', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
while y%4 != 0:
y += 1
ytick_offest = int(y/4)
if percentage:
ylabs = [0, round(ytick_offest, 1), round(ytick_offest*2, 1), round(ytick_offest*3, 1), round(ytick_offest*4, 1)]
ylabels= [str(0), str(round(ytick_offest, 1)) + "%", str(round(ytick_offest*2, 1)) + "%",
str(round(ytick_offest*3, 1)) + "%", str(round(ytick_offest*4, 1)) + "%"]
else:
ylabs = [0, ytick_offest, ytick_offest*2, ytick_offest*3, ytick_offest*4]
ylabels= [0, ytick_offest, ytick_offest*2,
ytick_offest*3, ytick_offest*4]
labs = np.arange(0.375,96.375,1)
if not percentage:
ylabels = ['{:,}'.format(int(x)) for x in ylabels]
if len(ylabels[-1]) > 3:
ylabels_temp = []
if len(ylabels[-1]) > 7:
for label in ylabels:
if len(label) > 7:
ylabels_temp.append(label[0:-8] + "m")
elif len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
else:
for label in ylabels:
if len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
ylabels = ylabels_temp
# if not percentage:
# ylabels = ['{:,}'.format(int(x)) for x in ylabels]
panel3.set_xlim([0, 96])
panel3.set_ylim([0, y])
panel3.set_xticks(labs)
panel3.set_yticks(ylabs)
count = 0
m = 0
panel3.set_yticklabels(ylabels, fontsize=8, color='black')
panel3.yaxis.grid(True)
panel3.grid(which='major', axis='y', color=[0.93,0.93,0.93], zorder=1)
panel3.set_xlabel('')
if percentage:
panel3.set_ylabel("Percentage of Single Base Substitutions", fontsize=6, fontname="Times New Roman", weight = 'bold')
else:
panel3.set_ylabel("Number of Single Base Substitutions", fontsize=6, fontname="Times New Roman", weight = 'bold')
panel3.tick_params(axis='both',which='both',\
bottom=False, labelbottom=False,\
left=True, labelleft=True,\
right=True, labelright=False,\
top=False, labeltop=False,\
direction='in', length=2.5, colors='lightgray', width=0.25)
[i.set_color("black") for i in panel3.get_yticklabels()]
########################## SBS-6 ###################################################
total_count = sum(mutations_6[sample].values())
xlabels = []
y = -0.5
xmax = 0
colors = [[3/256,189/256,239/256], [1/256,1/256,1/256],[228/256,41/256,38/256], [203/256,202/256,202/256], [162/256,207/256,99/256], [236/256,199/256,197/256]]
i = 0
for key in mutations_6[sample]:
xlabels.append(key)
if percentage:
if total_count > 0:
panel1.barh(y, mutations_6[sample][key]/total_count*100,height=0.7,color=colors[i],align='center', zorder=1000)
if mutations_6[sample][key]/total_count*100 > xmax:
xmax = mutations_6[sample][key]/total_count*100
else:
panel1.barh(y, mutations_6[sample][key],height=0.7,color=colors[i],align='center', zorder=1000)
if mutations_6[sample][key] > xmax:
xmax = mutations_6[sample][key]
y -= 1
i += 1
y = .043
x3 = .87
x = int(xmax*1.1)
while x%4 != 0:
x += 1
xtick_offest = int(x/4)
if percentage:
xlabs = [0, round(xtick_offest, 1), round(xtick_offest*2, 1), round(xtick_offest*3, 1), round(xtick_offest*4, 1)]
xlabels= [str(0), str(round(xtick_offest, 1)) + "%", str(round(xtick_offest*2, 1)) + "%",
str(round(xtick_offest*3, 1)) + "%", str(round(xtick_offest*4, 1)) + "%"]
else:
xlabs = [0, xtick_offest, xtick_offest*2, xtick_offest*3, xtick_offest*4]
xlabels= [0, xtick_offest, xtick_offest*2,
xtick_offest*3, xtick_offest*4]
if not percentage:
xlabels = ['{:,}'.format(int(x)) for x in xlabels]
if len(xlabels[-1]) > 3:
xlabels_temp = []
if len(xlabels[-1]) > 7:
for label in xlabels:
if len(label) > 7:
xlabels_temp.append(label[0:-8] + "m")
elif len(label) > 3:
xlabels_temp.append(label[0:-4] + "k")
else:
xlabels_temp.append(label)
else:
for label in xlabels:
if len(label) > 3:
xlabels_temp.append(label[0:-4] + "k")
else:
xlabels_temp.append(label)
xlabels = xlabels_temp
# if not percentage:
# xlabels = ['{:,}'.format(int(x)) for x in xlabels]
ylabs = np.arange(-5.5, 0.5, 1)
ylabels = (['T>G','T>C','T>A','C>T','C>G','C>A'])
panel1.set_xlim([0, x])
panel1.set_ylim([-6, 0])
panel1.set_xticks(xlabs)
panel1.set_yticks(ylabs)
panel1.set_xticklabels(xlabels, fontsize=8)
panel1.set_yticklabels(ylabels, fontsize=8)
panel1.spines['right'].set_visible(False)
panel1.spines['top'].set_visible(False)
# if sig_probs:
panel1.text(.05, .9, "SBS-6", fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
# else:
# panel1.text(.045, .9, sample + ": " + "{:,}".format(int(total_count)) + " subs", fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
if percentage:
panel1.set_xlabel("Percentage of Single Base Substitutions", fontsize=10, fontname="Times New Roman", weight = 'bold')
else:
panel1.set_xlabel("Number of Single Base Substitutions", fontsize=10, fontname="Times New Roman", weight = 'bold')
panel1.set_ylabel('')
panel1.tick_params(axis='both',which='both',\
bottom=True, labelbottom=True,\
left=False, labelleft=True,\
right=False, labelright=False,\
top=False, labeltop=False,\
width=0.2, color='lightgrey')
########################## SBS-24 ###################################################
total_count = sum(sum(tsb) for tsb in mutations_24[sample].values())
y = 12.485
xmax = 0
for key in mutations_24[sample]:
if percentage:
if total_count > 0:
trans = panel2.barh(y, mutations_24[sample][key][0]/total_count*100,height=0.75,color=[1/256,70/256,102/256],align='center', zorder=1000, label='Transcribed Strand')
y -= 0.75
untrans = panel2.barh(y, mutations_24[sample][key][1]/total_count*100,height=0.75,color=[228/256,41/256,38/256],align='center', zorder=1000, label='Untranscribed Strand')
y -= .2475
if mutations_24[sample][key][0]/total_count*100 > xmax:
xmax = mutations_24[sample][key][0]/total_count*100
if mutations_24[sample][key][1]/total_count*100 > xmax:
xmax = mutations_24[sample][key][1]/total_count*100
else:
trans = panel2.barh(y, mutations_24[sample][key][0],height=0.75,color=[1/256,70/256,102/256],align='center', zorder=1000, label='Transcribed Strand')
y -= 0.75
untrans = panel2.barh(y, mutations_24[sample][key][1],height=0.75,color=[228/256,41/256,38/256],align='center', zorder=1000, label='Untranscribed Strand')
y -= .2475
if mutations_24[sample][key][0] > xmax:
xmax = mutations_24[sample][key][0]
if mutations_24[sample][key][1] > xmax:
xmax = mutations_24[sample][key][1]
y -= 1
x = int(xmax*1.1)
while x%4 != 0:
x += 1
xtick_offest = int(x/4)
if percentage:
xlabs = [0, round(xtick_offest, 1), round(xtick_offest*2, 1), round(xtick_offest*3, 1), round(xtick_offest*4, 1)]
xlabels= [str(0), str(round(xtick_offest, 1)) + "%", str(round(xtick_offest*2, 1)) + "%",
str(round(xtick_offest*3, 1)) + "%", str(round(xtick_offest*4, 1)) + "%"]
else:
xlabs = [0, xtick_offest, xtick_offest*2, xtick_offest*3, xtick_offest*4]
xlabels= [0, xtick_offest, xtick_offest*2,
xtick_offest*3, xtick_offest*4]
if not percentage:
xlabels = ['{:,}'.format(int(x)) for x in xlabels]
if len(xlabels[-1]) > 3:
xlabels_temp = []
if len(xlabels[-1]) > 7:
for label in xlabels:
if len(label) > 7:
xlabels_temp.append(label[0:-8] + "m")
elif len(label) > 3:
xlabels_temp.append(label[0:-4] + "k")
else:
xlabels_temp.append(label)
else:
for label in xlabels:
if len(label) > 3:
xlabels_temp.append(label[0:-4] + "k")
else:
xlabels_temp.append(label)
xlabels = xlabels_temp
# if not percentage:
# xlabels = ['{:,}'.format(int(x)) for x in xlabels]
ylabs = np.arange(2.15, 13, 2)
ylabels = (['T>G','T>C','T>A','C>T','C>G','C>A'])
panel2.set_xlim([0, x])
panel2.set_ylim([1.2524, 13.235])
panel2.set_yticks(ylabs)
panel2.set_xticks(xlabs)
panel2.set_xticklabels(xlabels, fontsize=10)
panel2.set_yticklabels(ylabels, fontsize=10)
panel2.set_xlabel('')
panel2.set_ylabel('')
panel2.spines['right'].set_visible(False)
panel2.spines['top'].set_visible(False)
# if sig_probs:
panel2.text(.27, .9, "SBS-24", fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
# else:
# panel2.text(.265, .9, sample + ": " + "{:,}".format(int(total_count)) + " transcribed subs", fontsize=8, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
if percentage:
panel2.set_xlabel("Percentage of Single Base Substitutions", fontsize=10, fontname="Times New Roman", weight = 'bold')
else:
panel2.set_xlabel("Number of Single Base Substitutions", fontsize=10, fontname="Times New Roman", weight = 'bold')
panel2.tick_params(axis='both',which='both',\
bottom=True, labelbottom=True,\
left=False, labelleft=True,\
right=False, labelright=False,\
top=False, labeltop=False,\
width=0.2, color='lightgrey')
# panel2.legend(handles=[trans, untrans], prop={'size':25})
########################## SBS-384 ###################################################
total_count = sum(sum(sum(tsb) for tsb in nuc.values()) for nuc in mutations_384[sample].values())
xlabels = []
x = 0.7
ymax = 0
colors = [[3/256,189/256,239/256], [1/256,1/256,1/256],[228/256,41/256,38/256], [203/256,202/256,202/256], [162/256,207/256,99/256], [236/256,199/256,197/256]]
i = 0
for key in mutations_384[sample]:
for seq in mutations_384[sample][key]:
xlabels.append(seq[0]+seq[2]+seq[6])
if percentage:
if total_count > 0:
trans = panel4.bar(x, mutations_384[sample][key][seq][0]/total_count*100,width=0.75,color=[1/256,70/256,102/256],align='center', zorder=1000, label='Transcribed Strand')
x += 0.75
untrans = panel4.bar(x, mutations_384[sample][key][seq][1]/total_count*100,width=0.75,color=[228/256,41/256,38/256],align='center', zorder=1000, label='Untranscribed Strand')
x += .2475
if mutations_384[sample][key][seq][0]/total_count*100 > ymax:
ymax = mutations_384[sample][key][seq][0]/total_count*100
if mutations_384[sample][key][seq][1]/total_count*100 > ymax:
ymax = mutations_384[sample][key][seq][1]/total_count*100
else:
trans = panel4.bar(x, mutations_384[sample][key][seq][0],width=0.75,color=[1/256,70/256,102/256],align='center', zorder=1000, label='Transcribed Strand')
x += 0.75
untrans = panel4.bar(x, mutations_384[sample][key][seq][1],width=0.75,color=[228/256,41/256,38/256],align='center', zorder=1000, label='Untranscribed Strand')
x += .2475
if mutations_384[sample][key][seq][0] > ymax:
ymax = mutations_384[sample][key][seq][0]
if mutations_384[sample][key][seq][1] > ymax:
ymax = mutations_384[sample][key][seq][1]
x += 1
i += 1
x = .036
# y3 = .2775
y3 = .1675
y = int(ymax*1.25)
x_plot = 0
while y%4 != 0:
y += 1
yText = y3 + 0.01
plt.text(.055, yText, 'C>A', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.125, yText, 'C>G', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.19, yText, 'C>T', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.255, yText, 'T>A', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.32, yText, 'T>C', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.385, yText, 'T>G', fontsize=10, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
ytick_offest = int(y/4)
for i in range(0, 6, 1):
panel4.add_patch(plt.Rectangle((x,y3), .064, .005, facecolor=colors[i], clip_on=False, transform=plt.gcf().transFigure))
panel4.add_patch(plt.Rectangle((x_plot,0), 32, y, facecolor=colors[i], zorder=0, alpha = 0.25, edgecolor='grey'))
x += .0657
x_plot += 32
if percentage:
ylabs = [0, round(ytick_offest, 1), round(ytick_offest*2, 1), round(ytick_offest*3, 1), round(ytick_offest*4, 1)]
ylabels= [str(0), str(round(ytick_offest, 1)) + "%", str(round(ytick_offest*2, 1)) + "%",
str(round(ytick_offest*3, 1)) + "%", str(round(ytick_offest*4, 1)) + "%"]
else:
ylabs = [0, ytick_offest, ytick_offest*2, ytick_offest*3, ytick_offest*4]
ylabels= [0, ytick_offest, ytick_offest*2,
ytick_offest*3, ytick_offest*4]
labs = np.arange(0.750,192.750,1)
if not percentage:
ylabels = ['{:,}'.format(int(x)) for x in ylabels]
if len(ylabels[-1]) > 3:
ylabels_temp = []
if len(ylabels[-1]) > 7:
for label in ylabels:
if len(label) > 7:
ylabels_temp.append(label[0:-8] + "m")
elif len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
else:
for label in ylabels:
if len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
ylabels = ylabels_temp
# if not percentage:
# ylabels = ['{:,}'.format(int(x)) for x in ylabels]
panel4.set_xlim([0, 96])
panel4.set_ylim([0, y])
panel4.set_xticks(labs)
panel4.set_yticks(ylabs)
count = 0
m = 0
for i in range (0, 96, 1):
panel4.text(i/243.5 + .0355, .035, xlabels[i][0], fontsize=4, color='gray', rotation='vertical', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
panel4.text(i/243.5 + .0355, .04, xlabels[i][1], fontsize=4, color=colors[m], rotation='vertical', verticalalignment='center', fontname='Courier New', fontweight='bold',transform=plt.gcf().transFigure)
panel4.text(i/243.5 + .0355, .045, xlabels[i][2], fontsize=4, color='gray', rotation='vertical', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
count += 1
if count == 16:
count = 0
m += 1
plt.text(0.04, 0.2, "SBS-384", fontsize=10, weight='bold', color='black', fontname= "Arial", transform=plt.gcf().transFigure)
panel4.set_yticklabels(ylabels, fontsize=8)
panel4.yaxis.grid(True)
panel4.grid(which='major', axis='y', color=[0.7,0.7,0.7], zorder=1)
panel4.legend(handles=[trans, untrans], prop={'size':4})
if percentage:
panel4.set_ylabel("Percentage of Single Base Substitutions", fontsize=6, fontname="Times New Roman", weight = 'bold')
else:
panel4.set_ylabel("Number of Single Base Substitutions", fontsize=6, fontname="Times New Roman", weight = 'bold')
panel4.tick_params(axis='both',which='both',\
bottom=False, labelbottom=False,\
left=False, labelleft=True,\
right=False, labelright=False,\
top=False, labeltop=False,\
direction='in', length=25, colors=[0.6, 0.6, 0.6])
[i.set_color("black") for i in panel4.get_yticklabels()]
############### plot SBS-1536 ##############################################
xlabels = []
ylabels = []
ylabels_5 = []
ylabels_3 = []
colors = [[3/256,189/256,239/256], [1/256,1/256,1/256],[228/256,41/256,38/256], [203/256,202/256,202/256], [162/256,207/256,99/256], [236/256,199/256,197/256]]
colors_heat = [np.linspace(56/255,255/255,5), np.linspace(66/255,225/255,5), np.linspace(157/255,40/255,5)]
colors_heat_compact = [np.linspace(56/255,255/255,5), np.linspace(66/255,225/255,5), np.linspace(157/255,40/255,5)]
total_count_sample = sum(sum(nuc.values()) for nuc in mutations_96[sample].values())
total_count = max_all[sample]*1.1
ratio = total_count/total_count_sample
i = 0
x_pos = 0
x_inter = 0
for key in mutations_1536[sample]:
y_pos = 15
for penta in mutations_1536[sample][key]:
key_5 = penta[0]
key_3 = penta[1]
ylabels.append(penta[0] + "---" + penta[1])
for tri in mutations_1536[sample][key][penta]:
tri_nuc = tri[0] + "[" + key + "]" + tri[1]
normalized = mutations_96[sample][key][tri_nuc]
try:
mut_count = int(int(20 * round(float(mutations_1536[sample][key][penta][tri]/total_count_sample/ratio* 100))/20)/20)
mutations_5[sample][key][key_5][tri] += float(mutations_1536[sample][key][penta][tri])
mutations_3[sample][key][key_3][tri] += float(mutations_1536[sample][key][penta][tri])
if mutations_5[sample][key][key_5][tri] > max_5[sample]:
max_5[sample] = mutations_5[sample][key][key_5][tri]
if mutations_3[sample][key][key_3][tri] > max_3[sample]:
max_3[sample] = mutations_3[sample][key][key_3][tri]
except:
mut_count = 0
xlabels.append(tri[0]+"-"+tri[1])
rectangle=mplpatches.Rectangle((x_pos, y_pos), 1, 1,\
linewidth=1,\
facecolor=(colors_heat[0][mut_count], colors_heat[1][mut_count], colors_heat[2][mut_count]))
panel5.add_patch(rectangle)
x_pos += 1
y_pos -= 1
x_pos = x_inter
x_inter += 17
x_pos = x_inter
i += 1
x_pos = 0
x_inter = 0
total_count_5 = max_5[sample]*1.1
total_count_3 = max_3[sample]*1.1
ratio_5 = total_count_5/total_count_sample
ratio_3 = total_count_3/total_count_sample
ratio_total = max(ratio_5, ratio_3)
for key in mutations_5[sample]:
y_pos = 3
for penta in mutations_5[sample][key]:
ylabels_5.append(penta + "---N" )
ylabels_3.append("N---" + penta)
for tri in mutations_5[sample][key][penta]:
mut_count = int(int(20 * round(float(mutations_5[sample][key][penta][tri])/total_count_sample/ratio_total*100)/20)/20)
mut_count_3 = int(int(20 * round(float(mutations_3[sample][key][penta][tri])/total_count_sample/ratio_total*100)/20)/20)
rectangle=mplpatches.Rectangle((x_pos, y_pos), 1, 1,\
linewidth=1,\
facecolor=(colors_heat_compact[0][mut_count], colors_heat_compact[1][mut_count], colors_heat_compact[2][mut_count]))
panel13.add_patch(rectangle)
rectangle=mplpatches.Rectangle((x_pos, y_pos), 1, 1,\
linewidth=1,\
facecolor=(colors_heat[0][mut_count_3], colors_heat[1][mut_count_3], colors_heat[2][mut_count_3]))
panel12.add_patch(rectangle)
x_pos += 1
y_pos -= 1
x_pos = x_inter
x_inter += 17
x_pos = x_inter
i += 1
x = 0.5
ymax = 0
colors = [[3/256,189/256,239/256], [1/256,1/256,1/256],[228/256,41/256,38/256], [203/256,202/256,202/256], [162/256,207/256,99/256], [236/256,199/256,197/256]]
i = 0
# scale bar for bottom 1536 plot
y_grad = .0955/len(colors_heat[0])
y_start = 0.251
for l in range (0, len(colors_heat[0]), 1):
rectangle=mplpatches.Rectangle((.4325, y_start), .005, y_grad,\
linewidth=1,\
facecolor=(colors_heat[0][l], colors_heat[1][l], colors_heat[2][l]),\
transform=plt.gcf().transFigure, clip_on=False,\
edgecolor=(colors_heat[0][l], colors_heat[1][l], colors_heat[2][l]))
panel5.add_patch(rectangle)
y_start += y_grad
# scale bar for top 1536 plot
y_grad = .0474/len(colors_heat_compact[0])
y_start = 0.406
for l in range (0, len(colors_heat_compact[0]), 1):
rectangle=mplpatches.Rectangle((.4325, y_start), .005, y_grad,\
linewidth=1,\
facecolor=(colors_heat_compact[0][l], colors_heat_compact[1][l], colors_heat_compact[2][l]),\
transform=plt.gcf().transFigure, clip_on=False,\
edgecolor=(colors_heat_compact[0][l], colors_heat_compact[1][l], colors_heat_compact[2][l]))
panel1.add_patch(rectangle)
y_start += y_grad
# scale bar for middle 1536 plot
y_grad = .0474/len(colors_heat_compact[0])
y_start = 0.3525
for l in range (0, len(colors_heat_compact[0]), 1):
rectangle=mplpatches.Rectangle((.4325, y_start), .005, y_grad,\
linewidth=1,\
facecolor=(colors_heat_compact[0][l], colors_heat_compact[1][l], colors_heat_compact[2][l]),\
transform=plt.gcf().transFigure, clip_on=False,\
edgecolor=(colors_heat_compact[0][l], colors_heat_compact[1][l], colors_heat_compact[2][l]))
panel1.add_patch(rectangle)
y_start += y_grad
# y_tick_grad = max_count[sample]/2
# scale numbers for bottom 1536 plot
plt.text(.439, .251, '0', fontsize=5, fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.439, .3, str(ratio/2)[:5], fontsize=5, fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.439, .34, str(ratio)[:5], fontsize=5, fontweight='bold', transform=plt.gcf().transFigure)
y = int(ymax*1.25)
# scale numbers for top 1536 plot
plt.text(.439, .406, '0', fontsize=5, fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.439, .426, str(ratio_total/2)[:5], fontsize=5, fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.439, .448, str(ratio_total)[:5], fontsize=5, fontweight='bold', transform=plt.gcf().transFigure)
y = int(ymax*1.25)
# scale numbers for middle 1536 plot
plt.text(.439, .3525, '0', fontsize=5, fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.439, .375, str(ratio_total/2)[:5], fontsize=5, fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.439, .395, str(ratio_total)[:5], fontsize=5, fontweight='bold', transform=plt.gcf().transFigure)
y = int(ymax*1.25)
if y <= 4:
y += 4
while y%4 != 0:
y += 1
ytick_offest = int(y/4)
panel5.set_ylim([0, 16])
panel5.set_xlim([0, 101])
panel13.set_xlim([0, 101])
panel13.set_ylim([0, 4])
panel12.set_xlim([0, 101])
panel12.set_ylim([0, 4])
panel12.set_yticks([])
panel13.set_yticks([])
panel13.set_xticks([])
panel13.set_xticks([])
panel5.set_xticks([])
panel5.set_yticks([])
# x-axis 1536 bottom plot
m = 0
count = 0
x_letter = 0
for i in range (0, 96, 1):
plt.text(x_letter/236 + .0355, .237, xlabels[i][0], fontsize=4, color='black', rotation='vertical', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
plt.text(x_letter/236 + .0355, .241, xlabels[i][1], fontsize=4, color='black', rotation='vertical', verticalalignment='center', fontname='Courier New', fontweight='bold',transform=plt.gcf().transFigure)
plt.text(x_letter/236+ .0355, .245, xlabels[i][2], fontsize=4, color='black', rotation='vertical', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
count += 1
x_letter += .92
if (i+1)%16 == 0 and i != 0:
x_letter += .92
if count == 16:
count = 0
m += 1
# y-axis 1536 bottom plot
m = 0
count = 0
y_letter = 5.5
for i in range (0, 16, 1):
plt.text(.019, y_letter/16 , ylabels[i][0], fontsize=4, color='black', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
plt.text(.022, y_letter/16, ylabels[i][1:4], fontsize=4, color='black', verticalalignment='center', fontname='Courier New', fontweight='bold',transform=plt.gcf().transFigure)
plt.text(.03, y_letter/16, ylabels[i][4], fontsize=4, color='black', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
count += 1
y_letter -= .0975
if count == 16:
count = 0
m += 1
# y-axis 1536 top matrix plot
m = 0
count = 0
y_letter = 7.17
for i in range (0, 4, 1):
plt.text(.019, y_letter/16 , ylabels_5[i][0], fontsize=4, color='black', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
plt.text(.022, y_letter/16 + 0, ylabels_5[i][1:4], fontsize=4, color='black', verticalalignment='center', fontname='Courier New', fontweight='bold',transform=plt.gcf().transFigure)
plt.text(.03, y_letter/16 + 0, ylabels_5[i][4], fontsize=4, color='black', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
count += 1
y_letter -= .195
if count == 16:
count = 0
m += 1
# y-axis 1536 middle matrix plot
m = 0
count = 0
y_letter = 6.3
for i in range (0, 4, 1):
plt.text(.019, y_letter/16 , ylabels_3[i][0], fontsize=4, color='black', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
plt.text(.022, y_letter/16 + 0, ylabels_3[i][1:4], fontsize=4, color='black', verticalalignment='center', fontname='Courier New', fontweight='bold',transform=plt.gcf().transFigure)
plt.text(.03, y_letter/16 + 0, ylabels_3[i][4], fontsize=4, color='black', verticalalignment='center', fontname='Courier New', transform=plt.gcf().transFigure)
count += 1
y_letter -= .195
if count == 16:
count = 0
m += 1
panel2.text(0.04, 0.6, "SBS-96 and SBS-1536", fontsize=10, weight='bold', color='black', fontname= "Arial", transform=plt.gcf().transFigure)
panel5.tick_params(axis='both',which='both',\
bottom=False, labelbottom=False,\
left=False, labelleft=False,\
right=True, labelright=False,\
top=False, labeltop=False,\
direction='in', length=25, colors='white', width=2)
panel13.axis('off')
panel13.tick_params(axis='both',which='both',\
bottom=False, labelbottom=False,\
left=False, labelleft=False,\
right=True, labelright=False,\
top=False, labeltop=False,\
direction='in', length=25, colors='white', width=2)
panel12.axis('off')
panel12.tick_params(axis='both',which='both',\
bottom=False, labelbottom=False,\
left=False, labelleft=False,\
right=True, labelright=False,\
top=False, labeltop=False,\
direction='in', length=25, colors='white', width=2)
[i.set_color("black") for i in plt.gca().get_yticklabels()]
############### plot ID-83 ##############################################
xlabels = []
x = 0.4
ymax = 0
colors = [[253/256,190/256,111/256], [255/256,128/256,2/256], [176/256,221/256,139/256], [54/256,161/256,46/256],
[253/256,202/256,181/256], [252/256,138/256,106/256], [241/256,68/256,50/256], [188/256,25/256,26/256],
[208/256,225/256,242/256], [148/256,196/256,223/256], [74/256,152/256,201/256], [23/256,100/256,171/256],
[226/256,226/256,239/256], [182/256,182/256,216/256], [134/256,131/256,189/256], [98/256,64/256,155/256]]
i = 0
for key in mutations_83[sample]:
l = 1
for seq in mutations_83[sample][key]:
xlabels.append(l)
if percentage:
if total_count > 0:
panel9.bar(x, seq/total_count*100,width=0.4,color=colors[i],align='center', zorder=1000)
if seq/total_count*100 > ymax:
ymax = seq/total_count*100
else:
panel9.bar(x, seq,width=0.4,color=colors[i],align='center', zorder=1000)
if seq > ymax:
ymax = seq
x += 1
l += 1
i += 1
x = .5292
y_top = .4575
y_bottom = .2875
y = int(ymax*1.25)
y2 = y+2
for i in range(0, 12, 1):
panel9.add_patch(plt.Rectangle((x,y_top), .02935, .01, facecolor=colors[i], clip_on=False, transform=plt.gcf().transFigure))
panel9.add_patch(plt.Rectangle((x,y_bottom), .02935, .01, facecolor=colors[i], clip_on=False, transform=plt.gcf().transFigure))
x += .0329
panel9.add_patch(plt.Rectangle((x-.0005,y_top), .003, .01, facecolor=colors[12], clip_on=False, transform=plt.gcf().transFigure))
panel9.add_patch(plt.Rectangle((x-.0005,y_bottom), .003, .01, facecolor=colors[12], clip_on=False, transform=plt.gcf().transFigure))
x +=.00525
panel9.add_patch(plt.Rectangle((x,y_top), .00775, .01, facecolor=colors[13], clip_on=False, transform=plt.gcf().transFigure))
panel9.add_patch(plt.Rectangle((x,y_bottom), .00775, .01, facecolor=colors[13], clip_on=False, transform=plt.gcf().transFigure))
x += .011
panel9.add_patch(plt.Rectangle((x,y_top), .01315, .01, facecolor=colors[14], clip_on=False, transform=plt.gcf().transFigure))
panel9.add_patch(plt.Rectangle((x,y_bottom), .01315, .01, facecolor=colors[14], clip_on=False, transform=plt.gcf().transFigure))
x += .0165
panel9.add_patch(plt.Rectangle((x,y_top), .024, .01, facecolor=colors[15], clip_on=False, transform=plt.gcf().transFigure))
panel9.add_patch(plt.Rectangle((x,y_bottom), .024, .01, facecolor=colors[15], clip_on=False, transform=plt.gcf().transFigure))
yText = y_top + 0.001
plt.text(.5425, yText, 'C', fontsize=7, fontname='Times New Roman', fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.5745, yText, 'T', fontsize=7, fontname='Times New Roman', fontweight='bold', color='white', transform=plt.gcf().transFigure)
plt.text(.6065, yText, 'C', fontsize=7, fontname='Times New Roman', fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.64, yText, 'T', fontsize=7, fontname='Times New Roman', fontweight='bold', color='white', transform=plt.gcf().transFigure)
plt.text(.6735, yText, '2', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.7065, yText, '3', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.739, yText, '4', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.771, yText, '5+', fontsize=7, fontweight='bold', fontname='Times New Roman', color='white', transform=plt.gcf().transFigure)
plt.text(.805, yText, '2', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.838, yText, '3', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.871, yText, '4', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.903, yText, '5+', fontsize=7, fontweight='bold', fontname='Times New Roman', color='white', transform=plt.gcf().transFigure)
plt.text(.9235, yText, '2', fontsize=6, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.9313, yText, '3', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.945, yText, '4', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.965, yText, '5+', fontsize=7, fontweight='bold', fontname='Times New Roman', color='white', transform=plt.gcf().transFigure)
yText_labels_top = yText + 0.02
yText_labels_bottom = y_bottom - .01
yText_labels_bottom_sec = yText_labels_bottom - .01
plt.text(.5425, yText_labels_top, '1bp Deletion', fontsize=7, fontname='Times New Roman', weight='bold', color='black', transform=plt.gcf().transFigure)
plt.text(.6065, yText_labels_top, '1bp Insertion', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.689, yText_labels_top, '>1bp Deletion at Repeats\n (Deletion Length)', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.82, yText_labels_top, '>1bp Insertions at Repeats\n (Insertion Length)', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.926, yText_labels_top, ' Mircohomology\n(Deletion Length)', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.535, yText_labels_bottom_sec, 'Homopolymer Length', fontsize=5, fontname='Times New Roman', weight='bold', color='black', transform=plt.gcf().transFigure)
plt.text(.6, yText_labels_bottom_sec, 'Homopolymer Length', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.698, yText_labels_bottom_sec, 'Number of Repeat Units', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.83, yText_labels_bottom_sec, 'Number of Repeat Units', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.925, yText_labels_bottom_sec, 'Mircohomology Length', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x = .5292
for i in range (0, 8, 1):
if i != 2 and i != 3:
plt.text(x, yText_labels_bottom, '1 2 3 4 5 6+', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
else:
plt.text(x, yText_labels_bottom, '0 1 2 3 4 5+', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .03285
x += 0.0005
for i in range (0, 4, 1):
plt.text(x, yText_labels_bottom, '0 1 2 3 4 5+', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .033
x -= 0.0009
plt.text(x, yText_labels_bottom, '1', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .006
plt.text(x, yText_labels_bottom, '1 2', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .011
plt.text(x, yText_labels_bottom, '1 2 3', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .0165
plt.text(x, yText_labels_bottom, '1 2 3 4 5+', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
while y%4 != 0:
y += 1
ytick_offest = int(y/4)
if percentage:
ylabs = [0, round(ytick_offest, 1), round(ytick_offest*2, 1), round(ytick_offest*3, 1), round(ytick_offest*4, 1)]
ylabels= [str(0), str(round(ytick_offest, 1)) + "%", str(round(ytick_offest*2, 1)) + "%",
str(round(ytick_offest*3, 1)) + "%", str(round(ytick_offest*4, 1)) + "%"]
else:
ylabs = [0, ytick_offest, ytick_offest*2, ytick_offest*3, ytick_offest*4]
ylabels= [0, ytick_offest, ytick_offest*2,
ytick_offest*3, ytick_offest*4]
labs = np.arange(0.375,83.375,1)
# if not percentage:
# ylabels = ['{:,}'.format(int(x)) for x in ylabels]
if not percentage:
ylabels = ['{:,}'.format(int(x)) for x in ylabels]
if len(ylabels[-1]) > 3:
ylabels_temp = []
if len(ylabels[-1]) > 7:
for label in ylabels:
if len(label) > 7:
ylabels_temp.append(label[0:-8] + "m")
elif len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
else:
for label in ylabels:
if len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
ylabels = ylabels_temp
panel9.set_xlim([0, 83])
panel9.set_ylim([0, y])
panel9.set_xticks(labs)
panel9.set_yticks(ylabs)
plt.text(0.528, 0.48 + 0.01, "ID-83", fontsize=10, weight='bold', color='black', fontname= "Arial", transform=plt.gcf().transFigure)
panel9.set_yticklabels(ylabels, fontsize=8)
panel9.yaxis.grid(True)
panel9.grid(which='major', axis='y', color=[0.6,0.6,0.6], zorder=1)
panel9.set_xlabel('')
panel9.set_ylabel('')
if percentage:
panel9.set_ylabel("Percentage of Indels", fontsize=8, fontname="Times New Roman", weight = 'bold')
else:
panel9.set_ylabel("Number of Indels", fontsize=8, fontname="Times New Roman", weight = 'bold')
panel9.tick_params(axis='both',which='both',\
bottom=False, labelbottom=False,\
left=False, labelleft=True,\
right=False, labelright=False,\
top=False, labeltop=False,\
direction='in', length=25, colors='gray', width=2)
[i.set_color("black") for i in panel9.get_yticklabels()]
############### plot ID-96 ##############################################
xlabels = []
total_count = sum(sum(sum(i) for i in nuc) for nuc in mutations_ID96[sample].values())
x = 0.4
ymax = 0
colors = [[253/256,190/256,111/256], [255/256,128/256,2/256], [176/256,221/256,139/256], [54/256,161/256,46/256],
[253/256,202/256,181/256], [252/256,138/256,106/256], [241/256,68/256,50/256], [188/256,25/256,26/256],
[208/256,225/256,242/256], [148/256,196/256,223/256], [74/256,152/256,201/256], [23/256,100/256,171/256],
[226/256,226/256,239/256], [182/256,182/256,216/256], [134/256,131/256,189/256], [98/256,64/256,155/256]]
i = 0
for key in mutations_ID96[sample]:
l = 1
for seq in mutations_ID96[sample][key]:
xlabels.append(l)
if percentage:
if total_count > 0:
trans = panel10.bar(x, seq[0]/total_count*100,width=0.2,color=[1/256,70/256,102/256],align='center', zorder=1000, label='Transcribed Strand')
x += 0.2
untrans = panel10.bar(x, seq[1]/total_count*100,width=0.2,color=[228/256,41/256,38/256],align='center', zorder=1000, label='Untranscribed Strand')
if seq[0]/total_count*100 > ymax:
ymax = seq[0]/total_count*100
if seq[1]/total_count*100 > ymax:
ymax = seq[1]/total_count*100
else:
trans = panel10.bar(x, seq[0],width=0.2,color=[1/256,70/256,102/256],align='center', zorder=1000, label='Transcribed Strand')
x += 0.2
untrans = panel10.bar(x, seq[1],width=0.2,color=[228/256,41/256,38/256],align='center', zorder=1000, label='Untranscribed Strand')
if seq[0] > ymax:
ymax = seq[0]
if seq[1] > ymax:
ymax = seq[1]
x += 0.799
l += 1
i += 1
x = .529
y_top = .2075
y_bottom = .0375
y = int(ymax*1.25)
y2 = y+2
for i in range(0, 12, 1):
panel10.add_patch(plt.Rectangle((x,y_top), .02935, .01, facecolor=colors[i], clip_on=False, transform=plt.gcf().transFigure))
panel10.add_patch(plt.Rectangle((x,y_bottom), .02935, .01, facecolor=colors[i], clip_on=False, transform=plt.gcf().transFigure))
x += .0329
panel10.add_patch(plt.Rectangle((x-.0005,y_top), .003, .01, facecolor=colors[12], clip_on=False, transform=plt.gcf().transFigure))
panel10.add_patch(plt.Rectangle((x-.0005,y_bottom), .003, .01, facecolor=colors[12], clip_on=False, transform=plt.gcf().transFigure))
x +=.00525
panel10.add_patch(plt.Rectangle((x,y_top), .00775, .01, facecolor=colors[13], clip_on=False, transform=plt.gcf().transFigure))
panel10.add_patch(plt.Rectangle((x,y_bottom), .00775, .01, facecolor=colors[13], clip_on=False, transform=plt.gcf().transFigure))
x += .011
panel10.add_patch(plt.Rectangle((x,y_top), .01315, .01, facecolor=colors[14], clip_on=False, transform=plt.gcf().transFigure))
panel10.add_patch(plt.Rectangle((x,y_bottom), .01315, .01, facecolor=colors[14], clip_on=False, transform=plt.gcf().transFigure))
x += .0165
panel10.add_patch(plt.Rectangle((x,y_top), .024, .01, facecolor=colors[15], clip_on=False, transform=plt.gcf().transFigure))
panel10.add_patch(plt.Rectangle((x,y_bottom), .024, .01, facecolor=colors[15], clip_on=False, transform=plt.gcf().transFigure))
yText = y_top + 0.001
plt.text(.5425, yText, 'C', fontsize=7, fontname='Times New Roman', fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.5745, yText, 'T', fontsize=7, fontname='Times New Roman', fontweight='bold', color='white', transform=plt.gcf().transFigure)
plt.text(.6065, yText, 'C', fontsize=7, fontname='Times New Roman', fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.64, yText, 'T', fontsize=7, fontname='Times New Roman', fontweight='bold', color='white', transform=plt.gcf().transFigure)
plt.text(.6735, yText, '2', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.7065, yText, '3', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.739, yText, '4', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.771, yText, '5+', fontsize=7, fontweight='bold', fontname='Times New Roman', color='white', transform=plt.gcf().transFigure)
plt.text(.805, yText, '2', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.838, yText, '3', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.871, yText, '4', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.903, yText, '5+', fontsize=7, fontweight='bold', fontname='Times New Roman', color='white', transform=plt.gcf().transFigure)
plt.text(.9235, yText, '2', fontsize=6, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.9313, yText, '3', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.945, yText, '4', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.965, yText, '5+', fontsize=7, fontweight='bold', fontname='Times New Roman', color='white', transform=plt.gcf().transFigure)
yText_labels_top = yText + 0.02
yText_labels_bottom = y_bottom - .01
yText_labels_bottom_sec = yText_labels_bottom - .01
plt.text(.5425, yText_labels_top, '1bp Deletion', fontsize=7, fontname='Times New Roman', weight='bold', color='black', transform=plt.gcf().transFigure)
plt.text(.6065, yText_labels_top, '1bp Insertion', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.689, yText_labels_top, '>1bp Deletion at Repeats\n (Deletion Length)', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.82, yText_labels_top, '>1bp Insertions at Repeats\n (Insertion Length)', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.926, yText_labels_top, ' Mircohomology\n(Deletion Length)', fontsize=7, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.535, yText_labels_bottom_sec, 'Homopolymer Length', fontsize=5, fontname='Times New Roman', weight='bold', color='black', transform=plt.gcf().transFigure)
plt.text(.6, yText_labels_bottom_sec, 'Homopolymer Length', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.698, yText_labels_bottom_sec, 'Number of Repeat Units', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.83, yText_labels_bottom_sec, 'Number of Repeat Units', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.925, yText_labels_bottom_sec, 'Mircohomology Length', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x = .5292
for i in range (0, 8, 1):
if i != 2 and i != 3:
plt.text(x, yText_labels_bottom, '1 2 3 4 5 6+', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
else:
plt.text(x, yText_labels_bottom, '0 1 2 3 4 5+', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .03285
x += 0.0005
for i in range (0, 4, 1):
plt.text(x, yText_labels_bottom, '0 1 2 3 4 5+', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .033
x -= 0.0009
plt.text(x, yText_labels_bottom, '1', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .006
plt.text(x, yText_labels_bottom, '1 2', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .011
plt.text(x, yText_labels_bottom, '1 2 3', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += .0165
plt.text(x, yText_labels_bottom, '1 2 3 4 5+', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
if y <= 4:
y += 4
while y%4 != 0:
y += 1
ytick_offest = int(y/4)
if percentage:
ylabs = [0, round(ytick_offest, 1), round(ytick_offest*2, 1), round(ytick_offest*3, 1), round(ytick_offest*4, 1)]
ylabels= [str(0), str(round(ytick_offest, 1)) + "%", str(round(ytick_offest*2, 1)) + "%",
str(round(ytick_offest*3, 1)) + "%", str(round(ytick_offest*4, 1)) + "%"]
else:
ylabs = [0, ytick_offest, ytick_offest*2, ytick_offest*3, ytick_offest*4]
ylabels= [0, ytick_offest, ytick_offest*2,
ytick_offest*3, ytick_offest*4]
if not percentage:
ylabels = ['{:,}'.format(int(x)) for x in ylabels]
if len(ylabels[-1]) > 3:
ylabels_temp = []
if len(ylabels[-1]) > 7:
for label in ylabels:
if len(label) > 7:
ylabels_temp.append(label[0:-8] + "m")
elif len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
else:
for label in ylabels:
if len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
ylabels = ylabels_temp
panel10.set_xlim([0, 83])
panel10.set_ylim([0, y])
panel10.set_xticks(labs)
panel10.set_yticks(ylabs)
plt.text(0.528, 0.24, "ID-415", fontsize=10, weight='bold', color='black', fontname= "Arial", transform=plt.gcf().transFigure)
panel10.set_yticklabels(ylabels, fontsize=8, color='b')
panel10.yaxis.grid(True)
panel10.grid(which='major', axis='y', color=[0.6,0.6,0.6], zorder=1)
panel10.set_xlabel('')
panel10.set_ylabel('')
panel10.legend(handles=[trans, untrans], prop={'size':4})
if percentage:
panel10.set_ylabel("Percentage of Indels", fontsize=8, fontname="Times New Roman", weight = 'bold')
else:
panel10.set_ylabel("Number of Indels", fontsize=8, fontname="Times New Roman", weight = 'bold')
panel10.tick_params(axis='both',which='both',\
bottom=False, labelbottom=False,\
left=False, labelleft=True,\
right=False, labelright=False,\
top=False, labeltop=False,\
direction='in', length=25, colors='gray', width=2)
[i.set_color("black") for i in panel10.get_yticklabels()]
# ############### plot ID-simple ##############################################
total_count = sum(sum(nuc) for nuc in mutations_simple[sample].values())
xlabels = []
x = 0.4
ymax = 0
colors = [[253/256,190/256,111/256], [255/256,128/256,2/256], [176/256,221/256,139/256], [54/256,161/256,46/256],
[23/256,100/256,171/256],[98/256,64/256,155/256], [98/256,64/256,155/256]]
i = 0
for key in mutations_simple[sample]:
l = 1
for seq in mutations_simple[sample][key]:
xlabels.append(l)
if percentage:
if total_count > 0:
panel11.bar(x, seq/total_count*100,width=0.4,color=colors[i],align='center', zorder=1000)
if seq/total_count*100 > ymax:
ymax = seq/total_count*100
else:
panel11.bar(x, seq,width=0.4,color=colors[i],align='center', zorder=1000)
if seq > ymax:
ymax = seq
x += 1
l += 1
if i < 4:
i += 1
x = .529
y_top = .6825 + 0.02
y_bottom = .5175 + 0.02
y = int(ymax*1.25)
y2 = y+2
for i in range(0, 4, 1):
panel11.add_patch(plt.Rectangle((x,y_top), .029, .01, facecolor=colors[i], clip_on=False, transform=plt.gcf().transFigure))
panel11.add_patch(plt.Rectangle((x,y_bottom), .029, .01, facecolor=colors[i], clip_on=False, transform=plt.gcf().transFigure))
x += .032
panel1.add_patch(plt.Rectangle((x,y_top), .02, .01, facecolor=colors[i+1], clip_on=False, transform=plt.gcf().transFigure))
panel1.add_patch(plt.Rectangle((x,y_bottom), .02, .01, facecolor=colors[i+1], clip_on=False, transform=plt.gcf().transFigure))
yText = y_top + 0.001
plt.text(.542, yText, 'C', fontsize=7, fontname='Times New Roman', fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.573, yText, 'T', fontsize=7, fontname='Times New Roman', fontweight='bold', color='white', transform=plt.gcf().transFigure)
plt.text(.605, yText, 'C', fontsize=7, fontname='Times New Roman', fontweight='bold', transform=plt.gcf().transFigure)
plt.text(.6375, yText, 'T', fontsize=7, fontname='Times New Roman', fontweight='bold', color='white', transform=plt.gcf().transFigure)
yText_labels_top = yText + .012
yText_labels_bottom = y_bottom
yText_labels_bottom_sec = yText_labels_bottom -.015
plt.text(.545, yText_labels_top, '1bp Deletion', fontsize=5, fontname='Times New Roman', weight='bold', color='black', transform=plt.gcf().transFigure)
plt.text(.61, yText_labels_top, '1bp Insertion', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.535, yText_labels_bottom_sec, 'Homopolymer Length', fontsize=5, fontname='Times New Roman', weight='bold', color='black', transform=plt.gcf().transFigure)
plt.text(.6, yText_labels_bottom_sec, 'Homopolymer Length', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.66, yText_labels_top, '>1bp', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
plt.text(.661, yText_labels_bottom_sec, 'Type', fontsize=5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x = .529
yText_labels_bottom = y_bottom -.006#+0.002
for l in range (0, 4, 1):
if l < 2:
for i in range(1, 6, 1):
plt.text(x, yText_labels_bottom, str(i), fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += 0.0054
x -= 0.003
plt.text(x, yText_labels_bottom, '+6', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += 0.0082
else:
if l == 2:
x += 0
for i in range(0, 5, 1):
plt.text(x, yText_labels_bottom, str(i), fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += 0.0054
x -= 0.003
plt.text(x, yText_labels_bottom, '+5', fontsize=4.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure)
x += 0.0082
yText_labels_bottom += 0.002
plt.text(x, yText_labels_bottom, 'Del', fontsize=3.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure, rotation='vertical')
x += 0.005
plt.text(x, yText_labels_bottom, 'Ins', fontsize=3.8, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure, rotation='vertical')
x += 0.005
yText_labels_bottom += 0.0005
plt.text(x, yText_labels_bottom, 'MH', fontsize=3.5, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure, rotation='vertical')
x += 0.006
yText_labels_bottom += 0.001
plt.text(x, yText_labels_bottom, 'COMP', fontsize=2, fontweight='bold', fontname='Times New Roman', color='black', transform=plt.gcf().transFigure, rotation='vertical')
while y%4 != 0:
y += 1
ytick_offest = int(y/4)
if percentage:
ylabs = [0, round(ytick_offest, 1), round(ytick_offest*2, 1), round(ytick_offest*3, 1), round(ytick_offest*4, 1)]
ylabels= [str(0), str(round(ytick_offest, 1)) + "%", str(round(ytick_offest*2, 1)) + "%",
str(round(ytick_offest*3, 1)) + "%", str(round(ytick_offest*4, 1)) + "%"]
else:
ylabs = [0, ytick_offest, ytick_offest*2, ytick_offest*3, ytick_offest*4]
ylabels= [0, ytick_offest, ytick_offest*2,
ytick_offest*3, ytick_offest*4]
if not percentage:
ylabels = ['{:,}'.format(int(x)) for x in ylabels]
if len(ylabels[-1]) > 3:
ylabels_temp = []
if len(ylabels[-1]) > 7:
for label in ylabels:
if len(label) > 7:
ylabels_temp.append(label[0:-8] + "m")
elif len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
else:
for label in ylabels:
if len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
ylabels = ylabels_temp
# if not percentage:
# ylabels = ['{:,}'.format(int(x)) for x in ylabels]
panel11.set_xlim([0, 28])
panel11.set_ylim([0, y])
panel11.set_yticks(ylabs)
plt.text(0.528, 0.71 + 0.02, "ID-28", fontsize=10, weight='bold', color='black', fontname= "Arial", transform=plt.gcf().transFigure)
panel11.set_yticklabels(ylabels, fontsize=8)
panel11.yaxis.grid(True)
panel11.grid(which='major', axis='y', color=[0.6,0.6,0.6], zorder=1)
panel11.set_xlabel('')
panel11.set_ylabel('')
if percentage:
panel11.set_ylabel("Percentage of Indels", fontsize=8, fontname="Times New Roman", weight = 'bold')
else:
panel11.set_ylabel("Number of Indels", fontsize=8, fontname="Times New Roman", weight = 'bold')
panel11.axis('on')
panel11.tick_params(axis='both',which='both',\
bottom=False, labelbottom=False,\
left=False, labelleft=True,\
right=False, labelright=False,\
top=False, labeltop=False,\
direction='in', length=25, colors='gray', width=2)
[i.set_color("black") for i in panel11.get_yticklabels()]
############### plot DBS-78 ##############################################
total_count = sum(sum(nuc.values()) for nuc in mutations_78[sample].values())
xlabels = []
x = 0.4
ymax = 0
colors = [[3/256,189/256,239/256], [3/256,102/256,204/256],[162/256,207/256,99/256],
[1/256,102/256,1/256], [255/256,153/256,153/256], [228/256,41/256,38/256],
[255/256,178/256,102/256], [255/256,128/256,1/256], [204/256,153/256,255/256],
[76/256,1/256,153/256]]
i = 0
for key in mutations_78[sample]:
muts = mutations_78[sample][key].keys()
muts = sorted(muts)
for seq in muts:
xlabels.append(seq)
if percentage:
if total_count > 0:
panel7.bar(x, mutations_78[sample][key][seq]/total_count*100,width=0.4,color=colors[i],align='center', zorder=1000)
if mutations_78[sample][key][seq]/total_count*100 > ymax:
ymax = mutations_78[sample][key][seq]/total_count*100
else:
panel7.bar(x, mutations_78[sample][key][seq],width=0.4,color=colors[i],align='center', zorder=1000)
if mutations_78[sample][key][seq] > ymax:
ymax = mutations_78[sample][key][seq]
x += 1
i += 1
x = .5
y3 = .8825 + 0.02
y = ymax*1.25
y2 = y+2
i = 0
panel7.add_patch(plt.Rectangle((.53,y3), .048, .01, facecolor=colors[0], clip_on=False, transform=plt.gcf().transFigure))
panel7.add_patch(plt.Rectangle((.581,y3), .032, .01, facecolor=colors[1], clip_on=False, transform=plt.gcf().transFigure))
panel7.add_patch(plt.Rectangle((.61675,y3), .048, .01, facecolor=colors[2], clip_on=False, transform=plt.gcf().transFigure))
panel7.add_patch(plt.Rectangle((.6685,y3), .032, .01, facecolor=colors[3], clip_on=False, transform=plt.gcf().transFigure))
panel7.add_patch(plt.Rectangle((.704,y3), .049, .01, facecolor=colors[4], clip_on=False, transform=plt.gcf().transFigure))
panel7.add_patch(plt.Rectangle((.757,y3), .031, .01, facecolor=colors[5], clip_on=False, transform=plt.gcf().transFigure))
panel7.add_patch(plt.Rectangle((.792,y3), .031, .01, facecolor=colors[6], clip_on=False, transform=plt.gcf().transFigure))
panel7.add_patch(plt.Rectangle((.827,y3), .049, .01, facecolor=colors[7], clip_on=False, transform=plt.gcf().transFigure))
panel7.add_patch(plt.Rectangle((.88,y3), .048, .01, facecolor=colors[8], clip_on=False, transform=plt.gcf().transFigure))
panel7.add_patch(plt.Rectangle((.932,y3), .048, .01, facecolor=colors[9], clip_on=False, transform=plt.gcf().transFigure))
yText = y3 + 0.015
plt.text(.54, yText, 'AC>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.584, yText, 'AT>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.627, yText, 'CC>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.67, yText, 'CG>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.715, yText, 'CT>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.759, yText, 'GC>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.794, yText, 'TA>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.837, yText, 'TC>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.89, yText, 'TG>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.9425, yText, 'TT>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
if percentage:
ytick_offest = round((y/4), 1)
ylabs = [0, round(ytick_offest, 1), round(ytick_offest*2, 1), round(ytick_offest*3, 1), round(ytick_offest*4, 1)]
ylabels= [str(0), str(round(ytick_offest, 1)) + "%", str(round(ytick_offest*2, 1)) + "%",
str(round(ytick_offest*3, 1)) + "%", str(round(ytick_offest*4, 1)) + "%"]
else:
# if y < 10:
# if y/4 - int(y/4) > 0.5:
# ytick_offest = int(y/4) + 1
# else:
# ytick_offest = int(y/4)
if y < 4:
y = 4
#else:
ytick_offest = int(y/4)
if ytick_offest == 0:
ytick_offest = 1
ylabs = [0, ytick_offest, ytick_offest*2, ytick_offest*3, ytick_offest*4]
ylabels= [0, ytick_offest, ytick_offest*2,
ytick_offest*3, ytick_offest*4]
if y < 4:
y = 4
plt.text(0.53, 0.91+0.02, "DBS-78", fontsize=10, weight='bold', color='black', fontname= "Arial", transform=plt.gcf().transFigure)
if not percentage:
ylabels = ['{:,}'.format(int(x)) for x in ylabels]
if len(ylabels[-1]) > 3:
ylabels_temp = []
if len(ylabels[-1]) > 7:
for label in ylabels:
if len(label) > 7:
ylabels_temp.append(label[0:-8] + "m")
elif len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
else:
for label in ylabels:
if len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
ylabels = ylabels_temp
# if not percentage:
# ylabels = ['{:,}'.format(int(x)) for x in ylabels]
labs = np.arange(0.44,78.44,1)
panel7.set_xlim([0, 78])
panel7.set_ylim([0, y])
panel7.set_xticks(labs)
panel7.set_yticks(ylabs)
panel7.set_xticklabels(xlabels, rotation='vertical', fontsize=7, color='grey', fontname='Courier New', verticalalignment='top', fontweight='bold')
panel7.set_yticklabels(ylabels, fontsize=8, color='black')
panel7.yaxis.grid(True)
panel7.grid(which='major', axis='y', color=[0.93,0.93,0.93], zorder=1)
panel7.set_xlabel('')
panel7.set_ylabel('')
if percentage:
panel7.set_ylabel("Percentage of Double Base Substitutions", fontsize=6, fontname="Times New Roman", weight = 'bold')
else:
panel7.set_ylabel("Number of Double Base Substitutions", fontsize=6, fontname="Times New Roman", weight = 'bold')
panel7.axis('on')
panel7.tick_params(axis='both',which='both',\
bottom=False, labelbottom=True,\
left=True, labelleft=True,\
right=True, labelright=False,\
top=False, labeltop=False,\
direction='in', length=2, colors='lightgray', width=.2)
[i.set_color("black") for i in panel7.get_yticklabels()]
[i.set_color("grey") for i in panel7.get_xticklabels()]
############### plot DBS-312 ##############################################
total_count = sum(sum(sum(tsb) for tsb in nuc.values()) for nuc in mutations_312[sample].values())
xlabels = []
x = 0.3
ymax = 0
i = 0
colors = [[3/256,189/256,239/256], [3/256,102/256,204/256],[162/256,207/256,99/256],
[1/256,102/256,1/256], [255/256,153/256,153/256], [228/256,41/256,38/256],
[255/256,178/256,102/256], [255/256,128/256,1/256], [204/256,153/256,255/256],
[76/256,1/256,153/256]]
for key in mutations_312[sample]:
muts = mutations_312[sample][key].keys()
muts = sorted(muts)
for seq in muts:
xlabels.append(seq)
if percentage:
try:
trans = panel8.bar(x, mutations_312[sample][key][seq][0]/total_count*100,width=0.2,color=[1/256,70/256,102/256],align='center', zorder=1000, label='Transcribed Strand')
x += 0.2
untrans = panel8.bar(x, mutations_312[sample][key][seq][1]/total_count*100,width=0.2,color=[228/256,41/256,38/256],align='center', zorder=1000, label='Untranscribed Strand')
x += .8
if mutations_312[sample][key][seq][0]/total_count*100 > ymax:
ymax = mutations_312[sample][key][seq][0]/total_count*100
if mutations_312[sample][key][seq][1]/total_count*100 > ymax:
ymax = mutations_312[sample][key][seq][1]/total_count*100
except:
trans = plt.bar(x, 0,width=0.2,color=[1/256,70/256,102/256],align='center', zorder=1000, label='Transcribed Strand')
untrans = plt.bar(x, 0, width=0.2,color=[228/256,41/256,38/256],align='center', zorder=1000, label='Untranscribed Strand')
else:
trans = panel8.bar(x, mutations_312[sample][key][seq][0],width=0.2,color=[1/256,70/256,102/256],align='center', zorder=1000, label='Transcribed Strand')
x += 0.2
untrans = panel8.bar(x, mutations_312[sample][key][seq][1],width=0.2,color=[228/256,41/256,38/256],align='center', zorder=1000, label='Untranscribed Strand')
x += .8
if mutations_312[sample][key][seq][0] > ymax:
ymax = mutations_312[sample][key][seq][0]
if mutations_312[sample][key][seq][1] > ymax:
ymax = mutations_312[sample][key][seq][1]
i += 1
y3 = .6825 + 0.02
y = int(ymax*1.25)
panel8.add_patch(plt.Rectangle((.785,y3), .0475, .01, facecolor=colors[0], clip_on=False, transform=plt.gcf().transFigure))
panel8.add_patch(plt.Rectangle((.834,y3), .0475, .01, facecolor=colors[4], clip_on=False, transform=plt.gcf().transFigure))
panel8.add_patch(plt.Rectangle((.883,y3), .0475, .01, facecolor=colors[7], clip_on=False, transform=plt.gcf().transFigure))
panel8.add_patch(plt.Rectangle((.932,y3), .0475, .01, facecolor=colors[9], clip_on=False, transform=plt.gcf().transFigure))
yText = y3 + .0125
plt.text(.795, yText, 'CC>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.845, yText, 'CT>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.893, yText, 'TC>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
plt.text(.943, yText, 'TT>NN', fontsize=7, fontweight='bold', fontname='Arial', transform=plt.gcf().transFigure)
if y <= 4:
y += 4
while y%4 != 0:
y += 1
ytick_offest = int(y/4)
x_shaded = 0
panel8.add_patch(plt.Rectangle((x_shaded,0), 8.9, y, facecolor=colors[0], zorder=0, alpha = 0.25, edgecolor='grey'))
x_shaded += 8.9
panel8.add_patch(plt.Rectangle((x_shaded,0), 9, y, facecolor=colors[4], zorder=0, alpha = 0.25, edgecolor='grey'))
x_shaded += 9
panel8.add_patch(plt.Rectangle((x_shaded,0), 9, y, facecolor=colors[7], zorder=0, alpha = 0.25, edgecolor='grey'))
x_shaded += 9
panel8.add_patch(plt.Rectangle((x_shaded,0), 9.1, y, facecolor=colors[9], zorder=0, alpha = 0.25, edgecolor='grey'))
if percentage:
ylabs = [0, round(ytick_offest, 1), round(ytick_offest*2, 1), round(ytick_offest*3, 1), round(ytick_offest*4, 1)]
ylabels= [str(0), str(round(ytick_offest, 1)) + "%", str(round(ytick_offest*2, 1)) + "%",
str(round(ytick_offest*3, 1)) + "%", str(round(ytick_offest*4, 1)) + "%"]
else:
if ytick_offest == 0:
ytick_offest = 1
ylabs = [0, ytick_offest, ytick_offest*2, ytick_offest*3, ytick_offest*4]
ylabels= [0, ytick_offest, ytick_offest*2,
ytick_offest*3, ytick_offest*4]
plt.text(0.78, 0.71+0.02, "DBS-186", fontsize=10, weight='bold', color='black', fontname= "Arial", transform=plt.gcf().transFigure)
if not percentage:
ylabels = ['{:,}'.format(int(x)) for x in ylabels]
if len(ylabels[-1]) > 3:
ylabels_temp = []
if len(ylabels[-1]) > 7:
for label in ylabels:
if len(label) > 7:
ylabels_temp.append(label[0:-8] + "m")
elif len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
else:
for label in ylabels:
if len(label) > 3:
ylabels_temp.append(label[0:-4] + "k")
else:
ylabels_temp.append(label)
ylabels = ylabels_temp
labs = np.arange(0.55,36.44,1)
panel8.set_xlim([0, 36])
panel8.set_ylim([0, y])
panel8.set_xticks(labs)
panel8.set_yticks(ylabs)
panel8.set_xticklabels(xlabels, rotation='vertical', fontsize=7, color='grey', fontname='Courier New', verticalalignment='top', fontweight='bold')
panel8.set_yticklabels(ylabels, fontsize=8)
panel8.yaxis.grid(True)
panel8.grid(which='major', axis='y', color=[0.93,0.93,0.93], zorder=1)
panel8.set_xlabel('')
panel8.set_ylabel('')
panel8.legend(handles=[trans, untrans], prop={'size':4})
if percentage:
panel8.set_ylabel("Percentage of Double Base Substitutions", fontsize=6, fontname="Times New Roman", weight = 'bold')
else:
panel8.set_ylabel("Number of Double Base Substitutions", fontsize=6, fontname="Times New Roman", weight = 'bold')
panel8.tick_params(axis='both',which='both',\
bottom=False, labelbottom=True,\
left=True, labelleft=True,\
right=True, labelright=False,\
top=False, labeltop=False,\
direction='in', length=2, colors='lightgray', width=1)
[i.set_color("black") for i in panel8.get_yticklabels()]
[i.set_color("grey") for i in panel8.get_xticklabels()]
panel8.set_xlim([0, 36])
pp.savefig(plot1)
plt.close()
pp.close()
def main():
# print("Context not supported.")
#plotSBS("/Users/ebergstr/Desktop/Perl_tests/testCode/simulation_code_python/mutation_simulation/references/matrix/BRCA_test/BRCA_test.SBS96.all", "/Users/ebergstr/Desktop/", "test", '96', False)
samplePortrait("/Users/ebergstr/Desktop/Mel/", "/Users/ebergstr/Desktop/Mel/output/plots/", "Mel")
#plotDBS("/Users/ebergstr/Downloads/Biliary-AdenoCA.dinucs.csv", "/Users/ebergstr/Desktop/", "test", '78', False)
if __name__ == '__main__':
main()
| 42.989619 | 205 | 0.625926 | 15,114 | 99,392 | 4.019584 | 0.043337 | 0.008922 | 0.010666 | 0.08217 | 0.861601 | 0.827331 | 0.798212 | 0.766493 | 0.742132 | 0.722709 | 0 | 0.087319 | 0.165788 | 99,392 | 2,311 | 206 | 43.008222 | 0.645392 | 0.034188 | 0 | 0.58595 | 0 | 0 | 0.098917 | 0.001239 | 0 | 0 | 0 | 0 | 0 | 1 | 0.001064 | false | 0.000532 | 0.005322 | 0 | 0.006386 | 0.00479 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
c01810a4d7924725e886f4b9697cf9e354731827 | 33 | py | Python | opm/linty/__init__.py | Open-Prose-Metrics/open_prose_metrics_app-core | 9df65edfe9ee9af0a0731c3f2e21ea25bced250c | [
"MIT"
] | null | null | null | opm/linty/__init__.py | Open-Prose-Metrics/open_prose_metrics_app-core | 9df65edfe9ee9af0a0731c3f2e21ea25bced250c | [
"MIT"
] | 4 | 2021-04-30T21:38:10.000Z | 2022-01-13T03:32:33.000Z | opm/linty/__init__.py | Open-Prose-Metrics/open_prose_metrics_app-core | 9df65edfe9ee9af0a0731c3f2e21ea25bced250c | [
"MIT"
] | 1 | 2021-03-21T14:08:28.000Z | 2021-03-21T14:08:28.000Z | from linty.linty import lint_text | 33 | 33 | 0.878788 | 6 | 33 | 4.666667 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 33 | 1 | 33 | 33 | 0.933333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
22154b840c06d1d136738c0743a2315aae64fa1d | 101 | py | Python | env/lib/python3.6/site-packages/collectfast/tests/test_storages/boto3_subclass.py | Mohitkaushal97/File | 0bc5cca9a557e242861a289af74dfe8b905bc3bd | [
"MIT"
] | null | null | null | env/lib/python3.6/site-packages/collectfast/tests/test_storages/boto3_subclass.py | Mohitkaushal97/File | 0bc5cca9a557e242861a289af74dfe8b905bc3bd | [
"MIT"
] | null | null | null | env/lib/python3.6/site-packages/collectfast/tests/test_storages/boto3_subclass.py | Mohitkaushal97/File | 0bc5cca9a557e242861a289af74dfe8b905bc3bd | [
"MIT"
] | null | null | null | from storages.backends.s3boto3 import S3Boto3Storage
class CustomStorage(S3Boto3Storage):
pass
| 16.833333 | 52 | 0.821782 | 10 | 101 | 8.3 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.068182 | 0.128713 | 101 | 5 | 53 | 20.2 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
22201839a5a07738e08b522381dc124fec34bd1a | 29 | py | Python | pytealutils/debug/__init__.py | nullun/pyteal-utils | 1c7705a6c2fd80faee1e45962fe399fd672f37c6 | [
"MIT"
] | 20 | 2021-09-01T17:57:18.000Z | 2022-03-13T07:51:26.000Z | pytealutils/debug/__init__.py | nullun/pyteal-utils | 1c7705a6c2fd80faee1e45962fe399fd672f37c6 | [
"MIT"
] | 12 | 2021-09-01T20:09:30.000Z | 2022-01-11T12:17:51.000Z | pytealutils/debug/__init__.py | nullun/pyteal-utils | 1c7705a6c2fd80faee1e45962fe399fd672f37c6 | [
"MIT"
] | 8 | 2021-09-03T10:44:19.000Z | 2022-02-28T11:52:20.000Z | from .debug import log_stats
| 14.5 | 28 | 0.827586 | 5 | 29 | 4.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.137931 | 29 | 1 | 29 | 29 | 0.92 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
2239c56134f59f26086454a43e1b3e1059adb449 | 6,900 | py | Python | python/tvm/topi/testing/depthwise_conv2d_python.py | zhenlohuang/tvm | fd2e6d17120a79533852c6bb705429d9c7bc286b | [
"Apache-2.0"
] | 90 | 2019-01-26T00:38:49.000Z | 2022-03-11T23:12:34.000Z | python/tvm/topi/testing/depthwise_conv2d_python.py | zhenlohuang/tvm | fd2e6d17120a79533852c6bb705429d9c7bc286b | [
"Apache-2.0"
] | 91 | 2019-02-27T00:17:01.000Z | 2022-02-21T18:08:21.000Z | python/tvm/topi/testing/depthwise_conv2d_python.py | zhenlohuang/tvm | fd2e6d17120a79533852c6bb705429d9c7bc286b | [
"Apache-2.0"
] | 41 | 2019-01-28T14:37:03.000Z | 2022-03-31T03:58:57.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# pylint: disable=invalid-name, unused-variable, line-too-long
"""Depthwise convolution in python"""
import numpy as np
from scipy import signal
def depthwise_conv2d_python_nchw(input_np, filter_np, stride, padding):
"""Depthwise convolution operator in NCHW layout.
Parameters
----------
input_np : numpy.ndarray
4-D with shape [batch, in_channel, in_height, in_width]
filter_np : numpy.ndarray
4-D with shape [in_channel, channel_multiplier, filter_height, filter_width]
stride : list / tuple of 2 ints
[stride_height, stride_width]
padding : str
'VALID' or 'SAME'
Returns
-------
output_np : np.ndarray
4-D with shape [batch, out_channel, out_height, out_width]
"""
batch, in_channel, in_height, in_width = input_np.shape
_, channel_multiplier, filter_height, filter_width = filter_np.shape
if isinstance(stride, int):
stride_h = stride_w = stride
else:
stride_h, stride_w = stride
# calculate output shape
if padding == "VALID":
out_channel = in_channel * channel_multiplier
out_height = (in_height - filter_height) // stride_h + 1
out_width = (in_width - filter_width) // stride_w + 1
output_np = np.zeros((batch, out_channel, out_height, out_width))
for i in range(batch):
for j in range(out_channel):
output_np[i, j, :, :] = signal.convolve2d(
input_np[i, j // channel_multiplier, :, :],
np.rot90(filter_np[j // channel_multiplier, j % channel_multiplier, :, :], 2),
mode="valid",
)[
0 : (in_height - filter_height + 1) : stride_h,
0 : (in_width - filter_width + 1) : stride_w,
]
elif padding == "SAME":
out_channel = in_channel * channel_multiplier
out_height = np.int(np.ceil(float(in_height) / float(stride_h)))
out_width = np.int(np.ceil(float(in_width) / float(stride_w)))
output_np = np.zeros((batch, out_channel, out_height, out_width))
pad_along_height = np.int(
np.max((out_height - 1) * stride_h + filter_height - in_height, 0)
)
pad_along_width = np.int(np.max((out_width - 1) * stride_w + filter_width - in_width, 0))
pad_top_tvm = np.int(np.ceil(float(pad_along_height) / 2))
pad_left_tvm = np.int(np.ceil(float(pad_along_width) / 2))
pad_top_scipy = np.int(np.ceil(float(filter_height - 1) / 2))
pad_left_scipy = np.int(np.ceil(float(filter_width - 1) / 2))
index_h = pad_top_scipy - pad_top_tvm
index_w = pad_left_scipy - pad_left_tvm
for i in range(batch):
for j in range(out_channel):
output_np[i, j, :, :] = signal.convolve2d(
input_np[i, j // channel_multiplier, :, :],
np.rot90(filter_np[j // channel_multiplier, j % channel_multiplier, :, :], 2),
mode="same",
)[index_h:in_height:stride_h, index_w:in_width:stride_w]
return output_np
def depthwise_conv2d_python_nhwc(input_np, filter_np, stride, padding):
"""Depthwise convolution operator in nchw layout.
Parameters
----------
input_np : numpy.ndarray
4-D with shape [batch, in_height, in_width, in_channel]
filter_np : numpy.ndarray
4-D with shape [filter_height, filter_width, in_channel, channel_multiplier]
stride : list / tuple of 2 ints
[stride_height, stride_width]
padding : str
'VALID' or 'SAME'
Returns
-------
output_np : np.ndarray
4-D with shape [batch, out_height, out_width, out_channel]
"""
batch, in_height, in_width, in_channel = input_np.shape
filter_height, filter_width, _, channel_multiplier = filter_np.shape
if isinstance(stride, int):
stride_h = stride_w = stride
else:
stride_h, stride_w = stride
# calculate output shape
if padding == "VALID":
out_channel = in_channel * channel_multiplier
out_height = (in_height - filter_height) // stride_h + 1
out_width = (in_width - filter_width) // stride_w + 1
output_np = np.zeros((batch, out_height, out_width, out_channel))
for i in range(batch):
for j in range(out_channel):
output_np[i, :, :, j] = signal.convolve2d(
input_np[i, :, :, j // channel_multiplier],
np.rot90(filter_np[:, :, j // channel_multiplier, j % channel_multiplier], 2),
mode="valid",
)[
0 : (in_height - filter_height + 1) : stride_h,
0 : (in_width - filter_width + 1) : stride_w,
]
if padding == "SAME":
out_channel = in_channel * channel_multiplier
out_height = np.int(np.ceil(float(in_height) / float(stride_h)))
out_width = np.int(np.ceil(float(in_width) / float(stride_w)))
output_np = np.zeros((batch, out_height, out_width, out_channel))
pad_along_height = np.int(
np.max((out_height - 1) * stride_h + filter_height - in_height, 0)
)
pad_along_width = np.int(np.max((out_width - 1) * stride_w + filter_width - in_width, 0))
pad_top_tvm = np.int(np.ceil(float(pad_along_height) / 2))
pad_left_tvm = np.int(np.ceil(float(pad_along_width) / 2))
pad_top_scipy = np.int(np.ceil(float(filter_height - 1) / 2))
pad_left_scipy = np.int(np.ceil(float(filter_width - 1) / 2))
index_h = pad_top_scipy - pad_top_tvm
index_w = pad_left_scipy - pad_left_tvm
for i in range(batch):
for j in range(out_channel):
output_np[i, :, :, j] = signal.convolve2d(
input_np[i, :, :, j // channel_multiplier],
np.rot90(filter_np[:, :, j // channel_multiplier, j % channel_multiplier], 2),
mode="same",
)[index_h:in_height:stride_h, index_w:in_width:stride_w]
return output_np
| 42.331288 | 98 | 0.62029 | 941 | 6,900 | 4.284803 | 0.154091 | 0.084325 | 0.027778 | 0.032738 | 0.788442 | 0.775794 | 0.755952 | 0.71875 | 0.703373 | 0.703373 | 0 | 0.012338 | 0.271739 | 6,900 | 162 | 99 | 42.592593 | 0.79005 | 0.265507 | 0 | 0.847826 | 0 | 0 | 0.007329 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.021739 | false | 0 | 0.021739 | 0 | 0.065217 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
224174cc2452e3f4bafcfee06c99c6b28e9e4041 | 8,937 | py | Python | tests/benchmarks/sort_lib_numbers.py | feihong/arturo | b07bb638874c59d2fe976d7344dac065be04a459 | [
"MIT"
] | 401 | 2019-09-22T14:50:12.000Z | 2022-03-24T02:00:40.000Z | tests/benchmarks/sort_lib_numbers.py | feihong/arturo | b07bb638874c59d2fe976d7344dac065be04a459 | [
"MIT"
] | 394 | 2020-02-04T05:46:39.000Z | 2022-03-18T18:09:16.000Z | tests/benchmarks/sort_lib_numbers.py | feihong/arturo | b07bb638874c59d2fe976d7344dac065be04a459 | [
"MIT"
] | 14 | 2020-07-17T18:19:35.000Z | 2022-03-05T18:51:48.000Z |
lst = [138,1696,1274,1240,398,1208,1309,1512,931,1361,180,247,1003,1536,814,308,333,1408,1724,1451,1594,1108,192,1376,1877,827,764,1113,376,1284,423,1353,1354,1629,390,1052,315,1550,1647,603,1289,1754,1549,1479,314,1009,875,1058,344,498,849,1709,616,38,1980,643,348,1432,1611,1994,1306,1583,1112,1640,1494,139,199,774,1830,1832,44,1964,1345,928,974,1999,506,1364,1230,1467,1397,619,1136,416,686,543,70,1546,1706,259,174,41,1159,627,1770,1442,754,1158,198,1756,1940,84,739,1116,1175,654,508,341,1221,242,1630,1650,1140,1840,288,353,1925,311,1017,366,83,300,516,436,1423,1429,1587,211,1721,1263,1659,559,929,1865,745,1041,437,60,1336,216,695,825,1245,17,1948,1958,446,1414,801,1655,334,194,980,661,21,1151,735,170,64,880,882,1694,1537,1654,160,870,1050,888,346,329,917,898,361,1383,899,1105,1913,1933,744,92,726,1243,528,717,792,820,1509,1176,68,427,675,479,114,1216,1682,546,1519,1254,634,1089,1595,1908,1386,645,1190,762,1334,617,1095,569,1426,1239,1032,943,1837,448,1707,407,1410,1320,126,955,1010,1772,395,1725,1553,1929,848,1090,157,1377,1505,1535,507,418,1661,359,1498,145,658,377,958,1975,990,228,1664,837,1787,843,272,1486,289,46,1867,901,179,1160,1856,1402,1779,1110,404,206,777,915,76,741,665,1337,75,925,1247,1568,703,231,842,950,1299,759,50,610,1150,959,1411,1675,886,1497,1450,1053,1204,1987,1362,1573,889,1126,584,1533,1496,340,1626,1547,1932,295,1199,721,148,677,1165,1896,1864,1043,1789,468,1441,1133,1390,1906,1027,1758,1514,579,1382,1695,922,417,264,74,1813,212,1562,1977,625,1930,1892,1255,1750,322,1935,568,1400,1066,1500,1384,1258,1517,1838,646,1755,1603,1378,1077,1034,1102,952,1387,1907,1989,972,1688,1962,1152,1092,1478,788,588,942,996,1575,1874,1953,1166,620,626,140,1431,1897,599,1477,1768,1088,666,1193,274,1820,392,517,719,1033,700,1455,1435,1939,62,1971,954,1623,312,1206,163,1606,1952,1266,1641,1965,878,59,1673,573,800,1331,1122,1955,1590,1903,667,421,99,1227,1923,1339,127,1068,716,1499,316,400,926,95,1851,1561,1493,482,393,729,1164,1598,1283,944,432,550,1845,833,752,540,1674,1712,250,1552,110,1981,1142,647,456,595,529,914,271,1760,1853,570,1490,740,555,453,1766,1713,1836,1662,1863,1690,28,1931,1343,578,806,223,691,639,1278,32,1942,502,803,757,709,123,1251,1731,412,1733,58,1275,737,548,1732,1632,731,1123,1973,932,1007,270,73,1960,1532,332,495,597,1835,859,536,547,1203,855,1945,1625,1418,1086,591,71,1609,1356,324,1776,697,1475,960,874,688,994,494,339,1803,860,1638,1700,927,1093,1566,1982,1163,1224,1070,1627,1044,1406,1267,1876,303,1504,738,831,592,1148,349,1924,742,213,384,1827,1189,45,815,589,69,1038,1192,305,229,1979,866,401,1998,408,470,934,221,1633,1748,299,1592,1303,867,1037,1780,1894,1791,1762,594,1141,1132,1915,957,1730,440,233,1081,323,748,1737,1826,472,1020,55,1503,1576,523,615,581,782,1526,1472,1969,207,1302,1452,844,949,1635,1722,304,406,593,565,1,347,1091,261,1209,1618,1631,399,1807,989,1728,1523,765,225,1622,853,857,678,1542,1926,1234,767,968,394,1949,1294,1282,937,751,1079,524,1580,940,1270,1560,832,165,81,273,178,1474,713,674,771,152,485,791,195,1798,1444,257,574,175,1615,826,1445,449,1438,1693,1822,310,1708,1974,1325,1154,1677,253,577,885,1071,1666,144,1881,363,1620,203,856,909,263,1678,1285,1738,1396,1698,149,1242,1118,525,1938,136,1986,227,1416,823,653,121,286,105,356,723,1652,1272,420,26,1300,769,18,1613,1211,1483,749,564,1130,1287,630,1957,1290,887,1849,477,984,1372,939,43,111,391,1186,1295,15,1098,1487,1815,460,1795,31,1702,912,907,294,419,1207,505,1046,776,981,1087,1844,386,335,902,280,2000,239,894,1319,1172,1859,1333,1665,1453,1686,1602,480,1656,1134,1273,987,916,1984,20,1806,1624,1823,945,1593,473,1365,461,277,503,103,447,1001,1495,1679,1745,985,230,1619,1538,1219,1015,699,1205,1810,1551,1808,604,545,705,1769,1895,1047,313,797,690,563,370,1439,1260,185,188,4,698,385,760,142,852,1904,1449,155,186,1096,1060,441,438,365,37,971,789,172,975,1658,1259,1324,1900,787,1600,351,935,268,1075,881,3,161,706,1966,1170,1525,1213,720,116,518,23,383,817,561,104,1831,798,1188,49,1025,397,465,1596,1751,47,556,1191,1529,1076,657,1129,164,490,562,1307,877,660,895,1714,631,336,1727,1692,783,969,1716,973,1918,204,970,476,1767,319,733,549,1782,1784,1421,190,102,1481,1811,1642,1315,805,481,871,1446,850,1434,413,267,747,236,1012,775,650,1489,430,176,39,1921,861,704,1697,692,633,33,1051,1349,758,1878,511,1777,1040,342,1848,1277,1967,1084,1419,863,106,67,1591,1330,1355,624,443,636,541,671,583,266,1022,94,908,865,1970,1348,1883,1540,750,331,29,405,1985,1607,590,1351,318,576,858,1534,854,835,1228,685,193,1586,656,1074,1177,1223,876,1233,1305,426,201,1016,1842,1137,1326,1502,1508,1959,534,166,1812,1763,1781,1120,24,1852,768,1470,1135,946,1253,1604,1545,1065,1288,1821,834,1719,651,702,244,1997,1232,513,1901,1510,1045,1744,1104,150,12,1788,474,380,57,1385,1346,586,708,85,1004,90,722,54,998,781,1021,1322,153,828,1035,396,933,504,415,65,1605,1909,851,872,1829,63,838,560,1310,628,483,1198,718,873,1428,1420,1114,1291,375,1155,1488,488,818,93,1218,1778,235,906,1101,1579,290,1028,489,1374,205,458,575,711,1785,439,122,539,10,1839,187,811,388,1115,442,822,1327,1651,965,302,1861,382,629,1616,1922,1161,680,694,938,1335,1577,1783,1809,1422,1556,755,614,330,1893,5,1271,181,1078,1201,1905,982,1394,999,7,158,141,1860,1548,252,1202,238,467,1824,287,87,846,1433,1872,766,836,1173,1996,77,786,1249,422,1703,732,343,1747,146,1775,240,1268,1914,1179,1581,147,1157,664,900,1370,1162,1683,532,621,1196,715,879,1031,795,1870,558,1528,1462,1235,638,1149,374,1636,796,1805,1360,727,1786,622,1855,1485,1409,1950,1729,217,1889,182,159,1005,1214,486,1338,1885,1225,941,1637,819,537,284,1648,1238,1710,72,298,893,1036,1056,154,953,1916,478,544,255,19,202,1276,618,1030,1559,753,25,1181,1119,1146,1890,143,1412,648,1558,162,830,219,821,1759,641,1689,824,572,1873,1366,355,220,1328,1571,1329,88,1466,1680,132,687,1790,947,403,582,527,66,1443,113,214,1773,725,1403,1125,431,402,283,883,1180,1252,1919,964,125,457,1178,1369,1543,1182,1765,808,1741,992,951,816,1257,1029,362,1621,924,1013,510,1143,13,1417,1740,1699,35,1352,1565,484,354,1818,1589,1117,761,1978,487,1195,1185,1841,710,1264,307,1215,215,730,1067,1341,1297,1476,1501,1145,655,785,262,1963,115,101,275,813,8,862,1570,1687,770,1404,1507,352,669,191,434,1891,306,325,496,1726,321,327,1006,910,1430,804,1083,293,1342,309,829,1460,605,884,746,571,601,1506,784,11,1649,991,1128,644,1226,1304,1393,1752,1413,1522,1437,1169,1541,414,1269,200,869,86,1869,1846,350,1850,224,1539,1379,381,673,1944,663,1024,521,1458,171,1316,1574,177,1816,1951,1281,1555,1563,890,368,48,338,1771,241,1653,652,1610,743,1524,868,1139,596,451,840,1995,659,124,672,1796,1936,986,156,1000,369,1928,1367,1097,1569,995,173,1085,612,1197,1887,1742,249,493,1313,184,246,799,1392,14,1866,1736,1262,1106,683,1398,1314,98,1464,379,232,256,189,845,728,1774,1171,1817,1183,1048,1002,896,452,91,607,1347,911,1061,1194,151,1465,1646,469,997,237,30,1990,1685,587,167,89,1127,1039,281,637,279,168,1212,433,79,1557,707,962,1298,736,245,1484,1601,1231,1073,209,1405,1427,1456,491,1937,1424,1599,260,1062,522,948,500,129,1256,1991,1882,1670,1634,773,1871,1825,1912,1184,118,892,684,1934,913,1100,891,1847,269,425,6,97,681,435,1064,1739,1608,1138,1527,107,1380,1588,533,1947,1359,501,1927,1983,82,1723,130,635,642,328,22,1026,930,226,367,923,1407,780,693,1614,1332,459,530,696,429,1910,1131,1210,1572,445,1388,9,1715,464,1008,1676,514,454,649,1147,904,1094,1109,993,1222,809,364,1220,282,1308,56,585,455,1229,1793,611,1720,608,1280,1801,1544,1667,1902,254,623,1011,1734,345,1554,1888,1518,291,135,756,734,1833,1628,535,1868,1858,1265,1899,554,1491,1363,1246,552,320,632,1564,1312,1023,1391,1457,1645,1054,1018,670,509,1941,1350,1515,966,100,1718,1585,1797,108,1375,1482,411,27,1875,802,864,1704,410,1492,1480,1802,409,208,538,1684,1124,337,903,1578,1463,16,444,1617,961,197,1672,1660,450,1968,1711,1516,1800,499,285,918,36,1440,1691,613,1395,1311,1743,701,794,360,1057,1063,52,1911,373,317,424,1399,53,1340,1373,1381,515,1415,1657,979,1757,1323,1701,1884,1956,919,956,778,497,1461,137,133,1792,387,602,1976,463,117,1469,296,1042,679,1317,1436,466,1612,1425,1248,234,475,358,1520,278,1681,1862,196,1014,609,1567,542,1401,662,1799,553,921,676,714,1111,1669,1261,1644,1753,1286,1761,897,812,1988,1597,841,1717,1293,905,1828,1107,492,963,78,258,251,1521,1321,1511,920,1019,519,1961,1447,1389,34,978,1639,1459,80,1804,1972,1049,61,790,301,1663,1880,109,1746,40,1834,1099,120,292,1156,847,976,1371,520,1582,793,1668,243,983,1357,1454,1241,977,1103,1167,551,1082,1879,371,1059,1705,682,1217,1943,988,218,326,526,1671,1764,1954,112,810,1643,598,96,1992,1584,1237,169,1920,1814,580,1468,1794,1250,807,567,606,1200,779,1168,1318,689,1993,1121,428,1898,1843,1531,1236,1886,183,1749,1301,471,119,1368,668,389,566,557,763,712,1358,839,1144,1530,265,1153,600,297,134,276,1292,1296,131,372,1819,936,640,2,1279,1187,1069,1080,248,210,531,772,222,1473,128,1946,1857,42,51,1917,1513,1448,724,512,1471,1055,1344,378,462,357,1854,1244,1072,967,1735,1174]
lst.sort()
for i in lst:
print i | 1,276.714286 | 8,900 | 0.774085 | 2,009 | 8,937 | 3.443504 | 0.998507 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.772411 | 0.001455 | 8,937 | 7 | 8,901 | 1,276.714286 | 0.002801 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.25 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
2274102eb8c813d474923368b165fc9ddb2f380a | 21,938 | py | Python | Project/cats/tests/07.py | IZUMI-Zu/CS61A | 50b0352ab5d45e1cd3f0114a397f3bac012ba7c1 | [
"MIT"
] | null | null | null | Project/cats/tests/07.py | IZUMI-Zu/CS61A | 50b0352ab5d45e1cd3f0114a397f3bac012ba7c1 | [
"MIT"
] | null | null | null | Project/cats/tests/07.py | IZUMI-Zu/CS61A | 50b0352ab5d45e1cd3f0114a397f3bac012ba7c1 | [
"MIT"
] | null | null | null | test = {
'name': 'Problem 7',
'points': 3,
'suites': [
{
'cases': [
{
'code': r"""
>>> big_limit = 10
>>> pawssible_patches("wird", "wiry", big_limit)
1
>>> pawssible_patches("wird", "bird", big_limit)
1
>>> pawssible_patches("wird", "wir", big_limit)
1
>>> pawssible_patches("wird", "bwird", big_limit)
1
>>> pawssible_patches("speling", "spelling", big_limit)
1
>>> pawssible_patches("used", "use", big_limit)
1
>>> pawssible_patches("hash", "ash", big_limit)
1
>>> pawssible_patches("ash", "hash", big_limit)
1
>>> pawssible_patches("roses", "arose", big_limit) # roses -> aroses -> arose
2
>>> pawssible_patches("tesng", "testing", big_limit) # tesng -> testng -> testing
2
>>> pawssible_patches("rlogcul", "logical", big_limit) # rlogcul -> logcul -> logicul -> logical
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> big_limit = 10
>>> pawssible_patches("cats", "scat", big_limit) # cats -> scats -> scat
2
>>> pawssible_patches("purng", "purring", big_limit) # purng -> purrng -> purring
2
>>> pawssible_patches("ckiteus", "kittens", big_limit) # ckiteus -> kiteus -> kitteus -> kittens
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> small_words_list = ["spell", "nest", "test", "pest", "best", "bird", "wired",
... "abstraction", "abstract", "wire", "peeling", "gestate",
... "west", "spelling", "bastion"]
>>> autocorrect("speling", small_words_list, pawssible_patches, 10)
'spelling'
>>> autocorrect("abstrction", small_words_list, pawssible_patches, 10)
'abstraction'
>>> autocorrect("wird", small_words_list, pawssible_patches, 10)
'bird'
>>> autocorrect("gest", small_words_list, pawssible_patches, 10)
'nest'
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> # ***Check that the recursion stops when the limit is reached***
>>> import trace, io
>>> from contextlib import redirect_stdout
>>> with io.StringIO() as buf, redirect_stdout(buf):
... trace.Trace(trace=True).runfunc(pawssible_patches, "someawe", "awesome", 3)
... output = buf.getvalue()
>>> len([line for line in output.split('\n') if 'funcname' in line]) < 1000
True
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('thong', 'thong', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('place', 'wreat', 100)
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('pray', 'okee', 100)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('cloit', 'cloit', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('yond', 'snd', 100)
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('tb', 'tb', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('gobi', 'gobi', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('watap', 'woitap', 100)
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('baffy', 'btfi', k) > k for k in range(5)])
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('else', 'konak', k) > k for k in range(5)])
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('zygon', 'jzon', k) > k for k in range(5)])
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('lar', 'lar', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('shop', 'wopd', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('pc', 'pc', k) > k for k in range(2)])
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('sail', 'sail', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('fiber', 'fbk', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('doff', 'def', 100)
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('meile', 'mqeile', 100)
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('donor', 'doinor', k) > k for k in range(6)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('meet', 'meeu', k) > k for k in range(4)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('tic', 'tih', k) > k for k in range(3)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('taft', 'hewer', k) > k for k in range(5)])
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('moorn', 'toxa', k) > k for k in range(5)])
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('hamal', 'hamal', k) > k for k in range(5)])
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('pridy', 'dance', 100)
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('dekko', 'zbk', 100)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('julio', 'juio', k) > k for k in range(5)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('boist', 'spume', k) > k for k in range(5)])
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('jail', 'jaila', 100)
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('cumin', 'goes', 100)
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('civil', 'whose', k) > k for k in range(5)])
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('stead', 'ny', k) > k for k in range(5)])
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('mikie', 'mdiye', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('utils', 'utils', k) > k for k in range(5)])
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('nuque', 'nuq', k) > k for k in range(5)])
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('chine', 'ziinx', k) > k for k in range(5)])
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('tour', 'erase', k) > k for k in range(5)])
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('ak', 'rose', 100)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('sawah', 'shape', k) > k for k in range(5)])
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('elb', 'logia', 100)
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('noily', 'oibs', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('fluid', 'grad', 100)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('titer', 'tskhteur', 100)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('shood', 'shood', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('sher', 'xdhe', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('dayal', 'qualm', 100)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('tenai', 'whata', 100)
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('bow', 'how', 100)
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('tony', 'togqq', k) > k for k in range(5)])
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('baby', 'ton', k) > k for k in range(4)])
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('seron', 'seron', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('tame', 'tfme', k) > k for k in range(4)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('kissy', 'kisdsxk', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('str', 'st', k) > k for k in range(3)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('enema', 'nemr', 100)
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('beden', 'beden', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('coral', 'coral', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('hack', 'rhack', 100)
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('alan', 'alan', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('aru', 'aru', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('tail', 'taiil', 100)
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('corps', 'ckcp', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('kazi', 'kazi', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('bone', 'bone', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('dee', 'derv', k) > k for k in range(4)])
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('fuder', 'fuder', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('harl', 'hhtar', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('def', 'df', 100)
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('moio', 'yomo', 100)
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('amnia', 'wna', k) > k for k in range(5)])
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('pair', 'pair', k) > k for k in range(4)])
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('peai', 'eabi', k) > k for k in range(4)])
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('pryse', 'prysvf', k) > k for k in range(6)])
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('amelu', 'samp', 100)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('weak', 'wk', 100)
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('atelo', 'atelo', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('uc', 'kc', 100)
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('strew', 'jaup', k) > k for k in range(5)])
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('dome', 'dume', k) > k for k in range(4)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('braze', 'sxaze', 100)
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('zaman', 'zadpamn', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('twank', 'renne', 100)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('pinky', 'opiky', k) > k for k in range(5)])
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('spoke', 'spoke', k) > k for k in range(5)])
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('recto', 'recto', k) > k for k in range(5)])
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('ula', 'ula', 100)
0
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('dame', 'froth', 100)
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('grane', 'griae', 100)
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('cycad', 'cqcad', 100)
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('creem', 'ashreem', 100)
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('alky', 'alfy', k) > k for k in range(4)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('finds', 'fid', k) > k for k in range(5)])
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('argot', 'arxgot', k) > k for k in range(6)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('lc', 'roost', 100)
5
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('mi', 'iran', 100)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('faded', 'fabehc', k) > k for k in range(6)])
3
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('slee', 'ble', k) > k for k in range(4)])
2
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> pawssible_patches('macro', 'macr', 100)
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('bbs', 'bbj', k) > k for k in range(3)])
1
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> sum([pawssible_patches('roud', 'roud', k) > k for k in range(4)])
0
""",
'hidden': False,
'locked': False
}
],
'scored': True,
'setup': r"""
>>> from cats import pawssible_patches, autocorrect
""",
'teardown': '',
'type': 'doctest'
}
]
}
| 24.649438 | 106 | 0.350898 | 1,756 | 21,938 | 4.299544 | 0.165718 | 0.254305 | 0.234172 | 0.303046 | 0.763046 | 0.74649 | 0.712715 | 0.690331 | 0.684238 | 0.658278 | 0 | 0.030486 | 0.472194 | 21,938 | 889 | 107 | 24.677165 | 0.621556 | 0 | 0 | 0.471316 | 0 | 0.048369 | 0.590847 | 0.146367 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.003375 | 0 | 0.003375 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 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 | 6 |
2274a0704e9e2991fd851e721007b9a02390dabd | 6,383 | py | Python | models/layers.py | LaudateCorpus1/ml-equivariant-neural-rendering | 44e5bfc6ebf479ea2b7bf25dddf94e05637e4fc8 | [
"AML"
] | 81 | 2020-12-17T19:41:26.000Z | 2022-03-30T07:45:46.000Z | models/layers.py | LaudateCorpus1/ml-equivariant-neural-rendering | 44e5bfc6ebf479ea2b7bf25dddf94e05637e4fc8 | [
"AML"
] | null | null | null | models/layers.py | LaudateCorpus1/ml-equivariant-neural-rendering | 44e5bfc6ebf479ea2b7bf25dddf94e05637e4fc8 | [
"AML"
] | 13 | 2020-12-21T17:26:43.000Z | 2022-03-26T11:44:42.000Z | import torch
import torch.nn as nn
class ConvBlock2d(nn.Module):
"""Block of 1x1, 3x3, 1x1 convolutions with non linearities. Shape of input
and output is the same.
Args:
in_channels (int): Number of channels in input.
num_filters (list of ints): List of two ints with the number of filters
for the first and second conv layers. Third conv layer must have the
same number of input filters as there are channels.
add_groupnorm (bool): If True adds GroupNorm.
"""
def __init__(self, in_channels, num_filters, add_groupnorm=True):
super(ConvBlock2d, self).__init__()
if add_groupnorm:
self.forward_layers = nn.Sequential(
nn.GroupNorm(num_channels_to_num_groups(in_channels), in_channels),
nn.LeakyReLU(0.2, True),
nn.Conv2d(in_channels, num_filters[0], kernel_size=1, stride=1,
bias=False),
nn.GroupNorm(num_channels_to_num_groups(num_filters[0]), num_filters[0]),
nn.LeakyReLU(0.2, True),
nn.Conv2d(num_filters[0], num_filters[1], kernel_size=3,
stride=1, padding=1, bias=False),
nn.GroupNorm(num_channels_to_num_groups(num_filters[1]), num_filters[1]),
nn.LeakyReLU(0.2, True),
nn.Conv2d(num_filters[1], in_channels, kernel_size=1, stride=1,
bias=False)
)
else:
self.forward_layers = nn.Sequential(
nn.LeakyReLU(0.2, True),
nn.Conv2d(in_channels, num_filters[0], kernel_size=1, stride=1,
bias=True),
nn.LeakyReLU(0.2, True),
nn.Conv2d(num_filters[0], num_filters[1], kernel_size=3,
stride=1, padding=1, bias=True),
nn.LeakyReLU(0.2, True),
nn.Conv2d(num_filters[1], in_channels, kernel_size=1, stride=1,
bias=True)
)
def forward(self, inputs):
return self.forward_layers(inputs)
class ConvBlock3d(nn.Module):
"""Block of 1x1, 3x3, 1x1 convolutions with non linearities. Shape of input
and output is the same.
Args:
in_channels (int): Number of channels in input.
num_filters (list of ints): List of two ints with the number of filters
for the first and second conv layers. Third conv layer must have the
same number of input filters as there are channels.
add_groupnorm (bool): If True adds BatchNorm.
"""
def __init__(self, in_channels, num_filters, add_groupnorm=True):
super(ConvBlock3d, self).__init__()
if add_groupnorm:
self.forward_layers = nn.Sequential(
nn.GroupNorm(num_channels_to_num_groups(in_channels), in_channels),
nn.LeakyReLU(0.2, True),
nn.Conv3d(in_channels, num_filters[0], kernel_size=1, stride=1,
bias=False),
nn.GroupNorm(num_channels_to_num_groups(num_filters[0]), num_filters[0]),
nn.LeakyReLU(0.2, True),
nn.Conv3d(num_filters[0], num_filters[1], kernel_size=3,
stride=1, padding=1, bias=False),
nn.GroupNorm(num_channels_to_num_groups(num_filters[1]), num_filters[1]),
nn.LeakyReLU(0.2, True),
nn.Conv3d(num_filters[1], in_channels, kernel_size=1, stride=1,
bias=False)
)
else:
self.forward_layers = nn.Sequential(
nn.LeakyReLU(0.2, True),
nn.Conv3d(in_channels, num_filters[0], kernel_size=1, stride=1,
bias=True),
nn.LeakyReLU(0.2, True),
nn.Conv3d(num_filters[0], num_filters[1], kernel_size=3,
stride=1, padding=1, bias=True),
nn.LeakyReLU(0.2, True),
nn.Conv3d(num_filters[1], in_channels, kernel_size=1, stride=1,
bias=True)
)
def forward(self, inputs):
return self.forward_layers(inputs)
class ResBlock2d(nn.Module):
"""Residual block of 1x1, 3x3, 1x1 convolutions with non linearities. Shape
of input and output is the same.
Args:
in_channels (int): Number of channels in input.
num_filters (list of ints): List of two ints with the number of filters
for the first and second conv layers. Third conv layer must have the
same number of input filters as there are channels.
add_groupnorm (bool): If True adds GroupNorm.
"""
def __init__(self, in_channels, num_filters, add_groupnorm=True):
super(ResBlock2d, self).__init__()
self.residual_layers = ConvBlock2d(in_channels, num_filters,
add_groupnorm)
def forward(self, inputs):
return inputs + self.residual_layers(inputs)
class ResBlock3d(nn.Module):
"""Residual block of 1x1, 3x3, 1x1 convolutions with non linearities. Shape
of input and output is the same.
Args:
in_channels (int): Number of channels in input.
num_filters (list of ints): List of two ints with the number of filters
for the first and second conv layers. Third conv layer must have the
same number of input filters as there are channels.
add_groupnorm (bool): If True adds GroupNorm.
"""
def __init__(self, in_channels, num_filters, add_groupnorm=True):
super(ResBlock3d, self).__init__()
self.residual_layers = ConvBlock3d(in_channels, num_filters,
add_groupnorm)
def forward(self, inputs):
return inputs + self.residual_layers(inputs)
def num_channels_to_num_groups(num_channels):
"""Returns number of groups to use in a GroupNorm layer with a given number
of channels. Note that these choices are hyperparameters.
Args:
num_channels (int): Number of channels.
"""
if num_channels < 8:
return 1
if num_channels < 32:
return 2
if num_channels < 64:
return 4
if num_channels < 128:
return 8
if num_channels < 256:
return 16
else:
return 32
| 41.448052 | 89 | 0.596271 | 827 | 6,383 | 4.412334 | 0.113664 | 0.093176 | 0.039463 | 0.042751 | 0.889833 | 0.868183 | 0.861332 | 0.861332 | 0.861332 | 0.861332 | 0 | 0.032325 | 0.316622 | 6,383 | 153 | 90 | 41.718954 | 0.804218 | 0.293749 | 0 | 0.698925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.096774 | false | 0 | 0.021505 | 0.043011 | 0.268817 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
97d37e1c985a92ecc062970dd971bc40b60757d9 | 109 | py | Python | student/views.py | sgr-smile2015/website | a6a90e8fff52a3d8adb797cfe2e6f74c4ad0e3c0 | [
"Apache-2.0"
] | 1 | 2018-02-27T08:24:12.000Z | 2018-02-27T08:24:12.000Z | student/views.py | sgr-smile2015/website | a6a90e8fff52a3d8adb797cfe2e6f74c4ad0e3c0 | [
"Apache-2.0"
] | null | null | null | student/views.py | sgr-smile2015/website | a6a90e8fff52a3d8adb797cfe2e6f74c4ad0e3c0 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
def index(request):
return render(request, 'student/student.html')
| 18.166667 | 50 | 0.761468 | 14 | 109 | 5.928571 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.137615 | 109 | 5 | 51 | 21.8 | 0.882979 | 0 | 0 | 0 | 0 | 0 | 0.183486 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 6 |
97e5648eb43b9c9e2eb2c22777583bc10bc253b9 | 70 | py | Python | 15/15.py | derdon/euler-solutions | 47fe1d5c23ec9ece8a2c3991566d414f00e86d34 | [
"0BSD"
] | 1 | 2015-11-06T01:08:22.000Z | 2015-11-06T01:08:22.000Z | 15/15.py | derdon/euler-solutions | 47fe1d5c23ec9ece8a2c3991566d414f00e86d34 | [
"0BSD"
] | null | null | null | 15/15.py | derdon/euler-solutions | 47fe1d5c23ec9ece8a2c3991566d414f00e86d34 | [
"0BSD"
] | null | null | null | from math import factorial as fac
print fac(40) / (fac(20) * fac(20))
| 23.333333 | 35 | 0.685714 | 13 | 70 | 3.692308 | 0.692308 | 0.208333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.103448 | 0.171429 | 70 | 2 | 36 | 35 | 0.724138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.5 | null | null | 0.5 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 6 |
3f5ea3bd7a9326e06c831bbf69f70bcfef31a61c | 35 | py | Python | OAuth2Util/__init__.py | SmBe19/praw-OAuth2Util | ca0a2d4d7eefcc681aac92c9cd4b83cd9ea6c5fe | [
"MIT"
] | 53 | 2015-07-02T23:45:50.000Z | 2019-06-20T09:18:09.000Z | OAuth2Util/__init__.py | SmBe19/praw-OAuth2Util | ca0a2d4d7eefcc681aac92c9cd4b83cd9ea6c5fe | [
"MIT"
] | 14 | 2015-06-28T12:50:52.000Z | 2017-02-19T18:45:28.000Z | OAuth2Util/__init__.py | SmBe19/praw-OAuth2Util | ca0a2d4d7eefcc681aac92c9cd4b83cd9ea6c5fe | [
"MIT"
] | 23 | 2015-06-26T06:52:39.000Z | 2018-10-06T21:39:49.000Z | from .OAuth2Util import OAuth2Util
| 17.5 | 34 | 0.857143 | 4 | 35 | 7.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.064516 | 0.114286 | 35 | 1 | 35 | 35 | 0.903226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
4513aaa767ae979bb53abd22626afa6e026ea258 | 37 | py | Python | numpy_test.py | marcus-tam/ws_selenium_trader | 5c1a7df9639fc472d65f3f9b781c95e9109f6cbb | [
"MIT"
] | null | null | null | numpy_test.py | marcus-tam/ws_selenium_trader | 5c1a7df9639fc472d65f3f9b781c95e9109f6cbb | [
"MIT"
] | null | null | null | numpy_test.py | marcus-tam/ws_selenium_trader | 5c1a7df9639fc472d65f3f9b781c95e9109f6cbb | [
"MIT"
] | null | null | null | import numpy
print(numpy.__version__) | 18.5 | 24 | 0.864865 | 5 | 37 | 5.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.054054 | 37 | 2 | 24 | 18.5 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0.5 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 6 |
452092ee296a8509e1a25cce9c8618accbbe167d | 2,469 | py | Python | plenum/test/view_change/test_last_ordered_reset_for_new_view.py | andkononykhin/plenum | 28dc1719f4b7e80d31dafbadb38cfec4da949886 | [
"Apache-2.0"
] | null | null | null | plenum/test/view_change/test_last_ordered_reset_for_new_view.py | andkononykhin/plenum | 28dc1719f4b7e80d31dafbadb38cfec4da949886 | [
"Apache-2.0"
] | 1 | 2019-03-20T14:57:22.000Z | 2019-03-20T15:01:55.000Z | plenum/test/view_change/test_last_ordered_reset_for_new_view.py | andkononykhin/plenum | 28dc1719f4b7e80d31dafbadb38cfec4da949886 | [
"Apache-2.0"
] | null | null | null | from plenum.test.helper import sdk_send_random_and_check, checkViewNoForNodes
from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data
from plenum.test.view_change.helper import ensure_view_change_complete
def test_last_ordered_3pc_not_reset_if_more_than_new_view(txnPoolNodeSet, looper, sdk_pool_handle, sdk_wallet_client):
"""
Check that if last_ordered_3pc's viewNo on a Replica is greater than the new viewNo after view change,
then last_ordered_3pc is not reset.
It can be that last_ordered_3pc was set for the next view, since it's set during catch-up
"""
old_view_no = checkViewNoForNodes(txnPoolNodeSet)
for node in txnPoolNodeSet:
node.master_replica.last_ordered_3pc = (old_view_no + 2, 100)
ensure_view_change_complete(looper, txnPoolNodeSet, customTimeout=60)
for node in txnPoolNodeSet:
assert (old_view_no + 2, 100) == node.master_replica.last_ordered_3pc
def test_last_ordered_3pc_not_reset_if_equal_to_new_view(txnPoolNodeSet, looper, sdk_pool_handle, sdk_wallet_client):
"""
Check that if last_ordered_3pc's viewNo on a Replica is equal to the new viewNo after view change,
then last_ordered_3pc is not reset.
It can be that last_ordered_3pc was set for the next view, since it's set during catch-up
"""
old_view_no = checkViewNoForNodes(txnPoolNodeSet)
for node in txnPoolNodeSet:
node.master_replica.last_ordered_3pc = (old_view_no + 1, 100)
ensure_view_change_complete(looper, txnPoolNodeSet, customTimeout=60)
for node in txnPoolNodeSet:
assert (old_view_no + 1, 100) == node.master_replica.last_ordered_3pc
def test_last_ordered_3pc_not_reset_if_less_than_new_view(txnPoolNodeSet, looper, sdk_pool_handle, sdk_wallet_client):
"""
Check that if last_ordered_3pc's viewNo on a Replica is less than the new viewNo after view change,
then last_ordered_3pc is not reset.
"""
old_view_no = checkViewNoForNodes(txnPoolNodeSet)
for node in txnPoolNodeSet:
node.master_replica.last_ordered_3pc = (old_view_no, 100)
ensure_view_change_complete(looper, txnPoolNodeSet, customTimeout=60)
for node in txnPoolNodeSet:
assert (old_view_no + 1, 1) == node.master_replica.last_ordered_3pc
# Make sure the pool is working
sdk_send_random_and_check(looper, txnPoolNodeSet, sdk_pool_handle, sdk_wallet_client, 5)
ensure_all_nodes_have_same_data(looper, txnPoolNodeSet)
| 43.315789 | 118 | 0.778048 | 375 | 2,469 | 4.776 | 0.205333 | 0.104411 | 0.132887 | 0.077052 | 0.865438 | 0.840313 | 0.778336 | 0.778336 | 0.761027 | 0.761027 | 0 | 0.021792 | 0.163629 | 2,469 | 56 | 119 | 44.089286 | 0.845521 | 0.251114 | 0 | 0.461538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 1 | 0.115385 | false | 0 | 0.115385 | 0 | 0.230769 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
45361bd5ca0c94a5c62c9f86418ef8847d1a0f3d | 4,725 | py | Python | main.py | vwallajabad/multiplayer-battleship | 78491869958795f17e692b3ffcd799cef4fe0e9a | [
"MIT"
] | null | null | null | main.py | vwallajabad/multiplayer-battleship | 78491869958795f17e692b3ffcd799cef4fe0e9a | [
"MIT"
] | null | null | null | main.py | vwallajabad/multiplayer-battleship | 78491869958795f17e692b3ffcd799cef4fe0e9a | [
"MIT"
] | null | null | null | import replit
#Board
guessnumber = 0
shipsdown = 0
print("1 2 3 4 5 6 7 8 9 10")
board = [
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*", "*", "*", "*"
]
print(board[0], board[1], board[2], board[3], board[4], board[5], board[6], board[7], board[8], board[9] + "a")
print(board[10], board[11], board[12], board[13], board[14], board[15], board[16], board[17], board[18], board[19] + "b")
print(board[20], board[21], board[22], board[23], board[24], board[25], board[26], board[27], board[28], board[29] + "c")
print(board[30], board[31], board[32], board[33], board[34], board[35], board[36], board[37], board[38], board[39] + "d")
print(board[40], board[41], board[42], board[43], board[44], board[45], board[46], board[47], board[48], board[49] + "e")
print(board[50], board[51], board[52], board[53], board[54], board[55], board[56], board[57], board[58], board[59] + "f")
print(board[60], board[61], board[62], board[63], board[64], board[65], board[66], board[67], board[68], board[69] + "g")
print(board[70], board[71], board[72], board[73], board[74], board[75], board[76], board[77], board[78], board[79] + "h")
print(board[80], board[81], board[82], board[83], board[84], board[85], board[86], board[87], board[88], board[89] + "i")
print(board[90], board[91], board[92], board[93], board[94], board[95], board[96], board[97], board[98], board[99] + "j")
print("Enter values like a1 c4")
#Set ship values
Ship1 = input("Ship 1: ")
Ship2 = input("Ship 2: ")
Ship3 = input("Ship 3: ")
Ship4 = input("Ship 4: ")
Ship5 = input("Ship 5: ")
Ship6 = input("Ship 6: ")
Ship7 = input("Ship 7: ")
Ship8 = input("Ship 8: ")
Ship9 = input("Ship 9: ")
Ship10 = input("Ship 10: ")
replit.clear()
print("1 2 3 4 5 6 7 8 9 10")
print(board[0], board[1], board[2], board[3], board[4], board[5], board[6],
board[7], board[8], board[9] + "a")
print(board[10], board[11], board[12], board[13], board[14], board[15],
board[16], board[17], board[18], board[19] + "b")
print(board[20], board[21], board[22], board[23], board[24], board[25],
board[26], board[27], board[28], board[29] + "c")
print(board[30], board[31], board[32], board[33], board[34], board[35],
board[36], board[37], board[38], board[39] + "d")
print(board[40], board[41], board[42], board[43], board[44], board[45],
board[46], board[47], board[48], board[49] + "e")
print(board[50], board[51], board[52], board[53], board[54], board[55],
board[56], board[57], board[58], board[59] + "f")
print(board[60], board[61], board[62], board[63], board[64], board[65],
board[66], board[67], board[68], board[69] + "g")
print(board[70], board[71], board[72], board[73], board[74], board[75],
board[76], board[77], board[78], board[79] + "h")
print(board[80], board[81], board[82], board[83], board[84], board[85],
board[86], board[87], board[88], board[89] + "i")
print(board[90], board[91], board[92], board[93], board[94], board[95],
board[96], board[97], board[98], board[99] + "j")
print("Pass to player two")
print("Enter values like a1 c4")
print("type giveup to give up")
while True:
Guess = input("Type your guess: ")
if Guess == Ship1:
print("Good job!! You took down one ship!")
shipsdown += 1
if Guess == Ship2:
print("Good job!! You took down one ship!")
shipsdown += 1
if Guess == Ship3:
print("Good job!! You took down one ship!")
shipsdown += 1
if Guess == Ship4:
print("Good job!! You took down one ship!")
shipsdown += 1
if Guess == Ship5:
print("Good job!! You took down one ship!")
shipsdown += 1
if Guess == Ship6:
print("Good job!! You took down one ship!")
shipsdown += 1
if Guess == Ship7:
print("Good job!! You took down one ship!")
shipsdown += 1
if Guess == Ship8:
print("Good job!! You took down one ship!")
shipsdown += 1
if Guess == Ship9:
print("Good job!! You took down one ship!")
shipsdown += 1
if Guess == Ship10:
print("Good job!! You took down one ship!")
shipsdown += 1
guessnumber += 1
if shipsdown == 10:
print("Your score is: ")
print(guessnumber)
break
if Guess == "giveup":
print(Ship1)
print(Ship2)
print(Ship3)
print(Ship4)
print(Ship5)
print(Ship6)
print(Ship7)
print(Ship8)
print(Ship9)
print(Ship10)
break
| 36.627907 | 121 | 0.545397 | 711 | 4,725 | 3.624473 | 0.220816 | 0.07761 | 0.046566 | 0.058207 | 0.794723 | 0.794723 | 0.778036 | 0.778036 | 0.778036 | 0.778036 | 0 | 0.118804 | 0.17164 | 4,725 | 128 | 122 | 36.914063 | 0.539601 | 0.004233 | 0 | 0.315315 | 0 | 0 | 0.149904 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.009009 | 0.009009 | 0 | 0.009009 | 0.432432 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
18a8c0b344b8e046ff0cefab5027f110011c6396 | 956 | py | Python | config.py | aliyun/alibabacloud-quantization-networks | 05522aabebf5188df5a92b26f96f5ebded806ca9 | [
"Apache-2.0"
] | 102 | 2019-11-08T08:45:56.000Z | 2022-03-03T05:22:14.000Z | config.py | DefTruth/alibabacloud-quantization-networks | 05522aabebf5188df5a92b26f96f5ebded806ca9 | [
"Apache-2.0"
] | 8 | 2019-12-02T08:44:36.000Z | 2021-08-12T13:35:03.000Z | config.py | DefTruth/alibabacloud-quantization-networks | 05522aabebf5188df5a92b26f96f5ebded806ca9 | [
"Apache-2.0"
] | 30 | 2019-11-22T05:16:05.000Z | 2021-08-04T07:18:56.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os.path
# gets home dir cross platform
HOME = os.path.expanduser("~")
QW_values = {
'alexnet-w-1': [-1, 0, 1], 'alexnet-w-2': [-1, 0, 1], 'alexnet-w-3-pm2': [-2, -1, 0, 1, 2], 'alexnet-w-3-pm4': [-4, -2, -1, 0, 1, 2, 4],
'resnet18-w-1': [-1, 0, 1], 'resnet18-w-2': [-1, 0, 1],'resnet18-w-3':[-4,-2,-1,0,1,2,4]
}
QW_biases = {
'alexnet-w-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]],
'resnet18-w-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]],
}
QA_biases = {
'resnet18-a-1':[[0.05], [0.05], [0.05], [0.05], [0.05], [0.05], [0.05], [0.05], [0.05], [0.05], [0.05], [0.05], [0.05], [0.05], [0.05],
[0.05], [0.05]]
}
| 30.83871 | 137 | 0.408996 | 222 | 956 | 1.747748 | 0.144144 | 0.505155 | 0.742268 | 0.969072 | 0.582474 | 0.435567 | 0.435567 | 0.399485 | 0.399485 | 0.399485 | 0 | 0.271523 | 0.210251 | 956 | 30 | 138 | 31.866667 | 0.242384 | 0.074268 | 0 | 0.117647 | 0 | 0 | 0.141069 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.058824 | 0 | 0.058824 | 0 | 0 | 0 | 1 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
18d8f11dc03dc327db0713d040ca9bf1de859a5a | 40 | py | Python | simfempy/tools/__init__.py | anairabeze/simfempy | 144362956263cb9b81f4bade15664d9cc640f93a | [
"MIT"
] | null | null | null | simfempy/tools/__init__.py | anairabeze/simfempy | 144362956263cb9b81f4bade15664d9cc640f93a | [
"MIT"
] | 3 | 2018-12-18T16:36:52.000Z | 2019-01-29T18:34:55.000Z | simfempy/tools/__init__.py | beckerrh/fempy | dd7214ea7f6d81a5200fcb4a91f07a5cd3322e9e | [
"MIT"
] | 1 | 2021-06-09T15:49:51.000Z | 2021-06-09T15:49:51.000Z | from . import timer, latexwriter, matrix | 40 | 40 | 0.8 | 5 | 40 | 6.4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 40 | 1 | 40 | 40 | 0.914286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
e13f76b1f806c297ba13bfc35d5aadf1eaae743a | 16,608 | py | Python | pybind/slxos/v16r_1_00b/mpls_state/path/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/mpls_state/path/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/mpls_state/path/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from decimal import Decimal
from bitarray import bitarray
import __builtin__
import path_hops
import path_lsps
class path(PybindBase):
"""
This class was auto-generated by the PythonClass plugin for PYANG
from YANG module brocade-mpls-operational - based on the path /mpls-state/path. Each member element of
the container is represented as a class variable - with a specific
YANG type.
YANG Description: MPLS Path
"""
__slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_rest_name', '_extmethods', '__path_name','__usage_count','__path_hops','__path_lsps',)
_yang_name = 'path'
_rest_name = 'path'
_pybind_generated_by = 'container'
def __init__(self, *args, **kwargs):
path_helper_ = kwargs.pop("path_helper", None)
if path_helper_ is False:
self._path_helper = False
elif path_helper_ is not None and isinstance(path_helper_, xpathhelper.YANGPathHelper):
self._path_helper = path_helper_
elif hasattr(self, "_parent"):
path_helper_ = getattr(self._parent, "_path_helper", False)
self._path_helper = path_helper_
else:
self._path_helper = False
extmethods = kwargs.pop("extmethods", None)
if extmethods is False:
self._extmethods = False
elif extmethods is not None and isinstance(extmethods, dict):
self._extmethods = extmethods
elif hasattr(self, "_parent"):
extmethods = getattr(self._parent, "_extmethods", None)
self._extmethods = extmethods
else:
self._extmethods = False
self.__path_name = YANGDynClass(base=unicode, is_leaf=True, yang_name="path-name", rest_name="path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='string', is_config=False)
self.__path_hops = YANGDynClass(base=YANGListType("hop_address",path_hops.path_hops, yang_name="path-hops", rest_name="path-hops", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='hop-address', extensions={u'tailf-common': {u'callpoint': u'mpls-path-hop', u'cli-suppress-show-path': None}}), is_container='list', yang_name="path-hops", rest_name="path-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-path-hop', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
self.__usage_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="usage-count", rest_name="usage-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint32', is_config=False)
self.__path_lsps = YANGDynClass(base=YANGListType("lsp_name",path_lsps.path_lsps, yang_name="path-lsps", rest_name="path-lsps", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsp-name', extensions={u'tailf-common': {u'callpoint': u'mpls-path-lsp', u'cli-suppress-show-path': None}}), is_container='list', yang_name="path-lsps", rest_name="path-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-path-lsp', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
load = kwargs.pop("load", None)
if args:
if len(args) > 1:
raise TypeError("cannot create a YANG container with >1 argument")
all_attr = True
for e in self._pyangbind_elements:
if not hasattr(args[0], e):
all_attr = False
break
if not all_attr:
raise ValueError("Supplied object did not have the correct attributes")
for e in self._pyangbind_elements:
nobj = getattr(args[0], e)
if nobj._changed() is False:
continue
setmethod = getattr(self, "_set_%s" % e)
if load is None:
setmethod(getattr(args[0], e))
else:
setmethod(getattr(args[0], e), load=load)
def _path(self):
if hasattr(self, "_parent"):
return self._parent._path()+[self._yang_name]
else:
return [u'mpls-state', u'path']
def _rest_path(self):
if hasattr(self, "_parent"):
if self._rest_name:
return self._parent._rest_path()+[self._rest_name]
else:
return self._parent._rest_path()
else:
return [u'mpls-state', u'path']
def _get_path_name(self):
"""
Getter method for path_name, mapped from YANG variable /mpls_state/path/path_name (string)
YANG Description: Path name
"""
return self.__path_name
def _set_path_name(self, v, load=False):
"""
Setter method for path_name, mapped from YANG variable /mpls_state/path/path_name (string)
If this variable is read-only (config: false) in the
source YANG file, then _set_path_name is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_path_name() directly.
YANG Description: Path name
"""
parent = getattr(self, "_parent", None)
if parent is not None and load is False:
raise AttributeError("Cannot set keys directly when" +
" within an instantiated list")
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name="path-name", rest_name="path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='string', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """path_name must be of a type compatible with string""",
'defined-type': "string",
'generated-type': """YANGDynClass(base=unicode, is_leaf=True, yang_name="path-name", rest_name="path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='string', is_config=False)""",
})
self.__path_name = t
if hasattr(self, '_set'):
self._set()
def _unset_path_name(self):
self.__path_name = YANGDynClass(base=unicode, is_leaf=True, yang_name="path-name", rest_name="path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='string', is_config=False)
def _get_usage_count(self):
"""
Getter method for usage_count, mapped from YANG variable /mpls_state/path/usage_count (uint32)
YANG Description: Path usage count
"""
return self.__usage_count
def _set_usage_count(self, v, load=False):
"""
Setter method for usage_count, mapped from YANG variable /mpls_state/path/usage_count (uint32)
If this variable is read-only (config: false) in the
source YANG file, then _set_usage_count is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_usage_count() directly.
YANG Description: Path usage count
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="usage-count", rest_name="usage-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint32', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """usage_count must be of a type compatible with uint32""",
'defined-type': "uint32",
'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="usage-count", rest_name="usage-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint32', is_config=False)""",
})
self.__usage_count = t
if hasattr(self, '_set'):
self._set()
def _unset_usage_count(self):
self.__usage_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="usage-count", rest_name="usage-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='uint32', is_config=False)
def _get_path_hops(self):
"""
Getter method for path_hops, mapped from YANG variable /mpls_state/path/path_hops (list)
YANG Description: Path hop entry
"""
return self.__path_hops
def _set_path_hops(self, v, load=False):
"""
Setter method for path_hops, mapped from YANG variable /mpls_state/path/path_hops (list)
If this variable is read-only (config: false) in the
source YANG file, then _set_path_hops is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_path_hops() directly.
YANG Description: Path hop entry
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGListType("hop_address",path_hops.path_hops, yang_name="path-hops", rest_name="path-hops", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='hop-address', extensions={u'tailf-common': {u'callpoint': u'mpls-path-hop', u'cli-suppress-show-path': None}}), is_container='list', yang_name="path-hops", rest_name="path-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-path-hop', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """path_hops must be of a type compatible with list""",
'defined-type': "list",
'generated-type': """YANGDynClass(base=YANGListType("hop_address",path_hops.path_hops, yang_name="path-hops", rest_name="path-hops", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='hop-address', extensions={u'tailf-common': {u'callpoint': u'mpls-path-hop', u'cli-suppress-show-path': None}}), is_container='list', yang_name="path-hops", rest_name="path-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-path-hop', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)""",
})
self.__path_hops = t
if hasattr(self, '_set'):
self._set()
def _unset_path_hops(self):
self.__path_hops = YANGDynClass(base=YANGListType("hop_address",path_hops.path_hops, yang_name="path-hops", rest_name="path-hops", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='hop-address', extensions={u'tailf-common': {u'callpoint': u'mpls-path-hop', u'cli-suppress-show-path': None}}), is_container='list', yang_name="path-hops", rest_name="path-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-path-hop', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
def _get_path_lsps(self):
"""
Getter method for path_lsps, mapped from YANG variable /mpls_state/path/path_lsps (list)
YANG Description: Path lsp entry
"""
return self.__path_lsps
def _set_path_lsps(self, v, load=False):
"""
Setter method for path_lsps, mapped from YANG variable /mpls_state/path/path_lsps (list)
If this variable is read-only (config: false) in the
source YANG file, then _set_path_lsps is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_path_lsps() directly.
YANG Description: Path lsp entry
"""
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGListType("lsp_name",path_lsps.path_lsps, yang_name="path-lsps", rest_name="path-lsps", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsp-name', extensions={u'tailf-common': {u'callpoint': u'mpls-path-lsp', u'cli-suppress-show-path': None}}), is_container='list', yang_name="path-lsps", rest_name="path-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-path-lsp', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
except (TypeError, ValueError):
raise ValueError({
'error-string': """path_lsps must be of a type compatible with list""",
'defined-type': "list",
'generated-type': """YANGDynClass(base=YANGListType("lsp_name",path_lsps.path_lsps, yang_name="path-lsps", rest_name="path-lsps", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsp-name', extensions={u'tailf-common': {u'callpoint': u'mpls-path-lsp', u'cli-suppress-show-path': None}}), is_container='list', yang_name="path-lsps", rest_name="path-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-path-lsp', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)""",
})
self.__path_lsps = t
if hasattr(self, '_set'):
self._set()
def _unset_path_lsps(self):
self.__path_lsps = YANGDynClass(base=YANGListType("lsp_name",path_lsps.path_lsps, yang_name="path-lsps", rest_name="path-lsps", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsp-name', extensions={u'tailf-common': {u'callpoint': u'mpls-path-lsp', u'cli-suppress-show-path': None}}), is_container='list', yang_name="path-lsps", rest_name="path-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'callpoint': u'mpls-path-lsp', u'cli-suppress-show-path': None}}, namespace='urn:brocade.com:mgmt:brocade-mpls-operational', defining_module='brocade-mpls-operational', yang_type='list', is_config=False)
path_name = __builtin__.property(_get_path_name)
usage_count = __builtin__.property(_get_usage_count)
path_hops = __builtin__.property(_get_path_hops)
path_lsps = __builtin__.property(_get_path_lsps)
_pyangbind_elements = {'path_name': path_name, 'usage_count': usage_count, 'path_hops': path_hops, 'path_lsps': path_lsps, }
| 65.644269 | 750 | 0.731154 | 2,340 | 16,608 | 4.941026 | 0.080769 | 0.053624 | 0.053278 | 0.037364 | 0.806608 | 0.763536 | 0.750908 | 0.744508 | 0.734475 | 0.731707 | 0 | 0.005133 | 0.131924 | 16,608 | 252 | 751 | 65.904762 | 0.796837 | 0.131804 | 0 | 0.415584 | 0 | 0.025974 | 0.361848 | 0.17976 | 0 | 0 | 0 | 0 | 0 | 1 | 0.097403 | false | 0 | 0.064935 | 0 | 0.285714 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
e1c3dc876b34d4c0e14ccf7d38341aa13b0ce410 | 16 | py | Python | RoverPy_daemon.py | PiKSo05/RoverPy | d21953acf4b5c1bb49c3af1b0014d5169fe7d029 | [
"MIT"
] | null | null | null | RoverPy_daemon.py | PiKSo05/RoverPy | d21953acf4b5c1bb49c3af1b0014d5169fe7d029 | [
"MIT"
] | null | null | null | RoverPy_daemon.py | PiKSo05/RoverPy | d21953acf4b5c1bb49c3af1b0014d5169fe7d029 | [
"MIT"
] | null | null | null | import daemon
| 4 | 13 | 0.75 | 2 | 16 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 16 | 3 | 14 | 5.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
bef19e97a827f0d02bbb80815f70c96818f5d9fc | 5,260 | py | Python | tests/test_check_if_new_minimizer.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | tests/test_check_if_new_minimizer.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | 1 | 2021-11-17T09:03:17.000Z | 2021-11-17T09:03:17.000Z | tests/test_check_if_new_minimizer.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | import numpy as np
from hypothesis import given, settings, strategies as st
from metod_alg import objective_functions as mt_obj
from metod_alg import metod_algorithm_functions as mt_alg
from metod_alg import check_metod_class as prev_mt_alg
def calc_minimizer_sev_quad(point, p, store_x0, matrix_test):
"""
Finding the position of the local minimizer which point is closest
to, using the minimum of several Quadratic forms function.
Parameters
----------
point : 1-D array with shape (d, )
A point used to evaluate the function.
p : integer
Number of local minima.
store_x0 : 2-D arrays with shape (p, d).
matrix_test : 3-D arrays with shape (p, d, d).
Returns
-------
position_minimum : integer
Position of the local minimizer which produces the
smallest distance between point and all p local
minimizers.
"""
store_func_values = np.zeros((p))
for i in range(p):
store_func_values[i] = 0.5 * (np.transpose(point - store_x0[i]) @
matrix_test[i] @ (point - store_x0[i]))
position_minimum = np.argmin(store_func_values)
return position_minimum
@settings(max_examples=10, deadline=None)
@given(st.integers(2, 20), st.integers(10, 50))
def test_1(p, d):
"""
Check whether a local minimizer has already been identified by the METOD
algorithm by applying prev_mt_alg.check_if_new_minimizer().
The local minimizer has previously been discovered.
"""
lambda_1 = 1
lambda_2 = 10
store_A = np.zeros((p, d, d))
store_x0 = np.zeros((p, d))
store_rotation = np.zeros((p, d, d))
for i in range(p):
diag_vals = np.zeros(d)
diag_vals[:2] = np.array([lambda_1, lambda_2])
diag_vals[2:] = np.random.uniform(lambda_1 + 1,
lambda_2 - 1, (d - 2))
store_A[i] = np.diag(diag_vals)
store_x0[i] = np.random.uniform(0, 1, (d))
store_rotation[i] = mt_obj.calculate_rotation_matrix(d, 3)
matrix_test = (np.transpose(store_rotation, (0, 2, 1)) @ store_A @
store_rotation)
func_args = (p, store_x0, matrix_test)
x = np.random.uniform(0, 1, (d, ))
projection = False
tolerance = 0.001
option = 'minimize_scalar'
met = 'brent'
initial_guess = 0.005
const = 0.1
bound_1, bound_2 = 0, 1
usage = 'metod_algorithm'
relax_sd_it = 1
f = mt_obj.several_quad_function
g = mt_obj.several_quad_gradient
check_func = mt_obj.calc_minimizer_sev_quad
pos = calc_minimizer_sev_quad(x, p, store_x0, matrix_test)
discovered_minimizers = [store_x0[pos]]
for j in range(int(p/2)):
if j != pos:
discovered_minimizers.append(store_x0[j])
store_grad_warm_up = g(x, *func_args)
num = prev_mt_alg.check_if_new_minimizer(x, d, projection, tolerance,
option, met, initial_guess,
func_args, f, g, bound_1, bound_2,
usage, relax_sd_it, store_grad_warm_up,
discovered_minimizers, const)
assert(num == 0)
@settings(max_examples=10, deadline=None)
@given(st.integers(2, 20), st.integers(10, 50))
def test_2(p, d):
"""
Check whether a local minimizer has already been identified by the METOD
algorithm by applying prev_mt_alg.check_if_new_minimizer().
The local minimizer has not been discovered previously.
"""
lambda_1 = 1
lambda_2 = 10
store_A = np.zeros((p, d, d))
store_x0 = np.zeros((p, d))
store_rotation = np.zeros((p, d, d))
for i in range(p):
diag_vals = np.zeros(d)
diag_vals[:2] = np.array([lambda_1, lambda_2])
diag_vals[2:] = np.random.uniform(lambda_1 + 1,
lambda_2 - 1, (d - 2))
store_A[i] = np.diag(diag_vals)
store_x0[i] = np.random.uniform(0, 1, (d))
store_rotation[i] = mt_obj.calculate_rotation_matrix(d, 3)
matrix_test = (np.transpose(store_rotation, (0, 2, 1)) @ store_A @
store_rotation)
func_args = (p, store_x0, matrix_test)
x = np.random.uniform(0, 1, (d, ))
projection = False
tolerance = 0.001
option = 'minimize_scalar'
met = 'brent'
initial_guess = 0.005
const = 0.1
bound_1, bound_2 = 0, 1
usage = 'metod_algorithm'
relax_sd_it = 1
f = mt_obj.several_quad_function
g = mt_obj.several_quad_gradient
pos = calc_minimizer_sev_quad(x, p, store_x0, matrix_test)
discovered_minimizers = []
for j in range(int(p/2)):
if j != pos:
discovered_minimizers.append(store_x0[j])
store_grad_warm_up = g(x, *func_args)
num = prev_mt_alg.check_if_new_minimizer(x, d, projection, tolerance,
option, met, initial_guess,
func_args, f, g, bound_1, bound_2,
usage, relax_sd_it, store_grad_warm_up,
discovered_minimizers, const)
assert(num == 1)
| 37.571429 | 83 | 0.596008 | 742 | 5,260 | 3.978437 | 0.188679 | 0.035569 | 0.01897 | 0.018293 | 0.747967 | 0.737805 | 0.70393 | 0.70393 | 0.70393 | 0.70393 | 0 | 0.033279 | 0.303042 | 5,260 | 139 | 84 | 37.841727 | 0.771959 | 0.179468 | 0 | 0.818182 | 0 | 0 | 0.016691 | 0 | 0 | 0 | 0 | 0 | 0.020202 | 1 | 0.030303 | false | 0 | 0.050505 | 0 | 0.090909 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
befbc10e9192b44802763c68827ffc0e983dbd14 | 28 | py | Python | mkdocs_include/__init__.py | nqkdev/mkdocs-include | eb504673db7fc046af5f8cde951f57a62f0cd6e5 | [
"Apache-2.0"
] | null | null | null | mkdocs_include/__init__.py | nqkdev/mkdocs-include | eb504673db7fc046af5f8cde951f57a62f0cd6e5 | [
"Apache-2.0"
] | null | null | null | mkdocs_include/__init__.py | nqkdev/mkdocs-include | eb504673db7fc046af5f8cde951f57a62f0cd6e5 | [
"Apache-2.0"
] | null | null | null | from .plugin import Include
| 14 | 27 | 0.821429 | 4 | 28 | 5.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 28 | 1 | 28 | 28 | 0.958333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
831760dadf547a4611016a61248bdd119cc8d06d | 2,945 | py | Python | parsers/tests/test_topconsparser.py | rigdenlab/conkit-web | bf50d28a73f43b9eb0e0c397ec1d0fd32547fdf1 | [
"BSD-3-Clause"
] | 1 | 2020-04-16T16:52:53.000Z | 2020-04-16T16:52:53.000Z | parsers/tests/test_topconsparser.py | rigdenlab/conplot | 9b3129d9e1b7ed93da63c6fd31f9b50e63f2d4d9 | [
"BSD-3-Clause"
] | 47 | 2020-05-11T13:59:11.000Z | 2022-01-21T09:37:18.000Z | parsers/tests/test_topconsparser.py | rigdenlab/conkit-web | bf50d28a73f43b9eb0e0c397ec1d0fd32547fdf1 | [
"BSD-3-Clause"
] | 5 | 2020-04-24T11:19:21.000Z | 2020-05-06T08:01:36.000Z | import unittest
from parsers import TopconsParser, MembraneStates
from utils.exceptions import InvalidFormat
class TopconsParserTestCase(unittest.TestCase):
def test_1(self):
dummy_prediction = """##############################################################################
TOPCONS2 result file
Generated from http://topcons.cbr.su.se at 2019-08-15 10:48:49 CEST
Total request time: 0.4 seconds.
##############################################################################
Sequence number: 1
Sequence name: tr|W9DY28|W9DY28_METTI Putative membrane protein OS=Methanolobus tindarius DSM 2278 OX=1090322 GN=MettiDRAFT_2055 PE=4 SV=1
Sequence length: 10 aa.
Sequence:
MSLEATVLDL
TOPCONS predicted topology:
iiMMMoooiM
OCTOPUS predicted topology:
MiMiMoioiM
Philius predicted topology:
oiMMMMooio
Homology:
No homologous hits found
Predicted Delta-G-values (kcal/mol) (left column=sequence position; right column=Delta-G)
10 5.196
11 5.185
12 4.762
13 5.008
14 4.287
Predicted TOPCONS reliability (left column=sequence position; right column=reliability)
11 95.24
12 95.24
13 95.24
14 95.24
##############################################################################
"""
expected = [
MembraneStates.INSIDE.value,
MembraneStates.INSIDE.value,
MembraneStates.INSERTED.value,
MembraneStates.INSERTED.value,
MembraneStates.INSERTED.value,
MembraneStates.OUTSIDE.value,
MembraneStates.OUTSIDE.value,
MembraneStates.OUTSIDE.value,
MembraneStates.INSIDE.value,
MembraneStates.INSERTED.value,
]
output = TopconsParser(dummy_prediction)
self.assertEqual(10, len(output))
self.assertListEqual(expected, output)
def test_2(self):
dummy_prediction = """##############################################################################
TOPCONS2 result file
Generated from http://topcons.cbr.su.se at 2019-08-15 10:48:49 CEST
Total request time: 0.4 seconds.
##############################################################################
Sequence number: 1
Sequence name: tr|W9DY28|W9DY28_METTI Putative membrane protein OS=Methanolobus tindarius DSM 2278 OX=1090322 GN=MettiDRAFT_2055 PE=4 SV=1
Sequence length: 10 aa.
Sequence:
MSLEATVLDL
TOPCONS predicted topology:
iiMXMoooiM
OCTOPUS predicted topology:
MiMiMoioiM
Philius predicted topology:
oiMMMMooio
Homology:
No homologous hits found
Predicted Delta-G-values (kcal/mol) (left column=sequence position; right column=Delta-G)
10 5.196
11 5.185
12 4.762
13 5.008
14 4.287
Predicted TOPCONS reliability (left column=sequence position; right column=reliability)
11 95.24
12 95.24
13 95.24
14 95.24
##############################################################################
"""
with self.assertRaises(InvalidFormat):
output = TopconsParser(dummy_prediction)
| 23.373016 | 138 | 0.61562 | 328 | 2,945 | 5.496951 | 0.341463 | 0.094842 | 0.039933 | 0.057682 | 0.799224 | 0.799224 | 0.799224 | 0.764282 | 0.665557 | 0.665557 | 0 | 0.080227 | 0.161969 | 2,945 | 125 | 139 | 23.56 | 0.650324 | 0 | 0 | 0.847059 | 0 | 0.070588 | 0.672326 | 0.173854 | 0 | 0 | 0 | 0 | 0.035294 | 1 | 0.023529 | false | 0 | 0.035294 | 0 | 0.070588 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
83211b43d3dbdd6066644038a96625f0b9eb598e | 109 | py | Python | mag_report/report_graphs/__init__.py | Curtin-Open-Knowledge-Initiative/mag_coverage_report | a75dd1273c44895b5c857ebd498407aa95bd45e5 | [
"Apache-2.0"
] | null | null | null | mag_report/report_graphs/__init__.py | Curtin-Open-Knowledge-Initiative/mag_coverage_report | a75dd1273c44895b5c857ebd498407aa95bd45e5 | [
"Apache-2.0"
] | 2 | 2021-08-30T11:52:25.000Z | 2021-09-02T12:11:05.000Z | mag_report/report_graphs/__init__.py | Curtin-Open-Knowledge-Initiative/mag_coverage_report | a75dd1273c44895b5c857ebd498407aa95bd45e5 | [
"Apache-2.0"
] | 3 | 2021-07-04T07:39:01.000Z | 2021-08-24T15:24:29.000Z | from .alluvial import *
from .overall_coverage import *
from .bar_line import *
from .value_add_bar import *
| 21.8 | 31 | 0.779817 | 16 | 109 | 5.0625 | 0.5625 | 0.37037 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.146789 | 109 | 4 | 32 | 27.25 | 0.870968 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
832b06fe98dcdb6c4a2f779524b1127b64d254a5 | 36,084 | py | Python | tests/test_dumper.py | sgrah-oss/haystackapi | dc6000120e5ef97b174bb1440460ce170f22026e | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | tests/test_dumper.py | sgrah-oss/haystackapi | dc6000120e5ef97b174bb1440460ce170f22026e | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | tests/test_dumper.py | sgrah-oss/haystackapi | dc6000120e5ef97b174bb1440460ce170f22026e | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Zinc dumping and parsing module
# See the accompanying LICENSE Apache V2.0 file.
# (C) 2016 VRT Systems
# (C) 2021 Engie Digital
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
import datetime
import json
from csv import reader
import pytz
import haystackapi
from haystackapi import dump_scalar
from .test_parser import SIMPLE_EXAMPLE_ZINC, SIMPLE_EXAMPLE_JSON, \
METADATA_EXAMPLE_JSON, SIMPLE_EXAMPLE_CSV, METADATA_EXAMPLE_CSV
# The metadata example is a little different, as we generate the grid without
# spaces around the commas.
METADATA_EXAMPLE = '''ver:"2.0" database:"test" dis:"Site Energy Summary"
siteName dis:"Sites",val dis:"Value" unit:"kW"
"Site 1",356.214kW
"Site 2",463.028kW
'''
def make_simple_grid(version=haystackapi.VER_2_0):
grid = haystackapi.Grid(version=version)
grid.column['firstName'] = {}
grid.column['bday'] = {}
grid.extend([
{
'firstName': 'Jack',
'bday': datetime.date(1973, 7, 23),
},
{
'firstName': 'Jill',
'bday': datetime.date(1975, 11, 15),
},
])
return grid
def test_simple_zinc():
grid = make_simple_grid()
grid_str = haystackapi.dump(grid)
assert grid_str == SIMPLE_EXAMPLE_ZINC
def test_simple_json():
grid = make_simple_grid()
grid_json = json.loads(haystackapi.dump(grid, mode=haystackapi.MODE_JSON))
assert grid_json == SIMPLE_EXAMPLE_JSON
def test_simple_csv():
grid = make_simple_grid()
grid_csv = haystackapi.dump(grid, mode=haystackapi.MODE_CSV)
assert list(reader(grid_csv.splitlines()))
assert grid_csv == SIMPLE_EXAMPLE_CSV
def make_metadata_grid(version=haystackapi.VER_2_0):
grid = haystackapi.Grid(version=version)
grid.metadata['database'] = 'test'
grid.metadata['dis'] = 'Site Energy Summary'
grid.column['siteName'] = {'dis': 'Sites'}
grid.column['val'] = haystackapi.MetadataObject()
grid.column['val']['dis'] = 'Value'
grid.column['val']['unit'] = 'kW'
grid.extend([
{
'siteName': 'Site 1',
'val': haystackapi.Quantity(356.214, 'kW'),
},
{
'siteName': 'Site 2',
'val': haystackapi.Quantity(463.028, 'kW'),
},
])
return grid
def test_metadata_zinc():
grid = make_metadata_grid()
grid_str = haystackapi.dump(grid)
assert grid_str == METADATA_EXAMPLE
def test_metadata_json():
grid = make_metadata_grid()
grid_json = json.loads(haystackapi.dump(grid, mode=haystackapi.MODE_JSON))
assert grid_json == METADATA_EXAMPLE_JSON
def test_metadata_csv():
grid = make_metadata_grid()
grid_csv = haystackapi.dump(grid, mode=haystackapi.MODE_CSV)
assert list(reader(grid_csv.splitlines()))
assert grid_csv == METADATA_EXAMPLE_CSV
def test_multi_grid_zinc():
grids = [make_simple_grid(), make_metadata_grid()]
grid_str = haystackapi.dump(grids)
assert grid_str == '\n'.join([SIMPLE_EXAMPLE_ZINC, METADATA_EXAMPLE])
def test_multi_grid_json():
grids = [make_simple_grid(), make_metadata_grid()]
grid_json = json.loads(haystackapi.dump(grids, mode=haystackapi.MODE_JSON))
assert grid_json[0] == SIMPLE_EXAMPLE_JSON
assert grid_json[1] == METADATA_EXAMPLE_JSON
def test_multi_grid_csv():
grids = [make_simple_grid(), make_metadata_grid()]
grid_csv = haystackapi.dump(grids, mode=haystackapi.MODE_CSV)
assert list(reader(grid_csv.splitlines()))
assert grid_csv == '''firstName,bday
"Jack",1973-07-23
"Jill",1975-11-15
siteName,val
"Site 1",356.214kW
"Site 2",463.028kW
'''
def make_grid_meta(version=haystackapi.VER_2_0):
grid = haystackapi.Grid(version=version)
grid.metadata['aString'] = 'aValue'
grid.metadata['aNumber'] = 3.14159
grid.metadata['aNull'] = None
grid.metadata['aMarker'] = haystackapi.MARKER
grid.metadata['aQuantity'] = haystackapi.Quantity(123, 'Hz')
grid.column['empty'] = {}
return grid
def test_grid_meta():
grid_str = haystackapi.dump(make_grid_meta())
assert grid_str == '''ver:"2.0" aString:"aValue" aNumber:3.14159 aNull:N aMarker aQuantity:123Hz
empty
'''
def test_grid_meta_json():
grid_json = json.loads(haystackapi.dump(make_grid_meta(),
mode=haystackapi.MODE_JSON))
assert grid_json == {
'meta': {
'ver': '2.0',
'aString': 's:aValue',
'aNumber': 'n:3.141590',
'aNull': None,
'aMarker': 'm:',
'aQuantity': 'n:123.000000 Hz',
},
'cols': [
{'name': 'empty'},
],
'rows': [],
}
def test_grid_meta_csv():
grid_csv = haystackapi.dump(make_grid_meta(), mode=haystackapi.MODE_CSV)
assert list(reader(grid_csv.splitlines()))
assert grid_csv == 'empty\n'
def make_col_meta(version=haystackapi.VER_2_0):
grid = haystackapi.Grid(version=version)
col_meta = haystackapi.MetadataObject()
col_meta['aString'] = 'aValue'
col_meta['aNumber'] = 3.14159
col_meta['aNull'] = None
col_meta['aMarker'] = haystackapi.MARKER
col_meta['aQuantity'] = haystackapi.Quantity(123, 'Hz')
grid.column['empty'] = col_meta
return grid
def test_col_meta_zinc():
grid_str = haystackapi.dump(make_col_meta(), mode=haystackapi.MODE_ZINC)
assert grid_str == '''ver:"2.0"
empty aString:"aValue" aNumber:3.14159 aNull:N aMarker aQuantity:123Hz
'''
def test_col_meta_json():
grid_json = json.loads(haystackapi.dump(make_col_meta(),
mode=haystackapi.MODE_JSON))
assert grid_json == {
'meta': {
'ver': '2.0',
},
'cols': [
{'name': 'empty',
'aString': 's:aValue',
'aNumber': 'n:3.141590',
'aNull': None,
'aMarker': 'm:',
'aQuantity': 'n:123.000000 Hz',
},
],
'rows': [],
}
def test_col_meta_csv():
grid_csv = haystackapi.dump(make_col_meta(), mode=haystackapi.MODE_CSV)
assert list(reader(grid_csv.splitlines()))
assert grid_csv == 'empty\n'
def test_data_types_zinc_v2():
grid = haystackapi.Grid(version=haystackapi.VER_2_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'A null value',
'value': None,
},
{
'comment': 'A marker',
'value': haystackapi.MARKER,
},
{
'comment': 'A "remove" object',
'value': haystackapi.REMOVE,
},
{
'comment': 'A boolean, indicating False',
'value': False,
},
{
'comment': 'A boolean, indicating True',
'value': True,
},
{
'comment': 'A reference, without value',
'value': haystackapi.Ref('a-ref'),
},
{
'comment': 'A reference, with value',
'value': haystackapi.Ref('a-ref', 'a value'),
},
{
'comment': 'A binary blob',
'value': haystackapi.Bin('text/plain'),
},
{
'comment': 'A quantity',
'value': haystackapi.Quantity(500, 'miles'),
},
{
'comment': 'A quantity without unit',
'value': haystackapi.Quantity(500, None),
},
{
'comment': 'A coordinate',
'value': haystackapi.Coordinate(-27.4725, 153.003),
},
{
'comment': 'A URI',
'value': haystackapi.Uri('http://www.example.com#`unicode:\u1234\u5678`'),
},
{
'comment': 'A string',
'value': 'This is a test\n'
'Line two of test\n'
'\tIndented with "quotes", \\backslashes\\ and '
'Unicode characters: \u1234\u5678 and a $ dollar sign',
},
{
'comment': 'A date',
'value': datetime.date(2016, 1, 13),
},
{
'comment': 'A time',
'value': datetime.time(7, 51, 43, microsecond=12345),
},
{
'comment': 'A timestamp (non-UTC)',
'value': pytz.timezone('Europe/Berlin').localize(
datetime.datetime(2016, 1, 13, 7, 51, 42, 12345)),
},
{
'comment': 'A timestamp (UTC)',
'value': pytz.timezone('UTC').localize(
datetime.datetime(2016, 1, 13, 7, 51, 42, 12345)),
},
])
grid_str = haystackapi.dump(grid, mode=haystackapi.MODE_ZINC)
ref_str = '''ver:"2.0"
comment,value
"A null value",N
"A marker",M
"A \\"remove\\" object",R
"A boolean, indicating False",F
"A boolean, indicating True",T
"A reference, without value",@a-ref
"A reference, with value",@a-ref "a value"
"A binary blob",Bin(text/plain)
"A quantity",500miles
"A quantity without unit",500
"A coordinate",C(-27.472500,153.003000)
"A URI",`http://www.example.com#\\`unicode:\\u1234\\u5678\\``
"A string","This is a test\\nLine two of test\\n\\tIndented with \\"quotes\\", \\\\backslashes\\\\ and Unicode characters: \\u1234\\u5678 and a \\$ dollar sign"
"A date",2016-01-13
"A time",07:51:43.012345
"A timestamp (non-UTC)",2016-01-13T07:51:42.012345+01:00 Berlin
"A timestamp (UTC)",2016-01-13T07:51:42.012345+00:00 UTC
'''
assert grid_str == ref_str
def test_data_types_json_v2():
grid = haystackapi.Grid(version=haystackapi.VER_2_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'A null value',
'value': None,
},
{
'comment': 'A marker',
'value': haystackapi.MARKER,
},
{
'comment': 'A remove (2.0 version)',
'value': haystackapi.REMOVE,
},
{
'comment': 'A boolean, indicating False',
'value': False,
},
{
'comment': 'A boolean, indicating True',
'value': True,
},
{
'comment': 'A reference, without value',
'value': haystackapi.Ref('a-ref'),
},
{
'comment': 'A reference, with value',
'value': haystackapi.Ref('a-ref', 'a value'),
},
{
'comment': 'A binary blob',
'value': haystackapi.Bin('text/plain'),
},
{
'comment': 'A quantity',
'value': haystackapi.Quantity(500, 'miles'),
},
{
'comment': 'A quantity without unit',
'value': haystackapi.Quantity(500, None),
},
{
'comment': 'A coordinate',
'value': haystackapi.Coordinate(-27.4725, 153.003),
},
{
'comment': 'A URI',
'value': haystackapi.Uri('http://www.example.com'),
},
{
'comment': 'A string',
'value': 'This is a test\n'
'Line two of test\n'
'\tIndented with "quotes" and \\backslashes\\',
},
{
'comment': 'A date',
'value': datetime.date(2016, 1, 13),
},
{
'comment': 'A time',
'value': datetime.time(7, 51, 43, microsecond=12345),
},
{
'comment': 'A timestamp (non-UTC)',
'value': pytz.timezone('Europe/Berlin').localize(
datetime.datetime(2016, 1, 13, 7, 51, 42, 12345)),
},
{
'comment': 'A timestamp (UTC)',
'value': pytz.timezone('UTC').localize(
datetime.datetime(2016, 1, 13, 7, 51, 42, 12345)),
},
])
grid_json = json.loads(haystackapi.dump(grid, mode=haystackapi.MODE_JSON))
assert grid_json == {
'meta': {'ver': '2.0'},
'cols': [
{'name': 'comment'},
{'name': 'value'},
],
'rows': [
{'comment': 's:A null value',
'value': None},
{'comment': 's:A marker',
'value': 'm:'},
{'comment': 's:A remove (2.0 version)',
'value': 'x:'},
{'comment': 's:A boolean, indicating False',
'value': False},
{'comment': 's:A boolean, indicating True',
'value': True},
{'comment': 's:A reference, without value',
'value': 'r:a-ref'},
{'comment': 's:A reference, with value',
'value': 'r:a-ref a value'},
{'comment': 's:A binary blob',
'value': 'b:text/plain'},
{'comment': 's:A quantity',
'value': 'n:500.000000 miles'},
{'comment': 's:A quantity without unit',
'value': 'n:500.000000'},
{'comment': 's:A coordinate',
'value': 'c:-27.472500,153.003000'},
{'comment': 's:A URI',
'value': 'u:http://www.example.com'},
{'comment': 's:A string',
'value': 's:This is a test\n'
'Line two of test\n'
'\tIndented with \"quotes\" '
'and \\backslashes\\'},
{'comment': 's:A date',
'value': 'd:2016-01-13'},
{'comment': 's:A time',
'value': 'h:07:51:43.012345'},
{'comment': 's:A timestamp (non-UTC)',
'value': 't:2016-01-13T07:51:42.012345+01:00 Berlin'},
{'comment': 's:A timestamp (UTC)',
'value': 't:2016-01-13T07:51:42.012345+00:00 UTC'},
],
}
def test_data_types_csv_v2():
grid = haystackapi.Grid(version=haystackapi.VER_2_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'A null value',
'value': None,
},
{
'comment': 'A marker',
'value': haystackapi.MARKER,
},
{
'comment': 'A remove (2.0 version)',
'value': haystackapi.REMOVE,
},
{
'comment': 'A boolean, indicating False',
'value': False,
},
{
'comment': 'A boolean, indicating True',
'value': True,
},
{
'comment': 'A reference, without value',
'value': haystackapi.Ref('a-ref'),
},
{
'comment': 'A reference, with value',
'value': haystackapi.Ref('a-ref', 'a value'),
},
{
'comment': 'A binary blob',
'value': haystackapi.Bin('text/plain'),
},
{
'comment': 'A quantity',
'value': haystackapi.Quantity(500, 'miles'),
},
{
'comment': 'A quantity without unit',
'value': haystackapi.Quantity(500, None),
},
{
'comment': 'A coordinate',
'value': haystackapi.Coordinate(-27.4725, 153.003),
},
{
'comment': 'A URI',
'value': haystackapi.Uri('http://www.example.com'),
},
{
'comment': 'A string',
'value': 'This is a test\n'
'Line two of test\n'
'\tIndented with "quotes" and \\backslashes\\',
},
{
'comment': 'A date',
'value': datetime.date(2016, 1, 13),
},
{
'comment': 'A time',
'value': datetime.time(7, 51, 43, microsecond=12345),
},
{
'comment': 'A timestamp (non-UTC)',
'value': pytz.timezone('Europe/Berlin').localize(
datetime.datetime(2016, 1, 13, 7, 51, 42, 12345)),
},
{
'comment': 'A timestamp (UTC)',
'value': pytz.timezone('UTC').localize(
datetime.datetime(2016, 1, 13, 7, 51, 42, 12345)),
},
])
grid_csv = haystackapi.dump(grid, mode=haystackapi.MODE_CSV)
assert list(reader(grid_csv.splitlines()))
assert grid_csv == '''comment,value
"A null value",
"A marker",\u2713
"A remove (2.0 version)",R
"A boolean, indicating False",false
"A boolean, indicating True",true
"A reference, without value",@a-ref
"A reference, with value",@a-ref a value
"A binary blob",Bin(text/plain)
"A quantity",500miles
"A quantity without unit",500
"A coordinate","C(-27.472500,153.003000)"
"A URI",`http://www.example.com`
"A string","This is a test\nLine two of test\n\tIndented with ""quotes"" and \\backslashes\\"
"A date",2016-01-13
"A time",07:51:43.012345
"A timestamp (non-UTC)",2016-01-13T07:51:42.012345+01:00
"A timestamp (UTC)",2016-01-13T07:51:42.012345+00:00
'''
def test_data_types_zinc_v3():
grid = haystackapi.Grid(version=haystackapi.VER_3_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'A NA',
'value': haystackapi.NA,
},
{
'comment': 'An empty list',
'value': [],
},
{
'comment': 'A null value in a list',
'value': [None],
},
{
'comment': 'A marker in a list',
'value': [haystackapi.MARKER],
},
{
'comment': 'Booleans',
'value': [True, False],
},
{
'comment': 'References',
'value': [haystackapi.Ref('a-ref'), haystackapi.Ref('a-ref', 'a value')],
},
{
'comment': 'A quantity',
'value': [haystackapi.Quantity(500, 'miles')],
},
{
'comment': 'A XStr',
'value': [haystackapi.XStr("hex", 'deadbeef')],
},
])
grid_str = haystackapi.dump(grid, mode=haystackapi.MODE_ZINC)
ref_str = '''ver:"3.0"
comment,value
"A NA",NA
"An empty list",[]
"A null value in a list",[N]
"A marker in a list",[M]
"Booleans",[T,F]
"References",[@a-ref,@a-ref "a value"]
"A quantity",[500miles]
"A XStr",[hex("deadbeef")]
'''
assert grid_str == ref_str
def test_data_types_json_v3():
grid = haystackapi.Grid(version=haystackapi.VER_3_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'A Remove (3.0 version)',
'value': haystackapi.REMOVE,
},
{
'comment': 'A NA',
'value': haystackapi.NA,
},
{
'comment': 'An empty list',
'value': [],
},
{
'comment': 'A null value in a list',
'value': [None],
},
{
'comment': 'A marker in a list',
'value': [haystackapi.MARKER],
},
{
'comment': 'Booleans',
'value': [True, False],
},
{
'comment': 'References',
'value': [haystackapi.Ref('a-ref'), haystackapi.Ref('a-ref', 'a value')],
},
{
'comment': 'A quantity',
'value': [haystackapi.Quantity(500, 'miles')],
},
{
'comment': 'A XStr',
'value': [haystackapi.XStr("hex", 'deadbeef')],
},
])
grid_json = json.loads(haystackapi.dump(grid, mode=haystackapi.MODE_JSON))
assert grid_json == {
'meta': {
'ver': '3.0'
},
'cols': [
{'name': 'comment'},
{'name': 'value'},
],
'rows': [
{
'comment': 's:A Remove (3.0 version)',
'value': '-:'
},
{
'comment': 's:A NA',
'value': 'z:'
},
{
'comment': "s:An empty list",
'value': []
},
{
'comment': "s:A null value in a list",
'value': [None]
},
{
'comment': "s:A marker in a list",
'value': ['m:']
},
{
'comment': "s:Booleans",
'value': [True, False]
},
{
'comment': "s:References",
'value': ['r:a-ref', 'r:a-ref a value']
},
{
'comment': "s:A quantity",
'value': ['n:500.000000 miles'] # Python is more precise
# than The Proclaimers
},
{
'comment': "s:A XStr",
'value': ['x:hex:deadbeef']
}
]
}
def test_data_types_csv_v3():
grid = haystackapi.Grid(version=haystackapi.VER_3_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'A Remove (3.0 version)',
'value': haystackapi.REMOVE,
},
{
'comment': 'A NA',
'value': haystackapi.NA,
},
{
'comment': 'An empty list',
'value': [],
},
{
'comment': 'A null value in a list',
'value': [None],
},
{
'comment': 'A marker in a list',
'value': [haystackapi.MARKER],
},
{
'comment': 'Booleans',
'value': [True, False],
},
{
'comment': 'References',
'value': [haystackapi.Ref('a-ref'), haystackapi.Ref('a-ref', 'a value')],
},
{
'comment': 'A quantity',
'value': [haystackapi.Quantity(500, 'miles')],
},
{
'comment': 'A XStr',
'value': [haystackapi.XStr("hex", 'deadbeef')],
},
])
grid_csv = haystackapi.dump(grid, mode=haystackapi.MODE_CSV)
assert list(reader(grid_csv.splitlines()))
assert grid_csv == u'''comment,value
"A Remove (3.0 version)",R
"A NA",NA
"An empty list","[]"
"A null value in a list","[N]"
"A marker in a list","[M]"
"Booleans","[T,F]"
"References","[@a-ref,@a-ref ""a value""]"
"A quantity","[500miles]"
"A XStr","[hex(""deadbeef"")]"
'''
def test_scalar_dict_zinc_v3():
grid = haystackapi.Grid(version=haystackapi.VER_3_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'An empty dict',
'value': {},
},
{
'comment': 'A marker in a dict',
'value': {"marker": haystackapi.MARKER},
},
{
'comment': 'A references in a dict',
'value': {"ref": haystackapi.Ref('a-ref'), "ref2": haystackapi.Ref('a-ref', 'a value')},
},
{
'comment': 'A quantity in a dict',
'value': {"quantity": haystackapi.Quantity(500, 'miles')},
},
])
grid_str = haystackapi.dump(grid, mode=haystackapi.MODE_ZINC)
assert grid_str == ("ver:\"3.0\"\n"
"comment,value\n"
"\"An empty dict\",{}\n"
"\"A marker in a dict\",{marker:M}\n"
"\"A references in a dict\",{" +
" ".join([str(k) + ":" + str(v)
for k, v in {"ref": "@a-ref", "ref2": "@a-ref"}.items()])
.replace("ref2:@a-ref", "ref2:@a-ref \"a value\"") +
"}\n"
"\"A quantity in a dict\",{quantity:500miles}\n")
def test_scalar_dict_json_v3():
grid = haystackapi.Grid(version=haystackapi.VER_3_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'An empty dict',
'value': {},
},
{
'comment': 'A marker in a dict',
'value': {"marker": haystackapi.MARKER},
},
{
'comment': 'A references in a dict',
'value': {"ref": haystackapi.Ref('a-ref'), "ref2": haystackapi.Ref('a-ref', 'a value')},
},
{
'comment': 'A quantity in a dict',
'value': {"quantity": haystackapi.Quantity(500, 'miles')},
},
])
grid_json = json.loads(haystackapi.dump(grid, mode=haystackapi.MODE_JSON))
assert grid_json == {
'meta': {
'ver': '3.0'
},
'cols': [
{'name': 'comment'},
{'name': 'value'},
],
'rows': [
{
'comment': "s:An empty dict",
'value': {}
},
{
'comment': "s:A marker in a dict",
'value': {'marker': 'm:'}
},
{
'comment': "s:A references in a dict",
'value': {'ref': 'r:a-ref', 'ref2': 'r:a-ref a value'}
},
{
'comment': "s:A quantity in a dict",
'value': {"quantity": 'n:500.000000 miles'}
}
]
}
def test_scalar_dict_csv_v3():
grid = haystackapi.Grid(version=haystackapi.VER_3_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'An empty dict',
'value': {},
},
{
'comment': 'A marker in a dict',
'value': {"marker": haystackapi.MARKER},
},
{
'comment': 'A references in a dict',
'value': {"ref": haystackapi.Ref('a-ref'), "ref2": haystackapi.Ref('a-ref', 'a value')},
},
{
'comment': 'A quantity in a dict',
'value': {"quantity": haystackapi.Quantity(500, 'miles')},
},
])
grid_csv = haystackapi.dump(grid, mode=haystackapi.MODE_CSV)
assert list(reader(grid_csv.splitlines()))
assert grid_csv == u'''comment,value
"An empty dict","{}"
"A marker in a dict","{marker:M}"
"A references in a dict","{''' + \
" ".join([k + ":" + v
for k, v in {'ref': '@a-ref', 'ref2': '@a-ref ""a value""'}.items()]) + \
'''}"
"A quantity in a dict","{quantity:500miles}"
'''
def test_scalar_dict_zinc_ver():
# Test that versions are respected.
try:
haystackapi.dump_scalar({"a": "b"},
mode=haystackapi.MODE_ZINC, version=haystackapi.VER_2_0)
assert False, 'Serialised a list in Haystack v2.0'
except ValueError:
pass
def test_scalar_dict_json_ver():
# Test that versions are respected.
try:
haystackapi.dump_scalar({"a": "b"},
mode=haystackapi.MODE_JSON, version=haystackapi.VER_2_0)
assert False, 'Serialised a list in Haystack v2.0'
except ValueError:
pass
def test_scalar_unknown_zinc():
try:
haystackapi.dump_scalar(haystackapi.VER_2_0,
mode=haystackapi.MODE_ZINC, version=haystackapi.VER_2_0)
assert False, 'Serialised a list in Haystack v2.0'
except NotImplementedError:
pass
def test_scalar_unknown_json():
try:
haystackapi.dump_scalar(haystackapi.VER_2_0,
mode=haystackapi.MODE_JSON, version=haystackapi.VER_2_0)
assert False, 'Serialised a list in Haystack v2.0'
except NotImplementedError:
pass
def test_scalar_unknown_csv():
try:
haystackapi.dump_scalar(haystackapi.VER_2_0,
mode=haystackapi.MODE_CSV, version=haystackapi.VER_2_0)
assert False, 'Serialised a list in Haystack v2.0'
except NotImplementedError:
pass
def test_list_zinc_v2():
try:
grid = haystackapi.Grid(version=haystackapi.VER_2_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'An empty list',
'value': [],
}
])
haystackapi.dump(grid, mode=haystackapi.MODE_ZINC)
assert False, 'Project Haystack 2.0 doesn\'t support lists'
except ValueError:
pass
def test_list_json_v2():
try:
grid = haystackapi.Grid(version=haystackapi.VER_2_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'An empty list',
'value': [],
}
])
haystackapi.dump(grid, mode=haystackapi.MODE_JSON)
assert False, 'Project Haystack 2.0 doesn\'t support lists'
except ValueError:
pass
def test_list_csv_v2():
try:
grid = haystackapi.Grid(version=haystackapi.VER_2_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'An empty list',
'value': [],
}
])
haystackapi.dump(grid, mode=haystackapi.MODE_CSV)
assert False, 'Project Haystack 2.0 doesn\'t support lists'
except ValueError:
pass
def test_dict_zinc_v2():
try:
grid = haystackapi.Grid(version=haystackapi.VER_2_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'An empty dict',
'value': {},
}
])
haystackapi.dump(grid, mode=haystackapi.MODE_ZINC)
assert False, 'Project Haystack 2.0 doesn\'t support dict'
except ValueError:
pass
def test_dict_json_v2():
try:
grid = haystackapi.Grid(version=haystackapi.VER_2_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'An empty dict',
'value': {},
}
])
haystackapi.dump(grid, mode=haystackapi.MODE_JSON)
assert False, 'Project Haystack 2.0 doesn\'t support dict'
except ValueError:
pass
def test_dict_csv_v2():
try:
grid = haystackapi.Grid(version=haystackapi.VER_2_0)
grid.column['comment'] = {}
grid.column['value'] = {}
grid.extend([
{
'comment': 'An empty dict',
'value': {},
}
])
haystackapi.dump(grid, mode=haystackapi.MODE_CSV)
assert False, 'Project Haystack 2.0 doesn\'t support dict'
except ValueError:
pass
def test_scalar_zinc():
# No need to be exhaustive, the underlying function is tested heavily by
# the grid dump tests.
assert haystackapi.dump_scalar(haystackapi.Ref('areference', 'a display name'),
mode=haystackapi.MODE_ZINC) == '@areference "a display name"'
def test_scalar_json():
# No need to be exhaustive, the underlying function is tested heavily by
# the grid dump tests.
assert haystackapi.dump_scalar(haystackapi.Ref('areference', 'a display name'),
mode=haystackapi.MODE_JSON) == '"r:areference a display name"'
def test_scalar_csv():
# No need to be exhaustive, the underlying function is tested heavily by
# the grid dump tests.
assert haystackapi.dump_scalar(haystackapi.Ref('areference', 'a display name'),
mode=haystackapi.MODE_CSV) == '@areference a display name'
def test_scalar_list_zinc_ver():
# Test that versions are respected.
try:
haystackapi.dump_scalar(["a list is not allowed in v2.0"],
mode=haystackapi.MODE_ZINC, version=haystackapi.VER_2_0)
assert False, 'Serialised a list in Haystack v2.0'
except ValueError:
pass
def test_scalar_list_json_ver():
# Test that versions are respected.
try:
haystackapi.dump_scalar(["a list is not allowed in v2.0"],
mode=haystackapi.MODE_JSON, version=haystackapi.VER_2_0)
assert False, 'Serialised a list in Haystack v2.0'
except ValueError:
pass
def test_scalar_list_na_ver_zinc():
# Test that versions are respected.
try:
haystackapi.dump_scalar(haystackapi.NA,
mode=haystackapi.MODE_ZINC, version=haystackapi.VER_2_0)
assert False, 'Serialised a NA in Haystack v2.0'
except ValueError:
pass
def test_scalar_list_na_ver_json():
# Test that versions are respected.
try:
haystackapi.dump_scalar(haystackapi.NA,
mode=haystackapi.MODE_JSON, version=haystackapi.VER_2_0)
assert False, 'Serialised a NA in Haystack v2.0'
except ValueError:
pass
def test_scalar_list_na_ver_csv():
# Test that versions are respected.
try:
haystackapi.dump_scalar(haystackapi.NA,
mode=haystackapi.MODE_CSV, version=haystackapi.VER_2_0)
assert False, 'Serialised a NA in Haystack v2.0'
except ValueError:
pass
def test_scalar_na_zinc_ver():
# Test that versions are respected.
try:
haystackapi.dump_scalar(haystackapi.NA,
mode=haystackapi.MODE_ZINC, version=haystackapi.VER_2_0)
assert False, 'Serialised a NA in Haystack v2.0'
except ValueError:
pass
def test_scalar_na_json_ver():
# Test that versions are respected.
try:
haystackapi.dump_scalar(haystackapi.NA,
mode=haystackapi.MODE_JSON, version=haystackapi.VER_2_0)
assert False, 'Serialised a NA in Haystack v2.0'
except ValueError:
pass
def test_scalar_na_csv_ver():
# Test that versions are respected.
try:
haystackapi.dump_scalar(haystackapi.NA,
mode=haystackapi.MODE_CSV, version=haystackapi.VER_2_0)
assert False, 'Serialised a NA in Haystack v2.0'
except ValueError:
pass
def test_grid_types_zinc():
innergrid = haystackapi.Grid(version=haystackapi.VER_3_0)
innergrid.column['comment'] = {}
innergrid.extend([
{
'comment': 'A innergrid',
},
])
grid = haystackapi.Grid(version=haystackapi.VER_3_0)
grid.column['inner'] = {}
grid.extend([
{
'inner': innergrid,
},
])
grid_str = haystackapi.dump(grid, mode=haystackapi.MODE_ZINC)
assert grid_str == ('ver:"3.0"\n'
'inner\n'
'<<ver:"3.0"\n'
'comment\n'
'"A innergrid"\n'
'>>\n')
def test_grid_types_json():
innergrid = haystackapi.Grid(version=haystackapi.VER_3_0)
innergrid.column['comment'] = {}
innergrid.extend([
{
'comment': 'A innergrid',
},
])
grid = haystackapi.Grid(version=haystackapi.VER_3_0)
grid.column['inner'] = {}
grid.extend([
{
'inner': innergrid,
},
])
grid_str = haystackapi.dump(grid, mode=haystackapi.MODE_JSON)
grid_json = json.loads(grid_str)
assert grid_json == {
'meta': {'ver': '3.0'},
'cols': [
{'name': 'inner'},
],
'rows': [
{'inner': {
'meta': {'ver': '3.0'},
'cols': [
{'name': 'comment'},
],
'rows': [
{'comment': 's:A innergrid'},
],
}},
],
}
def test_grid_types_csv():
innergrid = haystackapi.Grid(version=haystackapi.VER_3_0)
innergrid.column['comment'] = {}
innergrid.extend([
{
'comment': 'A innergrid',
},
])
grid = haystackapi.Grid(version=haystackapi.VER_3_0)
grid.column['inner'] = {}
grid.extend([
{
'inner': innergrid,
},
])
grid_csv = haystackapi.dump(grid, mode=haystackapi.MODE_CSV)
assert list(reader(grid_csv.splitlines()))
assert grid_csv == '''inner
"<<ver:""3.0""
comment
""A innergrid""
>>"
'''
def test_dump_invalide_scalar():
assert dump_scalar(None)
| 29.723229 | 160 | 0.514134 | 3,887 | 36,084 | 4.655004 | 0.067661 | 0.035813 | 0.047253 | 0.025644 | 0.865038 | 0.829612 | 0.819332 | 0.79297 | 0.769316 | 0.74439 | 0 | 0.038731 | 0.334553 | 36,084 | 1,213 | 161 | 29.747733 | 0.714809 | 0.026161 | 0 | 0.520561 | 0 | 0.006542 | 0.254664 | 0.016031 | 0 | 0 | 0 | 0 | 0.056075 | 1 | 0.050467 | false | 0.017757 | 0.006542 | 0 | 0.060748 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
8337306f265fbac194613f787304d42893abdbbc | 121 | py | Python | code/argtest.py | joaovitorsilvestre/py4inf-ptBR | 236780517d99af14c0c58ae4177a85e770d6fe46 | [
"CC-BY-3.0"
] | 41 | 2015-02-27T22:13:41.000Z | 2021-11-14T15:37:29.000Z | code/argtest.py | joaovitorsilvestre/py4inf-ptBR | 236780517d99af14c0c58ae4177a85e770d6fe46 | [
"CC-BY-3.0"
] | 2 | 2015-12-15T04:03:15.000Z | 2017-01-13T15:29:47.000Z | code/argtest.py | joaovitorsilvestre/py4inf-ptBR | 236780517d99af14c0c58ae4177a85e770d6fe46 | [
"CC-BY-3.0"
] | 45 | 2015-01-03T17:26:02.000Z | 2022-01-09T16:06:04.000Z | import sys
print 'Count:', len(sys.argv)
print 'Type:', type(sys.argv)
for arg in sys.argv:
print 'Argument:', arg
| 13.444444 | 29 | 0.661157 | 20 | 121 | 4 | 0.55 | 0.2625 | 0.3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.173554 | 121 | 8 | 30 | 15.125 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.2 | null | null | 0.6 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 6 |
834f02e5f15d4c42d1d332fffd9be008a7e1539a | 2,387 | py | Python | code/predict-reg.py | jizhang02/HC-reg-seg | 0e8e141cf3ccce2b74abd8bee47f65516d0cf1c0 | [
"MIT"
] | null | null | null | code/predict-reg.py | jizhang02/HC-reg-seg | 0e8e141cf3ccce2b74abd8bee47f65516d0cf1c0 | [
"MIT"
] | null | null | null | code/predict-reg.py | jizhang02/HC-reg-seg | 0e8e141cf3ccce2b74abd8bee47f65516d0cf1c0 | [
"MIT"
] | null | null | null | '''
-----------------------------------------------
File Name: predict$
Description:
Author: Jing$
Date: 7/17/2021$
-----------------------------------------------
'''
import time
from keras.models import load_model
from data_reg import *
from model_reg import *
from memory_profiler import profile
H = 224
W = 224
slice = 3
test_path = 'HCdata/test/image/'
test_gt = 'HCdata/test/HC_ori_test.csv'
X_aug, Y_aug, ps_aug, \
X_ori, Y_ori, ps_ori = load_data(test_path, test_path, test_gt, test_gt, H, W, slice)
absdff_mm = []
absdff_px = []
abspmae = []
inputshape = (W, H, slice)
y_test = Y_ori / ps_ori # length in pixels
#HC_max = np.max(y_test)
HC_max = 1786.50024241547 # the largest value in training set.
y_test = y_test / HC_max # Normalized HC in pixels
custom_objects = {'huber_loss': huber_loss}
# Test stage
model = load_model('regmodels/best_efnMAE.h5', custom_objects)
print('predicting')
@profile #Decorator
def pred():
time_start=time.time()
preds = model.predict(X_ori,batch_size=16) # The output value is between (0,1) due to normalization.
preds = preds.flatten()
time_end=time.time()
print('time cost',time_end-time_start,'s')
def predict():
H = 224
W = 224
slice = 3
test_path = 'HCdata/test/image/'
test_gt = 'HCdata/test/HC_ori_test.csv'
X_aug, Y_aug, ps_aug, \
X_ori, Y_ori, ps_ori = load_data(test_path, test_path, test_gt, test_gt, H, W, slice)
absdff_mm = []
absdff_px = []
abspmae = []
inputshape = (W, H, slice)
y_test = Y_ori / ps_ori # length in pixels
#HC_max = np.max(y_test)
HC_max = 1786.50024241547 # the largest value in training set.
y_test = y_test / HC_max # Normalized HC in pixels
custom_objects = {'huber_loss': huber_loss}
# Test stage
model = load_model('regmodels/best_efnMAE.h5', custom_objects)
print('predicting')
time_start=time.time()
preds = model.predict(X_ori,batch_size=16) # The output value is between (0,1) due to normalization.
preds = preds.flatten()
time_end=time.time()
print('time cost',time_end-time_start,'s')
#predict_results = preds * HC_max * ps_ori
#print(predict_results.shape)
#print("The predicted HC in mm:")
#for i in (predict_results):
# print(i)
if __name__ == "__main__":
pred() | 29.469136 | 106 | 0.632174 | 353 | 2,387 | 4.011331 | 0.269122 | 0.028249 | 0.016949 | 0.025424 | 0.786723 | 0.786723 | 0.786723 | 0.786723 | 0.786723 | 0.786723 | 0 | 0.032499 | 0.213657 | 2,387 | 81 | 107 | 29.469136 | 0.721897 | 0.268538 | 0 | 0.814815 | 0 | 0 | 0.125457 | 0.062119 | 0 | 0 | 0 | 0 | 0 | 1 | 0.037037 | false | 0 | 0.092593 | 0 | 0.12963 | 0.074074 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
55c1ff8706189047a0e29c9604efc3cb923167bc | 870 | py | Python | api_test/common/GlobalStatusCode.py | RockyLiys/api_auto_test_platform | 7e6aec23b6f54d20c534b77a2679daf37b65c960 | [
"MIT"
] | null | null | null | api_test/common/GlobalStatusCode.py | RockyLiys/api_auto_test_platform | 7e6aec23b6f54d20c534b77a2679daf37b65c960 | [
"MIT"
] | 10 | 2019-12-04T23:30:37.000Z | 2022-02-10T12:05:45.000Z | apitest/api_test/common/GlobalStatusCode.py | willhuang1206/apitest | 4b41855710ba8f21788027da83a830f631e11f26 | [
"Apache-2.0"
] | 3 | 2019-07-01T10:18:40.000Z | 2019-07-06T00:59:19.000Z | def success():
return '999999', '成功'
def fail():
return '999998', '失败'
def name_repetition():
return '999997', '存在相同名称'
def parameter_wrong():
return '999996', '参数有误'
def project_not_exist():
return '999995', '项目不存在'
def project_is_exist():
return '999994', '项目已存在'
def host_is_exist():
return '999993', 'host已存在'
def host_not_exist():
return '999992', 'host不存在'
def group_not_exist():
return '999991', '分组不存在'
def api_not_exist():
return '999990', '接口不存在'
def api_is_exist():
return '999989', '接口已存在'
def history_not_exist():
return '999988', '请求历史不存在'
def case_not_exist():
return '999987', '用例不存在'
def task_not_exist():
return '999986', '任务不存在'
def page_not_int():
return '999985', 'page and page_size must be integer!'
def mock_error():
return '999984', '未匹配到mock地址或未开启!'
| 13.809524 | 58 | 0.644828 | 111 | 870 | 4.81982 | 0.522523 | 0.205607 | 0.183178 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.138929 | 0.205747 | 870 | 62 | 59 | 14.032258 | 0.635311 | 0 | 0 | 0 | 0 | 0 | 0.248276 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
36ca2a07f133faf7ad6f97491c6cd66de79d16e0 | 2,345 | py | Python | calm/dsl/api/user_group.py | tuxtof/calm-dsl | 5af67435d8304b97e170a690068f2d5975e9bfe6 | [
"Apache-2.0"
] | 1 | 2021-01-20T04:44:13.000Z | 2021-01-20T04:44:13.000Z | calm/dsl/api/user_group.py | gabybeitler/calm-dsl | bac453413cfcf800eef95d89d5a7323c83654a93 | [
"Apache-2.0"
] | null | null | null | calm/dsl/api/user_group.py | gabybeitler/calm-dsl | bac453413cfcf800eef95d89d5a7323c83654a93 | [
"Apache-2.0"
] | null | null | null | from .resource import ResourceAPI
class UserGroupAPI(ResourceAPI):
def __init__(self, connection):
super().__init__(connection, resource_type="user_groups")
def get_name_uuid_map(self, params=dict()):
res, err = self.list(params)
if err:
raise Exception("[{}] - {}".format(err["code"], err["error"]))
res = res.json()
name_uuid_map = {}
for entity in res["entities"]:
state = entity["status"]["state"]
if state != "COMPLETE":
continue
e_resources = entity["status"]["resources"]
directory_service_user_group = (
e_resources.get("directory_service_user_group") or dict()
)
distinguished_name = directory_service_user_group.get("distinguished_name")
directory_service_ref = (
directory_service_user_group.get("directory_service_reference")
or dict()
)
directory_service_name = directory_service_ref.get("name", "")
uuid = entity["metadata"]["uuid"]
if directory_service_name and distinguished_name:
name_uuid_map[distinguished_name] = uuid
return name_uuid_map
def get_uuid_name_map(self, params=dict()):
res, err = self.list(params)
if err:
raise Exception("[{}] - {}".format(err["code"], err["error"]))
res = res.json()
uuid_name_map = {}
for entity in res["entities"]:
state = entity["status"]["state"]
if state != "COMPLETE":
continue
e_resources = entity["status"]["resources"]
directory_service_user_group = (
e_resources.get("directory_service_user_group") or dict()
)
distinguished_name = directory_service_user_group.get("distinguished_name")
directory_service_ref = (
directory_service_user_group.get("directory_service_reference")
or dict()
)
directory_service_name = directory_service_ref.get("name", "")
uuid = entity["metadata"]["uuid"]
if directory_service_name and distinguished_name:
uuid_name_map[uuid] = distinguished_name
return uuid_name_map
| 32.123288 | 87 | 0.579531 | 238 | 2,345 | 5.357143 | 0.210084 | 0.225882 | 0.12549 | 0.156863 | 0.795294 | 0.795294 | 0.795294 | 0.795294 | 0.795294 | 0.795294 | 0 | 0 | 0.311727 | 2,345 | 72 | 88 | 32.569444 | 0.789963 | 0 | 0 | 0.692308 | 0 | 0 | 0.13177 | 0.046908 | 0 | 0 | 0 | 0 | 0 | 1 | 0.057692 | false | 0 | 0.019231 | 0 | 0.134615 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
36edb824c7638ebee49c058bdc84ca218c9b8635 | 1,736 | py | Python | experiments/gen_tex.py | LizhengMathAi/svgd | 9606388cf4565e4fafe82869feef7a7ba8986ef2 | [
"Apache-2.0"
] | 3 | 2019-07-10T16:48:53.000Z | 2019-11-03T11:23:06.000Z | experiments/gen_tex.py | LizhengMathAi/svgd | 9606388cf4565e4fafe82869feef7a7ba8986ef2 | [
"Apache-2.0"
] | null | null | null | experiments/gen_tex.py | LizhengMathAi/svgd | 9606388cf4565e4fafe82869feef7a7ba8986ef2 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
for file_name in ["so", "sgd", "rmsprop", "adam"]:
# ----------------------- mlp -----------------------
df = pd.read_csv("./logs/csv/mlp_" + file_name + ".csv").values[:, [2, 3, 4]]
with open("./logs/dat/mlp_" + file_name + "_loss.dat", "w") as f:
f.write("iter loss \n")
for line in df:
f.write("{} {} \n".format(str(line[0]/1000), str(line[1])))
with open("./logs/dat/mlp_" + file_name + "_error.dat", "w") as f:
f.write("iter error \n")
for line in df:
f.write("{} {} \n".format(str(line[0]/1000), str((1 - line[2]) * 100)))
# ----------------------- vgg -----------------------
df = pd.read_csv("./logs/csv/vgg_" + file_name + ".csv").values[:, [0, 2, 3]]
with open("./logs/dat/vgg_" + file_name + "_loss.dat", "w") as f:
f.write("iter loss \n")
for line in df:
f.write("{} {} \n".format(str(line[0]/1000), str(line[1])))
with open("./logs/dat/vgg_" + file_name + "_error.dat", "w") as f:
f.write("iter error \n")
for line in df:
f.write("{} {} \n".format(str(line[0]/1000), str(100 - line[2])))
# ----------------------- resnet-20 -----------------------
df = pd.read_csv("./logs/csv/resnet_" + file_name + ".csv").values[:, [0, 2, 3]]
with open("./logs/dat/resnet_" + file_name + "_loss.dat", "w") as f:
f.write("iter loss \n")
for line in df:
f.write("{} {} \n".format(str(line[0]/10000), str(line[1])))
with open("./logs/dat/resnet_" + file_name + "_error.dat", "w") as f:
f.write("iter error \n")
for line in df:
f.write("{} {} \n".format(str(line[0]/10000), str(100 - line[2])))
| 40.372093 | 84 | 0.468318 | 254 | 1,736 | 3.090551 | 0.165354 | 0.09172 | 0.09172 | 0.11465 | 0.852229 | 0.852229 | 0.783439 | 0.70828 | 0.70828 | 0.70828 | 0 | 0.044394 | 0.234447 | 1,736 | 42 | 85 | 41.333333 | 0.546275 | 0.092742 | 0 | 0.482759 | 0 | 0 | 0.228025 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.034483 | 0 | 0.034483 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
7fdab03b2d28911fcc54b7f97e4d27d88eaf5444 | 4,262 | py | Python | bindings/python/test/units/test_derived.py | robinpdm/open-space-toolkit-physics | b53e5d4287fa6568d700cb8942c9a56d57b8d7cf | [
"Apache-2.0"
] | 7 | 2020-03-30T11:51:11.000Z | 2022-02-02T15:20:44.000Z | bindings/python/test/units/test_derived.py | robinpdm/open-space-toolkit-physics | b53e5d4287fa6568d700cb8942c9a56d57b8d7cf | [
"Apache-2.0"
] | 24 | 2018-06-25T08:06:39.000Z | 2020-01-05T20:34:02.000Z | bindings/python/test/units/test_derived.py | robinpdm/open-space-toolkit-physics | b53e5d4287fa6568d700cb8942c9a56d57b8d7cf | [
"Apache-2.0"
] | 3 | 2020-03-05T18:18:38.000Z | 2020-07-02T05:06:53.000Z | ################################################################################################################################################################
# @project Open Space Toolkit ▸ Physics
# @file bindings/python/test/units/test_derived.py
# @author Remy Derollez <remy@loftorbital.com>
# @license Apache License 2.0
################################################################################################################################################################
import pytest
import ostk.physics as physics
################################################################################################################################################################
Length = physics.units.Length
Time = physics.units.Time
Angle = physics.units.Angle
Derived = physics.units.Derived
################################################################################################################################################################
def test_units_derived_unit_constructors ():
# square_meter
derived_unit: Derived.Unit = Derived.Unit.square_meter()
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
# cubic_meter
derived_unit: Derived.Unit = Derived.Unit.cubic_meter()
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
# hertz
derived_unit: Derived.Unit = Derived.Unit.hertz()
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
# watt
derived_unit: Derived.Unit = Derived.Unit.watt()
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
# tesla
derived_unit: Derived.Unit = Derived.Unit.tesla()
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
# velocity
derived_unit: Derived.Unit = Derived.Unit.velocity(Length.Unit.Meter, Time.Unit.Second)
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
# acceleration
derived_unit: Derived.Unit = Derived.Unit.acceleration(Length.Unit.Meter, Time.Unit.Second)
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
# gravitational_parameter
derived_unit: Derived.Unit = Derived.Unit.gravitational_parameter(Length.Unit.Meter, Time.Unit.Second)
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
# angular_velocity
derived_unit: Derived.Unit = Derived.Unit.angular_velocity(Angle.Unit.Revolution, Time.Unit.Day)
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
################################################################################################################################################################
def test_units_derived_unit_undefined ():
derived_unit: Derived.Unit = Derived.Unit.undefined()
assert derived_unit is not None
assert isinstance(derived_unit, Derived.Unit)
assert derived_unit.is_defined() is False
################################################################################################################################################################
def test_units_derived_unit_comparators ():
derived_unit: Derived.Unit = Derived.Unit.square_meter()
assert derived_unit == derived_unit
assert (derived_unit != derived_unit) is False
################################################################################################################################################################
def test_units_derived_unit_is_compatible_with ():
pass
################################################################################################################################################################
def test_units_derived_unit_to_string ():
pass
################################################################################################################################################################
def test_units_derived_unit_get_symbol ():
pass
################################################################################################################################################################
| 36.42735 | 160 | 0.461755 | 349 | 4,262 | 5.426934 | 0.17765 | 0.429778 | 0.323126 | 0.394931 | 0.79831 | 0.736536 | 0.563358 | 0.441922 | 0.441922 | 0.441922 | 0 | 0.00053 | 0.114735 | 4,262 | 116 | 161 | 36.741379 | 0.501193 | 0.069451 | 0 | 0.510204 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.469388 | 1 | 0.122449 | false | 0.061224 | 0.040816 | 0 | 0.163265 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 6 |
7ffa4b171da0c392aa198ab141120868ffe1a0c9 | 133 | py | Python | core/serializers/__init__.py | NTUSA/fudez-app | 91c8d85238fb642488ef5616be441e4417f21d0a | [
"MIT"
] | 2 | 2017-04-13T08:52:19.000Z | 2018-05-07T12:14:34.000Z | core/serializers/__init__.py | NTUSA/fudez-app | 91c8d85238fb642488ef5616be441e4417f21d0a | [
"MIT"
] | null | null | null | core/serializers/__init__.py | NTUSA/fudez-app | 91c8d85238fb642488ef5616be441e4417f21d0a | [
"MIT"
] | 1 | 2018-07-28T16:09:59.000Z | 2018-07-28T16:09:59.000Z | from .expense_record import *
from .fund import *
from .requirement import *
from .review import ApproveSerializer, RejectSerializer
| 26.6 | 55 | 0.81203 | 15 | 133 | 7.133333 | 0.6 | 0.280374 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12782 | 133 | 4 | 56 | 33.25 | 0.922414 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
e9e9da16b57cadb38c1cba222d894ebcdef579ba | 42 | py | Python | indra/assemblers/index_card/__init__.py | zebulon2/indra | 7727ddcab52ad8012eb6592635bfa114e904bd48 | [
"BSD-2-Clause"
] | 136 | 2016-02-11T22:06:37.000Z | 2022-03-31T17:26:20.000Z | indra/assemblers/index_card/__init__.py | zebulon2/indra | 7727ddcab52ad8012eb6592635bfa114e904bd48 | [
"BSD-2-Clause"
] | 748 | 2016-02-03T16:27:56.000Z | 2022-03-09T14:27:54.000Z | indra/assemblers/index_card/__init__.py | zebulon2/indra | 7727ddcab52ad8012eb6592635bfa114e904bd48 | [
"BSD-2-Clause"
] | 56 | 2015-08-28T14:03:44.000Z | 2022-02-04T06:15:55.000Z | from .assembler import IndexCardAssembler
| 21 | 41 | 0.880952 | 4 | 42 | 9.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.095238 | 42 | 1 | 42 | 42 | 0.973684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
e9fb2f7d8281b504afdc3b7067d238ba29eb85c7 | 160 | py | Python | views/about.py | Javascript-void0/javascript-void0.github.io | 7816f23cc1234057ff9d55f0de9108572cb792e4 | [
"MIT"
] | null | null | null | views/about.py | Javascript-void0/javascript-void0.github.io | 7816f23cc1234057ff9d55f0de9108572cb792e4 | [
"MIT"
] | null | null | null | views/about.py | Javascript-void0/javascript-void0.github.io | 7816f23cc1234057ff9d55f0de9108572cb792e4 | [
"MIT"
] | null | null | null | from flask import Blueprint, render_template
about = Blueprint('about', __name__)
@about.route('/')
def form():
return render_template('about/about.html') | 22.857143 | 46 | 0.7375 | 20 | 160 | 5.6 | 0.65 | 0.25 | 0.339286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.11875 | 160 | 7 | 46 | 22.857143 | 0.794326 | 0 | 0 | 0 | 0 | 0 | 0.136646 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0.2 | 0.6 | 0.4 | 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 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 6 |
1835665600c71f44884e38eb228ee614443d7115 | 164 | py | Python | test_scripts/ns/msb_get_one.py | lremember/VFC | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | 1 | 2019-10-10T00:52:18.000Z | 2019-10-10T00:52:18.000Z | test_scripts/ns/msb_get_one.py | lremember/VFC-Files | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | null | null | null | test_scripts/ns/msb_get_one.py | lremember/VFC-Files | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | null | null | null | import requests
resp = requests.get('http://10.12.5.131:30280/api/nsd/v1/ns_descriptors/8acc4e46-08c1-46f3-a594-2910490930de')
print resp.status_code, resp.json()
| 32.8 | 110 | 0.780488 | 27 | 164 | 4.666667 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.23871 | 0.054878 | 164 | 4 | 111 | 41 | 0.574194 | 0 | 0 | 0 | 0 | 0.333333 | 0.533742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.333333 | null | null | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 6 |
1862428193b5c902e38d97d644dde08b6e187cd2 | 67 | py | Python | units/shapes/axis.py | doldam0/grapher | 5e82dd57be5274ab616839d10b42d2b741f2b081 | [
"MIT"
] | null | null | null | units/shapes/axis.py | doldam0/grapher | 5e82dd57be5274ab616839d10b42d2b741f2b081 | [
"MIT"
] | null | null | null | units/shapes/axis.py | doldam0/grapher | 5e82dd57be5274ab616839d10b42d2b741f2b081 | [
"MIT"
] | null | null | null | from units.shapes.shape import Shape
class Axis(Shape):
pass
| 11.166667 | 36 | 0.731343 | 10 | 67 | 4.9 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.19403 | 67 | 5 | 37 | 13.4 | 0.907407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 6 |
18731f5e2110e89d48482ca4607d8f98bd3413b6 | 30 | py | Python | URAPY/__init__.py | Warhawk947/URAPY | 043578a928afa9c3fe6b742dcea8c0f08f5a5cb8 | [
"MIT"
] | 4 | 2020-04-16T00:13:12.000Z | 2020-06-13T18:33:30.000Z | URAPY/__init__.py | Warhawk947/URAPY | 043578a928afa9c3fe6b742dcea8c0f08f5a5cb8 | [
"MIT"
] | 1 | 2020-04-16T14:55:52.000Z | 2020-04-16T14:55:58.000Z | URAPY/__init__.py | Warhawk947/URAPY | 043578a928afa9c3fe6b742dcea8c0f08f5a5cb8 | [
"MIT"
] | 1 | 2021-07-27T08:08:39.000Z | 2021-07-27T08:08:39.000Z | from URAPY.URAPY import Client | 30 | 30 | 0.866667 | 5 | 30 | 5.2 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 30 | 1 | 30 | 30 | 0.962963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.