hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
f0ce7aaaf1a3b11fc9d159b0720225ac7679497c
11,667
py
Python
convert-2d.py
dcm684/lasercut
f459a9b9d73987e1a581728a51b031fb7aaea653
[ "BSD-2-Clause" ]
null
null
null
convert-2d.py
dcm684/lasercut
f459a9b9d73987e1a581728a51b031fb7aaea653
[ "BSD-2-Clause" ]
null
null
null
convert-2d.py
dcm684/lasercut
f459a9b9d73987e1a581728a51b031fb7aaea653
[ "BSD-2-Clause" ]
null
null
null
""" Process a lasercut box to enable its production on a laser cutter, 3D printer, or other comparable device Processes a given 3D OpenSCAD scad file using the lasercut library to create a file with the sides that can be used by a laser cutter. Or if ff a value for extrusion thickness is given, the exported file would be 3D and could be used by a 3D printer The OpenSCAD executable is expected to be at the default location for the current operating system - Linux - openscad - OSX - /Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD - Windows - "Program Files\\OpenSCAD\\openscad.exe" or "Program Files(x86)\\OpenSCAD\\openscad.exe" The path to the executable can also be set via the "OPENSCAD_BIN" environmental variable or the --openscadbin option """ import os import argparse import subprocess import textwrap extensions_3d = ['.stl', '.off', '.amf', '.3mf'] extensions_2d = ['.dxf', '.svg', '.pdf'] extensions_valid = ['.scad', '.csg'] + extensions_3d + extensions_2d def exit_with_error(error_str: str) -> None: """ Print the given string before exiting the script :param error_str: String to print :return: None """ print(error_str) exit(1) def get_openscad_path() -> str: """ Tries to determine the path to the openscad binary Can determine path if OS is OSX, Windows (32-bit and 64-bit installations), and Linux. Path is based on OS. The default installation paths are checked. If the environmental value "OPENSCAD_BIN" is set that value will be used without checking if the binary exists there. :return: Expected path to openscad """ out_path = None enviro_val = os.environ.get("OPENSCAD_BIN") if enviro_val is not None: if not os.path.isfile(enviro_val): exit_with_error(f'Invalid environmental value for the path to ' f'OpenSCAD binary, OPENSCAD_BIN: "{enviro_val}"') out_path = enviro_val else: import platform python_platform = platform.platform() if "Darwin" in python_platform: # OSX out_path = "/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD" elif "Windows" in python_platform: # Windows. Determine if openSCAD is 32-bit or 64-bit prog_files_32_path = os.environ["PROGRAMFILES"] prog_files_64_path = os.environ["ProgramW6432"] prog_files_openscad = "OpenSCAD/openscad.exe" openscad_32_path = os.path.join(prog_files_32_path, prog_files_openscad) if os.path.isfile(openscad_32_path): out_path = os.path.normpath(openscad_32_path) elif prog_files_64_path is not None: openscad_64_path = os.path.join(prog_files_64_path, prog_files_openscad) if os.path.isfile(openscad_64_path): out_path = os.path.normpath(openscad_64_path) else: # Assume Linux. See if the openscad exists on the path from shutil import which if which("openscad") is not None: out_path = "openscad" return out_path def process_scad_file(in_scad_path: str, out_scad_path: str, library_path: str, extrusion_thick: float = 0) -> None: """ Process the input 3D OpenSCAD file to generate a file of each piece pieces The output of OpenSCAD needs is processed in order to make it a valid .scad file. :param in_scad_path: Path of the 3D OpenSCAD file to process :param out_scad_path: Where to put the generated OpenSCAD file :param library_path: Path to the lasercut.scad library. Value is placed directly in "include <XXX>" string :param extrusion_thick: If value is greater than 0, this is the number of mm to extrude the flattened surfaces. If value is less than or equal to 0, outputted file will be 2D. :return: None """ # A file is needed for OpenSCAD to open and run the lasercut specific # generator. It will be deleted. temp_file_base_name = os.path.splitext(os.path.basename(out_scad_path))[0] temp_file_base_name = f"temp_{temp_file_base_name}.csg" temp_csg = os.path.join(os.path.dirname(out_scad_path), temp_file_base_name) print(f'Processing "{os.path.basename(in_scad_path)}"') cmd_output = subprocess.run( f'"{openscad_path}" "{in_scad_path}" -D generate=1 -o "{temp_csg}"', capture_output=True, ) # The CSG file was only used to get the output, delete it immediately os.remove(temp_csg) if cmd_output.returncode != 0: exit_with_error(f"Failed to convert to csg file.\nError: {cmd_output.stderr}") # Process the outputted text (rendered text via stderr) output_file_contents = cmd_output.stderr.decode() output_file_contents = output_file_contents.replace("\r\n", "\n") # Strip the string 'ECHO: "[LC] ' and its closing '"' and remove warnings import re output_file_contents = re.sub(r'ECHO: "\[LC] ', "", output_file_contents) output_file_contents = re.sub(r'"\n', "\n", output_file_contents) output_file_contents = re.sub(r"WARNING.*", "", output_file_contents) output_file_contents += ";" # Add the library and some other basic commands to make a working scad file scad_header = f'use <{library_path}>;\n'\ '$fn=60;\n'\ 'module flat(){\n'\ 'projection(cut = false)\n\n' output_file_contents = scad_header + output_file_contents # Close flat() output_file_contents += "\n}\n\n" # If a thickness was given, extrude the module if extrusion_thick > 0: output_file_contents += f"linear_extrude(height={extrusion_thick})\n" output_file_contents += "flat();\n" # Write the output file with open(out_scad_path, "w") as outfile: outfile.write(output_file_contents) # Start the actual script parser = argparse.ArgumentParser("Convert a 3D OpenSCAD lasercut box to a 2D OpenSCAD file for ready for cutting") parser.add_argument('source', type=str, help='Path to the 3D OpenSCAD to convert. Must be a scad or csg file') parser.add_argument('output', nargs='?', type=str, help='Path to output file. File extension determines type. ' 'Valid types are scad, svg, dxf, stl, and any other export types supported by OpenSCAD.' 'If an invalid file type is given, a scad file will be created at the given location.' 'If no path is given, the output file will be put in the same folder as the source with' 'a "2D" suffix/') parser.add_argument('--extrude', '-x', type=float, default=0, help='If 3D printing or using another system that needs thickness, this is the number of mm' 'to extrude the outputted shapes. If 0 or less this will be ignored. Output file type ' f'cannot be 2D ({", ".join(extensions_2d)}) when this is set.') parser.add_argument('--keep', '-k', action='store_true', help='Keep the intermediate scad file if output type is not already scad') parser.add_argument('--library', '-l', default='lasercut/lasercut.scad', help='Path to the lasercut.scad library. Value is place in the include <XXX> string.') parser.add_argument('--openscadbin', '-b', type=str, help='Use the OpenSCAD executable at the given path instead of the default path for the OS') args = parser.parse_args() # Verify that the given file exists, and that it is a valid source file source_abs_path = os.path.normcase(os.path.abspath(args.source)) if not os.path.isfile(source_abs_path): exit_with_error(f"Invalid source file: {args.source}") else: not_ext, ext = os.path.splitext(source_abs_path) if ext != '.scad': exit_with_error('Source file must be a "scad" file') # Get the path to openSCAD if args.openscadbin is not None: openscad_path = args.openscadbin if not os.path.isfile(openscad_path): exit_with_error(f'Could not find the OpenSCAD binary at the given path, "{openscad_path}"') else: openscad_path = get_openscad_path() if openscad_path is None: exit_with_error("Could not find the openscad executable") # Generate an output file name based on the source file in case none is given source_basename = os.path.basename(source_abs_path) source_base_no_ext = os.path.splitext(source_basename)[0] output_file_base = f"{source_base_no_ext}_flattened" # Create an output path is none was given processed_scad_path = None output_abs_path = None generate_non_scad_file = False output_extension = None if args.output is None: # Default to a scad file in the same directory as the source source_folder = os.path.dirname(source_abs_path) processed_scad_path = os.path.join(source_folder, f"{output_file_base}.scad") else: output_dir = os.path.abspath(os.path.dirname(args.output)) if not os.path.isdir(output_dir) \ and not os.path.isdir(args.output): # An invalid output directory was given exit_with_error(f"Output directory does not exist: {output_dir}") if os.path.isdir(args.output): # The given output is only a directory, generate the output file name from the source processed_scad_path = os.path.join(args.output, f"{output_file_base}.scad") else: output_abs_path = os.path.normcase(os.path.abspath(args.output)) output_no_ext, output_extension = os.path.splitext(output_abs_path) if output_extension not in extensions_valid: # If an invalid extension is given, default to scad output_extension = '.scad' elif args.extrude > 1 and output_extension in extensions_2d: # Cannot export to a 2D format when the contents are 3D (extruded) exit_with_error(f'Cannot export to a 2D format, "{output_extension}", ' f'when extrude, "{args.extrude}", is greater than 0') generate_non_scad_file = output_extension != '.scad' processed_scad_path = output_no_ext + '.scad' processed_scad_path = os.path.normcase(processed_scad_path) output_abs_path = os.path.normcase(output_abs_path) # Keep the intermediate file if it already exists or the user wanted it kept keep_intermediate_file = args.keep or os.path.isfile(processed_scad_path) # The source file must be different than the intermediate SCAD file and the output file # If the output file is a SCAD file it will already be equal to processed_scad_path if source_abs_path == processed_scad_path: exit_with_error("Source path and processed SCAD path are the same. Please change your output file name.") # Process the input openscad file process_scad_file(source_abs_path, processed_scad_path, library_path=args.library, extrusion_thick=args.extrude) # Render the file as the desired file type if generate_non_scad_file: print(f"Rendering and exporting as {output_extension}") output = subprocess.run( f'"{openscad_path}" "{processed_scad_path}" -o "{output_abs_path}"', capture_output=True, ) if output.returncode != 0: exit_with_error(f"Failed to convert to {output_extension}:\n{output.stderr}") # Delete the intermediate, processed scad file if not requested otherwise if not keep_intermediate_file: os.remove(processed_scad_path)
40.651568
116
0.676609
65796cc6b298ba51086fbbf338e8c60d7dfda17a
1,399
py
Python
awards/models.py
hugglesfox/bsc-awards
79ed77f9d97e5daccf31d83d850d6791ce3b86ed
[ "MIT" ]
null
null
null
awards/models.py
hugglesfox/bsc-awards
79ed77f9d97e5daccf31d83d850d6791ce3b86ed
[ "MIT" ]
44
2019-12-18T20:04:47.000Z
2020-11-13T01:15:45.000Z
awards/models.py
hugglesfox/bsc-awards
79ed77f9d97e5daccf31d83d850d6791ce3b86ed
[ "MIT" ]
null
null
null
from awards import db class AwardRecipients(db.Model): id = db.Column(db.Integer, primary_key=True) student_id = db.Column(db.String(7), nullable=False) award_id = db.Column(db.Integer, nullable=False) class Student(db.Model): student_id = db.Column(db.String(7), primary_key=True) first_name = db.Column(db.String(120)) last_name = db.Column(db.String(120)) preferred_name = db.Column(db.String(120)) year_level = db.Column(db.Integer) form_group = db.Column(db.String(3)) house = db.Column(db.String(120)) gender = db.Column(db.String(120)) address = db.Column(db.String(120)) suburb = db.Column(db.String(120)) postcode = db.Column(db.String(4)) primary_parent = db.Column(db.String(120)) attending = db.Column(db.Boolean, nullable=False) class Awards(db.Model): award_id = db.Column(db.Integer, primary_key=True) award_name = db.Column(db.String(120)) award_description = db.Column(db.String(120)) award_certificate_title = db.Column(db.String(120)) award_certificate_title_1 = db.Column(db.String(120)) award_certificate_title_2 = db.Column(db.String(120)) award_certificate_title_3 = db.Column(db.String(120)) award_certificate_sub_title = db.Column(db.String(120)) special_award = db.Column(db.Boolean) number_of_awards = db.Column(db.Integer) prize = db.Column(db.String(120))
36.815789
59
0.706934
b257084c63b859febe789175f9c7609cf1f01ae4
8,010
py
Python
openpharmacophore/algorithms/dbscan.py
uibcdf/openpharmacophore
4f563fa206f6e7c081502acab97bb795d27bdeb9
[ "MIT" ]
14
2021-11-12T10:09:25.000Z
2022-03-18T08:24:16.000Z
openpharmacophore/algorithms/dbscan.py
uibcdf/openpharmacophore
4f563fa206f6e7c081502acab97bb795d27bdeb9
[ "MIT" ]
7
2021-11-05T01:37:57.000Z
2022-01-18T06:03:39.000Z
openpharmacophore/algorithms/dbscan.py
uibcdf/openpharmacophore
4f563fa206f6e7c081502acab97bb795d27bdeb9
[ "MIT" ]
3
2021-11-05T01:22:47.000Z
2021-12-12T03:57:09.000Z
from openpharmacophore import PharmacophoricPoint from openpharmacophore.utils.align_ligands import align_set_of_ligands from openpharmacophore.pharmacophore.chemical_features import PharmacophoricPointExtractor import numpy as np from sklearn.cluster import DBSCAN from rdkit import Chem, RDConfig from rdkit.Chem import ChemicalFeatures import pyunitwizard as puw import os from typing import Optional, Sequence def rdkit_to_point(feat_name: str, coords: np.ndarray, radius: float, direction: Optional[Sequence] = None, atom_indices: Optional[Sequence] = None) -> PharmacophoricPoint: """ Transform an rdkit feature point to an openpharmacophore pharmacophoric point. Parameters ---------- feat_name : str rdkit name of the feature point. coords : numpy.ndarray; shape: (3, ) 3D coordinates of the centroid of the feature. radius : float Lenght of the radius of the parmacohporic points. direction : list, tuple, numpy.ndarray; shape:(3,) Unit vector. Returns ------- openpharmacophore.PharmacophoricPoint The pharmacophoric point. """ points = { "Acceptor": "hb acceptor", "Donor": "hb donor", "Aromatic": "aromatic ring", "Hydrophobe": "hydrophobicity", "PosIonizable": "positive charge", "NegIonizable": "negative charge", } return PharmacophoricPoint( feat_type=points[feat_name], center=puw.quantity(coords, "angstroms"), radius=puw.quantity(radius, "angstroms"), direction=direction, atom_indices=atom_indices ) def get_feature_clusters(feat_coords, eps, min_samples): """ Get clusters of features for a ligand based pharmacophore. Parameters ---------- feat_coords : dict Dictionary containing 3D coordinates for each feature type. Dictionary keys are feature name and values are an numpy array of coordinates eps : float The maximum distance between two pharmacophoric points for one to be considered as in the neighborhood of the other. (Default: 2) min_samples : float Percentages of ligands that must contain a pharmacophoric point to be considered as a core point. Must be a number between 0 and 1 Returns ---------- clusters : dict Dictionary with centroid of each cluster of features. Keys are feature name and values is a list of coordinates """ clusters = {} for feat, coords in feat_coords.items(): db_scan = DBSCAN(eps=eps, min_samples=min_samples).fit(coords) labels = db_scan.labels_ core_samples_mask = np.zeros_like(labels, dtype=bool) core_samples_mask[db_scan.core_sample_indices_] = True centroids = [] unique_labels = set(labels) for k in unique_labels: if k == -1: continue class_member_mask = (labels == k) cluster = feat_coords[feat][class_member_mask & core_samples_mask] cluster_centroid = cluster.mean(axis=0) centroids.append(cluster_centroid) clusters[feat] = centroids return clusters def dbscan_pharmacophore(ligands, radius=1, eps=2, min_samples=0.75, feat_list=None, feat_def=None): """ Compute a ligand based pharmacophore from a list of ligands, using a density based clustering algorithm. Parameters ---------- ligands : list of rdkit.Chem.rdchem.Mol or rdkit.Chem.SmilesMolSupplier or rdkit.Chem.SDMolSupplier List of ligands. radius : float, optional Lenght of the radius in angstroms of the parmacohporic points (Default: 1) eps : float, optional The maximum distance between two pharmacophoric points for one to be considered as in the neighborhood of the other (default=2). min_samples : float Percentages of ligands that must contain a pharmacophoric point to be considered as a core point. Must be anumber betwwen 0 and 1 (default=0.75). feat_list : list of str, optional List of features that will be used to compute the pharmacophore. feat_def : dict Definitions of the pharmacophoric points. Dictionary which keys are SMARTS strings and values are feature names. Returns -------- pharmacophoric_points : list of openpharmacophore.PharmacophoricPoints The pharmacophoric points of the common pharmacophore. aligned_ligands: list of rdkit.Chem.Mol A list containing the aligned ligands. """ if min_samples < 0 or min_samples > 1: raise ValueError("min_samples must be a value between 0 and 1") aligned_ligands, _ = align_set_of_ligands(ligands) if feat_def is None: # If no feature definition is given use rdkit one fdefName = os.path.join(RDConfig.RDDataDir,'BaseFeatures.fdef') factory = ChemicalFeatures.BuildFeatureFactory(fdefName) else: reverse_feat_dict = {} for smarts, feat_name in feat_def.items(): if feat_name not in reverse_feat_dict: reverse_feat_dict[feat_name] = [] reverse_feat_dict[feat_name].append(smarts) if not feat_list: feat_list = ['Acceptor', 'Aromatic', 'Donor', 'Hydrophobe', 'PosIonizable', 'NegIonizable'] feat_coords = {} for feature in feat_list: feat_coords[feature] = [] for ligand in aligned_ligands: if feat_def is None: feats = factory.GetFeaturesForMol(ligand, includeOnly=feature) for f in feats: atom_idxs = f.GetAtomIds() if len(atom_idxs) > 1: # Aromatic, hydrophobic, positive or negative feature coords = PharmacophoricPointExtractor._feature_centroid(ligand, atom_idxs, 0) else: # Donor or acceptor feature position = ligand.GetConformer(0).GetAtomPosition(atom_idxs[0]) coords = np.zeros((3,)) coords[0] = position.x coords[1] = position.y coords[2] = position.z feat_coords[feature].append((coords.tolist())) else: for f in reverse_feat_dict[feature]: pattern = Chem.MolFromSmarts(f) atom_idxs = ligand.GetSubstructMatch(pattern) if len(atom_idxs) == 0: continue elif len(atom_idxs) == 1: # Donor or acceptor feature position = ligand.GetConformer(0).GetAtomPosition(atom_idxs[0]) coords = np.zeros((3,)) coords[0] = position.x coords[1] = position.y coords[2] = position.z elif len(atom_idxs) > 1: # Aromatic, hydrophobic, positive or negative feature coords = PharmacophoricPointExtractor._feature_centroid(ligand, atom_idxs, 0) feat_coords[feature].append((coords.tolist())) feat_coords[feature] = np.array(feat_coords[feature]) feat_coords = {feature: coords for feature, coords in feat_coords.items() if len(coords) > 0} # remove features with no coordinates min_samples = int(min_samples * len(ligands)) feature_clusters = get_feature_clusters(feat_coords, eps=eps, min_samples=min_samples) pharmacophoric_points = [] for feature_type, coords in feature_clusters.items(): for center in coords: point = rdkit_to_point(feature_type, center, radius=radius, direction=None) pharmacophoric_points.append(point) return pharmacophoric_points, aligned_ligands
38.695652
135
0.626966
a2738315e8ec1fcb3ac5c01332236e67b6fb20d5
1,398
py
Python
CreatAllFile.py
FAWC-bupt/Text-Classification
a68b639917d65778ec05ac41f0e8d2b3ac49c9fc
[ "MIT" ]
4
2021-01-09T01:33:45.000Z
2021-11-11T14:03:52.000Z
CreatAllFile.py
FAWC-bupt/Text-Classification
a68b639917d65778ec05ac41f0e8d2b3ac49c9fc
[ "MIT" ]
null
null
null
CreatAllFile.py
FAWC-bupt/Text-Classification
a68b639917d65778ec05ac41f0e8d2b3ac49c9fc
[ "MIT" ]
1
2021-07-06T06:26:12.000Z
2021-07-06T06:26:12.000Z
""" 预处理部分3: 整合数据至一个文件all.txt,避免重复IO """ class_list = {'财经': 'Economics', '房产': 'House', '社会': 'Society', '时尚': 'Fashion', '教育': 'Education', '科技': 'Technology', '时政': 'Politics', '体育': 'PE', '游戏': 'Game', '娱乐': 'Entertainment'} if __name__ == '__main__': all_data_test = '' all_data_train = '' for class_name, class_name_en in class_list.items(): string_to_write_test = '' string_to_write_train = '' for i in range(5000): print(class_name + ':' + str(i)) with open('data_test/' + class_name_en + '/' + str(i) + '.txt', 'r', encoding='utf-8') as f: string_to_write_test += (f.read() + '\n') with open('data_train/' + class_name_en + '/' + str(i) + '.txt', 'r', encoding='utf-8') as f: string_to_write_train += (f.read() + '\n') with open('data_test/' + class_name_en + '/all.txt', 'w', encoding='utf-8') as f: f.write(string_to_write_test) with open('data_train/' + class_name_en + '/all.txt', 'w', encoding='utf-8') as f: f.write(string_to_write_train) all_data_test += string_to_write_test all_data_train += string_to_write_train with open('data_test/all.txt', 'w', encoding='utf-8') as f: f.write(all_data_test) with open('data_train/all.txt', 'w', encoding='utf-8') as f: f.write(all_data_train)
46.6
105
0.570815
665f487866570e0755261286e3f1a5e8c8c9dd74
2,145
py
Python
src/oci/database_migration/models/job_collection.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database_migration/models/job_collection.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database_migration/models/job_collection.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class JobCollection(object): """ Note: Deprecated. Use the new resource model APIs instead. Results of a Job search. Contains JobSummary items. """ def __init__(self, **kwargs): """ Initializes a new JobCollection object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): :param items: The value to assign to the items property of this JobCollection. :type items: list[oci.database_migration.models.JobSummary] """ self.swagger_types = { 'items': 'list[JobSummary]' } self.attribute_map = { 'items': 'items' } self._items = None @property def items(self): """ **[Required]** Gets the items of this JobCollection. Items in collection. :return: The items of this JobCollection. :rtype: list[oci.database_migration.models.JobSummary] """ return self._items @items.setter def items(self, items): """ Sets the items of this JobCollection. Items in collection. :param items: The items of this JobCollection. :type: list[oci.database_migration.models.JobSummary] """ self._items = items def __repr__(self): return formatted_flat_dict(self) def __eq__(self, other): if other is None: return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not self == other
29.791667
245
0.652214
61ebbf8ddcb935be275478fa30e98fcc965eccce
1,393
py
Python
Fw/Python/src/fprime/common/models/serialize/i32_type.py
hunterpaulson/fprime
70560897b56dc3037dc966c99751b708b1cc8a05
[ "Apache-2.0" ]
null
null
null
Fw/Python/src/fprime/common/models/serialize/i32_type.py
hunterpaulson/fprime
70560897b56dc3037dc966c99751b708b1cc8a05
[ "Apache-2.0" ]
5
2020-07-13T16:56:33.000Z
2020-07-23T20:38:13.000Z
Fw/Python/src/fprime/common/models/serialize/i32_type.py
hunterpaulson/lgtm-fprime
9eeda383c263ecba8da8188a45e1d020107ff323
[ "Apache-2.0" ]
null
null
null
""" Created on Dec 18, 2014 @author: tcanham, reder """ from __future__ import print_function from __future__ import absolute_import import struct from .type_exceptions import TypeMismatchException from .type_exceptions import TypeRangeException from . import type_base @type_base.serialize @type_base.deserialize class I32Type(type_base.BaseType): """ Representation of the I32 type """ def __init__(self, val=None): """ Constructor """ self.__val = val if val == None: return self._check_val(val) def _check_val(self, val): if not type(val) == type(int()): raise TypeMismatchException(type(int()), type(val)) # check range if (val < -pow(2, 31)) or (val > pow(2, 31) - 1): raise TypeRangeException(val) @property def val(self): return self.__val @val.setter def val(self, val): self._check_val(val) self.__val = val def serialize(self): """ Utilize serialize decorator here... """ return self._serialize(">i") def deserialize(self, data, offset): """ Utilize deserialized decorator here... """ self._deserialize(">i", data, offset) def getSize(self): return struct.calcsize(">i") def __repr__(self): return "I32"
21.106061
63
0.595118
88bff4ab4116f7f16f58ca5b7a1a0b65afbf3f16
787
py
Python
stack.py
FAWC-bupt/Virtual-Machine-of-Instruction-Set-Architecture
478d3a95150c358b41012948577db6fe3ac8483b
[ "MIT" ]
3
2020-05-11T12:20:18.000Z
2020-11-14T12:31:42.000Z
stack.py
FAWC-bupt/Virtual-Machine-of-Instruction-Set-Architecture
478d3a95150c358b41012948577db6fe3ac8483b
[ "MIT" ]
null
null
null
stack.py
FAWC-bupt/Virtual-Machine-of-Instruction-Set-Architecture
478d3a95150c358b41012948577db6fe3ac8483b
[ "MIT" ]
1
2020-08-10T23:09:59.000Z
2020-08-10T23:09:59.000Z
from register import Register, ARegister, DRegister from memory import Memory def push(regA: Register, RSP: Register, AR: ARegister, DR: DRegister, memory: Memory): """ 将指定寄存器的值压入栈中 :param regA: :param RSP: :param AR: :param DR: :param memory: :return: """ RSP.data = RSP.data - 1 RSP.readData() AR.writeData() regA.readData() DR.writeData() memory.writeData(AR, DR) def pop(regA: Register, RSP: Register, AR: ARegister, DR: DRegister, memory: Memory): """ 将栈顶值弹出到指定寄存器 :param regA: :param RSP: :param AR: :param DR: :param memory: :return: """ RSP.readData() AR.writeData() memory.readData(AR, DR) DR.readData() regA.writeData() RSP.data = RSP.data + 1
17.886364
86
0.597205
d2f0874a452bb381303c5f55aaf2e223d2044a0b
266
py
Python
algorithms/sem_prop/inputoutput/utils.py
Soton-Song/valentine
9a47859f912540cdbe961ed3585201d3accd07be
[ "Apache-2.0" ]
null
null
null
algorithms/sem_prop/inputoutput/utils.py
Soton-Song/valentine
9a47859f912540cdbe961ed3585201d3accd07be
[ "Apache-2.0" ]
null
null
null
algorithms/sem_prop/inputoutput/utils.py
Soton-Song/valentine
9a47859f912540cdbe961ed3585201d3accd07be
[ "Apache-2.0" ]
null
null
null
from pickle import load, dump def serialize_object(obj, path): f = open(path, 'wb') dump(obj, f) f.close() def deserialize_object(path): f = open(path, 'rb') obj = load(f) return obj if __name__ == "__main__": print("Input output")
14.777778
32
0.609023
fc075483ab298eff09e12415d810be7d89e4ed28
991
py
Python
main.py
Adeon18/Solver_Algorithms
54acc53d92e1234fd14dd303f5c59f818ab91f95
[ "MIT" ]
4
2021-05-27T10:42:12.000Z
2022-03-23T12:51:43.000Z
main.py
Adeon18/Solver_Algorithms
54acc53d92e1234fd14dd303f5c59f818ab91f95
[ "MIT" ]
null
null
null
main.py
Adeon18/Solver_Algorithms
54acc53d92e1234fd14dd303f5c59f818ab91f95
[ "MIT" ]
null
null
null
import os from sys import platform # Check for user system linux = False bad_os = False if platform == "linux" or platform == "linux2": linux = True elif platform == "win32": bad_os = True scripts = { 1: "maze/main.py", 2: "sudoku/main.py", 3: "crossword/main.py", 4: "graph_colorizer/main.py", } print("Hello! This is a script launcher. Choose a number of the script you'd like to run.") print("Before you choose, close down the program and edit the coresponding file in data folder if you want to solve your problem\n") print("\ 1. Maze solver\n\ 2. Sudoku solver\n\ 3. Crossword solver\n\ 4. Graph Colorer\n") while True: try: choice = int(input("Enter a number: ")) command = scripts[choice] break except KeyError: print("Enter a correct number") except ValueError: print("Enter a NUMBER") if bad_os: os.system("python -m " + command) elif linux: os.system("python " + command)
22.022222
132
0.638749
b42a0bdc611a714864e8f985dd4878727a423a0e
1,884
py
Python
homeassistant/components/remote/reproduce_state.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
1
2021-03-23T07:20:03.000Z
2021-03-23T07:20:03.000Z
homeassistant/components/remote/reproduce_state.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
60
2020-07-06T15:10:30.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/remote/reproduce_state.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
4
2017-01-10T04:17:33.000Z
2021-09-02T16:37:24.000Z
"""Reproduce an Remote state.""" from __future__ import annotations import asyncio import logging from typing import Any, Iterable from homeassistant.const import ( ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON, STATE_OFF, STATE_ON, ) from homeassistant.core import Context, State from homeassistant.helpers.typing import HomeAssistantType from . import DOMAIN _LOGGER = logging.getLogger(__name__) VALID_STATES = {STATE_ON, STATE_OFF} async def _async_reproduce_state( hass: HomeAssistantType, state: State, *, context: Context | None = None, reproduce_options: dict[str, Any] | None = None, ) -> None: """Reproduce a single state.""" cur_state = hass.states.get(state.entity_id) if cur_state is None: _LOGGER.warning("Unable to find entity %s", state.entity_id) return if state.state not in VALID_STATES: _LOGGER.warning( "Invalid state specified for %s: %s", state.entity_id, state.state ) return # Return if we are already at the right state. if cur_state.state == state.state: return service_data = {ATTR_ENTITY_ID: state.entity_id} if state.state == STATE_ON: service = SERVICE_TURN_ON elif state.state == STATE_OFF: service = SERVICE_TURN_OFF await hass.services.async_call( DOMAIN, service, service_data, context=context, blocking=True ) async def async_reproduce_states( hass: HomeAssistantType, states: Iterable[State], *, context: Context | None = None, reproduce_options: dict[str, Any] | None = None, ) -> None: """Reproduce Remote states.""" await asyncio.gather( *( _async_reproduce_state( hass, state, context=context, reproduce_options=reproduce_options ) for state in states ) )
24.467532
81
0.663482
5e33cd996cf412f56f927a2b5fd7e324adff3a74
714
py
Python
src/python/rule.py
karmaresearch/glog-python
fdeb7f2941686ffe0692b365175452c861bfce1f
[ "Apache-2.0" ]
1
2021-09-09T05:43:35.000Z
2021-09-09T05:43:35.000Z
src/python/rule.py
karmaresearch/glog-python
fdeb7f2941686ffe0692b365175452c861bfce1f
[ "Apache-2.0" ]
null
null
null
src/python/rule.py
karmaresearch/glog-python
fdeb7f2941686ffe0692b365175452c861bfce1f
[ "Apache-2.0" ]
null
null
null
import copy class Rule: def __init__(self, head_atoms, body_atoms): self.head_atoms = head_atoms self.body_atoms = body_atoms def str(self): out = '' for head_atom in self.head_atoms: out += head_atom.str() + ',' out = out[:-1] + ' :- ' for body_atom in self.body_atoms: out += body_atom.str() + ',' out = out[:-1] return out def get_head(self): return copy.deepcopy(self.head_atoms) def get_body(self): return copy.deepcopy(self.body_atoms) def set_head(self, head_atoms): self.head_atoms = head_atoms def set_body(self, body_atoms): self.body_atoms = body_atoms
24.62069
47
0.582633
3f1ed78b2cb6d12f6331b7b95b62fe942cfbef92
315
py
Python
packages/merlin/protocols/AssetCategory.py
pyre/pyre
0f903836f52450bf81216c5dfdfdfebb16090177
[ "BSD-3-Clause" ]
25
2018-04-23T01:45:39.000Z
2021-12-10T06:01:23.000Z
packages/merlin/protocols/AssetCategory.py
pyre/pyre
0f903836f52450bf81216c5dfdfdfebb16090177
[ "BSD-3-Clause" ]
53
2018-05-31T04:55:00.000Z
2021-10-07T21:41:32.000Z
packages/merlin/protocols/AssetCategory.py
pyre/pyre
0f903836f52450bf81216c5dfdfdfebb16090177
[ "BSD-3-Clause" ]
12
2018-04-23T22:50:40.000Z
2022-02-20T17:27:23.000Z
# -*- coding: utf-8 -*- # # michael a.g. aïvázis <michael.aivazis@para-sim.com> # (c) 1998-2021 all rights reserved # support import merlin # class declaration class AssetCategory(merlin.protocol, family="merlin.assets.categories"): """ Protocol for all project asset categories """ # end of file
16.578947
72
0.685714
4c014910822c141a255df77316b0bda4178ba58b
34,780
py
Python
ztfquery/query.py
MichaelMedford/ztfquery
9e3634d93338e4c753effa278d57de9142e3b791
[ "Apache-2.0" ]
null
null
null
ztfquery/query.py
MichaelMedford/ztfquery
9e3634d93338e4c753effa278d57de9142e3b791
[ "Apache-2.0" ]
null
null
null
ztfquery/query.py
MichaelMedford/ztfquery
9e3634d93338e4c753effa278d57de9142e3b791
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # """ Combine MetaSearch and MetaURL to get data from IRSA """ import os import numpy as np from .metasearch import download_metadata, _test_kind_ from . import buildurl import warnings # This enables multiprocess downloading from . import io # Combining metadata with buildurl def metatable_to_url(metatable, datakind='sci', suffix=None, source=None): """generic method to build the url/fullpath or the requested data. This method is based on the `builurl.py` module of ztfquery. Parameters ---------- suffix: [string] -optional- What kind of data do you want? Here is the list of available options depending the image kind: # Science image (kind="sci"): - sciimg.fits (primary science image) # (default) - mskimg.fits (bit-mask image) - psfcat.fits (PSF-fit photometry catalog) - sexcat.fits (nested-aperture photometry catalog) - sciimgdao.psf (spatially varying PSF estimate in DAOPhot's lookup table format) - sciimgdaopsfcent.fits (PSF estimate at science image center as a FITS image) - sciimlog.txt (log output from instrumental calibration pipeline) - scimrefdiffimg.fits.fz (difference image: science minus reference; fpack-compressed) - diffimgpsf.fits (PSF estimate for difference image as a FITS image) - diffimlog.txt (log output from image subtraction and extraction pipeline) - log.txt (overall system summary log from realtime pipeline) # Reference image (kind="ref"): -log.txt -refcov.fits -refimg.fits # (default) -refimlog.txt -refpsfcat.fits -refsexcat.fits -refunc.fits # Raw images (kind="raw") No Choice so suffix is ignored for raw data # Calibration (kind="cal") - None (#default) returns `caltype`.fits - log: returns `caltype`log.txt - unc: returns `caltype`unc.fits // if queried metadata is for kind calibration """ if datakind in ['sci', "raw"]: filtercode,imgtypecode = np.asarray(metatable[["filtercode","imgtypecode"] ].values.T, dtype="str") paddedfield = np.asarray(["%06d"%f for f in metatable["field"].values], dtype="str") paddedccdid = np.asarray(["%02d"%f for f in metatable["ccdid"].values], dtype="str") year, month, day, fracday = np.asarray([[l[:4],l[4:6],l[6:8],l[8:]] for l in np.asarray(metatable["filefracday"].values, dtype="str") ]).T if datakind in ['sci']: qid = np.asarray(metatable["qid"], dtype="str") # LIST of URL to download [SCIENCE] return [buildurl.science_path(year_, month_, day_, fracday_, paddedfield_, filtercode_, paddedccdid_, qid_, imgtypecode=imgtypecode_, suffix=suffix, source=source) for year_, month_, day_, fracday_, paddedfield_, filtercode_, paddedccdid_, qid_, imgtypecode_ in zip(year, month, day, fracday, paddedfield, filtercode, paddedccdid, qid, imgtypecode)] else: # LIST of URL to download [RAW] return [buildurl.raw_path(year_, month_, day_, fracday_, paddedfield_ if imgtypecode_ != "f" else '000000', # because sometime they do have a field, why is that ?, filtercode_, paddedccdid_, imgtypecode=imgtypecode_, source=source) for year_, month_, day_, fracday_, paddedfield_, filtercode_, paddedccdid_, imgtypecode_ in zip(year, month, day, fracday, paddedfield, filtercode, paddedccdid, imgtypecode)] # CALIBRATION elif datakind in ['cal']: year, month, day = np.asarray([[l[:4],l[4:6],l[6:]] for l in np.asarray(metatable["nightdate"].values, dtype="str") ]).T paddedccdid = np.asarray(["%02d"%f for f in metatable["ccdid"].values], dtype="str") filtercode, qid,caltype = np.asarray(metatable[["filtercode", "qid","caltype"]].values.T, dtype="str") filtercode[filtercode=="0"] = "00" # such that it is what IRSA expects. # list of url to download [CAL] return [buildurl.calibration_path(caltype_, year_, month_, day_, filtercode_, paddedccdid_, qid_, suffix=suffix, source=source) for caltype_, year_, month_, day_, filtercode_, paddedccdid_, qid_ in zip(caltype,year, month, day,filtercode, paddedccdid, qid) ] # PIXELS elif datakind in ['ref']: paddedfield = np.asarray(["%06d"%f for f in metatable["field"].values], dtype="str") paddedccdid = np.asarray(["%02d"%f for f in metatable["ccdid"].values], dtype="str") filtercode, qid = np.asarray(metatable[["filtercode", "qid"]].values.T, dtype="str") return [buildurl.reference_path( paddedfield_, filtercode_, paddedccdid_, qid_, suffix=suffix, fieldprefix=paddedfield_[:3], # This is how it is defined in IRSA source=source) for paddedfield_, filtercode_, paddedccdid_, qid_ in zip(paddedfield, filtercode, paddedccdid, qid)] ############################# # # # Main Query Tools # # # ############################# class _ZTFTableHandler_( object ): """ """ # -------------- # # FIELDS # # -------------- # def get_observed_fields(self, grid="both"): """ get the (unique) list of field observed type. """ if "field" not in self._data.columns: return None all_fields = np.unique(self._data["field"]) if grid is None or grid in ["both"]: return all_fields from .fields import fields_in_main if grid in ["main", "first", "primary"]: return all_fields[fields_in_main(all_fields)] elif grid in ["other", "secondary"]: return all_fields[~fields_in_main(all_fields)] else: raise ValueError("Cannot parse the given grid %s"%grid) def get_field_average_value(self, value, grid="both", fid=[1,2,3]): """ """ flagfield = True if fid is None or "fid" not in self._data.columns else np.in1d(np.asarray(self._data["fid"], dtype="int"), fid) return {f_: np.nanmean(self._data[np.in1d(self._data["field"], f_) * flagfield][value]) for f_ in self.get_observed_fields(grid=grid)} def get_field_obsdensity(self, grid="both", fid=[1,2,3]): """ """ flagfield = True if fid is None or "fid" not in self._data.columns \ else np.in1d(np.asarray(self._data["fid"], dtype="int"), fid) return {f_: len(self._data[np.in1d(self._data["field"], f_) * flagfield]) for f_ in self.get_observed_fields(grid=grid)} def show_fields(self, field_val, ax=None, show_ztf_fields=True, colorbar=True, cax=None, clabel=" ", cmap="viridis",origin=180, vmin=None, vmax=None, **kwargs): """ Parameters ---------- colored_by: """ from .fields import show_fields return show_fields(field_val, ax=ax, show_ztf_fields=show_ztf_fields, colorbar=colorbar, cax=cax, clabel=clabel, cmap=cmap,origin=origin, vmin=vmin, vmax=vmax, **kwargs) def show_gri_fields(self, title=" ", show_ztf_fields=True, colorbar=True, colored_by="visits", grid="main", **kwargs): """ """ import matplotlib.pyplot as mpl from .fields import FIELDS_COLOR fig = mpl.figure(figsize=[9,6]) fig.suptitle(title, fontsize="large") # G axg = fig.add_axes([0.03,0.52,0.43,0.48], projection="hammer") caxg = fig.add_axes([0.03,0.54,0.43,0.015]) axg.tick_params(labelsize="x-small", labelcolor="0.3" ) # R axr = fig.add_axes([0.54,0.52,0.43,0.48], projection="hammer") caxr = fig.add_axes([0.54,0.54,0.43,0.015]) axr.tick_params(labelsize="x-small", labelcolor="0.3") # I axi = fig.add_axes([0.27,0.04,0.43,0.48], projection="hammer") caxi = fig.add_axes([0.27,0.05,0.43,0.015]) axi.tick_params(labelsize="x-small", labelcolor="0.3", ) # python 3 # prop = {**dict(colorbar=colorbar, edgecolor="0.5", linewidth=0.5),**kwargs} # python 2 still supported prop = dict(colorbar=colorbar, edgecolor="0.5", linewidth=0.5) for k,v in kwargs.items(): prop[k] = v for i,ax_,cax_ in zip([1,2,3], [axg,axr,axi], [caxg,caxr,caxi]): if colored_by in ["visits", "density"]: field_val = {f:v for f,v in self.get_field_obsdensity(grid=grid, fid=[i]).items() if v>0} else: field_val = colored_by[i] self.show_fields(field_val, ax=ax_, cax=cax_, cmap=FIELDS_COLOR[i], **prop) return fig # =================== # # # # =================== # @property def _data(self): """ """ return self.metatable if hasattr(self, "metatable") else self.data class _ZTFDownloader_( object ): """ Virtual class that enable to download consistently ZTF data. To use it, you need to inherite this and implement get_data_path() such that this method returns fullpath to the data given `suffix` and `source` arguments. """ def get_data_path(self, suffix=None, source=""): """ generic method to build the url/fullpath or the requested data. This method is based on the `builurl.py` module of ztfquery. **This is a virtual empty function ; inheriting class must implemented This** """ raise NotImplementedError("the get_data_path() method must be implemented. ") # Generic that should automatically work as long as get_data_path is defined. def download_data(self, suffix=None, source="IRSA", indexes=None, download_dir=None, show_progress = True, notebook=False, verbose=True, nodl = False, overwrite=False, nprocess=None, auth=None, **kwargs): """ Parameters ---------- suffix: [string] -optional- What kind of data do you want? Here is the list of available options depending on you image kind: # Science image (kind="sci"): - sciimg.fits (primary science image) # (default) - mskimg.fits (bit-mask image) - psfcat.fits (PSF-fit photometry catalog) - sexcat.fits (nested-aperture photometry catalog) - sciimgdao.psf (spatially varying PSF estimate in DAOPhot's lookup table format) - sciimgdaopsfcent.fits (PSF estimate at science image center as a FITS image) - sciimlog.txt (log output from instrumental calibration pipeline) - scimrefdiffimg.fits.fz (difference image: science minus reference; fpack-compressed) - diffimgpsf.fits (PSF estimate for difference image as a FITS image) - diffimlog.txt (log output from image subtraction and extraction pipeline) - log.txt (overall system summary log from realtime pipeline) # Reference image (kind="ref"): -log.txt -refcov.fits -refimg.fits # (default) -refimlog.txt -refpsfcat.fits -refsexcat.fits -refunc.fits # Raw images (kind="raw") No Choice. Suffix is ignored for raw data # Calibration (kind="cal") - None (#default) returns `caltype`.fits - log: returns `caltype`log.txt - unc: returns `caltype`unc.fits download_dir: [string] -optional- Directory where the file should be downloaded. If th overwrite: [bool] -optional- Check if the requested data already exist in the target download directory. If so, this will skip the download except if overwrite is set to True. nprocess: [None/int] -optional- Number of parallel downloading you want to do. If None, it will be set to 1 and will not use multiprocess auth: [str, str] -optional- [username, password] of you IRSA account. If used, information stored in ~/.ztfquery will be ignored. """ # login if auth is not None: from .io import get_cookie cookie = get_cookie(*auth) else: cookie = None # Data Structure self._relative_data_path = self.get_data_path(suffix=suffix, source="None", indexes=indexes, **kwargs) # The IRSA location self.to_download_urls = [buildurl._source_to_location_(source) + d_ for d_ in self._relative_data_path] # Where do you want them? if download_dir is None: # Local IRSA structure self.download_location = [buildurl._source_to_location_("local") + d_ for d_ in self._relative_data_path] else: self.download_location = [download_dir + "/%s"%(d_.split("/")[-1]) for d_ in self._relative_data_path] if nodl: return self.to_download_urls, self.download_location # Actual Download io.download_url(self.to_download_urls, self.download_location, show_progress = show_progress, notebook=notebook, verbose=verbose, overwrite=overwrite, nprocess=nprocess, cookies=cookie) # --------- # # GETTER # # --------- # def get_local_data(self, suffix=None, exists=True, indexes=None): """ the lists of files stored in your local copy of the ztf database. [This methods uses the get_data_path() method assuming source='local'] Parameters ---------- suffix: [string] -optional- What kind of data do you want? Here is the list of available options depending on you image kind: # Science image (kind="sci"): - sciimg.fits (primary science image) # (default) - mskimg.fits (bit-mask image) - psfcat.fits (PSF-fit photometry catalog) - sexcat.fits (nested-aperture photometry catalog) - sciimgdao.psf (spatially varying PSF estimate in DAOPhot's lookup table format) - sciimgdaopsfcent.fits (PSF estimate at science image center as a FITS image) - sciimlog.txt (log output from instrumental calibration pipeline) - scimrefdiffimg.fits.fz (difference image: science minus reference; fpack-compressed) - diffimgpsf.fits (PSF estimate for difference image as a FITS image) - diffimlog.txt (log output from image subtraction and extraction pipeline) - log.txt (overall system summary log from realtime pipeline) # Reference image (kind="ref"): -log.txt -refcov.fits -refimg.fits # (default) -refimlog.txt -refpsfcat.fits -refsexcat.fits -refunc.fits # Raw images (kind="raw") No Choice so suffix is ignored for raw data # Calibration (kind="cal") - None (#default) returns `caltype`.fits - log: returns `caltype`log.txt - unc: returns `caltype`unc.fits exists: [bool] -optional- returns only the file that exists in your computer. If false, this will return the expected path of the requested data, even though they might not exist. Returns ------- list """ files = self.get_data_path(suffix=suffix, source="local", indexes=indexes) if not exists: return files return [f for f in files if os.path.isfile( f )] class ZTFQuery( _ZTFTableHandler_, _ZTFDownloader_ ): """ """ # ------------ # # DOWNLOADER # # ------------ # def load_metadata(self, kind="sci", radec=None, size=None, mcen=None, caltype=None, sql_query=None, auth=None, **kwargs): """ Querying for the metadata information that enables to reconstruct the URL to access the data. [This methods uses the .metasearch library, which is python wrapper of the the IRSA web API see https://irsa.ipac.caltech.edu/docs/program_interface/ztf_api.html] Parameters ---------- kind: [str] -optional- What kind of data are you looking for: - sci : Science Exposures - raw : Raw Data - ref : Reference Images - cal : Bias or High Frequency Flat any other entry will raise a ValueError // Generic Query sql_query: [None or string] -optional - The where parameter can be set to a 'SQL WHERE' clause, with some restrictions. [https://en.wikipedia.org/wiki/Where_(SQL)] Notably, function calls and sub-queries are not supported. You can use AND, OR, NOT, IN, BETWEEN, LIKE, IS, the usual arithmetic and comparison operators, and literal values. Note that the where parameter is required in the absence of POS (a spatial constraint). WHERE clauses should be URL encoded [https://en.wikipedia.org/wiki/Query_string#URL_encoding]. for instance SPACE is encoded as '+' or "%20". If entry must be equal to a string, use `entry='str'` (with the quotes) Examples: get all the science field 600 ```field=600``` get all the science field 600 and having an airmass greater than 2 ```field=600+AND+airmass>2``` get all the science field 600 and having an airmass greater than 2 with a quadran ID been 1 or 3 ```field=600+AND+airmass>2+AND+qid+IN+(1,3)``` get observation taken since the 1st of Feb 2018 (julian date 2458150.5) with an airmass > 3 ```airmass>3+AND+obsjd>2458150.5``` // If not Calibration // ra,dec: [float/str] ICRS right ascension and declination in decimal degrees. It identifies the point which returned images must contain, or the center of the search region. size: [float/str/None] -optional- It consists of one or two (comma separated) values in decimal degrees. (With POS=ra,dec) The first value is taken to be the full-width of the search region along the east axis at POS, and the second is taken to be the full-height along the north axis. Taken together, POS and SIZE define a convex spherical polygon on the sky with great circle edges - the search region. During a query, this region is compared against the convex spherical polygons formed by connecting the 4 corners of each image in a data-set to determine which images should be returned. If only one size value is specified, it is used as both the full-width and full-height. Negative sizes are illegal, and a width and height of zero indicate that the search region is a point. mcen: [bool] -optional- [If the size parameter is specified and non-zero, the mcen parameter is ignored] The mcen parameter indicates that only the most centered image/image set (with respect to POS) should be returned, rather than all images/image sets containing POS. // If Raw // INFO: sql_query has a entry to select the kind of data you are looking for: - 'imgtypecode'- Currently, the possible values for "imgtypecode" pertaining to raw image data files are: o = science (on-sky) b = bias calibration image d = dark calibration image f = dome/screen flatfield calibration image // If Calibration // caltype: [strin] which calibration type? 'bias' or 'hifreqflat' This classification will be added to the sql_query (caltype=`caltype`) except if the sql_query already contains it. If None, this will be ignored """ _test_kind_(kind) if auth is not None: from .io import get_cookie kwargs["cookies"] = get_cookie(*auth) if kind not in ['cal']: # python3 -> self.metaquery = download_metadata(**{**locals(),**kwargs}) self.metaquery = download_metadata(kind=kind, radec=radec, size=size, mcen=mcen, sql_query=sql_query, **kwargs) else: for k in ["radec", "size", "mcen"]: if locals()[k] is not None: warnings.warn("You are querying 'calibration data', the following entry is ignored: %s"%k) if "caltype" not in sql_query and caltype is not None and caltype: sql_query = "caltype=%s"%caltype if sql_query is None else sql_query+"+AND+caltype='%s'"%caltype self.metaquery = download_metadata(kind=kind, sql_query=sql_query, **kwargs) def get_data_path(self, suffix=None, source=None, indexes=None): """ generic method to build the url/fullpath or the requested data. This method is based on the `builurl.py` module of ztfquery. Parameters ---------- suffix: [string] -optional- What kind of data do you want? Here is the list of available options depending on you image kind: # Science image (kind="sci"): - sciimg.fits (primary science image) # (default) - mskimg.fits (bit-mask image) - psfcat.fits (PSF-fit photometry catalog) - sexcat.fits (nested-aperture photometry catalog) - sciimgdao.psf (spatially varying PSF estimate in DAOPhot's lookup table format) - sciimgdaopsfcent.fits (PSF estimate at science image center as a FITS image) - sciimlog.txt (log output from instrumental calibration pipeline) - scimrefdiffimg.fits.fz (difference image: science minus reference; fpack-compressed) - diffimgpsf.fits (PSF estimate for difference image as a FITS image) - diffimlog.txt (log output from image subtraction and extraction pipeline) - log.txt (overall system summary log from realtime pipeline) # Reference image (kind="ref"): -log.txt -refcov.fits -refimg.fits # (default) -refimlog.txt -refpsfcat.fits -refsexcat.fits -refunc.fits # Raw images (kind="raw") No Choice so suffix is ignored for raw data # Calibration (kind="cal") - None (#default) returns `caltype`.fits - log: returns `caltype`log.txt - unc: returns `caltype`unc.fits // if queried metadata is for kind calibration """ if not hasattr(self,"metaquery"): raise AttributeError("metaquery has not been loaded. Run load_metadata(). ") if self.metaquery.nentries ==0: warnings.warn("No entry associated to the query you made: metatable is empty") return [] return metatable_to_url(self.metatable if indexes is None else self.metatable.loc[np.atleast_1d(indexes)], datakind=self.datakind, suffix=suffix, source=source) # =============== # # Properties # # =============== # @property def datakind(self): """ """ if not hasattr(self, "metaquery"): raise AttributeError("metaquery has not been loaded. Run load_metadata(). ") return self.metaquery.datakind @property def metatable(self): """ """ if not hasattr(self, "metaquery"): raise AttributeError("metaquery has not been loaded. Run load_metadata(). ") return self.metaquery.metatable ############################# # # # Addition Queries # # # ############################# _NIGHT_SUMMARY_URL = "http://www.astro.caltech.edu/~tb/ztfops/sky/" def convert_summary_to_dataframe(summary): """ Parameters ---------- summary: [list] Format: Result from running requests.get(URL).text.splitlines() """ from pandas import DataFrame if len(summary) == 0: return None seperator_idxs = [idx for idx,char in enumerate(summary[0]) if char=='|'][:-1] if len(seperator_idxs) == 0: return None columns = [summary[0][i:j] for i,j in zip(seperator_idxs, seperator_idxs[1:]+[None])] columns = [c.replace('|','').replace(' ','') for c in columns] data = [] for line in summary[1:]: if line.startswith('|'): continue _data = [line[i:j] for i,j in zip(seperator_idxs, seperator_idxs[1:]+[None])] _data = [d.replace('|','').replace(' ','') for d in _data] data.append(_data) dataf = DataFrame(data=data, columns=[l if l!= "fil" else "fid" for l in columns]) dataf["fid"][dataf["fid"]=="4"] = "3" return dataf def download_night_summary(night, ztfops_auth = None): """ Parameters ---------- night: [string] Format: YYYYMMDD like for instance 20180429 ztfops_auth: [string, string] -optional- Provide directly the [username, password] of the ztfops page. """ import requests # = Password and username if ztfops_auth is None: from .io import _load_id_ ztfops_auth = _load_id_("ztfops", askit=True) summary = requests.get(_NIGHT_SUMMARY_URL+"%s/exp.%s.tbl"%(night,night), auth=ztfops_auth).content.decode('utf-8').splitlines() dataf = convert_summary_to_dataframe(summary) return dataf def download_allnight_summary(ztfops_auth = None): """ Parameters ---------- ztfops_auth: [string, string] -optional- Provide directly the [username, password] of the ztfops page. """ import requests # = Password and username if ztfops_auth is None: from .io import _load_id_ ztfops_auth = _load_id_("ztfops", askit=True) summary = requests.get(_NIGHT_SUMMARY_URL+"allexp.tbl", auth=ztfops_auth).content.decode('utf-8').splitlines() dataf = convert_summary_to_dataframe(summary) return dataf class NightSummary( _ZTFTableHandler_, _ZTFDownloader_ ): def __init__(self, night, ztfops_auth=None): """ """ self.night = night self.data_all = download_night_summary(night, ztfops_auth=ztfops_auth) if self.data_all is None: self.data = None else: self.data = self.data_all[self.data_all["type"]=="targ"] # ================ # # Methods # # ================ # # --------- # # GETTER # # --------- # def get_observed_information(self, obstype="targ", columns=["field","ra","dec"]): """ get a DataFrame (pandas) of the requested columns for the given obstype. Parameters ---------- obstype: [string] Type of observation. Could be: 'bias', 'dark', 'flat', or 'targ' columns: [string or list of] Any field available in data (check the list by doing THIS.data.columns) Returns ------- DataFrame """ return self.data[self.data['type']==obstype][columns] # Download Data def set_metadata(self, kind, **kwargs): """ Set the mate information get_data_path need Important: Some kwargs are mandatory dependending of you given kind: - for kind "sci": ["paddedccdid", "qid"] - for kind "raw": ["paddedccdid"] (other kind not implemented yet) """ self._metadata = {} MANDATORY = {"sci":["paddedccdid", "qid"], "raw":["paddedccdid"], "ref":{}, "cal":{} } DEFAULT = {"sci":{"imgtypecode":"o"}, "raw":{"imgtypecode":"o"}, "ref":{}, "cal":{}} if kind not in ["raw","sci"]: raise NotImplementedError("Only Science ('sci') or Raw ('raw') kinds ready (%s given)."%kind) # Requested input for k in MANDATORY[kind]: if k not in kwargs.keys(): raise ValueError("%s should be provided for kind: %s"%(k,kind)) # -> python3 self._metadata = **{DEFAULT[kind], **kwargs} self._metadata = DEFAULT[kind] self._metadata["kind"] = kind for k,v in kwargs.items(): self._metadata[k] = v # -> python3 self._metadata = **{DEFAULT[kind], **kwargs}; self._metadata["kind"] = kind # WRONG SO FAR def get_data_path(self, mask=None, suffix=None, source=None, verbose=False, ): """ generic method to build the url/fullpath or the requested data. This method is based on the `builurl.py` module of ztfquery. Parameters ---------- mask: [None / list of int / boolean array] -optional- only use the data entry for the given mask: ``` fileroots = np.asarray(self.data["fileroot"]) if mask is not None: fileroots = fileroots[mask] ``` suffix: [string] -optional- What kind of data do you want? Here is the list of available options depending on you image kind: # Science image (kind="sci"): - sciimg.fits (primary science image) # (default) - mskimg.fits (bit-mask image) - psfcat.fits (PSF-fit photometry catalog) - sexcat.fits (nested-aperture photometry catalog) - sciimgdao.psf (spatially varying PSF estimate in DAOPhot's lookup table format) - sciimgdaopsfcent.fits (PSF estimate at science image center as a FITS image) - sciimlog.txt (log output from instrumental calibration pipeline) - scimrefdiffimg.fits.fz (difference image: science minus reference; fpack-compressed) - diffimgpsf.fits (PSF estimate for difference image as a FITS image) - diffimlog.txt (log output from image subtraction and extraction pipeline) - log.txt (overall system summary log from realtime pipeline) # Reference image (kind="ref"): -log.txt -refcov.fits -refimg.fits # (default) -refimlog.txt -refpsfcat.fits -refsexcat.fits -refunc.fits # Raw images (kind="raw") No Choice so suffix is ignored for raw data # Calibration (kind="cal") - None (#default) returns `caltype`.fits - log: returns `caltype`log.txt - unc: returns `caltype`unc.fits // if queried metadata is for kind calibration """ if not hasattr(self,"_metadata"): raise AttributeError("you did not set the metadata, you must (see self.set_metadata()) ") fileroots = np.asarray(self.data["fileroot"]) if mask is not None: fileroots = fileroots[mask] # Science Products if self._metadata["kind"] in ['sci']: from .buildurl import fileroot_to_science_url if suffix is None: suffix = "sciimg.fits" return [fileroot_to_science_url(fileroot, self._metadata["paddedccdid"], self._metadata["qid"], imgtypecode=self._metadata["imgtypecode"], suffix=suffix, source=source, verbose=verbose) for fileroot in fileroots] # Raw Data elif self._metadata["kind"] in ["raw"]: from .buildurl import fileroot_to_raw_url return [fileroot_to_raw_url(fileroot, self._metadata["paddedccdid"], imgtypecode=self._metadata["imgtypecode"], source=source, verbose=verbose) for fileroot in fileroots] else: raise NotImplementedError("Only Science ('sci') or Raw ('raw') kinds ready (%s given)."%kind)
43.529412
150
0.551294
7a6dcdce1f7488f07a954b1ee715a793d8d97935
87
py
Python
Renter/apps.py
Hyped-247/rp
9e3c6287ec2a183998f6ddadc20153736bbefaf3
[ "MIT" ]
null
null
null
Renter/apps.py
Hyped-247/rp
9e3c6287ec2a183998f6ddadc20153736bbefaf3
[ "MIT" ]
null
null
null
Renter/apps.py
Hyped-247/rp
9e3c6287ec2a183998f6ddadc20153736bbefaf3
[ "MIT" ]
null
null
null
from django.apps import AppConfig class RenterConfig(AppConfig): name = 'Renter'
14.5
33
0.747126
ab14b5ab963b249674cefb4bb706c5511c93b30f
8,406
py
Python
TTS/vocoder/utils/generic_utils.py
mightmay/Mien-TTS
8a22ff0a79558b3cf4981ce1b63f4d1485ea6338
[ "MIT" ]
null
null
null
TTS/vocoder/utils/generic_utils.py
mightmay/Mien-TTS
8a22ff0a79558b3cf4981ce1b63f4d1485ea6338
[ "MIT" ]
null
null
null
TTS/vocoder/utils/generic_utils.py
mightmay/Mien-TTS
8a22ff0a79558b3cf4981ce1b63f4d1485ea6338
[ "MIT" ]
1
2021-04-28T17:30:03.000Z
2021-04-28T17:30:03.000Z
import re import torch import importlib import numpy as np #from matplotlib import pyplot as plt #from TTS.tts.utils.visual import plot_spectrogram def interpolate_vocoder_input(scale_factor, spec): """Interpolate spectrogram by the scale factor. It is mainly used to match the sampling rates of the tts and vocoder models. Args: scale_factor (float): scale factor to interpolate the spectrogram spec (np.array): spectrogram to be interpolated Returns: torch.tensor: interpolated spectrogram. """ print(" > before interpolation :", spec.shape) spec = torch.tensor(spec).unsqueeze(0).unsqueeze(0) # pylint: disable=not-callable spec = torch.nn.functional.interpolate(spec, scale_factor=scale_factor, recompute_scale_factor=True, mode='bilinear', align_corners=False).squeeze(0) print(" > after interpolation :", spec.shape) return spec def plot_results(y_hat, y, ap, global_step, name_prefix): """ Plot vocoder model results """ # select an instance from batch y_hat = y_hat[0].squeeze(0).detach().cpu().numpy() y = y[0].squeeze(0).detach().cpu().numpy() spec_fake = ap.melspectrogram(y_hat).T spec_real = ap.melspectrogram(y).T spec_diff = np.abs(spec_fake - spec_real) # plot figure and save it # fig_wave = plt.figure() # plt.subplot(2, 1, 1) # plt.plot(y) # plt.title("groundtruth speech") # plt.subplot(2, 1, 2) # plt.plot(y_hat) # plt.title(f"generated speech @ {global_step} steps") # plt.tight_layout() # plt.close() # figures = { # name_prefix + "spectrogram/fake": plot_spectrogram(spec_fake), # name_prefix + "spectrogram/real": plot_spectrogram(spec_real), # name_prefix + "spectrogram/diff": plot_spectrogram(spec_diff), # name_prefix + "speech_comparison": fig_wave, # } # return figures def to_camel(text): text = text.capitalize() return re.sub(r'(?!^)_([a-zA-Z])', lambda m: m.group(1).upper(), text) def setup_wavernn(c): print(" > Model: WaveRNN") MyModel = importlib.import_module("TTS.vocoder.models.wavernn") MyModel = getattr(MyModel, "WaveRNN") model = MyModel( rnn_dims=c.wavernn_model_params['rnn_dims'], fc_dims=c.wavernn_model_params['fc_dims'], mode=c.mode, mulaw=c.mulaw, pad=c.padding, use_aux_net=c.wavernn_model_params['use_aux_net'], use_upsample_net=c.wavernn_model_params['use_upsample_net'], upsample_factors=c.wavernn_model_params['upsample_factors'], feat_dims=c.audio['num_mels'], compute_dims=c.wavernn_model_params['compute_dims'], res_out_dims=c.wavernn_model_params['res_out_dims'], num_res_blocks=c.wavernn_model_params['num_res_blocks'], hop_length=c.audio["hop_length"], sample_rate=c.audio["sample_rate"], ) return model def setup_generator(c): print(" > Generator Model: {}".format(c.generator_model)) MyModel = importlib.import_module('TTS.vocoder.models.' + c.generator_model.lower()) MyModel = getattr(MyModel, to_camel(c.generator_model)) if c.generator_model.lower() in 'melgan_generator': model = MyModel( in_channels=c.audio['num_mels'], out_channels=1, proj_kernel=7, base_channels=512, upsample_factors=c.generator_model_params['upsample_factors'], res_kernel=3, num_res_blocks=c.generator_model_params['num_res_blocks']) if c.generator_model in 'melgan_fb_generator': pass if c.generator_model.lower() in 'multiband_melgan_generator': model = MyModel( in_channels=c.audio['num_mels'], out_channels=4, proj_kernel=7, base_channels=384, upsample_factors=c.generator_model_params['upsample_factors'], res_kernel=3, num_res_blocks=c.generator_model_params['num_res_blocks']) if c.generator_model.lower() in 'fullband_melgan_generator': model = MyModel( in_channels=c.audio['num_mels'], out_channels=1, proj_kernel=7, base_channels=512, upsample_factors=c.generator_model_params['upsample_factors'], res_kernel=3, num_res_blocks=c.generator_model_params['num_res_blocks']) if c.generator_model.lower() in 'parallel_wavegan_generator': model = MyModel( in_channels=1, out_channels=1, kernel_size=3, num_res_blocks=c.generator_model_params['num_res_blocks'], stacks=c.generator_model_params['stacks'], res_channels=64, gate_channels=128, skip_channels=64, aux_channels=c.audio['num_mels'], dropout=0.0, bias=True, use_weight_norm=True, upsample_factors=c.generator_model_params['upsample_factors']) if c.generator_model.lower() in 'wavegrad': model = MyModel( in_channels=c['audio']['num_mels'], out_channels=1, use_weight_norm=c['model_params']['use_weight_norm'], x_conv_channels=c['model_params']['x_conv_channels'], y_conv_channels=c['model_params']['y_conv_channels'], dblock_out_channels=c['model_params']['dblock_out_channels'], ublock_out_channels=c['model_params']['ublock_out_channels'], upsample_factors=c['model_params']['upsample_factors'], upsample_dilations=c['model_params']['upsample_dilations']) return model def setup_discriminator(c): print(" > Discriminator Model: {}".format(c.discriminator_model)) if 'parallel_wavegan' in c.discriminator_model: MyModel = importlib.import_module( 'TTS.vocoder.models.parallel_wavegan_discriminator') else: MyModel = importlib.import_module('TTS.vocoder.models.' + c.discriminator_model.lower()) MyModel = getattr(MyModel, to_camel(c.discriminator_model.lower())) if c.discriminator_model in 'random_window_discriminator': model = MyModel( cond_channels=c.audio['num_mels'], hop_length=c.audio['hop_length'], uncond_disc_donwsample_factors=c. discriminator_model_params['uncond_disc_donwsample_factors'], cond_disc_downsample_factors=c. discriminator_model_params['cond_disc_downsample_factors'], cond_disc_out_channels=c. discriminator_model_params['cond_disc_out_channels'], window_sizes=c.discriminator_model_params['window_sizes']) if c.discriminator_model in 'melgan_multiscale_discriminator': model = MyModel( in_channels=1, out_channels=1, kernel_sizes=(5, 3), base_channels=c.discriminator_model_params['base_channels'], max_channels=c.discriminator_model_params['max_channels'], downsample_factors=c. discriminator_model_params['downsample_factors']) if c.discriminator_model == 'residual_parallel_wavegan_discriminator': model = MyModel( in_channels=1, out_channels=1, kernel_size=3, num_layers=c.discriminator_model_params['num_layers'], stacks=c.discriminator_model_params['stacks'], res_channels=64, gate_channels=128, skip_channels=64, dropout=0.0, bias=True, nonlinear_activation="LeakyReLU", nonlinear_activation_params={"negative_slope": 0.2}, ) if c.discriminator_model == 'parallel_wavegan_discriminator': model = MyModel( in_channels=1, out_channels=1, kernel_size=3, num_layers=c.discriminator_model_params['num_layers'], conv_channels=64, dilation_factor=1, nonlinear_activation="LeakyReLU", nonlinear_activation_params={"negative_slope": 0.2}, bias=True ) return model # def check_config(c): # c = None # pass
38.737327
87
0.629669
74124ba4f7c25ec6be3d92cf6d4af888810f3930
742
py
Python
setup.py
kaapstorm/openhim-mediator-utils-py
7ad8dd44e9e97b5d3f44ce742241e72f748f2527
[ "MIT" ]
null
null
null
setup.py
kaapstorm/openhim-mediator-utils-py
7ad8dd44e9e97b5d3f44ce742241e72f748f2527
[ "MIT" ]
null
null
null
setup.py
kaapstorm/openhim-mediator-utils-py
7ad8dd44e9e97b5d3f44ce742241e72f748f2527
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="openhim_mediator_utils", version="0.0.2", author="Lazola Sifuba", author_email="sifubalazola@gmail.com", description="A utility library for build openHIM mediators", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/de-laz/openhim-mediator-utils-py", packages=setuptools.find_packages(), classifiers=( "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Natural Language :: English", "Intended Audience :: Developers" ) )
30.916667
64
0.672507
1531bcc2d525378cece1b2f5f36171125215ff19
40
py
Python
label_studio/__init__.py
zoumt1633/label-studio
324d542b49b42cac5c9a3e23373b9febaf9a426e
[ "Apache-2.0" ]
null
null
null
label_studio/__init__.py
zoumt1633/label-studio
324d542b49b42cac5c9a3e23373b9febaf9a426e
[ "Apache-2.0" ]
7
2021-06-02T02:57:44.000Z
2022-03-12T00:48:20.000Z
__init__.py
JamesXChang/label_tool
f62470a2bf677a2dd1d18054baf2d651d69c83a9
[ "Apache-2.0" ]
null
null
null
# Package version __version__ = '0.7.2'
13.333333
21
0.7
0329ef5ebc67212c458f768eb1b608364a2ee9d0
11,543
py
Python
test/test_configuration.py
dakshinai/unit
fa4d4b61200b6f465edbe24ebcdce1a7a8675d39
[ "Apache-2.0" ]
null
null
null
test/test_configuration.py
dakshinai/unit
fa4d4b61200b6f465edbe24ebcdce1a7a8675d39
[ "Apache-2.0" ]
null
null
null
test/test_configuration.py
dakshinai/unit
fa4d4b61200b6f465edbe24ebcdce1a7a8675d39
[ "Apache-2.0" ]
null
null
null
import unittest from unit.control import TestControl class TestConfiguration(TestControl): prerequisites = {'modules': {'python': 'any'}} def test_json_empty(self): self.assertIn('error', self.conf(''), 'empty') def test_json_leading_zero(self): self.assertIn('error', self.conf('00'), 'leading zero') def test_json_unicode(self): self.assertIn( 'success', self.conf( b""" { "ap\u0070": { "type": "\u0070ython", "processes": { "spare": 0 }, "path": "\u002Fapp", "module": "wsgi" } } """, 'applications', ), 'unicode', ) self.assertDictEqual( self.conf_get('applications'), { "app": { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi", } }, 'unicode get', ) def test_json_unicode_2(self): self.assertIn( 'success', self.conf( { "приложение": { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi", } }, 'applications', ), 'unicode 2', ) self.assertIn( 'приложение', self.conf_get('applications'), 'unicode 2 get' ) def test_json_unicode_number(self): self.assertIn( 'error', self.conf( b""" { "app": { "type": "python", "processes": { "spare": \u0030 }, "path": "/app", "module": "wsgi" } } """, 'applications', ), 'unicode number', ) def test_json_utf8_bom(self): self.assertIn( 'success', self.conf( b"""\xEF\xBB\xBF { "app": { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi" } } """, 'applications', ), 'UTF-8 BOM', ) def test_json_comment_single_line(self): self.assertIn( 'success', self.conf( b""" // this is bridge { "//app": { "type": "python", // end line "processes": {"spare": 0}, // inside of block "path": "/app", "module": "wsgi" } // double // } // end of json \xEF\t """, 'applications', ), 'single line comments', ) def test_json_comment_multi_line(self): self.assertIn( 'success', self.conf( b""" /* this is bridge */ { "/*app": { /** * multiple lines **/ "type": "python", "processes": /* inline */ {"spare": 0}, "path": "/app", "module": "wsgi" /* // end of block */ } /* blah * / blah /* blah */ } /* end of json \xEF\t\b */ """, 'applications', ), 'multi line comments', ) def test_json_comment_invalid(self): self.assertIn('error', self.conf(b'/{}', 'applications'), 'slash') self.assertIn('error', self.conf(b'//{}', 'applications'), 'comment') self.assertIn('error', self.conf(b'{} /', 'applications'), 'slash end') self.assertIn( 'error', self.conf(b'/*{}', 'applications'), 'slash star' ) self.assertIn( 'error', self.conf(b'{} /*', 'applications'), 'slash star end' ) def test_applications_open_brace(self): self.assertIn('error', self.conf('{', 'applications'), 'open brace') def test_applications_string(self): self.assertIn('error', self.conf('"{}"', 'applications'), 'string') @unittest.skip('not yet, unsafe') def test_applications_type_only(self): self.assertIn( 'error', self.conf({"app": {"type": "python"}}, 'applications'), 'type only', ) def test_applications_miss_quote(self): self.assertIn( 'error', self.conf( """ { app": { "type": "python", "processes": { "spare": 0 }, "path": "/app", "module": "wsgi" } } """, 'applications', ), 'miss quote', ) def test_applications_miss_colon(self): self.assertIn( 'error', self.conf( """ { "app" { "type": "python", "processes": { "spare": 0 }, "path": "/app", "module": "wsgi" } } """, 'applications', ), 'miss colon', ) def test_applications_miss_comma(self): self.assertIn( 'error', self.conf( """ { "app": { "type": "python" "processes": { "spare": 0 }, "path": "/app", "module": "wsgi" } } """, 'applications', ), 'miss comma', ) def test_applications_skip_spaces(self): self.assertIn( 'success', self.conf(b'{ \n\r\t}', 'applications'), 'skip spaces' ) def test_applications_relative_path(self): self.assertIn( 'success', self.conf( { "app": { "type": "python", "processes": {"spare": 0}, "path": "../app", "module": "wsgi", } }, 'applications', ), 'relative path', ) @unittest.skip('not yet, unsafe') def test_listeners_empty(self): self.assertIn( 'error', self.conf({"*:7080": {}}, 'listeners'), 'listener empty' ) def test_listeners_no_app(self): self.assertIn( 'error', self.conf({"*:7080": {"pass": "applications/app"}}, 'listeners'), 'listeners no app', ) def test_listeners_wildcard(self): self.assertIn( 'success', self.conf( { "listeners": {"*:7080": {"pass": "applications/app"}}, "applications": { "app": { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi", } }, } ), 'listeners wildcard', ) def test_listeners_explicit(self): self.assertIn( 'success', self.conf( { "listeners": {"127.0.0.1:7080": {"pass": "applications/app"}}, "applications": { "app": { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi", } }, } ), 'explicit', ) def test_listeners_explicit_ipv6(self): self.assertIn( 'success', self.conf( { "listeners": {"[::1]:7080": {"pass": "applications/app"}}, "applications": { "app": { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi", } }, } ), 'explicit ipv6', ) @unittest.skip('not yet, unsafe') def test_listeners_no_port(self): self.assertIn( 'error', self.conf( { "listeners": {"127.0.0.1": {"pass": "applications/app"}}, "applications": { "app": { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi", } }, } ), 'no port', ) def test_json_application_name_large(self): name = "X" * 1024 * 1024 self.assertIn( 'success', self.conf( { "listeners": {"*:7080": {"pass": "applications/" + name}}, "applications": { name: { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi", } }, } ), ) @unittest.skip('not yet') def test_json_application_many(self): apps = 999 conf = { "applications": { "app-" + str(a): { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi", } for a in range(apps) }, "listeners": { "*:" + str(7000 + a): {"pass": "applications/app-" + str(a)} for a in range(apps) }, } self.assertIn('success', self.conf(conf)) def test_json_application_many2(self): conf = { "applications": { "app-" + str(a): { "type": "python", "processes": {"spare": 0}, "path": "/app", "module": "wsgi", } for a in range(999) }, "listeners": {"*:7080": {"pass": "applications/app-1"}}, } self.assertIn('success', self.conf(conf)) if __name__ == '__main__': TestConfiguration.main()
27.949153
82
0.337434
9ddc1e4c427fc896f59147e82a57abf479bb7b6a
3,024
py
Python
utils/check_ptc.py
bl0x/symbiflow-arch-defs
5fa5e71526e443d589971f2649d8b189df982d72
[ "ISC" ]
183
2017-12-29T12:08:32.000Z
2022-02-15T03:29:07.000Z
utils/check_ptc.py
bl0x/symbiflow-arch-defs
5fa5e71526e443d589971f2649d8b189df982d72
[ "ISC" ]
1,832
2017-12-29T14:47:27.000Z
2022-02-18T06:30:43.000Z
utils/check_ptc.py
bl0x/symbiflow-arch-defs
5fa5e71526e443d589971f2649d8b189df982d72
[ "ISC" ]
96
2017-12-30T12:00:45.000Z
2022-02-17T09:03:46.000Z
#!/usr/bin/env python3 """ Tool for sanity checking rrgraph CHAN PTC's. """ import lxml.etree as ET import argparse def check_ptc(xml): """ Checks ptc values used on CHANX and CHANY rr graph nodes are valid. CHAN ptc numbers are an index per x/y coordinate and channel type (CHANX or CHANY). ptc's at a particular coordinate/type must start at 0, and fill to the max value. """ chan_ptcs = {} nodes = {} for node in xml.find('rr_nodes').iter('node'): assert node.attrib['id'] not in nodes nodes[node.attrib['id']] = node node_type = node.attrib['type'] if node_type in ['CHANX', 'CHANY']: loc_xml = node.find('loc') assert loc_xml is not None for x in range(int(loc_xml.attrib['xlow']), int(loc_xml.attrib['xhigh']) + 1): for y in range(int(loc_xml.attrib['ylow']), int(loc_xml.attrib['yhigh']) + 1): key = (node_type, x, y) if key not in chan_ptcs: chan_ptcs[key] = [] chan_ptcs[key].append( (node.attrib['id'], int(loc_xml.attrib['ptc'])) ) for (node_type, x, y), node_ptcs in chan_ptcs.items(): nodes, ptcs = zip(*node_ptcs) starts_at_zero = min(ptcs) == 0 ends_at_max_val = max(ptcs) == len(ptcs) - 1 all_values_present = len(ptcs) == len(set(ptcs)) if not all((starts_at_zero, ends_at_max_val, all_values_present)): sorted_nodes = sorted(zip(ptcs, nodes), key=lambda x: x[0]) for idx, (ptc, node) in enumerate(sorted_nodes): if idx == ptc: continue if idx > 1: raise ValueError( """\ Gap in ptc value for type = {node_type} @ ({x}, {y}) Expect PTC = {idx}, found {ptc} Current node is id = {cur_node} Previous node is id = {prev_node}""".format( x=x, y=y, node_type=node_type, idx=idx, ptc=ptc, cur_node=node, prev_node=sorted_nodes[idx - 1][1], ) ) else: raise ValueError( "Lowest ptc is {ptc} for type = {node_type} @ ({x}, {y})" .format( x=x, y=y, node_type=node_type, ptc=ptc, ) ) def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('input_xml') args = parser.parse_args() xml = ET.parse(args.input_xml, ET.XMLParser(remove_blank_text=True)) check_ptc(xml) if __name__ == "__main__": main()
32.170213
81
0.473214
5ece83c146b267015534c04adf7a992e3a427ab4
18,334
py
Python
src/python/pants/backend/project_info/tasks/export.py
sammy-1234/pants
889016952a248cf229c78c014d9f6c95422d98b8
[ "Apache-2.0" ]
1
2020-08-26T03:30:31.000Z
2020-08-26T03:30:31.000Z
src/python/pants/backend/project_info/tasks/export.py
sammy-1234/pants
889016952a248cf229c78c014d9f6c95422d98b8
[ "Apache-2.0" ]
1
2021-09-02T14:16:37.000Z
2021-09-02T14:16:37.000Z
src/python/pants/backend/project_info/tasks/export.py
sammy-1234/pants
889016952a248cf229c78c014d9f6c95422d98b8
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import json import os from collections import defaultdict from twitter.common.collections import OrderedSet from pants.backend.jvm.subsystems.jvm_platform import JvmPlatform from pants.backend.jvm.subsystems.resolve_subsystem import JvmResolveSubsystem from pants.backend.jvm.targets.jar_library import JarLibrary from pants.backend.jvm.targets.junit_tests import JUnitTests from pants.backend.jvm.targets.jvm_app import JvmApp from pants.backend.jvm.targets.jvm_target import JvmTarget from pants.backend.jvm.targets.scala_library import ScalaLibrary from pants.backend.jvm.tasks.classpath_products import ClasspathProducts from pants.backend.jvm.tasks.coursier_resolve import CoursierMixin from pants.backend.jvm.tasks.ivy_task_mixin import IvyTaskMixin from pants.backend.python.interpreter_cache import PythonInterpreterCache from pants.backend.python.subsystems.pex_build_util import has_python_requirements from pants.backend.python.targets.python_requirement_library import PythonRequirementLibrary from pants.backend.python.targets.python_target import PythonTarget from pants.backend.python.targets.python_tests import PythonTests from pants.backend.python.tasks.resolve_requirements_task_base import ResolveRequirementsTaskBase from pants.base.build_environment import get_buildroot from pants.base.exceptions import TaskError from pants.build_graph.resources import Resources from pants.build_graph.target import Target from pants.invalidation.cache_manager import VersionedTargetSet from pants.java.distribution.distribution import DistributionLocator from pants.java.executor import SubprocessExecutor from pants.java.jar.jar_dependency_utils import M2Coordinate from pants.task.console_task import ConsoleTask from pants.util.memo import memoized_property # Changing the behavior of this task may affect the IntelliJ Pants plugin. # Please add @yic to reviews for this file. class ExportTask(ResolveRequirementsTaskBase, IvyTaskMixin, CoursierMixin): """Base class for generating a json-formattable blob of data about the target graph. Subclasses can invoke the generate_targets_map method to get a dictionary of plain datastructures (dicts, lists, strings) that can be easily read and exported to various formats. """ # FORMAT_VERSION_NUMBER: Version number for identifying the export file format output. This # version number should change when there is a change to the output format. # # Major Version 1.x.x : Increment this field when there is a major format change # Minor Version x.1.x : Increment this field when there is a minor change that breaks backward # compatibility for an existing field or a field is removed. # Patch version x.x.1 : Increment this field when a minor format change that just adds information # that an application can safely ignore. # # Note format changes in src/docs/export.md and update the Changelog section. # DEFAULT_EXPORT_VERSION = '1.0.10' @classmethod def subsystem_dependencies(cls): return super().subsystem_dependencies() + ( DistributionLocator, JvmPlatform, PythonInterpreterCache ) class SourceRootTypes: """Defines SourceRoot Types Constants""" SOURCE = 'SOURCE' # Source Target TEST = 'TEST' # Test Target SOURCE_GENERATED = 'SOURCE_GENERATED' # Code Gen Source Targets EXCLUDED = 'EXCLUDED' # Excluded Target RESOURCE = 'RESOURCE' # Resource belonging to Source Target TEST_RESOURCE = 'TEST_RESOURCE' # Resource belonging to Test Target @staticmethod def _is_jvm(dep): return isinstance(dep, (JarLibrary, JvmTarget, JvmApp)) @staticmethod def _jar_id(jar): """Create a string identifier for the IvyModuleRef key. :param IvyModuleRef jar: key for a resolved jar :returns: String representing the key as a maven coordinate """ if jar.rev: return '{0}:{1}:{2}'.format(jar.org, jar.name, jar.rev) else: return '{0}:{1}'.format(jar.org, jar.name) @staticmethod def _exclude_id(jar): """Create a string identifier for the Exclude key. :param Exclude jar: key for an excluded jar :returns: String representing the key as a maven coordinate """ return '{0}:{1}'.format(jar.org, jar.name) if jar.name else jar.org @classmethod def register_options(cls, register): super().register_options(register) register('--libraries', default=True, type=bool, help='Causes libraries to be output.') register('--libraries-sources', type=bool, help='Causes libraries with sources to be output.') register('--libraries-javadocs', type=bool, help='Causes libraries with javadocs to be output.') register('--sources', type=bool, help='Causes sources to be output.') register('--formatted', type=bool, implicit_value=False, help='Causes output to be a single line of JSON.') register('--jvm-options', type=list, metavar='<option>...', help='Run the JVM 3rdparty resolver with these jvm options.') @classmethod def prepare(cls, options, round_manager): super().prepare(options, round_manager) if options.libraries or options.libraries_sources or options.libraries_javadocs: round_manager.optional_data('java') round_manager.optional_data('scala') @memoized_property def _interpreter_cache(self): return PythonInterpreterCache.global_instance() def check_artifact_cache_for(self, invalidation_check): # Export is an output dependent on the entire target set, and is not divisible # by target. So we can only cache it keyed by the entire target set. global_vts = VersionedTargetSet.from_versioned_targets(invalidation_check.all_vts) return [global_vts] def resolve_jars(self, targets): # TODO: Why is this computed directly here instead of taking from the actual product # computed by the {Ivy,Coursier}Resolve task? executor = SubprocessExecutor(DistributionLocator.cached()) confs = [] if self.get_options().libraries: confs.append('default') if self.get_options().libraries_sources: confs.append('sources') if self.get_options().libraries_javadocs: confs.append('javadoc') compile_classpath = None if confs: compile_classpath = ClasspathProducts(self.get_options().pants_workdir) if JvmResolveSubsystem.global_instance().get_options().resolver == 'ivy': IvyTaskMixin.resolve(self, executor=executor, targets=targets, classpath_products=compile_classpath, confs=confs) else: CoursierMixin.resolve(self, targets, compile_classpath, sources=self.get_options().libraries_sources, javadoc=self.get_options().libraries_javadocs, executor=executor) return compile_classpath def generate_targets_map(self, targets, classpath_products=None): """Generates a dictionary containing all pertinent information about the target graph. The return dictionary is suitable for serialization by json.dumps. :param targets: The list of targets to generate the map for. :param classpath_products: Optional classpath_products. If not provided when the --libraries option is `True`, this task will perform its own jar resolution. """ targets_map = {} resource_target_map = {} python_interpreter_targets_mapping = defaultdict(list) if self.get_options().libraries: # NB(gmalmquist): This supports mocking the classpath_products in tests. if classpath_products is None: classpath_products = self.resolve_jars(targets) else: classpath_products = None target_roots_set = set(self.context.target_roots) def process_target(current_target): """ :type current_target:pants.build_graph.target.Target """ def get_target_type(tgt): def is_test(t): return isinstance(t, JUnitTests) or isinstance(t, PythonTests) if is_test(tgt): return ExportTask.SourceRootTypes.TEST else: if (isinstance(tgt, Resources) and tgt in resource_target_map and is_test(resource_target_map[tgt])): return ExportTask.SourceRootTypes.TEST_RESOURCE elif isinstance(tgt, Resources): return ExportTask.SourceRootTypes.RESOURCE else: return ExportTask.SourceRootTypes.SOURCE info = { 'targets': [], 'libraries': [], 'roots': [], 'id': current_target.id, 'target_type': get_target_type(current_target), # NB: is_code_gen should be removed when export format advances to 1.1.0 or higher 'is_code_gen': current_target.is_synthetic, 'is_synthetic': current_target.is_synthetic, 'pants_target_type': self._get_pants_target_alias(type(current_target)), } if not current_target.is_synthetic: info['globs'] = current_target.globs_relative_to_buildroot() if self.get_options().sources: info['sources'] = list(current_target.sources_relative_to_buildroot()) info['transitive'] = current_target.transitive info['scope'] = str(current_target.scope) info['is_target_root'] = current_target in target_roots_set if isinstance(current_target, PythonRequirementLibrary): reqs = current_target.payload.get_field_value('requirements', set()) """:type : set[pants.backend.python.python_requirement.PythonRequirement]""" info['requirements'] = [req.key for req in reqs] if isinstance(current_target, PythonTarget): interpreter_for_target = self._interpreter_cache.select_interpreter_for_targets( [current_target]) if interpreter_for_target is None: raise TaskError('Unable to find suitable interpreter for {}' .format(current_target.address)) python_interpreter_targets_mapping[interpreter_for_target].append(current_target) info['python_interpreter'] = str(interpreter_for_target.identity) def iter_transitive_jars(jar_lib): """ :type jar_lib: :class:`pants.backend.jvm.targets.jar_library.JarLibrary` :rtype: :class:`collections.Iterator` of :class:`pants.java.jar.M2Coordinate` """ if classpath_products: jar_products = classpath_products.get_artifact_classpath_entries_for_targets((jar_lib,)) for _, jar_entry in jar_products: coordinate = jar_entry.coordinate # We drop classifier and type_ since those fields are represented in the global # libraries dict and here we just want the key into that dict (see `_jar_id`). yield M2Coordinate(org=coordinate.org, name=coordinate.name, rev=coordinate.rev) target_libraries = OrderedSet() if isinstance(current_target, JarLibrary): target_libraries = OrderedSet(iter_transitive_jars(current_target)) for dep in current_target.dependencies: info['targets'].append(dep.address.spec) if isinstance(dep, JarLibrary): for jar in dep.jar_dependencies: target_libraries.add(M2Coordinate(jar.org, jar.name, jar.rev)) # Add all the jars pulled in by this jar_library target_libraries.update(iter_transitive_jars(dep)) if isinstance(dep, Resources): resource_target_map[dep] = current_target if isinstance(current_target, ScalaLibrary): for dep in current_target.java_sources: info['targets'].append(dep.address.spec) process_target(dep) if isinstance(current_target, JvmTarget): info['excludes'] = [self._exclude_id(exclude) for exclude in current_target.excludes] info['platform'] = current_target.platform.name if hasattr(current_target, 'test_platform'): info['test_platform'] = current_target.test_platform.name info['roots'] = [{ 'source_root': source_root_package_prefix[0], 'package_prefix': source_root_package_prefix[1] } for source_root_package_prefix in self._source_roots_for_target(current_target)] if classpath_products: info['libraries'] = [self._jar_id(lib) for lib in target_libraries] targets_map[current_target.address.spec] = info for target in targets: process_target(target) jvm_platforms_map = { 'default_platform' : JvmPlatform.global_instance().default_platform.name, 'platforms': { str(platform_name): { 'target_level' : str(platform.target_level), 'source_level' : str(platform.source_level), 'args' : platform.args, } for platform_name, platform in JvmPlatform.global_instance().platforms_by_name.items() }, } graph_info = { 'version': self.DEFAULT_EXPORT_VERSION, 'targets': targets_map, 'jvm_platforms': jvm_platforms_map, # `jvm_distributions` are static distribution settings from config, # `preferred_jvm_distributions` are distributions that pants actually uses for the # given platform setting. 'preferred_jvm_distributions': {} } for platform_name, platform in JvmPlatform.global_instance().platforms_by_name.items(): preferred_distributions = {} for strict, strict_key in [(True, 'strict'), (False, 'non_strict')]: try: dist = JvmPlatform.preferred_jvm_distribution([platform], strict=strict) preferred_distributions[strict_key] = dist.home except DistributionLocator.Error: pass if preferred_distributions: graph_info['preferred_jvm_distributions'][platform_name] = preferred_distributions if classpath_products: graph_info['libraries'] = self._resolve_jars_info(targets, classpath_products) if python_interpreter_targets_mapping: # NB: We've selected a python interpreter compatible with each python target individually into # the `python_interpreter_targets_mapping`. These python targets may not be compatible, ie: we # could have a python target requiring 'CPython>=2.7<3' (ie: CPython-2.7.x) and another # requiring 'CPython>=3.6'. To pick a default interpreter then from among these two choices # is arbitrary and not to be relied on to work as a default interpreter if ever needed by the # export consumer. # # TODO(John Sirois): consider either eliminating the 'default_interpreter' field and pressing # export consumers to make their own choice of a default (if needed) or else use # `select.select_interpreter_for_targets` and fail fast if there is no interpreter compatible # across all the python targets in-play. # # For now, make our arbitrary historical choice of a default interpreter explicit and use the # lowest version. default_interpreter = min(python_interpreter_targets_mapping.keys()) interpreters_info = {} for interpreter, targets in python_interpreter_targets_mapping.items(): req_libs = [target for target in Target.closure_for_targets(targets) if has_python_requirements(target)] chroot = self.resolve_requirements(interpreter, req_libs) interpreters_info[str(interpreter.identity)] = { 'binary': interpreter.binary, 'chroot': chroot.path() } graph_info['python_setup'] = { 'default_interpreter': str(default_interpreter.identity), 'interpreters': interpreters_info } return graph_info def _resolve_jars_info(self, targets, classpath_products): """Consults ivy_jar_products to export the external libraries. :return: mapping of jar_id -> { 'default' : <jar_file>, 'sources' : <jar_file>, 'javadoc' : <jar_file>, <other_confs> : <jar_file>, } """ mapping = defaultdict(dict) jar_products = classpath_products.get_artifact_classpath_entries_for_targets( targets, respect_excludes=False) for conf, jar_entry in jar_products: conf = jar_entry.coordinate.classifier or 'default' mapping[self._jar_id(jar_entry.coordinate)][conf] = jar_entry.cache_path return mapping @memoized_property def target_aliases_map(self): registered_aliases = self.context.build_configuration.registered_aliases() mapping = {} for alias, target_types in registered_aliases.target_types_by_alias.items(): # If a target class is registered under multiple aliases returns the last one. for target_type in target_types: mapping[target_type] = alias return mapping def _get_pants_target_alias(self, pants_target_type): """Returns the pants target alias for the given target""" if pants_target_type in self.target_aliases_map: return self.target_aliases_map.get(pants_target_type) else: return "{}.{}".format(pants_target_type.__module__, pants_target_type.__name__) @staticmethod def _source_roots_for_target(target): """ :type target:pants.build_graph.target.Target """ def root_package_prefix(source_file): source = os.path.dirname(source_file) return os.path.join(get_buildroot(), target.target_base, source), source.replace(os.sep, '.') return {root_package_prefix(source) for source in target.sources_relative_to_source_root()} class Export(ExportTask, ConsoleTask): """Export project information in JSON format. Intended for exporting project information for IDE, such as the IntelliJ Pants plugin. """ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def console_output(self, targets, classpath_products=None): graph_info = self.generate_targets_map(targets, classpath_products=classpath_products) if self.get_options().formatted: return json.dumps(graph_info, indent=4, separators=(',', ': ')).splitlines() else: return [json.dumps(graph_info)]
44.285024
100
0.709392
4830965a20d0892745d93688393110ab2193b038
18,094
py
Python
weewx/bin/weewx/drivers/ws1.py
tony-rasskazov/meteo
1cb41cb4f219ff4e13a3ffb377f9ebf228711b96
[ "MIT" ]
null
null
null
weewx/bin/weewx/drivers/ws1.py
tony-rasskazov/meteo
1cb41cb4f219ff4e13a3ffb377f9ebf228711b96
[ "MIT" ]
null
null
null
weewx/bin/weewx/drivers/ws1.py
tony-rasskazov/meteo
1cb41cb4f219ff4e13a3ffb377f9ebf228711b96
[ "MIT" ]
1
2020-07-15T16:38:03.000Z
2020-07-15T16:38:03.000Z
#!/usr/bin/env python # # Copyright 2014 Matthew Wall # See the file LICENSE.txt for your rights. """Driver for ADS WS1 weather stations. Thanks to Kevin and Paul Caccamo for adding the serial-to-tcp capability. Thanks to Steve (sesykes71) for the testing that made this driver possible. Thanks to Jay Nugent (WB8TKL) and KRK6 for weather-2.kr6k-V2.1 http://server1.nuge.com/~weather/ """ from __future__ import with_statement import syslog import time import weewx.drivers DRIVER_NAME = 'WS1' DRIVER_VERSION = '0.24' def loader(config_dict, _): return WS1Driver(**config_dict[DRIVER_NAME]) def confeditor_loader(): return WS1ConfEditor() INHG_PER_MBAR = 0.0295333727 METER_PER_FOOT = 0.3048 MILE_PER_KM = 0.621371 DEFAULT_SER_PORT = '/dev/ttyS0' DEFAULT_TCP_ADDR = '192.168.36.25' DEFAULT_TCP_PORT = 3000 PACKET_SIZE = 50 DEBUG_READ = 0 def logmsg(level, msg): syslog.syslog(level, 'ws1: %s' % msg) def logdbg(msg): logmsg(syslog.LOG_DEBUG, msg) def loginf(msg): logmsg(syslog.LOG_INFO, msg) def logerr(msg): logmsg(syslog.LOG_ERR, msg) class WS1Driver(weewx.drivers.AbstractDevice): """weewx driver that communicates with an ADS-WS1 station mode - Communication mode - TCP, UDP, or Serial. [Required. Default is serial] port - Serial port or network address. [Required. Default is /dev/ttyS0 for serial, and 192.168.36.25:3000 for TCP] max_tries - how often to retry serial communication before giving up. [Optional. Default is 5] retry_wait - how long to wait, in seconds, before retrying after a failure. [Optional. Default is 10] timeout - The amount of time, in seconds, before the connection fails if there is no response. [Optional. Default is 3] debug_read - The level of message logging. The higher this number, the more information is logged. [Optional. Default is 0] """ def __init__(self, **stn_dict): loginf('driver version is %s' % DRIVER_VERSION) con_mode = stn_dict.get('mode', 'serial').lower() if con_mode == 'tcp' or con_mode == 'udp': self.port = stn_dict.get( 'port', '%s:%d' % (DEFAULT_TCP_ADDR, DEFAULT_TCP_PORT)) else: self.port = stn_dict.get('port', DEFAULT_SER_PORT) self.max_tries = int(stn_dict.get('max_tries', 5)) self.retry_wait = int(stn_dict.get('retry_wait', 10)) self.last_rain = None timeout = int(stn_dict.get('timeout', 3)) loginf('using %s port %s' % (con_mode, self.port)) global DEBUG_READ DEBUG_READ = int(stn_dict.get('debug_read', DEBUG_READ)) if con_mode == 'tcp' or con_mode == 'udp': self.station = StationInet(self.port, con_mode, timeout=timeout) else: self.station = StationSerial(self.port, timeout=timeout) self.station.open() def closePort(self): if self.station is not None: self.station.close() self.station = None @property def hardware_name(self): return "WS1" def genLoopPackets(self): while True: packet = {'dateTime': int(time.time() + 0.5), 'usUnits': weewx.US} readings = self.station.get_readings_with_retry(self.max_tries, self.retry_wait) data = StationData.parse_readings(readings) packet.update(data) self._augment_packet(packet) yield packet def _augment_packet(self, packet): # calculate the rain delta from rain total if self.last_rain is not None: packet['rain'] = packet['long_term_rain'] - self.last_rain else: packet['rain'] = None self.last_rain = packet['long_term_rain'] # =========================================================================== # # Station data class - parses and validates data from the device # # =========================================================================== # class StationData(object): def __init__(self): pass @staticmethod def validate_string(buf): if len(buf) != PACKET_SIZE: raise weewx.WeeWxIOError("Unexpected buffer length %d" % len(buf)) if buf[0:2] != '!!': raise weewx.WeeWxIOError("Unexpected header bytes '%s'" % buf[0:2]) return buf @staticmethod def parse_readings(raw): """WS1 station emits data in PeetBros format: http://www.peetbros.com/shop/custom.aspx?recid=29 Each line has 50 characters - 2 header bytes and 48 data bytes: !!000000BE02EB000027700000023A023A0025005800000000 SSSSXXDDTTTTLLLLPPPPttttHHHHhhhhddddmmmmRRRRWWWW SSSS - wind speed (0.1 kph) XX - wind direction calibration DD - wind direction (0-255) TTTT - outdoor temperature (0.1 F) LLLL - long term rain (0.01 in) PPPP - pressure (0.1 mbar) tttt - indoor temperature (0.1 F) HHHH - outdoor humidity (0.1 %) hhhh - indoor humidity (0.1 %) dddd - date (day of year) mmmm - time (minute of day) RRRR - daily rain (0.01 in) WWWW - one minute wind average (0.1 kph) """ # FIXME: peetbros could be 40 bytes or 44 bytes, what about ws1? # FIXME: peetbros uses two's complement for temp, what about ws1? # FIXME: for ws1 is the pressure reading 'pressure' or 'barometer'? buf = raw[2:] data = dict() data['windSpeed'] = StationData._decode(buf[0:4], 0.1 * MILE_PER_KM) # mph data['windDir'] = StationData._decode(buf[6:8], 1.411764) # compass deg data['outTemp'] = StationData._decode(buf[8:12], 0.1, True) # degree_F data['long_term_rain'] = StationData._decode(buf[12:16], 0.01) # inch data['pressure'] = StationData._decode(buf[16:20], 0.1 * INHG_PER_MBAR) # inHg data['inTemp'] = StationData._decode(buf[20:24], 0.1, True) # degree_F data['outHumidity'] = StationData._decode(buf[24:28], 0.1) # percent data['inHumidity'] = StationData._decode(buf[28:32], 0.1) # percent data['day_of_year'] = StationData._decode(buf[32:36]) data['minute_of_day'] = StationData._decode(buf[36:40]) data['daily_rain'] = StationData._decode(buf[40:44], 0.01) # inch data['wind_average'] = StationData._decode(buf[44:48], 0.1 * MILE_PER_KM) # mph return data @staticmethod def _decode(s, multiplier=None, neg=False): v = None try: v = int(s, 16) if neg: bits = 4 * len(s) if v & (1 << (bits - 1)) != 0: v -= (1 << bits) if multiplier is not None: v *= multiplier except ValueError, e: if s != '----': logdbg("decode failed for '%s': %s" % (s, e)) return v # =========================================================================== # # Station Serial class - Gets data through a serial port # # =========================================================================== # class StationSerial(object): def __init__(self, port, timeout=3): self.port = port self.baudrate = 2400 self.timeout = timeout self.serial_port = None def __enter__(self): self.open() return self def __exit__(self, _, value, traceback): self.close() def open(self): import serial logdbg("open serial port %s" % self.port) self.serial_port = serial.Serial(self.port, self.baudrate, timeout=self.timeout) def close(self): if self.serial_port is not None: logdbg("close serial port %s" % self.port) self.serial_port.close() self.serial_port = None # FIXME: use either CR or LF as line terminator. apparently some ws1 # hardware occasionally ends a line with only CR instead of the standard # CR-LF, resulting in a line that is too long. def get_readings(self): buf = self.serial_port.readline() if DEBUG_READ >= 2: logdbg("bytes: '%s'" % ' '.join(["%0.2X" % ord(c) for c in buf])) buf = buf.strip() return buf def get_readings_with_retry(self, max_tries=5, retry_wait=10): import serial for ntries in range(0, max_tries): try: buf = self.get_readings() StationData.validate_string(buf) return buf except (serial.serialutil.SerialException, weewx.WeeWxIOError), e: loginf("Failed attempt %d of %d to get readings: %s" % (ntries + 1, max_tries, e)) time.sleep(retry_wait) else: msg = "Max retries (%d) exceeded for readings" % max_tries logerr(msg) raise weewx.RetriesExceeded(msg) # =========================================================================== # # Station TCP class - Gets data through a TCP/IP connection # # For those users with a serial->TCP adapter # # =========================================================================== # class StationInet(object): def __init__(self, addr, protocol='tcp', timeout=3): import socket ip_addr = None ip_port = None self.protocol = protocol if addr.find(':') != -1: self.conn_info = addr.split(':') try: self.conn_info[1] = int(self.conn_info[1], 10) except TypeError, e: self.conn_info[1] = DEFAULT_TCP_PORT self.conn_info = tuple(self.conn_info) else: ip_addr = addr ip_port = DEFAULT_TCP_PORT self.conn_info = (ip_addr, ip_port) try: if self.protocol == 'tcp': self.net_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM) elif self.protocol == 'udp': self.net_socket = socket.socket( socket.AF_INET, socket.SOCK_DGRAM) except (socket.error, socket.herror), ex: logerr("Cannot create socket for some reason: %s" % ex) raise weewx.WeeWxIOError(ex) self.net_socket.settimeout(timeout) self.rec_start = False def open(self): import socket logdbg("Connecting to %s:%d." % (self.conn_info[0], self.conn_info[1])) try: self.net_socket.connect(self.conn_info) except (socket.error, socket.timeout, socket.herror), ex: logerr("Cannot connect to %s:%d for some reason: %s" % ( self.conn_info[0], self.conn_info[1], ex)) raise weewx.WeeWxIOError(ex) def close(self): import socket logdbg("Closing connection to %s:%d." % (self.conn_info[0], self.conn_info[1])) try: self.net_socket.close() except (socket.error, socket.herror, socket.timeout), ex: logerr("Cannot close connection to %s:%d for some reason: %s" % ( self.conn_info[0], self.conn_info[1], ex)) raise weewx.WeeWxIOError(ex) def get_readings(self): import socket if self.rec_start is not True: # Find the record start if DEBUG_READ >= 1: logdbg("Attempting to find record start..") buf = '' while True: try: buf += self.net_socket.recv(8, socket.MSG_WAITALL) except (socket.error, socket.timeout), ex: raise weewx.WeeWxIOError(ex) if DEBUG_READ >= 1: logdbg("(searching...) buf: %s" % buf) if '!!' in buf: self.rec_start = True if DEBUG_READ >= 1: logdbg("Record start found!") # Cut to the record start buf = buf[buf.find('!!'):] if DEBUG_READ >= 1: logdbg("(found!) buf: %s" % buf) break # Add the rest of the record try: buf += self.net_socket.recv( PACKET_SIZE - len(buf), socket.MSG_WAITALL) except (socket.error, socket.timeout), ex: raise weewx.WeeWxIOError(ex) else: # Keep receiving data until we find an exclamation point or two try: buf = self.net_socket.recv(2, socket.MSG_WAITALL) except (socket.error, socket.timeout), ex: raise weewx.WeeWxIOError(ex) while True: if buf == '\r\n': # CRLF is expected if DEBUG_READ >= 2: logdbg("buf is CRLF") buf = '' break elif '!' in buf: excmks = buf.count('!') # Assuming exclamation points are at the end of the buffer buf = buf[len(buf) - excmks:] if DEBUG_READ >= 2: logdbg("buf has %d exclamation points." % (excmks)) break else: try: buf = self.net_socket.recv(2, socket.MSG_WAITALL) except (socket.error, socket.timeout), ex: raise weewx.WeeWxIOError(ex) if DEBUG_READ >= 2: logdbg("buf: %s" % ' '.join( ['%02X' % ord(bc) for bc in buf])) try: buf += self.net_socket.recv( PACKET_SIZE - len(buf), socket.MSG_WAITALL) except (socket.error, socket.timeout), ex: raise weewx.WeeWxIOError(ex) if DEBUG_READ >= 2: logdbg("buf: %s" % buf) # This code assumes CRLF will be transmitted at the end of each record, # which may not always be the case. See Matthew Wall's comment on # GitHub here: # https://github.com/weewx/weewx/pull/86#issuecomment-166716509 # try: # self.net_socket.recv(2, socket.MSG_WAITALL) # CRLF # except (socket.error, socket.timeout), ex: # raise weewx.WeeWxIOError(ex) buf.strip() return buf def get_readings_with_retry(self, max_tries=5, retry_wait=10): for ntries in range(0, max_tries): buf = '' try: buf = self.get_readings() StationData.validate_string(buf) return buf except (weewx.WeeWxIOError), e: loginf("Failed to get data for some reason: %s" % e) self.rec_start = False # NOTE: WeeWx IO Errors may not always occur because of # invalid data. These kinds of errors are also caused by socket # errors and timeouts. if DEBUG_READ >= 1: logdbg("buf: %s (%d bytes), rec_start: %r" % (buf, len(buf), self.rec_start)) time.sleep(retry_wait) else: msg = "Max retries (%d) exceeded for readings" % max_tries logerr(msg) raise weewx.RetriesExceeded(msg) class WS1ConfEditor(weewx.drivers.AbstractConfEditor): @property def default_stanza(self): return """ [WS1] # This section is for the ADS WS1 series of weather stations. # Driver mode - tcp, udp, or serial mode = serial # If serial, specify the serial port device. (ex. /dev/ttyS0, /dev/ttyUSB0, # or /dev/cuaU0) # If TCP, specify the IP address and port number. (ex. 192.168.36.25:3000) port = /dev/ttyUSB0 # The amount of time, in seconds, before the connection fails if there is # no response timeout = 3 # The driver to use: driver = weewx.drivers.ws1 """ def prompt_for_settings(self): print "How is the station connected? tcp, udp, or serial." con_mode = self._prompt('mode', 'serial') con_mode = con_mode.lower() if con_mode == 'serial': print "Specify the serial port on which the station is connected, " "for example: /dev/ttyUSB0 or /dev/ttyS0." port = self._prompt('port', '/dev/ttyUSB0') elif con_mode == 'tcp' or con_mode == 'udp': print "Specify the IP address and port of the station. For " "example: 192.168.36.40:3000." port = self._prompt('port', '192.168.36.40:3000') print "Specify how long to wait for a response, in seconds." timeout = self._prompt('timeout', 3) return {'mode': con_mode, 'port': port, 'timeout': timeout} # define a main entry point for basic testing of the station without weewx # engine and service overhead. invoke this as follows from the weewx root dir: # # PYTHONPATH=bin python bin/weewx/drivers/ws1.py if __name__ == '__main__': import optparse usage = """%prog [options] [--help]""" syslog.openlog('ws1', syslog.LOG_PID | syslog.LOG_CONS) syslog.setlogmask(syslog.LOG_UPTO(syslog.LOG_DEBUG)) parser = optparse.OptionParser(usage=usage) parser.add_option('--version', dest='version', action='store_true', help='display driver version') parser.add_option('--port', dest='port', metavar='PORT', help='serial port to which the station is connected', default=DEFAULT_PORT) (options, args) = parser.parse_args() if options.version: print "ADS WS1 driver version %s" % DRIVER_VERSION exit(0) with Station(options.port) as s: while True: print time.time(), s.get_readings()
36.406439
88
0.549851
c709d8826838878bf90f056bbf3aeebfa3310839
2,094
py
Python
apps/04_journal/you_try/program.py
robbyrenz/python-jumpstart-course-demos
d14f30e23cbb0349ef1f22559475e4a8157613f0
[ "MIT" ]
null
null
null
apps/04_journal/you_try/program.py
robbyrenz/python-jumpstart-course-demos
d14f30e23cbb0349ef1f22559475e4a8157613f0
[ "MIT" ]
null
null
null
apps/04_journal/you_try/program.py
robbyrenz/python-jumpstart-course-demos
d14f30e23cbb0349ef1f22559475e4a8157613f0
[ "MIT" ]
null
null
null
def main(): # defining a main method; high level code up here print_header() run_event_loop() # main() can't be defined here as Python would not know the definition of the functions in the main method def print_header(): print('-------------------------------') print(' JOURNAL APP') print('-------------------------------') def run_event_loop(): print('What do you want to do with your journal?') cmd = None # just initialize cmd to nothing just to get the while loop to work! journal_data = [] # initializes an empty list # you can also make a list with the list() function while cmd != 'x': cmd = input('[L]ist entries, [A]dd an entry, E[x]it: ') cmd = cmd.lower().strip() if cmd == 'l': list_entries(journal_data) elif cmd == 'a': add_entries(journal_data) elif cmd == '': # if the user doesn't enter anything # print('Please don\'t enter a newline character!') <enter> probably doesn't result in \n, I think print('Please enter something at least!') elif cmd != 'x': print('Sorry, we don\'t understand \'{}\'.'.format(cmd)) print('Done, goodbye.') def list_entries(data): print('Your journal entries: ') entries = reversed(data) # the reversed() function...check if its permanent for idx, entry in enumerate(entries): # enumerate function makes a tuple out of the items with its indexes print('* [{}] {}'.format(idx + 1, entry)) # the below block of code is my very own twist to this app # def list_entries(data): # # print(data) # if len(data) == 0: # if the length of the list is 0... # print('You have no saved messages!') # else: # i = 1 # for message in data: # print(f'{i}. {message}') # # OR: print(str(i) + '. ' + message) # i = i + 1 def add_entries(data): text = input('Type your entry, <enter> to exit: ') data.append(text) main() # invoke the main method so that at least something happens!
32.215385
111
0.575454
3bbf109435c6dc48312104c0a78ab9500a46a4ce
19,405
py
Python
course/views.py
ArnedyNavi/studymate
55e6a2c6717dd478a311ea8bf839a26ca3ef2b40
[ "MIT" ]
4
2021-12-31T17:25:00.000Z
2022-02-08T17:05:46.000Z
course/views.py
ArnedyNavi/studymate
55e6a2c6717dd478a311ea8bf839a26ca3ef2b40
[ "MIT" ]
null
null
null
course/views.py
ArnedyNavi/studymate
55e6a2c6717dd478a311ea8bf839a26ca3ef2b40
[ "MIT" ]
null
null
null
from django.http.response import JsonResponse from django.http import Http404 from django.core.exceptions import PermissionDenied, BadRequest from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect, HttpResponse, HttpResponseNotFound from django.forms.models import model_to_dict from django.core import serializers from django.db.models import Q, Value from django.template import loader import json from django.urls import reverse from .models import * import markdown as md from PIL import Image import os import uuid from studymate.settings import MEDIA_ROOT as media import datetime def preview(request, id): course = Course.objects.filter(id=id).first() if course == None: raise Http404("Course Not Found") else: instructors = course.instructors.all() categories = course.categories.all() contents = [] content_groups = [] content_groupsDB = CourseContentGroup.objects.filter(course=course).order_by("order") for content_group in content_groupsDB: content = CourseContent.objects.filter(content_group = content_group).order_by("order") content_group = {"title": content_group.title, "contents": content} content_groups.append(content_group) usercourseDB = UserCourse.objects.filter(user=request.user, course__id=id).first() if usercourseDB == None: enrolled = False else: enrolled = True context = { "course": course, "instructors": instructors, "categories": categories, "content_groups": content_groups, "enrolled": enrolled } return render(request, "course/preview.html", context) def enroll(request, course_id): if request.method == "POST": userCourseDB = UserCourse.objects.filter(user=request.user, course__id=course_id).first() if userCourseDB == None: course = Course.objects.filter(id=course_id).first() usercourseDB = UserCourse(user=request.user, course=course) usercourseDB.save() firstContentGroup = CourseContentGroup.objects.filter(course=course).order_by("order").first() firstContent = CourseContent.objects.filter(content_group=firstContentGroup).order_by("order").first() userProgress = CourseUserProgress(info=usercourseDB, last_content=firstContent.id) contents = CourseContent.objects.filter(content_group__course=course) for content in contents: userContentProgress = ContentUserProgress(content=content, user=request.user) userContentProgress.save() contentgroups = CourseContentGroup.objects.filter(course=course) for group in contentgroups: userContentGroupProgress = ContentGroupUserProgress(content_group=group, user=request.user) userContentGroupProgress.save() output = { "status": "success" } return JsonResponse(output) else: raise PermissionDenied() def unenroll(request): if request.method == "POST": data = request.POST course_id = data.get("id", -1) userCourseDB = UserCourse.objects.filter(user=request.user, course__id=course_id).first() if userCourseDB != None: course = Course.objects.filter(id=course_id).first() userCourseProgress = CourseUserProgress.objects.filter(info=userCourseDB) userCourseProgress.delete() userCourseDB.delete() userContentsProgress = ContentUserProgress.objects.filter(content__content_group__course=course, user=request.user) for userContent in userContentsProgress: userContent.delete() userContentGroupProgress = ContentGroupUserProgress.objects.filter(content_group__course=course, user=request.user) for group in userContentGroupProgress: group.delete() output = { "status": "success" } return JsonResponse(output) def resetLastContent(userprogress, course_id): firstContentGroup = CourseContentGroup.objects.filter(course__id=course_id).order_by("order").first() firstContent = CourseContent.objects.filter(content_group=firstContentGroup).order_by("order").first() userprogress.last_content = firstContent.id userprogress.save() return firstContent def learn(request, course_id): usercourseDB = UserCourse.objects.filter(course__id=course_id, user=request.user).first() if usercourseDB == None: return HttpResponseRedirect(reverse("course_preview", args=[course_id])) else: userprogress = CourseUserProgress.objects.filter(info=usercourseDB).first() if userprogress == None: userprogress = CourseUserProgress(info=usercourseDB) userprogress.save() course = Course.objects.filter(id=course_id).first() last_group = CourseContent.objects.filter(id=userprogress.last_content).first() if last_group == None: last_group = resetLastContent(userprogress, course_id) last_group = last_group.content_group.id context = { "user_data": usercourseDB, "progress": userprogress, "course": course, "last_content_group": last_group } return render(request, "course/learn.html", context) def search(request): return render(request, "course/search.html") def search_info(request): query = request.GET["query"] courses = Course.objects.filter(Q(name__icontains = query) | Q(description__icontains = query)).order_by('-overall_ratings').distinct() html_response = loader.render_to_string("course/search_card_temp.html", {"courses": courses}) html_response = html_response.strip() output = { "status": "success", "html": html_response } return JsonResponse(output) def my_course(request): course_inprogress = UserCourse.objects.filter(user=request.user, completed=False).order_by("-start_date") course_completed = UserCourse.objects.filter(user=request.user, completed=True).order_by("-complete_date") course_byuser = Course.objects.filter(maker=request.user) context = { "course_inprogress": course_inprogress, "course_completed": course_completed, "course_byuser": course_byuser } return render(request, "course/mycourse.html", context) @csrf_exempt def make_course(request): if request.method == "POST": data = request.POST files = request.FILES name = data["name"] desc = data["desc"] categories = json.loads(data["categories"]) contents = json.loads(data["content"]) instructors = json.loads(data["instructors"]) thumbnail = "" profile_instructors = {} for file in files: if file == "thumbnail": thumbnail = files[file] else: owner = int(file.split("-")[-1]) profile_instructors[owner] = files[file] i = 0 instructorsDB = [] for instructor in instructors: image = profile_instructors.get(i, 0) if image == 0: instructorModel = CourseInstructor(name=instructor) else: instructorModel = CourseInstructor(name=instructor, profile_image=image) instructorModel.save() instructorsDB.append(instructorModel) i += 1 categoriesDB =[] for category in categories: categoryDB = CourseCategory.objects.filter(name=category).first() if categoryDB == None: categoryDB = CourseCategory(name=category) categoryDB.save() categoriesDB.append(categoryDB) if thumbnail != "": course = Course(name=name, description=desc, banner_image=thumbnail, maker=request.user) else: course = Course(name=name, description=desc, banner_image=thumbnail, maker=request.user) course.save() for category in categoriesDB: course.categories.add(category) for instructor in instructorsDB: course.instructors.add(instructor) course.save() for i in range(len(contents)): content_group = CourseContentGroup(course=course, title=contents[i]["subTopicTitle"], order=i+1) content_group.save() for j in range(len(contents[i]["contents"])): content_now = contents[i]["contents"][j] title = content_now["title"] type = content_now["type"] if type == "text": isVideo = False else: isVideo = True video_link = content_now["video_link"] text_content = content_now["text_content"] content = CourseContent(content_group=content_group, title=title, is_video=isVideo, video_link=video_link, content=text_content, order=j+1) content.save() output = { "status": "success", "url": reverse("course_preview", args=[course.id]) } return JsonResponse(output) return render(request, "course/add.html") @csrf_exempt def upload_image(request): if request.method == "POST": file = request.FILES data = request.POST if len(file) != 0: img = Image.open(file["image"]) filename_before = file["image"].name filename = "/course/content/uploads/" + str(uuid.uuid4()) + ".jpg" img.save(media + filename, "JPEG") output = { "status": "success", "url": "/media" + filename, "filename": filename_before } else: output = { "status": "failed" } return JsonResponse(output) @csrf_exempt def markdown(request): if request.method == "POST": data = request.POST text = data["text"] md_ext = md.Markdown(extensions=["markdown_markup_emoji.markup_emoji", 'mdx_math', 'tables', 'footnotes', 'def_list', 'abbr', 'attr_list', 'fenced_code']) html = md_ext.convert(text) output = { "status": "success", "html": html } return JsonResponse(output) def markdown_func(text): md_ext = md.Markdown(extensions=["markdown_markup_emoji.markup_emoji", 'mdx_math', 'tables', 'footnotes', 'def_list', 'abbr', 'attr_list', 'fenced_code']) html = md_ext.convert(text) return html @login_required def finishContent(request): if request.method == "POST": content_id = request.POST.get("id", -1) if content_id != -1: userContentProgress = ContentUserProgress.objects.filter(content__id=content_id, user=request.user).first() if userContentProgress == None: output = { "status": "failed" } else: if userContentProgress.completed == False: userContentProgress.completed = True userContentProgress.save() courseContentDB = CourseContent.objects.filter(id=content_id).first() checkFinishGroup(request, courseContentDB.content_group) output = { "status": "success" } else: output = { "status": "failed" } return JsonResponse(output) def checkFinishGroup(request, content_group): contentsDB = ContentUserProgress.objects.filter(content__content_group=content_group, user=request.user) finish = True for content in contentsDB: if content.completed == False: finish = False if finish == True: userContentGroupProgress = ContentGroupUserProgress.objects.filter(content_group=content_group, user=request.user).first() userContentGroupProgress.completed = True userContentGroupProgress.save() @login_required def completeContent(request): status = "failed" if request.method == "POST": data = request.POST content_id = data["id"] userContentProgress = ContentUserProgress.objects.filter(content__id=content_id, user=request.user).first() if userContentProgress != None: userContentProgress.completed = True userContentProgress.save() checkFinishGroup(request, userContentProgress.content.content_group) status = "success" output = { "status": status } return JsonResponse(output) @login_required def setLastViewed(request): status = "failed" if request.method == "POST": data = request.POST content_id = data["id"] content = CourseContent.objects.filter(id=content_id).first() if content != None: course = content.content_group.course userprogress = CourseUserProgress.objects.filter(info__course=course).first() if userprogress != None: userprogress.last_content = content_id userprogress.save() status = "success" output = { 'status': status } return JsonResponse(output) @login_required def validateCompletion(request): status = "failed" completed = False if request.method == "POST": data = request.POST course_id = data.get("id", -1) if course_id != -1: userGroupProgress = ContentGroupUserProgress.objects.filter(content_group__course__id=course_id, user=request.user) completed = True for progress in userGroupProgress: if progress.completed == False: completed = False if completed: userCourseInfo = UserCourse.objects.filter(user=request.user, course__id=course_id).first() if userCourseInfo != None: if userCourseInfo.completed == False: userCourseInfo.completed = True userCourseInfo.complete_date = datetime.datetime.now() userCourseInfo.save() status = "success" output = { "status": status, "completed": completed } return JsonResponse(output) @login_required def getCourseInfo(request): data = request.GET by = data["by"] course = data.get("course", -1) group = data.get("group", -1) content = data.get("content", -1) data = {} status = "failed" if by != -1: if by == "course": if course != -1: courseDB = Course.objects.filter(id=course) if len(courseDB) != 0: userCourse = UserCourse.objects.filter(user=request.user, course=courseDB.first()).first() if userCourse != None: status = "success" courseDB = Course.objects.filter(id=course) course_info = list(courseDB.values())[0] groupDB = CourseContentGroup.objects.filter(course=courseDB.first()).order_by('order') group_info = list(groupDB.values()) content_info = None data["course"] = course_info data["groups"] = group_info elif by == "group": if group != -1: groupDB = CourseContentGroup.objects.filter(id=group).first() if groupDB != None: courseDB = groupDB.course userCourse = UserCourse.objects.filter(user=request.user, course=courseDB).first() if userCourse != None: status = "success" contentsDB = CourseContent.objects.filter(content_group=groupDB).order_by('order') info = json.loads(serializers.serialize('json', [courseDB, groupDB])) data["course"] = info[0]["fields"] data["groups"] = info[1]["fields"] data["contents"] = list(contentsDB.values('id', 'title', 'is_video')) elif by == "content": if content != -1: contentDB = CourseContent.objects.filter(id=content).first() if contentDB != None: groupDB = contentDB.content_group courseDB = groupDB.course userCourse = UserCourse.objects.filter(user=request.user, course=courseDB).first() if userCourse != None: status = "success" info = json.loads(serializers.serialize('json', [courseDB, groupDB, contentDB])) data["course"] = info[0]["fields"] data["groups"] = info[1]["fields"] data["contents"] = info[2]["fields"] data["contents"]["content"] = markdown_func(data["contents"]["content"]) output = { "status": status, "data": data } return JsonResponse(output) @login_required def getUserCourseInfo(request): data = request.GET by = data["by"] course = data.get("course", -1) group = data.get("group", -1) data = {} status = "failed" if by != -1: if by == "course": if course != -1: courseDB = Course.objects.filter(id=course) if len(courseDB) != 0: userCourse = UserCourse.objects.filter(user=request.user, course=courseDB.first()).first() if userCourse != None: status = "success" contentGroupProgress = ContentGroupUserProgress.objects.filter(content_group__course__id=course, user=request.user).order_by("content_group__order") if len(contentGroupProgress) != 0: groupProgressInfo = list(contentGroupProgress.values()) data["group_progress"] = groupProgressInfo elif by == "group": if group != -1: groupDB = CourseContentGroup.objects.filter(id=group) if len(groupDB) != 0: userCourse = UserCourse.objects.filter(user=request.user, course=groupDB.first().course).first() if userCourse != None: status = "success" contentProgress = ContentUserProgress.objects.filter(content__content_group__id = group, user=request.user).order_by("content__order") if len(contentProgress) != 0: contentProgressInfo = list(contentProgress.values()) data["content_progress"] = contentProgressInfo output = { "status": status, "data": data } return JsonResponse(output)
39.441057
172
0.59629
26f6aeab90dfd6245953ae471f11d7e36452dc3c
562
py
Python
trade_remedies_api/organisations/migrations/0002_organisation_duplicate_of.py
uktrade/trade-remedies-api
fbe2d142ef099c7244788a0f72dd1003eaa7edce
[ "MIT" ]
1
2020-08-13T10:37:15.000Z
2020-08-13T10:37:15.000Z
trade_remedies_api/organisations/migrations/0002_organisation_duplicate_of.py
uktrade/trade-remedies-api
fbe2d142ef099c7244788a0f72dd1003eaa7edce
[ "MIT" ]
4
2020-09-10T13:41:52.000Z
2020-12-16T09:00:21.000Z
trade_remedies_api/organisations/migrations/0002_organisation_duplicate_of.py
uktrade/trade-remedies-api
fbe2d142ef099c7244788a0f72dd1003eaa7edce
[ "MIT" ]
null
null
null
# Generated by Django 2.0.1 on 2018-10-24 13:24 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("organisations", "0001_initial"), ] operations = [ migrations.AddField( model_name="organisation", name="duplicate_of", field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.PROTECT, to="organisations.Organisation", ), ), ]
23.416667
60
0.580071
2ed403e95cb9222d6a37a2fbc8647e211c774a4b
33,020
py
Python
torchvision/transforms/functional_tensor.py
mhhabdelwahab/vision
21790df9a4f77bd9ec4db44de04594cb539457a7
[ "BSD-3-Clause" ]
null
null
null
torchvision/transforms/functional_tensor.py
mhhabdelwahab/vision
21790df9a4f77bd9ec4db44de04594cb539457a7
[ "BSD-3-Clause" ]
null
null
null
torchvision/transforms/functional_tensor.py
mhhabdelwahab/vision
21790df9a4f77bd9ec4db44de04594cb539457a7
[ "BSD-3-Clause" ]
null
null
null
import warnings from typing import Optional, Tuple, List import torch from torch import Tensor from torch.nn.functional import grid_sample, conv2d, interpolate, pad as torch_pad def _is_tensor_a_torch_image(x: Tensor) -> bool: return x.ndim >= 2 def _assert_image_tensor(img: Tensor) -> None: if not _is_tensor_a_torch_image(img): raise TypeError("Tensor is not a torch image.") def _assert_threshold(img: Tensor, threshold: float) -> None: bound = 1 if img.is_floating_point() else 255 if threshold > bound: raise TypeError("Threshold should be less than bound of img.") def get_image_size(img: Tensor) -> List[int]: # Returns (w, h) of tensor image _assert_image_tensor(img) return [img.shape[-1], img.shape[-2]] def get_image_num_channels(img: Tensor) -> int: if img.ndim == 2: return 1 elif img.ndim > 2: return img.shape[-3] raise TypeError(f"Input ndim should be 2 or more. Got {img.ndim}") def _max_value(dtype: torch.dtype) -> float: # TODO: replace this method with torch.iinfo when it gets torchscript support. # https://github.com/pytorch/pytorch/issues/41492 a = torch.tensor(2, dtype=dtype) signed = 1 if torch.tensor(0, dtype=dtype).is_signed() else 0 bits = 1 max_value = torch.tensor(-signed, dtype=torch.long) while True: next_value = a.pow(bits - signed).sub(1) if next_value > max_value: max_value = next_value bits *= 2 else: break return max_value.item() def _assert_channels(img: Tensor, permitted: List[int]) -> None: c = get_image_num_channels(img) if c not in permitted: raise TypeError(f"Input image tensor permitted channel values are {permitted}, but found {c}") def convert_image_dtype(image: torch.Tensor, dtype: torch.dtype = torch.float) -> torch.Tensor: if image.dtype == dtype: return image if image.is_floating_point(): # TODO: replace with dtype.is_floating_point when torchscript supports it if torch.tensor(0, dtype=dtype).is_floating_point(): return image.to(dtype) # float to int if (image.dtype == torch.float32 and dtype in (torch.int32, torch.int64)) or ( image.dtype == torch.float64 and dtype == torch.int64 ): msg = f"The cast from {image.dtype} to {dtype} cannot be performed safely." raise RuntimeError(msg) # https://github.com/pytorch/vision/pull/2078#issuecomment-612045321 # For data in the range 0-1, (float * 255).to(uint) is only 255 # when float is exactly 1.0. # `max + 1 - epsilon` provides more evenly distributed mapping of # ranges of floats to ints. eps = 1e-3 max_val = _max_value(dtype) result = image.mul(max_val + 1.0 - eps) return result.to(dtype) else: input_max = _max_value(image.dtype) # int to float # TODO: replace with dtype.is_floating_point when torchscript supports it if torch.tensor(0, dtype=dtype).is_floating_point(): image = image.to(dtype) return image / input_max output_max = _max_value(dtype) # int to int if input_max > output_max: # factor should be forced to int for torch jit script # otherwise factor is a float and image // factor can produce different results factor = int((input_max + 1) // (output_max + 1)) image = torch.div(image, factor, rounding_mode="floor") return image.to(dtype) else: # factor should be forced to int for torch jit script # otherwise factor is a float and image * factor can produce different results factor = int((output_max + 1) // (input_max + 1)) image = image.to(dtype) return image * factor def vflip(img: Tensor) -> Tensor: _assert_image_tensor(img) return img.flip(-2) def hflip(img: Tensor) -> Tensor: _assert_image_tensor(img) return img.flip(-1) def crop(img: Tensor, top: int, left: int, height: int, width: int) -> Tensor: _assert_image_tensor(img) w, h = get_image_size(img) right = left + width bottom = top + height if left < 0 or top < 0 or right > w or bottom > h: padding_ltrb = [max(-left, 0), max(-top, 0), max(right - w, 0), max(bottom - h, 0)] return pad(img[..., max(top, 0) : bottom, max(left, 0) : right], padding_ltrb, fill=0) return img[..., top:bottom, left:right] def rgb_to_grayscale(img: Tensor, num_output_channels: int = 1) -> Tensor: if img.ndim < 3: raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") _assert_channels(img, [3]) if num_output_channels not in (1, 3): raise ValueError("num_output_channels should be either 1 or 3") r, g, b = img.unbind(dim=-3) # This implementation closely follows the TF one: # https://github.com/tensorflow/tensorflow/blob/v2.3.0/tensorflow/python/ops/image_ops_impl.py#L2105-L2138 l_img = (0.2989 * r + 0.587 * g + 0.114 * b).to(img.dtype) l_img = l_img.unsqueeze(dim=-3) if num_output_channels == 3: return l_img.expand(img.shape) return l_img def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor: if brightness_factor < 0: raise ValueError(f"brightness_factor ({brightness_factor}) is not non-negative.") _assert_image_tensor(img) _assert_channels(img, [1, 3]) return _blend(img, torch.zeros_like(img), brightness_factor) def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor: if contrast_factor < 0: raise ValueError(f"contrast_factor ({contrast_factor}) is not non-negative.") _assert_image_tensor(img) _assert_channels(img, [3, 1]) c = get_image_num_channels(img) dtype = img.dtype if torch.is_floating_point(img) else torch.float32 if c == 3: mean = torch.mean(rgb_to_grayscale(img).to(dtype), dim=(-3, -2, -1), keepdim=True) else: mean = torch.mean(img.to(dtype), dim=(-3, -2, -1), keepdim=True) return _blend(img, mean, contrast_factor) def adjust_hue(img: Tensor, hue_factor: float) -> Tensor: if not (-0.5 <= hue_factor <= 0.5): raise ValueError(f"hue_factor ({hue_factor}) is not in [-0.5, 0.5].") if not (isinstance(img, torch.Tensor)): raise TypeError("Input img should be Tensor image") _assert_image_tensor(img) _assert_channels(img, [1, 3]) if get_image_num_channels(img) == 1: # Match PIL behaviour return img orig_dtype = img.dtype if img.dtype == torch.uint8: img = img.to(dtype=torch.float32) / 255.0 img = _rgb2hsv(img) h, s, v = img.unbind(dim=-3) h = (h + hue_factor) % 1.0 img = torch.stack((h, s, v), dim=-3) img_hue_adj = _hsv2rgb(img) if orig_dtype == torch.uint8: img_hue_adj = (img_hue_adj * 255.0).to(dtype=orig_dtype) return img_hue_adj def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor: if saturation_factor < 0: raise ValueError(f"saturation_factor ({saturation_factor}) is not non-negative.") _assert_image_tensor(img) _assert_channels(img, [1, 3]) if get_image_num_channels(img) == 1: # Match PIL behaviour return img return _blend(img, rgb_to_grayscale(img), saturation_factor) def adjust_gamma(img: Tensor, gamma: float, gain: float = 1) -> Tensor: if not isinstance(img, torch.Tensor): raise TypeError("Input img should be a Tensor.") _assert_channels(img, [1, 3]) if gamma < 0: raise ValueError("Gamma should be a non-negative real number") result = img dtype = img.dtype if not torch.is_floating_point(img): result = convert_image_dtype(result, torch.float32) result = (gain * result ** gamma).clamp(0, 1) result = convert_image_dtype(result, dtype) return result def _blend(img1: Tensor, img2: Tensor, ratio: float) -> Tensor: ratio = float(ratio) bound = 1.0 if img1.is_floating_point() else 255.0 return (ratio * img1 + (1.0 - ratio) * img2).clamp(0, bound).to(img1.dtype) def _rgb2hsv(img: Tensor) -> Tensor: r, g, b = img.unbind(dim=-3) # Implementation is based on https://github.com/python-pillow/Pillow/blob/4174d4267616897df3746d315d5a2d0f82c656ee/ # src/libImaging/Convert.c#L330 maxc = torch.max(img, dim=-3).values minc = torch.min(img, dim=-3).values # The algorithm erases S and H channel where `maxc = minc`. This avoids NaN # from happening in the results, because # + S channel has division by `maxc`, which is zero only if `maxc = minc` # + H channel has division by `(maxc - minc)`. # # Instead of overwriting NaN afterwards, we just prevent it from occuring so # we don't need to deal with it in case we save the NaN in a buffer in # backprop, if it is ever supported, but it doesn't hurt to do so. eqc = maxc == minc cr = maxc - minc # Since `eqc => cr = 0`, replacing denominator with 1 when `eqc` is fine. ones = torch.ones_like(maxc) s = cr / torch.where(eqc, ones, maxc) # Note that `eqc => maxc = minc = r = g = b`. So the following calculation # of `h` would reduce to `bc - gc + 2 + rc - bc + 4 + rc - bc = 6` so it # would not matter what values `rc`, `gc`, and `bc` have here, and thus # replacing denominator with 1 when `eqc` is fine. cr_divisor = torch.where(eqc, ones, cr) rc = (maxc - r) / cr_divisor gc = (maxc - g) / cr_divisor bc = (maxc - b) / cr_divisor hr = (maxc == r) * (bc - gc) hg = ((maxc == g) & (maxc != r)) * (2.0 + rc - bc) hb = ((maxc != g) & (maxc != r)) * (4.0 + gc - rc) h = hr + hg + hb h = torch.fmod((h / 6.0 + 1.0), 1.0) return torch.stack((h, s, maxc), dim=-3) def _hsv2rgb(img: Tensor) -> Tensor: h, s, v = img.unbind(dim=-3) i = torch.floor(h * 6.0) f = (h * 6.0) - i i = i.to(dtype=torch.int32) p = torch.clamp((v * (1.0 - s)), 0.0, 1.0) q = torch.clamp((v * (1.0 - s * f)), 0.0, 1.0) t = torch.clamp((v * (1.0 - s * (1.0 - f))), 0.0, 1.0) i = i % 6 mask = i.unsqueeze(dim=-3) == torch.arange(6, device=i.device).view(-1, 1, 1) a1 = torch.stack((v, q, p, p, t, v), dim=-3) a2 = torch.stack((t, v, v, q, p, p), dim=-3) a3 = torch.stack((p, p, t, v, v, q), dim=-3) a4 = torch.stack((a1, a2, a3), dim=-4) return torch.einsum("...ijk, ...xijk -> ...xjk", mask.to(dtype=img.dtype), a4) def _pad_symmetric(img: Tensor, padding: List[int]) -> Tensor: # padding is left, right, top, bottom # crop if needed if padding[0] < 0 or padding[1] < 0 or padding[2] < 0 or padding[3] < 0: neg_min_padding = [-min(x, 0) for x in padding] crop_left, crop_right, crop_top, crop_bottom = neg_min_padding img = img[..., crop_top : img.shape[-2] - crop_bottom, crop_left : img.shape[-1] - crop_right] padding = [max(x, 0) for x in padding] in_sizes = img.size() _x_indices = [i for i in range(in_sizes[-1])] # [0, 1, 2, 3, ...] left_indices = [i for i in range(padding[0] - 1, -1, -1)] # e.g. [3, 2, 1, 0] right_indices = [-(i + 1) for i in range(padding[1])] # e.g. [-1, -2, -3] x_indices = torch.tensor(left_indices + _x_indices + right_indices, device=img.device) _y_indices = [i for i in range(in_sizes[-2])] top_indices = [i for i in range(padding[2] - 1, -1, -1)] bottom_indices = [-(i + 1) for i in range(padding[3])] y_indices = torch.tensor(top_indices + _y_indices + bottom_indices, device=img.device) ndim = img.ndim if ndim == 3: return img[:, y_indices[:, None], x_indices[None, :]] elif ndim == 4: return img[:, :, y_indices[:, None], x_indices[None, :]] else: raise RuntimeError("Symmetric padding of N-D tensors are not supported yet") def pad(img: Tensor, padding: List[int], fill: int = 0, padding_mode: str = "constant") -> Tensor: _assert_image_tensor(img) if not isinstance(padding, (int, tuple, list)): raise TypeError("Got inappropriate padding arg") if not isinstance(fill, (int, float)): raise TypeError("Got inappropriate fill arg") if not isinstance(padding_mode, str): raise TypeError("Got inappropriate padding_mode arg") if isinstance(padding, tuple): padding = list(padding) if isinstance(padding, list) and len(padding) not in [1, 2, 4]: raise ValueError(f"Padding must be an int or a 1, 2, or 4 element tuple, not a {len(padding)} element tuple") if padding_mode not in ["constant", "edge", "reflect", "symmetric"]: raise ValueError("Padding mode should be either constant, edge, reflect or symmetric") if isinstance(padding, int): if torch.jit.is_scripting(): # This maybe unreachable raise ValueError("padding can't be an int while torchscripting, set it as a list [value, ]") pad_left = pad_right = pad_top = pad_bottom = padding elif len(padding) == 1: pad_left = pad_right = pad_top = pad_bottom = padding[0] elif len(padding) == 2: pad_left = pad_right = padding[0] pad_top = pad_bottom = padding[1] else: pad_left = padding[0] pad_top = padding[1] pad_right = padding[2] pad_bottom = padding[3] p = [pad_left, pad_right, pad_top, pad_bottom] if padding_mode == "edge": # remap padding_mode str padding_mode = "replicate" elif padding_mode == "symmetric": # route to another implementation return _pad_symmetric(img, p) need_squeeze = False if img.ndim < 4: img = img.unsqueeze(dim=0) need_squeeze = True out_dtype = img.dtype need_cast = False if (padding_mode != "constant") and img.dtype not in (torch.float32, torch.float64): # Here we temporary cast input tensor to float # until pytorch issue is resolved : # https://github.com/pytorch/pytorch/issues/40763 need_cast = True img = img.to(torch.float32) img = torch_pad(img, p, mode=padding_mode, value=float(fill)) if need_squeeze: img = img.squeeze(dim=0) if need_cast: img = img.to(out_dtype) return img def resize( img: Tensor, size: List[int], interpolation: str = "bilinear", max_size: Optional[int] = None, antialias: Optional[bool] = None, ) -> Tensor: _assert_image_tensor(img) if not isinstance(size, (int, tuple, list)): raise TypeError("Got inappropriate size arg") if not isinstance(interpolation, str): raise TypeError("Got inappropriate interpolation arg") if interpolation not in ["nearest", "bilinear", "bicubic"]: raise ValueError("This interpolation mode is unsupported with Tensor input") if isinstance(size, tuple): size = list(size) if isinstance(size, list): if len(size) not in [1, 2]: raise ValueError( f"Size must be an int or a 1 or 2 element tuple/list, not a {len(size)} element tuple/list" ) if max_size is not None and len(size) != 1: raise ValueError( "max_size should only be passed if size specifies the length of the smaller edge, " "i.e. size should be an int or a sequence of length 1 in torchscript mode." ) if antialias is None: antialias = False if antialias and interpolation not in ["bilinear", "bicubic"]: raise ValueError("Antialias option is supported for bilinear and bicubic interpolation modes only") w, h = get_image_size(img) if isinstance(size, int) or len(size) == 1: # specified size only for the smallest edge short, long = (w, h) if w <= h else (h, w) requested_new_short = size if isinstance(size, int) else size[0] if short == requested_new_short: return img new_short, new_long = requested_new_short, int(requested_new_short * long / short) if max_size is not None: if max_size <= requested_new_short: raise ValueError( f"max_size = {max_size} must be strictly greater than the requested " f"size for the smaller edge size = {size}" ) if new_long > max_size: new_short, new_long = int(max_size * new_short / new_long), max_size new_w, new_h = (new_short, new_long) if w <= h else (new_long, new_short) else: # specified both h and w new_w, new_h = size[1], size[0] img, need_cast, need_squeeze, out_dtype = _cast_squeeze_in(img, [torch.float32, torch.float64]) # Define align_corners to avoid warnings align_corners = False if interpolation in ["bilinear", "bicubic"] else None if antialias: if interpolation == "bilinear": img = torch.ops.torchvision._interpolate_bilinear2d_aa(img, [new_h, new_w], align_corners=False) elif interpolation == "bicubic": img = torch.ops.torchvision._interpolate_bicubic2d_aa(img, [new_h, new_w], align_corners=False) else: img = interpolate(img, size=[new_h, new_w], mode=interpolation, align_corners=align_corners) if interpolation == "bicubic" and out_dtype == torch.uint8: img = img.clamp(min=0, max=255) img = _cast_squeeze_out(img, need_cast=need_cast, need_squeeze=need_squeeze, out_dtype=out_dtype) return img def _assert_grid_transform_inputs( img: Tensor, matrix: Optional[List[float]], interpolation: str, fill: Optional[List[float]], supported_interpolation_modes: List[str], coeffs: Optional[List[float]] = None, ) -> None: if not (isinstance(img, torch.Tensor)): raise TypeError("Input img should be Tensor") _assert_image_tensor(img) if matrix is not None and not isinstance(matrix, list): raise TypeError("Argument matrix should be a list") if matrix is not None and len(matrix) != 6: raise ValueError("Argument matrix should have 6 float values") if coeffs is not None and len(coeffs) != 8: raise ValueError("Argument coeffs should have 8 float values") if fill is not None and not isinstance(fill, (int, float, tuple, list)): warnings.warn("Argument fill should be either int, float, tuple or list") # Check fill num_channels = get_image_num_channels(img) if isinstance(fill, (tuple, list)) and (len(fill) > 1 and len(fill) != num_channels): msg = ( "The number of elements in 'fill' cannot broadcast to match the number of " "channels of the image ({} != {})" ) raise ValueError(msg.format(len(fill), num_channels)) if interpolation not in supported_interpolation_modes: raise ValueError(f"Interpolation mode '{interpolation}' is unsupported with Tensor input") def _cast_squeeze_in(img: Tensor, req_dtypes: List[torch.dtype]) -> Tuple[Tensor, bool, bool, torch.dtype]: need_squeeze = False # make image NCHW if img.ndim < 4: img = img.unsqueeze(dim=0) need_squeeze = True out_dtype = img.dtype need_cast = False if out_dtype not in req_dtypes: need_cast = True req_dtype = req_dtypes[0] img = img.to(req_dtype) return img, need_cast, need_squeeze, out_dtype def _cast_squeeze_out(img: Tensor, need_cast: bool, need_squeeze: bool, out_dtype: torch.dtype) -> Tensor: if need_squeeze: img = img.squeeze(dim=0) if need_cast: if out_dtype in (torch.uint8, torch.int8, torch.int16, torch.int32, torch.int64): # it is better to round before cast img = torch.round(img) img = img.to(out_dtype) return img def _apply_grid_transform(img: Tensor, grid: Tensor, mode: str, fill: Optional[List[float]]) -> Tensor: img, need_cast, need_squeeze, out_dtype = _cast_squeeze_in( img, [ grid.dtype, ], ) if img.shape[0] > 1: # Apply same grid to a batch of images grid = grid.expand(img.shape[0], grid.shape[1], grid.shape[2], grid.shape[3]) # Append a dummy mask for customized fill colors, should be faster than grid_sample() twice if fill is not None: dummy = torch.ones((img.shape[0], 1, img.shape[2], img.shape[3]), dtype=img.dtype, device=img.device) img = torch.cat((img, dummy), dim=1) img = grid_sample(img, grid, mode=mode, padding_mode="zeros", align_corners=False) # Fill with required color if fill is not None: mask = img[:, -1:, :, :] # N * 1 * H * W img = img[:, :-1, :, :] # N * C * H * W mask = mask.expand_as(img) len_fill = len(fill) if isinstance(fill, (tuple, list)) else 1 fill_img = torch.tensor(fill, dtype=img.dtype, device=img.device).view(1, len_fill, 1, 1).expand_as(img) if mode == "nearest": mask = mask < 0.5 img[mask] = fill_img[mask] else: # 'bilinear' img = img * mask + (1.0 - mask) * fill_img img = _cast_squeeze_out(img, need_cast, need_squeeze, out_dtype) return img def _gen_affine_grid( theta: Tensor, w: int, h: int, ow: int, oh: int, ) -> Tensor: # https://github.com/pytorch/pytorch/blob/74b65c32be68b15dc7c9e8bb62459efbfbde33d8/aten/src/ATen/native/ # AffineGridGenerator.cpp#L18 # Difference with AffineGridGenerator is that: # 1) we normalize grid values after applying theta # 2) we can normalize by other image size, such that it covers "extend" option like in PIL.Image.rotate d = 0.5 base_grid = torch.empty(1, oh, ow, 3, dtype=theta.dtype, device=theta.device) x_grid = torch.linspace(-ow * 0.5 + d, ow * 0.5 + d - 1, steps=ow, device=theta.device) base_grid[..., 0].copy_(x_grid) y_grid = torch.linspace(-oh * 0.5 + d, oh * 0.5 + d - 1, steps=oh, device=theta.device).unsqueeze_(-1) base_grid[..., 1].copy_(y_grid) base_grid[..., 2].fill_(1) rescaled_theta = theta.transpose(1, 2) / torch.tensor([0.5 * w, 0.5 * h], dtype=theta.dtype, device=theta.device) output_grid = base_grid.view(1, oh * ow, 3).bmm(rescaled_theta) return output_grid.view(1, oh, ow, 2) def affine( img: Tensor, matrix: List[float], interpolation: str = "nearest", fill: Optional[List[float]] = None ) -> Tensor: _assert_grid_transform_inputs(img, matrix, interpolation, fill, ["nearest", "bilinear"]) dtype = img.dtype if torch.is_floating_point(img) else torch.float32 theta = torch.tensor(matrix, dtype=dtype, device=img.device).reshape(1, 2, 3) shape = img.shape # grid will be generated on the same device as theta and img grid = _gen_affine_grid(theta, w=shape[-1], h=shape[-2], ow=shape[-1], oh=shape[-2]) return _apply_grid_transform(img, grid, interpolation, fill=fill) def _compute_output_size(matrix: List[float], w: int, h: int) -> Tuple[int, int]: # Inspired of PIL implementation: # https://github.com/python-pillow/Pillow/blob/11de3318867e4398057373ee9f12dcb33db7335c/src/PIL/Image.py#L2054 # pts are Top-Left, Top-Right, Bottom-Left, Bottom-Right points. pts = torch.tensor( [ [-0.5 * w, -0.5 * h, 1.0], [-0.5 * w, 0.5 * h, 1.0], [0.5 * w, 0.5 * h, 1.0], [0.5 * w, -0.5 * h, 1.0], ] ) theta = torch.tensor(matrix, dtype=torch.float).reshape(1, 2, 3) new_pts = pts.view(1, 4, 3).bmm(theta.transpose(1, 2)).view(4, 2) min_vals, _ = new_pts.min(dim=0) max_vals, _ = new_pts.max(dim=0) # Truncate precision to 1e-4 to avoid ceil of Xe-15 to 1.0 tol = 1e-4 cmax = torch.ceil((max_vals / tol).trunc_() * tol) cmin = torch.floor((min_vals / tol).trunc_() * tol) size = cmax - cmin return int(size[0]), int(size[1]) def rotate( img: Tensor, matrix: List[float], interpolation: str = "nearest", expand: bool = False, fill: Optional[List[float]] = None, ) -> Tensor: _assert_grid_transform_inputs(img, matrix, interpolation, fill, ["nearest", "bilinear"]) w, h = img.shape[-1], img.shape[-2] ow, oh = _compute_output_size(matrix, w, h) if expand else (w, h) dtype = img.dtype if torch.is_floating_point(img) else torch.float32 theta = torch.tensor(matrix, dtype=dtype, device=img.device).reshape(1, 2, 3) # grid will be generated on the same device as theta and img grid = _gen_affine_grid(theta, w=w, h=h, ow=ow, oh=oh) return _apply_grid_transform(img, grid, interpolation, fill=fill) def _perspective_grid(coeffs: List[float], ow: int, oh: int, dtype: torch.dtype, device: torch.device) -> Tensor: # https://github.com/python-pillow/Pillow/blob/4634eafe3c695a014267eefdce830b4a825beed7/ # src/libImaging/Geometry.c#L394 # # x_out = (coeffs[0] * x + coeffs[1] * y + coeffs[2]) / (coeffs[6] * x + coeffs[7] * y + 1) # y_out = (coeffs[3] * x + coeffs[4] * y + coeffs[5]) / (coeffs[6] * x + coeffs[7] * y + 1) # theta1 = torch.tensor( [[[coeffs[0], coeffs[1], coeffs[2]], [coeffs[3], coeffs[4], coeffs[5]]]], dtype=dtype, device=device ) theta2 = torch.tensor([[[coeffs[6], coeffs[7], 1.0], [coeffs[6], coeffs[7], 1.0]]], dtype=dtype, device=device) d = 0.5 base_grid = torch.empty(1, oh, ow, 3, dtype=dtype, device=device) x_grid = torch.linspace(d, ow * 1.0 + d - 1.0, steps=ow, device=device) base_grid[..., 0].copy_(x_grid) y_grid = torch.linspace(d, oh * 1.0 + d - 1.0, steps=oh, device=device).unsqueeze_(-1) base_grid[..., 1].copy_(y_grid) base_grid[..., 2].fill_(1) rescaled_theta1 = theta1.transpose(1, 2) / torch.tensor([0.5 * ow, 0.5 * oh], dtype=dtype, device=device) output_grid1 = base_grid.view(1, oh * ow, 3).bmm(rescaled_theta1) output_grid2 = base_grid.view(1, oh * ow, 3).bmm(theta2.transpose(1, 2)) output_grid = output_grid1 / output_grid2 - 1.0 return output_grid.view(1, oh, ow, 2) def perspective( img: Tensor, perspective_coeffs: List[float], interpolation: str = "bilinear", fill: Optional[List[float]] = None ) -> Tensor: if not (isinstance(img, torch.Tensor)): raise TypeError("Input img should be Tensor.") _assert_image_tensor(img) _assert_grid_transform_inputs( img, matrix=None, interpolation=interpolation, fill=fill, supported_interpolation_modes=["nearest", "bilinear"], coeffs=perspective_coeffs, ) ow, oh = img.shape[-1], img.shape[-2] dtype = img.dtype if torch.is_floating_point(img) else torch.float32 grid = _perspective_grid(perspective_coeffs, ow=ow, oh=oh, dtype=dtype, device=img.device) return _apply_grid_transform(img, grid, interpolation, fill=fill) def _get_gaussian_kernel1d(kernel_size: int, sigma: float) -> Tensor: ksize_half = (kernel_size - 1) * 0.5 x = torch.linspace(-ksize_half, ksize_half, steps=kernel_size) pdf = torch.exp(-0.5 * (x / sigma).pow(2)) kernel1d = pdf / pdf.sum() return kernel1d def _get_gaussian_kernel2d( kernel_size: List[int], sigma: List[float], dtype: torch.dtype, device: torch.device ) -> Tensor: kernel1d_x = _get_gaussian_kernel1d(kernel_size[0], sigma[0]).to(device, dtype=dtype) kernel1d_y = _get_gaussian_kernel1d(kernel_size[1], sigma[1]).to(device, dtype=dtype) kernel2d = torch.mm(kernel1d_y[:, None], kernel1d_x[None, :]) return kernel2d def gaussian_blur(img: Tensor, kernel_size: List[int], sigma: List[float]) -> Tensor: if not (isinstance(img, torch.Tensor)): raise TypeError(f"img should be Tensor. Got {type(img)}") _assert_image_tensor(img) dtype = img.dtype if torch.is_floating_point(img) else torch.float32 kernel = _get_gaussian_kernel2d(kernel_size, sigma, dtype=dtype, device=img.device) kernel = kernel.expand(img.shape[-3], 1, kernel.shape[0], kernel.shape[1]) img, need_cast, need_squeeze, out_dtype = _cast_squeeze_in( img, [ kernel.dtype, ], ) # padding = (left, right, top, bottom) padding = [kernel_size[0] // 2, kernel_size[0] // 2, kernel_size[1] // 2, kernel_size[1] // 2] img = torch_pad(img, padding, mode="reflect") img = conv2d(img, kernel, groups=img.shape[-3]) img = _cast_squeeze_out(img, need_cast, need_squeeze, out_dtype) return img def invert(img: Tensor) -> Tensor: _assert_image_tensor(img) if img.ndim < 3: raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") _assert_channels(img, [1, 3]) bound = torch.tensor(1 if img.is_floating_point() else 255, dtype=img.dtype, device=img.device) return bound - img def posterize(img: Tensor, bits: int) -> Tensor: _assert_image_tensor(img) if img.ndim < 3: raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") if img.dtype != torch.uint8: raise TypeError(f"Only torch.uint8 image tensors are supported, but found {img.dtype}") _assert_channels(img, [1, 3]) mask = -int(2 ** (8 - bits)) # JIT-friendly for: ~(2 ** (8 - bits) - 1) return img & mask def solarize(img: Tensor, threshold: float) -> Tensor: _assert_image_tensor(img) if img.ndim < 3: raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") _assert_channels(img, [1, 3]) _assert_threshold(img, threshold) inverted_img = invert(img) return torch.where(img >= threshold, inverted_img, img) def _blurred_degenerate_image(img: Tensor) -> Tensor: dtype = img.dtype if torch.is_floating_point(img) else torch.float32 kernel = torch.ones((3, 3), dtype=dtype, device=img.device) kernel[1, 1] = 5.0 kernel /= kernel.sum() kernel = kernel.expand(img.shape[-3], 1, kernel.shape[0], kernel.shape[1]) result_tmp, need_cast, need_squeeze, out_dtype = _cast_squeeze_in( img, [ kernel.dtype, ], ) result_tmp = conv2d(result_tmp, kernel, groups=result_tmp.shape[-3]) result_tmp = _cast_squeeze_out(result_tmp, need_cast, need_squeeze, out_dtype) result = img.clone() result[..., 1:-1, 1:-1] = result_tmp return result def adjust_sharpness(img: Tensor, sharpness_factor: float) -> Tensor: if sharpness_factor < 0: raise ValueError(f"sharpness_factor ({sharpness_factor}) is not non-negative.") _assert_image_tensor(img) _assert_channels(img, [1, 3]) if img.size(-1) <= 2 or img.size(-2) <= 2: return img return _blend(img, _blurred_degenerate_image(img), sharpness_factor) def autocontrast(img: Tensor) -> Tensor: _assert_image_tensor(img) if img.ndim < 3: raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") _assert_channels(img, [1, 3]) bound = 1.0 if img.is_floating_point() else 255.0 dtype = img.dtype if torch.is_floating_point(img) else torch.float32 minimum = img.amin(dim=(-2, -1), keepdim=True).to(dtype) maximum = img.amax(dim=(-2, -1), keepdim=True).to(dtype) scale = bound / (maximum - minimum) eq_idxs = torch.isfinite(scale).logical_not() minimum[eq_idxs] = 0 scale[eq_idxs] = 1 return ((img - minimum) * scale).clamp(0, bound).to(img.dtype) def _scale_channel(img_chan: Tensor) -> Tensor: # TODO: we should expect bincount to always be faster than histc, but this # isn't always the case. Once # https://github.com/pytorch/pytorch/issues/53194 is fixed, remove the if # block and only use bincount. if img_chan.is_cuda: hist = torch.histc(img_chan.to(torch.float32), bins=256, min=0, max=255) else: hist = torch.bincount(img_chan.view(-1), minlength=256) nonzero_hist = hist[hist != 0] step = torch.div(nonzero_hist[:-1].sum(), 255, rounding_mode="floor") if step == 0: return img_chan lut = torch.div(torch.cumsum(hist, 0) + torch.div(step, 2, rounding_mode="floor"), step, rounding_mode="floor") lut = torch.nn.functional.pad(lut, [1, 0])[:-1].clamp(0, 255) return lut[img_chan.to(torch.int64)].to(torch.uint8) def _equalize_single_image(img: Tensor) -> Tensor: return torch.stack([_scale_channel(img[c]) for c in range(img.size(0))]) def equalize(img: Tensor) -> Tensor: _assert_image_tensor(img) if not (3 <= img.ndim <= 4): raise TypeError(f"Input image tensor should have 3 or 4 dimensions, but found {img.ndim}") if img.dtype != torch.uint8: raise TypeError(f"Only torch.uint8 image tensors are supported, but found {img.dtype}") _assert_channels(img, [1, 3]) if img.ndim == 3: return _equalize_single_image(img) return torch.stack([_equalize_single_image(x) for x in img])
35.62028
119
0.638855
252803be66423b10eade3cf5f707abf8f55821b1
5,732
py
Python
test/functional/prioritise_transaction.py
gradinkov/pigeoncoin
1a4f420f344d229d37514b570e92cae358ea06d7
[ "MIT" ]
49
2018-03-24T13:56:00.000Z
2021-04-15T04:29:17.000Z
test/functional/prioritise_transaction.py
gradinkov/pigeoncoin
1a4f420f344d229d37514b570e92cae358ea06d7
[ "MIT" ]
18
2018-03-22T20:12:34.000Z
2020-05-14T03:09:37.000Z
test/functional/prioritise_transaction.py
gradinkov/pigeoncoin
1a4f420f344d229d37514b570e92cae358ea06d7
[ "MIT" ]
64
2018-03-27T00:17:34.000Z
2021-12-02T21:41:27.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2017 The Pigeon Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the prioritisetransaction mining RPC.""" from test_framework.test_framework import PigeonTestFramework from test_framework.util import * from test_framework.mininode import COIN, MAX_BLOCK_BASE_SIZE class PrioritiseTransactionTest(PigeonTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 self.extra_args = [["-printpriority=1"], ["-printpriority=1"]] def run_test(self): self.txouts = gen_return_txouts() self.relayfee = self.nodes[0].getnetworkinfo()['relayfee'] utxo_count = 90 utxos = create_confirmed_utxos(self.relayfee, self.nodes[0], utxo_count) base_fee = self.relayfee*100 # our transactions are smaller than 100kb txids = [] # Create 3 batches of transactions at 3 different fee rate levels range_size = utxo_count // 3 for i in range(3): txids.append([]) start_range = i * range_size end_range = start_range + range_size txids[i] = create_lots_of_big_transactions(self.nodes[0], self.txouts, utxos[start_range:end_range], end_range - start_range, (i+1)*base_fee) # Make sure that the size of each group of transactions exceeds # MAX_BLOCK_BASE_SIZE -- otherwise the test needs to be revised to create # more transactions. mempool = self.nodes[0].getrawmempool(True) sizes = [0, 0, 0] for i in range(3): for j in txids[i]: assert(j in mempool) sizes[i] += mempool[j]['size'] assert(sizes[i] > MAX_BLOCK_BASE_SIZE) # Fail => raise utxo_count # add a fee delta to something in the cheapest bucket and make sure it gets mined # also check that a different entry in the cheapest bucket is NOT mined self.nodes[0].prioritisetransaction(txid=txids[0][0], fee_delta=int(3*base_fee*COIN)) self.nodes[0].generate(1) mempool = self.nodes[0].getrawmempool() self.log.info("Assert that prioritised transaction was mined") assert(txids[0][0] not in mempool) assert(txids[0][1] in mempool) high_fee_tx = None for x in txids[2]: if x not in mempool: high_fee_tx = x # Something high-fee should have been mined! assert(high_fee_tx != None) # Add a prioritisation before a tx is in the mempool (de-prioritising a # high-fee transaction so that it's now low fee). self.nodes[0].prioritisetransaction(txid=high_fee_tx, fee_delta=-int(2*base_fee*COIN)) # Add everything back to mempool self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) # Check to make sure our high fee rate tx is back in the mempool mempool = self.nodes[0].getrawmempool() assert(high_fee_tx in mempool) # Now verify the modified-high feerate transaction isn't mined before # the other high fee transactions. Keep mining until our mempool has # decreased by all the high fee size that we calculated above. while (self.nodes[0].getmempoolinfo()['bytes'] > sizes[0] + sizes[1]): self.nodes[0].generate(1) # High fee transaction should not have been mined, but other high fee rate # transactions should have been. mempool = self.nodes[0].getrawmempool() self.log.info("Assert that de-prioritised transaction is still in mempool") assert(high_fee_tx in mempool) for x in txids[2]: if (x != high_fee_tx): assert(x not in mempool) # Create a free transaction. Should be rejected. utxo_list = self.nodes[0].listunspent() assert(len(utxo_list) > 0) utxo = utxo_list[0] inputs = [] outputs = {} inputs.append({"txid" : utxo["txid"], "vout" : utxo["vout"]}) outputs[self.nodes[0].getnewaddress()] = utxo["amount"] raw_tx = self.nodes[0].createrawtransaction(inputs, outputs) tx_hex = self.nodes[0].signrawtransaction(raw_tx)["hex"] tx_id = self.nodes[0].decoderawtransaction(tx_hex)["txid"] # This will raise an exception due to min relay fee not being met assert_raises_rpc_error(-26, "66: min relay fee not met", self.nodes[0].sendrawtransaction, tx_hex) assert(tx_id not in self.nodes[0].getrawmempool()) # This is a less than 1000-byte transaction, so just set the fee # to be the minimum for a 1000 byte transaction and check that it is # accepted. self.nodes[0].prioritisetransaction(txid=tx_id, fee_delta=int(self.relayfee*COIN)) self.log.info("Assert that prioritised free transaction is accepted to mempool") assert_equal(self.nodes[0].sendrawtransaction(tx_hex), tx_id) assert(tx_id in self.nodes[0].getrawmempool()) # Test that calling prioritisetransaction is sufficient to trigger # getblocktemplate to (eventually) return a new block. mock_time = int(time.time()) self.nodes[0].setmocktime(mock_time) template = self.nodes[0].getblocktemplate() self.nodes[0].prioritisetransaction(txid=tx_id, fee_delta=-int(self.relayfee*COIN)) self.nodes[0].setmocktime(mock_time+10) new_template = self.nodes[0].getblocktemplate() assert(template != new_template) if __name__ == '__main__': PrioritiseTransactionTest().main()
44.092308
153
0.658234
d0e9f83088d8cc6c4eab82839dc1baa9255e5461
4,858
py
Python
alerta/models/heartbeat.py
iDemonix/alerta
c35c56ca246d968c0f7419af0b485e999530f792
[ "Apache-2.0" ]
null
null
null
alerta/models/heartbeat.py
iDemonix/alerta
c35c56ca246d968c0f7419af0b485e999530f792
[ "Apache-2.0" ]
null
null
null
alerta/models/heartbeat.py
iDemonix/alerta
c35c56ca246d968c0f7419af0b485e999530f792
[ "Apache-2.0" ]
null
null
null
import os import platform import sys from datetime import datetime, timedelta from typing import Any, Dict, List, Optional, Tuple, Union from uuid import uuid4 from flask import current_app from alerta.app import db from alerta.database.base import Query from alerta.utils.format import DateTime from alerta.utils.response import absolute_url MAX_LATENCY = 2000 # ms JSON = Dict[str, Any] class Heartbeat: def __init__(self, origin: str=None, tags: List[str]=None, create_time: datetime=None, timeout: int=None, customer: str=None, **kwargs) -> None: self.id = kwargs.get('id', str(uuid4())) self.origin = origin or '{}/{}'.format(os.path.basename(sys.argv[0]), platform.uname()[1]) self.tags = tags or list() self.event_type = kwargs.get('event_type', kwargs.get('type', None)) or 'Heartbeat' self.create_time = create_time or datetime.utcnow() self.timeout = timeout or current_app.config['HEARTBEAT_TIMEOUT'] self.receive_time = kwargs.get('receive_time', None) or datetime.utcnow() self.customer = customer @property def latency(self) -> int: return int((self.receive_time - self.create_time).total_seconds() * 1000) @property def since(self) -> timedelta: since = datetime.utcnow() - self.receive_time return since - timedelta(microseconds=since.microseconds) @property def status(self) -> str: if self.latency > MAX_LATENCY: return 'slow' elif self.since.total_seconds() > self.timeout: return 'expired' # aka 'stale' else: return 'ok' @classmethod def parse(cls, json: JSON) -> 'Heartbeat': if not isinstance(json.get('tags', []), list): raise ValueError('tags must be a list') if not isinstance(json.get('timeout') if json.get('timeout', None) is not None else 0, int): raise ValueError('timeout must be an integer') if json.get('customer', None) == '': raise ValueError('customer must not be an empty string') return Heartbeat( origin=json.get('origin', None), tags=json.get('tags', list()), create_time=DateTime.parse(json['createTime']) if 'createTime' in json else None, timeout=json.get('timeout', None), customer=json.get('customer', None) ) @property def serialize(self) -> Dict[str, Any]: return { 'id': self.id, 'href': absolute_url('/heartbeat/' + self.id), 'origin': self.origin, 'tags': self.tags, 'type': self.event_type, 'createTime': self.create_time, 'timeout': self.timeout, 'receiveTime': self.receive_time, 'customer': self.customer, 'latency': self.latency, 'since': self.since, 'status': self.status } def __repr__(self) -> str: return 'Heartbeat(id={!r}, origin={!r}, create_time={!r}, timeout={!r}, customer={!r})'.format( self.id, self.origin, self.create_time, self.timeout, self.customer) @classmethod def from_document(cls, doc: Dict[str, Any]) -> 'Heartbeat': return Heartbeat( id=doc.get('id', None) or doc.get('_id'), origin=doc.get('origin', None), tags=doc.get('tags', list()), event_type=doc.get('type', None), create_time=doc.get('createTime', None), timeout=doc.get('timeout', None), receive_time=doc.get('receiveTime', None), customer=doc.get('customer', None) ) @classmethod def from_record(cls, rec) -> 'Heartbeat': return Heartbeat( id=rec.id, origin=rec.origin, tags=rec.tags, event_type=rec.type, create_time=rec.create_time, timeout=rec.timeout, receive_time=rec.receive_time, customer=rec.customer ) @classmethod def from_db(cls, r: Union[Dict, Tuple]) -> 'Heartbeat': if isinstance(r, dict): return cls.from_document(r) elif isinstance(r, tuple): return cls.from_record(r) # create/update a heartbeat def create(self) -> 'Heartbeat': return Heartbeat.from_db(db.upsert_heartbeat(self)) # retrieve an heartbeat @staticmethod def find_by_id(id: str, customers: List[str]=None) -> Optional['Heartbeat']: return Heartbeat.from_db(db.get_heartbeat(id, customers)) # search heartbeats @staticmethod def find_all(query: Query=None) -> List['Heartbeat']: return [Heartbeat.from_db(heartbeat) for heartbeat in db.get_heartbeats(query)] # delete a heartbeat def delete(self) -> bool: return db.delete_heartbeat(self.id)
34.94964
148
0.605393
261cd1ed2d49f86c1d6d35e0a9170c1e0a414f71
13,397
py
Python
libraries/classification/inception/inception_distributed_train.py
jayant766/MIDAS-IIITD
9a6085bff579a5846c58bac70264a736ed9da750
[ "Apache-2.0" ]
2
2021-05-04T11:43:20.000Z
2021-05-21T18:10:39.000Z
libraries/classification/inception/inception_distributed_train.py
jayant766/MIDAS-IIITD
9a6085bff579a5846c58bac70264a736ed9da750
[ "Apache-2.0" ]
null
null
null
libraries/classification/inception/inception_distributed_train.py
jayant766/MIDAS-IIITD
9a6085bff579a5846c58bac70264a736ed9da750
[ "Apache-2.0" ]
null
null
null
"""A library to train Inception using multiple replicas with synchronous update. Please see accompanying README.md for details and instructions. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime import os.path import time import numpy as np import tensorflow as tf from inception import image_processing from inception import inception_model as inception from inception.slim import slim FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string('job_name', '', 'One of "ps", "worker"') tf.app.flags.DEFINE_string('ps_hosts', '', """Comma-separated list of hostname:port for the """ """parameter server jobs. e.g. """ """'machine1:2222,machine2:1111,machine2:2222'""") tf.app.flags.DEFINE_string('worker_hosts', '', """Comma-separated list of hostname:port for the """ """worker jobs. e.g. """ """'machine1:2222,machine2:1111,machine2:2222'""") tf.app.flags.DEFINE_string('protocol', 'grpc', """Communication protocol to use in distributed """ """execution (default grpc) """) tf.app.flags.DEFINE_string('train_dir', '/tmp/imagenet_train', """Directory where to write event logs """ """and checkpoint.""") tf.app.flags.DEFINE_integer('max_steps', 1000000, 'Number of batches to run.') tf.app.flags.DEFINE_string('subset', 'train', 'Either "train" or "validation".') tf.app.flags.DEFINE_boolean('log_device_placement', False, 'Whether to log device placement.') # Task ID is used to select the chief and also to access the local_step for # each replica to check staleness of the gradients in SyncReplicasOptimizer. tf.app.flags.DEFINE_integer( 'task_id', 0, 'Task ID of the worker/replica running the training.') # More details can be found in the SyncReplicasOptimizer class: # tensorflow/python/training/sync_replicas_optimizer.py tf.app.flags.DEFINE_integer('num_replicas_to_aggregate', -1, """Number of gradients to collect before """ """updating the parameters.""") tf.app.flags.DEFINE_integer('save_interval_secs', 10 * 60, 'Save interval seconds.') tf.app.flags.DEFINE_integer('save_summaries_secs', 180, 'Save summaries interval seconds.') # **IMPORTANT** # Please note that this learning rate schedule is heavily dependent on the # hardware architecture, batch size and any changes to the model architecture # specification. Selecting a finely tuned learning rate schedule is an # empirical process that requires some experimentation. Please see README.md # more guidance and discussion. # # Learning rate decay factor selected from https://arxiv.org/abs/1604.00981 tf.app.flags.DEFINE_float('initial_learning_rate', 0.045, 'Initial learning rate.') tf.app.flags.DEFINE_float('num_epochs_per_decay', 2.0, 'Epochs after which learning rate decays.') tf.app.flags.DEFINE_float('learning_rate_decay_factor', 0.94, 'Learning rate decay factor.') # Constants dictating the learning rate schedule. RMSPROP_DECAY = 0.9 # Decay term for RMSProp. RMSPROP_MOMENTUM = 0.9 # Momentum in RMSProp. RMSPROP_EPSILON = 1.0 # Epsilon term for RMSProp. def train(target, dataset, cluster_spec): """Train Inception on a dataset for a number of steps.""" # Number of workers and parameter servers are inferred from the workers and ps # hosts string. num_workers = len(cluster_spec.as_dict()['worker']) num_parameter_servers = len(cluster_spec.as_dict()['ps']) # If no value is given, num_replicas_to_aggregate defaults to be the number of # workers. if FLAGS.num_replicas_to_aggregate == -1: num_replicas_to_aggregate = num_workers else: num_replicas_to_aggregate = FLAGS.num_replicas_to_aggregate # Both should be greater than 0 in a distributed training. assert num_workers > 0 and num_parameter_servers > 0, (' num_workers and ' 'num_parameter_servers' ' must be > 0.') # Choose worker 0 as the chief. Note that any worker could be the chief # but there should be only one chief. is_chief = (FLAGS.task_id == 0) # Ops are assigned to worker by default. with tf.device('/job:worker/task:%d' % FLAGS.task_id): # Variables and its related init/assign ops are assigned to ps. with slim.scopes.arg_scope( [slim.variables.variable, slim.variables.global_step], device=slim.variables.VariableDeviceChooser(num_parameter_servers)): # Create a variable to count the number of train() calls. This equals the # number of updates applied to the variables. global_step = slim.variables.global_step() # Calculate the learning rate schedule. num_batches_per_epoch = (dataset.num_examples_per_epoch() / FLAGS.batch_size) # Decay steps need to be divided by the number of replicas to aggregate. decay_steps = int(num_batches_per_epoch * FLAGS.num_epochs_per_decay / num_replicas_to_aggregate) # Decay the learning rate exponentially based on the number of steps. lr = tf.train.exponential_decay(FLAGS.initial_learning_rate, global_step, decay_steps, FLAGS.learning_rate_decay_factor, staircase=True) # Add a summary to track the learning rate. tf.summary.scalar('learning_rate', lr) # Create an optimizer that performs gradient descent. opt = tf.train.RMSPropOptimizer(lr, RMSPROP_DECAY, momentum=RMSPROP_MOMENTUM, epsilon=RMSPROP_EPSILON) images, labels = image_processing.distorted_inputs( dataset, batch_size=FLAGS.batch_size, num_preprocess_threads=FLAGS.num_preprocess_threads) # Number of classes in the Dataset label set plus 1. # Label 0 is reserved for an (unused) background class. num_classes = dataset.num_classes() + 1 logits = inception.inference(images, num_classes, for_training=True) # Add classification loss. inception.loss(logits, labels) # Gather all of the losses including regularization losses. losses = tf.get_collection(slim.losses.LOSSES_COLLECTION) losses += tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES) total_loss = tf.add_n(losses, name='total_loss') if is_chief: # Compute the moving average of all individual losses and the # total loss. loss_averages = tf.train.ExponentialMovingAverage(0.9, name='avg') loss_averages_op = loss_averages.apply(losses + [total_loss]) # Attach a scalar summmary to all individual losses and the total loss; # do the same for the averaged version of the losses. for l in losses + [total_loss]: loss_name = l.op.name # Name each loss as '(raw)' and name the moving average version of the # loss as the original loss name. tf.summary.scalar(loss_name + ' (raw)', l) tf.summary.scalar(loss_name, loss_averages.average(l)) # Add dependency to compute loss_averages. with tf.control_dependencies([loss_averages_op]): total_loss = tf.identity(total_loss) # Track the moving averages of all trainable variables. # Note that we maintain a 'double-average' of the BatchNormalization # global statistics. # This is not needed when the number of replicas are small but important # for synchronous distributed training with tens of workers/replicas. exp_moving_averager = tf.train.ExponentialMovingAverage( inception.MOVING_AVERAGE_DECAY, global_step) variables_to_average = ( tf.trainable_variables() + tf.moving_average_variables()) # Add histograms for model variables. for var in variables_to_average: tf.summary.histogram(var.op.name, var) # Create synchronous replica optimizer. opt = tf.train.SyncReplicasOptimizer( opt, replicas_to_aggregate=num_replicas_to_aggregate, total_num_replicas=num_workers, variable_averages=exp_moving_averager, variables_to_average=variables_to_average) batchnorm_updates = tf.get_collection(slim.ops.UPDATE_OPS_COLLECTION) assert batchnorm_updates, 'Batchnorm updates are missing' batchnorm_updates_op = tf.group(*batchnorm_updates) # Add dependency to compute batchnorm_updates. with tf.control_dependencies([batchnorm_updates_op]): total_loss = tf.identity(total_loss) # Compute gradients with respect to the loss. grads = opt.compute_gradients(total_loss) # Add histograms for gradients. for grad, var in grads: if grad is not None: tf.summary.histogram(var.op.name + '/gradients', grad) apply_gradients_op = opt.apply_gradients(grads, global_step=global_step) with tf.control_dependencies([apply_gradients_op]): train_op = tf.identity(total_loss, name='train_op') # Get chief queue_runners and init_tokens, which is used to synchronize # replicas. More details can be found in SyncReplicasOptimizer. chief_queue_runners = [opt.get_chief_queue_runner()] init_tokens_op = opt.get_init_tokens_op() # Create a saver. saver = tf.train.Saver() # Build the summary operation based on the TF collection of Summaries. summary_op = tf.summary.merge_all() # Build an initialization operation to run below. init_op = tf.global_variables_initializer() # We run the summaries in the same thread as the training operations by # passing in None for summary_op to avoid a summary_thread being started. # Running summaries and training operations in parallel could run out of # GPU memory. sv = tf.train.Supervisor(is_chief=is_chief, logdir=FLAGS.train_dir, init_op=init_op, summary_op=None, global_step=global_step, saver=saver, save_model_secs=FLAGS.save_interval_secs) tf.logging.info('%s Supervisor' % datetime.now()) sess_config = tf.ConfigProto( allow_soft_placement=True, log_device_placement=FLAGS.log_device_placement) # Get a session. sess = sv.prepare_or_wait_for_session(target, config=sess_config) # Start the queue runners. queue_runners = tf.get_collection(tf.GraphKeys.QUEUE_RUNNERS) sv.start_queue_runners(sess, queue_runners) tf.logging.info('Started %d queues for processing input data.', len(queue_runners)) if is_chief: sv.start_queue_runners(sess, chief_queue_runners) sess.run(init_tokens_op) # Train, checking for Nans. Concurrently run the summary operation at a # specified interval. Note that the summary_op and train_op never run # simultaneously in order to prevent running out of GPU memory. next_summary_time = time.time() + FLAGS.save_summaries_secs while not sv.should_stop(): try: start_time = time.time() loss_value, step = sess.run([train_op, global_step]) assert not np.isnan(loss_value), 'Model diverged with loss = NaN' if step > FLAGS.max_steps: break duration = time.time() - start_time if step % 30 == 0: examples_per_sec = FLAGS.batch_size / float(duration) format_str = ('Worker %d: %s: step %d, loss = %.2f' '(%.1f examples/sec; %.3f sec/batch)') tf.logging.info(format_str % (FLAGS.task_id, datetime.now(), step, loss_value, examples_per_sec, duration)) # Determine if the summary_op should be run on the chief worker. if is_chief and next_summary_time < time.time(): tf.logging.info('Running Summary operation on the chief.') summary_str = sess.run(summary_op) sv.summary_computed(sess, summary_str) tf.logging.info('Finished running Summary operation.') # Determine the next time for running the summary. next_summary_time += FLAGS.save_summaries_secs except: if is_chief: tf.logging.info('Chief got exception while running!') raise # Stop the supervisor. This also waits for service threads to finish. sv.stop() # Save after the training ends. if is_chief: saver.save(sess, os.path.join(FLAGS.train_dir, 'model.ckpt'), global_step=global_step)
44.508306
80
0.646787
fbb94e2221ca749fa555274a352cd37691ad49a0
1,056
py
Python
pymatflow/cp2k/post/scripts/post-geo-opt-cp2k.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
6
2020-03-06T16:13:08.000Z
2022-03-09T07:53:34.000Z
pymatflow/cp2k/post/scripts/post-geo-opt-cp2k.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
1
2021-10-02T02:23:08.000Z
2021-11-08T13:29:37.000Z
pymatflow/cp2k/post/scripts/post-geo-opt-cp2k.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
1
2021-07-10T16:28:14.000Z
2021-07-10T16:28:14.000Z
#!/usr/bin/env python # _*_ coding: utf-8 _*_ import os import sys import matplotlib.pyplot as plt """ usage: post-geo-opt-cp2k.py xxx xxx is the output file of the GEO_OPT run """ os.system("cat %s | grep 'ENERGY| Total FORCE_EVAL' > energy-per-geo-step.data" % (sys.argv[1])) os.system("cat %s | grep '*** SCF run converged in' > scf-steps.data" % (sys.argv[1])) energies = [] with open("energy-per-geo-step.data", 'r') as fin: for line in fin: energies.append(float(line.split()[8])) scf_steps = [] with open("scf-steps.data", 'r') as fin: for line in fin: scf_steps.append(int(line.split()[5])) ion_steps = [i for i in range(len(energies))] #plt.plot(ion_steps, energies) plt.scatter(ion_steps, energies) for a, b in zip(ion_steps, energies): #plt.text(a+0.001, b+0.001, 'scf steps: %d' % scf_steps[a], ha='center', va='bottom', fontsize=7) plt.annotate(s="scf steps: %d" % scf_steps[a], xy=(a, b), xytext=(a+0.01, b+0.01), arrowprops={'arrowstyle':'->'}) plt.show()
28.540541
119
0.618371
4166d787a8cae126853bb3d514ec578ee8f9a3a9
2,157
py
Python
sitetree/management/commands/sitetreedump.py
mrog70/django-sitetree2
5dd56c9a7823f67a2988be1238b3d46860a6a426
[ "BSD-3-Clause" ]
null
null
null
sitetree/management/commands/sitetreedump.py
mrog70/django-sitetree2
5dd56c9a7823f67a2988be1238b3d46860a6a426
[ "BSD-3-Clause" ]
null
null
null
sitetree/management/commands/sitetreedump.py
mrog70/django-sitetree2
5dd56c9a7823f67a2988be1238b3d46860a6a426
[ "BSD-3-Clause" ]
null
null
null
from django.core import serializers from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS from sitetree.utils import get_tree_model, get_tree_item_model from sitetree.compat import CommandOption, options_getter, VERSION MODEL_TREE_CLASS = get_tree_model() MODEL_TREE_ITEM_CLASS = get_tree_item_model() get_options = options_getter(( CommandOption( '--indent', default=None, dest='indent', type=int, help='Specifies the indent level to use when pretty-printing output.'), CommandOption('--items_only', action='store_true', dest='items_only', default=False, help='Export tree items only.'), CommandOption('--database', action='store', dest='database', default=DEFAULT_DB_ALIAS, help='Nominates a specific database to export fixtures from. Defaults to the "default" database.'), )) class Command(BaseCommand): option_list = get_options() help = 'Output sitetrees from database as a fixture in JSON format.' args = '[tree_alias tree_alias ...]' def add_arguments(self, parser): if VERSION >= (1, 10): # Before that args already set with nargs='*'. parser.add_argument('args', metavar='tree', nargs='?', help='Tree aliases.', default=[]) get_options(parser.add_argument) def handle(self, *aliases, **options): indent = options.get('indent', None) using = options.get('database', DEFAULT_DB_ALIAS) items_only = options.get('items_only', False) objects = [] if aliases: trees = MODEL_TREE_CLASS._default_manager.using(using).filter(alias__in=aliases) else: trees = MODEL_TREE_CLASS._default_manager.using(using).all() if not items_only: objects.extend(trees) for tree in trees: objects.extend(MODEL_TREE_ITEM_CLASS._default_manager.using(using).filter(tree=tree).order_by('parent')) try: return serializers.serialize('json', objects, indent=indent) except Exception as e: raise CommandError('Unable to serialize sitetree(s): %s' % e)
33.703125
116
0.679184
86f5387e001bf28a4c073b4e75316b8ac138845d
1,289
py
Python
Lib/tkinter/commondialog.py
dignissimus/cpython
17357108732c731d6ed4f2bd123ee6ba1ff6891b
[ "0BSD" ]
null
null
null
Lib/tkinter/commondialog.py
dignissimus/cpython
17357108732c731d6ed4f2bd123ee6ba1ff6891b
[ "0BSD" ]
2
2022-01-01T11:08:44.000Z
2022-03-01T19:01:02.000Z
Lib/tkinter/commondialog.py
dignissimus/cpython
17357108732c731d6ed4f2bd123ee6ba1ff6891b
[ "0BSD" ]
null
null
null
# base class for tk common dialogues # # this module provides a base class for accessing the common # dialogues available in Tk 4.2 and newer. use filedialog, # colorchooser, and messagebox to access the individual # dialogs. # # written by Fredrik Lundh, May 1997 # __all__ = ["Dialog"] from tkinter import _get_temp_root, _destroy_temp_root class Dialog: command = None def __init__(self, master=None, **options): if master is None: master = options.get('parent') self.master = master self.options = options def _fixoptions(self): pass # hook def _fixresult(self, widget, result): return result # hook def show(self, **options): # update instance options for k, v in options.items(): self.options[k] = v self._fixoptions() master = self.master if master is None: master = _get_temp_root() try: self._test_callback(master) # The function below is replaced for some tests. s = master.tk.call(self.command, *master._options(self.options)) s = self._fixresult(master, s) finally: _destroy_temp_root(master) return s def _test_callback(self, master): pass
23.87037
89
0.622188
0f6c04bcf5f85d41f194d32b94a8592447c298d4
26,649
py
Python
image_generation/render_images.py
BScarleth/clevr-dataset-generation-mask
efa11d69b2fc21a2007205cac6a4b0122149af7d
[ "BSD-3-Clause" ]
null
null
null
image_generation/render_images.py
BScarleth/clevr-dataset-generation-mask
efa11d69b2fc21a2007205cac6a4b0122149af7d
[ "BSD-3-Clause" ]
null
null
null
image_generation/render_images.py
BScarleth/clevr-dataset-generation-mask
efa11d69b2fc21a2007205cac6a4b0122149af7d
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from __future__ import print_function import math, sys, random, argparse, json, os, tempfile from datetime import datetime as dt from collections import Counter """ Renders random scenes using Blender, each with with a random number of objects; each object has a random size, position, color, and shape. Objects will be nonintersecting but may partially occlude each other. Output images will be written to disk as PNGs, and we will also write a JSON file for each image with ground-truth scene information. This file expects to be run from Blender like this: blender --background --python render_images.py -- [arguments to this script] """ INSIDE_BLENDER = True try: import bpy, bpy_extras from mathutils import Vector except ImportError as e: INSIDE_BLENDER = False if INSIDE_BLENDER: try: import utils except ImportError as e: print("\nERROR") print("Running render_images.py from Blender and cannot import utils.py.") print("You may need to add a .pth file to the site-packages of Blender's") print("bundled python with a command like this:\n") print("echo $PWD >> $BLENDER/$VERSION/python/lib/python3.5/site-packages/clevr.pth") print("\nWhere $BLENDER is the directory where Blender is installed, and") print("$VERSION is your Blender version (such as 2.78).") sys.exit(1) parser = argparse.ArgumentParser() # Input options parser.add_argument('--base_scene_blendfile', default='data/base_scene.blend', help="Base blender file on which all scenes are based; includes " + "ground plane, lights, and camera.") parser.add_argument('--properties_json', default='data/properties.json', help="JSON file defining objects, materials, sizes, and colors. " + "The \"colors\" field maps from CLEVR color names to RGB values; " + "The \"sizes\" field maps from CLEVR size names to scalars used to " + "rescale object models; the \"materials\" and \"shapes\" fields map " + "from CLEVR material and shape names to .blend files in the " + "--object_material_dir and --shape_dir directories respectively.") parser.add_argument('--shape_dir', default='data/shapes', help="Directory where .blend files for object models are stored") parser.add_argument('--material_dir', default='data/materials', help="Directory where .blend files for materials are stored") parser.add_argument('--shape_color_combos_json', default=None, help="Optional path to a JSON file mapping shape names to a list of " + "allowed color names for that shape. This allows rendering images " + "for CLEVR-CoGenT.") # Settings for objects parser.add_argument('--min_objects', default=5, type=int, help="The minimum number of objects to place in each scene") parser.add_argument('--max_objects', default=5, type=int, help="The maximum number of objects to place in each scene") parser.add_argument('--min_dist', default=0.25, type=float, help="The minimum allowed distance between object centers") parser.add_argument('--margin', default=0.4, type=float, help="Along all cardinal directions (left, right, front, back), all " + "objects will be at least this distance apart. This makes resolving " + "spatial relationships slightly less ambiguous.") parser.add_argument('--min_pixels_per_object', default=800, type=int, help="All objects will have at least this many visible pixels in the " + "final rendered images; this ensures that no objects are fully " + "occluded by other objects.") parser.add_argument('--max_retries', default=50, type=int, help="The number of times to try placing an object before giving up and " + "re-placing all objects in the scene.") # Output settings parser.add_argument('--start_idx', default=130, type=int, help="The index at which to start for numbering rendered images. Setting " + "this to non-zero values allows you to distribute rendering across " + "multiple machines and recombine the results later.") parser.add_argument('--num_images', default=5, type=int, help="The number of images to render") parser.add_argument('--filename_prefix', default='CLEVR', help="This prefix will be prepended to the rendered images and JSON scenes") parser.add_argument('--split', default='new', help="Name of the split for which we are rendering. This will be added to " + "the names of rendered images, and will also be stored in the JSON " + "scene structure for each image.") parser.add_argument('--output_image_dir', default='../output/images/', help="The directory where output images will be stored. It will be " + "created if it does not exist.") parser.add_argument('--output_scene_dir', default='../output/scenes/', help="The directory where output JSON scene structures will be stored. " + "It will be created if it does not exist.") parser.add_argument('--output_scene_file', default='../output/CLEVR_scenes.json', help="Path to write a single JSON file containing all scene information") parser.add_argument('--output_blend_dir', default='output/blendfiles', help="The directory where blender scene files will be stored, if the " + "user requested that these files be saved using the " + "--save_blendfiles flag; in this case it will be created if it does " + "not already exist.") parser.add_argument('--save_blendfiles', type=int, default=0, help="Setting --save_blendfiles 1 will cause the blender scene file for " + "each generated image to be stored in the directory specified by " + "the --output_blend_dir flag. These files are not saved by default " + "because they take up ~5-10MB each.") parser.add_argument('--version', default='1.0', help="String to store in the \"version\" field of the generated JSON file") parser.add_argument('--license', default="Creative Commons Attribution (CC-BY 4.0)", help="String to store in the \"license\" field of the generated JSON file") parser.add_argument('--date', default=dt.today().strftime("%m/%d/%Y"), help="String to store in the \"date\" field of the generated JSON file; " + "defaults to today's date") # Rendering options parser.add_argument('--use_gpu', default=0, type=int, help="Setting --use_gpu 1 enables GPU-accelerated rendering using CUDA. " + "You must have an NVIDIA GPU with the CUDA toolkit installed for " + "to work.") parser.add_argument('--width', default=520, type=int, help="The width (in pixels) for the rendered images") parser.add_argument('--height', default=440, type=int, help="The height (in pixels) for the rendered images") parser.add_argument('--key_light_jitter', default=1.0, type=float, help="The magnitude of random jitter to add to the key light position.") parser.add_argument('--fill_light_jitter', default=1.0, type=float, help="The magnitude of random jitter to add to the fill light position.") parser.add_argument('--back_light_jitter', default=1.0, type=float, help="The magnitude of random jitter to add to the back light position.") parser.add_argument('--camera_jitter', default=0.5, type=float, help="The magnitude of random jitter to add to the camera position") parser.add_argument('--render_num_samples', default=512, type=int, help="The number of samples to use when rendering. Larger values will " + "result in nicer images but will cause rendering to take longer.") parser.add_argument('--render_min_bounces', default=8, type=int, help="The minimum number of bounces to use for rendering.") parser.add_argument('--render_max_bounces', default=8, type=int, help="The maximum number of bounces to use for rendering.") parser.add_argument('--render_tile_size', default=256, type=int, help="The tile size to use for rendering. This should not affect the " + "quality of the rendered image but may affect the speed; CPU-based " + "rendering may achieve better performance using smaller tile sizes " + "while larger tile sizes may be optimal for GPU-based rendering.") def main(args): num_digits = 6 prefix = '%s_%s_' % (args.filename_prefix, args.split) img_template = '%s%%0%dd.png' % (prefix, num_digits) scene_template = '%s%%0%dd.json' % (prefix, num_digits) blend_template = '%s%%0%dd.blend' % (prefix, num_digits) img_template = os.path.join(args.output_image_dir, img_template) scene_template = os.path.join(args.output_scene_dir, scene_template) blend_template = os.path.join(args.output_blend_dir, blend_template) if not os.path.isdir(args.output_image_dir): os.makedirs(args.output_image_dir) if not os.path.isdir(args.output_scene_dir): os.makedirs(args.output_scene_dir) if args.save_blendfiles == 1 and not os.path.isdir(args.output_blend_dir): os.makedirs(args.output_blend_dir) all_scene_paths = [] for i in range(args.num_images): img_path = img_template % (i + args.start_idx) scene_path = scene_template % (i + args.start_idx) all_scene_paths.append(scene_path) blend_path = None if args.save_blendfiles == 1: blend_path = blend_template % (i + args.start_idx) num_objects = random.randint(args.min_objects, args.max_objects) render_scene(args, num_objects=num_objects, output_index=(i + args.start_idx), output_split=args.split, output_image=img_path, output_scene=scene_path, output_blendfile=blend_path, ) # After rendering all images, combine the JSON files for each scene into a # single JSON file. all_scenes = [] for scene_path in all_scene_paths: with open(scene_path, 'r') as f: all_scenes.append(json.load(f)) output = { 'info': { 'date': args.date, 'version': args.version, 'split': args.split, 'license': args.license, }, 'scenes': all_scenes } with open(args.output_scene_file, 'w') as f: json.dump(output, f) def render_scene(args, num_objects=5, output_index=0, output_split='none', output_image='render.png', output_scene='render_json', output_blendfile=None, ): # Load the main blendfile bpy.ops.wm.open_mainfile(filepath=args.base_scene_blendfile) # Load materials utils.load_materials(args.material_dir) # Set render arguments so we can get pixel coordinates later. # We use functionality specific to the CYCLES renderer so BLENDER_RENDER # cannot be used. render_args = bpy.context.scene.render render_args.engine = "CYCLES" render_args.filepath = output_image render_args.resolution_x = args.width render_args.resolution_y = args.height render_args.resolution_percentage = 100 render_args.tile_x = args.render_tile_size render_args.tile_y = args.render_tile_size if args.use_gpu == 1: # Blender changed the API for enabling CUDA at some point if bpy.app.version < (2, 78, 0): bpy.context.user_preferences.system.compute_device_type = 'CUDA' bpy.context.user_preferences.system.compute_device = 'CUDA_0' else: cycles_prefs = bpy.context.user_preferences.addons['cycles'].preferences cycles_prefs.compute_device_type = 'CUDA' # Some CYCLES-specific stuff bpy.data.worlds['World'].cycles.sample_as_light = True bpy.context.scene.cycles.blur_glossy = 2.0 bpy.context.scene.cycles.samples = args.render_num_samples bpy.context.scene.cycles.transparent_min_bounces = args.render_min_bounces bpy.context.scene.cycles.transparent_max_bounces = args.render_max_bounces if args.use_gpu == 1: bpy.context.scene.cycles.device = 'GPU' # This will give ground-truth information about the scene and its objects scene_struct = { 'split': output_split, 'image_index': output_index, 'image_filename': os.path.basename(output_image), 'objects': [], 'directions': {}, } # Put a plane on the ground so we can compute cardinal directions bpy.ops.mesh.primitive_plane_add(radius=5) plane = bpy.context.object def rand(L): return 2.0 * L * (random.random() - 0.5) # Add random jitter to camera position if args.camera_jitter > 0: for i in range(3): bpy.data.objects['Camera'].location[i] += rand(args.camera_jitter) # Figure out the left, up, and behind directions along the plane and record # them in the scene structure camera = bpy.data.objects['Camera'] plane_normal = plane.data.vertices[0].normal cam_behind = camera.matrix_world.to_quaternion() * Vector((0, 0, -1)) cam_left = camera.matrix_world.to_quaternion() * Vector((-1, 0, 0)) cam_up = camera.matrix_world.to_quaternion() * Vector((0, 1, 0)) plane_behind = (cam_behind - cam_behind.project(plane_normal)).normalized() plane_left = (cam_left - cam_left.project(plane_normal)).normalized() plane_up = cam_up.project(plane_normal).normalized() # Delete the plane; we only used it for normals anyway. The base scene file # contains the actual ground plane. utils.delete_object(plane) # Save all six axis-aligned directions in the scene struct scene_struct['directions']['behind'] = tuple(plane_behind) scene_struct['directions']['front'] = tuple(-plane_behind) scene_struct['directions']['left'] = tuple(plane_left) scene_struct['directions']['right'] = tuple(-plane_left) scene_struct['directions']['above'] = tuple(plane_up) scene_struct['directions']['below'] = tuple(-plane_up) # Add random jitter to lamp positions if args.key_light_jitter > 0: for i in range(3): bpy.data.objects['Lamp_Key'].location[i] += rand(args.key_light_jitter) if args.back_light_jitter > 0: for i in range(3): bpy.data.objects['Lamp_Back'].location[i] += rand(args.back_light_jitter) if args.fill_light_jitter > 0: for i in range(3): bpy.data.objects['Lamp_Fill'].location[i] += rand(args.fill_light_jitter) # Now make some random objects objects, blender_objects = add_random_objects(scene_struct, num_objects, args, camera) # Render the scene and dump the scene data structure scene_struct['objects'] = objects scene_struct['relationships'], scene_struct['relationships_modified'] = compute_all_relationships(scene_struct) while True: try: bpy.ops.render.render(write_still=True) break except Exception as e: print(e) with open(output_scene, 'w') as f: json.dump(scene_struct, f, indent=2) if output_blendfile is not None: bpy.ops.wm.save_as_mainfile(filepath=output_blendfile) def assign_mask_to_object(objects, mask_by_color): for obj in objects: coordinates = [obj["pixel_coords"][1] , obj["pixel_coords"][0]] for color in mask_by_color: if coordinates in mask_by_color[color]: obj["pixel_mask"] = mask_by_color[color] extracted_pixels= {} pixel_colors = sorted(mask_by_color[color], key=lambda x: x[0]) for px in pixel_colors: if px[0] in extracted_pixels: if extracted_pixels[px[0]][1] < px[1] or extracted_pixels[px[0]][1] == -1: extracted_pixels[px[0]][1] = px[1] else: extracted_pixels[px[0]] = [px[1], -1] final_pixels = [] final_pixels_l = [] final_pixels_r = [] prev = -1 prev_r = -1 for ep in extracted_pixels.items(): if ep[1][0] != prev and ep[1][0] + 1 != prev and ep[1][0] - 1 != prev: final_pixels_l.append([ep[0], ep[1][0]]) prev = ep[1][0] if ep[1][1] != prev_r and ep[1][1] + 1 != prev_r and ep[1][1] - 1 != prev_r: if ep[1][1] != -1: final_pixels_r.append([ep[0], ep[1][1]]) prev_r = ep[1][1] final_pixels_l = sorted(final_pixels_l, key=lambda x: x[0]) final_pixels_r = sorted(final_pixels_r, key=lambda x: x[0]) final_pixels.extend(final_pixels_l) final_pixels_r.reverse() final_pixels.extend(final_pixels_r) obj["segmentation"] = final_pixels print("new: ", obj["segmentation"] ) def add_random_objects(scene_struct, num_objects, args, camera): """ Add random objects to the current blender scene """ # Load the property file with open(args.properties_json, 'r') as f: properties = json.load(f) color_name_to_rgba = {} for name, rgb in properties['colors'].items(): rgba = [float(c) / 255.0 for c in rgb] + [1.0] color_name_to_rgba[name] = rgba material_mapping = [(v, k) for k, v in properties['materials'].items()] object_mapping = [(v, k) for k, v in properties['shapes'].items()] size_mapping = list(properties['sizes'].items()) shape_color_combos = None if args.shape_color_combos_json is not None: with open(args.shape_color_combos_json, 'r') as f: shape_color_combos = list(json.load(f).items()) positions = [] objects = [] blender_objects = [] for i in range(num_objects): # Choose a random size size_name, r = random.choice(size_mapping) # Try to place the object, ensuring that we don't intersect any existing # objects and that we are more than the desired margin away from all existing # objects along all cardinal directions. num_tries = 0 while True: # If we try and fail to place an object too many times, then delete all # the objects in the scene and start over. num_tries += 1 if num_tries > args.max_retries: for obj in blender_objects: utils.delete_object(obj) return add_random_objects(scene_struct, num_objects, args, camera) x = random.uniform(-3, 3) y = random.uniform(-3, 3) # Check to make sure the new object is further than min_dist from all # other objects, and further than margin along the four cardinal directions dists_good = True margins_good = True for (xx, yy, rr) in positions: dx, dy = x - xx, y - yy dist = math.sqrt(dx * dx + dy * dy) if dist - r - rr < args.min_dist: dists_good = False break for direction_name in ['left', 'right', 'front', 'behind']: direction_vec = scene_struct['directions'][direction_name] assert direction_vec[2] == 0 margin = dx * direction_vec[0] + dy * direction_vec[1] if 0 < margin < args.margin: print(margin, args.margin, direction_name) print('BROKEN MARGIN!') margins_good = False break if not margins_good: break if dists_good and margins_good: break # Choose random color and shape if shape_color_combos is None: obj_name, obj_name_out = random.choice(object_mapping) color_name, rgba = random.choice(list(color_name_to_rgba.items())) else: obj_name_out, color_choices = random.choice(shape_color_combos) color_name = random.choice(color_choices) obj_name = [k for k, v in object_mapping if v == obj_name_out][0] rgba = color_name_to_rgba[color_name] # For cube, adjust the size a bit if obj_name == 'Cube': r /= math.sqrt(2) # Choose random orientation for the object. theta = 360.0 * random.random() # Actually add the object to the scene utils.add_object(args.shape_dir, obj_name, r, (x, y), theta=theta) obj = bpy.context.object blender_objects.append(obj) positions.append((x, y, r)) # Attach a random material mat_name, mat_name_out = random.choice(material_mapping) utils.add_material(mat_name, Color=rgba) # Record data about the object in the scene data structure pixel_coords = utils.get_camera_coords(camera, obj.location) objects.append({ 'shape': obj_name_out, 'size': size_name, 'material': mat_name_out, '3d_coords': tuple(obj.location), 'rotation': theta, 'pixel_coords': pixel_coords, 'color': color_name, 'segmentation': [], #pixels are stored after looking for visibility 'pixel_mask': [] # pixels are stored after looking for visibility }) # Check that all objects are at least partially visible in the rendered image all_visible, pixels_by_color = check_visibility(blender_objects, args.min_pixels_per_object, args) assign_mask_to_object(objects, pixels_by_color) if not all_visible: # If any of the objects are fully occluded then start over; delete all # objects from the scene and place them all again. print('Some objects are occluded; replacing objects') for obj in blender_objects: utils.delete_object(obj) return add_random_objects(scene_struct, num_objects, args, camera) return objects, blender_objects def compute_all_relationships(scene_struct, eps=0.2): """ Computes relationships between all pairs of objects in the scene. Returns a dictionary mapping string relationship names to lists of lists of integers, where output[rel][i] gives a list of object indices that have the relationship rel with object i. For example if j is in output['left'][i] then object j is left of object i. """ #edges (0,1) = [left, behind], (0,2) = [right, front] objs_relations = { "left": 0, "right": 1, "behind": 2, "front": 3, } all_relationships = {} all_relationships_original = {} for name, direction_vec in scene_struct['directions'].items(): if name == 'above' or name == 'below': continue all_relationships_original[name] = [] for i, obj1 in enumerate(scene_struct['objects']): coords1 = obj1['3d_coords'] related = set() for j, obj2 in enumerate(scene_struct['objects']): if obj1 == obj2: continue name_relation = str(i) + "-" + str(j) if name_relation not in all_relationships: all_relationships[name_relation] = [] coords2 = obj2['3d_coords'] diff = [coords2[k] - coords1[k] for k in [0, 1, 2]] dot = sum(diff[k] * direction_vec[k] for k in [0, 1, 2]) if dot > eps: related.add(j) all_relationships[name_relation].append(objs_relations[name]) all_relationships_original[name].append(sorted(list(related))) return all_relationships_original, all_relationships def check_visibility(blender_objects, min_pixels_per_object, args): """ Check whether all objects in the scene have some minimum number of visible pixels; to accomplish this we assign random (but distinct) colors to all objects, and render using no lighting or shading or antialiasing; this ensures that each object is just a solid uniform color. We can then count the number of pixels of each color in the output image to check the visibility of each object. Returns True if all objects are visible and False otherwise. """ f, path = tempfile.mkstemp(suffix='.png') object_colors = render_shadeless(blender_objects, path=path) img = bpy.data.images.load(path) p = list(img.pixels) pixel_list = [] mask_by_color = {} column = 0 row = args.height - 1 for i in range(0, len(p), 4): temp = (p[i], p[i+1], p[i+2], p[i+3]) if column >= args.width: row -= 1 column = 0 pixel_list.append(temp) if temp in mask_by_color: mask_by_color[temp].append([row, column]) else: mask_by_color[temp] = [[row, column]] column += 1 color_count = Counter(pixel_list) os.remove(path) if len(color_count) != len(blender_objects) + 1: return False, mask_by_color for _, count in color_count.most_common(): if count < min_pixels_per_object: return False, mask_by_color return True, mask_by_color def render_shadeless(blender_objects, path='flat.png'): """ Render a version of the scene with shading disabled and unique materials assigned to all objects, and return a set of all colors that should be in the rendered image. The image itself is written to path. This is used to ensure that all objects will be visible in the final rendered scene. """ render_args = bpy.context.scene.render # Cache the render args we are about to clobber old_filepath = render_args.filepath old_engine = render_args.engine old_use_antialiasing = render_args.use_antialiasing # Override some render settings to have flat shading render_args.filepath = path render_args.engine = 'BLENDER_RENDER' render_args.use_antialiasing = False # Move the lights and ground to layer 2 so they don't render utils.set_layer(bpy.data.objects['Lamp_Key'], 2) utils.set_layer(bpy.data.objects['Lamp_Fill'], 2) utils.set_layer(bpy.data.objects['Lamp_Back'], 2) utils.set_layer(bpy.data.objects['Ground'], 2) # Add random shadeless materials to all objects object_colors = set() old_materials = [] for i, obj in enumerate(blender_objects): old_materials.append(obj.data.materials[0]) bpy.ops.material.new() mat = bpy.data.materials['Material'] mat.name = 'Material_%d' % i while True: r, g, b = [random.random() for _ in range(3)] if (r, g, b) not in object_colors: break object_colors.add((r, g, b)) mat.diffuse_color = [r, g, b] mat.use_shadeless = True obj.data.materials[0] = mat # Render the scene bpy.ops.render.render(write_still=True) # Undo the above; first restore the materials to objects for mat, obj in zip(old_materials, blender_objects): obj.data.materials[0] = mat # Move the lights and ground back to layer 0 utils.set_layer(bpy.data.objects['Lamp_Key'], 0) utils.set_layer(bpy.data.objects['Lamp_Fill'], 0) utils.set_layer(bpy.data.objects['Lamp_Back'], 0) utils.set_layer(bpy.data.objects['Ground'], 0) # Set the render settings back to what they were render_args.filepath = old_filepath render_args.engine = old_engine render_args.use_antialiasing = old_use_antialiasing return object_colors if __name__ == '__main__': if INSIDE_BLENDER: # Run normally argv = utils.extract_args() args = parser.parse_args(argv) main(args) elif '--help' in sys.argv or '-h' in sys.argv: parser.print_help() else: print('This script is intended to be called from blender like this:') print() print('blender --background --python render_images.py -- [args]') print() print('You can also run as a standalone python script to view all') print('arguments like this:') print() print('python render_images.py --help')
40.377273
113
0.693647
deb449183523148b00bdabf18e21714bbe3551c8
467
py
Python
src/courses/migrations/0006_auto_20200521_2038.py
GiomarOsorio/another-e-learning-platform
5cfc76420eb3466691f5187c915c179afb13199a
[ "MIT" ]
null
null
null
src/courses/migrations/0006_auto_20200521_2038.py
GiomarOsorio/another-e-learning-platform
5cfc76420eb3466691f5187c915c179afb13199a
[ "MIT" ]
8
2020-06-25T22:16:20.000Z
2022-03-12T00:39:27.000Z
src/courses/migrations/0006_auto_20200521_2038.py
GiomarOsorio/another-e-learning-platform
5cfc76420eb3466691f5187c915c179afb13199a
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-05-21 20:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0005_auto_20200521_2038'), ] operations = [ migrations.AlterField( model_name='module', name='segments', field=models.IntegerField(help_text='number of segments in a module', verbose_name='number of segments in a module'), ), ]
24.578947
129
0.631692
53f8d8f0a03c0ae367fc673431366935c0bf9f32
5,360
py
Python
AIFP/mae_toPdbqt.py
jeah-z/IFP-RNN
83cb3f0f75907227d682e8980b335b17db2c2ab1
[ "MIT" ]
null
null
null
AIFP/mae_toPdbqt.py
jeah-z/IFP-RNN
83cb3f0f75907227d682e8980b335b17db2c2ab1
[ "MIT" ]
null
null
null
AIFP/mae_toPdbqt.py
jeah-z/IFP-RNN
83cb3f0f75907227d682e8980b335b17db2c2ab1
[ "MIT" ]
null
null
null
try: from openbabel import pybel except: import pybel import pandas as pd import argparse from functools import partial from multiprocessing import Pool from tqdm.auto import tqdm import os from pathlib import Path import rdkit from rdkit import Chem from pebble import concurrent, ProcessPool from concurrent.futures import TimeoutError import glob glide = "/mnt/home/zhangjie/Bin/Schrodinger2017/glide" structconvert = "/mnt/home/zhangjie/Bin/Schrodinger2017/utilities/structconvert" prepwizard = "/mnt/home/zhangjie/Bin/Schrodinger2017/utilities/prepwizard" glide_sort = "/mnt/home/zhangjie/Bin/Schrodinger2017/utilities/glide_sort" mol2convert = "/mnt/home/zhangjie/Bin/Schrodinger2017/utilities/mol2convert" prepare_ligand4 = '/mnt/home/zhangjie/Bin/MGLTools-1.5.7/MGLToolsPckgs/AutoDockTools/Utilities24/prepare_ligand4.py' def find_files(suffix): '''find all the files with specific suffix. ''' files = os.listdir('./') file_list = [] for file in files: file_sp = file.split('_') if len(file_sp) < 2: print(file+'\t was omitted!') continue elif file_sp[-1] == suffix: file_list.append(file) print(f"{len(file_list)} files have been detected!") return file_list def combine_pdbqtReport(pdbqt_file, report_file): '''This script fetch docking score from the report file and write the dockind score to the specific pose of the pdbqt file. ''' with open(report_file, 'r') as report_file_f: parse_mark = 0 dockScore_list = [] for line in report_file_f.readlines(): line_sp = line.strip().split() if parse_mark > 0 and len(line_sp) == 0: break if len(line_sp) > 0: if line_sp[0] == '====': parse_mark += 1 continue if len(line_sp) == 19 and parse_mark > 0: dockScore_list.append([line_sp[0], line_sp[3], line_sp[1]]) pdbqt_newFile = pdbqt_file.replace(".pdbqt", "_out.pdbqt") pdbqt_newFile_f = open(pdbqt_newFile, 'w') with open(pdbqt_file, 'r') as pdbqt_file_f: if len(dockScore_list) == 1: glide_score = dockScore_list.pop(0) pdbqt_newFile_f.write( f'REMARK VINA RESULT: {glide_score[1]} 0.000 0.000\n') for line in pdbqt_file_f.readlines(): pdbqt_newFile_f.write(line) else: for line in pdbqt_file_f.readlines(): line_sp = line.strip().split() if len(line_sp) > 0: if line_sp[0] == 'MODEL' and len(line_sp) == 2: pdbqt_newFile_f.write(line) glide_score = dockScore_list.pop(0) assert int(glide_score[0]) == int(line_sp[1]) pdbqt_newFile_f.write( f'REMARK VINA RESULT: {glide_score[1]} 0.000 0.000\n') else: pdbqt_newFile_f.write(line) assert len( dockScore_list) == 0 # '''This is to make sure no glide score was left! ''' pdbqt_newFile_f.close() def mae_toPdbqt(imaegz, pdbqt_dir): isimple_name = imaegz.replace('_pv.maegz', '') if os.path.exists(f'../{pdbqt_dir}/{isimple_name}_out.pdbqt'): print(f"{imaegz} have been processed before!") return 0 # if maegz_files.index(imaegz) > 10: # This is to accelerate the test speed! # break os.system( f'{glide_sort} -r ../{pdbqt_dir}/{isimple_name}.rept {imaegz} -o ../{pdbqt_dir}/{isimple_name}.mae') os.system( f'{mol2convert} -n 2: -imae ../{pdbqt_dir}/{isimple_name}.mae -omol2 ../{pdbqt_dir}/{isimple_name}.mol2') os.system( f'babel -imol2 ../{pdbqt_dir}/{isimple_name}.mol2 -opdbqt ../{pdbqt_dir}/{isimple_name}.pdbqt') combine_pdbqtReport( f'../{pdbqt_dir}/{isimple_name}.pdbqt', f'../{pdbqt_dir}/{isimple_name}.rept') # clean the unnecessary files for isufix in ['rept', 'mol2', 'mae', 'pdbqt']: os.system( f"rm ../{pdbqt_dir}/{isimple_name}.{isufix}") def main(args): os.chdir(f"{args.path}") maegz_files = find_files('pv.maegz') pdbqt_dir = args.path.split("/")[-1]+'_pdbqt' os.system(f"mkdir ../{pdbqt_dir}") with ProcessPool(max_workers=args.n_jobs) as pool: print("RUNING POOL!!!!") for imaegz in maegz_files: future = pool.schedule( mae_toPdbqt, args=[imaegz, pdbqt_dir], timeout=600) '''Further clean the pdbqt folder, some files cannot be removed for a unkown reason!''' os.chdir(f"../{pdbqt_dir}") files = os.listdir('./') for ifile in files: ifile_sp = ifile.split(".") if "_" not in ifile and ifile_sp[-1] in ['rept', 'mol2', 'mae', 'pdbqt']: os.system(f'rm {ifile}') def get_parser(): parser = argparse.ArgumentParser() parser.add_argument("--path", help="The directory of the docking results (maegz format).", type=str, default='') parser.add_argument("--n_jobs", type=int, help="cpu cores", default=1) args = parser.parse_args() return args if __name__ == "__main__": # test section args = get_parser() main(args)
37.746479
127
0.604291
65ef20c3cd8fa5aeb228287be92b16208bfaf4c2
8,462
py
Python
tests/brownfield/separate_file_example/test_brownfield_app.py
nutanixdev/calm-dsl
90e1c583d7b9ac905cdfb3e2ad27f9f930e69831
[ "Apache-2.0" ]
null
null
null
tests/brownfield/separate_file_example/test_brownfield_app.py
nutanixdev/calm-dsl
90e1c583d7b9ac905cdfb3e2ad27f9f930e69831
[ "Apache-2.0" ]
null
null
null
tests/brownfield/separate_file_example/test_brownfield_app.py
nutanixdev/calm-dsl
90e1c583d7b9ac905cdfb3e2ad27f9f930e69831
[ "Apache-2.0" ]
null
null
null
import uuid import time import json import traceback import pytest import sys from click.testing import CliRunner from calm.dsl.cli import main as cli from calm.dsl.cli.constants import APPLICATION from calm.dsl.tools import make_file_dir from calm.dsl.log import get_logging_handle LOG = get_logging_handle(__name__) DSL_BP_FILEPATH = "tests/brownfield/separate_file_example/blueprint.py" DSL_BP_BD_FILEPATH = "tests/brownfield/separate_file_example/brownfield.py" LOCAL_VM_IP_PATH = "tests/brownfield/separate_file_example/.local/vm_ip" NON_BUSY_APP_STATES = [ APPLICATION.STATES.STOPPED, APPLICATION.STATES.RUNNING, APPLICATION.STATES.ERROR, ] NON_BUSY_APP_DELETE_STATES = [APPLICATION.STATES.ERROR, APPLICATION.STATES.DELETED] @pytest.mark.slow class TestBrownFieldCommands: def setup_method(self): """Method to instantiate to created_bp_list and created_app_list""" self.created_bp_list = [] self.created_app_list = [] def teardown_method(self): """Method to delete creates bps and apps during tests""" for bp_name in self.created_bp_list: LOG.info("Deleting Blueprint {}".format(bp_name)) runner = CliRunner() result = runner.invoke(cli, ["delete", "bp", bp_name]) assert result.exit_code == 0 for app_name in self.created_app_list: LOG.info("Deleting app {}".format(app_name)) self._delete_app(app_name) self.created_app_list = [] self.created_bp_list = [] def _wait_for_non_busy_state(self, app_name): runner = CliRunner() non_busy_statuses = [ "Status: {}".format(state) for state in NON_BUSY_APP_STATES ] result = runner.invoke(cli, ["describe", "app", app_name]) while not any([state_str in result.output for state_str in non_busy_statuses]): time.sleep(5) result = runner.invoke(cli, ["describe", "app", app_name]) def _wait_for_app_delete_busy_state(self, app_name): runner = CliRunner() non_busy_statuses = [ "Status: {}".format(state) for state in NON_BUSY_APP_DELETE_STATES ] result = runner.invoke(cli, ["describe", "app", app_name]) while not any([state_str in result.output for state_str in non_busy_statuses]): time.sleep(5) result = runner.invoke(cli, ["describe", "app", app_name]) def _delete_app(self, app_name): runner = CliRunner() self._wait_for_non_busy_state(app_name) LOG.info("Deleting App {} ".format(app_name)) result = runner.invoke(cli, ["delete", "app", app_name]) assert result.exit_code == 0 self._wait_for_app_delete_busy_state(app_name=app_name) LOG.info("App {} deleted successfully".format(app_name)) def _create_bp(self, name): runner = CliRunner() LOG.info("Creating Bp {}".format(name)) result = runner.invoke( cli, [ "create", "bp", "--file={}".format(DSL_BP_FILEPATH), "--name={}".format(name), "--description='Test DSL Blueprint; to delete'", ], ) LOG.debug("Response: {}".format(result.output)) assert result.exit_code == 0 def test_app_vm_in_brownfield_bp(self): """ Steps: 1. Create Blueprint 2. Create App 3. Soft Delete app and extract vm-ip from it 4. Create Brownfield Application using that vm-ip 5. Delete brownfield application """ runner = CliRunner() # Create blueprint bp_name = "Blueprint{}".format(str(uuid.uuid4())[:10]) self._create_bp(bp_name) self.created_bp_list.append(bp_name) # Create application app_name = "App{}".format(str(uuid.uuid4())[:10]) LOG.info("Creating App {}".format(app_name)) result = runner.invoke( cli, [ "launch", "bp", bp_name, "--app_name={}".format(app_name), "--ignore_runtime_variables", ], ) if result.exit_code: LOG.error(result.output) pytest.fail("Creation of app {} failed".format(app_name)) # Wait for app creation completion self._wait_for_non_busy_state(app_name) LOG.info("Application {} created successfully".format(app_name)) LOG.info("Extracting vm ip from the app") result = runner.invoke(cli, ["describe", "app", app_name, "--out=json"]) if result.exit_code: LOG.error(result.output) pytest.fail("Describe of app {} failed".format(app_name)) # Extracting vm+ip from the app_json app_json = json.loads(result.output) app_state = app_json["status"]["state"] if app_state != APPLICATION.STATES.RUNNING: LOG.error("App went to {} state".format(app_state)) sys.exit(-1) vm_ip = app_json["status"]["resources"]["deployment_list"][0][ "substrate_configuration" ]["element_list"][0]["address"] LOG.info("Soft deleting the app {}".format(app_name)) result = runner.invoke(cli, ["delete", "app", app_name, "--soft"]) if result.exit_code: LOG.error(result.output) pytest.fail("Deletion of app {} failed".format(app_name)) # Wait for app deletion completion self._wait_for_app_delete_busy_state(app_name) LOG.info("Soft Delete of app {} completed".format(app_name)) # Writing vm_ip to local directory file LOG.info("Writing vm_ip {} to file '{}'".format(vm_ip, LOCAL_VM_IP_PATH)) make_file_dir(LOCAL_VM_IP_PATH) with open(LOCAL_VM_IP_PATH, "w") as f: f.write(vm_ip) # Creating brownfield blueprint app_name = "BrownfieldApplication{}".format(str(uuid.uuid4())[:10]) LOG.info("Creating Brownfield Application {}".format(app_name)) result = runner.invoke( cli, [ "create", "app", "--file={}".format(DSL_BP_FILEPATH), "--brownfield_deployments={}".format(DSL_BP_BD_FILEPATH), "--name={}".format(app_name), ], ) if result.exit_code: cli_res_dict = {"Output": result.output, "Exception": str(result.exception)} LOG.debug( "Cli Response: {}".format( json.dumps(cli_res_dict, indent=4, separators=(",", ": ")) ) ) LOG.debug( "Traceback: \n{}".format( "".join(traceback.format_tb(result.exc_info[2])) ) ) pytest.fail("Brownfield App creation failed") self._wait_for_non_busy_state(app_name) LOG.info("Brownfield App {} created successfully".format(app_name)) self.created_app_list.append(app_name) @pytest.mark.parametrize( "vm_type", ["AHV_VM", "AWS_VM", "AZURE_VM", "GCP_VM", "VMWARE_VM"] ) @pytest.mark.parametrize("project", ["default"]) def test_get_brownfield_vms(self, vm_type, project): """ Test get command on brownfield vms Note: Test will fail for provider = VMWARE_VM for version less than 2.9.8.1 and 3.0.0 (https://jira.nutanix.com/browse/CALM-18635) """ runner = CliRunner() LOG.info("Testing 'calm get brownfield vms --type {}' command".format(vm_type)) result = runner.invoke( cli, [ "get", "brownfield", "vms", "--project={}".format(project), "--type={}".format(vm_type), ], ) if result.exit_code: cli_res_dict = {"Output": result.output, "Exception": str(result.exception)} LOG.debug( "Cli Response: {}".format( json.dumps(cli_res_dict, indent=4, separators=(",", ": ")) ) ) LOG.debug( "Traceback: \n{}".format( "".join(traceback.format_tb(result.exc_info[2])) ) ) pytest.fail("Brownfield Vm Get failed") LOG.info("Success")
34.966942
138
0.578468
128656cc124500c88ac1af8a83d29668f6abc791
275
py
Python
lib/plugins/create/templates/kubeless-python/handler.py
ajesse11x/serverless
15333c223563e36d66469950c57c4f9ae68866a4
[ "MIT" ]
39,871
2015-12-08T08:23:40.000Z
2022-03-31T23:42:35.000Z
lib/plugins/create/templates/kubeless-python/handler.py
ajesse11x/serverless
15333c223563e36d66469950c57c4f9ae68866a4
[ "MIT" ]
8,862
2015-12-08T07:59:58.000Z
2022-03-31T23:22:49.000Z
lib/plugins/create/templates/kubeless-python/handler.py
ajesse11x/serverless
15333c223563e36d66469950c57c4f9ae68866a4
[ "MIT" ]
6,151
2015-12-08T09:17:10.000Z
2022-03-31T06:58:23.000Z
import json def hello(event, context): body = { "message": "Go Serverless v1.0! Your function executed successfully!", "input": event['data'] } response = { "statusCode": 200, "body": json.dumps(body) } return response
17.1875
78
0.56
7c3c045fdd4cc364310ac9cf38876c99f3c85b4c
909
py
Python
traffic/map_test.py
markraemer/mH-PriSe
1555c4c7e6457c3bb5bce3b6dae9c514ed7fc3d3
[ "MIT" ]
1
2016-12-02T06:50:44.000Z
2016-12-02T06:50:44.000Z
traffic/map_test.py
markraemer/mH-PriSe
1555c4c7e6457c3bb5bce3b6dae9c514ed7fc3d3
[ "MIT" ]
null
null
null
traffic/map_test.py
markraemer/mH-PriSe
1555c4c7e6457c3bb5bce3b6dae9c514ed7fc3d3
[ "MIT" ]
null
null
null
from mpl_toolkits.basemap import Basemap import numpy as np import matplotlib.pyplot as plt # create new figure, axes instances. fig=plt.figure() ax=fig.add_axes([0.1,0.1,0.8,0.8]) # setup mercator map projection. m = Basemap(llcrnrlon=-100.,llcrnrlat=20.,urcrnrlon=20.,urcrnrlat=60.,\ rsphere=(6378137.00,6356752.3142),\ resolution='l',projection='merc',\ lat_0=40.,lon_0=-20.,lat_ts=20.) # nylat, nylon are lat/lon of New York nylat = 40.78; nylon = -73.98 # lonlat, lonlon are lat/lon of London. lonlat = 51.53; lonlon = 0.08 # draw great circle route between NY and London m.drawgreatcircle(nylon,nylat,lonlon,lonlat,linewidth=2,color='b') m.drawcoastlines() m.fillcontinents() # draw parallels m.drawparallels(np.arange(10,90,20)) # draw meridians m.drawmeridians(np.arange(-180,180,30),labels=[1,1,0,1]) ax.set_title('Great Circle from New York to London') plt.show()
36.36
71
0.715072
d0c5f685dcaac9b50ce4b0e4e26f497bbfd8a66f
4,756
py
Python
tests/python/gaia-ui-tests/gaiatest/apps/fmradio/app.py
NickProgramm/gaia
975a35c0f5010df341e96d6c5ec60217f5347412
[ "Apache-2.0" ]
3
2016-08-17T08:52:51.000Z
2020-03-29T04:56:45.000Z
tests/python/gaia-ui-tests/gaiatest/apps/fmradio/app.py
NickProgramm/gaia
975a35c0f5010df341e96d6c5ec60217f5347412
[ "Apache-2.0" ]
1
2017-02-21T21:36:12.000Z
2017-02-21T21:36:30.000Z
tests/python/gaia-ui-tests/gaiatest/apps/fmradio/app.py
NickProgramm/gaia
975a35c0f5010df341e96d6c5ec60217f5347412
[ "Apache-2.0" ]
1
2019-03-03T01:31:58.000Z
2019-03-03T01:31:58.000Z
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import re from marionette_driver import expected, By, Wait from marionette_driver.marionette import Actions from gaiatest.apps.base import Base from gaiatest.apps.base import PageRegion class FmRadio(Base): name = 'FM Radio' manifest_url = '{}fm{}/manifest.webapp'.format(Base.DEFAULT_PROTOCOL,Base.DEFAULT_APP_HOSTNAME) _power_button_locator = (By.ID, 'power-switch') _favorite_list_locator = (By.CSS_SELECTOR, 'div.fav-list-item') _frequency_display_locator = (By.ID, 'frequency') _frequency_dialer_locator = (By.ID, 'dialer-bar') _favorite_button_locator = (By.ID, 'bookmark-button') _next_button_locator = (By.ID, 'frequency-op-seekup') _prev_button_locator = (By.ID, 'frequency-op-seekdown') _airplane_mode_title_locator = (By.CSS_SELECTOR, 'div[data-l10n-id="airplaneModeHeader"]') _airplane_mode_text_locator = (By.CSS_SELECTOR, 'div[data-l10n-id="airplaneModeMsg"]') def launch(self, airplane_mode=False): Base.launch(self) power = Wait(self.marionette).until( expected.element_present(*self._power_button_locator)) if not airplane_mode: Wait(self.marionette).until(lambda m: power.get_attribute('data-enabled') == 'true') @property def airplane_warning_title(self): return self.marionette.find_element(*self._airplane_mode_title_locator).text @property def airplane_warning_text(self): return self.marionette.find_element(*self._airplane_mode_text_locator).text def flick_frequency_dialer_up(self): dialer = self.marionette.find_element(*self._frequency_dialer_locator) dialer_x_center = int(dialer.size['width'] / 2) dialer_y_center = int(dialer.size['height'] / 2) Actions(self.marionette).flick(dialer, dialer_x_center, dialer_y_center, 0, 800, 800).perform() def tap_next(self): frequency = Wait(self.marionette).until( expected.element_present(*self._frequency_display_locator)) current = frequency.text self.marionette.find_element(*self._next_button_locator).tap() Wait(self.marionette).until(lambda m: frequency.text != current) def tap_previous(self): frequency = Wait(self.marionette).until( expected.element_present(*self._frequency_display_locator)) current = frequency.text self.marionette.find_element(*self._prev_button_locator).tap() Wait(self.marionette).until(lambda m: frequency.text != current) def tap_power_button(self): self.marionette.find_element(*self._power_button_locator).tap() def wait_for_radio_off(self): power = Wait(self.marionette).until( expected.element_present(*self._power_button_locator)) Wait(self.marionette).until( lambda m: not power.get_attribute('data-enabled') == 'true') def tap_add_favorite(self): current = len(self.favorite_channels) self.marionette.find_element(*self._favorite_button_locator).tap() Wait(self.marionette).until( lambda m: len(self.favorite_channels) == current + 1) @property def is_power_button_on(self): return self.marionette.find_element(*self._power_button_locator).get_attribute('data-enabled') == 'true' @property def frequency(self): raw_frequency = self.marionette.find_element(*self._frequency_display_locator).text return float(self._crop_trailing_mhz_and_invisible_characters(raw_frequency)) @staticmethod def _crop_trailing_mhz_and_invisible_characters(raw_frequency): match = re.search(r'\d+\.\d', raw_frequency) frequency = match.group() return frequency @property def favorite_channels(self): return [self.FavoriteChannel(self.marionette, channel) for channel in self.marionette.find_elements(*self._favorite_list_locator)] class FavoriteChannel(PageRegion): _remove_locator = (By.CSS_SELECTOR, 'div.fav-list-remove-button') _frequency_locator = (By.CSS_SELECTOR, 'div.fav-list-frequency') @property def text(self): raw_frequency = self.root_element.find_element(*self._frequency_locator).text return float(FmRadio._crop_trailing_mhz_and_invisible_characters(raw_frequency)) def remove(self): frequency = self.marionette.find_element(*self._frequency_locator) self.root_element.find_element(*self._remove_locator).tap() Wait(self.marionette).until(expected.element_not_displayed(frequency))
42.464286
138
0.712994
c49109e855bff388a92b443d8e55515a32857be0
13,160
py
Python
app/config.py
THIS-IS-NOT-A-BACKUP/app
0f5e722a3510b9163bc50d1b457ac2580ffedd1a
[ "MIT" ]
null
null
null
app/config.py
THIS-IS-NOT-A-BACKUP/app
0f5e722a3510b9163bc50d1b457ac2580ffedd1a
[ "MIT" ]
null
null
null
app/config.py
THIS-IS-NOT-A-BACKUP/app
0f5e722a3510b9163bc50d1b457ac2580ffedd1a
[ "MIT" ]
null
null
null
import os import random import socket import string import subprocess from ast import literal_eval from typing import Callable from urllib.parse import urlparse from dotenv import load_dotenv SHA1 = subprocess.getoutput("git rev-parse HEAD") ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def get_abs_path(file_path: str): """append ROOT_DIR for relative path""" # Already absolute path if file_path.startswith("/"): return file_path else: return os.path.join(ROOT_DIR, file_path) def sl_getenv(env_var: str, default_factory: Callable = None): """ Get env value, convert into Python object Args: env_var (str): env var, example: SL_DB default_factory: returns value if this env var is not set. """ value = os.getenv(env_var) if value is None: return default_factory() return literal_eval(value) config_file = os.environ.get("CONFIG") if config_file: config_file = get_abs_path(config_file) print("load config file", config_file) load_dotenv(get_abs_path(config_file)) else: load_dotenv() COLOR_LOG = "COLOR_LOG" in os.environ # Allow user to have 1 year of premium: set the expiration_date to 1 year more PROMO_CODE = "SIMPLEISBETTER" # Server url URL = os.environ["URL"] print(">>> URL:", URL) # Calculate RP_ID for WebAuthn RP_ID = urlparse(URL).hostname SENTRY_DSN = os.environ.get("SENTRY_DSN") # can use another sentry project for the front-end to avoid noises SENTRY_FRONT_END_DSN = os.environ.get("SENTRY_FRONT_END_DSN") or SENTRY_DSN # Email related settings NOT_SEND_EMAIL = "NOT_SEND_EMAIL" in os.environ EMAIL_DOMAIN = os.environ["EMAIL_DOMAIN"].lower() SUPPORT_EMAIL = os.environ["SUPPORT_EMAIL"] SUPPORT_NAME = os.environ.get("SUPPORT_NAME", "Son from SimpleLogin") ADMIN_EMAIL = os.environ.get("ADMIN_EMAIL") # VERP: mail_from set to BOUNCE_PREFIX + email_log.id + BOUNCE_SUFFIX BOUNCE_PREFIX = os.environ.get("BOUNCE_PREFIX") or "bounce+" BOUNCE_SUFFIX = os.environ.get("BOUNCE_SUFFIX") or f"+@{EMAIL_DOMAIN}" BOUNCE_EMAIL = BOUNCE_PREFIX + "{}" + BOUNCE_SUFFIX # Used for VERP during reply phase. It's similar to BOUNCE_PREFIX. # It's needed when sending emails from custom domain to respect DMARC. # BOUNCE_PREFIX_FOR_REPLY_PHASE should never be used in any existing alias # and can't be used for creating a new alias on custom domain # Note BOUNCE_PREFIX_FOR_REPLY_PHASE doesn't have the trailing plus sign (+) as BOUNCE_PREFIX BOUNCE_PREFIX_FOR_REPLY_PHASE = ( os.environ.get("BOUNCE_PREFIX_FOR_REPLY_PHASE") or "bounce_reply" ) # VERP for transactional email: mail_from set to BOUNCE_PREFIX + email_log.id + BOUNCE_SUFFIX TRANSACTIONAL_BOUNCE_PREFIX = ( os.environ.get("TRANSACTIONAL_BOUNCE_PREFIX") or "transactional+" ) TRANSACTIONAL_BOUNCE_SUFFIX = ( os.environ.get("TRANSACTIONAL_BOUNCE_SUFFIX") or f"+@{EMAIL_DOMAIN}" ) TRANSACTIONAL_BOUNCE_EMAIL = ( TRANSACTIONAL_BOUNCE_PREFIX + "{}" + TRANSACTIONAL_BOUNCE_SUFFIX ) try: MAX_NB_EMAIL_FREE_PLAN = int(os.environ["MAX_NB_EMAIL_FREE_PLAN"]) except Exception: print("MAX_NB_EMAIL_FREE_PLAN is not set, use 5 as default value") MAX_NB_EMAIL_FREE_PLAN = 5 # maximum number of directory a premium user can create MAX_NB_DIRECTORY = 50 ENFORCE_SPF = "ENFORCE_SPF" in os.environ # allow to override postfix server locally POSTFIX_SERVER = os.environ.get("POSTFIX_SERVER", "240.0.0.1") DISABLE_REGISTRATION = "DISABLE_REGISTRATION" in os.environ # allow using a different postfix port, useful when developing locally POSTFIX_PORT = 25 if "POSTFIX_PORT" in os.environ: POSTFIX_PORT = int(os.environ["POSTFIX_PORT"]) # postfix port to use during the forward phase POSTFIX_PORT_FORWARD = POSTFIX_PORT if "POSTFIX_PORT_FORWARD" in os.environ: POSTFIX_PORT_FORWARD = int(os.environ["POSTFIX_PORT_FORWARD"]) # Use port 587 instead of 25 when sending emails through Postfix # Useful when calling Postfix from an external network POSTFIX_SUBMISSION_TLS = "POSTFIX_SUBMISSION_TLS" in os.environ # ["domain1.com", "domain2.com"] OTHER_ALIAS_DOMAINS = sl_getenv("OTHER_ALIAS_DOMAINS", list) OTHER_ALIAS_DOMAINS = [d.lower().strip() for d in OTHER_ALIAS_DOMAINS] # List of domains user can use to create alias if "ALIAS_DOMAINS" in os.environ: ALIAS_DOMAINS = sl_getenv("ALIAS_DOMAINS") # ["domain1.com", "domain2.com"] else: ALIAS_DOMAINS = OTHER_ALIAS_DOMAINS + [EMAIL_DOMAIN] ALIAS_DOMAINS = [d.lower().strip() for d in ALIAS_DOMAINS] # ["domain1.com", "domain2.com"] PREMIUM_ALIAS_DOMAINS = sl_getenv("PREMIUM_ALIAS_DOMAINS", list) PREMIUM_ALIAS_DOMAINS = [d.lower().strip() for d in PREMIUM_ALIAS_DOMAINS] # the alias domain used when creating the first alias for user FIRST_ALIAS_DOMAIN = os.environ.get("FIRST_ALIAS_DOMAIN") or EMAIL_DOMAIN # list of (priority, email server) # e.g. [(10, "mx1.hostname."), (10, "mx2.hostname.")] EMAIL_SERVERS_WITH_PRIORITY = sl_getenv("EMAIL_SERVERS_WITH_PRIORITY") # these emails are ignored when computing stats IGNORED_EMAILS = sl_getenv("IGNORED_EMAILS", list) # disable the alias suffix, i.e. the ".random_word" part DISABLE_ALIAS_SUFFIX = "DISABLE_ALIAS_SUFFIX" in os.environ # the email address that receives all unsubscription request UNSUBSCRIBER = os.environ.get("UNSUBSCRIBER") DKIM_SELECTOR = b"dkim" DKIM_HEADERS = [b"from", b"to"] DKIM_PRIVATE_KEY = None if "DKIM_PRIVATE_KEY_PATH" in os.environ: DKIM_PRIVATE_KEY_PATH = get_abs_path(os.environ["DKIM_PRIVATE_KEY_PATH"]) with open(DKIM_PRIVATE_KEY_PATH) as f: DKIM_PRIVATE_KEY = f.read() # Database DB_URI = os.environ["DB_URI"] # Flask secret FLASK_SECRET = os.environ["FLASK_SECRET"] SESSION_COOKIE_NAME = "slapp" MAILBOX_SECRET = FLASK_SECRET + "mailbox" CUSTOM_ALIAS_SECRET = FLASK_SECRET + "custom_alias" # AWS AWS_REGION = os.environ.get("AWS_REGION") or "eu-west-3" BUCKET = os.environ.get("BUCKET") AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY") # Paddle try: PADDLE_VENDOR_ID = int(os.environ["PADDLE_VENDOR_ID"]) PADDLE_MONTHLY_PRODUCT_ID = int(os.environ["PADDLE_MONTHLY_PRODUCT_ID"]) PADDLE_YEARLY_PRODUCT_ID = int(os.environ["PADDLE_YEARLY_PRODUCT_ID"]) except (KeyError, ValueError): print("Paddle param not set") PADDLE_VENDOR_ID = -1 PADDLE_MONTHLY_PRODUCT_ID = -1 PADDLE_YEARLY_PRODUCT_ID = -1 # Other Paddle product IDS PADDLE_MONTHLY_PRODUCT_IDS = sl_getenv("PADDLE_MONTHLY_PRODUCT_IDS", list) PADDLE_MONTHLY_PRODUCT_IDS.append(PADDLE_MONTHLY_PRODUCT_ID) PADDLE_YEARLY_PRODUCT_IDS = sl_getenv("PADDLE_YEARLY_PRODUCT_IDS", list) PADDLE_YEARLY_PRODUCT_IDS.append(PADDLE_YEARLY_PRODUCT_ID) PADDLE_PUBLIC_KEY_PATH = get_abs_path( os.environ.get("PADDLE_PUBLIC_KEY_PATH", "local_data/paddle.key.pub") ) PADDLE_AUTH_CODE = os.environ.get("PADDLE_AUTH_CODE") # OpenID keys, used to sign id_token OPENID_PRIVATE_KEY_PATH = get_abs_path( os.environ.get("OPENID_PRIVATE_KEY_PATH", "local_data/jwtRS256.key") ) OPENID_PUBLIC_KEY_PATH = get_abs_path( os.environ.get("OPENID_PUBLIC_KEY_PATH", "local_data/jwtRS256.key.pub") ) # Used to generate random email WORDS_FILE_PATH = get_abs_path( os.environ.get("WORDS_FILE_PATH", "local_data/words_alpha.txt") ) # Used to generate random email if os.environ.get("GNUPGHOME"): GNUPGHOME = get_abs_path(os.environ.get("GNUPGHOME")) else: letters = string.ascii_lowercase random_dir_name = "".join(random.choice(letters) for _ in range(20)) GNUPGHOME = f"/tmp/{random_dir_name}" if not os.path.exists(GNUPGHOME): os.mkdir(GNUPGHOME, mode=0o700) print("WARNING: Use a temp directory for GNUPGHOME", GNUPGHOME) # Github, Google, Facebook client id and secrets GITHUB_CLIENT_ID = os.environ.get("GITHUB_CLIENT_ID") GITHUB_CLIENT_SECRET = os.environ.get("GITHUB_CLIENT_SECRET") GOOGLE_CLIENT_ID = os.environ.get("GOOGLE_CLIENT_ID") GOOGLE_CLIENT_SECRET = os.environ.get("GOOGLE_CLIENT_SECRET") FACEBOOK_CLIENT_ID = os.environ.get("FACEBOOK_CLIENT_ID") FACEBOOK_CLIENT_SECRET = os.environ.get("FACEBOOK_CLIENT_SECRET") # in seconds AVATAR_URL_EXPIRATION = 3600 * 24 * 7 # 1h*24h/d*7d=1week # session key MFA_USER_ID = "mfa_user_id" FLASK_PROFILER_PATH = os.environ.get("FLASK_PROFILER_PATH") FLASK_PROFILER_PASSWORD = os.environ.get("FLASK_PROFILER_PASSWORD") # Job names JOB_ONBOARDING_1 = "onboarding-1" JOB_ONBOARDING_2 = "onboarding-2" JOB_ONBOARDING_3 = "onboarding-3" JOB_ONBOARDING_4 = "onboarding-4" JOB_BATCH_IMPORT = "batch-import" JOB_DELETE_ACCOUNT = "delete-account" # for pagination PAGE_LIMIT = 20 # Upload to static/upload instead of s3 LOCAL_FILE_UPLOAD = "LOCAL_FILE_UPLOAD" in os.environ UPLOAD_DIR = None # Rate Limiting # nb max of activity (forward/reply) an alias can have during 1 min MAX_ACTIVITY_DURING_MINUTE_PER_ALIAS = 10 # nb max of activity (forward/reply) a mailbox can have during 1 min MAX_ACTIVITY_DURING_MINUTE_PER_MAILBOX = 15 if LOCAL_FILE_UPLOAD: print("Upload files to local dir") UPLOAD_DIR = os.path.join(ROOT_DIR, "static/upload") if not os.path.exists(UPLOAD_DIR): print("Create upload dir") os.makedirs(UPLOAD_DIR) LANDING_PAGE_URL = os.environ.get("LANDING_PAGE_URL") or "https://simplelogin.io" STATUS_PAGE_URL = os.environ.get("STATUS_PAGE_URL") or "https://status.simplelogin.io" # Loading PGP keys when mail_handler runs. To be used locally when init_app is not called. LOAD_PGP_EMAIL_HANDLER = "LOAD_PGP_EMAIL_HANDLER" in os.environ DISPOSABLE_FILE_PATH = get_abs_path( os.environ.get("DISPOSABLE_FILE_PATH", "local_data/local_disposable_domains.txt") ) with open(get_abs_path(DISPOSABLE_FILE_PATH), "r") as f: DISPOSABLE_EMAIL_DOMAINS = f.readlines() DISPOSABLE_EMAIL_DOMAINS = [d.strip().lower() for d in DISPOSABLE_EMAIL_DOMAINS] DISPOSABLE_EMAIL_DOMAINS = [ d for d in DISPOSABLE_EMAIL_DOMAINS if not d.startswith("#") ] # Used when querying info on Apple API # for iOS App APPLE_API_SECRET = os.environ.get("APPLE_API_SECRET") # for Mac App MACAPP_APPLE_API_SECRET = os.environ.get("MACAPP_APPLE_API_SECRET") # <<<<< ALERT EMAIL >>>> # maximal number of alerts that can be sent to the same email in 24h MAX_ALERT_24H = 4 # When a reverse-alias receives emails from un unknown mailbox ALERT_REVERSE_ALIAS_UNKNOWN_MAILBOX = "reverse_alias_unknown_mailbox" # When a forwarding email is bounced ALERT_BOUNCE_EMAIL = "bounce" ALERT_BOUNCE_EMAIL_REPLY_PHASE = "bounce-when-reply" # When a forwarding email is detected as spam ALERT_SPAM_EMAIL = "spam" # When an email is sent from a mailbox to an alias - a cycle ALERT_SEND_EMAIL_CYCLE = "cycle" ALERT_SPF = "spf" # when a mailbox is also an alias # happens when user adds a mailbox with their domain # then later adds this domain into SimpleLogin ALERT_MAILBOX_IS_ALIAS = "mailbox_is_alias" AlERT_WRONG_MX_RECORD_CUSTOM_DOMAIN = "custom_domain_mx_record_issue" # alert when a new alias is about to be created on a disabled directory ALERT_DIRECTORY_DISABLED_ALIAS_CREATION = "alert_directory_disabled_alias_creation" # <<<<< END ALERT EMAIL >>>> # Disable onboarding emails DISABLE_ONBOARDING = "DISABLE_ONBOARDING" in os.environ HCAPTCHA_SECRET = os.environ.get("HCAPTCHA_SECRET") HCAPTCHA_SITEKEY = os.environ.get("HCAPTCHA_SITEKEY") PLAUSIBLE_HOST = os.environ.get("PLAUSIBLE_HOST") PLAUSIBLE_DOMAIN = os.environ.get("PLAUSIBLE_DOMAIN") # server host HOST = socket.gethostname() SPAMASSASSIN_HOST = os.environ.get("SPAMASSASSIN_HOST") # by default use a tolerant score if "MAX_SPAM_SCORE" in os.environ: MAX_SPAM_SCORE = float(os.environ["MAX_SPAM_SCORE"]) else: MAX_SPAM_SCORE = 5.5 # use a more restrictive score when replying if "MAX_REPLY_PHASE_SPAM_SCORE" in os.environ: MAX_REPLY_PHASE_SPAM_SCORE = float(os.environ["MAX_REPLY_PHASE_SPAM_SCORE"]) else: MAX_REPLY_PHASE_SPAM_SCORE = 5 PGP_SENDER_PRIVATE_KEY = None PGP_SENDER_PRIVATE_KEY_PATH = os.environ.get("PGP_SENDER_PRIVATE_KEY_PATH") if PGP_SENDER_PRIVATE_KEY_PATH: with open(get_abs_path(PGP_SENDER_PRIVATE_KEY_PATH)) as f: PGP_SENDER_PRIVATE_KEY = f.read() # the signer address that signs outgoing encrypted emails PGP_SIGNER = os.environ.get("PGP_SIGNER") # emails that have empty From address is sent from this special reverse-alias NOREPLY = os.environ.get("NOREPLY", f"noreply@{EMAIL_DOMAIN}") COINBASE_WEBHOOK_SECRET = os.environ.get("COINBASE_WEBHOOK_SECRET") COINBASE_CHECKOUT_ID = os.environ.get("COINBASE_CHECKOUT_ID") COINBASE_API_KEY = os.environ.get("COINBASE_API_KEY") try: COINBASE_YEARLY_PRICE = float(os.environ["COINBASE_YEARLY_PRICE"]) except Exception: COINBASE_YEARLY_PRICE = 30.00 ALIAS_LIMIT = os.environ.get("ALIAS_LIMIT") or "100/day;50/hour;5/minute" ENABLE_SPAM_ASSASSIN = "ENABLE_SPAM_ASSASSIN" in os.environ ALIAS_RANDOM_SUFFIX_LENGTH = int(os.environ.get("ALIAS_RAND_SUFFIX_LENGTH", 5)) try: HIBP_SCAN_INTERVAL_DAYS = int(os.environ.get("HIBP_SCAN_INTERVAL_DAYS")) except Exception: HIBP_SCAN_INTERVAL_DAYS = 7 HIBP_API_KEYS = sl_getenv("HIBP_API_KEYS", list) or [] NEWRELIC_CONFIG_PATH = os.environ.get("NEWRELIC_CONFIG_PATH")
33.232323
93
0.771657
7e8b568001a30c3f17599b6738d0bbd60c7cb807
8,068
py
Python
mayan/apps/quotas/quota_backends.py
PatrickMugayaJoel/Mayan-EDMS
1a2b4d4fa784a68498f82e0735958dc116b60d46
[ "Apache-2.0" ]
null
null
null
mayan/apps/quotas/quota_backends.py
PatrickMugayaJoel/Mayan-EDMS
1a2b4d4fa784a68498f82e0735958dc116b60d46
[ "Apache-2.0" ]
null
null
null
mayan/apps/quotas/quota_backends.py
PatrickMugayaJoel/Mayan-EDMS
1a2b4d4fa784a68498f82e0735958dc116b60d46
[ "Apache-2.0" ]
1
2021-09-01T14:07:47.000Z
2021-09-01T14:07:47.000Z
import types from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.db.models import IntegerField from django.db.models.functions import Cast from django.template.defaultfilters import filesizeformat from django.utils.translation import ugettext_lazy as _ from actstream.models import Action from mayan.apps.common.signals import signal_mayan_pre_save from mayan.apps.documents.events import event_document_created from mayan.apps.documents.models import Document, DocumentFile from mayan.apps.user_management.querysets import get_user_queryset from .classes import QuotaBackend from .exceptions import QuotaExceeded from .mixins import DocumentTypesQuotaMixin, GroupsUsersQuotaMixin def hook_factory_document_check_quota(klass): def hook_check_quota(**kwargs): # Fake Document to be able to reuse the .process() method # for pre check. fake_document_instance = types.SimpleNamespace(pk=None) final_kwargs = kwargs['kwargs'].copy() final_kwargs['instance'] = fake_document_instance for quota in klass.get_instances().filter(enabled=True): backend_instance = quota.get_backend_instance() backend_instance.process(**final_kwargs) return hook_check_quota def hook_factory_document_file_check_quota(klass): def hook_check_quota(**kwargs): # Pass the real parent document or create a fake one. if 'document' in kwargs['kwargs']: document = kwargs['kwargs']['document'] else: document = types.SimpleNamespace( document_type=kwargs['kwargs']['document_type'] ) # Fake DocumentFile to be able to reuse the # .process() method for pre check. shared_uploaded_file = kwargs['kwargs']['shared_uploaded_file'] if shared_uploaded_file: fake_document_instance = types.SimpleNamespace( file=kwargs['kwargs']['shared_uploaded_file'].file, document=document, pk=None ) final_kwargs = kwargs['kwargs'].copy() final_kwargs['instance'] = fake_document_instance for quota in klass.get_instances().filter(enabled=True): backend_instance = quota.get_backend_instance() backend_instance.process(**final_kwargs) return hook_check_quota class DocumentCountQuota( GroupsUsersQuotaMixin, DocumentTypesQuotaMixin, QuotaBackend ): error_message = _('Document count quota exceeded.') field_order = ('documents_limit',) fields = { 'documents_limit': { 'label': _('Documents limit'), 'class': 'django.forms.IntegerField', 'help_text': _( 'Maximum number of documents.' ) }, } label = _('Document count limit') sender = Document signal = signal_mayan_pre_save @classmethod def _initialize(cls): Document.register_pre_create_hook( func=hook_factory_document_check_quota(klass=cls) ) def __init__( self, document_type_all, document_type_ids, documents_limit, group_ids, user_all, user_ids ): self.document_type_all = document_type_all self.document_type_ids = document_type_ids self.documents_limit = documents_limit self.group_ids = group_ids self.user_all = user_all self.user_ids = user_ids def _allowed(self): return self.documents_limit def _allowed_filter_display(self): return _('document count: %(document_count)s') % { 'document_count': self._allowed() } def _get_user_document_count(self, user): action_queryset = Action.objects.annotate( target_object_id_int=Cast( 'target_object_id', output_field=IntegerField() ), ) action_filter_kwargs = { 'verb': event_document_created.id } document_filter_kwargs = {} if not self.document_type_all: document_filter_kwargs.update( { 'document_type_id__in': self._get_document_types().values( 'pk' ), } ) if user: # Admins are always excluded. if user.is_superuser or user.is_staff: return 0 if not self.user_all: users = self._get_users() | get_user_queryset().filter( groups__in=self._get_groups() ) if not users.filter(pk=user.pk).exists(): # User is not in the restricted list of users and groups. return 0 else: content_type = ContentType.objects.get_for_model( model=get_user_model() ) action_filter_kwargs.update( { 'actor_object_id': user.pk, 'actor_content_type': content_type, } ) action_queryset = action_queryset.filter(**action_filter_kwargs) document_filter_kwargs.update( { 'pk__in': action_queryset.values('target_object_id_int') } ) return Document.objects.filter(**document_filter_kwargs).count() def process(self, **kwargs): # Only for new documents. if not kwargs['instance'].pk: if self._get_user_document_count(user=kwargs.get('user')) >= self._allowed(): raise QuotaExceeded( _('Document count quota exceeded.') ) class DocumentSizeQuota( GroupsUsersQuotaMixin, DocumentTypesQuotaMixin, QuotaBackend ): field_order = ('document_size_limit',) fields = { 'document_size_limit': { 'label': _('Document size limit'), 'class': 'django.forms.FloatField', 'help_text': _('Maximum document size in megabytes (MB).') } } label = _('Document size limit') sender = DocumentFile signal = signal_mayan_pre_save @classmethod def _initialize(cls): DocumentFile.register_pre_create_hook( func=hook_factory_document_file_check_quota(klass=cls) ) def __init__( self, document_size_limit, document_type_all, document_type_ids, group_ids, user_all, user_ids ): self.document_size_limit = document_size_limit self.document_type_all = document_type_all self.document_type_ids = document_type_ids self.group_ids = group_ids self.user_all = user_all self.user_ids = user_ids def _allowed(self): return self.document_size_limit * 1024 * 1024 def _allowed_filter_display(self): return _('document size: %(formatted_file_size)s') % { 'formatted_file_size': filesizeformat(self._allowed()) } def process(self, **kwargs): if not kwargs['instance'].pk: if kwargs['instance'].file.size >= self._allowed(): if self.document_type_all or self._get_document_types().filter(pk=kwargs['instance'].document.document_type.pk).exists(): # Don't asume there is always a user in the signal. # Non interactive uploads might not include a user. if kwargs['user']: if kwargs['user'].is_superuser or kwargs['user'].is_staff: return users = self._get_users() | get_user_queryset().filter( groups__in=self._get_groups() ) if self.user_all or kwargs['user'] and users.filter(pk=kwargs['user'].pk).exists(): raise QuotaExceeded( _('Document size quota exceeded.') )
34.775862
137
0.606718
59dae854bdabb689b85af13f3c0de6705ef8786a
22,836
py
Python
src/external/simplexml.py
ojimary/titus
ac53bcde5e0f32ab1f8b982b5c2bb7d89c9917a4
[ "Condor-1.1" ]
108
2015-05-29T07:50:26.000Z
2022-03-04T06:10:55.000Z
src/external/simplexml.py
ROBERT-MCDOWELL/p2p-sip
3ba6d39327694f662c3e4c9c943f9bfb4abb9a29
[ "Condor-1.1" ]
5
2015-07-16T16:33:21.000Z
2020-05-30T23:13:20.000Z
src/external/simplexml.py
ROBERT-MCDOWELL/p2p-sip
3ba6d39327694f662c3e4c9c943f9bfb4abb9a29
[ "Condor-1.1" ]
69
2015-07-20T16:05:04.000Z
2022-03-31T15:41:03.000Z
# Copyright (c) 2008, Kundan Singh. All rights reserved. See LICENSING for details. ''' Simple XML handling. The existing xml.dom.minidom is too Java'ish, so simplexml is used to allow easier syntax when processing XML. The basic API ideas are inspired from ActionScript's XML and XMLList data types. XML is the main class which can be used as follows: An XML string can be parsed using the constructor. >>> a1 = XML(u'<people xmlns="private" type="contacts">start<contact>Kundan Singh</contact>end</people>') >>> print a1 <people xmlns="private" type="contacts">start<contact>Kundan Singh</contact>end</people> The XML element has attributes such as xmlns, tag and children. The XML attributes can be accessed using the special attribute named '_' in the XML object. The XML attribute can also be read-accessed as a regular Python attribute on the XML element assuming there is no conflict and the attribute name is simple. >>> print a1.xmlns, a1.tag private people >>> print a1.type contacts >>> print a1.type == a1._['type'] == a1._.type == 'contacts' True >>> a1._.source='yahoo'; print a1 <people xmlns="private" source="yahoo" type="contacts">start<contact>Kundan Singh</contact>end</people> >>> del a1._['source']; print a1 <people xmlns="private" type="contacts">start<contact>Kundan Singh</contact>end</people> The children can be accessed using various ways. The children attribute returns the XMLList of children which includes both elements and data objects. >>> x1 = a1.children >>> print len(x1) 3 An XMLList is derived from list, and each element contains individual XML element or data item. >>> print x1 start<contact>Kundan Singh</contact>end >>> print list(x1) [u'start', <contact>Kundan Singh</contact>, u'end'] >>> print ', '.join(map(unicode, x1)) start, <contact>Kundan Singh</contact>, end >>> print XML('<contact>Kundan Singh</contact>') in x1, u'start' in x1 True False You can use the list semantics to access the children. The list methods such as append, extend, insert, pop, reverse, and operators such as del, slicing and indexing. The only catch is that the slicing operation returns a regular list, instead of XMLList. >>> x1.append(XML('<contact/>')); print x1 start<contact>Kundan Singh</contact>end<contact /> >>> x1.extend(['final']); print x1 start<contact>Kundan Singh</contact>end<contact />final >>> x1.insert(1, 'begin'); print x1 startbegin<contact>Kundan Singh</contact>end<contact />final >>> y = x1.pop(); print y, x1 final startbegin<contact>Kundan Singh</contact>end<contact /> >>> x1.reverse(); print x1 <contact />end<contact>Kundan Singh</contact>beginstart >>> del x1[3]; print x1 <contact />end<contact>Kundan Singh</contact>start >>> x1[1], x1[3] = x1[3], x1[1]; print x1 <contact />start<contact>Kundan Singh</contact>end >>> print x1[0], isinstance(x1[0], XML), type(x1[1]) <contact /> True <type 'unicode'> >>> print x1[0:2], type(x1) == XMLList, type(x1[0:2]) [<contact />, u'start'] True <type 'list'> >>> print x1[:] [<contact />, u'start', <contact>Kundan Singh</contact>, u'end'] You can also use the mapping semantics to access the children. It allows various filtering and search method as well. There are some special index defined such as x1['*'] to return all the elements with no data items of this XMLList, and x1('name') to return all the children elements of the elements in XMLList with tag as 'name', and x1() to return all the children elements of the elements in XMLList. Additionally the cdata and elems attributes fetch only the concatenated CDATA string or list of elements, respectively. >>> type(x1.contact) == XMLList True >>> print x1.contact <contact /><contact>Kundan Singh</contact> >>> print x1.contact == x1["contact"] True >>> print x1.contact == x1[lambda x: x.tag == 'contact'] True >>> x = XML('<first><second><third a="1"/><third a="2"/><third2/></second></first>') >>> x2 = x.children >>> print x2("third") <third a="1" /><third a="2" /> >>> print x2(lambda x: x.tag == 'third') == x2('third') True >>> print x2() <third a="1" /><third a="2" /><third2 /> >>> print x2['*'] <second><third a="1" /><third a="2" /><third2 /></second> >>> print x()('third') <third a="1" /><third a="2" /> >>> print x() == x.children["*"] True >>> print 'contact' in x1, 'info' in x1 True False >>> x1['info'] = XML('<info>contact list</info>'); print x1 <contact />start<contact>Kundan Singh</contact>end<info>contact list</info> >>> del x1['info']; print x1 <contact />start<contact>Kundan Singh</contact>end >>> x1['info'] = 'contact list'; print x1 # has same effect as earlier explict XML assignment <contact />start<contact>Kundan Singh</contact>end<info>contact list</info> >>> x1['info'] = None; print x1; # same effect as del x1['info'] <contact />start<contact>Kundan Singh</contact>end >>> x1['contact'] = XMLList([XML('<contact>Kundan Singh</contact>'), XML('<contact>Mamta Singh</contact>')]); print x1 <contact>Kundan Singh</contact><contact>Mamta Singh</contact>startend >>> x1['info'] = XMLList([XML('<info>contact list</info>')]); print x1 <contact>Kundan Singh</contact><contact>Mamta Singh</contact>startend<info>contact list</info> >>> print x1.keys() set([u'info', u'contact']) >>> print map(unicode, x1.iterkeys()) [u'info', u'contact'] >>> print x1.values() [<contact>Kundan Singh</contact>, <contact>Mamta Singh</contact>, u'start', u'end', <info>contact list</info>] >>> print map(unicode, x1.itervalues()) [u'<contact>Kundan Singh</contact>', u'<contact>Mamta Singh</contact>', u'start', u'end', u'<info>contact list</info>'] >>> print x1.items() [(u'contact', <contact>Kundan Singh</contact>), (u'contact', <contact>Mamta Singh</contact>), ('#text', u'start'), ('#text', u'end'), (u'info', <info>contact list</info>)] >>> print map(unicode, x1.iteritems()) [u"(u'contact', <contact>Kundan Singh</contact>)", u"(u'contact', <contact>Mamta Singh</contact>)", u"('#text', u'start')", u"('#text', u'end')", u"(u'info', <info>contact list</info>)"] >>> x2 = x1.copy(); print type(x2) == XMLList, x2 == x1 True True >>> x2.clear(); print len(x2), len(x1) 0 5 >>> print x1.cdata Kundan SinghMamta Singhstartendcontact list >>> print x1.elems [<contact>Kundan Singh</contact>, <contact>Mamta Singh</contact>, <info>contact list</info>] >>> del x1[1:]; print x1 <contact>Kundan Singh</contact> Additionally, the XMLList defines certain arithmetic style operations to manipulate the data or list. >>> print x1 + XML('<desc/>') <contact>Kundan Singh</contact><desc /> >>> print x1 + x1 <contact>Kundan Singh</contact><contact>Kundan Singh</contact> >>> print x1 + 'something' <contact>Kundan Singh</contact>something >>> x1 += XML('<desc/>'); print x1 # append tag <contact>Kundan Singh</contact><desc /> >>> x1 |= XML('<desc/>'); x1 |= XML('<desc type="1"/>'); x1 |= XML('<info/>'); print x1 # overwrite or append tag <contact>Kundan Singh</contact><desc type="1" /><info /> >>> x1 -= XML('<info/>'); print x1 # remove if tag is present <contact>Kundan Singh</contact><desc type="1" /> >>> x1 ^= XML('<desc/>'); x1 ^= XML('<info/>'); print x1; # append if tag not already present, else don't overwrite <contact>Kundan Singh</contact><desc type="1" /><info /> >>> x1 &= XML('<desc/>'); x1 &= XML('<info2/>'); print x1 # overwrite if tag already present, else don't append <contact>Kundan Singh</contact><info /><desc /> The XML namespaces are handled using the xmlns property. The namespaces attribute of the top-level XML element contains the list of namespace URI and their prefixes. The xmlns attribute is just the namespace URI. The namespace declaration might get moved from parent to child or vice-versa during various XML operations. >>> x2 = XML('<a:node xmlns:a="private" xmlns:b="public"><a:child/><b:child/></a:node>'); print x2 <node xmlns="private"><child /><child xmlns="public" /></node> ''' from xml.parsers import expat escape =lambda x: x.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;') # escape & < > " with appropriate XML entities def ustr(value): '''Converts 'value' to utf-8 string using value's __str__ or unicode. >>> print type (ustr(u'kundan')) == unicode, ustr(u'kundan') == ustr('kundan') True True ''' if isinstance(value, unicode): return value try: r = value.__str__() except AttributeError: r = str(value) return r if isinstance(r, unicode) else unicode(r, 'utf-8') class parser(object): '''A parser using expat to parse XML string into XML object. Use the xml attribute to extract the parsed XML.''' def __init__(self, value=None, node=None): self._parser = expat.ParserCreate(namespace_separator=' ') for n in ('StartElementHandler', 'EndElementHandler', 'CharacterDataHandler', 'StartNamespaceDeclHandler'): exec 'self._parser.%s = self._%s'%(n, n) # TODO: should avoid calling exec self._current, self._depth, self._root = None, 0, node self.namespaces={'http://www.w3.org/XML/1998/namespace': 'xml:'} self.xmlns='http://www.w3.org/XML/1998/namespace' if value: self._parser.Parse(value, 1) if self._depth != 0: raise ValueError, 'Invalid XML value ' + value def update(self, value): self._parser.Parse(value, 0) # add more data to be parsed @property def xml(self): return self._root # return the root XML node after parsing def _StartElementHandler(self, tag, attrs): xmlns, tag = tag.split(' ') if tag.find(' ') >= 0 else ('', tag) for n, v in filter(lambda x: x[0].rfind(' ') >= 0, attrs.items()): uri,ignore,prefix = n.partition(' ') attrs[self.namespaces[uri]+prefix] = v; del attrs[n] if self._depth == 0 and self._root is None: self._root = XML(tag=tag, xmlns=xmlns, attrs=attrs) # create new root element elif self._depth == 0: XML.__init__(self._root, tag=tag, xmlns=xmlns, attrs=attrs) # re-invoke the constructor else: self._current.children.append(XML(tag=tag, xmlns=xmlns, parent=self._current, attrs=attrs)) # append child element self._current = self._root if self._depth == 0 else self._current.children[-1] # current node is root or last child self._depth += 1 def _EndElementHandler(self, tag): self._depth -= 1 if self._depth > 0: self._current = self._current.parent def _CharacterDataHandler(self, data): if not self._current: return if self._current.children and isinstance(self._current.children[-1], XML): self._current.children.append(data) elif self._current.children: self._current.children[-1] += data else: self._current.children.append(data) def _StartNamespaceDeclHandler(self, prefix, uri): if prefix: self.namespaces[uri] = prefix + ':' else: self.xmlns = uri class XMLList(list): '''List of XML or CDATA elements. Used for children in XML.''' def __init__(self, values=[]): list.__init__(self, values) def __repr__(self): return u''.join([str(x) for x in self]) # private functions def _filter(self, func, recurse=False): # filter the elements in the sub-tree if recurse: result = XMLList() for x in filter(lambda y: isinstance(y, XML), self): if func(x): result.append(x) res = x.children._filter(func, recurse) if res: result.extend(res) return result else: return XMLList(filter(lambda x: isinstance(x, XML) and func(x), self)) def _delete(self, func, recurse=False): # delete the elements in the sub-tree result = XMLList() remove = list() for x in filter(lambda y: isinstance(y, XML), self): if func(x): result.append(x); remove.append(x) elif recurse: res = x.children._delete(func, recurse) if res: result.extend(res) for x in remove: self.remove(x) return result def _update(self, tag, values): remove = list() pos = -1 for i in xrange(0, len(self)): x = self[i] if isinstance(self[i], XML) and self[i].tag == tag else None if x is not None: if pos < 0: pos = i remove.append(x) for x in remove: self.remove(x) if pos < 0: pos = len(self) if isinstance(values, XMLList): self[pos:pos] = values[:] elif isinstance(values, XML): self[pos:pos] = [values] elif isinstance(values, (str, unicode)): self[pos:pos] = [XML('<%s>%s</%s>'%(tag, values, tag))] elif values is None or not values: pass # do nothing, already deleted else: raise ValueError, 'Invalid argument in XMLList._update ' + str(type(values)) # attribute access for elements, and call semantics for accessing or filtering child elements def __getattr__(self, name): return self._filter(lambda x: x.tag == name) def __call__(self, name=None): f = (lambda x: x.tag == name or not name) if not callable(name) else name return XMLList(sum([[y for y in x.children._filter(f)] for x in self["*"]], [])) # container access for elements as well as filtering elements def __contains__(self, item): # item is either XML, or tag name, or lambda function to test if isinstance(item, XML): return list.__contains__(self, item) elif isinstance(item, (str, unicode)): return self._filter(lambda x: x.tag == item) elif callable(item): return self._filter(item) else: return False def __getitem__(self, key): # key is either int, or "*", or tag name, or lambda function to test if isinstance(key, int): return list.__getitem__(self, key) elif key == u'*': return self._filter(lambda x: True) elif isinstance(key, (str, unicode)): return self._filter(lambda x: x.tag == key) elif callable(key): return self._filter(key) else: return None def __setitem__(self, key, value): # key is either int, or tag name. if isinstance(key, int): list.__setitem__(self, key, value); result = value elif key == u'*': self[:] = value if isinstance(value, XMLList) else [value]; result = self elif isinstance(key, (str, unicode)): self._update(key, value); result = value return result def __delitem__(self, key): # key is same as that in __getitem__ if isinstance(key, int): list.__delitem__(self, key); return None elif key == u'*': result, self[:] = self[:], []; return result # make it empty elif isinstance(key, (str, unicode)): return self._delete(lambda x: x.tag == key) elif callable(key): return self._delete(key) else: return None # mapping related methods similar to container access for elements def keys(self): return set([x.tag for x in filter(lambda y: isinstance(y, XML), self)]) # returns a set of all tags def values(self): return self[:] # return all the XML and data elements in this list def items(self): return [(x.tag, x) if isinstance(x, XML) else ('#text', x) for x in self] # return list of tuples of (tag, XML) def has_key(self, key): # return true if the tag exists for y in filter(lambda x: isinstance(x, XML), self): if y.tag == key: return True return False def get(self, key, default=None): return self._filter(lambda x: x.tag == key) or default # return the value for the key, or default def clear(self): self[:] = [] # clear the list def iterkeys(self): return iter(self.keys()) # iterator for keys def itervalues(self): return iter(self) # iterator for values def iteritems(self): # iterator for items for x in self: yield (x.tag if isinstance(x, XML) else '#text', x) def copy(self): return XMLList(self[:]) def update(self, arg): self[:] = arg # update self with the given list of XML #not implemented: setdefault(), pop(), popitem() @property def cdata(self): return u''.join([(x.cdata if isinstance(x, XML) else x) for x in self]) @property def elems(self): return filter(lambda x: isinstance(x, XML), self) # arithmetic manipulation or operations def __add__(self, other): # XMLList + XML, XMLList + XMLList, XMLList + list, XMLList + object if isinstance(other, list): return XMLList(self[:] + other) else: return XMLList(self[:] + [other if isinstance(other, XML) else unicode(other)]) def __radd__(self, other): if isinstance(other, list): return XMLList(other + self[:]) else: return XMLList([other if isinstance(other, XML) else unicode(other)] + self[:]) def __iadd__(self, other): # XMLList += XML, XMLList += XMLList, XMLList += list, XMLList += object if isinstance(other, list): self.extend(other) else: self.append(other if isinstance(other, XML) else unicode(other)) return self def __isub__(self, other): # XMLList -= XML, XMLList -= XMLList, XMLList -= list, XMLList -= object if not isinstance(other, list): other = [other] self[:] = filter(lambda x: x not in other, self) return self def __ixor__(self, other): # XMLList ^= XML, XMLList ^= XMLList (add only if tag is not found, else don't overwrite) if not isinstance(other, list): other = [other] self.extend(filter(lambda x: x.tag not in self.keys(), other)) return self def __ior__(self, other): # XMLList |= XML, XMLList |= XMLList (overwrite if tag is found else append) if not isinstance(other, list): other = [other] overwrite = filter(lambda x: x.tag in self.keys(), other) # that needs to be overwritten overtags = map(lambda x: x.tag, overwrite) add = filter(lambda x: x.tag not in self.keys(), other) # that needs to be added self[:] = filter(lambda x: x.tag not in overtags, self) # remove these for overwritting self.extend(overwrite + add) # append the overwritten and added elements return self def __iand__(self, other): # XMLList &= XML, XMLList &= XMLList (overwrite only if tag is found, else don't append) if not isinstance(other, list): other = [other] overwrite = filter(lambda x: x.tag in self.keys(), other) # that needs to be overwritten overtags = map(lambda x: x.tag, overwrite) self[:] = filter(lambda x: x.tag not in overtags, self) # remove these for overwriting self.extend(overwrite) # append the overwritten elements return self class XML(object): '''A single XML element. Can be constructed either using raw string or individual fields.''' def __init__(self, value=None, tag='element', xmlns='', attrs={}, children=None, parent=None): if value and value[0] == '<': p = parser(value, self); return self.tag, self.xmlns, self.attrs, self.children, self.parent = tag, xmlns, attrs.copy() if attrs else {}, children if isinstance(children, XMLList) else XMLList(children) if children else XMLList(), parent if self.parent and not self.xmlns: self.xmlns = self.parent.xmlns if isinstance(self.children, (str, unicode)): self.children = [self.children] def __repr__(self): ns = [u'xmlns="%s"'%(self.xmlns,)] if self.xmlns and (not self.parent or self.xmlns != self.parent.xmlns) else [] attrs = [u'%s="%s"'%(k, escape(ustr(v))) for k,v in self.attrs.iteritems()] intag = u' '.join([self.tag] + ns + attrs) inner = u''.join([unicode(x) if isinstance(x, XML) else escape(x) for x in self.children]) return u'<%s>%s</%s>'%(intag, inner, self.tag) if inner else u'<%s />'%(intag) def toprettyxml(self, encoding='UTF-8', indent=' ', count=0): # similar but not same as xml.dom.minidom's toprettyxml ns = [u'xmlns="%s"'%(self.xmlns,)] if self.xmlns and (not self.parent or self.xmlns != self.parent.xmlns) else [] attrs = [u'%s="%s"'%(k, escape(ustr(v))) for k,v in self.attrs.iteritems()] intag = u' '.join([self.tag] + ns + attrs) inner = (u'\n' + indent*(count+1)).join([x.toprettyxml(encoding=None, indent=indent, count=count+1) if isinstance(x, XML) else escape(x.strip()) for x in self.children if not isinstance(x, basestring) or x.strip()]) return ('' if encoding is None else u'<?xml version="1.0"?>\n' if not encoding else u'<?xml version="1.0" encoding="%s"?>\n'%(encoding,)) + \ (u'<%s>\n'%(intag,) + indent*(count+1) + inner + '\n' + indent*count + u'</%s>'%(self.tag,) if len(self.elems) \ else (u'<%s>%s</%s>'%(intag, inner, self.tag) if inner else u'<%s />'%(intag,))) def __cmp__(self, other): return cmp(unicode(self), unicode(other)) # XML attributes can be accessed using Python container semantics. Doesn't throw exception. def __getitem__(self, item): return self.attrs.get(item, None) def __setitem__(self, item, value): self.attrs[item] = value def __delitem__(self, item): del self.attrs[item] def __contains__(self, item): return item in self.attrs def __call__(self, name=None): return self.children[name if name else "*"] def __getattr__(self, name): # if Python attribute not found, then check XML attribute. Never throws exception for attribute error if name == '_': if name not in self.__dict__: self.__dict__[name] = _(self) return self.__dict__[name] elif name in self.__dict__['attrs']: return self.__dict__['attrs'].get(name) raise AttributeError, 'Invalid attribute access ' + name def clear(self): self.children.clear(); self.attrs.clear() # clear all children and attributes def copy(self): return XML(str(self)) # copy into another XML @property def cdata(self): return self.children.cdata @property def elems(self): return self.children.elems class _(object): '''Allows accessing XML attributes by name using Python attribute semantics.''' def __init__(self, node): self.__dict__['_node'] = node def __getattr__(self, name): return self._node.attrs.get(name, None) def __setattr__(self, name, value): self._node.attrs[name] = value def __delattr__(self, name): del self._node.attrs[name] def __contains__(self, name): return name in self._node.attrs def __setitem__(self, name, value): self._node.attrs[name] = value def __getitem__(self, name): return self._node.attrs.get(name, None) def __delitem__(self, name): del self._node.attrs[name] def __call__(self, name): return self._node.attrs.get(name, None) # unit testing of this module if __name__ == '__main__': import doctest doctest.testmod()
53.230769
223
0.652566
bcd67e851a8bd49122613e6df435a6c9dcb87bb9
34,990
py
Python
.history/neuroformer/model_perceiver_20220121144355.py
woanderer/neuroformer
df3462d55977b6c9adcb6753e7c474b8b76e8021
[ "MIT" ]
null
null
null
.history/neuroformer/model_perceiver_20220121144355.py
woanderer/neuroformer
df3462d55977b6c9adcb6753e7c474b8b76e8021
[ "MIT" ]
null
null
null
.history/neuroformer/model_perceiver_20220121144355.py
woanderer/neuroformer
df3462d55977b6c9adcb6753e7c474b8b76e8021
[ "MIT" ]
null
null
null
# from code.transformer_vid.utils import convert_weights # import rotary_embedding_torch from torch.nn.modules.activation import GELU, ReLU # from data.OneCombo3.trainer import TrainerConfig import math import numpy as np import itertools import logging import torch import torch.nn as nn from torch.nn import functional as F from torch.autograd import Variable from torchvision.models.video import r3d_18 # from ResNet3D import r3d_18 from scipy.optimize import linear_sum_assignment # from rotary_embedding_torch import apply_rotary_emb, RotaryEmbedding from einops.layers.torch import Rearrange logger = logging.getLogger(__name__) def convert_weights(model: nn.Module): """Convert applicable model parameters to fp16""" def _convert_weights_to_fp16(l): if isinstance(l, (nn.Conv1d, nn.Conv2d, nn.Linear)): # nn.Conv3d, l.weight.data = l.weight.data.half() if l.bias is not None: l.bias.data = l.bias.data.half() if isinstance(l, nn.MultiheadAttention): for attr in [*[f"{s}_proj_weight" for s in ["in", "q", "k", "v"]], "in_proj_bias", "bias_k", "bias_v"]: tensor = getattr(l, attr) if tensor is not None: tensor.data = tensor.data.half() for name in ["text_projection", "proj"]: if hasattr(l, name): attr = getattr(l, name) if attr is not None: attr.data = attr.data.half() model.apply(_convert_weights_to_fp16) class GPTConfig: """ base GPT config, params common to all GPT versions """ embd_pdrop = 0.2 resid_pdrop = 0.2 attn_pdrop = 0.2 pos_pdrop = 0.2 temp_pdrop = 0.2 pos_emb = True temp_emb = True start_prune = 30 epoch = 0 def __init__(self, vocab_size, block_size, **kwargs): self.vocab_size = vocab_size self.block_size = block_size for k, v in kwargs.items(): setattr(self, k, v) class neuralGPTConfig: """ base GPT config, params common to all GPT versions """ n = 0.4 im_drop = 0.2 id_drop = n embd_pdrop = n resid_pdrop = n attn_pdrop = n pos_pdrop = n temp_pdrop = n pos_emb = True temp_emb = True def __init__(self, vocab_size, block_size, **kwargs): self.vocab_size = vocab_size self.block_size = block_size for k, v in kwargs.items(): setattr(self, k, v) class GPT1Config(GPTConfig): """ GPT-1 like network roughly 125M params """ n_layer = 12 n_head = 12 n_embd = 768 class VideoFeaturesExtractor(nn.Module): """ R3D: (3 x T x H x W) H, W = 112 """ def __init__(self): super().__init__() self.backbone = torch.nn.Sequential(*(list(r3d_18(pretrained=True).children())[:-2])) convert_weights(self.backbone) # # freeze backbone # for k, v in self.backbone.named_parameters(): # v.requires_grad = False def forward(self, x): # B = Batch, T, C, Fm, H, W features = self.backbone(x) # (B, C, T, H, W) B, C, T, H, W = features.shape features = features.permute(0, 2, 3, 4, 1) features = features.view(B, -1, C) return features class VideoEncoder(nn.Module): def __init__(self, n_embd): super().__init__() p1, p2 = 16 assert n_embd % (p1 * p2) == 0 "n_embd must be divisible by p1 * p2 " c = n_embd / self.to_patch_embedding = nn.Sequential( Rearrange(f'b c t (h p1) (w p2) -> b (t h w) (p1 p2 c)', p1=16, p2=16) ) def forward(self, x): return self.to_patch_embedding(x) class CausalSelfAttention(nn.Module): """ A vanilla multi-head masked self-attention layer with a projection at the end. """ def __init__(self, config): super().__init__() assert config.n_embd % config.n_head == 0 self.config = config # key, query, value projections for all heads self.key = nn.Linear(config.n_embd, config.n_embd) self.query = nn.Linear(config.n_embd, config.n_embd) self.value = nn.Linear(config.n_embd, config.n_embd) # regularization self.attn_drop = nn.Dropout(config.attn_pdrop) self.resid_drop = nn.Dropout(config.resid_pdrop) # output projection self.proj = nn.Linear(config.n_embd, config.n_embd) self.register_buffer("mask", self.build_mask(config.block_size)) self.n_head = config.n_head self.att = None self.T = config.block_size # self.rotary_embedding = RotarySpatioTemporalEmbedding(config) def build_mask(self, block_size): mask = torch.tril(torch.ones((block_size, block_size)), ).view(1, 1, block_size, block_size) return mask def generate_sparse_mask(self, att, p, config): """ Generate a sparse mask according to p. """ assert p >= 0 and p <= 1, "p should be in [0, 1]" T = config.block_size mask = torch.rand((1, T)) < p mask = mask.repeat(T, 1) mask[0, 0] = False # don't mask 1st step # check if any step is fully masked and umask it idx_all_true = (True == torch.all(mask, dim=0)).nonzero() for step in idx_all_true: sampler = torch.distributions.Uniform(low=0, high=step.item()+1) idx_false = sampler.sample((1,1)).long() mask[step, idx_false] = False # mask = mask.repeat(T, 1) mask = mask.view(1, 1, T, T).cuda() if att.is_cuda else mask.view(1, 1, T, T) att = att.masked_fill(mask, float('-inf')) return att def forward(self, x, pad=None, dtx=None): # B = Batch, T = Sequence, C = n_embed B, T, C = x.size() # calculate query, key, values for all head in batch and move head forward to the batch dim k = self.key(x).view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs) q = self.query(x).view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs) v = self.value(x).view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs) # # apply rotary embeddings # if dtx is not None: # q, k = self.rotary_embedding(q, k, dtx) # causal self-attention; Self-attend: (B, nh, T, hs) x (B, nh, hs, T) -> (B, nh, T, T) att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(k.size(-1))) att = att.masked_fill(self.mask[:,:,:T,:T] == 0, float('-inf')) if self.training: att = self.generate_sparse_mask(att, 0.25, self.config) if pad is not None: for idx, i in enumerate(pad): att[idx, :, :, self.T - i:] = float('-inf') # only able to see first padding token att = F.softmax(att, dim=-1) att = self.attn_drop(att) self.att = att y = att @ v # (B, nh, T, T) x (B, nh, T, hs) -> (B, nh, T, hs) y = y.transpose(1, 2).contiguous().view(B, T, C) # re-assemble all head outputs side by side # output projection y = self.resid_drop(self.proj(y)) return y class PositionalEmbedding(nn.Module): """ Implement the PE function. """ def __init__(self, n_embd, p_drop, max_len=1500): super().__init__() self.dropout = nn.Dropout(p=p_drop) # Compute the positional encodings once in log space. pe = torch.zeros(max_len, n_embd) position = torch.arange(0, max_len).unsqueeze(1) div_term = torch.exp(torch.arange(0, n_embd, 2) * -(math.log(10000.0) / n_embd)) pe[:, 0::2] = torch.sin(position * div_term) pe[:, 1::2] = torch.cos(position * div_term) pe = pe.unsqueeze(0) self.register_buffer('pe', pe) def forward(self, x): x = Variable(self.pe[:, :x.size(1)], requires_grad=False) return self.dropout(x) # class RotarySpatioTemporalEmbedding(nn.Module): # """ Rotary temporal embeddings - block_size = id_blk_sz """ # def __init__(self, config): # super().__init__() # self.frame_block_size = config.frame_block_size # self.id_block_size = config.id_block_size # self.emb = RotaryEmbedding(dim=32) # def forward(self, q, k, t): # b = t.shape[0] # tf = self.frame_block_size # queries = [] # keys = [] # for B in range(b): # im_temp_emb = torch.tensor([-0.5] * (tf//2) + [0.5] * (tf//2)) # im_pos_emb = torch.arange(self.frame_block_size) # im_emb = torch.stack([im_temp_emb, im_pos_emb], dim=0) # id_temp_emb = self.temp_emb(t[B], cache_key=self.block_size) # freqs = self.emb(torch.cat(im_emb, id_temp_emb)) # queries.append(apply_rotary_emb(freqs, q[B][None, ...])) # keys.append(apply_rotary_emb(freqs, k[B][None, ...])) # q, k = torch.cat(queries), torch.cat(keys) # return q, k class TemporalEmbedding(nn.Module): """ encoding temporal information using fourrier signals """ def __init__(self, n_embd, p_drop, max_len=1500): super().__init__() self.dropout = nn.Dropout(p=p_drop) # Compute the positional encodings once in log space. pe = torch.zeros(max_len, n_embd) position = torch.arange(0, max_len).unsqueeze(1) div_term = torch.exp(torch.arange(0, n_embd, 2) * -(math.log(10000.0) / n_embd)) pe[:, 0::2] = torch.sin(position * div_term) pe[:, 1::2] = torch.cos(position * div_term) pe = pe.unsqueeze(0) self.register_buffer('pe', pe) def forward(self, x): x = Variable(self.pe[:, :x.size(1)], requires_grad=False) return self.dropout(x) class LearntTemporalEmbedding(nn.Module): """ Project B x T x 1 time sequence to B x T x C """ def __init__(self, block_sz, n_embd, p_drop=0.2): super().__init__() self.temp_emb = nn.Sequential( nn.Linear(1, n_embd // 2), nn.GELU(), nn.Linear(n_embd // 2, n_embd), nn.Dropout(p_drop) ) def forward(self, x): return self.temp_emb(x.unsqueeze(-1)) class Decoder(nn.Module): def __init__(self, config): super().__init__() # decoder_layer = nn.TransformerDecoderLayer(config.n_embd, config.n_head, # activation='gelu', dropout=0.2, batch_first=True) # self.decoder = nn.TransformerDecoder(decoder_layer, config.n_layer) self.decoder = nn.Transformer(d_model=config.n_embd, nhead=config.n_head, num_encoder_layers=3, num_decoder_layers=config.n_layer, activation="gelu", dropout=0.4, batch_first=True) self.register_buffer("tgt_mask", self.generate_square_subsequent_mask(config.id_block_size)) # self.register_buffer("tgt_pad_mask", self.generate_padding_mask(config.ids_block_size)) self.T = config.id_block_size def generate_square_subsequent_mask(self, sz: int, pad=None): r"""Generate a square mask for the sequence. The masked positions are filled with float('-inf'). Unmasked positions are filled with float(0.0). """ mask = (torch.triu(torch.ones(sz, sz), diagonal=0) == 1).transpose(0, 1) mask = mask.float().masked_fill(mask == 0, float('-inf')).masked_fill(mask == 1, float(0.0)) return mask def generate_padding_mask(self, sz: int, pad=None): r"""Build a (B x T) mask that resides on the GPU and can be manipulated by build_padding_mask according to padded sequence """ mask = torch.zeros(1, sz, dtype=torch.bool) return mask def generate_sparse_mask(self, sz: int, pad=None): r""" Build a square mask that employs teacher forcing according to P """ rand_mat = torch.rand(1, sz) k = round(0.75 * sz) k_th_quant = torch.topk(rand_mat, k, largest = False)[0][:,-1:] bool_tensor = rand_mat <= k_th_quant mask = torch.where(bool_tensor, torch.tensor(1), torch.tensor(0)).repeat(sz, 1) mask = mask.float().masked_fill(mask == 0, float('-inf')).masked_fill(mask == 1, float(0.0)) return mask.cuda(self.tgt_mask.get_device()) if self.tgt_mask.is_cuda else mask def build_padding_mask(self, tgt, pad): # mask = self.tgt_pad_mask.repeat(tgt.shape[0], 1) mask = torch.zeros(tgt.shape[0], self.T, dtype=torch.bool) for B, P in enumerate(pad): mask[B, self.T - P:] = True return mask # .to(torch.cuda.current_device()) def forward(self, tgt, memory, pad): # padding_mask = self.build_padding_mask(tgt, pad) # tgt_mask = self.generate_sparse_mask(self.T) if self.training else self.tgt_mask return self.decoder(src=memory, tgt=tgt, tgt_mask=self.tgt_mask, tgt_key_padding_mask=None) class ProjectNorm(nn.Module): def __init__(self, feat_size, target_size): super().__init__() self.ln = nn.LayerNorm(feat_size) self.mlp = nn.Sequential( nn.Linear(feat_size, math.floor(2 * feat_size), bias=False), nn.GELU(), nn.Linear(math.floor(2 * feat_size), target_size, bias=False), ) def forward(self, x): return self.mlp(self.ln(x)) class TimeProjection(nn.Module): def __init__(self, seq_size, id_seq_size, feat_size, target_size): super().__init__() self.mlp_seq = nn.Sequential( nn.Linear(seq_size, id_seq_size), nn.ReLU(), nn.Dropout(p=0.3), nn.Linear(id_seq_size, id_seq_size) ) self.mlp_t = nn.Sequential( nn.Linear(feat_size, feat_size // 2), nn.ReLU(), nn.Dropout(p=0.3), nn.Linear(feat_size // 2, target_size) ) def forward(self, x): x = x.permute(0, 2, 1) # B, T, C -> B, C, T x = self.mlp_seq(x) # B, C, T / 2 x = x.permute(0, 2, 1) # B, T / 2, C return self.mlp_t(x) # B, T / 2, 1 class PSTHProjection(nn.Module): """Takes Last Output of Block -> (B, C) Builds PSTH table """ def __init__(self, config): super().__init__() self.mlp = nn.Sequential( nn.Linear(config.n_embd, 4 * config.n_embd, bias=False), nn.Dropout(p=0.2), nn.GELU(), nn.Linear(config.n_embd * 4, config.id_vocab_size, bias=False) ) def forward(self, x): return self.mlp(x) # class PSTHProjection(nn.Module): # def __init__(self, config): # super().__init__() # self.mlp_seq = nn.Sequential( # nn.Linear(config.id_block_size, config.id_block_size // 2, bias=False), # nn.GELU(), # nn.Dropout(p=0.2), # nn.Linear(config.id_block_size // 2, 1, bias=False) # ) # self.mlp_t = nn.Sequential( # nn.Linear(config.n_embd, config.n_embd * 4, bias=False), # nn.GELU(), # nn.Dropout(p=0.2), # nn.Linear(config.n_embd * 4, config.id_vocab_size, bias=False) # ) # def forward(self, x): # x = x.transpose(-1, -2) # B, T, C -> B, C, T # x = self.mlp_seq(x) # B, C, 1 # x = x.transpose(-2, -1) # B, 1, Vocab_id # return self.mlp_t(x) class TimeRNN(nn.Module): def __init__(self, feat_size, target_size): super().__init__() class Block(nn.Module): """ an unassuming Transformer block """ def __init__(self, config): super().__init__() self.ln1 = nn.LayerNorm(config.n_embd) self.ln2 = nn.LayerNorm(config.n_embd) self.attn = CausalSelfAttention(config) self.mlp = nn.Sequential( nn.Linear(config.n_embd, 4 * config.n_embd), nn.GELU(), nn.Linear(4 * config.n_embd, config.n_embd), nn.Dropout(config.resid_pdrop), ) def forward(self, x, pad=None, dtx=None): x = x + self.attn(self.ln1(x), pad) x = x + self.mlp(self.ln2(x)) return x class BlockSequential(nn.Sequential): def forward(self, x, pad=None, dtx=None): for module in self._modules.values(): x = module(x, pad, dtx) return x class DiceLossPSTH(nn.Module): def __init__(self, size_average=True, smooth=1): super().__init__() def cross_entropy(self, input, target): return torch.mean(-torch.sum(target * torch.log(input), 1)) def forward(self, logits, targets, smooth=1, class_weights=None): total_logits = F.layer_norm(torch.sum(logits, dim=-2), [logits.size()[-1]]) # probs = F.log_softmax(logits, dim=-1) probs = F.softmax(total_logits, dim=-1) # logits = F.gelu(logits) # probs = logits / (logits.max(dim=-1).values.unsqueeze(-1)) # flatten label and prediction tensors outputs = probs.contiguous().view(-1) targets = targets.contiguous().view(-1) labels = torch.zeros_like(outputs) labels[targets] = 1 / len(targets) # intersection = (outputs * labels).sum() # dice = (2. * intersection + smooth) / (outputs.sum() + labels.sum() + smooth) return self.cross_entropy(outputs[None, ...], labels[None, ...]) class SetLoss(nn.Module): def __init__(self): super().__init__() def cross_entropy(self, input, target): return torch.mean(-torch.sum(target * torch.log(input), 1)) def forward(self, logits, targets): targets = targets.contiguous().view(-1) loss = 0 for n_step, n_logits in enumerate(logits): n_logits = F.softmax(n_logits, dim=-1) n_target = targets[n_step:] n_target_dist = torch.zeros_like(n_logits) if len(n_target) != 0: n_target_dist[n_target] = 1 / len(n_target) loss += self.cross_entropy(n_logits[None,...], n_target_dist[None, ...]) return loss / len(logits) class TruncatedLoss(nn.Module): def __init__(self, q=0.8, k=0.2, trainset_size=50000): super(TruncatedLoss, self).__init__() self.q = q self.k = k self.weight = torch.nn.Parameter(data=torch.ones(trainset_size, 1), requires_grad=False) def forward(self, logits, targets, indexes): p = F.softmax(logits, dim=-1) Yg = torch.gather(p, 2, targets.unsqueeze(2)) loss = ((1-(Yg**self.q))/self.q)*self.weight[indexes] - ((1-(self.k**self.q))/self.q)*self.weight[indexes] loss = torch.mean(loss) return loss def update_weight(self, logits, targets, indexes): p = F.softmax(logits, dim=-1) Yg = torch.gather(p, 2, targets.unsqueeze(2)) Lq = ((1-(Yg**self.q))/self.q) Lqk = np.repeat(((1-(self.k**self.q))/self.q), targets.size(0)) Lqk = torch.from_numpy(Lqk).type(torch.cuda.FloatTensor) Lqk = torch.unsqueeze(Lqk, 1) condition = torch.gt(Lqk, Lq) self.weight[indexes] = condition.type(torch.cuda.FloatTensor) # class PSTHLOSS(nn.Module): # def __init__(self): # super().__init__() # def forward(self, logits, targets): # total_logits = torch.sum(logits, dim=-2) # sum over sequence dimension # probs = F.softmax(total_logits, dim=-1) # outptu class HungarianMatcher(nn.Module): def __init__(self): super().__init__() @torch.no_grad() def forward(self, logits, targets): T, C = logits.size() probs = F.softmax(logits, dim=-1) cost_id = (1 - probs[:, targets]).cpu().view(T, -1).unsqueeze(0) indices = [linear_sum_assignment(c[i]) for i, c in enumerate(cost_id.split(len(targets), -1))] return [(torch.as_tensor(i, dtype=torch.int64), torch.as_tensor(j, dtype=torch.int64)) for i, j in indices] class KLDivLoss(nn.Module): def __init__(self): super().__init__() self.log_softmax = nn.LogSoftmax(dim=-1) self.KLdiv = nn.KLDivLoss() def forward(self, logits, targets): log_probs = self.log_softmax(logits) return self.KLdiv(log_probs.long(), targets) class PoissonCrossEntropyLoss(nn.Module): def __init__(self): super().__init__() self.log_softmax = nn.LogSoftmax(dim=-1) # self.softmax = nn.Softmax(dim=-1) self.nll_poisson = nn.PoissonNLLLoss() # self.nll_poisson = nn.NLLLoss() def forward(self, logits, targets): log_probs = self.log_softmax(logits) return self.nll_poisson(log_probs, targets) class GPT(nn.Module): """ the full GPT language model, with a context size of block_size """ def __init__(self, config): super().__init__() self.device = 'cpu' if torch.cuda.is_available(): self.device = torch.cuda.current_device() self.config = config # input embedding stem self.n_embd = config.n_embd self.tok_emb = nn.Embedding(config.id_vocab_size, config.n_embd) self.pos_emb = PositionalEmbedding(config.n_embd, p_drop=0.2) # self.pos_emb_id = nn.Parameter(torch.zeros(1, config.id_block_size, config.n_embd)) self.pos_emb_frames = nn.Parameter(torch.zeros(1, config.frame_block_size, config.n_embd)) # self.temp_emb = TemporalEmbedding(config.n_embd, p_drop=0.2) # self.temp_emb = RotaryTemporalEmbedding(config.id_block_size) self.temp_emb = LearntTemporalEmbedding(config.id_block_size, config.n_embd) self.frame_temp_emb = LearntTemporalEmbedding(config.frame_block_size, config.n_embd) self.id_drop = nn.Dropout(config.id_drop) self.im_drop = nn.Dropout(config.im_drop) self.drop = nn.Dropout(config.embd_pdrop) # -- Visual Backbone -- # # self.visual_backbone = VideoFeaturesExtractor() self.video_encoder = VideoEncoder() frame_temp_emb = torch.tensor(list(itertools.chain(*[[n * 0.05] * (config.frame_block_size//20) for n in range(20)]))).unsqueeze(0) self.register_buffer("frame_temp_emb_seq", frame_temp_emb) # -- Contrastive Loss -- ## # self.proj_id = ProjectNorm(config.n_embd, config.n_embd) # self.proj_vid = VidProjectNorm(config.n_embd, config.n_embd) # im_shape ## -- IM_Decoder -- ## # self.blocks_id = BlockSequential(*[Block(config) for _ in range(2)]) # self.blocks_im = BlockSequential(*[Block(config) for _ in range(2)]) # self.ln_f_id = nn.LayerNorm(config.n_embd) # self.ln_f_im = nn.LayerNorm(config.n_embd) ## -- Decoder -- ## # self.ln_f = nn.LayerNorm(config.n_embd) ## GPT # self.blocks = BlockSequential(*[Block(config) for _ in range(config.n_layer)]) # self.ln_f = nn.LayerNorm(config.n_embd) ## enc_dec self.state_decoder = Decoder(config) self.ln_f_state_dec = nn.LayerNorm(config.n_embd) self.stimulus_decoder = Decoder(config) self.ln_f_stimulus_dec = nn.LayerNorm(config.n_embd) self.head = nn.Linear(config.n_embd, config.vocab_size, bias=False) ## -- Time -- ## # self.proj_time = TimeProjection(config.block_size, config.id_block_size, config.n_embd, config.n_dt) self.proj_time = ProjectNorm(config.n_embd, config.n_dt) # self.proj_time = ProjectNorm(config.n_embd, 1) ## -- PSTH -- ## # self.proj_psth = PSTHProjection(config) # Loss # self.dice_loss = DiceLossPSTH() # self.poisson_loss = PoissonCrossEntropyLoss() # self.hungarian_matcher = HungarianMatcher() # self.kldiv_loss = KLDivLoss() # self.truncated_loss = TruncatedLoss(trainset_size=config.data_size) # self.set_loss = SetLoss() # self.a = torch.tensor(0.5, requires_grad=True) self.block_size = config.block_size self.apply(self._init_weights) if config.class_weights is not None: for key in config.class_weights.keys(): self.register_buffer(f"class_weights_{key}", config.class_weights[key]) logger.info("number of parameters: %e", sum(p.numel() for p in self.parameters())) def get_block_size(self): return self.block_size def _init_weights(self, module): if isinstance(module, (nn.Linear, nn.Embedding)): module.weight.data.normal_(mean=0.0, std=0.02) if isinstance(module, nn.Linear) and module.bias is not None: module.bias.data.zero_() elif isinstance(module, nn.LayerNorm): module.bias.data.zero_() module.weight.data.fill_(1.0) def configure_optimizers(self, train_config): """ Separates parameters into those who will experience weight decay and those that will not """ if train_config.decay_weights: decay = set() no_decay = set() whitelist_weight_modules = (torch.nn.Linear, ) blacklist_weight_modules = (torch.nn.LayerNorm, torch.nn.Embedding) for mn, m in self.named_modules(): for pn, p in m.named_parameters(): fpn = '%s.%s' % (mn, pn) if mn else pn # full param name if pn.endswith('bias'): # all biases will not be decayed no_decay.add(fpn) elif pn.endswith('weight') and isinstance(m, whitelist_weight_modules): # weights of whitelist modules will be weight decayed decay.add(fpn) elif pn.endswith('weight') and isinstance(m, blacklist_weight_modules): # weights of blacklist modules will NOT be weight decayed no_decay.add(fpn) else: no_decay.add(fpn) # special case the position embedding parameter in the root GPT module as not decayed black_list_mods = ['pos_emb', 'temp_emb'] for mods in black_list_mods: for name, param in self.named_parameters(): if mods in name: no_decay.add(name) # also pos_emb # validate that we considered every parameter param_dict = {pn: p for pn, p in self.named_parameters()} no_decay -= decay & no_decay inter_params = decay & no_decay union_params = decay | no_decay assert len(inter_params) == 0, "parameters %s made it into both decay/no_decay sets!" % (str(inter_params), ) assert len(param_dict.keys() - union_params) == 0, "parameters %s were not separated into either decay/no_decay set!" \ % (str(param_dict.keys() - union_params), ) # create the pytorch optimizer object optim_groups = [ {"params": [param_dict[pn] for pn in sorted(list(decay))], "weight_decay": train_config.weight_decay}, {"params": [param_dict[pn] for pn in sorted(list(no_decay))], "weight_decay": 0.0}, ] optimizer = torch.optim.AdamW(optim_groups, lr=train_config.learning_rate, betas=train_config.betas) else: parameters = self.parameters() optimizer = torch.optim.Adam(parameters, lr=train_config.learning_rate) return optimizer def process_features(self, x): # batch, block_size, feature p_idx = x['id_prev'] idx = x['id'] dtx = x['dt'] dtx_prev = x['dt_prev'] frames = self.video_encoder(x['frames']) pad = x['pad'] b, t = idx.size() # b_p, t_p = p_idx.size() bf, tf = frames.size()[0:2] # forward the GPT model ''' positional and temporal embeddings implemented in multiple ways, learnt, fourrier decomposition and in the case of time, just passed as is. ''' # # Embeddings prev_id_position_embeddings = self.pos_emb(p_idx) prev_id_temporal_embeddings = self.temp_emb(dtx_prev.float()) id_position_embeddings = self.pos_emb(idx) im_position_embeddings = self.pos_emb_frames temporal_embeddings = self.temp_emb(dtx.float()) # Extract ID features prev_token_embeddings = self.id_drop(self.tok_emb(p_idx) + prev_id_temporal_embeddings + prev_id_position_embeddings) token_embeddings = self.tok_emb(idx) # each index maps to a (learnable) vector token_embeddings = token_embeddings + temporal_embeddings + id_position_embeddings token_embeddings = self.id_drop(token_embeddings) # Extract image features and add time embeddings im_temporal_embeddings = self.frame_temp_emb(self.frame_temp_emb_seq) im_embeddings = frames # self.tok_emb(frames) im_embeddings = im_embeddings + im_position_embeddings + im_temporal_embeddings im_embeddings = self.im_drop(im_embeddings) # separate pos emb? # Tidy up features = dict() features['id_prev'] = prev_token_embeddings features['id'] = token_embeddings features['frames'] = im_embeddings return features, pad def perceiver(self, features, pad): x = self.state_decoder(tgt=features['id'], memory=features['id_prev'], pad=pad) x = self.ln_f_state_dec(x) x = self.stimulus_decoder(tgt=features['id'], memory=features['frames'], pad=pad) x = self.ln_f_stimulus_dec(x) logits = self.head(x) return logits, x def enc_dec(self, features, pad): x = self.stimulus_decoder(tgt=features['id'], memory=features['frames'], pad=pad) x = self.ln_f_stimulus_dec(x) logits = self.head(x) return logits, x def GPTdecoder(self, features, pad, dtx=None): # image + neural features x = torch.cat((features['frames'], features['id']), dim=1) # Decoder x = self.blocks(x, pad, dtx) # (B, T, C) x = self.ln_f(x) logits = self.head(x) # print(logits.shape) # (B, T, Vocab) # logits_psth = x[:, -1] # (B, C) return logits, x def forward(self, x, targets=None): idx = x['id'] dtx = x['dt'] frames = x['frames'] pad = x['pad'] b, t = idx.size() # b, t = x['id'].shape[0], x['id'].shape[1] + x['id_prev'].shape[1] bf, tf = frames.size()[0:2] tf = self.config.frame_block_size # assert t + tf == self.config.block_size, f"{tf} {t}" # assert t <= self.block_size, "Cannot forward, model block size is exhausted" features, pad = self.process_features(x) logits, x = self.perceiver(features, pad) # logits, x = self.enc_dec(features, pad) # logits, x = self.GPTdecoder(features, pad) time = self.proj_time(x) # (B, T_id, 1) # print(x[:, 0].shape) # psth = self.proj_psth(x) # (B, Vocab_id) # if targets, calculate loss # calculate loss on logits up to padding token for each batch loss = None loss_frames = 0 loss_id = [] loss_time = [] loss_dice = [] loss_psth = [] loss_hungarian = [] if targets is not None: # loss_psth = self.dice_loss(psth, targets['modes'][:, tf:]) for B, P in enumerate(pad): tf = 0 # im_logits = logits[B, :tf] # im_targets = targets['frames'][B, :tf] # loss_frames += F.cross_entropy(im_logits.view(-1, im_logits.size(-1)), im_targets.view(-1)) id_logits = logits[B, tf:tf + t - P] id_targets = targets['id'][B, :t - P] loss_id_ = F.cross_entropy(id_logits.view(-1, id_logits.size(-1)), id_targets.view(-1), weight=self.class_weights_id) # if self.config.epoch >= 15: # self.truncated_loss.update_weight(id_logits[None, ...], id_targets[None, ...], id_indexes[None, ...]) # loss_id_ = self.truncated_loss(id_logits[None, ...], id_targets[None, ...], id_indexes[None, ...]) time_preds = time[B, :t - P] time_targets = targets['dt'][B, :t - P] loss_time_ = F.cross_entropy(time_preds.view(-1, time_preds.size(-1)), time_targets.view(-1), weight=self.class_weights_dt) # loss_time_ = F.mse_loss(time_preds.squeeze(-1), time_targets) # loss_id_ = self.poisson_loss(id_logits.view(-1, id_logits.size(-1)), F.one_hot(id_targets, self.config.vocab_size)) # if len(id_targets) > 0: # indices = self.hungarian_matcher(id_logits, id_targets) # probs_matching, targets_matching = id_logits[indices[0][0]], id_targets[indices[0][1]] # loss_hungarian_ = F.cross_entropy(probs_matching, targets_matching, weight=self.class_weights).to(self.device) # loss_hungarian.append(loss_hungarian_) # # psth = self.proj_psth(x[B, -1]) # from the EOS position # loss_psth.append(torch.nan_to_num(self.set_loss(id_logits, id_targets))) # loss_psth_ = self.dice_loss(id_logits, id_targets) # loss_psth.append(torch.nan_to_num(loss_psth_)) loss_time.append(torch.nan_to_num(loss_time_)) loss_id.append(torch.nan_to_num(loss_id_)) loss = dict() # loss['frames'] = loss_frames / (b / 3) loss['id'] = sum(loss_id) / (b * 2) # sum(loss_id) / (b * 2) # / len(loss_id) loss['time'] = sum(loss_time) / (b * 2) # loss['dice'] = sum(loss_dice) / len(loss_dice) # loss['dt'] = loss_time / (b * 50) # loss['hungarian'] = sum(loss_hungarian) / (b * 2) # loss['psth'] = sum(loss_psth) / (b * 2) for key in list(loss): if isinstance(loss[key], float): del loss[key] preds = dict() preds['id'] = logits # [:, tf:] # only id logits preds['dt'] = time return preds, features, loss
39.270483
139
0.582223
1584291f3a7e50975c197a8ee5207917531ee96e
5,030
py
Python
groups/models.py
qsic/qsic3
b45dfcc76c80001b0c35c6a887a0cfcdf8d1c1e2
[ "BSD-3-Clause" ]
null
null
null
groups/models.py
qsic/qsic3
b45dfcc76c80001b0c35c6a887a0cfcdf8d1c1e2
[ "BSD-3-Clause" ]
1
2015-01-12T05:54:20.000Z
2015-01-12T05:55:23.000Z
groups/models.py
qsic/qsic3
b45dfcc76c80001b0c35c6a887a0cfcdf8d1c1e2
[ "BSD-3-Clause" ]
null
null
null
import os import string import urllib.parse import urllib.request from django.core.urlresolvers import reverse from django.db import models from django.db.models import Q from django.template.defaultfilters import slugify from django.utils import timezone from image_cropping.fields import ImageRatioField from py3s3.files import S3ContentFile from parsers.improvteams.parser import ItTeamParser class Group(models.Model): """ Represents a Team or other Performance Group. """ name = models.CharField(max_length=64) slug = models.SlugField(blank=True, default='') # 'it' is short for Imrpovteams / Improvteams.com it_url = models.URLField(null=True, blank=True) photo = models.ImageField(upload_to='groups/photos', null=True, blank=True) detail_crop = ImageRatioField('photo', '970x500', size_warning=True) banner_crop = ImageRatioField('photo', '960x300', size_warning=True) bio = models.TextField(null=True, blank=True) create_dt = models.DateTimeField(auto_now_add=True, null=True) is_house_team = models.BooleanField(default=True) is_active = models.BooleanField(default=True) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.performer_offset = 0 def __str__(self): return self.name def __iter__(self): return self def type(self): return self.__class__.__name__ def __next__(self): qs = self.groupperformerrelation_set.all() qs = qs.filter( Q(start_dt__lte=timezone.now()), Q(end_dt__gte=timezone.now()) | Q(end_dt=None) ) if self.performer_offset < qs.count(): gpr = qs[self.performer_offset] self.performer_offset += 1 return gpr.performer else: raise StopIteration @property def is_current(self): return self.is_active def save(self, **kwargs): self.slug = slugify(self.name) super().save() @property def url(self): url = reverse('groups:group_detail_view_add_slug', kwargs={'pk': self.id}) url = ''.join((url, '/', self.slug)) return url def save_it_content_from_parsed_it_url(self): """Save Group info parsed from Improvteams.com Return True on successful completion """ from performers.models import Performer # Return False if URL passed does not save to model # eg. invalid URL if not self.it_url: return {'success': False, 'msg': 'It url is not set.'} # Parse performer info from URL try: group_info = ItTeamParser(self.it_url) except: return {'success': False, 'msg': 'Unable to parse team info.'} self.name = group_info.team_name self.bio = group_info.team_bio uri = urllib.parse.urljoin(self.it_url, group_info.team_photo_uri) file_name = os.path.basename(uri) with urllib.request.urlopen(uri) as imgp: # make sure resource has a content-length if not 'Content-Length' in imgp.headers: return None content_length = int(imgp.headers['Content-Length']) content = imgp.read(content_length) # make sure imgp is a jpeg mimetype = 'image/jpeg' if imgp.info().get_content_type() == mimetype: s3file = S3ContentFile(content, name=file_name, mimetype=mimetype) self.photo.save(file_name, s3file, save=True) self.save() if group_info.performer_uri_list: for performer_uri in group_info.performer_uri_list: p = Performer.objects.create(first_name='', last_name='', it_url=performer_uri) p.load_from_it() GroupPerformerRelation.objects.create(group=self, performer=p, start_dt=timezone.now()) return {'success': True} def load_from_it(self): self.save_it_content_from_parsed_it_url() # save default dims of photo if self.photo: self.detail_crop = ','.join(('0', '0', str(self.photo.width), str(500))) self.banner_crop = ','.join(('0', '0', str(self.photo.width), str(300))) self.save() return True class GroupPerformerRelation(models.Model): """ This model represents the relationship between a performer and a performance group. A performer is always part of a group. Whether the performer appears on a team's current roster depends on if the peroformer has a ``GroupPerfromerRelation`` for the group. """ group = models.ForeignKey('groups.Group') performer = models.ForeignKey('performers.Performer') start_dt = models.DateTimeField() end_dt = models.DateTimeField(null=True, blank=True) def __str__(self): return '{} in {}'.format(self.performer, self.group)
33.986486
95
0.631014
b8443b6b72fabe5c427c905e0851cc7ded70722e
912
py
Python
hw2/support.py
ixlan/Deep-learning
246e5285b6fb6508814762fddfd00d54515ccf79
[ "MIT" ]
null
null
null
hw2/support.py
ixlan/Deep-learning
246e5285b6fb6508814762fddfd00d54515ccf79
[ "MIT" ]
null
null
null
hw2/support.py
ixlan/Deep-learning
246e5285b6fb6508814762fddfd00d54515ccf79
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from glob import glob import os def accuracy_loss_curve(train_acc, test_acc, train_loss, test_loss, iter_steps): plt.subplot(2, 1, 1) plt.plot(iter_steps, train_loss, '-o', label ='train') plt.plot(iter_steps, test_loss, '-o', label = 'test') plt.xlabel('Iteration') plt.ylabel('Loss') plt.legend(loc='upper right') plt.subplot(2, 1, 2) plt.plot(iter_steps, train_acc, '-o', label='train') plt.plot(iter_steps, test_acc, '-o', label='test') plt.xlabel('Iteration') plt.ylabel('Accuracy') plt.legend(loc='lower right') plt.gcf().set_size_inches(15, 12) plt.show() def get_run_var(dir): subdirectories = get_immediate_subdirectories(dir) return len(subdirectories) def get_immediate_subdirectories(a_dir): return [name for name in os.listdir(a_dir) if os.path.isdir(os.path.join(a_dir, name))]
27.636364
80
0.680921
4bfdddd569923d16c7edbded917eaf53d848ffe3
656
py
Python
src/genie/libs/parser/bigip/get_wom_profile.py
nujo/genieparser
083b01efc46afc32abe1a1858729578beab50cd3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/bigip/get_wom_profile.py
nujo/genieparser
083b01efc46afc32abe1a1858729578beab50cd3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/bigip/get_wom_profile.py
nujo/genieparser
083b01efc46afc32abe1a1858729578beab50cd3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
# Global Imports import json from collections import defaultdict # Metaparser from genie.metaparser import MetaParser # ============================================= # Collection for '/mgmt/tm/wom/profile' resources # ============================================= class WomProfileSchema(MetaParser): schema = {} class WomProfile(WomProfileSchema): """ To F5 resource for /mgmt/tm/wom/profile """ cli_command = "/mgmt/tm/wom/profile" def rest(self): response = self.device.get(self.cli_command) response_json = response.json() if not response_json: return {} return response_json
19.294118
52
0.577744
1b9ef6398acadcef2e849943f43501841e125121
7,524
py
Python
scripts/elia_daily_graph.py
sophiano/cusvm
7bba8a216b02a7c5607b4b5127c245c74d8f8514
[ "MIT" ]
null
null
null
scripts/elia_daily_graph.py
sophiano/cusvm
7bba8a216b02a7c5607b4b5127c245c74d8f8514
[ "MIT" ]
null
null
null
scripts/elia_daily_graph.py
sophiano/cusvm
7bba8a216b02a7c5607b4b5127c245c74d8f8514
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Jul 2 08:44:14 2021 @author: sopmathieu """ import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.rcParams['font.size'] = 14 import pkg_resources as pkg from cusvm import preprocessing as pre from cusvm import autocorrelations as acf ### load data (loaded automatically with package) data_path = pkg.resource_filename(pkg.Requirement.parse("cusvm"), 'data') #df = pd.read_csv (r'../data/PVdaily.csv') #local path df = pd.read_csv(data_path + '\PVdaily.csv') #global path data = np.array(df)[:,1:] data = data.astype('float') data = data/96 names = list(df.columns)[1:] (n_obs, n_series) = data.shape ### plot raw data # plt.hist(data[~np.isnan(data)], bins='auto', density=True, facecolor='b') # plt.title("Elia data (day)") # plt.grid(True) # plt.ylabel('Density') # plt.xlabel('load factor') # plt.savefig('hist_day.pdf') #save figures # plt.show() ### load time #with open('../data/time_daily', 'rb') as file: #local path with open(data_path + '/time_daily', 'rb') as file: #global path my_depickler = pickle.Unpickler(file) time = my_depickler.load() #data every day ### remove year 2015 with unusual deviations # start = np.where(time >= 2016)[0][0] # data = data[start:,:] # time = time[start:] ### plot the data def multiplot(data, time, start_time=2015, stop_time=2021, ind=[3,4,14,20,21], same_ax=False): start = np.where(time >= start_time)[0][0] stop = np.where(time >= stop_time)[0][0] if stop-start < 1000: ind_ticks = np.arange(start, stop, 60) #two months x_ticks = np.round(time[ind_ticks],2) else : ind_ticks = np.arange(start, stop, 365) #one year x_ticks = np.round(time[ind_ticks]) count = 1 fig = plt.figure(figsize=(10.0, 12.0)) max_val = np.max(data[start:stop, ind])*1.1 for i in ind: f = fig.add_subplot(len(ind), 1, count) plt.ylabel(names[i]) #plt.plot(data[start:stop, i]) plt.plot(time[start:stop], data[start:stop, i]) if same_ax: f.set_ylim([0, max_val]) if count < len(ind): f.axes.get_xaxis().set_ticklabels([]) plt.xticks(x_ticks) count += 1 plt.show() return fig def plot_single(data, time, start_time=2015, stop_time=2021, ind=3, same_ax=False): start = np.where(time >= start_time)[0][0] stop = np.where(time >= stop_time)[0][0] if stop-start < 1000: ind_ticks = np.arange(start, stop, 60) #two months x_ticks = np.round(time[ind_ticks],2) else : ind_ticks = np.arange(start, stop, 365) #one year x_ticks = np.round(time[ind_ticks]) fig = plt.figure(figsize=(8.0, 4.5)) plt.title(names[ind]) plt.xlabel('year') plt.plot(time[start:stop], data[start:stop, ind]) plt.xticks(x_ticks) return fig ################################################ multiplot(data, time, 2016, 2017) #RESA, IVEG, IMEA 2015 multiplot(data, time, 2019, 2020) #14 September, IMEA (pic) multiplot(data, time, 2017, 2017.8) #8march-21May (par 1/4H, changements brusques, avec 0) # plot_single(data, time, 2016, 2018, ind=5) # plt.ylabel('$P(i,t)$') # plt.savefig('mult.pdf') #save figures region = [i for i in range(len(names)) if names[i] == 'IMEA'][0] fig = plot_single(data, time, ind=region) plt.ylabel('$P(i,t)$ ') #plt.savefig('flow_1_el.pdf') #save figure plt.show() plt.hist(data[:,region], bins='auto', density=True, facecolor='b') plt.text(40, 0.04, 'mean: ' '%.3f' %np.nanmean(data[:,region])) plt.text(40, 0.03, 'std: ' '%.3f' %np.nanstd(data[:,region])) plt.xlabel('$P(i,t)$') plt.title(names[region]) plt.ylabel('Density') plt.grid(True) #plt.savefig('hist_1_el.pdf') #save figure plt.show() #===================================================================== ### Histograms and graphs for the preprocessing #====================================================================== ### rescaling data_rescaled, k_factors = pre.rescaling(data, period_rescaling=365) multiplot(data_rescaled, time) ### median med = pre.median(data_rescaled) fig = plt.figure(figsize=(10.0, 6.0)) plt.plot(time, med) ; plt.show() ### remove common signal ratio = pre.remove_signal(data, ref=med) #mean = 1 multiplot(ratio, time) fig = plot_single(ratio, time, ind=region) plt.ylabel('$P(i,t)/\hat c(t)$ ') #plt.savefig('flow_2_el.pdf') plt.show() plt.hist(ratio[:,region], bins='auto', density=True, facecolor='b') plt.text(1.5, 4, 'mean: ' '%.3f' %np.nanmean(ratio[:,region])) plt.text(1.5, 3, 'std: ' '%.3f' %np.nanstd(ratio[:,region])) #plt.axis([0,150, 0, 0.08]) #plt.yticks(np.arange(0, 0.02, 0.005)) plt.xlabel('$P(i,t)/\hat c(t)$') plt.title(names[region]) plt.ylabel('Density') plt.grid(True) #plt.savefig('hist_2_el.pdf') plt.show() ### rescale the ratio ratio, k_factors = pre.rescaling(ratio, period_rescaling=365) multiplot(ratio, time) fig = plot_single(ratio, time, ind=region) plt.ylabel('$\hat \mu_{\eta}(i,t)$ ') #plt.savefig('flow_3_el.pdf') plt.show() plt.hist(ratio[:,region], bins='auto', density=True, facecolor='b') plt.text(1.5, 3, 'mean: ' '%.3f' %np.nanmean(ratio[:,region])) plt.text(1.5, 2, 'std: ' '%.3f' %np.nanstd(ratio[:,region])) #plt.axis([0,150, 0, 0.08]) #plt.yticks(np.arange(0, 0.02, 0.005)) plt.xlabel('$\hat \mu_{\eta}(i,t)$') plt.title(names[region]) plt.ylabel('Density') plt.grid(True) #plt.savefig('hist_3_el.pdf') plt.show() ### select an IC pool pool = pre.pool_clustering(ratio) #10 names_IC = [names[i] for i in range(n_series) if i in pool] names_OC = [names[i] for i in range(n_series) if i not in pool] multiplot(ratio, time) multiplot(ratio, time, ind=[2,7,12,14,17], same_ax=True) #OC multiplot(ratio, time, ind=[9,11,18,19,21], same_ax=True) #IC multiplot(ratio, time, ind=[1,21,2,8,15], same_ax=True) #IC and OC ratioIC = ratio[:, pool] ### standardise the data #K_knee = pre.choice_K(ratio, ratioIC, start=50, stop=2000, step=50) K = 400 data_stn, dataIC_stn = pre.standardisation(ratio, ratioIC, K) multiplot(data_stn, time) fig = plot_single(data_stn, time, ind=region) plt.ylabel('$\hat \epsilon_{\eta}(i,t)$ ') #plt.savefig('flow_4_el.pdf') plt.show() plt.hist(data_stn[:,region], bins='auto', density=True, facecolor='b') plt.text(7.5, 0.3, 'mean: ' '%.3f' %np.nanmean(data_stn[:,region])) plt.text(7.5, 0.2, 'std: ' '%.3f' %np.nanstd(data_stn[:,region])) #plt.axis([0,150, 0, 0.08]) #plt.yticks(np.arange(0, 0.02, 0.005)) plt.xlabel('$\hat \epsilon_{\eta}(i,t)$') plt.title(names[region]) plt.ylabel('Density') plt.grid(True) #plt.savefig('hist_4_el.pdf') plt.show() ### plot the (IC) data # plt.hist(dataIC_stn[~np.isnan(dataIC_stn)], range=[-4,4], bins='auto', density=True, facecolor='b') # plt.title("Data IC") # plt.text(2, 1, 'mean:' '%4f' %np.nanmean(dataIC_stn)) # plt.text(2, 0.8, 'std:' '%4f' %np.nanstd(dataIC_stn)) # plt.axis([-4, 4, 0, 1.5]) # plt.grid(True) # plt.show() ### plot all data # plt.hist(data_stn[~np.isnan(data_stn)], range=[-4,4], bins='auto', density=True, facecolor='b') # plt.title("All Data (IC and OC)") # plt.text(2, 1, 'mean:' '%4f' %np.nanmean(data_stn)) # plt.text(2, 0.8, 'std:' '%4f' %np.nanstd(data_stn)) # plt.axis([-4, 4, 0, 1.5]) # plt.grid(True) # plt.show() ### autocorrelation acf.acf_pacf_plot(data_stn, which_display=3, max_cov=50) acf.acf_pacf_plot(data_stn, which_display=2, max_cov=50) acf.acf_pacf_plot(data_stn, which_display=21, max_cov=50)
30.33871
103
0.630649
6b96f562dd2288fbae2fcae077aa7114c47aeed7
2,161
py
Python
src/azure-cli/azure/cli/command_modules/interactive/__init__.py
WCollins3/azure-cli
1639f71f25e926376e3af7014325329702e028ec
[ "MIT" ]
1
2020-03-20T06:01:04.000Z
2020-03-20T06:01:04.000Z
src/azure-cli/azure/cli/command_modules/interactive/__init__.py
WCollins3/azure-cli
1639f71f25e926376e3af7014325329702e028ec
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/interactive/__init__.py
WCollins3/azure-cli
1639f71f25e926376e3af7014325329702e028ec
[ "MIT" ]
1
2019-09-30T22:27:10.000Z
2019-09-30T22:27:10.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- from knack.help_files import helps from azure.cli.core import AzCommandsLoader helps['interactive'] = """ type: command short-summary: Start interactive mode. Installs the Interactive extension if not installed already. long-summary: > For more information on interactive mode, see: https://azure.microsoft.com/en-us/blog/welcome-to-azure-cli-shell/ """ class InteractiveCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core import ModExtensionSuppress super(InteractiveCommandsLoader, self).__init__( cli_ctx=cli_ctx, suppress_extension=ModExtensionSuppress( __name__, 'alias', '0.5.1', reason='Your version of the extension is not compatible with this version of the CLI.', recommend_update=True)) def load_command_table(self, _): with self.command_group('', operations_tmpl='azure.cli.command_modules.interactive.custom#{}') as g: g.command('interactive', 'start_shell', is_preview=True) return self.command_table def load_arguments(self, _): with self.argument_context('interactive') as c: style_options = ['quiet', 'purple', 'default', 'none', 'contrast', 'pastel', 'halloween', 'grey', 'br', 'bg', 'primary', 'neon'] c.argument('style', options_list=['--style', '-s'], help='The colors of the shell.', choices=style_options) c.argument('update', help='Update the Interactive extension to the latest available.', action='store_true') c.ignore('_subscription') # hide global subscription param COMMAND_LOADER_CLS = InteractiveCommandsLoader
44.102041
129
0.589542
8448d5c2d7af31e5441265104aedcae98887bb22
1,721
py
Python
PythonExercicios/ex073 - Tuplas com Times de Futebol.py
caique-santana/CursoEmVideo-Curso_Python3
86bb67bbbf348544e1135d8657672d4e33fa70e2
[ "MIT" ]
1
2020-04-15T00:49:02.000Z
2020-04-15T00:49:02.000Z
PythonExercicios/ex073 - Tuplas com Times de Futebol.py
caique-santana/CursoEmVideo-Curso_Python3
86bb67bbbf348544e1135d8657672d4e33fa70e2
[ "MIT" ]
null
null
null
PythonExercicios/ex073 - Tuplas com Times de Futebol.py
caique-santana/CursoEmVideo-Curso_Python3
86bb67bbbf348544e1135d8657672d4e33fa70e2
[ "MIT" ]
null
null
null
""" Crie uma tupla preenchida com os 20 primeiros colocados da Tableda do Campeonato Brasileiro de Futebol, a ordem de colocação. Depois mostre: A) Apenas os 5 primeiros colocados. B) Os últimos 4 colocados da tabela. C) Uma lista com os times em ordem alfabética. D) Em que posição na tabela está o time da Chapecoense.""" # Caique Santana colocacao = ('Corinthians', 'Palmeiras', 'Santos', 'Grêmio', 'Cruzeiro', 'Flamengo', 'Vasco', 'Chapecoense', 'Atlético-MG', 'Botafogo', 'Atlético-PR', 'Bahia', 'São Paulo', 'Fluminense', 'Sport', 'Vitória', 'Coritiba', 'Avaí', 'Ponte Preta', 'Atlético-GO') print('{:^60}'.format('Campeonato Brasileiro 2017')) print(f'Classificação Geral: \n{colocacao}') print('*' * 60) print(f'Os 5 primeiros colocados são: \n{colocacao[0:5]}') print('*' * 60) print(f'Os 4 últimos colocados são: \n{colocacao[-4:]}') print('*' * 60) print(f'Os times em ordem alfabética fica: \n{sorted(colocacao)}') print('*' * 60) print(f'A Chapecoense está na {colocacao.index("Chapecoense")+1}ª posição.') # Gustavo Guanabara times = ('Corinthians', 'Palmeiras', 'Santos', 'Grêmio', 'Cruzeiro', 'Flamengo', 'Vasco', 'Chapecoense', 'Atlético-MG', 'Botafogo', 'Atlético-PR', 'Bahia', 'São Paulo', 'Fluminense', 'Sport Recife', 'EC Vitória', 'Coritiba', 'Avaí', 'Ponte Preta', 'Atlético-GO') print('-=' * 15) print(f'Lista de times do Brasileirão: {times}') print('-=' * 15) print(f'Os 5 primeiros são {times[0:5]}') print('-=' * 15) print(f'Os 4 últimos são: {times[-4:]}') print('-=' * 15) print(f'Times em ordem alfabética: {sorted(times)}') print('-=' * 15) print(f'O Chapecoense está na {times.index("Chapecoense")+1}ª posição')
43.025
108
0.65369
77db8f745d7ea33a4a7409fba8a48c636a2351ea
12,150
py
Python
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
medismailben/llvm-project
e334a839032fe500c3bba22bf976ab7af13ce1c1
[ "Apache-2.0" ]
34
2020-01-31T17:50:00.000Z
2022-02-16T20:19:29.000Z
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
medismailben/llvm-project
e334a839032fe500c3bba22bf976ab7af13ce1c1
[ "Apache-2.0" ]
14
2020-02-03T23:39:51.000Z
2021-07-20T16:24:25.000Z
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
medismailben/llvm-project
e334a839032fe500c3bba22bf976ab7af13ce1c1
[ "Apache-2.0" ]
7
2020-04-14T09:12:18.000Z
2021-09-20T10:31:12.000Z
""" Test lldb breakpoint command add/list/delete. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil import side_effect class BreakpointCommandTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True mydir = TestBase.compute_mydir(__file__) @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528") def not_test_breakpoint_command_sequence(self): """Test a sequence of breakpoint command add, list, and delete.""" self.build() self.breakpoint_command_sequence() @skipIf(oslist=["windows"], bugnumber="llvm.org/pr44431") def test_script_parameters(self): """Test a sequence of breakpoint command add, list, and delete.""" self.build() self.breakpoint_command_script_parameters() def test_commands_on_creation(self): self.build() self.breakpoint_commands_on_creation() def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number('main.c', '// Set break point at this line.') # disable "There is a running process, kill it and restart?" prompt self.runCmd("settings set auto-confirm true") self.addTearDownHook( lambda: self.runCmd("settings clear auto-confirm")) def test_delete_all_breakpoints(self): """Test that deleting all breakpoints works.""" self.build() exe = self.getBuildArtifact("a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_symbol(self, "main") lldbutil.run_break_set_by_file_and_line( self, "main.c", self.line, num_expected_locations=1, loc_exact=True) self.runCmd("run", RUN_SUCCEEDED) self.runCmd("breakpoint delete") self.runCmd("process continue") self.expect("process status", PROCESS_STOPPED, patterns=['Process .* exited with status = 0']) def breakpoint_command_sequence(self): """Test a sequence of breakpoint command add, list, and delete.""" exe = self.getBuildArtifact("a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add three breakpoints on the same line. The first time we don't specify the file, # since the default file is the one containing main: lldbutil.run_break_set_by_file_and_line( self, None, self.line, num_expected_locations=1, loc_exact=True) lldbutil.run_break_set_by_file_and_line( self, "main.c", self.line, num_expected_locations=1, loc_exact=True) lldbutil.run_break_set_by_file_and_line( self, "main.c", self.line, num_expected_locations=1, loc_exact=True) # Breakpoint 4 - set at the same location as breakpoint 1 to test # setting breakpoint commands on two breakpoints at a time lldbutil.run_break_set_by_file_and_line( self, None, self.line, num_expected_locations=1, loc_exact=True) # Make sure relative path source breakpoints work as expected. We test # with partial paths with and without "./" prefixes. lldbutil.run_break_set_by_file_and_line( self, "./main.c", self.line, num_expected_locations=1, loc_exact=True) lldbutil.run_break_set_by_file_and_line( self, "breakpoint_command/main.c", self.line, num_expected_locations=1, loc_exact=True) lldbutil.run_break_set_by_file_and_line( self, "./breakpoint_command/main.c", self.line, num_expected_locations=1, loc_exact=True) lldbutil.run_break_set_by_file_and_line( self, "breakpoint/breakpoint_command/main.c", self.line, num_expected_locations=1, loc_exact=True) lldbutil.run_break_set_by_file_and_line( self, "./breakpoint/breakpoint_command/main.c", self.line, num_expected_locations=1, loc_exact=True) # Test relative breakpoints with incorrect paths and make sure we get # no breakpoint locations lldbutil.run_break_set_by_file_and_line( self, "invalid/main.c", self.line, num_expected_locations=0, loc_exact=True) lldbutil.run_break_set_by_file_and_line( self, "./invalid/main.c", self.line, num_expected_locations=0, loc_exact=True) # Now add callbacks for the breakpoints just created. self.runCmd( "breakpoint command add -s command -o 'frame variable --show-types --scope' 1 4") self.runCmd( "breakpoint command add -s python -o 'import side_effect; side_effect.one_liner = \"one liner was here\"' 2") import side_effect self.runCmd("command script import --allow-reload ./bktptcmd.py") self.runCmd( "breakpoint command add --python-function bktptcmd.function 3") # Check that the breakpoint commands are correctly set. # The breakpoint list now only contains breakpoint 1. self.expect( "breakpoint list", "Breakpoints 1 & 2 created", substrs=[ "2: file = 'main.c', line = %d, exact_match = 0, locations = 1" % self.line], patterns=[ "1: file = '.*main.c', line = %d, exact_match = 0, locations = 1" % self.line]) self.expect( "breakpoint list -f", "Breakpoints 1 & 2 created", substrs=[ "2: file = 'main.c', line = %d, exact_match = 0, locations = 1" % self.line], patterns=[ "1: file = '.*main.c', line = %d, exact_match = 0, locations = 1" % self.line, "1.1: .+at main.c:%d:?[0-9]*, .+unresolved, hit count = 0" % self.line, "2.1: .+at main.c:%d:?[0-9]*, .+unresolved, hit count = 0" % self.line]) self.expect("breakpoint command list 1", "Breakpoint 1 command ok", substrs=["Breakpoint commands:", "frame variable --show-types --scope"]) self.expect("breakpoint command list 2", "Breakpoint 2 command ok", substrs=["Breakpoint commands (Python):", "import side_effect", "side_effect.one_liner"]) self.expect("breakpoint command list 3", "Breakpoint 3 command ok", substrs=["Breakpoint commands (Python):", "bktptcmd.function(frame, bp_loc, internal_dict)"]) self.expect("breakpoint command list 4", "Breakpoint 4 command ok", substrs=["Breakpoint commands:", "frame variable --show-types --scope"]) self.runCmd("breakpoint delete 4") # Next lets try some other breakpoint kinds. First break with a regular expression # and then specify only one file. The first time we should get two locations, # the second time only one: lldbutil.run_break_set_by_regexp( self, r"._MyFunction", num_expected_locations=2) lldbutil.run_break_set_by_regexp( self, r"._MyFunction", extra_options="-f a.c", num_expected_locations=1) lldbutil.run_break_set_by_regexp( self, r"._MyFunction", extra_options="-f a.c -f b.c", num_expected_locations=2) # Now try a source regex breakpoint: lldbutil.run_break_set_by_source_regexp( self, r"is about to return [12]0", extra_options="-f a.c -f b.c", num_expected_locations=2) lldbutil.run_break_set_by_source_regexp( self, r"is about to return [12]0", extra_options="-f a.c", num_expected_locations=1) # Reset our canary variables and run the program. side_effect.one_liner = None side_effect.bktptcmd = None self.runCmd("run", RUN_SUCCEEDED) # Check the value of canary variables. self.assertEquals("one liner was here", side_effect.one_liner) self.assertEquals("function was here", side_effect.bktptcmd) # Finish the program. self.runCmd("process continue") # Remove the breakpoint command associated with breakpoint 1. self.runCmd("breakpoint command delete 1") # Remove breakpoint 2. self.runCmd("breakpoint delete 2") self.expect( "breakpoint command list 1", startstr="Breakpoint 1 does not have an associated command.") self.expect( "breakpoint command list 2", error=True, startstr="error: '2' is not a currently valid breakpoint ID.") # The breakpoint list now only contains breakpoint 1. self.expect( "breakpoint list -f", "Breakpoint 1 exists", patterns=[ "1: file = '.*main.c', line = %d, exact_match = 0, locations = 1, resolved = 1" % self.line, "hit count = 1"]) # Not breakpoint 2. self.expect( "breakpoint list -f", "No more breakpoint 2", matching=False, substrs=[ "2: file = 'main.c', line = %d, exact_match = 0, locations = 1, resolved = 1" % self.line]) # Run the program again, with breakpoint 1 remaining. self.runCmd("run", RUN_SUCCEEDED) # We should be stopped again due to breakpoint 1. # The stop reason of the thread should be breakpoint. self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, substrs=['stopped', 'stop reason = breakpoint']) # The breakpoint should have a hit count of 2. self.expect("breakpoint list -f", BREAKPOINT_HIT_TWICE, substrs=['resolved, hit count = 2']) def breakpoint_command_script_parameters(self): """Test that the frame and breakpoint location are being properly passed to the script breakpoint command function.""" exe = self.getBuildArtifact("a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) # Add a breakpoint. lldbutil.run_break_set_by_file_and_line( self, "main.c", self.line, num_expected_locations=1, loc_exact=True) # Now add callbacks for the breakpoints just created. self.runCmd("breakpoint command add -s python -o 'import side_effect; side_effect.frame = str(frame); side_effect.bp_loc = str(bp_loc)' 1") # Reset canary variables and run. side_effect.frame = None side_effect.bp_loc = None self.runCmd("run", RUN_SUCCEEDED) self.expect(side_effect.frame, exe=False, startstr="frame #0:") self.expect(side_effect.bp_loc, exe=False, patterns=["1.* where = .*main .* resolved, hit count = 1"]) def breakpoint_commands_on_creation(self): """Test that setting breakpoint commands when creating the breakpoint works""" exe = self.getBuildArtifact("a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target.IsValid(), "Created an invalid target.") # Add a breakpoint. lldbutil.run_break_set_by_file_and_line( self, "main.c", self.line, num_expected_locations=1, loc_exact=True, extra_options='-C bt -C "thread list" -C continue') bkpt = target.FindBreakpointByID(1) self.assertTrue(bkpt.IsValid(), "Couldn't find breakpoint 1") com_list = lldb.SBStringList() bkpt.GetCommandLineCommands(com_list) self.assertEqual(com_list.GetSize(), 3, "Got the wrong number of commands") self.assertEqual(com_list.GetStringAtIndex(0), "bt", "First bt") self.assertEqual(com_list.GetStringAtIndex(1), "thread list", "Next thread list") self.assertEqual(com_list.GetStringAtIndex(2), "continue", "Last continue")
42.1875
147
0.615802
ead8a3cca4941f438d5af80676d62dfe8d8ddea1
3,280
py
Python
antlr4_vba_parser/vba_listener.py
Liam-Deacon/antlr4-vba-parser
af273e6d7c4efd7660d647ad5b6e338a4ff46bd3
[ "BSD-3-Clause" ]
1
2021-07-23T19:28:59.000Z
2021-07-23T19:28:59.000Z
antlr4_vba_parser/vba_listener.py
Liam-Deacon/antlr4-vba-parser
af273e6d7c4efd7660d647ad5b6e338a4ff46bd3
[ "BSD-3-Clause" ]
null
null
null
antlr4_vba_parser/vba_listener.py
Liam-Deacon/antlr4-vba-parser
af273e6d7c4efd7660d647ad5b6e338a4ff46bd3
[ "BSD-3-Clause" ]
null
null
null
"""Implements the ANTLR listener pattern for the VBA parser""" from .vbaListener import vbaListener from .vbaParser import vbaParser class VBADictListener(vbaListener): """Custom VBA listener which produces a dictionary of VBA output""" def __init__(self) -> None: super().__init__() self.data = { 'modules': {} } # Enter a parse tree produced by vbaParser#module. def enterModule(self, ctx: vbaParser.ModuleContext): self.data['modules'][ctx] = { 'name': ctx.getText(), 'attributes': {}, 'declarations': {}, 'comments': {}, 'functions': {}, 'subroutines': {} } self._module = ctx # Exit a parse tree produced by vbaParser#module. def exitModule(self, ctx: vbaParser.ModuleContext): self._module = None # Enter a parse tree produced by vbaParser#moduleHeader. def enterModuleHeader(self, ctx: vbaParser.ModuleHeaderContext): self._module_header = ctx # Exit a parse tree produced by vbaParser#moduleHeader. def exitModuleHeader(self, ctx: vbaParser.ModuleHeaderContext): self._module_header = None # Enter a parse tree produced by vbaParser#subStmt. def enterSubStmt(self, ctx:vbaParser.SubStmtContext): self._sub = ctx # Exit a parse tree produced by vbaParser#subStmt. def exitSubStmt(self, ctx:vbaParser.SubStmtContext): self._sub = None # Enter a parse tree produced by vbaParser#ambiguousIdentifier. def enterAmbiguousIdentifier(self, ctx:vbaParser.AmbiguousIdentifierContext): self._identifier = ctx # Exit a parse tree produced by vbaParser#ambiguousIdentifier. def exitAmbiguousIdentifier(self, ctx:vbaParser.AmbiguousIdentifierContext): self._identifier = None # Enter a parse tree produced by vbaParser#certainIdentifier. def enterCertainIdentifier(self, ctx:vbaParser.CertainIdentifierContext): self._identifier = ctx # Exit a parse tree produced by vbaParser#certainIdentifier. def exitCertainIdentifier(self, ctx:vbaParser.CertainIdentifierContext): self._identifier = None # Enter a parse tree produced by vbaParser#remComment. def enterRemComment(self, ctx:vbaParser.RemCommentContext): pass # Exit a parse tree produced by vbaParser#remComment. def exitRemComment(self, ctx:vbaParser.RemCommentContext): pass # Enter a parse tree produced by vbaParser#comment. def enterComment(self, ctx:vbaParser.CommentContext): pass # Exit a parse tree produced by vbaParser#comment. def exitComment(self, ctx:vbaParser.CommentContext): pass # Enter a parse tree produced by vbaParser#endOfLine. def enterEndOfLine(self, ctx:vbaParser.EndOfLineContext): pass # Exit a parse tree produced by vbaParser#endOfLine. def exitEndOfLine(self, ctx:vbaParser.EndOfLineContext): pass # Enter a parse tree produced by vbaParser#endOfStatement. def enterEndOfStatement(self, ctx:vbaParser.EndOfStatementContext): pass # Exit a parse tree produced by vbaParser#endOfStatement. def exitEndOfStatement(self, ctx:vbaParser.EndOfStatementContext): pass
34.526316
81
0.694817
bcaa83106caec5ce19f7b056605ed98b280304bc
11,116
py
Python
MAIN/Basics.py
xtuyaowu/Pair-Trading-Reinforcement-Learning
24b744224457efa2dfee23ed0c44ec393b37449a
[ "MIT" ]
4
2021-01-17T17:18:07.000Z
2022-01-05T10:52:01.000Z
MAIN/Basics.py
xtuyaowu/Pair-Trading-Reinforcement-Learning
24b744224457efa2dfee23ed0c44ec393b37449a
[ "MIT" ]
null
null
null
MAIN/Basics.py
xtuyaowu/Pair-Trading-Reinforcement-Learning
24b744224457efa2dfee23ed0c44ec393b37449a
[ "MIT" ]
null
null
null
import tensorflow as tf import itertools import random random.seed(0) import numpy as np import abc from os import path class Agent(metaclass=abc.ABCMeta): def __init__(self, network, config): self.session = None self.network = network self.config = config self.data = dict() self.feed_dict = dict() self.saver = tf.train.Saver() self.counters = dict() self.input_layer = None self.output_layer = None self.get_counter() self.docking() def docking(self): self.input_layer = getattr(self.network, list(self.network.__dict__.keys())[0]) self.output_layer = getattr(self.network, list(self.network.__dict__.keys())[-1]) def assign_network(self, network): self.network = network self.docking() def set_session(self, session): self.session = session def initialize_global(self): init = tf.global_variables_initializer() self.session.run(init) def get_counter(self): for key in self.config['Counter'].keys(): self.counters[key] = StepCounter(**self.config['Counter'][key]) def save_model(self, folder=None, name=None, session=None): folder_path = self.config['AgentModelSaverSavePath'] if folder is None else folder name = self.config['AgentModelSaverSaveName'] if name is None else name file_path = path.join(folder_path, name + '.ckpt').replace('\\', '/') session = self.session if session is None else session self.saver.save(session, file_path) def restore_model(self, folder=None, name=None, session=None): folder_path = self.config['AgentModelSaverRestorePath'] if folder is None else folder name = self.config['AgentModelSaverRestoreName'] if name is None else name file_path = path.join(folder_path, name + '.ckpt').replace('\\', '/') session = self.session if session is None else session self.saver.restore(session, file_path) def close(self): self.session.close() @abc.abstractmethod def process(self, **kwargs): pass class Processor(metaclass=abc.ABCMeta): @abc.abstractmethod def process(self, **kwargs): pass class Strategy(metaclass=abc.ABCMeta): @abc.abstractmethod def process(self, **kwargs): pass @property @abc.abstractmethod def reward(self): return @property @abc.abstractmethod def record(self): return @reward.setter @abc.abstractmethod def reward(self, value): return @record.setter @abc.abstractmethod def record(self, value): return class Network(object): def __init__(self, input_layer): self.input_layer = input_layer @property def num_layer(self): return self.layer_names @property def layer_names(self): return list(self.__dict__.keys()) def build_layers(self, layer_dict): layer_names = list(layer_dict.keys()) for name in layer_names: current_name = list(self.__dict__.keys()) assert name not in current_name, 'Error: Duplicated layer names.' func_name = layer_dict[name]['func_name'] input_arg = layer_dict[name]['input_arg'] input_name = current_name[-1] layer_para = layer_dict[name]['layer_para'] layer_para[input_arg] = getattr(self, input_name) layer_func = TFLayer.get_func(func_name) setattr(self, name, layer_func()(**layer_para)) def add_layer_duplicates(self, layer_dict, n_copy): num_layer = 0 layer_names = list(layer_dict.keys()) for i in range(n_copy): num_layer += 1 for name in layer_names: current_names = list(self.__dict__.keys()) input_name = current_names[-1] new_name = name + '_' + str(num_layer) assert new_name not in current_names, 'Error: Duplicated layer names.' new_layer_dict = {new_name: layer_dict[name]} new_layer_dict[new_name]['input_name'] = input_name self.build_layers(new_layer_dict) class TFLayer(object): @classmethod def get_func(cls, method): return getattr(cls, method) @staticmethod def fully_connected(): return tf.contrib.layers.fully_connected @staticmethod def dense(): return tf.layers.dense @staticmethod def flatten(): return tf.layers.flatten @staticmethod def dropout(): return tf.layers.dropout @staticmethod def softmax(): return tf.contrib.layers.softmax @staticmethod def one_hot(): return tf.one_hot class Space(object): def __init__(self, space): self.check_space(space) self.space = space self.n_combination, self.indices, self.multipliers = Space.get_attribute(space) self.idx_range = range(len(self.indices)) @classmethod def check_space(cls, space): assert isinstance(space, dict), 'Error:Input space should be a dictionary.' for value in space.values(): assert isinstance(value, list), 'Error:Space value should be a list.' @classmethod def get_attribute(cls, space): n_element = [len(space[key]) for key in space.keys()] multiplier = [1] for i in range(-1, -len(n_element), -1): prod = multiplier[-1] * n_element[i] multiplier.append(prod) multiplier.reverse() multiplier = tuple(multiplier) space_index = tuple([list(range(n)) for n in n_element]) n_comb = np.product(n_element) return n_comb, space_index, multiplier def get_combinations(self): space_keys = list(self.space.keys()) space_sets = list(map(list, self.space.values())) combinations = list(itertools.product(*space_sets)) comb_list = [dict(zip(space_keys, element)) for element in combinations] return comb_list def get_random_sample(self, method): indices = [random.choice(idx) for idx in self.indices] if method == 'indices': return indices elif method == 'index': return self._indices_to_index(indices) elif method == 'one_hot': return self._indices_to_one_hot(indices) elif method == 'dict': return self._indices_to_dict(indices) else: raise ValueError('Error: Method should be indices/index/one_hot/dict.') def convert(self, sample, method): method = '_' + method return getattr(self, method)(sample) def _indices_to_index(self, indices): index = sum([indices[i] * self.multipliers[i] for i in self.idx_range]) return index def _indices_to_one_hot(self, indices): index = self._indices_to_index(indices) output = self._index_to_one_hot(index) return output def _indices_to_dict(self, indices): output = dict() keys = list(self.space.keys()) for i in self.idx_range: output[keys[i]] = self.space[keys[i]][indices[i]] return output def _index_to_indices(self, index): mod = index output = list(np.zeros(self.idx_range[-1] + 1, dtype=int)) for i in self.idx_range: div, mod = divmod(mod, self.multipliers[i]) output[i] = div if mod == 0: break return output def _index_to_one_hot(self, index): output = np.zeros((1, self.n_combination), dtype=int) output[0][index] = 1 return output def _index_to_dict(self, index): indices = self._index_to_indices(index) output = self._indices_to_dict(indices) return output def _one_hot_to_index(self, one_hot, axis=None): index = np.argmax(one_hot, axis=axis) return index def _one_hot_to_indices(self, one_hot): index = self._one_hot_to_index(one_hot) output = self._index_to_indices(index) return output def _one_hot_to_dict(self, one_hot): index = self._one_hot_to_index(one_hot) output = self._index_to_dict(index) return output def _dict_to_indices(self, dict_in): output = [self.space[key].index(value) for key, value in dict_in.items()] return output def _dict_to_index(self, dict_in): indices = self._dict_to_indices(dict_in) index = self._indices_to_index(indices) return index def _dict_to_one_hot(self, dict_in): index = self._dict_to_index(dict_in) output = self._index_to_one_hot(index) return output def _no_conversion(self, sample_in): return sample_in class StepCounter(object): def __init__(self, name, start_num, end_num, step_size, n_buffer=0, is_descend=True, print_freq=0): self.name = name self.start_num = start_num self.end_num = end_num self.step_size = abs(step_size) self.n_buffer = n_buffer self.is_descend = is_descend self.print_freq = print_freq self.value = start_num self.n_step = 0 self.is_buffered = False self.is_ended = True if start_num == end_num else False def reset(self, reset_buffer=False, reset_n_step=False): self.value = self.start_num if reset_n_step is True: self.n_step = 0 if reset_buffer is True: self.is_buffered = False self.is_ended = True if self.start_num == self.end_num else False def step(self): if self.is_ended is False: self.n_step += 1 self._check_is_buffered() if self.print_freq is not None: if self.n_step % self.print_freq == 0: print('Counter [{name}]: {n_step} steps processed...'.format(name=self.name, n_step=self.n_step)) if (self.value != self.end_num) & (self.is_buffered is True): if self.is_descend is True: self._step_down() elif self.is_descend is False: self._step_up() else: raise ValueError("Error: Boolean value required for input is_descend.") def _check_is_buffered(self): if (self.is_buffered is False) & (self.n_step > self.n_buffer): self.is_buffered = True def _step_down(self): self.value -= self.step_size if self.value <= self.end_num: self.value = self.end_num self.is_ended = True print('Counter [{name}]: Process completed.'.format(name=self.name)) def _step_up(self): self.value += self.step_size if self.value == self.end_num: self.value = self.end_num self.is_ended = True print('Counter [{name}]: Process completed.'.format(name=self.name))
31.851003
117
0.61407
7ebe71b8d3e931455b2a39b8c047cb3db9d642e4
21,693
py
Python
webinterface/src/plugin.py
FoxyRabbit67/enigma2-plugins
f6b94012726931fdf28e80a26226aec612b350de
[ "Linux-OpenIB" ]
41
2016-01-21T17:54:44.000Z
2021-06-26T05:54:41.000Z
webinterface/src/plugin.py
FoxyRabbit67/enigma2-plugins
f6b94012726931fdf28e80a26226aec612b350de
[ "Linux-OpenIB" ]
22
2016-11-16T11:25:26.000Z
2021-12-13T09:13:06.000Z
webinterface/src/plugin.py
FoxyRabbit67/enigma2-plugins
f6b94012726931fdf28e80a26226aec612b350de
[ "Linux-OpenIB" ]
62
2016-02-05T22:55:48.000Z
2022-03-12T21:48:22.000Z
Version = '$Header$'; from enigma import eConsoleAppContainer from Plugins.Plugin import PluginDescriptor from Components.config import config, ConfigBoolean, ConfigSubsection, ConfigInteger, ConfigYesNo, ConfigText, ConfigOnOff from Components.Network import iNetworkInfo from Screens.MessageBox import MessageBox from WebIfConfig import WebIfConfigScreen from WebChilds.Toplevel import getToplevel from Tools.HardwareInfo import HardwareInfo from Tools.Directories import copyfile, resolveFilename, SCOPE_PLUGINS, SCOPE_CONFIG from Tools.IO import saveFile from Tools.Log import Log from twisted.internet import reactor, ssl from twisted.internet.error import CannotListenError from twisted.web import server, http, util, static, resource from zope.interface import Interface, implements from socket import gethostname as socket_gethostname from OpenSSL import SSL, crypto from time import gmtime from os.path import isfile as os_isfile, exists as os_exists from __init__ import __version__ import random, uuid, time, hashlib from netaddr import IPNetwork hw = HardwareInfo() #CONFIG INIT #init the config config.plugins.Webinterface = ConfigSubsection() config.plugins.Webinterface.enabled = ConfigYesNo(default=True) config.plugins.Webinterface.show_in_extensionsmenu = ConfigYesNo(default = False) config.plugins.Webinterface.allowzapping = ConfigYesNo(default=True) config.plugins.Webinterface.includemedia = ConfigYesNo(default=False) config.plugins.Webinterface.autowritetimer = ConfigYesNo(default=False) config.plugins.Webinterface.loadmovielength = ConfigYesNo(default=True) config.plugins.Webinterface.version = ConfigText(__version__) # used to make the versioninfo accessible enigma2-wide, not confgurable in GUI. config.plugins.Webinterface.http = ConfigSubsection() config.plugins.Webinterface.http.enabled = ConfigYesNo(default=True) config.plugins.Webinterface.http.port = ConfigInteger(default = 80, limits=(1, 65535) ) config.plugins.Webinterface.http.auth = ConfigYesNo(default=True) config.plugins.Webinterface.https = ConfigSubsection() config.plugins.Webinterface.https.enabled = ConfigYesNo(default=True) config.plugins.Webinterface.https.port = ConfigInteger(default = 443, limits=(1, 65535) ) config.plugins.Webinterface.https.auth = ConfigYesNo(default=True) config.plugins.Webinterface.streamauth = ConfigYesNo(default=False) config.plugins.Webinterface.localauth = ConfigOnOff(default=False) config.plugins.Webinterface.anti_hijack = ConfigOnOff(default=True) config.plugins.Webinterface.extended_security = ConfigOnOff(default=True) global running_defered, waiting_shutdown, toplevel running_defered = [] waiting_shutdown = 0 toplevel = None server.VERSION = "Enigma2 WebInterface Server $Revision$".replace("$Revi", "").replace("sion: ", "").replace("$", "") KEY_FILE = resolveFilename(SCOPE_CONFIG, "key.pem") CERT_FILE = resolveFilename(SCOPE_CONFIG, "cert.pem") #=============================================================================== # Helperclass to close running Instances of the Webinterface #=============================================================================== class Closer: counter = 0 def __init__(self, session, callback=None): self.callback = callback self.session = session #=============================================================================== # Closes all running Instances of the Webinterface #=============================================================================== def stop(self): global running_defered for d in running_defered: print "[Webinterface] stopping interface on ", d.interface, " with port", d.port x = d.stopListening() try: x.addCallback(self.isDown) self.counter += 1 except AttributeError: pass running_defered = [] if self.counter < 1: if self.callback is not None: self.callback(self.session) #=============================================================================== # #Is it already down? #=============================================================================== def isDown(self, s): self.counter -= 1 if self.counter < 1: if self.callback is not None: self.callback(self.session) def installCertificates(session): if not os_exists(CERT_FILE) \ or not os_exists(KEY_FILE): print "[Webinterface].installCertificates :: Generating SSL key pair and CACert" # create a key pair k = crypto.PKey() k.generate_key(crypto.TYPE_RSA, 2048) # create a self-signed cert cert = crypto.X509() cert.get_subject().C = "DE" cert.get_subject().ST = "Home" cert.get_subject().L = "Home" cert.get_subject().O = "Dreambox" cert.get_subject().OU = "STB" cert.get_subject().CN = socket_gethostname() cert.set_serial_number(random.randint(1000000,1000000000)) cert.set_notBefore("20120101000000Z"); cert.set_notAfter("20301231235900Z") cert.set_issuer(cert.get_subject()) cert.set_pubkey(k) print "[Webinterface].installCertificates :: Signing SSL key pair with new CACert" cert.sign(k, 'sha256') try: print "[Webinterface].installCertificates :: Installing newly generated certificate and key pair" saveFile(CERT_FILE, crypto.dump_certificate(crypto.FILETYPE_PEM, cert)) saveFile(KEY_FILE, crypto.dump_privatekey(crypto.FILETYPE_PEM, k)) except IOError, e: #Disable https config.plugins.Webinterface.https.enabled.value = False config.plugins.Webinterface.https.enabled.save() #Inform the user session.open(MessageBox, "Couldn't install generated SSL-Certifactes for https access\nHttps access is disabled!", MessageBox.TYPE_ERROR) #=============================================================================== # restart the Webinterface for all configured Interfaces #=============================================================================== def restartWebserver(session): try: del session.mediaplayer del session.messageboxanswer except NameError: pass except AttributeError: pass global running_defered if len(running_defered) > 0: Closer(session, startWebserver).stop() else: startWebserver(session) #=============================================================================== # start the Webinterface for all configured Interfaces #=============================================================================== def startWebserver(session): global running_defered global toplevel session.mediaplayer = None session.messageboxanswer = None if toplevel is None: toplevel = getToplevel(session) errors = "" if config.plugins.Webinterface.enabled.value is not True: print "[Webinterface] is disabled!" else: # IF SSL is enabled we need to check for the certs first # If they're not there we'll exit via return here # and get called after Certificates are installed properly if config.plugins.Webinterface.https.enabled.value: installCertificates(session) # Listen on all Interfaces #HTTP port = config.plugins.Webinterface.http.port.value auth = config.plugins.Webinterface.http.auth.value if config.plugins.Webinterface.http.enabled.value is True: ret = startServerInstance(session, port, useauth=auth) if not ret: errors = "%s port %i\n" %(errors, port) else: registerBonjourService('http', port) #Streaming requires listening on localhost:80 no matter what, ensure it its available if config.plugins.Webinterface.http.port.value != 80 or not config.plugins.Webinterface.http.enabled.value: #LOCAL HTTP Connections (Streamproxy) local4 = "127.0.0.1" local4mapped = "::ffff:127.0.0.1" local6 = "::1" ret = startServerInstance(session, 80, useauth=auth, ipaddress=local4) if not ret: errors = "%s%s:%i\n" %(errors, local4, 80) ret = startServerInstance(session, 80, useauth=auth, ipaddress=local4mapped, ipaddress2=local6) #ip6 is optional # if not ret: # errors = "%s%s/%s:%i\n" %(errors, local4mapped, local6, 80) #HTTPS if config.plugins.Webinterface.https.enabled.value is True: sport = config.plugins.Webinterface.https.port.value sauth = config.plugins.Webinterface.https.auth.value ret = startServerInstance(session, sport, useauth=sauth, usessl=True) if not ret: errors = "%s%s:%i\n" %(errors, "0.0.0.0 / ::", sport) else: registerBonjourService('https', sport) if errors: session.open(MessageBox, "Webinterface - Couldn't listen on:\n %s" % (errors), type=MessageBox.TYPE_ERROR, timeout=30) #=============================================================================== # stop the Webinterface for all configured Interfaces #=============================================================================== def stopWebserver(session): try: del session.mediaplayer del session.messageboxanswer except NameError: pass except AttributeError: pass global running_defered if len(running_defered) > 0: Closer(session).stop() #=============================================================================== # startServerInstance # Starts an Instance of the Webinterface # on given ipaddress, port, w/o auth, w/o ssl #=============================================================================== def startServerInstance(session, port, useauth=False, usessl=False, ipaddress="::", ipaddress2=None): if useauth: # HTTPAuthResource handles the authentication for every Resource you want it to root = HTTPAuthResource(toplevel, "Enigma2 WebInterface") site = server.Site(root) else: root = HTTPRootResource(toplevel) site = server.Site(root) result = False def logFail(addr, exception=None): print "[Webinterface] FAILED to listen on %s:%i auth=%s ssl=%s" % (addr, port, useauth, usessl) if exception: print exception if usessl: ctx = ChainedOpenSSLContextFactory(KEY_FILE, CERT_FILE) try: d = reactor.listenSSL(port, site, ctx, interface=ipaddress) result = True running_defered.append(d) except CannotListenError as e: logFail(ipaddress, e) if ipaddress2: try: d = reactor.listenSSL(port, site, ctx, interface=ipaddress2) result = True running_defered.append(d) except CannotListenError as e: logFail(ipaddress2, e) else: try: d = reactor.listenTCP(port, site, interface=ipaddress) result = True running_defered.append(d) except CannotListenError as e: logFail(ipaddress, e) if ipaddress2: try: d = reactor.listenTCP(port, site, interface=ipaddress2) result = True running_defered.append(d) except CannotListenError as e: logFail(ipaddress2, e) print "[Webinterface] started on %s:%i auth=%s ssl=%s" % (ipaddress, port, useauth, usessl) return result #except Exception, e: #print "[Webinterface] starting FAILED on %s:%i!" % (ipaddress, port), e #return False class ChainedOpenSSLContextFactory(ssl.DefaultOpenSSLContextFactory): def __init__(self, privateKeyFileName, certificateChainFileName, sslmethod=SSL.SSLv23_METHOD): self.privateKeyFileName = privateKeyFileName self.certificateChainFileName = certificateChainFileName self.sslmethod = sslmethod self.cacheContext() def cacheContext(self): ctx = SSL.Context(self.sslmethod) ctx.set_options(SSL.OP_NO_SSLv3|SSL.OP_NO_SSLv2) ctx.use_certificate_chain_file(self.certificateChainFileName) ctx.use_privatekey_file(self.privateKeyFileName) self._context = ctx class SimpleSession(object): def __init__(self, expires=0): self._id = "0" self._expires = time.time() + expires if expires > 0 else 0 def _generateId(self): if config.plugins.Webinterface.extended_security.value: self._id = str ( uuid.uuid4() ) else: self._id = "0" def _getId(self): if self.expired(): self._generateId() return self._id def expired(self): expired = False if config.plugins.Webinterface.extended_security.value: expired = self._expires > 0 and self._expires < time.time() expired = expired or self._id == "0" else: expired = self._id != "0" return expired id = property(_getId) #Every request made will pass this Resource (as it is the root resource) #Any "global" checks should be done here class HTTPRootResource(resource.Resource): SESSION_PROTECTED_PATHS = ['/web/', '/opkg', '/ipkg'] SESSION_EXCEPTIONS = [ '/web/epgsearch.rss', '/web/movielist.m3u', '/web/movielist.rss', '/web/services.m3u', '/web/session', '/web/stream.m3u', '/web/stream', '/web/streamcurrent.m3u', '/web/strings.js', '/web/ts.m3u'] def __init__(self, res): print "[HTTPRootResource}.__init__" resource.Resource.__init__(self) self.resource = res self.sessionInvalidResource = resource.ErrorPage(http.PRECONDITION_FAILED, "Precondition failed!", "sessionid is missing, invalid or expired!") self._sessions = {} def getClientToken(self, request): ip = request.getClientIP() ua = request.getHeader("User-Agent") or "Default UA" return hashlib.sha1("%s/%s" %(ip, ua)).hexdigest() def isSessionValid(self, request): session = self._sessions.get( self.getClientToken(request), None ) if session is None or session.expired(): session = SimpleSession() key = self.getClientToken(request) print "[HTTPRootResource].isSessionValid :: created session with id '%s' for client with token '%s'" %(session.id, key) self._sessions[ key ] = session request.enigma2_session = session if config.plugins.Webinterface.extended_security.value and not request.path in self.SESSION_EXCEPTIONS: protected = False for path in self.SESSION_PROTECTED_PATHS: if request.path.startswith(path): protected = True if protected: rsid = request.args.get('sessionid', None) if rsid: rsid = rsid[0] return session and session.id == rsid return True def render(self, request): #enable SAMEORIGIN policy for iframes if config.plugins.Webinterface.anti_hijack.value: request.setHeader("X-Frame-Options", "SAMEORIGIN") if self.isSessionValid(request): return self.resource.render(request) else: return self.sessionInvalidResource.render(request) def getChildWithDefault(self, path, request): #enable SAMEORIGIN policy for iframes if config.plugins.Webinterface.anti_hijack.value: request.setHeader("X-Frame-Options", "SAMEORIGIN") if self.isSessionValid(request): return self.resource.getChildWithDefault(path, request) else: print "[Webinterface.HTTPRootResource.render] !!! session invalid !!!" return self.sessionInvalidResource #=============================================================================== # HTTPAuthResource # Handles HTTP Authorization for a given Resource #=============================================================================== class HTTPAuthResource(HTTPRootResource): LOCALHOSTS = (IPNetwork("127.0.0.1"), IPNetwork("::1")) def __init__(self, res, realm): HTTPRootResource.__init__(self, res) self.realm = realm self.authorized = False self.unauthorizedResource = resource.ErrorPage(http.UNAUTHORIZED, "Access denied", "Authentication credentials invalid!") self._localNetworks = [] def _assignLocalNetworks(self, ifaces): if self._localNetworks: return self._localNetworks = [] #LAN for key, iface in ifaces.iteritems(): if iface.ipv4.address != "0.0.0.0": v4net = IPNetwork("%s/%s" %(iface.ipv4.address, iface.ipv4.netmask)) self._localNetworks.append(v4net) if iface.ipv6.address != "::": v6net = IPNetwork("%s/%s" %(iface.ipv6.address, iface.ipv6.netmask)) self._localNetworks.append(v6net) Log.w(self._localNetworks) def unauthorized(self, request): request.setHeader('WWW-authenticate', 'Basic realm="%s"' % self.realm) request.setResponseCode(http.UNAUTHORIZED) return self.unauthorizedResource def _isLocalClient(self, clientip): if self._isLocalHost(clientip): return True for lnw in self._localNetworks: if self._networkContains(lnw, clientip): return True return False def _isLocalHost(self, clientip): for host in self.LOCALHOSTS: if self._networkContains(host, clientip): return True return False def _networkContains(self, network, ip): if network.__contains__(ip): return True try: # You may get an ipv6 noted ipv4 address like "::ffff:192.168.0.2" # In that case it won't match the ipv4 local network so we have to try converting it to plain ipv4 if network.__contains__(ip.ipv4()): return True except: pass return False def isAuthenticated(self, request): self._assignLocalNetworks(iNetworkInfo.getConfiguredInterfaces()) if request.transport: host = IPNetwork(request.transport.getPeer().host) #If streamauth is disabled allow all acces from localhost if not config.plugins.Webinterface.streamauth.value: if self._isLocalHost(host.ip): Log.d("Streaming auth is disabled - Bypassing Authcheck because host '%s' is local!" %host) return True if not config.plugins.Webinterface.localauth.value: if self._isLocalClient(host.ip): Log.d("Local auth is disabled - Bypassing Authcheck because host '%s' is local!" %host) return True # get the Session from the Request http_session = request.getSession().sessionNamespaces # if the auth-information has not yet been stored to the http_session if not http_session.has_key('authenticated'): if request.getUser() and request.getPassword(): http_session['authenticated'] = check_passwd(request.getUser(), request.getPassword()) else: http_session['authenticated'] = False #if the auth-information already is in the http_session else: if http_session['authenticated'] is False: http_session['authenticated'] = check_passwd(request.getUser(), request.getPassword() ) #return the current authentication status return http_session['authenticated'] #=============================================================================== # Call render of self.resource (if authenticated) #=============================================================================== def render(self, request): if self.isAuthenticated(request) is True: return HTTPRootResource.render(self, request) else: print "[Webinterface.HTTPAuthResource.render] !!! unauthorized !!!" return self.unauthorized(request).render(request) #=============================================================================== # Override to call getChildWithDefault of self.resource (if authenticated) #=============================================================================== def getChildWithDefault(self, path, request): if self.isAuthenticated(request) is True: return HTTPRootResource.getChildWithDefault(self, path, request) else: print "[Webinterface.HTTPAuthResource.getChildWithDefault] !!! unauthorized !!!" return self.unauthorized(request) from auth import check_passwd global_session = None #=============================================================================== # sessionstart # Actions to take place on Session start #=============================================================================== def sessionstart(reason, session): global global_session global_session = session networkstart(True, session) def registerBonjourService(protocol, port): try: from Plugins.Extensions.Bonjour.Bonjour import bonjour service = bonjour.buildService(protocol, port) bonjour.registerService(service, True) print "[WebInterface.registerBonjourService] Service for protocol '%s' with port '%i' registered!" %(protocol, port) return True except ImportError, e: print "[WebInterface.registerBonjourService] %s" %e return False def unregisterBonjourService(protocol): try: from Plugins.Extensions.Bonjour.Bonjour import bonjour bonjour.unregisterService(protocol) print "[WebInterface.unregisterBonjourService] Service for protocol '%s' unregistered!" %(protocol) return True except ImportError, e: print "[WebInterface.unregisterBonjourService] %s" %e return False def checkBonjour(): if ( not config.plugins.Webinterface.http.enabled.value ) or ( not config.plugins.Webinterface.enabled.value ): unregisterBonjourService('http') if ( not config.plugins.Webinterface.https.enabled.value ) or ( not config.plugins.Webinterface.enabled.value ): unregisterBonjourService('https') #=============================================================================== # networkstart # Actions to take place after Network is up (startup the Webserver) #=============================================================================== #def networkstart(reason, **kwargs): def networkstart(reason, session): if reason is True: startWebserver(session) checkBonjour() elif reason is False: stopWebserver(session) checkBonjour() def openconfig(session, **kwargs): session.openWithCallback(configCB, WebIfConfigScreen) def menu_config(menuid, **kwargs): if menuid == "network": return [(_("Webinterface"), openconfig, "webif", 60)] else: return [] def configCB(result, session): if result: print "[WebIf] config changed" restartWebserver(session) checkBonjour() else: print "[WebIf] config not changed" def Plugins(**kwargs): p = PluginDescriptor(where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=sessionstart) p.weight = 100 #webif should start as last plugin list = [p, # PluginDescriptor(where=[PluginDescriptor.WHERE_NETWORKCONFIG_READ], fnc=networkstart), PluginDescriptor(name=_("Webinterface"), description=_("Configuration for the Webinterface"), where=PluginDescriptor.WHERE_MENU, icon="plugin.png", fnc=menu_config)] if config.plugins.Webinterface.show_in_extensionsmenu.value: list.append(PluginDescriptor(name="Webinterface", description=_("Configuration for the Webinterface"), where=PluginDescriptor.WHERE_EXTENSIONSMENU, icon="plugin.png", fnc=openconfig)) return list
35.856198
145
0.685797
b7c34ea86c77de4a0625f6b121568d1e673c902e
364
py
Python
src/content_style_layers.py
d4rk6h05t/neural-style-art
f2fb3586e8a039e04238e0eb2dc4c8af96cd85d6
[ "Apache-2.0" ]
6
2020-07-20T01:21:17.000Z
2022-01-13T02:27:40.000Z
src/content_style_layers.py
d4rk6h05t/neural-style-art
f2fb3586e8a039e04238e0eb2dc4c8af96cd85d6
[ "Apache-2.0" ]
null
null
null
src/content_style_layers.py
d4rk6h05t/neural-style-art
f2fb3586e8a039e04238e0eb2dc4c8af96cd85d6
[ "Apache-2.0" ]
null
null
null
# Content layer where will pull our feature maps content_layers = ['block5_conv2'] # Style layer we are interested in style_layers = ['block1_conv1', 'block2_conv1', 'block3_conv1', 'block4_conv1', 'block5_conv1' ] num_content_layers = len(content_layers) num_style_layers = len(style_layers)
26
48
0.631868
5d43c06e5d540a18d7e890c0eb0122234361e906
340
py
Python
am/__main__.py
ove/ove-asset-manager
34b20ba8b436a5fe5c1561e0c5d98f171a37193f
[ "MIT" ]
null
null
null
am/__main__.py
ove/ove-asset-manager
34b20ba8b436a5fe5c1561e0c5d98f171a37193f
[ "MIT" ]
191
2019-03-01T14:00:57.000Z
2021-06-06T23:01:57.000Z
am/__main__.py
ove/ove-asset-manager
34b20ba8b436a5fe5c1561e0c5d98f171a37193f
[ "MIT" ]
1
2020-01-13T13:07:49.000Z
2020-01-13T13:07:49.000Z
from wsgiref import simple_server from am import setup_app # do not use this in production # this is a dev only method provided for convenience def main(): simple_server.make_server('0.0.0.0', 6080, setup_app()).serve_forever() # nosec if __name__ == "__main__": try: main() except KeyboardInterrupt: pass
20
84
0.691176
9cf45c76d24b239727c43b60b69bbdd534ad05c8
1,483
py
Python
src/sqlfluff/rules/L021.py
tdstark/sqlfluff
873263465c879a4061d7613078da9e6050fb66ff
[ "MIT" ]
null
null
null
src/sqlfluff/rules/L021.py
tdstark/sqlfluff
873263465c879a4061d7613078da9e6050fb66ff
[ "MIT" ]
8
2022-01-26T21:43:03.000Z
2022-01-31T10:22:02.000Z
src/sqlfluff/rules/L021.py
tdstark/sqlfluff
873263465c879a4061d7613078da9e6050fb66ff
[ "MIT" ]
1
2022-01-24T10:10:43.000Z
2022-01-24T10:10:43.000Z
"""Implementation of Rule L021.""" from typing import Optional from sqlfluff.core.rules.base import BaseRule, LintResult, RuleContext import sqlfluff.core.rules.functional.segment_predicates as sp class Rule_L021(BaseRule): """Ambiguous use of ``DISTINCT`` in select statement with ``GROUP BY``. | **Anti-pattern** | ``DISTINCT`` and ``GROUP BY`` are conflicting. .. code-block:: sql SELECT DISTINCT a FROM foo GROUP BY a | **Best practice** | Remove ``DISTINCT`` or ``GROUP BY``. In our case, removing GROUP BY is better. .. code-block:: sql SELECT DISTINCT a FROM foo """ def _eval(self, context: RuleContext) -> Optional[LintResult]: """Ambiguous use of DISTINCT in select statement with GROUP BY.""" segment = context.functional.segment if ( segment.all(sp.is_type("select_statement")) # Do we have a group by clause and segment.children(sp.is_type("groupby_clause")) ): # Do we have the "DISTINCT" keyword in the select clause distinct = ( segment.children(sp.is_type("select_clause")) .children(sp.is_type("select_clause_modifier")) .children(sp.is_type("keyword")) .select(sp.is_name("distinct")) ) if distinct: return LintResult(anchor=distinct[0]) return None
30.265306
84
0.59002
71ac6798465f3c6a9c48f99cfd9cf63511ab9a9b
2,382
py
Python
common/src/stack/command/stack/commands/load/json/plugin_api.py
shivanshs9/stacki
258740748281dfe89b0f566261eaf23102f91aa4
[ "BSD-3-Clause" ]
null
null
null
common/src/stack/command/stack/commands/load/json/plugin_api.py
shivanshs9/stacki
258740748281dfe89b0f566261eaf23102f91aa4
[ "BSD-3-Clause" ]
null
null
null
common/src/stack/command/stack/commands/load/json/plugin_api.py
shivanshs9/stacki
258740748281dfe89b0f566261eaf23102f91aa4
[ "BSD-3-Clause" ]
null
null
null
# @copyright@ # Copyright (c) 2006 - 2018 Teradata # All rights reserved. Stacki(r) v5.x stacki.com # https://github.com/Teradata/stacki/blob/master/LICENSE.txt # @copyright@ import stack.commands import json from stack.exception import CommandError class Plugin(stack.commands.Plugin, stack.commands.Command): notifications = True def provides(self): return 'api' def requires(self): return [ 'software', 'environment', 'group', 'network', 'appliance', 'os', 'global', 'bootaction', 'host' ] def run(self, args): # check if the user would like to import api data if args and 'api' not in args: return # self.owner.data contains the data from the json file defined in init if 'api' in self.owner.data: import_data = self.owner.data['api'] else: self.owner.log.info('no api data in json file') return self.notify('\n\tLoading api\n') # load the api group information for group, data in import_data['group'].items(): self.owner.try_command('add.api.group', [ group ], f'adding api group {group}', 'already') for permission in data['permissions']: self.owner.try_command('add.api.group.perms', [ group, f'perm={permission}' ], f'adding api group permission {permission}', 'already') # load the api user information for user in import_data['user']: parameters = [ user['username'], f'admin={user["admin"]}', # just add the first group for now, we will add the others later f'group={user["groups"][0]}' ] self.owner.try_command('add.api.user', parameters, f'adding api user {user["username"]}', 'already') # now we iterate through each users groups for group in user['groups']: parameters = [ user['username'], f'group={group}', ] self.owner.try_command('add.api.user.group', parameters, f'adding api user group {group}', 'already') # now we add user level permissions for permission in user['permissions']: parameters = [ user['username'], f'perm={permission}', ] self.owner.try_command('add.api.user.perms', parameters, f'adding permission {permission} to user {user["username"]}', 'already') # load the blacklisted commands for blacklist_command in import_data['blacklist commands']: self.owner.try_command('add.api.blacklist.command', [ f'command={blacklist_command}' ], f'adding blacklist command {blacklist_command}', 'already')
34.521739
150
0.688077
97ac16530430a7e2b118e76c6a8b82d5c18a290f
356
py
Python
Aula 08/Ex3.py
diegorafaelvieira/Programacao-1
657a974f1215cec4aed68603e738d9a135131545
[ "MIT" ]
null
null
null
Aula 08/Ex3.py
diegorafaelvieira/Programacao-1
657a974f1215cec4aed68603e738d9a135131545
[ "MIT" ]
null
null
null
Aula 08/Ex3.py
diegorafaelvieira/Programacao-1
657a974f1215cec4aed68603e738d9a135131545
[ "MIT" ]
null
null
null
qtd10_100=0 soma=0 qtdPares_100=0 for x in range(0,1000): valor = int(input("Informe o valor:")) if valor>10 and valor<100: qtd10_100+=1 soma+=valor if valor>100 and valor%2==0: qtdPares_100+=1 print("Números pares e maiores do que 100:",qtdPares_100) print("Números maiores que 10 e menores que 100:",(soma/qtd10_100))
27.384615
67
0.668539
1503620cf769424b5e5d422a1d22901bbaaa1f50
2,237
py
Python
HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDiphoton3023IsoCaloIdUnseededSequence_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:24:46.000Z
2021-11-30T16:24:46.000Z
HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDiphoton3023IsoCaloIdUnseededSequence_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
4
2021-11-29T13:57:56.000Z
2022-03-29T06:28:36.000Z
HLTrigger/Configuration/python/HLT_75e33/sequences/HLTDiphoton3023IsoCaloIdUnseededSequence_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:16:05.000Z
2021-11-30T16:16:05.000Z
import FWCore.ParameterSet.Config as cms from ..modules.hltDiEG23EtUnseededFilter_cfi import * from ..modules.hltDiEG3023IsoCaloIdClusterShapeSigmavvUnseededFilter_cfi import * from ..modules.hltDiEG3023IsoCaloIdClusterShapeSigmawwUnseededFilter_cfi import * from ..modules.hltDiEG3023IsoCaloIdClusterShapeUnseededFilter_cfi import * from ..modules.hltDiEG3023IsoCaloIdEcalIsoUnseededFilter_cfi import * from ..modules.hltDiEG3023IsoCaloIdHcalIsoUnseededFilter_cfi import * from ..modules.hltDiEG3023IsoCaloIdHEUnseededFilter_cfi import * from ..modules.hltDiEG3023IsoCaloIdHgcalHEUnseededFilter_cfi import * from ..modules.hltDiEG3023IsoCaloIdHgcalIsoUnseededFilter_cfi import * from ..modules.hltEG30EtUnseededFilter_cfi import * from ..modules.hltEgammaCandidatesWrapperUnseeded_cfi import * from ..modules.hltEGL1SeedsForDoublePhotonIsolatedFilter_cfi import * from ..sequences.HLTDoFullUnpackingEgammaEcalSequence_cfi import * from ..sequences.HLTDoLocalHcalSequence_cfi import * from ..sequences.HLTFastJetForEgamma_cfi import * from ..sequences.HLTHgcalTiclPFClusteringForEgammaUnseeded_cfi import * from ..sequences.HLTL1Sequence_cfi import * from ..sequences.HLTPFClusteringForEgammaUnseeded_cfi import * from ..sequences.HLTPFHcalClusteringForEgamma_cfi import * from ..tasks.HLTDiphoton3023IsoCaloIdUnseededTask_cfi import * HLTDiphoton3023IsoCaloIdUnseededSequence = cms.Sequence( HLTL1Sequence + hltEGL1SeedsForDoublePhotonIsolatedFilter + HLTDoFullUnpackingEgammaEcalSequence + HLTPFClusteringForEgammaUnseeded + HLTHgcalTiclPFClusteringForEgammaUnseeded + hltEgammaCandidatesWrapperUnseeded + hltEG30EtUnseededFilter + hltDiEG23EtUnseededFilter + hltDiEG3023IsoCaloIdClusterShapeUnseededFilter + hltDiEG3023IsoCaloIdClusterShapeSigmavvUnseededFilter + hltDiEG3023IsoCaloIdClusterShapeSigmawwUnseededFilter + hltDiEG3023IsoCaloIdHgcalHEUnseededFilter + HLTDoLocalHcalSequence + HLTFastJetForEgamma + hltDiEG3023IsoCaloIdHEUnseededFilter + hltDiEG3023IsoCaloIdEcalIsoUnseededFilter + hltDiEG3023IsoCaloIdHgcalIsoUnseededFilter + HLTPFHcalClusteringForEgamma + hltDiEG3023IsoCaloIdHcalIsoUnseededFilter, HLTDiphoton3023IsoCaloIdUnseededTask )
48.630435
81
0.86008
86f026e35fcc3d887549d6b70c4fce7518acccfc
503
py
Python
local_groups/migrations/0057_auto_20170829_2137.py
JoshZero87/site
c8024b805ff5ff0e16f54dce7bf05097fd2f08e0
[ "MIT" ]
4
2017-01-29T00:38:41.000Z
2019-09-04T14:30:24.000Z
local_groups/migrations/0057_auto_20170829_2137.py
JoshZero87/site
c8024b805ff5ff0e16f54dce7bf05097fd2f08e0
[ "MIT" ]
74
2017-10-02T04:42:54.000Z
2022-01-13T00:44:16.000Z
local_groups/migrations/0057_auto_20170829_2137.py
JoshZero87/site
c8024b805ff5ff0e16f54dce7bf05097fd2f08e0
[ "MIT" ]
3
2017-03-24T23:26:46.000Z
2019-10-21T01:16:03.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-08-29 21:37 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('local_groups', '0056_auto_20170829_1818'), ] operations = [ migrations.AlterField( model_name='group', name='mou_url', field=models.URLField(blank=True, max_length=255, null=True, verbose_name='MOU URL'), ), ]
23.952381
97
0.632207
ff9f07d9604147f7e4977699d5f95acc43408809
2,995
py
Python
experiments/exp_adult_10_OLHPGRR.py
Leaflowave/PrivCQ
8acc6ad0888793fb7fa190a1bd5b4f9eb1140514
[ "MIT" ]
null
null
null
experiments/exp_adult_10_OLHPGRR.py
Leaflowave/PrivCQ
8acc6ad0888793fb7fa190a1bd5b4f9eb1140514
[ "MIT" ]
null
null
null
experiments/exp_adult_10_OLHPGRR.py
Leaflowave/PrivCQ
8acc6ad0888793fb7fa190a1bd5b4f9eb1140514
[ "MIT" ]
null
null
null
import frequency_oracle_3dim as freq import linecache import random def query_on_adult_dim3(oraclePath,oracleInterval,queryPath,trueOraclePath,aggregation="count"): # adult_3 range 10 queriesStr = linecache.getline(queryPath, 1) queries = eval(queriesStr) answer = [0]*500 trueOracleStr = linecache.getline(trueOraclePath, 1) trueOracle = eval(trueOracleStr) n = sum([sum(trueOracle[k].values()) for k in trueOracle.keys()]) TrueAnswer = [0]*500 relativeError = 0 averageError = 0 for i in range(1, 501): for _ in range(10): kthoracle = random.randint(1, 500) oracleWithoutGroup = freq.frequency_oracle(oraclePath, oracleInterval, k_th_oracle=kthoracle) oracle = {} for oraclekey in oracleWithoutGroup.keys(): if oraclekey[2] not in oracle.keys(): oracle[oraclekey[2]] = {} if (oraclekey[0], oraclekey[1]) not in oracle[oraclekey[2]].keys(): oracle[oraclekey[2]][(oraclekey[0], oraclekey[1])] = 0 oracle[oraclekey[2]][(oraclekey[0], oraclekey[1])] += oracleWithoutGroup[oraclekey] sum_value = 0 true_sum_value = 0 for k1 in range(queries[i - 1][0][0], queries[i - 1][0][1] + 1): for k2 in range(queries[i - 1][1][0], queries[i - 1][1][1] + 1): for j in oracle.keys(): sum_value += j * oracle[j][(k1,k2)] true_sum_value += j * trueOracle[j][(k1,k2)] answer[i - 1] += sum_value TrueAnswer[i - 1] += true_sum_value answer[i - 1] /= 10.0 TrueAnswer[i - 1] /= 10.0 relativeError += (answer[i - 1] - TrueAnswer[i - 1]) / max(0.001 * n, float(TrueAnswer[i - 1])) averageError += answer[i - 1] - TrueAnswer[i - 1] # averageError += sum_value - true_sum_value # relativeError += (abs(sum_value - true_sum_value)) / max(0.001 * n, float(true_sum_value)) return answer,TrueAnswer, relativeError / 500, averageError / 500 if __name__ == '__main__': oraclePath = "experiments//adult_3_OLHPGRR_results.txt" oracleInterval = 5 queryPath = "experiments//adult_query_6_8_10.txt" trueOraclePath = "adult//adult5.txt" ans,trueans, relativeError, averageError = query_on_adult_dim3(oraclePath, oracleInterval, queryPath, trueOraclePath, aggregation="sum") print(relativeError) with open("experiments//final_adult_3_sum_range_OLHPGRR.txt", "w+") as f: f.write(str(ans) + "\n") f.write("true ans"+str(trueans)+"\n") f.write("relativeError:" + str(relativeError) + "\n") f.write("averageError:" + str(averageError) + "\n")
45.378788
106
0.55793
399f7a275c2d21e47c659bdc1b39ef535eeeb5bb
917
py
Python
filelist_excel.py
exomachine/filelist_excel
73347a49b990ed6e8e609c9cc53bbd68fcdce2ad
[ "MIT" ]
null
null
null
filelist_excel.py
exomachine/filelist_excel
73347a49b990ed6e8e609c9cc53bbd68fcdce2ad
[ "MIT" ]
null
null
null
filelist_excel.py
exomachine/filelist_excel
73347a49b990ed6e8e609c9cc53bbd68fcdce2ad
[ "MIT" ]
null
null
null
# Export a list of all files from a target path to an Excel Spreadsheet # @exomachine 2019 import glob import xlwt import ntpath from tempfile import TemporaryFile path = 'U:\\' #Input path savePath = "Q:\\Folder Content.xls" #Output path rawData = [] book1 = xlwt.Workbook() sheet1 = book1.add_sheet('sheet1') rawData.append('List of folders') for d in glob.glob(path + "**/", recursive=False): rawData.append (d) rawData.append('List of Folder and Files') for f in glob.glob(path + "*", recursive=False): rawData.append (f) #for f in rawData: # print(f) def path_leaf(path): #trim path for filename or folder name head, tail = ntpath.split(path) return tail or ntpath.basename(head) for i, e in enumerate(rawData): sheet1.write(i,0,path_leaf(e)) sheet1.write(i,1,e) book1.save(savePath) book1.save(TemporaryFile()) print("done")
23.512821
72
0.665213
25e4e66486e71405c13378b7ff5abefc75bf9075
6,985
py
Python
app/dataprocessing.py
sean-ashley/Stroke-Prediction-App
8abb6f7c1217291f5f5a52e9f422314d85dd0fae
[ "Apache-2.0" ]
7
2021-03-21T23:19:28.000Z
2021-12-27T18:51:45.000Z
app/dataprocessing.py
sean-ashley/Stroke-Prediction-App
8abb6f7c1217291f5f5a52e9f422314d85dd0fae
[ "Apache-2.0" ]
null
null
null
app/dataprocessing.py
sean-ashley/Stroke-Prediction-App
8abb6f7c1217291f5f5a52e9f422314d85dd0fae
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer from sklearn.preprocessing import MultiLabelBinarizer def is_user_diabetic(avg_glucose_level): """ desc: converts avg_glucose_level to category based on ADA Guidelines https://www.diabetes.org/a1c/diagnosis args: avg_glucose_level (float) : glucose level in blood based on mg/dL returns: blood_cat (string) : blood sugar category """ if avg_glucose_level >= 200: return 1 else: return 0 def add_diabetes(df,add_col = True): """ desc : creates and adds a diabetes column to the dataframe args: df (pd.DataFrame) : stroke dataframe return: df (pd.DataFrame) : stroke dataframe with diabetes column added """ if add_col: stroke_data = df.copy() stroke_data["is_user_diabetic"] = stroke_data["avg_glucose_level"].apply(is_user_diabetic) return stroke_data #if we dont want to add the col return the same def return df def bmi_to_bodytype(bmi): """ desc : converts bmi to a category body type based on CDC guidelines https://www.cdc.gov/healthyweight/assessing/bmi/adult_bmi/index.html args: bmi (float) : the users bmi returns: bodytype (string) : The users bodytype """ if bmi < 18.5: return "Underweight" elif 18.5 <= bmi < 24.9: return "Normal" elif 24.9 <= bmi < 29.9: return "Overweight" else: return "Obese" def add_bodytype(df, add_col = True): """ desc : converts bmi to a category body type based on CDC guidelines https://www.cdc.gov/healthyweight/assessing/bmi/adult_bmi/index.html args: df (pd.DataFrame) : stroke dataframe returns: df (pd.DataFrame) : stroke dataframe with bodytype column """ if add_col: stroke_data = df.copy() num_cols = stroke_data.select_dtypes(exclude= ["object"]) num_cols_names = num_cols.columns #impute missing values again to take into account new columns imputer = SimpleImputer() imputed_cols = imputer.fit_transform(num_cols) imputed_cols = pd.DataFrame(data = imputed_cols,columns = num_cols.columns,index = num_cols.index) #apply function stroke_data["body_type"] = imputed_cols["bmi"].apply(bmi_to_bodytype) return stroke_data #if we dont want to add the col the same df return df def impute(df): """ desc : imputes args: df (pd.DataFrame) : stroke dataframe returns: df (pd.DataFrame) : stroke dataframe imputed """ stroke_data = df.copy() num_cols = stroke_data.select_dtypes(exclude= ["object"]) num_cols_names = num_cols.columns #impute missing values again to take into account new columns imputer = SimpleImputer() imputed_cols = imputer.fit_transform(num_cols) imputed_cols = pd.DataFrame(data = imputed_cols,columns = num_cols.columns,index = num_cols.index) #drop numeric columns stroke_data.drop(columns = num_cols_names, axis = 1, inplace = True) stroke_data = pd.concat([stroke_data,imputed_cols],axis = 1) return stroke_data def one_hot_encode(df): """ desc : one hot encodes categorical cols args: df (pd.DataFrame) : stroke dataframe returns: df (pd.DataFrame) : stroke dataframe with one_hot_encoded columns """ # extract categorical columns stroke_data = df.copy() cat_cols = stroke_data.select_dtypes(include = ["object"]) cat_vals = cat_cols.values cat_cols_names = cat_cols.columns binarizer = MultiLabelBinarizer() encoded_cols = pd.DataFrame(binarizer.fit_transform(cat_vals),columns = binarizer.classes_,index = cat_cols.index) #drop non one hot encoded cols stroke_data.drop(columns = cat_cols_names, axis = 1, inplace = True) #add encoded columns stroke_data = pd.concat([stroke_data,encoded_cols], axis = 1) #print(stroke_data.shape) return stroke_data def add_preexisting(df): """ desc : denotes whether or not a user has a pre-existing heart condition (high blood pressure or heart disease) args: df (pd.DataFrame) : stroke dataframe returns: df (pd.DataFrame) : stroke dataframe with pre_existing column """ stroke_data = df.copy() stroke_data["pre_existing"] = (stroke_data['hypertension'] + stroke_data['heart_disease']).astype("bool") return stroke_data def get_all_tags(df): """ desc : get all possible tags for the df args: df (pd.DataFrame) : stroke dataframe return: all_tags (list) : full list of tags """ #add feature columns diabetes_df = add_diabetes(df) body_type_df = add_bodytype(diabetes_df) pre_existing_df = add_preexisting(body_type_df) #impute and onehotencode imputed_df = impute(pre_existing_df) encoded_df = one_hot_encode(imputed_df) return encoded_df.columns def add_missing_cols(df, total_tags): """ desc : add any missing columns and fill with 0's to make sure we can use gridsearchcv args: df (pd.DataFrame) : stroke dataframe all_tags (list) : full list of tags return: df (pd.DataFrame) : stroke dataframe with all columns added """ #convert to set so we can perform set operations df_cols = set(df.columns) total_tags = set(total_tags) cols_to_add = list(total_tags.difference(df_cols)) cols = sorted(list(total_tags)) if cols_to_add: #make an array of zeros for all of the columns we are going to add zeros = np.zeros(shape = (df.shape[0],len(cols_to_add))) #add the cols df[cols_to_add] = zeros #maintain same order no matter what df = df[cols] return df df = df[cols] return df def load_data(data_path,test_size = 0.1): """ desc : read in data, one hot encode, and seperate into training and test data args: data (string) : path to data test_size (float) : portion of the data set reserved for testing random_state (int) : Seed to use to randomely select return: X_train (pd.DataFrame) : training data X_test (pd.DataFrame) : testing data y_train (pd.DataFrame) : training target y_test (pd.DataFrame) : testing target """ stroke_data = pd.read_csv(data_path,index_col = "id") #print(one_hot_encode(stroke_data).columns) #drop smoking status, 30% missing #stroke_data = stroke_data.drop(columns = ["smoking_status"],axis = 1) y = stroke_data["stroke"] X = stroke_data.drop(columns=["stroke"], axis=1) X_train, X_test, y_train, y_test = train_test_split(X,y,test_size = test_size, random_state=1) return X_train, X_test, y_train, y_test
29.723404
140
0.661704
26d9d0b467b0d72d0888084969c5d2aee9ad8c6c
4,378
py
Python
umetnine/account/views.py
jaanos/OPB-umetnine
f1fedd62e750317548510c412793d80c60b9e392
[ "MIT" ]
null
null
null
umetnine/account/views.py
jaanos/OPB-umetnine
f1fedd62e750317548510c412793d80c60b9e392
[ "MIT" ]
null
null
null
umetnine/account/views.py
jaanos/OPB-umetnine
f1fedd62e750317548510c412793d80c60b9e392
[ "MIT" ]
null
null
null
from django.contrib.auth import authenticate, login from django.contrib.auth.models import User from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponse # from django.views.generic import CreateView, TemplateView from datetime import datetime from artists.forms import NewArtForm, TagForm, UserDescriptionForm from artists.models import ArtworksTags, Tags, Arts, UserDescription from .forms import RegisterForm, EditProfileFrom, AddArtForm # Create your views here. from .models import UserArtwork def register(request): if request.method == "POST": form = RegisterForm(request.POST) if form.is_valid(): form.save() new_user = authenticate(username=form.cleaned_data['username'], password=form.cleaned_data['password1'], ) login(request, new_user) return redirect('/user/profile/') else: form = RegisterForm() return render(request, 'account/register.html', {'form': form}) def user_list(request): queryset = User.objects.all() # list of objects return render(request, 'account/userList.html', {'object_list': queryset}) def all_user_works(request): queryset = Arts.objects.filter(user_id=request.user.id).order_by('-timestamp') # list of objects context = {'object_list': queryset, 'user': request.user} return render(request, 'account/all_user_works.html', context) def art_delete(request, pk): art_to_delete = get_object_or_404(Arts, id=pk) try: art_to_delete.delete() finally: return redirect("/user/myworks") def profile_view(request): if not request.user.is_authenticated: html = "<h1>You are not logged in.</h1><a href='/login'>Log in.</a>" return HttpResponse(html) # za vpisane uporabnike pripravim pravi view if request.method == "POST": form = NewArtForm(request.POST) form2 = TagForm(request.POST) if form.is_valid() and form2.is_valid(): new_art = form.save(commit=False) new_art.user_id = request.user new_art.timestamp = datetime.now() new_art.save() tags_input = form2.cleaned_data['tag'] all_tags = set(tags_input.split(", ")) for tg in all_tags: new_tag = Tags.objects.create(tag=tg) ArtworksTags.objects.create(tag_id=new_tag, artwork_id=new_art) context = {'form': NewArtForm(), 'new_art': new_art, "form2": form2} return redirect('/user/myworks/') else: return render(request, 'account/profile.html', {'form': NewArtForm(), "form2": TagForm()}) else: # request je get form = NewArtForm() form2 = TagForm() context = {'form': form, "form2": form2} return render(request, 'account/profile.html', context) def edit_profile(request): if not request.user.is_authenticated: html = "<h1>You are not logged in.</h1><a href='/login'>Log in.</a>" return HttpResponse(html) # za vpisane uporabnike pripravim pravi view if request.method == 'POST': form = EditProfileFrom(request.POST, instance=request.user) form2 = UserDescriptionForm(request.POST) if form.is_valid() and form2.is_valid(): # dobro je izpolnjeno, posodobim bazo obj, created = UserDescription.objects.update_or_create( user_id_id=request.user.id, defaults={'description': form2.cleaned_data['description']} ) form.save() return redirect('/user/profile') else: # ce formi niso dobro izpolnjeni form = EditProfileFrom() form2 = UserDescriptionForm() else: try: old_description = UserDescription.objects.get(user_id_id=request.user.id) form2 = UserDescriptionForm(instance=old_description) except Exception: form2 = UserDescriptionForm() form = EditProfileFrom(instance=request.user) context = {'form': form, 'form2': form2} return render(request, 'account/edit_profile.html', context) return render(request, 'account/edit_profile.html', {}) def logout(request): return render(request, 'account/logout.html', {})
37.741379
102
0.640247
b1eec386b7239e221374f6f2dc5021d6c2d0cc67
837
py
Python
sana/api/middleware/echo/urls.py
satvikdhandhania/vit-11
e599f2b82a9194658c67bbd5c7e45f3b50d016da
[ "BSD-3-Clause" ]
1
2016-09-20T20:36:53.000Z
2016-09-20T20:36:53.000Z
sana/api/middleware/echo/urls.py
satvikdhandhania/vit-11
e599f2b82a9194658c67bbd5c7e45f3b50d016da
[ "BSD-3-Clause" ]
null
null
null
sana/api/middleware/echo/urls.py
satvikdhandhania/vit-11
e599f2b82a9194658c67bbd5c7e45f3b50d016da
[ "BSD-3-Clause" ]
null
null
null
''' @author: Sana Dev Team Created on May 18, 2011 ''' from django.conf.urls.defaults import patterns import handlers urlpatterns = patterns( '', (r'^binary/$', handlers.binary_resource, {}, 'binary'), (r'^client/', handlers.client_resource, {}, 'client'), (r'^encounter/$', handlers.encounter_resource, {}, 'encounter'), (r'^notification/$', handlers.notification_resource, {}, 'notification'), (r'^procedure/$', handlers.procedure_resource, {}, 'procedure'), (r'^status/$', handlers.status_resource, {}, 'status'), (r'^subject/$', handlers.subject_resource, {}, 'subject'), )
18.195652
46
0.476703
c3674877e97a6605e7d7eef510113b30704b7799
14,714
py
Python
Practise_1_Olympic Hero/Python_Olympic Hero.py
csk1908/ga-learner-dsmp-repo
ea841db0d534e6b45176b6b316fa7f2a3ca87a4a
[ "MIT" ]
null
null
null
Practise_1_Olympic Hero/Python_Olympic Hero.py
csk1908/ga-learner-dsmp-repo
ea841db0d534e6b45176b6b316fa7f2a3ca87a4a
[ "MIT" ]
null
null
null
Practise_1_Olympic Hero/Python_Olympic Hero.py
csk1908/ga-learner-dsmp-repo
ea841db0d534e6b45176b6b316fa7f2a3ca87a4a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # Problem Statement # The Olympic Games, considered to be the world's foremost sports competition has more than 200 nations participating across the Summer and Winter Games alternating by occurring every four years but two years apart. # # Throughout this project, we will explore the Olympics dataset(scraped from https://en.wikipedia.org/wiki/All-time_Olympic_Games_medal_table) , look at some interesting statistics and then try to find out which country is the King of Olympic Games. # # About the dataset # The snapshot of the data, you will be working on: # # The dataset has details of 146 countries with following 16 features # # Feature Description # Country_Name Name of the country # # Summer No. of games played in Summer Olympics # Gold_Summer No. of gold medals won in Summer Olympics # Silver_Summer No. of silver medals won in Summer Olympics # Bronze_Summer No. of bronze medals won in Summer Olympics # Total_Summer Total no. of all the medals won in Summer Olympics # # Winter No. of games played in Winter Olympics # Gold_Winter No. of gold medals won in Winter Olympics # Silver_Winter No. of silver medals won in Winter Olympics # Bronze_Winter No. of bronze medals won in Winter Olympics # Total_Winter Total no. of all the medals won in Winter Olympics # # Games Total no. of games played in both Summer and Winter Olympics # Gold_Total Total no. of gold medals won in both Summer and Winter Olympics # Silver_Total Total no. of silver medals won in both Summer and Winter Olympics # Bronze_Total Total no. of bronze medals won in both Summer and Winter Olympics # Total Total no. of all the medals won in both Summer and Winter Olympics # Why solve this project? # After completing this project, you will have a better understanding of data handling with python(pandas). In this project, you will be applying the following concepts : # # Dataframe operations # # Conditional statement and loops # # List operations # # Bar Plotting # # Mathematical operations # In[2]: import csv import pandas as pd import numpy as np import matplotlib.pyplot as plt # 1. Data Loading # Let's start with the simple task of loading the data and do a little bit of renaming. # # Instructions : # Load the dataframe from the path using pd.read_csv() and store the dataframe in a variable called 'data'. # # In the dataframe, rename the column Total to Total_Medals # # Display first 10 records using "head()" function to take a look at the dataframe. # In[3]: data = pd.read_csv("E:\\GreyAtom_Online_04.04.2020\\Python_Olympic Hero.csv") data.head() data.rename(columns = {'Total':'Total_Medals'}, inplace = True) print(data.head(10)) # In[4]: data.info() # 2. Summer or Winter # Some Countries love Summer, some Winter. We think it has to do something with their Olympic performance. # # For this task we will try to figure out which olympic event does a country perform better in. # # Instructions : # Create a new column Better_Event that stores 'Summer','Winter' or 'Both' based on the comparision between the total medals won in Summer event and Winter event (i.e. comparision between the Total_Summer and Total_Winter columns) using "np.where()"function. # Example of np.where() function: # data = {'name': ['A', 'B', 'C', 'D', 'E'], # 'age': [12, 66, 22, 80, 7], # 'gender': ['M', 'F', 'F', 'M', 'M'], # } # df = pd.DataFrame(data, columns = ['name', 'age', 'gender']) # # print("dataframe before: \n",df) # # """ # Creating a new column called senior_citizen where the value is yes # if df.age is greater than 60 and no if not # """ # df['senior_citizen'] = np.where(df['age']>=60, 'yes', 'no') # print("dataframe after:\n",df) # Output # # dataframe before: # # name age gender # 0 A 12 M # 1 B 66 F # 2 C 22 F # 3 D 80 M # 4 E 7 M # # dataframe after: # name age gender senior_citizen # 0 A 12 M no # 1 B 66 F yes # 2 C 22 F no # 3 D 80 M yes # 4 E 7 M no # Find out which has been a better event with respect to all the performing countries by using value_counts() function and store it in a new variable called 'better_event'. # In[5]: data['Better_Event'] = np.where(data['Total_Summer']>data['Total_Winter'],'Summer', 'Winter') data['Better_Event'] =np.where(data['Total_Summer'] ==data['Total_Winter'],'Both',data['Better_Event']) #print(data) better_event = data['Better_Event'].value_counts().index.values[0] print(better_event) # 3. Top 10 # So we figured out which is a better event for each country. Let's move on to finding out the best performing countries across all events # # In this task we will try to find # # Which are the top 10 performing teams at summer event (with respect to total medals), winter event and overall? # How many teams are present in all of the three lists above? # Instructions : # Create a new dataframe subset called 'top_countries' with the columns ['Country_Name','Total_Summer', 'Total_Winter','Total_Medals'] only # # Drop the last row from 'top_countries'(The last row contains the sum of the medals) # # Create a function called 'top_ten' that: # # Takes the dataframe 'top_countries' and a column name as parameters. # # Creates a new empty list called 'country_list' # # Find the top 10 values for that particular column(for e.g. 'Total_Summer') using "nlargest()" function # # From the dataframe returned by nlargest function, slices the Country_Name column and stores it in the 'country_list' list # # Returns the 'country_list' # # Example of 'nlargest()' function : # df = pd.DataFrame({'ID': [1, 2, 3, 4, 5], # 'Score': [33, 92, 26, 75, 80]}) # # print("The dataframe:\n",df) # # Filtering the 3 largest scores and getting the IDs associated with it # top_3=df.nlargest(3, 'Score') # print("df having top 3 scores:") # print(top_3) # print("IDs associated to top 3:") # print(list(top_3['ID'])) # Output # # The dataframe: # ID Score # 0 1 33 # 1 2 92 # 2 3 26 # 3 4 75 # 4 5 80 # df having top 3 scores: # ID Score # 1 2 92 # 4 5 80 # 3 4 75 # IDs associated to top 3: # [2, 5, 4] # Parameters : # # parameter dtype Argument Type default value description # variable1 pandas.DataFrame compulsory dataframe to be loaded # variable2 string compulsory column name # Returns: # # returns dtype description # variable1 list list containing countries names # Call the 'top_ten()' function for the three columns :Total_Summer,Total_Winter and Total_Medals and store their respective results in lists called 'top_10_summer', 'top_10_winter' and 'top_10' # # Create a new list 'common' that stores the common elements between the three lists('top_10_summer', 'top_10_winter' and 'top_10') # In[ ]: # In[6]: top_countries = data[['Country_Name','Total_Summer', 'Total_Winter','Total_Medals']] print(top_countries.tail()) top_countries.drop(index=146,axis=0,inplace=True) print(top_countries.tail()) # In[ ]: # In[7]: def top_ten(v1,v2): country_list = [] #x = v1.nlargest(10,v2) #country_list = x['Country_Name'] country_list = v1.nlargest(10,v2)['Country_Name'] country_list = list(country_list) return(country_list) top_10_summer = top_ten(top_countries,'Total_Summer') print('Top 10 countries for SUMMER are \n',top_10_summer) top_10_winter = top_ten(top_countries,'Total_Winter') print('Top 10 countries for WINTER are \n',top_10_winter) top_10 = top_ten(top_countries,'Total_Medals') print('Top 10 countries who got TOTAL MEDALS are \n',top_10) type(top_10) common = [value for value in top_10_summer if value in top_10_winter and value in top_10] print('Countries common in all the three ist are \n ',common) """ def intersection(l1,l2,l3): l4 = [value for value in l1 if value in l2 and value in l3] return l4 common = intersection (top_10_summer,top_10_winter,top_10) print(common) """ # 4. Plotting Top 10 # From the lists that you have created from the previous task, let's plot the medal count of the top 10 countries for better visualisation # # Instructions : # Take the three previously created lists(top_10_summer, top_10_winter, top_10) # # Subset the dataframe 'data' based on the country names present in the list top_10_summer using "isin()" function on the column Country_Name. Store the new subsetted dataframes in 'summer_df'. Do the similar operation using top_10_winter and top_10 and store the subset dataframes in 'winter_df' & 'top_df' respectively. # # Example of isin() function: # df = pd.DataFrame({'A': [1, 2, 3, 4, 5], 'B': ['Alpha', 'Beta', 'Gamma','Delta','Epsilon'], 'C':[1, 4, 9, 16, 25]}) # #List # List= ['Beta','Epsilon'] # # #Usage of isin() function # subset_df=df[df['B'].isin(List)] # # print(subset_df) # Output # # A B C # 1 2 Beta 4 # 4 5 Epsilon 25 # Take each subsetted dataframe and plot a bar graph between the country name and total medal count according to the event (For e.g. for 'summer_df' plot a bar graph between Country_Name and Total_Summer) # # Modify the axes info accordingly # In[8]: #Code starts here summer_df = data[data['Country_Name'].isin(top_10_summer)] print('Summer_dataframe is \n', summer_df.head()) winter_df = data[data['Country_Name'].isin(top_10_winter)] print('Winter_dataframe is\n',winter_df.head()) top_df = data[data['Country_Name'].isin(top_10)] print('Total_dataframe is\n',top_df.head()) #type_2.plot(kind='bar') #Summer_df plt.figure(figsize=[14,8]) plt.title("Total Medals won in Summer by top 10 countries") plt.xlabel("Name of the Country") plt.ylabel("Total Medals") plt.bar(summer_df['Country_Name'],summer_df['Total_Summer']) plt.show() #Winter_df plt.figure(figsize=[14,8]) plt.title("Total Medals won in Winter by top 10 countries") plt.xlabel("Name of the Country") plt.ylabel("Total Medals") plt.bar(summer_df['Country_Name'],summer_df['Total_Winter']) plt.show() #Total_df plt.figure(figsize=[14,8]) plt.title("Total Medals won in Summer and Winter by top 10 countries") plt.xlabel("Name of the Country") plt.ylabel("Total Medals") plt.bar(summer_df['Country_Name'],summer_df['Total_Medals']) plt.show() # 6. Top performing country(Gold) # Winning silver or bronze medals is a big achievement but winning gold is bigger. # # Using the above created dataframe subsets, in this task let's find out which country has had the best performance with respect to the ratio between gold medals won and total medals won. # # Instructions : # In the dataframe 'summer_df'(created in the previous function) , create a new column Golden_Ratio which is the quotient after dividing the two columns Gold_Summer and Total_Summer. # # Find the max value of Golden_Ratio and the country associated with it and store them in summer_max_ratio and summer_country_gold respectively. # # In the dataframe 'winter_df'(created in the previous function) , create a new column Golden_Ratio which is the quotient after dividing the two columns Gold_Winter and Total_Winter. # # Find the max value of Golden_Ratio and the country associated with it and store them in 'winter_max_ratio' and 'winter_country_gold' respectively. # # In the dataframe top_df'(created in the previous function) , create a new column Golden_Ratio which is the quotient after dividing the two columns Gold_Total and Total_Medals. # # Find the max value of Golden_Ratio and the country associated with it and store them in top_max_ratio' and 'top_country_gold' respectively. # In[9]: #Code starts here summer_df['Golden_Ratio'] = round(summer_df['Gold_Summer']/summer_df['Total_Summer'],2) print(summer_df.head()) summer_max_ratio = summer_df['Golden_Ratio'].max() print(summer_max_ratio) summer_country_gold = summer_df.loc[summer_df['Golden_Ratio'].idxmax(),'Country_Name'] print(summer_country_gold) winter_df['Golden_Ratio'] = round(winter_df['Gold_Winter']/summer_df['Total_Winter'],2) print(winter_df.head()) winter_max_ratio = winter_df['Golden_Ratio'].max() print(winter_max_ratio) winter_country_gold = winter_df.loc[winter_df['Golden_Ratio'].idxmax(),'Country_Name'] print(winter_country_gold) top_df['Golden_Ratio'] = round(top_df['Gold_Total']/top_df['Total_Medals'],2) print(winter_df.head()) top_max_ratio = top_df['Golden_Ratio'].max() print(top_max_ratio) top_country_gold = top_df.loc[top_df['Golden_Ratio'].idxmax(),'Country_Name'] print(top_country_gold) # 7. Best in the world # Winning Gold is great but is winning most gold equivalent to being the best overall perfomer? Let's find out. # # Instructions : # Drop the last row from the dataframe(The last row contains the total of all the values calculated vertically) and save the result in 'data_1' # # Update the dataframe 'data_1' to include a new column called Total_Points which is a weighted value where each gold medal counts for 3 points, silver medals for 2 points, and bronze medals for 1 point.(i.e. You need to take weighted value of Gold_Total, Silver_Total and Bronze_Total) # # Find the max value of Total_Points in 'data_1' and the country assosciated with it and store it in variables 'most_points' and 'best_country' respectively. # In[10]: data_1=data[:-1] data_1['Total_Points']= data_1['Gold_Total']*3 + data_1['Silver_Total']*2 + data_1['Bronze_Total']*1 print(data_1.head()) most_points = data_1['Total_Points'].max() print(most_points) best_country = data_1.loc[data_1['Total_Points'].idxmax(),'Country_Name'] print(best_country) # Plot for the best # We know which country is best when it comes to winning the most points in Olympic Games. Let's plot the medal count to visualise their success better. # # Instructions # Create a single row dataframe called 'best' from 'data' where value of column Country_Name is equal to 'best_country'(The variable you created in the previous task) # # Subset 'best' even further by only including the columns : ['Gold_Total','Silver_Total','Bronze_Total'] # # Create a stacked bar plot of 'best' using "DataFrame.plot.bar()" function # # Name the x-axis as United States using "plt.xlabel()" # # Name the y-axis as Medals Tally using "plt.ylabel()" # # Rotate the labels of x-axis by 45o using "plt.xticks()" # In[12]: best = data[data['Country_Name'] == best_country] print(best) print(type(best)) best = best[['Gold_Total','Silver_Total','Bronze_Total']] print(best) best.plot(kind='bar', stacked=True) plt.xlabel("United States") plt.ylabel("Medals Tally") plt.xticks(rotation = 45) plt.show() # In[25]: # In[ ]:
32.84375
321
0.722441
9fa768b4e784735bb1f6b6d19c1458f5e29d73b9
11,809
py
Python
bin/Python27/Lib/site-packages/sympy/combinatorics/prufer.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/sympy/combinatorics/prufer.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/sympy/combinatorics/prufer.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
from sympy.core import Basic from sympy.core.compatibility import iterable, as_int from sympy.utilities.iterables import flatten from collections import defaultdict class Prufer(Basic): """ The Prufer correspondence is an algorithm that describes the bijection between labeled trees and the Prufer code. A Prufer code of a labeled tree is unique up to isomorphism and has a length of n - 2. Prufer sequences were first used by Heinz Prufer to give a proof of Cayley's formula. References ========== .. [1] http://mathworld.wolfram.com/LabeledTree.html """ _prufer_repr = None _tree_repr = None _nodes = None _rank = None @property def prufer_repr(self): """Returns Prufer sequence for the Prufer object. This sequence is found by removing the highest numbered vertex, recording the node it was attached to, and continuuing until only two verices remain. The Prufer sequence is the list of recorded nodes. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> Prufer([[0, 3], [1, 3], [2, 3], [3, 4], [4, 5]]).prufer_repr [3, 3, 3, 4] >>> Prufer([1, 0, 0]).prufer_repr [1, 0, 0] See Also ======== to_prufer """ if self._prufer_repr is None: self._prufer_repr = self.to_prufer(self._tree_repr[:], self.nodes) return self._prufer_repr @property def tree_repr(self): """Returns the tree representation of the Prufer object. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> Prufer([[0, 3], [1, 3], [2, 3], [3, 4], [4, 5]]).tree_repr [[0, 3], [1, 3], [2, 3], [3, 4], [4, 5]] >>> Prufer([1, 0, 0]).tree_repr [[1, 2], [0, 1], [0, 3], [0, 4]] See Also ======== to_tree """ if self._tree_repr is None: self._tree_repr = self.to_tree(self._prufer_repr[:]) return self._tree_repr @property def nodes(self): """Returns the number of nodes in the tree. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> Prufer([[0, 3], [1, 3], [2, 3], [3, 4], [4, 5]]).nodes 6 >>> Prufer([1, 0, 0]).nodes 5 """ return self._nodes @property def rank(self): """Returns the rank of the Prufer sequence. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> p = Prufer([[0, 3], [1, 3], [2, 3], [3, 4], [4, 5]]) >>> p.rank 778 >>> p.next(1).rank 779 >>> p.prev().rank 777 See Also ======== prufer_rank, next, prev, size """ if self._rank is None: self._rank = self.prufer_rank() return self._rank @property def size(self): """Return the number of possible trees of this Prufer object. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> Prufer([0]*4).size == Prufer([6]*4).size == 1296 True See Also ======== prufer_rank, rank, next, prev """ return self.prev(self.rank).prev().rank + 1 @staticmethod def to_prufer(tree, n): """Return the Prufer sequence for a tree given as a list of edges where ``n`` is the number of nodes in the tree. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> a = Prufer([[0, 1], [0, 2], [0, 3]]) >>> a.prufer_repr [0, 0] >>> Prufer.to_prufer([[0, 1], [0, 2], [0, 3]], 4) [0, 0] See Also ======== prufer_repr: returns Prufer sequence of a Prufer object. """ d = defaultdict(int) L = [] for edge in tree: # Increment the value of the corresponding # node in the degree list as we encounter an # edge involving it. d[edge[0]] += 1 d[edge[1]] += 1 for i in xrange(n - 2): # find the smallest leaf for x in xrange(n): if d[x] == 1: break # find the node it was connected to y = None for edge in tree: if x == edge[0]: y = edge[1] elif x == edge[1]: y = edge[0] if y is not None: break # record and update L.append(y) for j in (x, y): d[j] -= 1 if not d[j]: d.pop(j) tree.remove(edge) return L @staticmethod def to_tree(prufer): """Return the tree (as a list of edges) of the given Prufer sequence. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> a = Prufer([0, 2], 4) >>> a.tree_repr [[0, 1], [0, 2], [2, 3]] >>> Prufer.to_tree([0, 2]) [[0, 1], [0, 2], [2, 3]] References ========== - http://hamberg.no/erlend/2010/11/06/prufer-sequence/ See Also ======== tree_repr: returns tree representation of a Prufer object. """ tree = [] last = [] n = len(prufer) + 2 d = defaultdict(lambda: 1) for p in prufer: d[p] += 1 for i in prufer: for j in xrange(n): # find the smallest leaf (degree = 1) if d[j] == 1: break # (i, j) is the new edge that we append to the tree # and remove from the degree dictionary d[i] -= 1 d[j] -= 1 tree.append(sorted([i, j])) last = [i for i in xrange(n) if d[i] == 1] or [0, 1] tree.append(last) return tree @staticmethod def edges(*runs): """Return a list of edges and the number of nodes from the given runs that connect nodes in an integer-labelled tree. All node numbers will be shifted so that the minimum node is 0. It is not a problem if edges are repeated in the runs; only unique edges are returned. There is no assumption made about what the range of the node labels should be, but all nodes from the smallest through the largest must be present. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> Prufer.edges([1, 2, 3], [2, 4, 5]) # a T ([[0, 1], [3, 4], [1, 2], [1, 3]], 5) Duplicate edges are removed: >>> Prufer.edges([0, 1, 2, 3], [1, 4, 5], [1, 4, 6]) # a K ([[0, 1], [1, 2], [4, 6], [4, 5], [1, 4], [2, 3]], 7) """ e = set() nmin = runs[0][0] for r in runs: for i in range(len(r)-1): a, b = r[i: i + 2] if b < a: a, b = b, a e.add((a, b)) rv = [] got = set() nmin = nmax = None while e: ei = e.pop() for i in ei: got.add(i) nmin = min(ei[0], nmin) if nmin != None else ei[0] nmax = max(ei[1], nmax) if nmax != None else ei[1] rv.append(list(ei)) missing = set(range(nmin, nmax + 1)) - got if missing: missing = [i + nmin for i in missing] if len(missing) == 1: msg = 'Node %s is missing.' % missing.pop() else: msg = 'Nodes %s are missing.' % list(sorted(missing)) raise ValueError(msg) if nmin != 0: for i, ei in enumerate(rv): rv[i] = [n - nmin for n in ei] nmax -= nmin return rv, nmax + 1 def prufer_rank(self): """Computes the rank of a Prufer sequence. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> a = Prufer([[0, 1], [0, 2], [0, 3]]) >>> a.prufer_rank() 0 See Also ======== rank, next, prev, size """ r = 0 p = 1 for i in xrange(self.nodes - 3, -1, -1): r += p*self.prufer_repr[i] p *= self.nodes return r @classmethod def unrank(self, rank, n): """Finds the unranked Prufer sequence. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> Prufer.unrank(0, 4) Prufer([0, 0]) """ n, rank = as_int(n), as_int(rank) L = defaultdict(int) for i in xrange(n - 3, -1, -1): L[i] = rank % n rank = (rank - L[i])//n return Prufer([L[i] for i in xrange(len(L))]) def __new__(cls, *args, **kw_args): """The constructor for the Prufer object. Examples ======== >>> from sympy.combinatorics.prufer import Prufer A Prufer object can be constructed from a list of edges: >>> a = Prufer([[0, 1], [0, 2], [0, 3]]) >>> a.prufer_repr [0, 0] If the number of nodes is given, no checking of the nodes will be performed; it will be assumed that nodes 0 through n - 1 are present: >>> Prufer([[0, 1], [0, 2], [0, 3]], 4) Prufer([[0, 1], [0, 2], [0, 3]], 4) A Prufer object can be constructed from a Prufer sequence: >>> b = Prufer([1, 3]) >>> b.tree_repr [[0, 1], [1, 3], [2, 3]] """ ret_obj = Basic.__new__(cls, *args, **kw_args) args = [list(args[0])] if args[0] and iterable(args[0][0]): if not args[0][0]: raise ValueError('Prufer expects at least one edge in the tree.') if len(args) > 1: nnodes = args[1] else: nodes = set(flatten(args[0])) nnodes = max(nodes) + 1 if nnodes != len(nodes): missing = set(range(nnodes)) - nodes if len(missing) == 1: msg = 'Node %s is missing.' % missing.pop() else: msg = 'Nodes %s are missing.' % list(sorted(missing)) raise ValueError(msg) ret_obj._tree_repr = [list(i) for i in args[0]] ret_obj._nodes = nnodes else: ret_obj._prufer_repr = args[0] ret_obj._nodes = len(ret_obj._prufer_repr) + 2 return ret_obj def next(self, delta=1): """Generates the Prufer sequence that is delta beyond the current one. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> a = Prufer([[0, 1], [0, 2], [0, 3]]) >>> b = a.next(1) # == a.next() >>> b.tree_repr [[0, 2], [0, 1], [1, 3]] >>> b.rank 1 See Also ======== prufer_rank, rank, prev, size """ return Prufer.unrank(self.rank + delta, self.nodes) def prev(self, delta=1): """Generates the Prufer sequence that is -delta before the current one. Examples ======== >>> from sympy.combinatorics.prufer import Prufer >>> a = Prufer([[0, 1], [1, 2], [2, 3], [1, 4]]) >>> a.rank 36 >>> b = a.prev() >>> b Prufer([1, 2, 0]) >>> b.rank 35 See Also ======== prufer_rank, rank, next, size """ return Prufer.unrank(self.rank - delta, self.nodes)
27.399072
81
0.473791
2fcd2959ad9fc1c976eba5a80209d279b3d87709
3,068
py
Python
braille_experience/braille_translators/mapAlphaToBraille.py
firekim2/testserver
0ebd7be0e254fa825dad8be314fbfcb7b03f7a30
[ "MIT" ]
null
null
null
braille_experience/braille_translators/mapAlphaToBraille.py
firekim2/testserver
0ebd7be0e254fa825dad8be314fbfcb7b03f7a30
[ "MIT" ]
null
null
null
braille_experience/braille_translators/mapAlphaToBraille.py
firekim2/testserver
0ebd7be0e254fa825dad8be314fbfcb7b03f7a30
[ "MIT" ]
null
null
null
# Contains dictionaries that map English letters to braille. letters = {'a': chr(10241), 'b': chr(10243), 'c': chr(10249), 'd': chr(10265), 'e': chr(10257), 'f': chr(10251), 'g': chr(10267), 'h': chr(10259), 'i': chr(10250), 'j': chr(10266), 'k': chr(10245), 'l': chr(10247), 'm': chr(10253), 'n': chr(10269), 'o': chr(10261), 'p': chr(10255), 'q': chr(10271), 'r': chr(10263), 's': chr(10254), 't': chr(10270), 'u': chr(10277), 'v': chr(10279), 'w': chr(10298), 'x': chr(10285), 'y': chr(10301), 'z': chr(10293)} contractions = {'but': chr(10243), 'can': chr(10249), 'do': chr(10265), 'every': chr(10257), 'from': chr(10251), 'go': chr(10267), 'have': chr(10259), 'just': chr(10266), 'knowledge': chr(10280), 'like': chr(10296), 'more': chr(10253), 'not': chr(10269), 'people': chr(10255), 'quite': chr(10271), 'rather': chr(10263), 'so': chr(10254), 'that': chr(10270), 'us': chr(10277), 'very': chr(10279), 'it': chr(10285), 'you': chr(10301), 'as': chr(10293), 'and': chr(10287), 'for': chr(10303), 'of': chr(10295), 'the': chr(10286), 'with': chr(10302), 'will': chr(10298), 'his': chr(10278), 'in': chr(10260), 'was': chr(10292), 'to': chr(10262)} punctuation = {',': chr(10242), ';': chr(10246), ':': chr(10258), '.': chr(10290), '!': chr(10262), '(': chr(10294), ')': chr(10294), '“': chr(10278), '”': chr(10292), '?': chr(10278), '/': chr(10252), '#': chr(10300), '\'': chr(10244), '…': chr(10290) + chr(10290) + chr(10290), '’': chr(10244), '­': chr(10276), '-': chr(10276), '‐': chr(10276), '‑': chr(10276), '‒': chr(10276), '–': chr(10276), '—': chr(10276), '―': chr(10276)} numbers = {'1': chr(10241), '2': chr(10243), '3': chr(10249), '4': chr(10265), '5': chr(10257), '6': chr(10251), '7': chr(10267), '8': chr(10259), '9': chr(10250), '0': chr(10266)}
31.628866
61
0.3191
0bf92279ccb15fcd06d5b4abcacf6f23dc7bb1aa
16,309
py
Python
sfs/mono/source.py
vishwesh-vishwesh/HiWi-job
8953eb744f6e03191b94869e833b44efe74f7bd8
[ "MIT" ]
null
null
null
sfs/mono/source.py
vishwesh-vishwesh/HiWi-job
8953eb744f6e03191b94869e833b44efe74f7bd8
[ "MIT" ]
null
null
null
sfs/mono/source.py
vishwesh-vishwesh/HiWi-job
8953eb744f6e03191b94869e833b44efe74f7bd8
[ "MIT" ]
null
null
null
"""Compute the sound field generated by a sound source. .. plot:: :context: reset import sfs import numpy as np import matplotlib.pyplot as plt plt.rcParams['figure.figsize'] = 8, 4.5 # inch x0 = 1.5, 1, 0 f = 500 # Hz omega = 2 * np.pi * f normalization_point = 4 * np.pi normalization_line = \\ np.sqrt(8 * np.pi * omega / sfs.defs.c) * np.exp(1j * np.pi / 4) grid = sfs.util.xyz_grid([-2, 3], [-1, 2], 0, spacing=0.02) # Grid for vector fields: vgrid = sfs.util.xyz_grid([-2, 3], [-1, 2], 0, spacing=0.1) """ import itertools import numpy as np from scipy import special from .. import util from .. import defs def point(omega, x0, n0, grid, c=None): """Point source. Notes ----- :: 1 e^(-j w/c |x-x0|) G(x-x0, w) = --- ----------------- 4pi |x-x0| Examples -------- .. plot:: :context: close-figs p = sfs.mono.source.point(omega, x0, None, grid) sfs.plot.soundfield(p, grid) plt.title("Point Source at {} m".format(x0)) Normalization ... .. plot:: :context: close-figs sfs.plot.soundfield(p * normalization_point, grid, colorbar_kwargs=dict(label="p / Pa")) plt.title("Point Source at {} m (normalized)".format(x0)) """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0) grid = util.as_xyz_components(grid) r = np.linalg.norm(grid - x0) return 1 / (4*np.pi) * np.exp(-1j * k * r) / r def point_velocity(omega, x0, n0, grid, c=None): """Velocity of a point source. Returns ------- `XyzComponents` Particle velocity at positions given by *grid*. Examples -------- The particle velocity can be plotted on top of the sound pressure: .. plot:: :context: close-figs v = sfs.mono.source.point_velocity(omega, x0, None, vgrid) sfs.plot.soundfield(p * normalization_point, grid) sfs.plot.vectors(v * normalization_point, vgrid) plt.title("Sound Pressure and Particle Velocity") """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0) grid = util.as_xyz_components(grid) offset = grid - x0 r = np.linalg.norm(offset) v = point(omega, x0, n0, grid, c=c) v *= (1+1j*k*r) / (defs.rho0 * defs.c * 1j*k*r) return util.XyzComponents([v * o / r for o in offset]) def point_dipole(omega, x0, n0, grid, c=None): """Point source with dipole characteristics. Parameters ---------- omega : float Frequency of source. x0 : (3,) array_like Position of source. n0 : (3,) array_like Normal vector (direction) of dipole. grid : triple of array_like The grid that is used for the sound field calculations. See `sfs.util.xyz_grid()`. c : float, optional Speed of sound. Returns ------- numpy.ndarray Sound pressure at positions given by *grid*. Notes ----- :: d 1 / iw 1 \ (x-x0) n0 ---- G(x-x0,w) = --- | ----- + ------- | ----------- e^(-i w/c |x-x0|) d ns 4pi \ c |x-x0| / |x-x0|^2 Examples -------- .. plot:: :context: close-figs n0 = 0, 1, 0 p = sfs.mono.source.point_dipole(omega, x0, n0, grid) sfs.plot.soundfield(p, grid) plt.title("Dipole Point Source at {} m".format(x0)) """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0) n0 = util.asarray_1d(n0) grid = util.as_xyz_components(grid) offset = grid - x0 r = np.linalg.norm(offset) return 1 / (4*np.pi) * (1j * k + 1 / r) * np.inner(offset, n0) / \ np.power(r, 2) * np.exp(-1j * k * r) def point_modal(omega, x0, n0, grid, L, N=None, deltan=0, c=None): """Point source in a rectangular room using a modal room model. Parameters ---------- omega : float Frequency of source. x0 : (3,) array_like Position of source. n0 : (3,) array_like Normal vector (direction) of source (only required for compatibility). grid : triple of array_like The grid that is used for the sound field calculations. See `sfs.util.xyz_grid()`. L : (3,) array_like Dimensionons of the rectangular room. N : (3,) array_like or int, optional For all three spatial dimensions per dimension maximum order or list of orders. A scalar applies to all three dimensions. If no order is provided it is approximately determined. deltan : float, optional Absorption coefficient of the walls. c : float, optional Speed of sound. Returns ------- numpy.ndarray Sound pressure at positions given by *grid*. """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0) x, y, z = util.as_xyz_components(grid) if np.isscalar(N): N = N * np.ones(3, dtype=int) if N is None: N = [None, None, None] orders = [0, 0, 0] for i in range(3): if N[i] is None: # compute max order orders[i] = range(int(np.ceil(L[i]/np.pi * k) + 1)) elif np.isscalar(N[i]): # use given max order orders[i] = range(N[i] + 1) else: # use given orders orders[i] = N[i] kmp0 = [((kx + 1j * deltan)**2, np.cos(kx * x) * np.cos(kx * x0[0])) for kx in [m * np.pi / L[0] for m in orders[0]]] kmp1 = [((ky + 1j * deltan)**2, np.cos(ky * y) * np.cos(ky * x0[1])) for ky in [n * np.pi / L[1] for n in orders[1]]] kmp2 = [((kz + 1j * deltan)**2, np.cos(kz * z) * np.cos(kz * x0[2])) for kz in [l * np.pi / L[2] for l in orders[2]]] ksquared = k**2 p = 0 for (km0, p0), (km1, p1), (km2, p2) in itertools.product(kmp0, kmp1, kmp2): km = km0 + km1 + km2 p = p + 8 / (ksquared - km) * p0 * p1 * p2 return p def point_modal_velocity(omega, x0, n0, grid, L, N=None, deltan=0, c=None): """Velocity of point source in a rectangular room using a modal room model. Parameters ---------- omega : float Frequency of source. x0 : (3,) array_like Position of source. n0 : (3,) array_like Normal vector (direction) of source (only required for compatibility). grid : triple of array_like The grid that is used for the sound field calculations. See `sfs.util.xyz_grid()`. L : (3,) array_like Dimensionons of the rectangular room. N : (3,) array_like or int, optional Combination of modal orders in the three-spatial dimensions to calculate the sound field for or maximum order for all dimensions. If not given, the maximum modal order is approximately determined and the sound field is computed up to this maximum order. deltan : float, optional Absorption coefficient of the walls. c : float, optional Speed of sound. Returns ------- `XyzComponents` Particle velocity at positions given by *grid*. """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0) x, y, z = util.as_xyz_components(grid) if N is None: # determine maximum modal order per dimension Nx = int(np.ceil(L[0]/np.pi * k)) Ny = int(np.ceil(L[1]/np.pi * k)) Nz = int(np.ceil(L[2]/np.pi * k)) mm = range(Nx) nn = range(Ny) ll = range(Nz) elif np.isscalar(N): # compute up to a given order mm = range(N) nn = range(N) ll = range(N) else: # compute field for one order combination only mm = [N[0]] nn = [N[1]] ll = [N[2]] kmp0 = [((kx + 1j * deltan)**2, np.sin(kx * x) * np.cos(kx * x0[0])) for kx in [m * np.pi / L[0] for m in mm]] kmp1 = [((ky + 1j * deltan)**2, np.sin(ky * y) * np.cos(ky * x0[1])) for ky in [n * np.pi / L[1] for n in nn]] kmp2 = [((kz + 1j * deltan)**2, np.sin(kz * z) * np.cos(kz * x0[2])) for kz in [l * np.pi / L[2] for l in ll]] ksquared = k**2 vx = 0+0j vy = 0+0j vz = 0+0j for (km0, p0), (km1, p1), (km2, p2) in itertools.product(kmp0, kmp1, kmp2): km = km0 + km1 + km2 vx = vx - 8*1j / (ksquared - km) * p0 vy = vy - 8*1j / (ksquared - km) * p1 vz = vz - 8*1j / (ksquared - km) * p2 return util.XyzComponents([vx, vy, vz]) def point_image_sources(omega, x0, n0, grid, L, max_order, coeffs=None, c=None): """Point source in a rectangular room using the mirror image source model. Parameters ---------- omega : float Frequency of source. x0 : (3,) array_like Position of source. n0 : (3,) array_like Normal vector (direction) of source (only required for compatibility). grid : triple of array_like The grid that is used for the sound field calculations. See `sfs.util.xyz_grid()`. L : (3,) array_like Dimensions of the rectangular room. max_order : int Maximum number of reflections for each image source. coeffs : (6,) array_like, optional Reflection coeffecients of the walls. If not given, the reflection coefficients are set to one. c : float, optional Speed of sound. Returns ------- numpy.ndarray Sound pressure at positions given by *grid*. """ if coeffs is None: coeffs = np.ones(6) xs, order = util.image_sources_for_box(x0, L, max_order) source_strengths = np.prod(coeffs**order, axis=1) p = 0 for position, strength in zip(xs, source_strengths): if strength != 0: p += strength * point(omega, position, n0, grid, c) return p def line(omega, x0, n0, grid, c=None): """Line source parallel to the z-axis. Note: third component of x0 is ignored. Notes ----- :: (2) G(x-x0, w) = -j/4 H0 (w/c |x-x0|) Examples -------- .. plot:: :context: close-figs p = sfs.mono.source.line(omega, x0, None, grid) sfs.plot.soundfield(p, grid) plt.title("Line Source at {} m".format(x0[:2])) Normalization ... .. plot:: :context: close-figs sfs.plot.soundfield(p * normalization_line, grid, colorbar_kwargs=dict(label="p / Pa")) plt.title("Line Source at {} m (normalized)".format(x0[:2])) """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0)[:2] # ignore z-component grid = util.as_xyz_components(grid) r = np.linalg.norm(grid[:2] - x0) p = -1j/4 * _hankel2_0(k * r) return _duplicate_zdirection(p, grid) def line_velocity(omega, x0, n0, grid, c=None): """Velocity of line source parallel to the z-axis. Returns ------- `XyzComponents` Particle velocity at positions given by *grid*. Examples -------- The particle velocity can be plotted on top of the sound pressure: .. plot:: :context: close-figs v = sfs.mono.source.line_velocity(omega, x0, None, vgrid) sfs.plot.soundfield(p * normalization_line, grid) sfs.plot.vectors(v * normalization_line, vgrid) plt.title("Sound Pressure and Particle Velocity") """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0)[:2] # ignore z-component grid = util.as_xyz_components(grid) offset = grid[:2] - x0 r = np.linalg.norm(offset) v = -1/(4*defs.c*defs.rho0) * special.hankel2(1, k * r) v = [v * o / r for o in offset] assert v[0].shape == v[1].shape if len(grid) > 2: v.append(np.zeros_like(v[0])) return util.XyzComponents([_duplicate_zdirection(vi, grid) for vi in v]) def line_dipole(omega, x0, n0, grid, c=None): """Line source with dipole characteristics parallel to the z-axis. Note: third component of x0 is ignored. Notes ----- :: (2) G(x-x0, w) = jk/4 H1 (w/c |x-x0|) cos(phi) """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0)[:2] # ignore z-components n0 = util.asarray_1d(n0)[:2] grid = util.as_xyz_components(grid) dx = grid[:2] - x0 r = np.linalg.norm(dx) p = 1j*k/4 * special.hankel2(1, k * r) * np.inner(dx, n0) / r return _duplicate_zdirection(p, grid) def line_dirichlet_edge(omega, x0, grid, alpha=3/2*np.pi, Nc=None, c=None): """Line source scattered at an edge with Dirichlet boundary conditions. :cite:`Moser2012`, eq.(10.18/19) Parameters ---------- omega : float Angular frequency. x0 : (3,) array_like Position of line source. grid : triple of array_like The grid that is used for the sound field calculations. See `sfs.util.xyz_grid()`. alpha : float, optional Outer angle of edge. Nc : int, optional Number of elements for series expansion of driving function. Estimated if not given. c : float, optional Speed of sound Returns ------- numpy.ndarray Complex pressure at grid positions. """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0) phi_s = np.arctan2(x0[1], x0[0]) if phi_s < 0: phi_s = phi_s + 2*np.pi r_s = np.linalg.norm(x0) grid = util.XyzComponents(grid) r = np.linalg.norm(grid[:2]) phi = np.arctan2(grid[1], grid[0]) phi = np.where(phi < 0, phi+2*np.pi, phi) if Nc is None: Nc = np.ceil(2 * k * np.max(r) * alpha/np.pi) epsilon = np.ones(Nc) # weights for series expansion epsilon[0] = 2 p = np.zeros((grid[0].shape[1], grid[1].shape[0]), dtype=complex) idxr = (r <= r_s) idxa = (phi <= alpha) for m in np.arange(Nc): nu = m*np.pi/alpha f = 1/epsilon[m] * np.sin(nu*phi_s) * np.sin(nu*phi) p[idxr & idxa] = p[idxr & idxa] + f[idxr & idxa] * \ special.jn(nu, k*r[idxr & idxa]) * special.hankel2(nu, k*r_s) p[~idxr & idxa] = p[~idxr & idxa] + f[~idxr & idxa] * \ special.jn(nu, k*r_s) * special.hankel2(nu, k*r[~idxr & idxa]) p = p * -1j*np.pi/alpha pl = line(omega, x0, None, grid, c=c) p[~idxa] = pl[~idxa] return p def plane(omega, x0, n0, grid, c=None): """Plane wave. Notes ----- :: G(x, w) = e^(-i w/c n x) Examples -------- .. plot:: :context: close-figs direction = 45 # degree n0 = sfs.util.direction_vector(np.radians(direction)) p = sfs.mono.source.plane(omega, x0, n0, grid) sfs.plot.soundfield(p, grid, colorbar_kwargs=dict(label="p / Pa")) plt.title("Plane wave with direction {} degree".format(direction)) """ k = util.wavenumber(omega, c) x0 = util.asarray_1d(x0) n0 = util.normalize_vector(n0) grid = util.as_xyz_components(grid) return np.exp(-1j * k * np.inner(grid - x0, n0)) def plane_velocity(omega, x0, n0, grid, c=None): """Velocity of a plane wave. Notes ----- :: V(x, w) = 1/(rho c) e^(-i w/c n x) n Returns ------- `XyzComponents` Particle velocity at positions given by *grid*. Examples -------- The particle velocity can be plotted on top of the sound pressure: .. plot:: :context: close-figs v = sfs.mono.source.plane_velocity(omega, x0, n0, vgrid) sfs.plot.soundfield(p, grid) sfs.plot.vectors(v, vgrid) plt.title("Sound Pressure and Particle Velocity") """ v = plane(omega, x0, n0, grid, c=c) / (defs.rho0 * defs.c) return util.XyzComponents([v * n for n in n0]) def _duplicate_zdirection(p, grid): """If necessary, duplicate field in z-direction.""" gridshape = np.broadcast(*grid).shape if len(gridshape) > 2: return np.tile(p, [1, 1, gridshape[2]]) else: return p def _hankel2_0(x): """Wrapper for Hankel function of the second type using fast versions of the Bessel functions of first/second kind in scipy""" return special.j0(x)-1j*special.y0(x)
27.974271
79
0.559384
adff23053e45aaca10579c0b0de3a70d1d48c88d
1,646
py
Python
src/models/fft.py
charlesxjyang/DeepGeyser
59f54c67667800f091d7af1805c04bbc36c7624b
[ "Apache-2.0" ]
null
null
null
src/models/fft.py
charlesxjyang/DeepGeyser
59f54c67667800f091d7af1805c04bbc36c7624b
[ "Apache-2.0" ]
null
null
null
src/models/fft.py
charlesxjyang/DeepGeyser
59f54c67667800f091d7af1805c04bbc36c7624b
[ "Apache-2.0" ]
null
null
null
#misc import sys #data processing import numpy as np import pandas as pd from scipy.fftpack import rfft from scipy import optimize #plotting import matplotlib.pyplot as plt #home-made sys.path.append('../../utils') from preprocessing import temp_forecasting_shape_processing,test_train_split from error_reporting import error_reporting_regression,error_histogram,error_time_series,keras_training_loss_curve from helpers import save_model,load_tsv sys.path.append('../data_cleaning') from grand import process_grand,clean_grand def curve_func(x, a, b, c, d, e, f, g, h): return a * np.sin(b * x) + c * np.cos(d * x) + e * np.sin(f * x) + g * np.cos(h * x) def curve_func_2(x, a, b): return a * np.sin(b * x) def scipy_curve_fit(data,func): data = data.flatten() x_data = np.array(range(len(data))) y_data = data params, params_covariance = optimize.curve_fit(func, x_data, y_data, p0=[2, 2]) pred = func(data,params[0],params[1]).flatten() error_reporting_regression(data,pred) return params,pred def just_trying_fft(n=100): df = clean_grand() temp = df['temp'].values spectra = np.fft.rfft(temp,n=n) plt.plot(spectra) def fft_to_pred(theta,cn_vec): n = len(cn_vec) total = 0 for i in range(n): ea = np.exp(n*theta*np.array([0+1j])) total = cn_vec[i] *ea + total return total def fft_model(lookbacklength,lookforwardlength,test_split): df = clean_grand() X_train,X_test,y_train,y_test = process_grand(df,lookbacklength=lookbacklength,lookforwardlength=lookforwardlength,test_split=test_split)
32.27451
141
0.693196
67e538e42011db37d2919725f0d26babbf747145
205
py
Python
test123.py
andreroche/Test-Scripts
3d2b93900b8cd4e234fe909fc41ae0e4e2a43263
[ "Apache-2.0" ]
null
null
null
test123.py
andreroche/Test-Scripts
3d2b93900b8cd4e234fe909fc41ae0e4e2a43263
[ "Apache-2.0" ]
null
null
null
test123.py
andreroche/Test-Scripts
3d2b93900b8cd4e234fe909fc41ae0e4e2a43263
[ "Apache-2.0" ]
null
null
null
result = False x = 2520 while not True: x+=2520 for y in range(2,21): if x%y != 0: break print (result) else: print (result)
14.642857
27
0.404878
98cc60de4bad6988d47425e36293a46f0df95984
2,912
py
Python
infoblox_netmri/api/remote/models/scan_interface_remote.py
IngmarVG-IB/infoblox-netmri
b0c725fd64aee1890d83917d911b89236207e564
[ "Apache-2.0" ]
null
null
null
infoblox_netmri/api/remote/models/scan_interface_remote.py
IngmarVG-IB/infoblox-netmri
b0c725fd64aee1890d83917d911b89236207e564
[ "Apache-2.0" ]
null
null
null
infoblox_netmri/api/remote/models/scan_interface_remote.py
IngmarVG-IB/infoblox-netmri
b0c725fd64aee1890d83917d911b89236207e564
[ "Apache-2.0" ]
null
null
null
from ..remote import RemoteModel from infoblox_netmri.utils.utils import check_api_availability class ScanInterfaceRemote(RemoteModel): """ A NetMRI interface that can do discovery and other interaction with licensed devices | ``unit_id:`` The internal identifier for the collector on which the scan interface exists. | ``attribute type:`` number | ``virtual_network_id:`` The internal NetMRI identifier of the Virtual Network in which the scan interface is present. | ``attribute type:`` number | ``if_dev:`` The system device name of the scan interface. | ``attribute type:`` string | ``name:`` The name of the scan interface. | ``attribute type:`` string | ``physical_if_id:`` The scan interface identifier of the physical interface, if this is a sub-interface. | ``attribute type:`` string | ``encap_tag:`` The 802.1Q encapsulation tag of traffic to be forwarded from the physical interface to the scan interface. | ``attribute type:`` number | ``ipv4_address:`` The IP address of the scan interface in dotted format. | ``attribute type:`` string | ``ipv4_mask:`` The network mask of the scan interface in dotted format. | ``attribute type:`` string | ``ipv4_gateway:`` The gateway of the scan interface in dotted format. | ``attribute type:`` string | ``ipv6_address:`` The IPv6 address of the scan interface in colon-delimited format. | ``attribute type:`` string | ``ipv6_prefix:`` The IPv6 mask of the scan interface. | ``attribute type:`` string | ``ipv6_gateway:`` The gateway of the scan interface in colon-delimited format IPv6. | ``attribute type:`` string | ``primary_dns_server:`` The IP address of the scan interface primary dns server in dotted format. | ``attribute type:`` string | ``secondary_dns_server:`` The IP address of the scan interface secondary dns server in dotted format. | ``attribute type:`` string | ``id:`` The internal NetMRI identifier of the Scan Interface. | ``attribute type:`` number | ``search_domains:`` Search domains for DNS resolving. | ``attribute type:`` string """ properties = ("unit_id", "virtual_network_id", "if_dev", "name", "physical_if_id", "encap_tag", "ipv4_address", "ipv4_mask", "ipv4_gateway", "ipv6_address", "ipv6_prefix", "ipv6_gateway", "primary_dns_server", "secondary_dns_server", "id", "search_domains", )
30.978723
128
0.580701
2f5caa259e269f889ae53cf284cd9d0abcd33507
19,572
py
Python
cobra/utils.py
sherppard/cobra
5e2b9bf7418490a901d5d7cdc48f622717655f39
[ "MIT" ]
1
2018-06-12T11:20:55.000Z
2018-06-12T11:20:55.000Z
cobra/utils.py
PCanyi/cobra
0a80aa81a340c9d0f6ca68ef36980c5348cb5396
[ "MIT" ]
null
null
null
cobra/utils.py
PCanyi/cobra
0a80aa81a340c9d0f6ca68ef36980c5348cb5396
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ utils ~~~~~ Implements utils :author: Feei <feei@feei.cn> :homepage: https://github.com/WhaleShark-Team/cobra :license: MIT, see LICENSE for more details. :copyright: Copyright (c) 2018 Feei. All rights reserved """ import shutil import hashlib import json import base64 import os import random import re import string import sys import time import urllib import requests import json import pipes from .log import logger from .config import Config, issue_history_path from .__version__ import __version__, __python_version__, __platform__, __url__ from .exceptions import PickupException, NotExistException, AuthFailedException from .pickup import Git, NotExistError, AuthError, Decompress from .const import access_token TARGET_MODE_GIT = 'git' TARGET_MODE_FILE = 'file' TARGET_MODE_FOLDER = 'folder' TARGET_MODE_COMPRESS = 'compress' OUTPUT_MODE_MAIL = 'mail' OUTPUT_MODE_API = 'api' OUTPUT_MODE_FILE = 'file' OUTPUT_MODE_STREAM = 'stream' PY2 = sys.version_info[0] == 2 class ParseArgs(object): def __init__(self, target, formatter, output, special_rules=None, a_sid=None): self.target = target self.formatter = formatter self.output = output if special_rules is not None and special_rules is not '': self.special_rules = [] extension = '.xml' if ',' in special_rules: # check rule name s_rules = special_rules.split(',') for sr in s_rules: if self._check_rule_name(sr): if extension not in sr: sr += extension self.special_rules.append(sr) else: logger.critical('[PARSE-ARGS] Exception rule name: {sr}'.format(sr=sr)) else: if self._check_rule_name(special_rules): if extension not in special_rules: special_rules += extension self.special_rules = [special_rules] else: logger.critical( '[PARSE-ARGS] Exception special rule name(e.g: CVI-110001): {sr}'.format(sr=special_rules)) else: self.special_rules = None self.sid = a_sid @staticmethod def _check_rule_name(name): return re.match(r'^(cvi|CVI)-\d{6}(\.xml)?', name.strip()) is not None @property def target_mode(self): """ Parse target mode (git/file/folder/compress) :return: str """ target_mode = None target_git_cases = ['http://', 'https://', 'ssh://'] for tgc in target_git_cases: if self.target[0:len(tgc)] == tgc: target_mode = TARGET_MODE_GIT if os.path.isfile(self.target): target_mode = TARGET_MODE_FILE try: if self.target.split('.')[-1] in Config('upload', 'extensions').value.split('|'): target_mode = TARGET_MODE_COMPRESS except AttributeError as e: logger.critical('Please config the config file copy from the config.template file') if os.path.isdir(self.target): target_mode = TARGET_MODE_FOLDER if target_mode is None: logger.critical('[PARSE-ARGS] [-t <target>] can\'t empty!') exit() logger.debug('[PARSE-ARGS] Target Mode: {mode}'.format(mode=target_mode)) return target_mode @property def output_mode(self): """ Parse output mode (api/mail/file/stream) :return: str """ output_mode = None output_mode_api = ['http', 'https'] output_mode_mail = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)" if re.match(output_mode_mail, self.output) is not None: output_mode = OUTPUT_MODE_MAIL for oma in output_mode_api: if self.output[0:len(oma)] == oma: output_mode = OUTPUT_MODE_API if os.path.isdir(os.path.dirname(self.output)): output_mode = OUTPUT_MODE_FILE if output_mode is None: output_mode = OUTPUT_MODE_STREAM logger.debug('[PARSE-ARGS] Output Mode: {mode}'.format(mode=output_mode)) return output_mode def target_directory(self, target_mode): reg = '^((ht|f)tps?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?$' target_directory = None if target_mode == TARGET_MODE_GIT: logger.debug('GIT Project') # branch or tag split_target = self.target.split(':') if len(split_target) == 3: target, branch = '{p}:{u}'.format(p=split_target[0], u=split_target[1]), split_target[-1] if re.match(reg, target) is None: logger.critical('Please enter a valid URL') exit() branch = pipes.quote(branch) elif len(split_target) == 2: target, branch = self.target, 'master' if re.match(reg, target) is None: logger.critical('Please enter a valid URL') exit() branch = pipes.quote(branch) else: logger.critical('Target url exception: {u}'.format(u=self.target)) if 'gitlab' in target: username = Config('git', 'username').value password = Config('git', 'password').value else: username = None password = None gg = Git(repo_address=target, branch=branch, username=username, password=password) # Git Clone Error try: clone_ret, clone_err = gg.clone() if clone_ret is False: raise PickupException('Clone Failed ({0})'.format(clone_err), gg) except NotExistError: raise NotExistException(4001, 'Repository or Branch Does not exist!', gg) except AuthError: raise AuthFailedException('Git Authentication Failed') target_directory = gg.repo_directory elif target_mode == TARGET_MODE_COMPRESS: ret, target_directory = Decompress(self.target).decompress() elif target_mode == TARGET_MODE_FOLDER: target_directory = self.target elif target_mode == TARGET_MODE_FILE: target_directory = self.target else: logger.critical('[PARSE-ARGS] exception target mode ({mode})'.format(mode=target_mode)) exit() logger.debug('[PARSE-ARGS] target directory: {directory}'.format(directory=target_directory)) target_directory = os.path.abspath(target_directory) if target_directory[-1] == '/': return target_directory else: return u'{t}/'.format(t=target_directory) def to_bool(value): """Converts 'something' to boolean. Raises exception for invalid formats""" if str(value).lower() in ("on", "yes", "y", "true", "t", "1"): return True if str(value).lower() in ("off", "no", "n", "false", "f", "0", "0.0", "", "none", "[]", "{}"): return False raise Exception('Invalid value for boolean conversion: ' + str(value)) def convert_time(seconds): """ Seconds to minute/second Ex: 61 -> 1'1" :param seconds: :return: :link: https://en.wikipedia.org/wiki/Prime_(symbol) """ one_minute = 60 minute = seconds / one_minute if minute == 0: return str(seconds % one_minute) + "\"" else: return str(int(minute)) + "'" + str(seconds % one_minute) + "\"" def convert_number(n): """ Convert number to , split Ex: 123456 -> 123,456 :param n: :return: """ if n is None: return '0' n = str(n) if '.' in n: dollars, cents = n.split('.') else: dollars, cents = n, None r = [] for i, c in enumerate(str(dollars)[::-1]): if i and (not (i % 3)): r.insert(0, ',') r.insert(0, c) out = ''.join(r) if cents: out += '.' + cents return out def md5(content): """ MD5 Hash :param content: :return: """ content = content.encode('utf8') return hashlib.md5(content).hexdigest() def allowed_file(filename): """ Allowed upload file Config Path: ./config [upload] :param filename: :return: """ config_extension = Config('upload', 'extensions').value if config_extension == '': logger.critical('Please set config file upload->directory') sys.exit(0) allowed_extensions = config_extension.split('|') return '.' in filename and filename.rsplit('.', 1)[1] in allowed_extensions def path_to_short(path, max_length=36): """ /impl/src/main/java/com/mogujie/service/mgs/digitalcert/utils/CertUtil.java /impl/src/.../utils/CertUtil.java :param path: :param max_length: :return: """ if len(path) < max_length: return path paths = path.split('/') paths = filter(None, paths) paths = list(paths) tmp_path = '' for i in range(0, len(paths)): logger.debug((i, str(paths[i]), str(paths[len(paths) - i - 1]))) tmp_path = tmp_path + str(paths[i]) + '/' + str(paths[len(paths) - i - 1]) if len(tmp_path) > max_length: tmp_path = '' for j in range(0, i): tmp_path = tmp_path + '/' + str(paths[j]) tmp_path += '/...' for k in range(i, 0, -1): tmp_path = tmp_path + '/' + str(paths[len(paths) - k]) if tmp_path == '/...': return '.../{0}'.format(paths[len(paths) - 1]) elif tmp_path[0] == '/': return tmp_path[1:] else: return tmp_path def path_to_file(path): """ Path to file /impl/src/main/java/com/mogujie/service/mgs/digitalcert/utils/CertUtil.java .../CertUtil.java :param path: :return: """ paths = path.split('/') paths = list(filter(None, paths)) length = len(paths) return '.../{0}'.format(paths[length - 1]) def percent(part, whole, need_per=True): """ Percent :param part: :param whole: :param need_per: :return: """ if need_per: per = '%' else: per = '' if part == 0 and whole == 0: return 0 return '{0}{1}'.format(100 * float(part) / float(whole), per) def timestamp(): """Get timestamp""" return int(time.time()) def format_gmt(time_gmt, time_format=None): """ Format GMT time Ex: Wed, 14 Sep 2016 17:57:41 GMT to 2016-09-14 17:57:41 :param time_gmt: :param time_format: :return: """ if time_format is None: time_format = '%Y-%m-%d %X' t = time.strptime(time_gmt, "%a, %d %b %Y %H:%M:%S GMT") return time.strftime(time_format, t) def random_generator(size=6, chars=string.ascii_uppercase + string.digits): return ''.join(random.choice(chars) for _ in range(size)) def is_list(value): """ Returns True if the given value is a list-like instance >>> is_list([1, 2, 3]) True >>> is_list(u'2') False """ return isinstance(value, (list, tuple, set)) def get_unicode(value, encoding=None, none_to_null=False): """ Return the unicode representation of the supplied value: >>> get_unicode(u'test') u'test' >>> get_unicode('test') u'test' >>> get_unicode(1) u'1' """ if none_to_null and value is None: return None if str(type(value)) == "<class 'bytes'>": value = value.encode('utf8') return value elif str(type(value)) == "<type 'unicode'>": return value elif is_list(value): value = list(get_unicode(_, encoding, none_to_null) for _ in value) return value else: try: return value.encode('utf8') except UnicodeDecodeError: return value.encode('utf8', errors="ignore") def get_safe_ex_string(ex, encoding=None): """ Safe way how to get the proper exception represtation as a string (Note: errors to be avoided: 1) "%s" % Exception(u'\u0161') and 2) "%s" % str(Exception(u'\u0161')) >>> get_safe_ex_string(Exception('foobar')) u'foobar' """ ret = ex if getattr(ex, "message", None): ret = ex.message elif getattr(ex, "msg", None): ret = ex.msg return get_unicode(ret or "", encoding=encoding).strip() class Tool: def __init__(self): # `grep` (`ggrep` on Mac) if os.path.isfile('/bin/grep'): self.grep = '/bin/grep' elif os.path.isfile('/usr/bin/grep'): self.grep = '/usr/bin/grep' elif os.path.isfile('/usr/local/bin/grep'): self.grep = '/usr/local/bin/grep' else: self.grep = 'grep' # `find` (`gfind` on Mac) if os.path.isfile('/bin/find'): self.find = '/bin/find' elif os.path.isfile('/usr/bin/find'): self.find = '/usr/bin/find' elif os.path.isfile('/usr/local/bin/find'): self.find = '/usr/local/bin/find' else: self.find = 'find' if 'darwin' == sys.platform: ggrep = '' gfind = '' for root, dir_names, file_names in os.walk('/usr/local/Cellar/grep'): for filename in file_names: if 'ggrep' == filename or 'grep' == filename: ggrep = os.path.join(root, filename) for root, dir_names, file_names in os.walk('/usr/local/Cellar/findutils'): for filename in file_names: if 'gfind' == filename: gfind = os.path.join(root, filename) if ggrep == '': logger.critical("brew install grep pleases!") sys.exit(0) else: self.grep = ggrep if gfind == '': logger.critical("brew install findutils pleases!") sys.exit(0) else: self.find = gfind def secure_filename(filename): _filename_utf8_strip_re = re.compile(u"[^\u4e00-\u9fa5A-Za-z0-9_.\-\+]") _windows_device_files = ('CON', 'AUX', 'COM1', 'COM2', 'COM3', 'COM4', 'LPT1', 'LPT2', 'LPT3', 'PRN', 'NUL') try: text_type = unicode # Python 2 except NameError: text_type = str # Python 3 if isinstance(filename, text_type): from unicodedata import normalize filename = normalize('NFKD', filename).encode('utf-8', 'ignore') if not PY2: filename = filename.decode('utf-8') if filename in (os.path.sep, os.path.altsep, os.path.pardir): return "" if PY2: filename = filename.decode('utf-8') filename = _filename_utf8_strip_re.sub('', '_'.join(filename.split())) # on nt a couple of special files are present in each folder. We # have to ensure that the target file is not such a filename. In # this case we prepend an underline if os.name == 'nt' and filename and filename.split('.')[0].upper() in _windows_device_files: filename = '_' + filename return filename def split_branch(target_str): split_target = target_str.split(':') if len(split_target) == 3: target, branch = '{p}:{u}'.format(p=split_target[0], u=split_target[1]), split_target[-1] elif len(split_target) == 2: target, branch = target_str, 'master' else: target, branch = target_str, 'master' return target, branch def unhandled_exception_unicode_message(root, dirs, filenames): err_msg = unhandled_exception_message() dirs = ','.join(dirs) filenames = ','.join(filenames) err_msg_unicode = err_msg + """\nRoot path: {rp}\nDirs: {di}\nFilenames: {fn}""".format( rp=root, di=dirs, fn=filenames ) return err_msg_unicode def unhandled_exception_message(): """ Returns detailed message about occurred unhandled exception """ err_msg = """Cobra version: {cv}\nPython version: {pv}\nOperating system: {os}\nCommand line: {cl}""".format( cv=__version__, pv=__python_version__, os=__platform__, cl=re.sub(r".+?\bcobra.py\b", "cobra.py", " ".join(sys.argv).encode('utf-8')) ) return err_msg def create_github_issue(err_msg, exc_msg): """ Automatically create a Github issue with unhandled exception information """ issues = [] try: with open(issue_history_path, 'r') as f: for line in f.readlines(): issues.append(line.strip()) except: pass finally: # unique issues = set(issues) _ = re.sub(r"'[^']+'", "''", exc_msg) _ = re.sub(r"\s+line \d+", "", _) _ = re.sub(r'File ".+?/(\w+\.py)', "\g<1>", _) _ = re.sub(r".+\Z", "", _) key = hashlib.md5(_).hexdigest()[:8] if key in issues: logger.warning('issue already reported!') return ex = None try: url = "https://api.github.com/search/issues?q={q}".format(q=urllib.quote("repo:WhaleShark-Team/cobra [AUTO] Unhandled exception (#{k})".format(k=key))) logger.debug(url) resp = requests.get(url=url) content = resp.json() _ = content duplicate = _["total_count"] > 0 closed = duplicate and _["items"][0]["state"] == "closed" if duplicate: warn_msg = "issue seems to be already reported" if closed: warn_msg += " and resolved. Please update to the latest version from official GitHub repository at '{u}'".format(u=__url__) logger.warning(warn_msg) return except: logger.warning('search github issue failed') pass try: url = "https://api.github.com/repos/WhaleShark-Team/cobra/issues" data = { "title": "[AUTO] Unhandled exception (#{k})".format(k=key), "body": "## Environment\n```\n{err}\n```\n## Traceback\n```\n{exc}\n```\n".format(err=err_msg, exc=exc_msg) } headers = {"Authorization": "token {t}".format(t=base64.b64decode(access_token))} resp = requests.post(url=url, data=json.dumps(data), headers=headers) content = resp.text except Exception as ex: content = None issue_url = re.search(r"https://github.com/WhaleShark-Team/cobra/issues/\d+", content or "") if issue_url: info_msg = "created Github issue can been found at the address '{u}'".format(u=issue_url.group(0)) logger.info(info_msg) try: with open(issue_history_path, "a+b") as f: f.write("{k}\n".format(k=key)) except: pass else: warn_msg = "something went wrong while creating a Github issue" if ex: warn_msg += " ('{m}')".format(m=get_safe_ex_string(ex)) if "Unauthorized" in warn_msg: warn_msg += ". Please update to the latest revision" logger.warning(warn_msg) def clean_dir(filepath): if os.path.isdir(filepath): if os.path.isfile(filepath): try: os.remove(filepath) except OSError: logger.warning('[RM] remove {} fail'.format(filepath)) elif os.path.isdir(filepath): shutil.rmtree(filepath, True) return True
32.137931
159
0.566166
9d703529daec585e5994a10a2f7270992957741f
1,027
py
Python
config/cifar100_200.py
XuZhengzhuo/Prior-LT
60720b519f4f4b56316e589702b58fa1374059d7
[ "MIT" ]
9
2021-11-17T09:21:20.000Z
2022-02-23T03:40:31.000Z
config/cifar100_200.py
XuZhengzhuo/Prior-LT
60720b519f4f4b56316e589702b58fa1374059d7
[ "MIT" ]
1
2021-12-21T07:58:23.000Z
2021-12-21T08:06:55.000Z
config/cifar100_200.py
XuZhengzhuo/Prior-LT
60720b519f4f4b56316e589702b58fa1374059d7
[ "MIT" ]
1
2022-01-04T07:58:42.000Z
2022-01-04T07:58:42.000Z
# model arch = 'resnet32' # dataset dataset = 'cifar100' # or 'cifar10' imb_type = 'exp' # or 'step' num_classes = int(dataset[5:]) imb_factor = 0.005 train_cls_num_list = None inf_label_distribution = None if dataset == 'cifar10': h_class_idx = [0, 3] m_class_idx = [3, 7] t_class_idx = [7, 10] else: h_class_idx = [0, 33] m_class_idx = [33, 66] t_class_idx = [66, 100] # load setting workers = 4 seed = 0 rand_number = 0 # gpu gpu = 0 # train setting epochs = 200 batch_size = 64 # will double if mix lr = 0.1 start_epoch = 0 momentum = 0.9 weight_decay = 2e-4 # mixup manners mix_type = 'unimix' mix_stop_epoch = 200 # alp=1. and tau=0. equals to origin mixup unimix_alp = 0.8 unimix_tau = -0.1 # loss loss_type = 'Bayias' # or 'CE' # checkpoint resume = '' # relative path to ckpt save_ckpt_epoch = mix_stop_epoch # save ckpt for finetune # debug info cfg_name = 'Final' # the main store path debug = False # mkdir or not note = f'bs_64_alp_0.8_tau_0.1' # for better visualization
18.672727
59
0.673807
84d5c977ff393ab701f9a0125335606377675532
531,138
py
Python
template_container_macaque/labels/slice_53.py
lkondratova/Brainplot
3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d
[ "MIT" ]
null
null
null
template_container_macaque/labels/slice_53.py
lkondratova/Brainplot
3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d
[ "MIT" ]
null
null
null
template_container_macaque/labels/slice_53.py
lkondratova/Brainplot
3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d
[ "MIT" ]
null
null
null
coordinates_00EBFF = ((46, 187), (46, 189), (47, 186), (47, 191), (48, 184), (48, 187), (48, 188), (48, 189), (48, 192), (49, 183), (49, 186), (49, 187), (49, 188), (49, 189), (49, 190), (49, 191), (49, 193), (50, 181), (50, 184), (50, 185), (50, 186), (50, 187), (50, 188), (50, 189), (50, 190), (50, 191), (50, 192), (50, 194), (51, 180), (51, 183), (51, 184), (51, 185), (51, 186), (51, 187), (51, 188), (51, 189), (51, 190), (51, 191), (51, 192), (51, 194), (52, 178), (52, 181), (52, 182), (52, 183), (52, 184), (52, 185), (52, 186), (52, 187), (52, 188), (52, 189), (52, 190), (52, 191), (52, 192), (52, 194), (53, 176), (53, 180), (53, 181), (53, 182), (53, 183), (53, 184), (53, 185), (53, 186), (53, 187), (53, 188), (53, 189), (53, 190), (53, 191), (53, 193), (54, 174), (54, 178), (54, 179), (54, 180), (54, 181), (54, 182), (54, 183), (54, 184), (54, 185), (54, 186), (54, 187), (54, 188), (54, 189), (54, 190), (54, 192), (55, 172), (55, 176), (55, 177), (55, 178), (55, 179), (55, 180), (55, 181), (55, 182), (55, 183), (55, 184), (55, 185), (55, 186), (55, 187), (55, 188), (55, 189), (55, 191), (56, 170), (56, 174), (56, 175), (56, 176), (56, 177), (56, 178), (56, 179), (56, 180), (56, 181), (56, 182), (56, 183), (56, 184), (56, 185), (56, 186), (56, 187), (56, 188), (56, 190), (57, 168), (57, 172), (57, 173), (57, 174), (57, 175), (57, 176), (57, 177), (57, 178), (57, 179), (57, 180), (57, 181), (57, 182), (57, 183), (57, 184), (57, 185), (57, 186), (57, 187), (57, 190), (58, 166), (58, 170), (58, 171), (58, 172), (58, 173), (58, 174), (58, 175), (58, 176), (58, 177), (58, 178), (58, 179), (58, 180), (58, 181), (58, 182), (58, 183), (58, 189), (59, 163), (59, 164), (59, 168), (59, 169), (59, 170), (59, 171), (59, 172), (59, 173), (59, 174), (59, 175), (59, 176), (59, 177), (59, 178), (59, 179), (59, 180), (59, 184), (59, 185), (59, 186), (59, 187), (59, 189), (60, 161), (60, 162), (60, 165), (60, 166), (60, 167), (60, 168), (60, 169), (60, 170), (60, 171), (60, 172), (60, 173), (60, 174), (60, 175), (60, 176), (60, 177), (60, 178), (60, 181), (60, 182), (61, 159), (61, 163), (61, 164), (61, 165), (61, 166), (61, 167), (61, 168), (61, 169), (61, 170), (61, 171), (61, 172), (61, 173), (61, 174), (61, 175), (61, 176), (61, 180), (62, 157), (62, 161), (62, 162), (62, 163), (62, 164), (62, 165), (62, 166), (62, 167), (62, 168), (62, 169), (62, 170), (62, 171), (62, 172), (62, 173), (62, 174), (62, 175), (62, 178), (63, 156), (63, 159), (63, 160), (63, 161), (63, 162), (63, 163), (63, 164), (63, 165), (63, 166), (63, 167), (63, 168), (63, 169), (63, 170), (63, 171), (63, 172), (63, 173), (63, 174), (64, 155), (64, 157), (64, 158), (64, 159), (64, 160), (64, 161), (64, 162), (64, 163), (64, 164), (64, 165), (64, 166), (64, 167), (64, 168), (64, 169), (64, 170), (64, 171), (64, 172), (64, 173), (64, 175), (65, 154), (65, 156), (65, 157), (65, 158), (65, 159), (65, 160), (65, 161), (65, 162), (65, 163), (65, 164), (65, 165), (65, 166), (65, 167), (65, 168), (65, 169), (65, 170), (65, 171), (65, 172), (65, 174), (66, 153), (66, 155), (66, 156), (66, 157), (66, 158), (66, 159), (66, 160), (66, 161), (66, 162), (66, 163), (66, 164), (66, 165), (66, 166), (66, 167), (66, 168), (66, 169), (66, 170), (66, 171), (66, 173), (67, 152), (67, 154), (67, 155), (67, 156), (67, 157), (67, 158), (67, 159), (67, 160), (67, 161), (67, 162), (67, 163), (67, 164), (67, 165), (67, 166), (67, 167), (67, 168), (67, 169), (67, 170), (67, 172), (68, 151), (68, 153), (68, 154), (68, 155), (68, 156), (68, 157), (68, 158), (68, 159), (68, 160), (68, 161), (68, 162), (68, 163), (68, 164), (68, 165), (68, 166), (68, 167), (68, 168), (68, 169), (68, 171), (69, 151), (69, 152), (69, 153), (69, 154), (69, 155), (69, 156), (69, 157), (69, 158), (69, 159), (69, 160), (69, 161), (69, 162), (69, 163), (69, 164), (69, 165), (69, 166), (69, 167), (69, 168), (69, 170), (70, 152), (70, 154), (70, 155), (70, 156), (70, 157), (70, 158), (70, 159), (70, 160), (70, 161), (70, 162), (70, 163), (70, 164), (70, 165), (70, 166), (70, 167), (70, 168), (70, 170), (70, 239), (71, 152), (71, 154), (71, 155), (71, 156), (71, 157), (71, 158), (71, 159), (71, 160), (71, 161), (71, 162), (71, 163), (71, 164), (71, 165), (71, 166), (71, 167), (71, 169), (71, 239), (71, 240), (72, 153), (72, 155), (72, 156), (72, 157), (72, 158), (72, 159), (72, 160), (72, 161), (72, 162), (72, 163), (72, 164), (72, 165), (72, 166), (72, 168), (72, 239), (72, 241), (73, 153), (73, 155), (73, 156), (73, 157), (73, 158), (73, 159), (73, 160), (73, 161), (73, 162), (73, 163), (73, 164), (73, 165), (73, 166), (73, 168), (73, 240), (73, 242), (74, 154), (74, 156), (74, 157), (74, 158), (74, 159), (74, 160), (74, 161), (74, 162), (74, 163), (74, 164), (74, 165), (74, 167), (74, 240), (74, 243), (75, 154), (75, 156), (75, 157), (75, 158), (75, 159), (75, 160), (75, 161), (75, 162), (75, 163), (75, 164), (75, 165), (75, 167), (75, 241), (75, 245), (76, 154), (76, 156), (76, 157), (76, 158), (76, 159), (76, 160), (76, 161), (76, 162), (76, 163), (76, 164), (76, 166), (76, 241), (76, 243), (76, 247), (77, 155), (77, 157), (77, 158), (77, 159), (77, 160), (77, 161), (77, 162), (77, 163), (77, 164), (77, 166), (77, 242), (77, 244), (77, 245), (77, 248), (77, 249), (77, 251), (78, 155), (78, 157), (78, 158), (78, 159), (78, 160), (78, 161), (78, 162), (78, 163), (78, 164), (78, 166), (78, 243), (78, 245), (78, 246), (78, 247), (78, 251), (79, 156), (79, 158), (79, 159), (79, 160), (79, 161), (79, 162), (79, 163), (79, 164), (79, 166), (79, 244), (79, 246), (79, 247), (79, 248), (79, 249), (79, 250), (79, 252), (80, 156), (80, 158), (80, 159), (80, 160), (80, 161), (80, 162), (80, 163), (80, 164), (80, 166), (80, 245), (80, 247), (80, 248), (80, 249), (80, 250), (80, 251), (80, 253), (81, 156), (81, 158), (81, 159), (81, 160), (81, 161), (81, 162), (81, 163), (81, 164), (81, 166), (81, 246), (81, 248), (81, 249), (81, 250), (81, 251), (81, 252), (81, 255), (82, 157), (82, 159), (82, 160), (82, 161), (82, 162), (82, 163), (82, 164), (82, 166), (82, 247), (82, 249), (82, 250), (82, 251), (82, 252), (82, 253), (82, 256), (82, 257), (83, 157), (83, 159), (83, 160), (83, 161), (83, 162), (83, 163), (83, 164), (83, 166), (83, 248), (83, 250), (83, 251), (83, 252), (83, 253), (83, 254), (83, 255), (83, 258), (83, 259), (83, 260), (84, 157), (84, 159), (84, 160), (84, 161), (84, 162), (84, 163), (84, 164), (84, 165), (84, 167), (84, 249), (84, 251), (84, 252), (84, 253), (84, 254), (84, 255), (84, 256), (84, 257), (84, 262), (84, 263), (85, 157), (85, 159), (85, 160), (85, 161), (85, 162), (85, 163), (85, 164), (85, 165), (85, 167), (85, 250), (85, 252), (85, 253), (85, 254), (85, 255), (85, 256), (85, 257), (85, 258), (85, 259), (85, 260), (85, 261), (85, 265), (86, 157), (86, 159), (86, 160), (86, 161), (86, 162), (86, 163), (86, 164), (86, 165), (86, 167), (86, 251), (86, 253), (86, 254), (86, 255), (86, 256), (86, 257), (86, 258), (86, 259), (86, 260), (86, 261), (86, 262), (86, 263), (86, 264), (86, 267), (87, 157), (87, 159), (87, 160), (87, 161), (87, 162), (87, 163), (87, 164), (87, 165), (87, 166), (87, 168), (87, 252), (87, 254), (87, 255), (87, 256), (87, 257), (87, 258), (87, 259), (87, 260), (87, 261), (87, 262), (87, 263), (87, 264), (87, 265), (87, 268), (88, 158), (88, 160), (88, 161), (88, 162), (88, 163), (88, 164), (88, 165), (88, 166), (88, 167), (88, 169), (88, 253), (88, 255), (88, 256), (88, 257), (88, 258), (88, 259), (88, 260), (88, 261), (88, 262), (88, 263), (88, 264), (88, 265), (88, 266), (88, 267), (88, 270), (89, 158), (89, 160), (89, 161), (89, 162), (89, 163), (89, 164), (89, 165), (89, 166), (89, 167), (89, 168), (89, 170), (89, 253), (89, 256), (89, 257), (89, 258), (89, 259), (89, 260), (89, 261), (89, 262), (89, 263), (89, 264), (89, 265), (89, 266), (89, 267), (89, 268), (89, 271), (90, 158), (90, 160), (90, 161), (90, 162), (90, 163), (90, 164), (90, 165), (90, 166), (90, 167), (90, 168), (90, 169), (90, 171), (90, 254), (90, 256), (90, 257), (90, 258), (90, 259), (90, 260), (90, 261), (90, 262), (90, 263), (90, 264), (90, 265), (90, 266), (90, 267), (90, 268), (90, 269), (90, 270), (90, 273), (91, 159), (91, 161), (91, 162), (91, 163), (91, 164), (91, 165), (91, 166), (91, 167), (91, 168), (91, 169), (91, 170), (91, 172), (91, 174), (91, 255), (91, 258), (91, 259), (91, 260), (91, 261), (91, 262), (91, 263), (91, 264), (91, 265), (91, 266), (91, 267), (91, 268), (91, 269), (91, 270), (91, 271), (91, 274), (92, 159), (92, 161), (92, 162), (92, 163), (92, 164), (92, 165), (92, 166), (92, 167), (92, 168), (92, 169), (92, 170), (92, 171), (92, 174), (92, 256), (92, 259), (92, 260), (92, 261), (92, 262), (92, 263), (92, 264), (92, 265), (92, 266), (92, 267), (92, 268), (92, 269), (92, 270), (92, 271), (92, 272), (92, 273), (92, 275), (93, 159), (93, 161), (93, 162), (93, 163), (93, 164), (93, 165), (93, 166), (93, 167), (93, 168), (93, 169), (93, 170), (93, 171), (93, 172), (93, 175), (93, 258), (93, 260), (93, 261), (93, 262), (93, 263), (93, 264), (93, 265), (93, 266), (93, 267), (93, 268), (93, 269), (93, 270), (93, 271), (93, 272), (93, 273), (93, 274), (93, 276), (94, 159), (94, 161), (94, 162), (94, 163), (94, 164), (94, 165), (94, 166), (94, 167), (94, 168), (94, 169), (94, 170), (94, 171), (94, 172), (94, 173), (94, 174), (94, 176), (94, 259), (94, 261), (94, 262), (94, 263), (94, 264), (94, 265), (94, 266), (94, 267), (94, 268), (94, 269), (94, 270), (94, 271), (94, 272), (94, 273), (94, 274), (94, 275), (94, 277), (95, 159), (95, 161), (95, 162), (95, 163), (95, 164), (95, 165), (95, 166), (95, 167), (95, 168), (95, 169), (95, 170), (95, 171), (95, 172), (95, 173), (95, 174), (95, 177), (95, 178), (95, 260), (95, 262), (95, 263), (95, 264), (95, 265), (95, 266), (95, 267), (95, 268), (95, 269), (95, 270), (95, 271), (95, 272), (95, 273), (95, 274), (95, 275), (95, 276), (95, 278), (96, 159), (96, 161), (96, 162), (96, 163), (96, 164), (96, 165), (96, 166), (96, 167), (96, 168), (96, 169), (96, 170), (96, 171), (96, 172), (96, 173), (96, 174), (96, 175), (96, 176), (96, 179), (96, 180), (96, 181), (96, 182), (96, 183), (96, 184), (96, 185), (96, 186), (96, 187), (96, 188), (96, 189), (96, 190), (96, 191), (96, 192), (96, 193), (96, 194), (96, 262), (96, 263), (96, 264), (96, 265), (96, 266), (96, 267), (96, 268), (96, 269), (96, 270), (96, 271), (96, 272), (96, 273), (96, 274), (96, 275), (96, 276), (96, 277), (96, 279), (97, 159), (97, 161), (97, 162), (97, 163), (97, 164), (97, 165), (97, 166), (97, 167), (97, 168), (97, 169), (97, 170), (97, 171), (97, 172), (97, 173), (97, 174), (97, 175), (97, 176), (97, 177), (97, 178), (97, 196), (97, 261), (97, 263), (97, 264), (97, 265), (97, 266), (97, 267), (97, 268), (97, 269), (97, 270), (97, 271), (97, 272), (97, 273), (97, 274), (97, 275), (97, 276), (97, 277), (97, 278), (97, 280), (98, 159), (98, 161), (98, 162), (98, 163), (98, 164), (98, 165), (98, 166), (98, 167), (98, 168), (98, 169), (98, 170), (98, 171), (98, 172), (98, 173), (98, 174), (98, 175), (98, 176), (98, 177), (98, 178), (98, 179), (98, 180), (98, 181), (98, 182), (98, 183), (98, 184), (98, 185), (98, 186), (98, 187), (98, 188), (98, 189), (98, 190), (98, 191), (98, 192), (98, 193), (98, 194), (98, 198), (98, 199), (98, 262), (98, 264), (98, 265), (98, 266), (98, 267), (98, 268), (98, 269), (98, 270), (98, 271), (98, 272), (98, 273), (98, 274), (98, 275), (98, 276), (98, 277), (98, 278), (98, 279), (98, 281), (99, 158), (99, 159), (99, 160), (99, 161), (99, 162), (99, 163), (99, 164), (99, 165), (99, 166), (99, 167), (99, 168), (99, 169), (99, 170), (99, 171), (99, 172), (99, 173), (99, 174), (99, 175), (99, 176), (99, 177), (99, 178), (99, 179), (99, 180), (99, 181), (99, 182), (99, 183), (99, 184), (99, 185), (99, 186), (99, 187), (99, 188), (99, 189), (99, 190), (99, 191), (99, 192), (99, 193), (99, 194), (99, 195), (99, 196), (99, 197), (99, 200), (99, 201), (99, 202), (99, 203), (99, 263), (99, 265), (99, 266), (99, 267), (99, 268), (99, 269), (99, 270), (99, 271), (99, 272), (99, 273), (99, 274), (99, 275), (99, 276), (99, 277), (99, 278), (99, 279), (99, 280), (99, 282), (100, 158), (100, 160), (100, 161), (100, 162), (100, 163), (100, 164), (100, 165), (100, 166), (100, 167), (100, 168), (100, 169), (100, 170), (100, 171), (100, 172), (100, 173), (100, 174), (100, 175), (100, 176), (100, 177), (100, 178), (100, 179), (100, 180), (100, 181), (100, 182), (100, 183), (100, 184), (100, 185), (100, 186), (100, 187), (100, 188), (100, 189), (100, 190), (100, 191), (100, 192), (100, 193), (100, 194), (100, 195), (100, 196), (100, 197), (100, 198), (100, 199), (100, 204), (100, 205), (100, 206), (100, 208), (100, 263), (100, 265), (100, 266), (100, 267), (100, 268), (100, 269), (100, 270), (100, 271), (100, 272), (100, 273), (100, 274), (100, 275), (100, 276), (100, 277), (100, 278), (100, 279), (100, 280), (100, 282), (101, 158), (101, 160), (101, 161), (101, 162), (101, 163), (101, 164), (101, 165), (101, 166), (101, 167), (101, 168), (101, 169), (101, 170), (101, 171), (101, 172), (101, 173), (101, 174), (101, 175), (101, 176), (101, 177), (101, 178), (101, 179), (101, 180), (101, 181), (101, 182), (101, 183), (101, 184), (101, 185), (101, 186), (101, 187), (101, 188), (101, 189), (101, 190), (101, 191), (101, 192), (101, 193), (101, 194), (101, 195), (101, 196), (101, 197), (101, 198), (101, 199), (101, 200), (101, 201), (101, 202), (101, 203), (101, 210), (101, 264), (101, 270), (101, 271), (101, 272), (101, 273), (101, 274), (101, 275), (101, 276), (101, 277), (101, 278), (101, 279), (101, 280), (101, 281), (102, 158), (102, 160), (102, 161), (102, 162), (102, 163), (102, 164), (102, 165), (102, 166), (102, 167), (102, 168), (102, 169), (102, 170), (102, 171), (102, 172), (102, 173), (102, 174), (102, 175), (102, 176), (102, 177), (102, 178), (102, 179), (102, 180), (102, 181), (102, 182), (102, 183), (102, 184), (102, 185), (102, 186), (102, 187), (102, 188), (102, 189), (102, 190), (102, 191), (102, 192), (102, 193), (102, 194), (102, 195), (102, 196), (102, 197), (102, 198), (102, 199), (102, 200), (102, 201), (102, 202), (102, 203), (102, 204), (102, 205), (102, 206), (102, 207), (102, 208), (102, 211), (102, 265), (102, 267), (102, 268), (102, 269), (102, 272), (102, 273), (102, 274), (102, 275), (102, 276), (102, 277), (102, 278), (102, 279), (102, 280), (102, 283), (103, 157), (103, 158), (103, 159), (103, 160), (103, 161), (103, 162), (103, 163), (103, 164), (103, 165), (103, 166), (103, 167), (103, 168), (103, 169), (103, 170), (103, 171), (103, 172), (103, 173), (103, 174), (103, 175), (103, 176), (103, 177), (103, 178), (103, 184), (103, 185), (103, 186), (103, 187), (103, 188), (103, 189), (103, 190), (103, 191), (103, 192), (103, 193), (103, 194), (103, 195), (103, 196), (103, 197), (103, 198), (103, 199), (103, 200), (103, 201), (103, 202), (103, 203), (103, 204), (103, 205), (103, 206), (103, 207), (103, 208), (103, 209), (103, 210), (103, 213), (103, 270), (103, 271), (103, 274), (103, 275), (103, 276), (103, 277), (103, 278), (103, 279), (103, 281), (104, 157), (104, 159), (104, 160), (104, 161), (104, 162), (104, 163), (104, 164), (104, 165), (104, 166), (104, 167), (104, 168), (104, 169), (104, 170), (104, 171), (104, 172), (104, 173), (104, 174), (104, 175), (104, 179), (104, 180), (104, 181), (104, 182), (104, 183), (104, 190), (104, 191), (104, 192), (104, 193), (104, 194), (104, 195), (104, 196), (104, 197), (104, 198), (104, 199), (104, 200), (104, 201), (104, 202), (104, 203), (104, 204), (104, 205), (104, 206), (104, 207), (104, 208), (104, 209), (104, 210), (104, 211), (104, 214), (104, 272), (104, 276), (104, 277), (104, 278), (104, 280), (105, 157), (105, 159), (105, 160), (105, 161), (105, 162), (105, 163), (105, 164), (105, 165), (105, 166), (105, 167), (105, 168), (105, 169), (105, 170), (105, 171), (105, 172), (105, 176), (105, 177), (105, 178), (105, 184), (105, 186), (105, 187), (105, 188), (105, 189), (105, 194), (105, 195), (105, 196), (105, 197), (105, 198), (105, 199), (105, 200), (105, 201), (105, 202), (105, 203), (105, 204), (105, 205), (105, 206), (105, 207), (105, 208), (105, 209), (105, 210), (105, 211), (105, 212), (105, 213), (105, 216), (105, 274), (105, 278), (105, 280), (106, 156), (106, 158), (106, 159), (106, 160), (106, 161), (106, 162), (106, 163), (106, 164), (106, 165), (106, 166), (106, 167), (106, 168), (106, 169), (106, 173), (106, 174), (106, 175), (106, 190), (106, 191), (106, 192), (106, 193), (106, 196), (106, 197), (106, 198), (106, 199), (106, 200), (106, 201), (106, 202), (106, 203), (106, 204), (106, 205), (106, 206), (106, 207), (106, 208), (106, 209), (106, 210), (106, 211), (106, 212), (106, 213), (106, 214), (106, 217), (106, 218), (106, 220), (106, 276), (106, 280), (107, 156), (107, 158), (107, 159), (107, 160), (107, 161), (107, 162), (107, 163), (107, 164), (107, 165), (107, 166), (107, 167), (107, 170), (107, 171), (107, 172), (107, 194), (107, 198), (107, 199), (107, 200), (107, 201), (107, 202), (107, 203), (107, 204), (107, 205), (107, 206), (107, 207), (107, 208), (107, 209), (107, 210), (107, 211), (107, 212), (107, 213), (107, 214), (107, 215), (107, 216), (107, 221), (107, 278), (107, 280), (108, 155), (108, 157), (108, 158), (108, 159), (108, 160), (108, 161), (108, 162), (108, 163), (108, 164), (108, 165), (108, 168), (108, 196), (108, 200), (108, 201), (108, 202), (108, 203), (108, 204), (108, 205), (108, 206), (108, 207), (108, 208), (108, 209), (108, 210), (108, 211), (108, 212), (108, 213), (108, 214), (108, 215), (108, 216), (108, 217), (108, 218), (108, 219), (108, 279), (109, 155), (109, 157), (109, 158), (109, 159), (109, 160), (109, 161), (109, 162), (109, 163), (109, 164), (109, 167), (109, 198), (109, 202), (109, 203), (109, 204), (109, 205), (109, 206), (109, 207), (109, 208), (109, 209), (109, 210), (109, 211), (109, 212), (109, 213), (109, 214), (109, 215), (109, 216), (109, 217), (109, 218), (109, 219), (109, 220), (109, 222), (110, 154), (110, 156), (110, 157), (110, 158), (110, 159), (110, 160), (110, 161), (110, 162), (110, 163), (110, 165), (110, 200), (110, 204), (110, 205), (110, 206), (110, 207), (110, 208), (110, 209), (110, 210), (110, 211), (110, 212), (110, 213), (110, 214), (110, 215), (110, 216), (110, 217), (110, 218), (110, 219), (110, 220), (110, 221), (110, 223), (111, 154), (111, 156), (111, 157), (111, 158), (111, 159), (111, 160), (111, 161), (111, 162), (111, 164), (111, 202), (111, 206), (111, 207), (111, 208), (111, 209), (111, 210), (111, 211), (111, 212), (111, 213), (111, 214), (111, 215), (111, 216), (111, 217), (111, 218), (111, 219), (111, 220), (111, 221), (111, 223), (112, 153), (112, 155), (112, 156), (112, 157), (112, 158), (112, 159), (112, 160), (112, 161), (112, 163), (112, 204), (112, 208), (112, 209), (112, 210), (112, 211), (112, 212), (112, 213), (112, 214), (112, 215), (112, 216), (112, 217), (112, 218), (112, 219), (112, 220), (112, 221), (112, 223), (113, 152), (113, 154), (113, 155), (113, 156), (113, 157), (113, 158), (113, 159), (113, 160), (113, 162), (113, 206), (113, 209), (113, 210), (113, 211), (113, 212), (113, 213), (113, 214), (113, 215), (113, 216), (113, 217), (113, 218), (113, 219), (113, 220), (113, 221), (113, 223), (114, 152), (114, 154), (114, 155), (114, 156), (114, 157), (114, 158), (114, 159), (114, 161), (114, 208), (114, 210), (114, 211), (114, 212), (114, 213), (114, 214), (114, 215), (114, 216), (114, 217), (114, 218), (114, 219), (114, 220), (114, 221), (114, 223), (115, 151), (115, 153), (115, 154), (115, 155), (115, 156), (115, 157), (115, 158), (115, 159), (115, 161), (115, 209), (115, 211), (115, 212), (115, 213), (115, 214), (115, 215), (115, 216), (115, 217), (115, 218), (115, 219), (115, 220), (115, 221), (115, 223), (116, 150), (116, 152), (116, 153), (116, 154), (116, 155), (116, 156), (116, 157), (116, 158), (116, 160), (116, 210), (116, 212), (116, 213), (116, 214), (116, 215), (116, 216), (116, 217), (116, 218), (116, 219), (116, 220), (116, 221), (116, 223), (117, 149), (117, 151), (117, 152), (117, 153), (117, 154), (117, 155), (117, 156), (117, 157), (117, 159), (117, 210), (117, 212), (117, 213), (117, 214), (117, 215), (117, 216), (117, 217), (117, 218), (117, 219), (117, 220), (117, 221), (117, 223), (118, 149), (118, 151), (118, 152), (118, 153), (118, 154), (118, 155), (118, 156), (118, 157), (118, 159), (118, 211), (118, 213), (118, 214), (118, 215), (118, 216), (118, 217), (118, 218), (118, 219), (118, 220), (118, 221), (118, 223), (119, 148), (119, 150), (119, 151), (119, 152), (119, 153), (119, 154), (119, 155), (119, 156), (119, 158), (119, 212), (119, 214), (119, 215), (119, 216), (119, 217), (119, 218), (119, 219), (119, 220), (119, 222), (120, 147), (120, 149), (120, 150), (120, 151), (120, 152), (120, 153), (120, 154), (120, 155), (120, 156), (120, 158), (120, 212), (120, 214), (120, 215), (120, 216), (120, 217), (120, 218), (120, 219), (120, 220), (120, 222), (121, 146), (121, 148), (121, 149), (121, 150), (121, 151), (121, 152), (121, 153), (121, 154), (121, 155), (121, 156), (121, 158), (121, 213), (121, 215), (121, 216), (121, 217), (121, 218), (121, 219), (121, 220), (121, 222), (122, 145), (122, 147), (122, 148), (122, 149), (122, 150), (122, 151), (122, 152), (122, 153), (122, 154), (122, 155), (122, 157), (122, 213), (122, 215), (122, 216), (122, 217), (122, 218), (122, 219), (122, 221), (123, 144), (123, 146), (123, 147), (123, 148), (123, 149), (123, 150), (123, 151), (123, 152), (123, 153), (123, 154), (123, 155), (123, 157), (123, 214), (123, 216), (123, 217), (123, 218), (123, 219), (123, 221), (124, 142), (124, 145), (124, 146), (124, 147), (124, 148), (124, 149), (124, 150), (124, 151), (124, 152), (124, 153), (124, 154), (124, 155), (124, 157), (124, 215), (124, 217), (124, 218), (124, 219), (124, 221), (125, 141), (125, 144), (125, 145), (125, 146), (125, 147), (125, 148), (125, 149), (125, 150), (125, 151), (125, 152), (125, 153), (125, 154), (125, 155), (125, 157), (125, 218), (125, 220), (126, 140), (126, 143), (126, 144), (126, 145), (126, 146), (126, 147), (126, 148), (126, 149), (126, 150), (126, 151), (126, 152), (126, 153), (126, 154), (126, 155), (126, 157), (126, 216), (126, 217), (126, 220), (127, 141), (127, 142), (127, 143), (127, 144), (127, 145), (127, 146), (127, 147), (127, 148), (127, 149), (127, 150), (127, 151), (127, 152), (127, 153), (127, 154), (127, 155), (127, 157), (127, 218), (127, 220), (128, 137), (128, 140), (128, 141), (128, 142), (128, 143), (128, 144), (128, 145), (128, 146), (128, 147), (128, 148), (128, 149), (128, 150), (128, 151), (128, 152), (128, 153), (128, 154), (128, 155), (128, 156), (128, 157), (129, 135), (129, 138), (129, 139), (129, 140), (129, 141), (129, 142), (129, 143), (129, 144), (129, 145), (129, 146), (129, 147), (129, 148), (129, 149), (129, 150), (129, 151), (129, 152), (129, 153), (129, 154), (129, 155), (129, 157), (130, 88), (130, 91), (130, 133), (130, 134), (130, 137), (130, 138), (130, 139), (130, 140), (130, 141), (130, 142), (130, 143), (130, 144), (130, 145), (130, 146), (130, 147), (130, 148), (130, 149), (130, 150), (130, 151), (130, 152), (130, 153), (130, 154), (130, 155), (130, 157), (131, 86), (131, 93), (131, 132), (131, 135), (131, 136), (131, 137), (131, 138), (131, 139), (131, 140), (131, 141), (131, 142), (131, 143), (131, 144), (131, 145), (131, 146), (131, 147), (131, 148), (131, 149), (131, 150), (131, 151), (131, 152), (131, 153), (131, 154), (131, 155), (131, 157), (132, 85), (132, 88), (132, 89), (132, 90), (132, 91), (132, 94), (132, 134), (132, 135), (132, 136), (132, 137), (132, 138), (132, 139), (132, 140), (132, 141), (132, 142), (132, 143), (132, 144), (132, 145), (132, 146), (132, 147), (132, 148), (132, 149), (132, 150), (132, 151), (132, 152), (132, 153), (132, 154), (132, 155), (132, 157), (133, 84), (133, 87), (133, 88), (133, 89), (133, 90), (133, 91), (133, 92), (133, 93), (133, 96), (133, 131), (133, 133), (133, 134), (133, 135), (133, 136), (133, 137), (133, 138), (133, 139), (133, 140), (133, 141), (133, 142), (133, 143), (133, 144), (133, 145), (133, 146), (133, 147), (133, 148), (133, 149), (133, 150), (133, 151), (133, 152), (133, 153), (133, 154), (133, 155), (133, 157), (134, 84), (134, 86), (134, 87), (134, 88), (134, 89), (134, 90), (134, 91), (134, 92), (134, 93), (134, 94), (134, 97), (134, 130), (134, 132), (134, 133), (134, 134), (134, 135), (134, 136), (134, 137), (134, 138), (134, 139), (134, 140), (134, 141), (134, 142), (134, 143), (134, 144), (134, 145), (134, 146), (134, 147), (134, 148), (134, 149), (134, 150), (134, 151), (134, 152), (134, 153), (134, 154), (134, 155), (134, 157), (135, 83), (135, 85), (135, 86), (135, 87), (135, 88), (135, 89), (135, 90), (135, 91), (135, 92), (135, 93), (135, 94), (135, 95), (135, 98), (135, 129), (135, 131), (135, 132), (135, 133), (135, 134), (135, 135), (135, 136), (135, 137), (135, 138), (135, 139), (135, 140), (135, 141), (135, 142), (135, 143), (135, 144), (135, 145), (135, 146), (135, 147), (135, 148), (135, 149), (135, 150), (135, 151), (135, 152), (135, 153), (135, 154), (135, 155), (135, 156), (135, 158), (136, 83), (136, 85), (136, 86), (136, 87), (136, 88), (136, 89), (136, 90), (136, 91), (136, 92), (136, 93), (136, 94), (136, 95), (136, 96), (136, 99), (136, 129), (136, 131), (136, 132), (136, 133), (136, 134), (136, 135), (136, 136), (136, 137), (136, 138), (136, 139), (136, 140), (136, 141), (136, 142), (136, 143), (136, 144), (136, 145), (136, 146), (136, 147), (136, 148), (136, 149), (136, 150), (136, 151), (136, 152), (136, 153), (136, 154), (136, 155), (136, 156), (136, 158), (137, 83), (137, 85), (137, 86), (137, 87), (137, 88), (137, 89), (137, 90), (137, 91), (137, 92), (137, 93), (137, 94), (137, 95), (137, 96), (137, 97), (137, 100), (137, 128), (137, 130), (137, 131), (137, 132), (137, 133), (137, 134), (137, 135), (137, 136), (137, 137), (137, 138), (137, 139), (137, 140), (137, 141), (137, 142), (137, 143), (137, 144), (137, 145), (137, 146), (137, 147), (137, 148), (137, 149), (137, 150), (137, 151), (137, 152), (137, 153), (137, 154), (137, 155), (137, 156), (137, 157), (137, 159), (138, 82), (138, 84), (138, 85), (138, 86), (138, 87), (138, 88), (138, 89), (138, 90), (138, 91), (138, 92), (138, 93), (138, 94), (138, 95), (138, 96), (138, 97), (138, 98), (138, 101), (138, 127), (138, 129), (138, 130), (138, 131), (138, 132), (138, 133), (138, 134), (138, 135), (138, 136), (138, 137), (138, 138), (138, 139), (138, 140), (138, 141), (138, 142), (138, 143), (138, 144), (138, 145), (138, 146), (138, 147), (138, 148), (138, 149), (138, 150), (138, 151), (138, 152), (138, 153), (138, 154), (138, 155), (138, 156), (138, 157), (138, 159), (139, 82), (139, 84), (139, 85), (139, 86), (139, 87), (139, 88), (139, 89), (139, 90), (139, 91), (139, 92), (139, 93), (139, 94), (139, 95), (139, 96), (139, 97), (139, 98), (139, 99), (139, 102), (139, 126), (139, 128), (139, 129), (139, 130), (139, 131), (139, 132), (139, 133), (139, 134), (139, 135), (139, 136), (139, 137), (139, 138), (139, 139), (139, 140), (139, 141), (139, 142), (139, 143), (139, 144), (139, 145), (139, 146), (139, 147), (139, 148), (139, 149), (139, 150), (139, 151), (139, 152), (139, 153), (139, 154), (139, 155), (139, 156), (139, 157), (139, 158), (139, 160), (140, 82), (140, 84), (140, 85), (140, 86), (140, 87), (140, 88), (140, 89), (140, 90), (140, 91), (140, 92), (140, 93), (140, 94), (140, 95), (140, 96), (140, 97), (140, 98), (140, 99), (140, 100), (140, 103), (140, 125), (140, 127), (140, 128), (140, 129), (140, 130), (140, 131), (140, 132), (140, 133), (140, 134), (140, 135), (140, 136), (140, 137), (140, 138), (140, 139), (140, 140), (140, 141), (140, 145), (140, 146), (140, 151), (140, 152), (140, 153), (140, 154), (140, 155), (140, 156), (140, 157), (140, 158), (140, 159), (140, 161), (141, 82), (141, 84), (141, 85), (141, 86), (141, 87), (141, 88), (141, 89), (141, 90), (141, 91), (141, 92), (141, 93), (141, 94), (141, 95), (141, 96), (141, 97), (141, 98), (141, 99), (141, 100), (141, 101), (141, 104), (141, 123), (141, 126), (141, 127), (141, 128), (141, 129), (141, 130), (141, 131), (141, 132), (141, 133), (141, 134), (141, 135), (141, 136), (141, 137), (141, 138), (141, 139), (141, 142), (141, 143), (141, 144), (141, 145), (141, 146), (141, 147), (141, 148), (141, 149), (141, 150), (141, 153), (141, 154), (141, 155), (141, 156), (141, 157), (141, 158), (141, 159), (141, 160), (141, 163), (142, 81), (142, 83), (142, 84), (142, 85), (142, 86), (142, 87), (142, 88), (142, 89), (142, 90), (142, 91), (142, 92), (142, 93), (142, 94), (142, 95), (142, 96), (142, 97), (142, 98), (142, 99), (142, 100), (142, 101), (142, 102), (142, 105), (142, 118), (142, 119), (142, 120), (142, 121), (142, 125), (142, 126), (142, 127), (142, 128), (142, 129), (142, 130), (142, 131), (142, 132), (142, 133), (142, 134), (142, 135), (142, 136), (142, 137), (142, 140), (142, 151), (142, 155), (142, 156), (142, 157), (142, 158), (142, 159), (142, 160), (142, 161), (142, 164), (143, 81), (143, 83), (143, 84), (143, 85), (143, 86), (143, 87), (143, 88), (143, 89), (143, 90), (143, 91), (143, 92), (143, 93), (143, 94), (143, 95), (143, 96), (143, 97), (143, 98), (143, 99), (143, 100), (143, 101), (143, 102), (143, 103), (143, 106), (143, 116), (143, 117), (143, 122), (143, 123), (143, 124), (143, 125), (143, 126), (143, 127), (143, 128), (143, 129), (143, 130), (143, 131), (143, 132), (143, 133), (143, 134), (143, 135), (143, 136), (143, 139), (143, 153), (143, 156), (143, 157), (143, 158), (143, 159), (143, 160), (143, 161), (143, 162), (143, 163), (143, 166), (144, 81), (144, 83), (144, 84), (144, 85), (144, 86), (144, 87), (144, 88), (144, 89), (144, 90), (144, 91), (144, 92), (144, 93), (144, 94), (144, 95), (144, 96), (144, 97), (144, 98), (144, 99), (144, 100), (144, 101), (144, 102), (144, 103), (144, 104), (144, 105), (144, 107), (144, 114), (144, 115), (144, 118), (144, 119), (144, 120), (144, 121), (144, 122), (144, 123), (144, 124), (144, 125), (144, 126), (144, 127), (144, 128), (144, 129), (144, 130), (144, 131), (144, 132), (144, 133), (144, 134), (144, 135), (144, 137), (144, 155), (144, 157), (144, 158), (144, 159), (144, 160), (144, 161), (144, 162), (144, 163), (144, 164), (144, 168), (145, 81), (145, 83), (145, 84), (145, 85), (145, 86), (145, 87), (145, 88), (145, 89), (145, 90), (145, 91), (145, 92), (145, 93), (145, 94), (145, 95), (145, 96), (145, 97), (145, 98), (145, 99), (145, 100), (145, 101), (145, 102), (145, 103), (145, 104), (145, 105), (145, 106), (145, 109), (145, 110), (145, 111), (145, 112), (145, 113), (145, 116), (145, 117), (145, 118), (145, 119), (145, 120), (145, 121), (145, 122), (145, 123), (145, 124), (145, 125), (145, 126), (145, 127), (145, 128), (145, 129), (145, 130), (145, 131), (145, 132), (145, 133), (145, 134), (145, 136), (145, 156), (145, 159), (145, 160), (145, 161), (145, 162), (145, 163), (145, 164), (145, 165), (145, 166), (145, 170), (146, 80), (146, 82), (146, 83), (146, 84), (146, 85), (146, 86), (146, 87), (146, 88), (146, 89), (146, 90), (146, 91), (146, 92), (146, 93), (146, 94), (146, 95), (146, 96), (146, 97), (146, 98), (146, 99), (146, 100), (146, 101), (146, 102), (146, 103), (146, 104), (146, 105), (146, 106), (146, 107), (146, 114), (146, 115), (146, 116), (146, 117), (146, 118), (146, 119), (146, 120), (146, 121), (146, 122), (146, 123), (146, 124), (146, 125), (146, 126), (146, 127), (146, 128), (146, 129), (146, 130), (146, 131), (146, 132), (146, 133), (146, 135), (146, 157), (146, 160), (146, 161), (146, 162), (146, 163), (146, 164), (146, 165), (146, 166), (146, 167), (146, 168), (146, 171), (147, 80), (147, 82), (147, 83), (147, 84), (147, 85), (147, 86), (147, 87), (147, 88), (147, 89), (147, 90), (147, 91), (147, 92), (147, 93), (147, 94), (147, 95), (147, 96), (147, 97), (147, 98), (147, 99), (147, 100), (147, 101), (147, 102), (147, 103), (147, 104), (147, 105), (147, 106), (147, 107), (147, 108), (147, 109), (147, 110), (147, 111), (147, 112), (147, 113), (147, 114), (147, 115), (147, 116), (147, 117), (147, 118), (147, 119), (147, 120), (147, 121), (147, 122), (147, 123), (147, 124), (147, 125), (147, 126), (147, 127), (147, 128), (147, 129), (147, 130), (147, 131), (147, 132), (147, 133), (147, 135), (147, 158), (147, 161), (147, 162), (147, 163), (147, 164), (147, 165), (147, 166), (147, 167), (147, 168), (147, 169), (147, 170), (147, 172), (148, 79), (148, 81), (148, 82), (148, 83), (148, 84), (148, 85), (148, 86), (148, 87), (148, 88), (148, 89), (148, 90), (148, 91), (148, 92), (148, 93), (148, 94), (148, 95), (148, 96), (148, 97), (148, 98), (148, 99), (148, 100), (148, 101), (148, 102), (148, 103), (148, 104), (148, 105), (148, 106), (148, 107), (148, 108), (148, 109), (148, 110), (148, 111), (148, 112), (148, 113), (148, 114), (148, 115), (148, 116), (148, 117), (148, 118), (148, 119), (148, 120), (148, 121), (148, 122), (148, 123), (148, 124), (148, 125), (148, 126), (148, 127), (148, 128), (148, 129), (148, 130), (148, 131), (148, 132), (148, 134), (148, 159), (148, 162), (148, 163), (148, 164), (148, 165), (148, 166), (148, 167), (148, 168), (148, 169), (148, 170), (148, 171), (148, 173), (149, 79), (149, 81), (149, 82), (149, 83), (149, 84), (149, 85), (149, 86), (149, 87), (149, 88), (149, 89), (149, 90), (149, 91), (149, 92), (149, 93), (149, 94), (149, 95), (149, 96), (149, 97), (149, 98), (149, 99), (149, 100), (149, 101), (149, 102), (149, 103), (149, 104), (149, 105), (149, 106), (149, 107), (149, 108), (149, 109), (149, 110), (149, 111), (149, 112), (149, 113), (149, 114), (149, 115), (149, 116), (149, 117), (149, 118), (149, 119), (149, 120), (149, 121), (149, 122), (149, 123), (149, 124), (149, 125), (149, 126), (149, 127), (149, 128), (149, 129), (149, 130), (149, 131), (149, 133), (149, 160), (149, 162), (149, 163), (149, 164), (149, 165), (149, 166), (149, 167), (149, 168), (149, 169), (149, 170), (149, 171), (149, 173), (150, 78), (150, 80), (150, 81), (150, 82), (150, 83), (150, 84), (150, 85), (150, 86), (150, 87), (150, 88), (150, 89), (150, 90), (150, 91), (150, 92), (150, 93), (150, 94), (150, 95), (150, 96), (150, 97), (150, 98), (150, 99), (150, 100), (150, 101), (150, 102), (150, 103), (150, 104), (150, 105), (150, 106), (150, 107), (150, 108), (150, 109), (150, 110), (150, 111), (150, 112), (150, 113), (150, 114), (150, 115), (150, 116), (150, 117), (150, 118), (150, 119), (150, 120), (150, 121), (150, 122), (150, 123), (150, 124), (150, 125), (150, 126), (150, 127), (150, 128), (150, 129), (150, 130), (150, 131), (150, 133), (150, 161), (150, 163), (150, 164), (150, 165), (150, 166), (150, 167), (150, 168), (150, 169), (150, 170), (150, 171), (150, 172), (150, 174), (151, 78), (151, 80), (151, 81), (151, 82), (151, 83), (151, 84), (151, 85), (151, 86), (151, 87), (151, 88), (151, 89), (151, 90), (151, 91), (151, 92), (151, 93), (151, 94), (151, 95), (151, 96), (151, 97), (151, 98), (151, 99), (151, 100), (151, 101), (151, 102), (151, 103), (151, 104), (151, 105), (151, 106), (151, 107), (151, 108), (151, 109), (151, 110), (151, 111), (151, 112), (151, 113), (151, 114), (151, 115), (151, 116), (151, 117), (151, 118), (151, 119), (151, 120), (151, 121), (151, 122), (151, 123), (151, 124), (151, 125), (151, 126), (151, 127), (151, 128), (151, 129), (151, 130), (151, 132), (151, 162), (151, 164), (151, 165), (151, 166), (151, 167), (151, 168), (151, 169), (151, 170), (151, 171), (151, 172), (151, 173), (151, 175), (152, 77), (152, 79), (152, 80), (152, 81), (152, 82), (152, 83), (152, 84), (152, 85), (152, 86), (152, 87), (152, 88), (152, 89), (152, 90), (152, 91), (152, 92), (152, 93), (152, 94), (152, 95), (152, 96), (152, 97), (152, 98), (152, 99), (152, 100), (152, 101), (152, 102), (152, 103), (152, 104), (152, 105), (152, 106), (152, 107), (152, 108), (152, 109), (152, 110), (152, 111), (152, 112), (152, 113), (152, 114), (152, 115), (152, 116), (152, 117), (152, 118), (152, 119), (152, 120), (152, 121), (152, 122), (152, 123), (152, 124), (152, 125), (152, 126), (152, 127), (152, 128), (152, 129), (152, 130), (152, 131), (152, 132), (152, 163), (152, 165), (152, 166), (152, 167), (152, 168), (152, 169), (152, 170), (152, 171), (152, 172), (152, 173), (152, 175), (153, 77), (153, 78), (153, 79), (153, 80), (153, 81), (153, 82), (153, 83), (153, 84), (153, 85), (153, 86), (153, 87), (153, 88), (153, 89), (153, 90), (153, 91), (153, 92), (153, 93), (153, 94), (153, 95), (153, 96), (153, 97), (153, 98), (153, 99), (153, 100), (153, 101), (153, 102), (153, 103), (153, 104), (153, 105), (153, 106), (153, 107), (153, 108), (153, 109), (153, 110), (153, 111), (153, 112), (153, 113), (153, 114), (153, 115), (153, 116), (153, 117), (153, 118), (153, 119), (153, 120), (153, 121), (153, 122), (153, 123), (153, 124), (153, 125), (153, 126), (153, 127), (153, 128), (153, 129), (153, 131), (153, 164), (153, 166), (153, 167), (153, 168), (153, 169), (153, 170), (153, 171), (153, 172), (153, 173), (153, 174), (153, 176), (154, 76), (154, 78), (154, 79), (154, 80), (154, 81), (154, 82), (154, 83), (154, 84), (154, 85), (154, 86), (154, 87), (154, 88), (154, 89), (154, 90), (154, 91), (154, 92), (154, 93), (154, 94), (154, 95), (154, 96), (154, 97), (154, 98), (154, 99), (154, 100), (154, 101), (154, 102), (154, 103), (154, 104), (154, 105), (154, 106), (154, 107), (154, 108), (154, 109), (154, 110), (154, 111), (154, 112), (154, 113), (154, 114), (154, 115), (154, 116), (154, 117), (154, 118), (154, 119), (154, 120), (154, 121), (154, 122), (154, 123), (154, 124), (154, 125), (154, 126), (154, 127), (154, 128), (154, 129), (154, 131), (154, 164), (154, 166), (154, 167), (154, 168), (154, 169), (154, 170), (154, 171), (154, 172), (154, 173), (154, 174), (154, 175), (154, 177), (155, 75), (155, 77), (155, 78), (155, 79), (155, 80), (155, 81), (155, 82), (155, 83), (155, 84), (155, 85), (155, 86), (155, 87), (155, 88), (155, 89), (155, 90), (155, 91), (155, 92), (155, 93), (155, 94), (155, 95), (155, 96), (155, 97), (155, 98), (155, 99), (155, 100), (155, 101), (155, 102), (155, 103), (155, 104), (155, 105), (155, 106), (155, 107), (155, 108), (155, 109), (155, 110), (155, 111), (155, 112), (155, 113), (155, 114), (155, 115), (155, 116), (155, 117), (155, 118), (155, 119), (155, 120), (155, 121), (155, 122), (155, 123), (155, 124), (155, 125), (155, 126), (155, 127), (155, 128), (155, 129), (155, 131), (155, 165), (155, 167), (155, 168), (155, 169), (155, 170), (155, 171), (155, 172), (155, 173), (155, 174), (155, 175), (155, 176), (155, 178), (156, 75), (156, 77), (156, 78), (156, 79), (156, 80), (156, 81), (156, 82), (156, 83), (156, 84), (156, 85), (156, 86), (156, 87), (156, 88), (156, 89), (156, 90), (156, 91), (156, 92), (156, 93), (156, 94), (156, 95), (156, 96), (156, 97), (156, 98), (156, 99), (156, 100), (156, 101), (156, 102), (156, 103), (156, 104), (156, 105), (156, 106), (156, 107), (156, 108), (156, 109), (156, 110), (156, 111), (156, 112), (156, 113), (156, 114), (156, 115), (156, 116), (156, 117), (156, 118), (156, 119), (156, 120), (156, 121), (156, 122), (156, 123), (156, 124), (156, 125), (156, 126), (156, 127), (156, 128), (156, 129), (156, 131), (156, 166), (156, 168), (156, 169), (156, 170), (156, 171), (156, 172), (156, 173), (156, 174), (156, 175), (156, 176), (156, 179), (157, 74), (157, 76), (157, 77), (157, 78), (157, 79), (157, 80), (157, 81), (157, 82), (157, 83), (157, 84), (157, 85), (157, 86), (157, 87), (157, 88), (157, 89), (157, 90), (157, 91), (157, 92), (157, 93), (157, 94), (157, 95), (157, 96), (157, 97), (157, 98), (157, 99), (157, 100), (157, 101), (157, 102), (157, 103), (157, 104), (157, 105), (157, 106), (157, 107), (157, 108), (157, 109), (157, 110), (157, 111), (157, 112), (157, 113), (157, 114), (157, 115), (157, 116), (157, 117), (157, 118), (157, 119), (157, 120), (157, 121), (157, 122), (157, 123), (157, 124), (157, 125), (157, 126), (157, 127), (157, 128), (157, 129), (157, 131), (157, 166), (157, 168), (157, 169), (157, 170), (157, 171), (157, 172), (157, 173), (157, 174), (157, 175), (157, 176), (157, 177), (157, 180), (158, 74), (158, 76), (158, 77), (158, 78), (158, 79), (158, 80), (158, 81), (158, 82), (158, 83), (158, 84), (158, 85), (158, 86), (158, 87), (158, 88), (158, 89), (158, 90), (158, 91), (158, 92), (158, 93), (158, 94), (158, 95), (158, 96), (158, 97), (158, 98), (158, 99), (158, 100), (158, 101), (158, 102), (158, 103), (158, 104), (158, 105), (158, 106), (158, 107), (158, 108), (158, 109), (158, 110), (158, 111), (158, 112), (158, 113), (158, 114), (158, 115), (158, 116), (158, 117), (158, 118), (158, 119), (158, 120), (158, 121), (158, 122), (158, 123), (158, 124), (158, 125), (158, 126), (158, 127), (158, 128), (158, 129), (158, 131), (158, 167), (158, 169), (158, 170), (158, 171), (158, 172), (158, 173), (158, 174), (158, 175), (158, 176), (158, 177), (158, 178), (158, 181), (159, 73), (159, 75), (159, 76), (159, 77), (159, 78), (159, 79), (159, 80), (159, 81), (159, 82), (159, 83), (159, 84), (159, 85), (159, 86), (159, 87), (159, 88), (159, 89), (159, 90), (159, 91), (159, 92), (159, 93), (159, 94), (159, 95), (159, 96), (159, 97), (159, 98), (159, 99), (159, 100), (159, 101), (159, 102), (159, 103), (159, 104), (159, 105), (159, 106), (159, 107), (159, 108), (159, 109), (159, 110), (159, 111), (159, 112), (159, 113), (159, 114), (159, 115), (159, 116), (159, 117), (159, 118), (159, 119), (159, 120), (159, 121), (159, 122), (159, 123), (159, 124), (159, 125), (159, 126), (159, 127), (159, 128), (159, 129), (159, 131), (159, 167), (159, 169), (159, 170), (159, 171), (159, 172), (159, 173), (159, 174), (159, 175), (159, 176), (159, 177), (159, 178), (159, 179), (159, 180), (159, 182), (160, 73), (160, 75), (160, 76), (160, 77), (160, 78), (160, 79), (160, 80), (160, 81), (160, 82), (160, 83), (160, 84), (160, 85), (160, 86), (160, 87), (160, 88), (160, 89), (160, 90), (160, 91), (160, 92), (160, 93), (160, 94), (160, 95), (160, 96), (160, 97), (160, 98), (160, 99), (160, 100), (160, 101), (160, 102), (160, 108), (160, 109), (160, 110), (160, 111), (160, 112), (160, 113), (160, 114), (160, 115), (160, 116), (160, 117), (160, 118), (160, 119), (160, 120), (160, 121), (160, 122), (160, 123), (160, 124), (160, 125), (160, 126), (160, 127), (160, 128), (160, 129), (160, 131), (160, 168), (160, 170), (160, 171), (160, 172), (160, 173), (160, 174), (160, 175), (160, 176), (160, 177), (160, 178), (160, 179), (160, 180), (160, 181), (160, 184), (160, 185), (161, 72), (161, 74), (161, 75), (161, 76), (161, 77), (161, 78), (161, 79), (161, 80), (161, 81), (161, 82), (161, 83), (161, 84), (161, 85), (161, 86), (161, 87), (161, 88), (161, 89), (161, 90), (161, 91), (161, 92), (161, 93), (161, 94), (161, 95), (161, 96), (161, 97), (161, 98), (161, 102), (161, 103), (161, 104), (161, 105), (161, 106), (161, 107), (161, 113), (161, 114), (161, 115), (161, 116), (161, 117), (161, 118), (161, 119), (161, 120), (161, 121), (161, 122), (161, 123), (161, 124), (161, 125), (161, 126), (161, 127), (161, 128), (161, 129), (161, 130), (161, 132), (161, 169), (161, 171), (161, 172), (161, 173), (161, 174), (161, 175), (161, 176), (161, 177), (161, 178), (161, 179), (161, 180), (161, 181), (161, 182), (161, 183), (161, 186), (161, 187), (162, 71), (162, 73), (162, 74), (162, 75), (162, 76), (162, 77), (162, 78), (162, 79), (162, 80), (162, 81), (162, 82), (162, 83), (162, 84), (162, 85), (162, 86), (162, 87), (162, 88), (162, 89), (162, 90), (162, 91), (162, 92), (162, 93), (162, 94), (162, 95), (162, 96), (162, 99), (162, 100), (162, 101), (162, 108), (162, 109), (162, 110), (162, 111), (162, 112), (162, 116), (162, 117), (162, 118), (162, 119), (162, 120), (162, 121), (162, 122), (162, 123), (162, 124), (162, 125), (162, 126), (162, 127), (162, 128), (162, 129), (162, 130), (162, 132), (162, 170), (162, 173), (162, 174), (162, 175), (162, 176), (162, 177), (162, 178), (162, 179), (162, 180), (162, 181), (162, 182), (162, 183), (162, 184), (162, 185), (162, 189), (163, 71), (163, 73), (163, 74), (163, 75), (163, 76), (163, 77), (163, 78), (163, 79), (163, 80), (163, 81), (163, 82), (163, 83), (163, 84), (163, 85), (163, 86), (163, 87), (163, 88), (163, 89), (163, 90), (163, 91), (163, 92), (163, 93), (163, 94), (163, 95), (163, 98), (163, 114), (163, 117), (163, 118), (163, 119), (163, 120), (163, 121), (163, 122), (163, 123), (163, 124), (163, 125), (163, 126), (163, 127), (163, 128), (163, 129), (163, 130), (163, 132), (163, 171), (163, 172), (163, 175), (163, 176), (163, 177), (163, 178), (163, 179), (163, 180), (163, 181), (163, 182), (163, 183), (163, 184), (163, 185), (163, 186), (163, 187), (163, 191), (164, 70), (164, 72), (164, 73), (164, 74), (164, 75), (164, 76), (164, 77), (164, 78), (164, 79), (164, 80), (164, 81), (164, 82), (164, 83), (164, 84), (164, 85), (164, 86), (164, 87), (164, 88), (164, 89), (164, 90), (164, 91), (164, 92), (164, 93), (164, 96), (164, 116), (164, 118), (164, 119), (164, 120), (164, 121), (164, 122), (164, 123), (164, 124), (164, 125), (164, 126), (164, 127), (164, 128), (164, 129), (164, 130), (164, 131), (164, 133), (164, 173), (164, 178), (164, 179), (164, 180), (164, 181), (164, 182), (164, 183), (164, 184), (164, 185), (164, 186), (164, 187), (164, 188), (164, 189), (164, 192), (165, 70), (165, 72), (165, 73), (165, 74), (165, 75), (165, 76), (165, 77), (165, 78), (165, 79), (165, 80), (165, 81), (165, 82), (165, 83), (165, 84), (165, 85), (165, 86), (165, 87), (165, 88), (165, 89), (165, 90), (165, 91), (165, 92), (165, 95), (165, 117), (165, 119), (165, 120), (165, 121), (165, 122), (165, 123), (165, 124), (165, 125), (165, 126), (165, 127), (165, 128), (165, 129), (165, 130), (165, 131), (165, 133), (165, 175), (165, 177), (165, 181), (165, 182), (165, 183), (165, 184), (165, 185), (165, 186), (165, 187), (165, 188), (165, 189), (165, 190), (165, 191), (165, 193), (166, 69), (166, 71), (166, 72), (166, 73), (166, 74), (166, 75), (166, 76), (166, 77), (166, 78), (166, 79), (166, 80), (166, 81), (166, 82), (166, 83), (166, 84), (166, 85), (166, 86), (166, 87), (166, 88), (166, 89), (166, 90), (166, 91), (166, 94), (166, 118), (166, 120), (166, 121), (166, 122), (166, 123), (166, 124), (166, 125), (166, 126), (166, 127), (166, 128), (166, 129), (166, 130), (166, 131), (166, 132), (166, 134), (166, 178), (166, 180), (166, 186), (166, 187), (166, 188), (166, 189), (166, 192), (167, 69), (167, 71), (167, 72), (167, 73), (167, 74), (167, 75), (167, 76), (167, 77), (167, 78), (167, 79), (167, 80), (167, 81), (167, 82), (167, 83), (167, 84), (167, 85), (167, 86), (167, 87), (167, 88), (167, 89), (167, 90), (167, 91), (167, 93), (167, 119), (167, 121), (167, 122), (167, 123), (167, 124), (167, 125), (167, 126), (167, 127), (167, 128), (167, 129), (167, 130), (167, 131), (167, 132), (167, 134), (167, 181), (167, 182), (167, 183), (167, 184), (167, 185), (167, 190), (167, 192), (168, 68), (168, 70), (168, 71), (168, 72), (168, 73), (168, 74), (168, 75), (168, 76), (168, 77), (168, 78), (168, 79), (168, 80), (168, 81), (168, 82), (168, 83), (168, 84), (168, 85), (168, 86), (168, 87), (168, 88), (168, 89), (168, 90), (168, 92), (168, 119), (168, 121), (168, 122), (168, 123), (168, 124), (168, 125), (168, 126), (168, 127), (168, 128), (168, 129), (168, 130), (168, 131), (168, 132), (168, 133), (168, 135), (168, 186), (168, 187), (168, 188), (168, 189), (169, 68), (169, 70), (169, 71), (169, 72), (169, 73), (169, 74), (169, 75), (169, 76), (169, 77), (169, 78), (169, 79), (169, 80), (169, 81), (169, 82), (169, 83), (169, 84), (169, 85), (169, 86), (169, 87), (169, 88), (169, 89), (169, 91), (169, 120), (169, 122), (169, 123), (169, 124), (169, 125), (169, 126), (169, 127), (169, 128), (169, 129), (169, 130), (169, 131), (169, 132), (169, 133), (169, 135), (170, 67), (170, 68), (170, 69), (170, 70), (170, 71), (170, 72), (170, 73), (170, 74), (170, 75), (170, 76), (170, 77), (170, 78), (170, 79), (170, 80), (170, 81), (170, 82), (170, 83), (170, 84), (170, 85), (170, 86), (170, 87), (170, 88), (170, 90), (170, 120), (170, 122), (170, 123), (170, 124), (170, 125), (170, 126), (170, 127), (170, 128), (170, 129), (170, 130), (170, 131), (170, 132), (170, 133), (170, 134), (170, 136), (171, 67), (171, 69), (171, 70), (171, 71), (171, 72), (171, 73), (171, 74), (171, 75), (171, 76), (171, 77), (171, 78), (171, 79), (171, 80), (171, 81), (171, 82), (171, 83), (171, 84), (171, 85), (171, 86), (171, 87), (171, 88), (171, 90), (171, 120), (171, 122), (171, 123), (171, 124), (171, 125), (171, 126), (171, 127), (171, 128), (171, 129), (171, 130), (171, 131), (171, 132), (171, 133), (171, 134), (171, 136), (172, 67), (172, 69), (172, 70), (172, 71), (172, 72), (172, 73), (172, 74), (172, 75), (172, 76), (172, 77), (172, 78), (172, 79), (172, 80), (172, 81), (172, 82), (172, 83), (172, 84), (172, 85), (172, 86), (172, 87), (172, 89), (172, 120), (172, 122), (172, 123), (172, 124), (172, 125), (172, 126), (172, 127), (172, 128), (172, 129), (172, 130), (172, 131), (172, 132), (172, 133), (172, 134), (172, 136), (173, 66), (173, 68), (173, 69), (173, 70), (173, 71), (173, 72), (173, 73), (173, 74), (173, 75), (173, 76), (173, 77), (173, 78), (173, 79), (173, 80), (173, 81), (173, 82), (173, 83), (173, 84), (173, 85), (173, 86), (173, 87), (173, 89), (173, 120), (173, 122), (173, 123), (173, 124), (173, 125), (173, 126), (173, 127), (173, 128), (173, 129), (173, 130), (173, 131), (173, 132), (173, 133), (173, 134), (173, 135), (173, 136), (173, 137), (174, 66), (174, 68), (174, 69), (174, 70), (174, 71), (174, 72), (174, 73), (174, 74), (174, 75), (174, 76), (174, 77), (174, 78), (174, 79), (174, 80), (174, 81), (174, 82), (174, 83), (174, 84), (174, 85), (174, 86), (174, 88), (174, 120), (174, 122), (174, 123), (174, 124), (174, 125), (174, 126), (174, 127), (174, 128), (174, 129), (174, 130), (174, 131), (174, 132), (174, 133), (174, 134), (174, 136), (175, 66), (175, 68), (175, 69), (175, 70), (175, 71), (175, 72), (175, 73), (175, 74), (175, 75), (175, 76), (175, 77), (175, 78), (175, 79), (175, 80), (175, 81), (175, 82), (175, 83), (175, 84), (175, 85), (175, 86), (175, 88), (175, 120), (175, 122), (175, 123), (175, 124), (175, 125), (175, 126), (175, 127), (175, 128), (175, 129), (175, 130), (175, 131), (175, 132), (175, 133), (175, 134), (175, 136), (176, 65), (176, 67), (176, 68), (176, 69), (176, 70), (176, 71), (176, 72), (176, 73), (176, 74), (176, 75), (176, 76), (176, 77), (176, 78), (176, 79), (176, 80), (176, 81), (176, 82), (176, 83), (176, 84), (176, 85), (176, 86), (176, 88), (176, 120), (176, 122), (176, 123), (176, 124), (176, 125), (176, 126), (176, 127), (176, 128), (176, 129), (176, 130), (176, 131), (176, 132), (176, 133), (176, 134), (176, 135), (176, 136), (176, 137), (177, 65), (177, 67), (177, 68), (177, 69), (177, 70), (177, 71), (177, 72), (177, 73), (177, 74), (177, 75), (177, 76), (177, 77), (177, 78), (177, 79), (177, 80), (177, 81), (177, 82), (177, 83), (177, 84), (177, 85), (177, 86), (177, 88), (177, 119), (177, 121), (177, 122), (177, 123), (177, 124), (177, 125), (177, 126), (177, 127), (177, 128), (177, 129), (177, 130), (177, 131), (177, 132), (177, 133), (177, 134), (177, 135), (177, 137), (178, 65), (178, 67), (178, 68), (178, 69), (178, 70), (178, 71), (178, 72), (178, 73), (178, 74), (178, 75), (178, 76), (178, 77), (178, 78), (178, 79), (178, 80), (178, 81), (178, 82), (178, 83), (178, 84), (178, 85), (178, 86), (178, 88), (178, 119), (178, 121), (178, 122), (178, 123), (178, 124), (178, 125), (178, 126), (178, 127), (178, 128), (178, 129), (178, 130), (178, 131), (178, 132), (178, 133), (178, 134), (178, 135), (178, 136), (178, 138), (179, 65), (179, 67), (179, 68), (179, 69), (179, 70), (179, 71), (179, 72), (179, 73), (179, 74), (179, 75), (179, 76), (179, 77), (179, 78), (179, 79), (179, 80), (179, 81), (179, 82), (179, 83), (179, 84), (179, 85), (179, 88), (179, 119), (179, 121), (179, 122), (179, 123), (179, 124), (179, 125), (179, 126), (179, 127), (179, 128), (179, 129), (179, 130), (179, 131), (179, 132), (179, 133), (179, 134), (179, 135), (179, 136), (179, 137), (179, 139), (180, 65), (180, 67), (180, 68), (180, 69), (180, 70), (180, 71), (180, 72), (180, 73), (180, 74), (180, 75), (180, 76), (180, 77), (180, 78), (180, 79), (180, 80), (180, 81), (180, 82), (180, 83), (180, 86), (180, 119), (180, 121), (180, 122), (180, 123), (180, 124), (180, 125), (180, 126), (180, 127), (180, 128), (180, 129), (180, 130), (180, 131), (180, 132), (180, 133), (180, 134), (180, 135), (180, 136), (180, 137), (180, 138), (180, 140), (181, 66), (181, 84), (181, 85), (181, 119), (181, 121), (181, 122), (181, 123), (181, 124), (181, 125), (181, 126), (181, 127), (181, 128), (181, 129), (181, 130), (181, 131), (181, 132), (181, 133), (181, 134), (181, 135), (181, 136), (181, 137), (181, 138), (181, 141), (182, 67), (182, 69), (182, 70), (182, 71), (182, 72), (182, 73), (182, 74), (182, 75), (182, 76), (182, 77), (182, 78), (182, 79), (182, 80), (182, 81), (182, 83), (182, 118), (182, 119), (182, 120), (182, 121), (182, 122), (182, 123), (182, 124), (182, 125), (182, 126), (182, 127), (182, 128), (182, 129), (182, 130), (182, 131), (182, 132), (182, 133), (182, 134), (182, 135), (182, 136), (182, 137), (182, 138), (182, 139), (182, 141), (183, 118), (183, 120), (183, 121), (183, 122), (183, 123), (183, 124), (183, 125), (183, 126), (183, 127), (183, 128), (183, 129), (183, 130), (183, 131), (183, 132), (183, 133), (183, 134), (183, 135), (183, 136), (183, 137), (183, 138), (183, 139), (183, 140), (183, 142), (184, 118), (184, 120), (184, 121), (184, 122), (184, 123), (184, 124), (184, 125), (184, 126), (184, 127), (184, 128), (184, 129), (184, 130), (184, 131), (184, 132), (184, 133), (184, 134), (184, 135), (184, 136), (184, 137), (184, 138), (184, 139), (184, 140), (184, 141), (184, 143), (185, 118), (185, 120), (185, 121), (185, 122), (185, 123), (185, 124), (185, 125), (185, 126), (185, 127), (185, 128), (185, 129), (185, 130), (185, 134), (185, 135), (185, 136), (185, 137), (185, 138), (185, 139), (185, 140), (185, 141), (185, 143), (186, 118), (186, 131), (186, 132), (186, 135), (186, 136), (186, 137), (186, 138), (186, 139), (186, 140), (186, 141), (186, 142), (186, 144), (187, 118), (187, 120), (187, 121), (187, 122), (187, 123), (187, 124), (187, 125), (187, 126), (187, 127), (187, 128), (187, 129), (187, 130), (187, 134), (187, 136), (187, 137), (187, 138), (187, 139), (187, 140), (187, 141), (187, 142), (187, 143), (187, 145), (188, 135), (188, 137), (188, 138), (188, 139), (188, 140), (188, 141), (188, 142), (188, 143), (188, 144), (188, 146), (189, 135), (189, 137), (189, 138), (189, 139), (189, 140), (189, 141), (189, 142), (189, 143), (189, 144), (189, 146), (190, 135), (190, 136), (190, 137), (190, 138), (190, 139), (190, 140), (190, 141), (190, 142), (190, 143), (190, 144), (190, 145), (190, 147), (191, 136), (191, 138), (191, 139), (191, 140), (191, 141), (191, 142), (191, 143), (191, 144), (191, 145), (191, 146), (191, 148), (192, 136), (192, 138), (192, 139), (192, 140), (192, 141), (192, 142), (192, 143), (192, 144), (192, 145), (192, 146), (192, 148), (193, 136), (193, 138), (193, 139), (193, 140), (193, 141), (193, 142), (193, 143), (193, 144), (193, 145), (193, 146), (193, 147), (193, 149), (194, 136), (194, 138), (194, 139), (194, 140), (194, 141), (194, 142), (194, 143), (194, 144), (194, 145), (194, 146), (194, 147), (194, 148), (194, 150), (195, 136), (195, 138), (195, 139), (195, 140), (195, 141), (195, 142), (195, 143), (195, 144), (195, 145), (195, 146), (195, 147), (195, 148), (195, 149), (196, 136), (196, 138), (196, 139), (196, 140), (196, 141), (196, 142), (196, 143), (196, 144), (196, 145), (196, 146), (196, 147), (196, 148), (196, 149), (196, 151), (197, 136), (197, 138), (197, 139), (197, 140), (197, 141), (197, 142), (197, 143), (197, 144), (197, 145), (197, 146), (197, 147), (197, 148), (197, 149), (197, 150), (197, 152), (198, 136), (198, 138), (198, 139), (198, 140), (198, 141), (198, 142), (198, 143), (198, 144), (198, 145), (198, 146), (198, 147), (198, 148), (198, 149), (198, 150), (198, 152), (199, 136), (199, 138), (199, 139), (199, 140), (199, 141), (199, 142), (199, 143), (199, 144), (199, 145), (199, 146), (199, 147), (199, 148), (199, 149), (199, 150), (199, 152), (200, 136), (200, 138), (200, 139), (200, 140), (200, 141), (200, 142), (200, 143), (200, 144), (200, 145), (200, 146), (200, 147), (200, 148), (200, 149), (200, 150), (200, 152), (201, 136), (201, 138), (201, 139), (201, 140), (201, 141), (201, 142), (201, 143), (201, 144), (201, 145), (201, 146), (201, 147), (201, 148), (201, 149), (201, 150), (201, 152), (202, 136), (202, 138), (202, 139), (202, 140), (202, 141), (202, 142), (202, 143), (202, 144), (202, 145), (202, 146), (202, 147), (202, 148), (202, 149), (202, 150), (202, 152), (203, 136), (203, 138), (203, 139), (203, 140), (203, 141), (203, 142), (203, 143), (203, 144), (203, 145), (203, 146), (203, 147), (203, 148), (203, 149), (203, 151), (204, 136), (204, 138), (204, 139), (204, 140), (204, 141), (204, 142), (204, 143), (204, 144), (204, 145), (204, 146), (204, 147), (204, 148), (204, 150), (205, 136), (205, 138), (205, 139), (205, 140), (205, 141), (205, 142), (205, 143), (205, 144), (205, 145), (205, 146), (205, 147), (205, 148), (205, 150), (206, 136), (206, 138), (206, 139), (206, 140), (206, 141), (206, 142), (206, 143), (206, 144), (206, 145), (206, 146), (206, 147), (206, 149), (207, 136), (207, 138), (207, 139), (207, 140), (207, 141), (207, 142), (207, 143), (207, 144), (207, 145), (207, 146), (207, 148), (208, 136), (208, 138), (208, 139), (208, 140), (208, 141), (208, 142), (208, 143), (208, 144), (208, 145), (208, 146), (208, 148), (209, 135), (209, 137), (209, 138), (209, 139), (209, 140), (209, 141), (209, 142), (209, 143), (209, 144), (209, 145), (209, 147), (210, 135), (210, 137), (210, 138), (210, 139), (210, 140), (210, 141), (210, 142), (210, 143), (210, 144), (210, 146), (211, 135), (211, 137), (211, 138), (211, 139), (211, 140), (211, 141), (211, 142), (211, 143), (211, 145), (212, 118), (212, 120), (212, 121), (212, 122), (212, 123), (212, 124), (212, 125), (212, 126), (212, 127), (212, 128), (212, 129), (212, 130), (212, 134), (212, 135), (212, 136), (212, 137), (212, 138), (212, 139), (212, 140), (212, 141), (212, 142), (212, 143), (212, 145), (213, 118), (213, 131), (213, 132), (213, 135), (213, 136), (213, 137), (213, 138), (213, 139), (213, 140), (213, 141), (213, 142), (213, 144), (214, 118), (214, 120), (214, 121), (214, 122), (214, 123), (214, 124), (214, 125), (214, 126), (214, 127), (214, 128), (214, 129), (214, 130), (214, 134), (214, 135), (214, 136), (214, 137), (214, 138), (214, 139), (214, 140), (214, 141), (214, 143), (215, 118), (215, 120), (215, 121), (215, 122), (215, 123), (215, 124), (215, 125), (215, 126), (215, 127), (215, 128), (215, 129), (215, 130), (215, 131), (215, 132), (215, 133), (215, 134), (215, 135), (215, 136), (215, 137), (215, 138), (215, 139), (215, 140), (215, 141), (215, 143), (216, 118), (216, 120), (216, 121), (216, 122), (216, 123), (216, 124), (216, 125), (216, 126), (216, 127), (216, 128), (216, 129), (216, 130), (216, 131), (216, 132), (216, 133), (216, 134), (216, 135), (216, 136), (216, 137), (216, 138), (216, 139), (216, 140), (216, 142), (217, 67), (217, 69), (217, 70), (217, 71), (217, 72), (217, 73), (217, 74), (217, 75), (217, 76), (217, 77), (217, 78), (217, 79), (217, 80), (217, 81), (217, 83), (217, 118), (217, 119), (217, 120), (217, 121), (217, 122), (217, 123), (217, 124), (217, 125), (217, 126), (217, 127), (217, 128), (217, 129), (217, 130), (217, 131), (217, 132), (217, 133), (217, 134), (217, 135), (217, 136), (217, 137), (217, 138), (217, 139), (217, 141), (218, 66), (218, 85), (218, 119), (218, 121), (218, 122), (218, 123), (218, 124), (218, 125), (218, 126), (218, 127), (218, 128), (218, 129), (218, 130), (218, 131), (218, 132), (218, 133), (218, 134), (218, 135), (218, 136), (218, 137), (218, 138), (219, 65), (219, 67), (219, 68), (219, 69), (219, 70), (219, 71), (219, 72), (219, 73), (219, 74), (219, 75), (219, 76), (219, 77), (219, 78), (219, 79), (219, 80), (219, 81), (219, 82), (219, 83), (219, 86), (219, 119), (219, 121), (219, 122), (219, 123), (219, 124), (219, 125), (219, 126), (219, 127), (219, 128), (219, 129), (219, 130), (219, 131), (219, 132), (219, 133), (219, 134), (219, 135), (219, 136), (219, 137), (219, 138), (219, 140), (220, 65), (220, 67), (220, 68), (220, 69), (220, 70), (220, 71), (220, 72), (220, 73), (220, 74), (220, 75), (220, 76), (220, 77), (220, 78), (220, 79), (220, 80), (220, 81), (220, 82), (220, 83), (220, 84), (220, 85), (220, 88), (220, 119), (220, 121), (220, 122), (220, 123), (220, 124), (220, 125), (220, 126), (220, 127), (220, 128), (220, 129), (220, 130), (220, 131), (220, 132), (220, 133), (220, 134), (220, 135), (220, 136), (220, 137), (220, 139), (221, 65), (221, 67), (221, 68), (221, 69), (221, 70), (221, 71), (221, 72), (221, 73), (221, 74), (221, 75), (221, 76), (221, 77), (221, 78), (221, 79), (221, 80), (221, 81), (221, 82), (221, 83), (221, 84), (221, 85), (221, 86), (221, 88), (221, 119), (221, 121), (221, 122), (221, 123), (221, 124), (221, 125), (221, 126), (221, 127), (221, 128), (221, 129), (221, 130), (221, 131), (221, 132), (221, 133), (221, 134), (221, 135), (221, 136), (221, 138), (222, 65), (222, 67), (222, 68), (222, 69), (222, 70), (222, 71), (222, 72), (222, 73), (222, 74), (222, 75), (222, 76), (222, 77), (222, 78), (222, 79), (222, 80), (222, 81), (222, 82), (222, 83), (222, 84), (222, 85), (222, 86), (222, 88), (222, 119), (222, 121), (222, 122), (222, 123), (222, 124), (222, 125), (222, 126), (222, 127), (222, 128), (222, 129), (222, 130), (222, 131), (222, 132), (222, 133), (222, 134), (222, 135), (222, 137), (223, 65), (223, 67), (223, 68), (223, 69), (223, 70), (223, 71), (223, 72), (223, 73), (223, 74), (223, 75), (223, 76), (223, 77), (223, 78), (223, 79), (223, 80), (223, 81), (223, 82), (223, 83), (223, 84), (223, 85), (223, 86), (223, 88), (223, 120), (223, 122), (223, 123), (223, 124), (223, 125), (223, 126), (223, 127), (223, 128), (223, 129), (223, 130), (223, 131), (223, 132), (223, 133), (223, 134), (223, 136), (224, 66), (224, 68), (224, 69), (224, 70), (224, 71), (224, 72), (224, 73), (224, 74), (224, 75), (224, 76), (224, 77), (224, 78), (224, 79), (224, 80), (224, 81), (224, 82), (224, 83), (224, 84), (224, 85), (224, 86), (224, 88), (224, 120), (224, 122), (224, 123), (224, 124), (224, 125), (224, 126), (224, 127), (224, 128), (224, 129), (224, 130), (224, 131), (224, 132), (224, 133), (224, 134), (224, 136), (225, 66), (225, 68), (225, 69), (225, 70), (225, 71), (225, 72), (225, 73), (225, 74), (225, 75), (225, 76), (225, 77), (225, 78), (225, 79), (225, 80), (225, 81), (225, 82), (225, 83), (225, 84), (225, 85), (225, 86), (225, 88), (225, 120), (225, 122), (225, 123), (225, 124), (225, 125), (225, 126), (225, 127), (225, 128), (225, 129), (225, 130), (225, 131), (225, 132), (225, 133), (225, 134), (225, 136), (226, 66), (226, 68), (226, 69), (226, 70), (226, 71), (226, 72), (226, 73), (226, 74), (226, 75), (226, 76), (226, 77), (226, 78), (226, 79), (226, 80), (226, 81), (226, 82), (226, 83), (226, 84), (226, 85), (226, 86), (226, 87), (226, 89), (226, 120), (226, 122), (226, 123), (226, 124), (226, 125), (226, 126), (226, 127), (226, 128), (226, 129), (226, 130), (226, 131), (226, 132), (226, 133), (226, 134), (226, 135), (226, 137), (227, 67), (227, 69), (227, 70), (227, 71), (227, 72), (227, 73), (227, 74), (227, 75), (227, 76), (227, 77), (227, 78), (227, 79), (227, 80), (227, 81), (227, 82), (227, 83), (227, 84), (227, 85), (227, 86), (227, 87), (227, 89), (227, 120), (227, 122), (227, 123), (227, 124), (227, 125), (227, 126), (227, 127), (227, 128), (227, 129), (227, 130), (227, 131), (227, 132), (227, 133), (227, 134), (227, 136), (228, 67), (228, 69), (228, 70), (228, 71), (228, 72), (228, 73), (228, 74), (228, 75), (228, 76), (228, 77), (228, 78), (228, 79), (228, 80), (228, 81), (228, 82), (228, 83), (228, 84), (228, 85), (228, 86), (228, 87), (228, 88), (228, 90), (228, 120), (228, 122), (228, 123), (228, 124), (228, 125), (228, 126), (228, 127), (228, 128), (228, 129), (228, 130), (228, 131), (228, 132), (228, 133), (228, 134), (228, 136), (229, 68), (229, 69), (229, 70), (229, 71), (229, 72), (229, 73), (229, 74), (229, 75), (229, 76), (229, 77), (229, 78), (229, 79), (229, 80), (229, 81), (229, 82), (229, 83), (229, 84), (229, 85), (229, 86), (229, 87), (229, 88), (229, 90), (229, 120), (229, 122), (229, 123), (229, 124), (229, 125), (229, 126), (229, 127), (229, 128), (229, 129), (229, 130), (229, 131), (229, 132), (229, 133), (229, 134), (229, 136), (230, 68), (230, 70), (230, 71), (230, 72), (230, 73), (230, 74), (230, 75), (230, 76), (230, 77), (230, 78), (230, 79), (230, 80), (230, 81), (230, 82), (230, 83), (230, 84), (230, 85), (230, 86), (230, 87), (230, 88), (230, 89), (230, 91), (230, 120), (230, 122), (230, 123), (230, 124), (230, 125), (230, 126), (230, 127), (230, 128), (230, 129), (230, 130), (230, 131), (230, 132), (230, 133), (230, 135), (231, 68), (231, 70), (231, 71), (231, 72), (231, 73), (231, 74), (231, 75), (231, 76), (231, 77), (231, 78), (231, 79), (231, 80), (231, 81), (231, 82), (231, 83), (231, 84), (231, 85), (231, 86), (231, 87), (231, 88), (231, 89), (231, 90), (231, 92), (231, 119), (231, 121), (231, 122), (231, 123), (231, 124), (231, 125), (231, 126), (231, 127), (231, 128), (231, 129), (231, 130), (231, 131), (231, 132), (231, 133), (231, 135), (231, 185), (231, 186), (231, 187), (231, 188), (231, 189), (232, 69), (232, 71), (232, 72), (232, 73), (232, 74), (232, 75), (232, 76), (232, 77), (232, 78), (232, 79), (232, 80), (232, 81), (232, 82), (232, 83), (232, 84), (232, 85), (232, 86), (232, 87), (232, 88), (232, 89), (232, 90), (232, 91), (232, 93), (232, 119), (232, 121), (232, 122), (232, 123), (232, 124), (232, 125), (232, 126), (232, 127), (232, 128), (232, 129), (232, 130), (232, 131), (232, 132), (232, 134), (232, 181), (232, 182), (232, 183), (232, 184), (232, 190), (232, 192), (233, 69), (233, 71), (233, 72), (233, 73), (233, 74), (233, 75), (233, 76), (233, 77), (233, 78), (233, 79), (233, 80), (233, 81), (233, 82), (233, 83), (233, 84), (233, 85), (233, 86), (233, 87), (233, 88), (233, 89), (233, 90), (233, 91), (233, 94), (233, 118), (233, 120), (233, 121), (233, 122), (233, 123), (233, 124), (233, 125), (233, 126), (233, 127), (233, 128), (233, 129), (233, 130), (233, 131), (233, 132), (233, 134), (233, 178), (233, 179), (233, 185), (233, 186), (233, 187), (233, 188), (233, 189), (233, 190), (233, 192), (234, 70), (234, 72), (234, 73), (234, 74), (234, 75), (234, 76), (234, 77), (234, 78), (234, 79), (234, 80), (234, 81), (234, 82), (234, 83), (234, 84), (234, 85), (234, 86), (234, 87), (234, 88), (234, 89), (234, 90), (234, 91), (234, 92), (234, 95), (234, 117), (234, 119), (234, 120), (234, 121), (234, 122), (234, 123), (234, 124), (234, 125), (234, 126), (234, 127), (234, 128), (234, 129), (234, 130), (234, 131), (234, 133), (234, 175), (234, 180), (234, 181), (234, 182), (234, 183), (234, 184), (234, 185), (234, 186), (234, 187), (234, 188), (234, 189), (234, 190), (234, 191), (234, 193), (235, 70), (235, 72), (235, 73), (235, 74), (235, 75), (235, 76), (235, 77), (235, 78), (235, 79), (235, 80), (235, 81), (235, 82), (235, 83), (235, 84), (235, 85), (235, 86), (235, 87), (235, 88), (235, 89), (235, 90), (235, 91), (235, 92), (235, 93), (235, 96), (235, 116), (235, 118), (235, 119), (235, 120), (235, 121), (235, 122), (235, 123), (235, 124), (235, 125), (235, 126), (235, 127), (235, 128), (235, 129), (235, 130), (235, 131), (235, 133), (235, 173), (235, 177), (235, 178), (235, 179), (235, 180), (235, 181), (235, 182), (235, 183), (235, 184), (235, 185), (235, 186), (235, 187), (235, 188), (235, 189), (235, 192), (236, 71), (236, 73), (236, 74), (236, 75), (236, 76), (236, 77), (236, 78), (236, 79), (236, 80), (236, 81), (236, 82), (236, 83), (236, 84), (236, 85), (236, 86), (236, 87), (236, 88), (236, 89), (236, 90), (236, 91), (236, 92), (236, 93), (236, 94), (236, 95), (236, 98), (236, 113), (236, 114), (236, 117), (236, 118), (236, 119), (236, 120), (236, 121), (236, 122), (236, 123), (236, 124), (236, 125), (236, 126), (236, 127), (236, 128), (236, 129), (236, 130), (236, 132), (236, 171), (236, 175), (236, 176), (236, 177), (236, 178), (236, 179), (236, 180), (236, 181), (236, 182), (236, 183), (236, 184), (236, 185), (236, 186), (236, 187), (236, 191), (237, 72), (237, 73), (237, 74), (237, 75), (237, 76), (237, 77), (237, 78), (237, 79), (237, 80), (237, 81), (237, 82), (237, 83), (237, 84), (237, 85), (237, 86), (237, 87), (237, 88), (237, 89), (237, 90), (237, 91), (237, 92), (237, 93), (237, 94), (237, 95), (237, 96), (237, 99), (237, 100), (237, 101), (237, 102), (237, 107), (237, 108), (237, 109), (237, 110), (237, 111), (237, 112), (237, 116), (237, 117), (237, 118), (237, 119), (237, 120), (237, 121), (237, 122), (237, 123), (237, 124), (237, 125), (237, 126), (237, 127), (237, 128), (237, 129), (237, 130), (237, 132), (237, 170), (237, 173), (237, 174), (237, 175), (237, 176), (237, 177), (237, 178), (237, 179), (237, 180), (237, 181), (237, 182), (237, 183), (237, 184), (237, 185), (237, 189), (238, 72), (238, 74), (238, 75), (238, 76), (238, 77), (238, 78), (238, 79), (238, 80), (238, 81), (238, 82), (238, 83), (238, 84), (238, 85), (238, 86), (238, 87), (238, 88), (238, 89), (238, 90), (238, 91), (238, 92), (238, 93), (238, 94), (238, 95), (238, 96), (238, 97), (238, 98), (238, 103), (238, 104), (238, 105), (238, 106), (238, 107), (238, 113), (238, 114), (238, 115), (238, 116), (238, 117), (238, 118), (238, 119), (238, 120), (238, 121), (238, 122), (238, 123), (238, 124), (238, 125), (238, 126), (238, 127), (238, 128), (238, 129), (238, 130), (238, 132), (238, 169), (238, 171), (238, 172), (238, 173), (238, 174), (238, 175), (238, 176), (238, 177), (238, 178), (238, 179), (238, 180), (238, 181), (238, 182), (238, 187), (239, 73), (239, 75), (239, 76), (239, 77), (239, 78), (239, 79), (239, 80), (239, 81), (239, 82), (239, 83), (239, 84), (239, 85), (239, 86), (239, 87), (239, 88), (239, 89), (239, 90), (239, 91), (239, 92), (239, 93), (239, 94), (239, 95), (239, 96), (239, 97), (239, 98), (239, 99), (239, 100), (239, 101), (239, 102), (239, 107), (239, 108), (239, 109), (239, 110), (239, 111), (239, 112), (239, 113), (239, 114), (239, 115), (239, 116), (239, 117), (239, 118), (239, 119), (239, 120), (239, 121), (239, 122), (239, 123), (239, 124), (239, 125), (239, 126), (239, 127), (239, 128), (239, 129), (239, 131), (239, 168), (239, 170), (239, 171), (239, 172), (239, 173), (239, 174), (239, 175), (239, 176), (239, 177), (239, 178), (239, 179), (239, 180), (239, 181), (239, 184), (239, 185), (240, 73), (240, 75), (240, 76), (240, 77), (240, 78), (240, 79), (240, 80), (240, 81), (240, 82), (240, 83), (240, 84), (240, 85), (240, 86), (240, 87), (240, 88), (240, 89), (240, 90), (240, 91), (240, 92), (240, 93), (240, 94), (240, 95), (240, 96), (240, 97), (240, 98), (240, 99), (240, 100), (240, 101), (240, 102), (240, 103), (240, 104), (240, 105), (240, 106), (240, 107), (240, 108), (240, 109), (240, 110), (240, 111), (240, 112), (240, 113), (240, 114), (240, 115), (240, 116), (240, 117), (240, 118), (240, 119), (240, 120), (240, 121), (240, 122), (240, 123), (240, 124), (240, 125), (240, 126), (240, 127), (240, 128), (240, 129), (240, 131), (240, 167), (240, 169), (240, 170), (240, 171), (240, 172), (240, 173), (240, 174), (240, 175), (240, 176), (240, 177), (240, 178), (240, 179), (240, 182), (241, 74), (241, 76), (241, 77), (241, 78), (241, 79), (241, 80), (241, 81), (241, 82), (241, 83), (241, 84), (241, 85), (241, 86), (241, 87), (241, 88), (241, 89), (241, 90), (241, 91), (241, 92), (241, 93), (241, 94), (241, 95), (241, 96), (241, 97), (241, 98), (241, 99), (241, 100), (241, 101), (241, 102), (241, 103), (241, 104), (241, 105), (241, 106), (241, 107), (241, 108), (241, 109), (241, 110), (241, 111), (241, 112), (241, 113), (241, 114), (241, 115), (241, 116), (241, 117), (241, 118), (241, 119), (241, 120), (241, 121), (241, 122), (241, 123), (241, 124), (241, 125), (241, 126), (241, 127), (241, 128), (241, 129), (241, 131), (241, 167), (241, 169), (241, 170), (241, 171), (241, 172), (241, 173), (241, 174), (241, 175), (241, 176), (241, 177), (241, 178), (241, 181), (242, 74), (242, 76), (242, 77), (242, 78), (242, 79), (242, 80), (242, 81), (242, 82), (242, 83), (242, 84), (242, 85), (242, 86), (242, 87), (242, 88), (242, 89), (242, 90), (242, 91), (242, 92), (242, 93), (242, 94), (242, 95), (242, 96), (242, 97), (242, 98), (242, 99), (242, 100), (242, 101), (242, 102), (242, 103), (242, 104), (242, 105), (242, 106), (242, 107), (242, 108), (242, 109), (242, 110), (242, 111), (242, 112), (242, 113), (242, 114), (242, 115), (242, 116), (242, 117), (242, 118), (242, 119), (242, 120), (242, 121), (242, 122), (242, 123), (242, 124), (242, 125), (242, 126), (242, 127), (242, 128), (242, 129), (242, 131), (242, 166), (242, 168), (242, 169), (242, 170), (242, 171), (242, 172), (242, 173), (242, 174), (242, 175), (242, 176), (242, 177), (243, 75), (243, 77), (243, 78), (243, 79), (243, 80), (243, 81), (243, 82), (243, 83), (243, 84), (243, 85), (243, 86), (243, 87), (243, 88), (243, 89), (243, 90), (243, 91), (243, 92), (243, 93), (243, 94), (243, 95), (243, 96), (243, 97), (243, 98), (243, 99), (243, 100), (243, 101), (243, 102), (243, 103), (243, 104), (243, 105), (243, 106), (243, 107), (243, 108), (243, 109), (243, 110), (243, 111), (243, 112), (243, 113), (243, 114), (243, 115), (243, 116), (243, 117), (243, 118), (243, 119), (243, 120), (243, 121), (243, 122), (243, 123), (243, 124), (243, 125), (243, 126), (243, 127), (243, 128), (243, 129), (243, 131), (243, 166), (243, 168), (243, 169), (243, 170), (243, 171), (243, 172), (243, 173), (243, 174), (243, 175), (243, 176), (244, 75), (244, 77), (244, 78), (244, 79), (244, 80), (244, 81), (244, 82), (244, 83), (244, 84), (244, 85), (244, 86), (244, 87), (244, 88), (244, 89), (244, 90), (244, 91), (244, 92), (244, 93), (244, 94), (244, 95), (244, 96), (244, 97), (244, 98), (244, 99), (244, 100), (244, 101), (244, 102), (244, 103), (244, 104), (244, 105), (244, 106), (244, 107), (244, 108), (244, 109), (244, 110), (244, 111), (244, 112), (244, 113), (244, 114), (244, 115), (244, 116), (244, 117), (244, 118), (244, 119), (244, 120), (244, 121), (244, 122), (244, 123), (244, 124), (244, 125), (244, 126), (244, 127), (244, 128), (244, 129), (244, 131), (244, 165), (244, 167), (244, 168), (244, 169), (244, 170), (244, 171), (244, 172), (244, 173), (244, 174), (244, 175), (244, 176), (244, 178), (245, 76), (245, 78), (245, 79), (245, 80), (245, 81), (245, 82), (245, 83), (245, 84), (245, 85), (245, 86), (245, 87), (245, 88), (245, 89), (245, 90), (245, 91), (245, 92), (245, 93), (245, 94), (245, 95), (245, 96), (245, 97), (245, 98), (245, 99), (245, 100), (245, 101), (245, 102), (245, 103), (245, 104), (245, 105), (245, 106), (245, 107), (245, 108), (245, 109), (245, 110), (245, 111), (245, 112), (245, 113), (245, 114), (245, 115), (245, 116), (245, 117), (245, 118), (245, 119), (245, 120), (245, 121), (245, 122), (245, 123), (245, 124), (245, 125), (245, 126), (245, 127), (245, 128), (245, 129), (245, 131), (245, 164), (245, 166), (245, 167), (245, 168), (245, 169), (245, 170), (245, 171), (245, 172), (245, 173), (245, 174), (245, 175), (245, 177), (246, 77), (246, 79), (246, 80), (246, 81), (246, 82), (246, 83), (246, 84), (246, 85), (246, 86), (246, 87), (246, 88), (246, 89), (246, 90), (246, 91), (246, 92), (246, 93), (246, 94), (246, 95), (246, 96), (246, 97), (246, 98), (246, 99), (246, 100), (246, 101), (246, 102), (246, 103), (246, 104), (246, 105), (246, 106), (246, 107), (246, 108), (246, 109), (246, 110), (246, 111), (246, 112), (246, 113), (246, 114), (246, 115), (246, 116), (246, 117), (246, 118), (246, 119), (246, 120), (246, 121), (246, 122), (246, 123), (246, 124), (246, 125), (246, 126), (246, 127), (246, 128), (246, 129), (246, 131), (246, 164), (246, 166), (246, 167), (246, 168), (246, 169), (246, 170), (246, 171), (246, 172), (246, 173), (246, 174), (246, 176), (247, 77), (247, 79), (247, 80), (247, 81), (247, 82), (247, 83), (247, 84), (247, 85), (247, 86), (247, 87), (247, 88), (247, 89), (247, 90), (247, 91), (247, 92), (247, 93), (247, 94), (247, 95), (247, 96), (247, 97), (247, 98), (247, 99), (247, 100), (247, 101), (247, 102), (247, 103), (247, 104), (247, 105), (247, 106), (247, 107), (247, 108), (247, 109), (247, 110), (247, 111), (247, 112), (247, 113), (247, 114), (247, 115), (247, 116), (247, 117), (247, 118), (247, 119), (247, 120), (247, 121), (247, 122), (247, 123), (247, 124), (247, 125), (247, 126), (247, 127), (247, 128), (247, 129), (247, 130), (247, 132), (247, 163), (247, 165), (247, 166), (247, 167), (247, 168), (247, 169), (247, 170), (247, 171), (247, 172), (247, 173), (247, 175), (248, 78), (248, 80), (248, 81), (248, 82), (248, 83), (248, 84), (248, 85), (248, 86), (248, 87), (248, 88), (248, 89), (248, 90), (248, 91), (248, 92), (248, 93), (248, 94), (248, 95), (248, 96), (248, 97), (248, 98), (248, 99), (248, 100), (248, 101), (248, 102), (248, 103), (248, 104), (248, 105), (248, 106), (248, 107), (248, 108), (248, 109), (248, 110), (248, 111), (248, 112), (248, 113), (248, 114), (248, 115), (248, 116), (248, 117), (248, 118), (248, 119), (248, 120), (248, 121), (248, 122), (248, 123), (248, 124), (248, 125), (248, 126), (248, 127), (248, 128), (248, 129), (248, 130), (248, 132), (248, 162), (248, 164), (248, 165), (248, 166), (248, 167), (248, 168), (248, 169), (248, 170), (248, 171), (248, 172), (248, 173), (248, 175), (249, 78), (249, 80), (249, 81), (249, 82), (249, 83), (249, 84), (249, 85), (249, 86), (249, 87), (249, 88), (249, 89), (249, 90), (249, 91), (249, 92), (249, 93), (249, 94), (249, 95), (249, 96), (249, 97), (249, 98), (249, 99), (249, 100), (249, 101), (249, 102), (249, 103), (249, 104), (249, 105), (249, 106), (249, 107), (249, 108), (249, 109), (249, 110), (249, 111), (249, 112), (249, 113), (249, 114), (249, 115), (249, 116), (249, 117), (249, 118), (249, 119), (249, 120), (249, 121), (249, 122), (249, 123), (249, 124), (249, 125), (249, 126), (249, 127), (249, 128), (249, 129), (249, 130), (249, 131), (249, 133), (249, 161), (249, 163), (249, 164), (249, 165), (249, 166), (249, 167), (249, 168), (249, 169), (249, 170), (249, 171), (249, 172), (249, 174), (250, 79), (250, 81), (250, 82), (250, 83), (250, 84), (250, 85), (250, 86), (250, 87), (250, 88), (250, 89), (250, 90), (250, 91), (250, 92), (250, 93), (250, 94), (250, 95), (250, 96), (250, 97), (250, 98), (250, 99), (250, 100), (250, 101), (250, 102), (250, 103), (250, 104), (250, 105), (250, 106), (250, 107), (250, 108), (250, 109), (250, 110), (250, 111), (250, 112), (250, 113), (250, 114), (250, 115), (250, 116), (250, 117), (250, 118), (250, 119), (250, 120), (250, 121), (250, 122), (250, 123), (250, 124), (250, 125), (250, 126), (250, 127), (250, 128), (250, 129), (250, 130), (250, 131), (250, 133), (250, 160), (250, 162), (250, 163), (250, 164), (250, 165), (250, 166), (250, 167), (250, 168), (250, 169), (250, 170), (250, 171), (250, 173), (251, 79), (251, 81), (251, 82), (251, 83), (251, 84), (251, 85), (251, 86), (251, 87), (251, 88), (251, 89), (251, 90), (251, 91), (251, 92), (251, 93), (251, 94), (251, 95), (251, 96), (251, 97), (251, 98), (251, 99), (251, 100), (251, 101), (251, 102), (251, 103), (251, 104), (251, 105), (251, 106), (251, 107), (251, 108), (251, 109), (251, 110), (251, 111), (251, 112), (251, 113), (251, 114), (251, 115), (251, 116), (251, 117), (251, 118), (251, 119), (251, 120), (251, 121), (251, 122), (251, 123), (251, 124), (251, 125), (251, 126), (251, 127), (251, 128), (251, 129), (251, 130), (251, 131), (251, 132), (251, 134), (251, 159), (251, 161), (251, 162), (251, 163), (251, 164), (251, 165), (251, 166), (251, 167), (251, 168), (251, 169), (251, 170), (251, 171), (251, 173), (252, 80), (252, 82), (252, 83), (252, 84), (252, 85), (252, 86), (252, 87), (252, 88), (252, 89), (252, 90), (252, 91), (252, 92), (252, 93), (252, 94), (252, 95), (252, 96), (252, 97), (252, 98), (252, 99), (252, 100), (252, 101), (252, 102), (252, 103), (252, 104), (252, 105), (252, 106), (252, 107), (252, 108), (252, 109), (252, 110), (252, 111), (252, 112), (252, 113), (252, 114), (252, 115), (252, 116), (252, 117), (252, 118), (252, 119), (252, 120), (252, 121), (252, 122), (252, 123), (252, 124), (252, 125), (252, 126), (252, 127), (252, 128), (252, 129), (252, 130), (252, 131), (252, 132), (252, 133), (252, 135), (252, 158), (252, 161), (252, 162), (252, 163), (252, 164), (252, 165), (252, 166), (252, 167), (252, 168), (252, 169), (252, 170), (252, 172), (253, 80), (253, 82), (253, 83), (253, 84), (253, 85), (253, 86), (253, 87), (253, 88), (253, 89), (253, 90), (253, 91), (253, 92), (253, 93), (253, 94), (253, 95), (253, 96), (253, 97), (253, 98), (253, 99), (253, 100), (253, 101), (253, 102), (253, 103), (253, 104), (253, 105), (253, 106), (253, 107), (253, 114), (253, 115), (253, 116), (253, 117), (253, 118), (253, 119), (253, 120), (253, 121), (253, 122), (253, 123), (253, 124), (253, 125), (253, 126), (253, 127), (253, 128), (253, 129), (253, 130), (253, 131), (253, 132), (253, 133), (253, 157), (253, 160), (253, 161), (253, 162), (253, 163), (253, 164), (253, 165), (253, 166), (253, 167), (253, 168), (253, 171), (254, 81), (254, 83), (254, 84), (254, 85), (254, 86), (254, 87), (254, 88), (254, 89), (254, 90), (254, 91), (254, 92), (254, 93), (254, 94), (254, 95), (254, 96), (254, 97), (254, 98), (254, 99), (254, 100), (254, 101), (254, 102), (254, 103), (254, 104), (254, 105), (254, 106), (254, 109), (254, 110), (254, 111), (254, 112), (254, 113), (254, 116), (254, 117), (254, 118), (254, 119), (254, 120), (254, 121), (254, 122), (254, 123), (254, 124), (254, 125), (254, 126), (254, 127), (254, 128), (254, 129), (254, 130), (254, 131), (254, 132), (254, 133), (254, 134), (254, 156), (254, 158), (254, 159), (254, 160), (254, 161), (254, 162), (254, 163), (254, 164), (254, 165), (254, 166), (254, 170), (255, 81), (255, 83), (255, 84), (255, 85), (255, 86), (255, 87), (255, 88), (255, 89), (255, 90), (255, 91), (255, 92), (255, 93), (255, 94), (255, 95), (255, 96), (255, 97), (255, 98), (255, 99), (255, 100), (255, 101), (255, 102), (255, 103), (255, 104), (255, 107), (255, 114), (255, 115), (255, 118), (255, 119), (255, 120), (255, 121), (255, 122), (255, 123), (255, 124), (255, 125), (255, 126), (255, 127), (255, 128), (255, 129), (255, 130), (255, 131), (255, 132), (255, 133), (255, 134), (255, 135), (255, 138), (255, 155), (255, 157), (255, 158), (255, 159), (255, 160), (255, 161), (255, 162), (255, 163), (255, 164), (255, 168), (256, 81), (256, 83), (256, 84), (256, 85), (256, 86), (256, 87), (256, 88), (256, 89), (256, 90), (256, 91), (256, 92), (256, 93), (256, 94), (256, 95), (256, 96), (256, 97), (256, 98), (256, 99), (256, 100), (256, 101), (256, 102), (256, 103), (256, 106), (256, 117), (256, 123), (256, 124), (256, 125), (256, 126), (256, 127), (256, 128), (256, 129), (256, 130), (256, 131), (256, 132), (256, 133), (256, 134), (256, 135), (256, 136), (256, 139), (256, 153), (256, 156), (256, 157), (256, 158), (256, 159), (256, 160), (256, 161), (256, 162), (256, 166), (257, 81), (257, 83), (257, 84), (257, 85), (257, 86), (257, 87), (257, 88), (257, 89), (257, 90), (257, 91), (257, 92), (257, 93), (257, 94), (257, 95), (257, 96), (257, 97), (257, 98), (257, 99), (257, 100), (257, 101), (257, 102), (257, 105), (257, 119), (257, 120), (257, 121), (257, 122), (257, 125), (257, 126), (257, 127), (257, 128), (257, 129), (257, 130), (257, 131), (257, 132), (257, 133), (257, 134), (257, 135), (257, 136), (257, 137), (257, 140), (257, 141), (257, 151), (257, 155), (257, 156), (257, 157), (257, 158), (257, 159), (257, 160), (257, 161), (257, 164), (258, 82), (258, 84), (258, 85), (258, 86), (258, 87), (258, 88), (258, 89), (258, 90), (258, 91), (258, 92), (258, 93), (258, 94), (258, 95), (258, 96), (258, 97), (258, 98), (258, 99), (258, 100), (258, 101), (258, 104), (258, 123), (258, 126), (258, 127), (258, 128), (258, 129), (258, 130), (258, 131), (258, 132), (258, 133), (258, 134), (258, 135), (258, 136), (258, 137), (258, 138), (258, 139), (258, 142), (258, 143), (258, 144), (258, 145), (258, 146), (258, 147), (258, 148), (258, 149), (258, 153), (258, 154), (258, 155), (258, 156), (258, 157), (258, 158), (258, 159), (258, 160), (258, 162), (259, 82), (259, 84), (259, 85), (259, 86), (259, 87), (259, 88), (259, 89), (259, 90), (259, 91), (259, 92), (259, 93), (259, 94), (259, 95), (259, 96), (259, 97), (259, 98), (259, 99), (259, 100), (259, 103), (259, 125), (259, 127), (259, 128), (259, 129), (259, 130), (259, 131), (259, 132), (259, 133), (259, 134), (259, 135), (259, 136), (259, 137), (259, 138), (259, 139), (259, 140), (259, 141), (259, 151), (259, 152), (259, 153), (259, 154), (259, 155), (259, 156), (259, 157), (259, 158), (259, 159), (259, 161), (260, 82), (260, 84), (260, 85), (260, 86), (260, 87), (260, 88), (260, 89), (260, 90), (260, 91), (260, 92), (260, 93), (260, 94), (260, 95), (260, 96), (260, 97), (260, 98), (260, 99), (260, 102), (260, 126), (260, 128), (260, 129), (260, 130), (260, 131), (260, 132), (260, 133), (260, 134), (260, 135), (260, 136), (260, 137), (260, 138), (260, 139), (260, 140), (260, 141), (260, 142), (260, 143), (260, 144), (260, 145), (260, 146), (260, 147), (260, 148), (260, 149), (260, 150), (260, 151), (260, 152), (260, 153), (260, 154), (260, 155), (260, 156), (260, 157), (260, 158), (260, 160), (261, 82), (261, 84), (261, 85), (261, 86), (261, 87), (261, 88), (261, 89), (261, 90), (261, 91), (261, 92), (261, 93), (261, 94), (261, 95), (261, 96), (261, 97), (261, 98), (261, 101), (261, 127), (261, 129), (261, 130), (261, 131), (261, 132), (261, 133), (261, 134), (261, 135), (261, 136), (261, 137), (261, 138), (261, 139), (261, 140), (261, 141), (261, 142), (261, 143), (261, 144), (261, 145), (261, 146), (261, 147), (261, 148), (261, 149), (261, 150), (261, 151), (261, 152), (261, 153), (261, 154), (261, 155), (261, 156), (261, 157), (261, 159), (262, 83), (262, 85), (262, 86), (262, 87), (262, 88), (262, 89), (262, 90), (262, 91), (262, 92), (262, 93), (262, 94), (262, 95), (262, 96), (262, 97), (262, 100), (262, 128), (262, 130), (262, 131), (262, 132), (262, 133), (262, 134), (262, 135), (262, 136), (262, 137), (262, 138), (262, 139), (262, 140), (262, 141), (262, 142), (262, 143), (262, 144), (262, 145), (262, 146), (262, 147), (262, 148), (262, 149), (262, 150), (262, 151), (262, 152), (262, 153), (262, 154), (262, 155), (262, 156), (262, 157), (262, 159), (263, 83), (263, 85), (263, 86), (263, 87), (263, 88), (263, 89), (263, 90), (263, 91), (263, 92), (263, 93), (263, 94), (263, 95), (263, 96), (263, 99), (263, 129), (263, 131), (263, 132), (263, 133), (263, 134), (263, 135), (263, 136), (263, 137), (263, 138), (263, 139), (263, 140), (263, 141), (263, 142), (263, 143), (263, 144), (263, 145), (263, 146), (263, 147), (263, 148), (263, 149), (263, 150), (263, 151), (263, 152), (263, 153), (263, 154), (263, 155), (263, 156), (263, 158), (264, 83), (264, 85), (264, 86), (264, 87), (264, 88), (264, 89), (264, 90), (264, 91), (264, 92), (264, 93), (264, 94), (264, 95), (264, 98), (264, 129), (264, 131), (264, 132), (264, 133), (264, 134), (264, 135), (264, 136), (264, 137), (264, 138), (264, 139), (264, 140), (264, 141), (264, 142), (264, 143), (264, 144), (264, 145), (264, 146), (264, 147), (264, 148), (264, 149), (264, 150), (264, 151), (264, 152), (264, 153), (264, 154), (264, 155), (264, 156), (264, 158), (265, 84), (265, 86), (265, 87), (265, 88), (265, 89), (265, 90), (265, 91), (265, 92), (265, 93), (265, 94), (265, 97), (265, 130), (265, 132), (265, 133), (265, 134), (265, 135), (265, 136), (265, 137), (265, 138), (265, 139), (265, 140), (265, 141), (265, 142), (265, 143), (265, 144), (265, 145), (265, 146), (265, 147), (265, 148), (265, 149), (265, 150), (265, 151), (265, 152), (265, 153), (265, 154), (265, 155), (265, 157), (266, 84), (266, 87), (266, 88), (266, 89), (266, 90), (266, 91), (266, 92), (266, 93), (266, 131), (266, 133), (266, 134), (266, 135), (266, 136), (266, 137), (266, 138), (266, 139), (266, 140), (266, 141), (266, 142), (266, 143), (266, 144), (266, 145), (266, 146), (266, 147), (266, 148), (266, 149), (266, 150), (266, 151), (266, 152), (266, 153), (266, 154), (266, 155), (266, 157), (267, 85), (267, 88), (267, 89), (267, 90), (267, 91), (267, 94), (267, 132), (267, 134), (267, 135), (267, 136), (267, 137), (267, 138), (267, 139), (267, 140), (267, 141), (267, 142), (267, 143), (267, 144), (267, 145), (267, 146), (267, 147), (267, 148), (267, 149), (267, 150), (267, 151), (267, 152), (267, 153), (267, 154), (267, 155), (267, 157), (268, 86), (268, 93), (268, 132), (268, 135), (268, 136), (268, 137), (268, 138), (268, 139), (268, 140), (268, 141), (268, 142), (268, 143), (268, 144), (268, 145), (268, 146), (268, 147), (268, 148), (268, 149), (268, 150), (268, 151), (268, 152), (268, 153), (268, 154), (268, 155), (268, 157), (269, 88), (269, 91), (269, 134), (269, 137), (269, 138), (269, 139), (269, 140), (269, 141), (269, 142), (269, 143), (269, 144), (269, 145), (269, 146), (269, 147), (269, 148), (269, 149), (269, 150), (269, 151), (269, 152), (269, 153), (269, 154), (269, 155), (269, 157), (270, 135), (270, 139), (270, 140), (270, 141), (270, 142), (270, 143), (270, 144), (270, 145), (270, 146), (270, 147), (270, 148), (270, 149), (270, 150), (270, 151), (270, 152), (270, 153), (270, 154), (270, 155), (270, 157), (271, 137), (271, 140), (271, 141), (271, 142), (271, 143), (271, 144), (271, 145), (271, 146), (271, 147), (271, 148), (271, 149), (271, 150), (271, 151), (271, 152), (271, 153), (271, 154), (271, 155), (271, 156), (271, 157), (271, 220), (272, 139), (272, 141), (272, 142), (272, 143), (272, 144), (272, 145), (272, 146), (272, 147), (272, 148), (272, 149), (272, 150), (272, 151), (272, 152), (272, 153), (272, 154), (272, 155), (272, 157), (272, 218), (272, 220), (273, 140), (273, 143), (273, 144), (273, 145), (273, 146), (273, 147), (273, 148), (273, 149), (273, 150), (273, 151), (273, 152), (273, 153), (273, 154), (273, 155), (273, 157), (273, 216), (273, 220), (274, 141), (274, 144), (274, 145), (274, 146), (274, 147), (274, 148), (274, 149), (274, 150), (274, 151), (274, 152), (274, 153), (274, 154), (274, 155), (274, 157), (274, 215), (274, 218), (274, 220), (275, 145), (275, 146), (275, 147), (275, 148), (275, 149), (275, 150), (275, 151), (275, 152), (275, 153), (275, 154), (275, 155), (275, 157), (275, 215), (275, 217), (275, 218), (275, 219), (275, 221), (276, 144), (276, 146), (276, 147), (276, 148), (276, 149), (276, 150), (276, 151), (276, 152), (276, 153), (276, 154), (276, 155), (276, 157), (276, 214), (276, 216), (276, 217), (276, 218), (276, 219), (276, 221), (277, 145), (277, 147), (277, 148), (277, 149), (277, 150), (277, 151), (277, 152), (277, 153), (277, 154), (277, 155), (277, 157), (277, 213), (277, 215), (277, 216), (277, 217), (277, 218), (277, 219), (277, 221), (278, 146), (278, 148), (278, 149), (278, 150), (278, 151), (278, 152), (278, 153), (278, 154), (278, 155), (278, 156), (278, 158), (278, 213), (278, 215), (278, 216), (278, 217), (278, 218), (278, 219), (278, 220), (278, 222), (279, 147), (279, 149), (279, 150), (279, 151), (279, 152), (279, 153), (279, 154), (279, 155), (279, 156), (279, 158), (279, 212), (279, 214), (279, 215), (279, 216), (279, 217), (279, 218), (279, 219), (279, 220), (279, 222), (280, 148), (280, 150), (280, 151), (280, 152), (280, 153), (280, 154), (280, 155), (280, 156), (280, 158), (280, 212), (280, 214), (280, 215), (280, 216), (280, 217), (280, 218), (280, 219), (280, 220), (280, 222), (281, 149), (281, 151), (281, 152), (281, 153), (281, 154), (281, 155), (281, 156), (281, 157), (281, 159), (281, 211), (281, 213), (281, 214), (281, 215), (281, 216), (281, 217), (281, 218), (281, 219), (281, 220), (281, 221), (281, 223), (282, 149), (282, 151), (282, 152), (282, 153), (282, 154), (282, 155), (282, 156), (282, 157), (282, 159), (282, 210), (282, 212), (282, 213), (282, 214), (282, 215), (282, 216), (282, 217), (282, 218), (282, 219), (282, 220), (282, 221), (282, 223), (283, 150), (283, 152), (283, 153), (283, 154), (283, 155), (283, 156), (283, 157), (283, 158), (283, 160), (283, 209), (283, 211), (283, 212), (283, 213), (283, 214), (283, 215), (283, 216), (283, 217), (283, 218), (283, 219), (283, 220), (283, 221), (283, 223), (284, 151), (284, 153), (284, 154), (284, 155), (284, 156), (284, 157), (284, 158), (284, 159), (284, 161), (284, 209), (284, 211), (284, 212), (284, 213), (284, 214), (284, 215), (284, 216), (284, 217), (284, 218), (284, 219), (284, 220), (284, 221), (284, 223), (285, 152), (285, 154), (285, 155), (285, 156), (285, 157), (285, 158), (285, 159), (285, 161), (285, 210), (285, 211), (285, 212), (285, 213), (285, 214), (285, 215), (285, 216), (285, 217), (285, 218), (285, 219), (285, 220), (285, 221), (285, 223), (286, 152), (286, 154), (286, 155), (286, 156), (286, 157), (286, 158), (286, 159), (286, 160), (286, 162), (286, 206), (286, 209), (286, 210), (286, 211), (286, 212), (286, 213), (286, 214), (286, 215), (286, 216), (286, 217), (286, 218), (286, 219), (286, 220), (286, 221), (286, 223), (287, 153), (287, 155), (287, 156), (287, 157), (287, 158), (287, 159), (287, 160), (287, 161), (287, 163), (287, 204), (287, 208), (287, 209), (287, 210), (287, 211), (287, 212), (287, 213), (287, 214), (287, 215), (287, 216), (287, 217), (287, 218), (287, 219), (287, 220), (287, 221), (287, 223), (288, 154), (288, 156), (288, 157), (288, 158), (288, 159), (288, 160), (288, 161), (288, 162), (288, 164), (288, 202), (288, 206), (288, 207), (288, 208), (288, 209), (288, 210), (288, 211), (288, 212), (288, 213), (288, 214), (288, 215), (288, 216), (288, 217), (288, 218), (288, 219), (288, 220), (288, 221), (288, 223), (289, 154), (289, 156), (289, 157), (289, 158), (289, 159), (289, 160), (289, 161), (289, 162), (289, 163), (289, 165), (289, 200), (289, 204), (289, 205), (289, 206), (289, 207), (289, 208), (289, 209), (289, 210), (289, 211), (289, 212), (289, 213), (289, 214), (289, 215), (289, 216), (289, 217), (289, 218), (289, 219), (289, 220), (289, 221), (289, 223), (290, 155), (290, 157), (290, 158), (290, 159), (290, 160), (290, 161), (290, 162), (290, 163), (290, 164), (290, 167), (290, 198), (290, 202), (290, 203), (290, 204), (290, 205), (290, 206), (290, 207), (290, 208), (290, 209), (290, 210), (290, 211), (290, 212), (290, 213), (290, 214), (290, 215), (290, 216), (290, 217), (290, 218), (290, 219), (290, 220), (290, 222), (291, 155), (291, 157), (291, 158), (291, 159), (291, 160), (291, 161), (291, 162), (291, 163), (291, 164), (291, 165), (291, 168), (291, 169), (291, 196), (291, 200), (291, 201), (291, 202), (291, 203), (291, 204), (291, 205), (291, 206), (291, 207), (291, 208), (291, 209), (291, 210), (291, 211), (291, 212), (291, 213), (291, 214), (291, 215), (291, 216), (291, 217), (291, 218), (291, 219), (291, 221), (291, 279), (292, 156), (292, 158), (292, 159), (292, 160), (292, 161), (292, 162), (292, 163), (292, 164), (292, 165), (292, 166), (292, 167), (292, 170), (292, 171), (292, 172), (292, 194), (292, 198), (292, 199), (292, 200), (292, 201), (292, 202), (292, 203), (292, 204), (292, 205), (292, 206), (292, 207), (292, 208), (292, 209), (292, 210), (292, 211), (292, 212), (292, 213), (292, 214), (292, 215), (292, 216), (292, 221), (292, 277), (292, 278), (292, 280), (293, 156), (293, 158), (293, 159), (293, 160), (293, 161), (293, 162), (293, 163), (293, 164), (293, 165), (293, 166), (293, 167), (293, 168), (293, 169), (293, 173), (293, 174), (293, 175), (293, 176), (293, 189), (293, 190), (293, 191), (293, 192), (293, 193), (293, 196), (293, 197), (293, 198), (293, 199), (293, 200), (293, 201), (293, 202), (293, 203), (293, 204), (293, 205), (293, 206), (293, 207), (293, 208), (293, 209), (293, 210), (293, 211), (293, 212), (293, 213), (293, 214), (293, 217), (293, 218), (293, 276), (293, 280), (294, 157), (294, 159), (294, 160), (294, 161), (294, 162), (294, 163), (294, 164), (294, 165), (294, 166), (294, 167), (294, 168), (294, 169), (294, 170), (294, 171), (294, 172), (294, 177), (294, 178), (294, 184), (294, 186), (294, 187), (294, 188), (294, 194), (294, 195), (294, 196), (294, 197), (294, 198), (294, 199), (294, 200), (294, 201), (294, 202), (294, 203), (294, 204), (294, 205), (294, 206), (294, 207), (294, 208), (294, 209), (294, 210), (294, 211), (294, 212), (294, 213), (294, 216), (294, 274), (294, 277), (294, 278), (294, 280), (295, 157), (295, 159), (295, 160), (295, 161), (295, 162), (295, 163), (295, 164), (295, 165), (295, 166), (295, 167), (295, 168), (295, 169), (295, 170), (295, 171), (295, 172), (295, 173), (295, 174), (295, 175), (295, 176), (295, 179), (295, 180), (295, 181), (295, 182), (295, 183), (295, 189), (295, 190), (295, 191), (295, 192), (295, 193), (295, 194), (295, 195), (295, 196), (295, 197), (295, 198), (295, 199), (295, 200), (295, 201), (295, 202), (295, 203), (295, 204), (295, 205), (295, 206), (295, 207), (295, 208), (295, 209), (295, 210), (295, 211), (295, 214), (295, 272), (295, 276), (295, 277), (295, 278), (295, 280), (296, 157), (296, 158), (296, 159), (296, 160), (296, 161), (296, 162), (296, 163), (296, 164), (296, 165), (296, 166), (296, 167), (296, 168), (296, 169), (296, 170), (296, 171), (296, 172), (296, 173), (296, 174), (296, 175), (296, 176), (296, 177), (296, 178), (296, 179), (296, 184), (296, 185), (296, 186), (296, 187), (296, 188), (296, 189), (296, 190), (296, 191), (296, 192), (296, 193), (296, 194), (296, 195), (296, 196), (296, 197), (296, 198), (296, 199), (296, 200), (296, 201), (296, 202), (296, 203), (296, 204), (296, 205), (296, 206), (296, 207), (296, 208), (296, 209), (296, 210), (296, 213), (296, 270), (296, 274), (296, 275), (296, 276), (296, 277), (296, 278), (296, 279), (296, 281), (297, 158), (297, 160), (297, 161), (297, 162), (297, 163), (297, 164), (297, 165), (297, 166), (297, 167), (297, 168), (297, 169), (297, 170), (297, 171), (297, 172), (297, 173), (297, 174), (297, 175), (297, 176), (297, 177), (297, 178), (297, 179), (297, 180), (297, 181), (297, 182), (297, 183), (297, 184), (297, 185), (297, 186), (297, 187), (297, 188), (297, 189), (297, 190), (297, 191), (297, 192), (297, 193), (297, 194), (297, 195), (297, 196), (297, 197), (297, 198), (297, 199), (297, 200), (297, 201), (297, 202), (297, 203), (297, 204), (297, 205), (297, 206), (297, 207), (297, 208), (297, 211), (297, 265), (297, 267), (297, 268), (297, 269), (297, 272), (297, 273), (297, 274), (297, 275), (297, 276), (297, 277), (297, 278), (297, 279), (297, 280), (297, 283), (298, 158), (298, 160), (298, 161), (298, 162), (298, 163), (298, 164), (298, 165), (298, 166), (298, 167), (298, 168), (298, 169), (298, 170), (298, 171), (298, 172), (298, 173), (298, 174), (298, 175), (298, 176), (298, 177), (298, 178), (298, 179), (298, 180), (298, 181), (298, 182), (298, 183), (298, 184), (298, 185), (298, 186), (298, 187), (298, 188), (298, 189), (298, 190), (298, 191), (298, 192), (298, 193), (298, 194), (298, 195), (298, 196), (298, 197), (298, 198), (298, 199), (298, 200), (298, 201), (298, 202), (298, 203), (298, 210), (298, 264), (298, 270), (298, 271), (298, 272), (298, 273), (298, 274), (298, 275), (298, 276), (298, 277), (298, 278), (298, 279), (298, 280), (298, 281), (299, 158), (299, 160), (299, 161), (299, 162), (299, 163), (299, 164), (299, 165), (299, 166), (299, 167), (299, 168), (299, 169), (299, 170), (299, 171), (299, 172), (299, 173), (299, 174), (299, 175), (299, 176), (299, 177), (299, 178), (299, 179), (299, 180), (299, 181), (299, 182), (299, 183), (299, 184), (299, 185), (299, 186), (299, 187), (299, 188), (299, 189), (299, 190), (299, 191), (299, 192), (299, 193), (299, 194), (299, 195), (299, 196), (299, 197), (299, 198), (299, 199), (299, 204), (299, 205), (299, 206), (299, 208), (299, 263), (299, 265), (299, 266), (299, 267), (299, 268), (299, 269), (299, 270), (299, 271), (299, 272), (299, 273), (299, 274), (299, 275), (299, 276), (299, 277), (299, 278), (299, 279), (299, 280), (299, 282), (300, 158), (300, 159), (300, 160), (300, 161), (300, 162), (300, 163), (300, 164), (300, 165), (300, 166), (300, 167), (300, 168), (300, 169), (300, 170), (300, 171), (300, 172), (300, 173), (300, 174), (300, 175), (300, 176), (300, 177), (300, 178), (300, 179), (300, 180), (300, 181), (300, 182), (300, 183), (300, 184), (300, 185), (300, 186), (300, 187), (300, 188), (300, 189), (300, 190), (300, 191), (300, 192), (300, 193), (300, 194), (300, 195), (300, 196), (300, 197), (300, 200), (300, 201), (300, 202), (300, 203), (300, 265), (300, 266), (300, 267), (300, 268), (300, 269), (300, 270), (300, 271), (300, 272), (300, 273), (300, 274), (300, 275), (300, 276), (300, 277), (300, 278), (300, 279), (301, 159), (301, 161), (301, 162), (301, 163), (301, 164), (301, 165), (301, 166), (301, 167), (301, 168), (301, 169), (301, 170), (301, 171), (301, 172), (301, 173), (301, 174), (301, 175), (301, 176), (301, 177), (301, 178), (301, 179), (301, 180), (301, 181), (301, 182), (301, 183), (301, 184), (301, 185), (301, 186), (301, 187), (301, 188), (301, 189), (301, 190), (301, 191), (301, 192), (301, 193), (301, 194), (301, 198), (301, 199), (301, 262), (301, 264), (301, 265), (301, 266), (301, 267), (301, 268), (301, 269), (301, 270), (301, 271), (301, 272), (301, 273), (301, 274), (301, 275), (301, 276), (301, 277), (301, 278), (301, 279), (301, 281), (302, 159), (302, 161), (302, 162), (302, 163), (302, 164), (302, 165), (302, 166), (302, 167), (302, 168), (302, 169), (302, 170), (302, 171), (302, 172), (302, 173), (302, 174), (302, 175), (302, 176), (302, 177), (302, 178), (302, 196), (302, 261), (302, 263), (302, 264), (302, 265), (302, 266), (302, 267), (302, 268), (302, 269), (302, 270), (302, 271), (302, 272), (302, 273), (302, 274), (302, 275), (302, 276), (302, 277), (302, 278), (302, 280), (303, 159), (303, 161), (303, 162), (303, 163), (303, 164), (303, 165), (303, 166), (303, 167), (303, 168), (303, 169), (303, 170), (303, 171), (303, 172), (303, 173), (303, 174), (303, 175), (303, 176), (303, 179), (303, 180), (303, 181), (303, 182), (303, 183), (303, 184), (303, 185), (303, 186), (303, 187), (303, 188), (303, 189), (303, 190), (303, 191), (303, 192), (303, 194), (303, 260), (303, 262), (303, 263), (303, 264), (303, 265), (303, 266), (303, 267), (303, 268), (303, 269), (303, 270), (303, 271), (303, 272), (303, 273), (303, 274), (303, 275), (303, 276), (303, 277), (303, 279), (304, 159), (304, 161), (304, 162), (304, 163), (304, 164), (304, 165), (304, 166), (304, 167), (304, 168), (304, 169), (304, 170), (304, 171), (304, 172), (304, 173), (304, 174), (304, 177), (304, 178), (304, 260), (304, 262), (304, 263), (304, 264), (304, 265), (304, 266), (304, 267), (304, 268), (304, 269), (304, 270), (304, 271), (304, 272), (304, 273), (304, 274), (304, 275), (304, 276), (304, 278), (305, 159), (305, 161), (305, 162), (305, 163), (305, 164), (305, 165), (305, 166), (305, 167), (305, 168), (305, 169), (305, 170), (305, 171), (305, 172), (305, 173), (305, 174), (305, 259), (305, 261), (305, 262), (305, 263), (305, 264), (305, 265), (305, 266), (305, 267), (305, 268), (305, 269), (305, 270), (305, 271), (305, 272), (305, 273), (305, 274), (305, 275), (305, 277), (306, 159), (306, 161), (306, 162), (306, 163), (306, 164), (306, 165), (306, 166), (306, 167), (306, 168), (306, 169), (306, 170), (306, 171), (306, 172), (306, 174), (306, 258), (306, 260), (306, 261), (306, 262), (306, 263), (306, 264), (306, 265), (306, 266), (306, 267), (306, 268), (306, 269), (306, 270), (306, 271), (306, 272), (306, 273), (306, 274), (306, 276), (307, 159), (307, 161), (307, 162), (307, 163), (307, 164), (307, 165), (307, 166), (307, 167), (307, 168), (307, 169), (307, 170), (307, 171), (307, 174), (307, 256), (307, 259), (307, 260), (307, 261), (307, 262), (307, 263), (307, 264), (307, 265), (307, 266), (307, 267), (307, 268), (307, 269), (307, 270), (307, 271), (307, 272), (307, 275), (308, 159), (308, 161), (308, 162), (308, 163), (308, 164), (308, 165), (308, 166), (308, 167), (308, 168), (308, 169), (308, 170), (308, 172), (308, 255), (308, 258), (308, 259), (308, 260), (308, 261), (308, 262), (308, 263), (308, 264), (308, 265), (308, 266), (308, 267), (308, 268), (308, 269), (308, 270), (308, 271), (308, 274), (309, 158), (309, 160), (309, 161), (309, 162), (309, 163), (309, 164), (309, 165), (309, 166), (309, 167), (309, 168), (309, 169), (309, 171), (309, 254), (309, 256), (309, 257), (309, 258), (309, 259), (309, 260), (309, 261), (309, 262), (309, 263), (309, 264), (309, 265), (309, 266), (309, 267), (309, 268), (309, 269), (309, 270), (309, 273), (310, 158), (310, 160), (310, 161), (310, 162), (310, 163), (310, 164), (310, 165), (310, 166), (310, 167), (310, 168), (310, 170), (310, 253), (310, 255), (310, 256), (310, 257), (310, 258), (310, 259), (310, 260), (310, 261), (310, 262), (310, 263), (310, 264), (310, 265), (310, 266), (310, 267), (310, 268), (310, 271), (311, 158), (311, 160), (311, 161), (311, 162), (311, 163), (311, 164), (311, 165), (311, 166), (311, 167), (311, 169), (311, 255), (311, 256), (311, 257), (311, 258), (311, 259), (311, 260), (311, 261), (311, 262), (311, 263), (311, 264), (311, 265), (311, 266), (311, 267), (311, 270), (312, 157), (312, 159), (312, 160), (312, 161), (312, 162), (312, 163), (312, 164), (312, 165), (312, 166), (312, 168), (312, 252), (312, 254), (312, 255), (312, 256), (312, 257), (312, 258), (312, 259), (312, 260), (312, 261), (312, 262), (312, 263), (312, 264), (312, 265), (312, 268), (313, 157), (313, 159), (313, 160), (313, 161), (313, 162), (313, 163), (313, 164), (313, 165), (313, 167), (313, 251), (313, 253), (313, 254), (313, 255), (313, 256), (313, 257), (313, 258), (313, 259), (313, 260), (313, 261), (313, 262), (313, 263), (313, 267), (314, 157), (314, 159), (314, 160), (314, 161), (314, 162), (314, 163), (314, 164), (314, 165), (314, 167), (314, 250), (314, 252), (314, 253), (314, 254), (314, 255), (314, 256), (314, 257), (314, 258), (314, 259), (314, 260), (314, 265), (315, 157), (315, 159), (315, 160), (315, 161), (315, 162), (315, 163), (315, 164), (315, 165), (315, 167), (315, 249), (315, 251), (315, 252), (315, 253), (315, 254), (315, 255), (315, 256), (315, 257), (315, 261), (315, 262), (315, 263), (316, 157), (316, 159), (316, 160), (316, 161), (316, 162), (316, 163), (316, 164), (316, 166), (316, 248), (316, 250), (316, 251), (316, 252), (316, 253), (316, 254), (316, 255), (316, 258), (316, 259), (316, 260), (317, 157), (317, 159), (317, 160), (317, 161), (317, 162), (317, 163), (317, 164), (317, 166), (317, 247), (317, 249), (317, 250), (317, 251), (317, 252), (317, 253), (317, 256), (317, 257), (318, 156), (318, 158), (318, 159), (318, 160), (318, 161), (318, 162), (318, 163), (318, 164), (318, 166), (318, 246), (318, 248), (318, 249), (318, 250), (318, 251), (318, 252), (318, 254), (319, 156), (319, 158), (319, 159), (319, 160), (319, 161), (319, 162), (319, 163), (319, 164), (319, 166), (319, 245), (319, 247), (319, 248), (319, 249), (319, 250), (319, 251), (319, 253), (320, 156), (320, 158), (320, 159), (320, 160), (320, 161), (320, 162), (320, 163), (320, 164), (320, 166), (320, 244), (320, 246), (320, 247), (320, 248), (320, 249), (320, 250), (320, 252), (321, 155), (321, 157), (321, 158), (321, 159), (321, 160), (321, 161), (321, 162), (321, 163), (321, 164), (321, 166), (321, 243), (321, 245), (321, 246), (321, 247), (321, 251), (322, 155), (322, 157), (322, 158), (322, 159), (322, 160), (322, 161), (322, 162), (322, 163), (322, 164), (322, 166), (322, 242), (322, 244), (322, 245), (322, 248), (322, 249), (322, 251), (323, 154), (323, 156), (323, 157), (323, 158), (323, 159), (323, 160), (323, 161), (323, 162), (323, 163), (323, 164), (323, 166), (323, 241), (323, 243), (323, 247), (324, 154), (324, 156), (324, 157), (324, 158), (324, 159), (324, 160), (324, 161), (324, 162), (324, 163), (324, 164), (324, 165), (324, 167), (324, 241), (324, 245), (325, 154), (325, 156), (325, 157), (325, 158), (325, 159), (325, 160), (325, 161), (325, 162), (325, 163), (325, 164), (325, 165), (325, 167), (325, 240), (325, 243), (326, 153), (326, 155), (326, 156), (326, 157), (326, 158), (326, 159), (326, 160), (326, 161), (326, 162), (326, 163), (326, 164), (326, 165), (326, 166), (326, 168), (326, 240), (326, 242), (327, 153), (327, 155), (327, 156), (327, 157), (327, 158), (327, 159), (327, 160), (327, 161), (327, 162), (327, 163), (327, 164), (327, 165), (327, 166), (327, 168), (327, 239), (327, 241), (328, 152), (328, 154), (328, 155), (328, 156), (328, 157), (328, 158), (328, 159), (328, 160), (328, 161), (328, 162), (328, 163), (328, 164), (328, 165), (328, 166), (328, 167), (328, 169), (328, 239), (328, 240), (329, 152), (329, 154), (329, 155), (329, 156), (329, 157), (329, 158), (329, 159), (329, 160), (329, 161), (329, 162), (329, 163), (329, 164), (329, 165), (329, 166), (329, 167), (329, 168), (329, 170), (329, 239), (330, 151), (330, 153), (330, 154), (330, 155), (330, 156), (330, 157), (330, 158), (330, 159), (330, 160), (330, 161), (330, 162), (330, 163), (330, 164), (330, 165), (330, 166), (330, 167), (330, 168), (330, 170), (331, 151), (331, 153), (331, 154), (331, 155), (331, 156), (331, 157), (331, 158), (331, 159), (331, 160), (331, 161), (331, 162), (331, 163), (331, 164), (331, 165), (331, 166), (331, 167), (331, 168), (331, 169), (331, 171), (332, 152), (332, 154), (332, 155), (332, 156), (332, 157), (332, 158), (332, 159), (332, 160), (332, 161), (332, 162), (332, 163), (332, 164), (332, 165), (332, 166), (332, 167), (332, 168), (332, 169), (332, 170), (332, 172), (333, 153), (333, 155), (333, 156), (333, 157), (333, 158), (333, 159), (333, 160), (333, 161), (333, 162), (333, 163), (333, 164), (333, 165), (333, 166), (333, 167), (333, 168), (333, 169), (333, 170), (333, 171), (333, 173), (334, 154), (334, 156), (334, 157), (334, 158), (334, 159), (334, 160), (334, 161), (334, 162), (334, 163), (334, 164), (334, 165), (334, 166), (334, 167), (334, 168), (334, 169), (334, 170), (334, 171), (334, 172), (334, 174), (335, 155), (335, 157), (335, 158), (335, 159), (335, 160), (335, 161), (335, 162), (335, 163), (335, 164), (335, 165), (335, 166), (335, 167), (335, 168), (335, 169), (335, 170), (335, 171), (335, 172), (335, 173), (335, 175), (336, 156), (336, 159), (336, 160), (336, 161), (336, 162), (336, 163), (336, 164), (336, 165), (336, 166), (336, 167), (336, 168), (336, 169), (336, 170), (336, 171), (336, 172), (336, 173), (336, 174), (336, 177), (337, 157), (337, 161), (337, 162), (337, 163), (337, 164), (337, 165), (337, 166), (337, 167), (337, 168), (337, 169), (337, 170), (337, 171), (337, 172), (337, 173), (337, 174), (337, 175), (337, 178), (338, 159), (338, 160), (338, 163), (338, 164), (338, 165), (338, 166), (338, 167), (338, 168), (338, 169), (338, 170), (338, 171), (338, 172), (338, 173), (338, 174), (338, 175), (338, 176), (338, 177), (338, 180), (339, 161), (339, 162), (339, 165), (339, 166), (339, 167), (339, 168), (339, 169), (339, 170), (339, 171), (339, 172), (339, 173), (339, 174), (339, 175), (339, 176), (339, 177), (339, 178), (339, 181), (339, 182), (340, 164), (340, 168), (340, 169), (340, 170), (340, 171), (340, 172), (340, 173), (340, 174), (340, 175), (340, 176), (340, 177), (340, 178), (340, 179), (340, 180), (340, 184), (340, 185), (340, 186), (340, 187), (340, 189), (341, 166), (341, 170), (341, 171), (341, 172), (341, 173), (341, 174), (341, 175), (341, 176), (341, 177), (341, 178), (341, 179), (341, 180), (341, 181), (341, 182), (341, 183), (341, 189), (342, 168), (342, 172), (342, 173), (342, 174), (342, 175), (342, 176), (342, 177), (342, 178), (342, 179), (342, 180), (342, 181), (342, 182), (342, 183), (342, 184), (342, 185), (342, 186), (342, 187), (342, 188), (342, 190), (343, 170), (343, 174), (343, 175), (343, 176), (343, 177), (343, 178), (343, 179), (343, 180), (343, 181), (343, 182), (343, 183), (343, 184), (343, 185), (343, 186), (343, 187), (343, 188), (343, 190), (344, 172), (344, 176), (344, 177), (344, 178), (344, 179), (344, 180), (344, 181), (344, 182), (344, 183), (344, 184), (344, 185), (344, 186), (344, 187), (344, 188), (344, 189), (344, 191), (345, 174), (345, 178), (345, 179), (345, 180), (345, 181), (345, 182), (345, 183), (345, 184), (345, 185), (345, 186), (345, 187), (345, 188), (345, 189), (345, 190), (345, 192), (346, 176), (346, 180), (346, 181), (346, 182), (346, 183), (346, 184), (346, 185), (346, 186), (346, 187), (346, 188), (346, 189), (346, 190), (346, 191), (346, 193), (347, 178), (347, 181), (347, 182), (347, 183), (347, 184), (347, 185), (347, 186), (347, 187), (347, 188), (347, 189), (347, 190), (347, 191), (347, 192), (347, 194), (348, 180), (348, 183), (348, 184), (348, 185), (348, 186), (348, 187), (348, 188), (348, 189), (348, 190), (348, 191), (348, 192), (348, 194), (349, 181), (349, 184), (349, 185), (349, 186), (349, 187), (349, 188), (349, 189), (349, 190), (349, 191), (349, 192), (349, 194), (350, 183), (350, 186), (350, 187), (350, 188), (350, 189), (350, 190), (350, 193), (351, 184), (351, 187), (351, 188), (351, 189), (351, 192), (352, 186), (352, 191), (353, 187), (353, 189), ) coordinates_FF00A6 = ((189, 124), (190, 115), (190, 117), (190, 118), (190, 119), (190, 120), (190, 121), (190, 122), (190, 124), (191, 114), (191, 124), (192, 113), (192, 115), (192, 116), (192, 117), (192, 118), (192, 119), (192, 120), (192, 121), (192, 122), (192, 124), (193, 112), (193, 114), (193, 115), (193, 116), (193, 117), (193, 118), (193, 119), (193, 120), (193, 121), (193, 122), (193, 124), (194, 111), (194, 113), (194, 114), (194, 115), (194, 116), (194, 117), (194, 118), (194, 119), (194, 120), (194, 121), (194, 122), (194, 123), (194, 125), (195, 110), (195, 112), (195, 113), (195, 114), (195, 115), (195, 116), (195, 117), (195, 118), (195, 119), (195, 120), (195, 121), (195, 122), (195, 123), (195, 125), (196, 109), (196, 111), (196, 112), (196, 113), (196, 114), (196, 115), (196, 116), (196, 117), (196, 118), (196, 119), (196, 120), (196, 121), (196, 122), (196, 123), (196, 125), (197, 108), (197, 110), (197, 111), (197, 112), (197, 113), (197, 114), (197, 115), (197, 116), (197, 117), (197, 118), (197, 119), (197, 120), (197, 121), (197, 125), (198, 108), (198, 110), (198, 111), (198, 112), (198, 113), (198, 114), (198, 115), (198, 116), (198, 117), (198, 118), (198, 119), (198, 120), (198, 121), (198, 122), (198, 123), (199, 109), (199, 111), (199, 112), (199, 113), (199, 114), (199, 115), (199, 116), (199, 117), (199, 118), (199, 119), (199, 121), (200, 109), (200, 111), (200, 112), (200, 113), (200, 114), (200, 115), (200, 116), (200, 117), (200, 118), (200, 119), (200, 121), (201, 108), (201, 110), (201, 111), (201, 112), (201, 113), (201, 114), (201, 115), (201, 116), (201, 117), (201, 118), (201, 119), (201, 120), (201, 121), (201, 122), (201, 123), (201, 125), (202, 111), (202, 112), (202, 113), (202, 114), (202, 115), (202, 116), (202, 117), (202, 118), (202, 119), (202, 120), (202, 121), (202, 122), (202, 125), (203, 109), (203, 111), (203, 112), (203, 113), (203, 114), (203, 115), (203, 116), (203, 117), (203, 118), (203, 119), (203, 120), (203, 121), (203, 122), (203, 123), (203, 125), (204, 110), (204, 112), (204, 113), (204, 114), (204, 115), (204, 116), (204, 117), (204, 118), (204, 119), (204, 120), (204, 121), (204, 122), (204, 123), (204, 125), (205, 111), (205, 113), (205, 114), (205, 115), (205, 116), (205, 117), (205, 118), (205, 119), (205, 120), (205, 121), (205, 122), (205, 123), (205, 125), (206, 112), (206, 114), (206, 115), (206, 116), (206, 117), (206, 118), (206, 119), (206, 120), (206, 121), (206, 122), (206, 124), (207, 113), (207, 116), (207, 117), (207, 118), (207, 119), (207, 120), (207, 121), (207, 122), (207, 124), (208, 114), (208, 124), (209, 115), (209, 116), (209, 117), (209, 118), (209, 119), (209, 120), (209, 121), (209, 122), (209, 124), ) coordinates_7F0053 = ((164, 105), (164, 107), (164, 108), (164, 109), (164, 110), (164, 111), (165, 105), (165, 114), (166, 105), (166, 107), (166, 108), (166, 109), (166, 110), (166, 111), (166, 112), (166, 116), (167, 106), (167, 108), (167, 109), (167, 110), (167, 111), (167, 112), (167, 113), (167, 114), (168, 106), (168, 108), (168, 109), (168, 110), (168, 111), (168, 112), (168, 113), (168, 114), (168, 115), (168, 117), (169, 107), (169, 109), (169, 110), (169, 111), (169, 112), (169, 113), (169, 114), (169, 115), (169, 117), (170, 107), (170, 109), (170, 110), (170, 111), (170, 112), (170, 113), (170, 114), (170, 115), (170, 116), (170, 118), (171, 107), (171, 109), (171, 110), (171, 111), (171, 112), (171, 113), (171, 114), (171, 115), (171, 116), (171, 118), (172, 108), (172, 110), (172, 111), (172, 112), (172, 113), (172, 114), (172, 115), (172, 116), (172, 118), (173, 108), (173, 110), (173, 111), (173, 112), (173, 113), (173, 114), (173, 115), (173, 116), (173, 118), (174, 108), (174, 110), (174, 111), (174, 112), (174, 113), (174, 114), (174, 115), (174, 116), (174, 118), (175, 108), (175, 110), (175, 111), (175, 112), (175, 113), (175, 114), (175, 115), (175, 117), (176, 108), (176, 110), (176, 111), (176, 112), (176, 113), (176, 114), (176, 115), (176, 117), (177, 108), (177, 110), (177, 111), (177, 112), (177, 113), (177, 114), (177, 115), (177, 117), (178, 108), (178, 110), (178, 111), (178, 112), (178, 113), (178, 114), (178, 115), (178, 117), (179, 108), (179, 110), (179, 111), (179, 112), (179, 113), (179, 114), (179, 115), (179, 117), (180, 107), (180, 109), (180, 110), (180, 111), (180, 112), (180, 113), (180, 114), (180, 115), (180, 117), (181, 107), (181, 109), (181, 110), (181, 111), (181, 112), (181, 113), (181, 114), (181, 116), (182, 106), (182, 108), (182, 109), (182, 110), (182, 111), (182, 112), (182, 113), (182, 114), (182, 116), (183, 106), (183, 108), (183, 109), (183, 110), (183, 111), (183, 112), (183, 113), (183, 114), (183, 116), (184, 105), (184, 107), (184, 108), (184, 109), (184, 110), (184, 111), (184, 112), (184, 113), (184, 114), (184, 116), (185, 105), (185, 107), (185, 108), (185, 109), (185, 110), (185, 111), (185, 112), (185, 113), (185, 114), (185, 116), (186, 104), (186, 106), (186, 107), (186, 108), (186, 109), (186, 110), (186, 111), (186, 112), (186, 113), (186, 114), (186, 116), (187, 104), (187, 106), (187, 107), (187, 108), (187, 109), (187, 110), (187, 111), (187, 112), (187, 113), (187, 114), (187, 116), (188, 103), (188, 105), (188, 106), (188, 107), (188, 108), (188, 109), (188, 110), (188, 111), (188, 112), (188, 115), (189, 103), (189, 105), (189, 106), (189, 107), (189, 108), (189, 109), (189, 110), (189, 111), (189, 114), (190, 102), (190, 104), (190, 105), (190, 106), (190, 107), (190, 108), (190, 109), (190, 110), (190, 113), (191, 102), (191, 104), (191, 105), (191, 106), (191, 107), (191, 108), (191, 109), (191, 111), (192, 102), (192, 104), (192, 105), (192, 106), (192, 107), (192, 108), (192, 110), (193, 102), (193, 104), (193, 105), (193, 106), (193, 107), (193, 109), (194, 102), (194, 104), (194, 105), (194, 106), (195, 105), (195, 106), (195, 108), (196, 103), (196, 107), (197, 104), (197, 106), (201, 106), (202, 104), (202, 106), (203, 103), (203, 107), (204, 102), (204, 104), (204, 105), (204, 106), (204, 108), (205, 102), (205, 104), (205, 105), (205, 106), (205, 109), (206, 102), (206, 104), (206, 105), (206, 106), (206, 107), (207, 102), (207, 104), (207, 105), (207, 106), (207, 107), (207, 108), (208, 102), (208, 104), (208, 105), (208, 106), (208, 107), (208, 108), (208, 109), (209, 103), (209, 104), (209, 105), (209, 106), (209, 107), (209, 108), (209, 109), (209, 110), (209, 113), (210, 103), (210, 105), (210, 106), (210, 107), (210, 108), (210, 109), (210, 110), (210, 111), (210, 114), (211, 103), (211, 105), (211, 106), (211, 107), (211, 108), (211, 109), (211, 110), (211, 111), (211, 112), (211, 113), (211, 115), (211, 116), (212, 104), (212, 106), (212, 107), (212, 108), (212, 109), (212, 110), (212, 111), (212, 112), (212, 113), (212, 114), (212, 116), (213, 104), (213, 106), (213, 107), (213, 108), (213, 109), (213, 110), (213, 111), (213, 112), (213, 113), (213, 114), (213, 116), (214, 105), (214, 107), (214, 108), (214, 109), (214, 110), (214, 111), (214, 112), (214, 113), (214, 114), (214, 116), (215, 105), (215, 107), (215, 108), (215, 109), (215, 110), (215, 111), (215, 112), (215, 113), (215, 114), (215, 116), (216, 106), (216, 108), (216, 109), (216, 110), (216, 111), (216, 112), (216, 113), (216, 114), (216, 116), (217, 106), (217, 108), (217, 109), (217, 110), (217, 111), (217, 112), (217, 113), (217, 114), (217, 116), (218, 107), (218, 109), (218, 110), (218, 111), (218, 112), (218, 113), (218, 114), (218, 116), (219, 107), (219, 109), (219, 110), (219, 111), (219, 112), (219, 113), (219, 114), (219, 115), (219, 117), (220, 108), (220, 110), (220, 111), (220, 112), (220, 113), (220, 114), (220, 115), (220, 117), (221, 108), (221, 110), (221, 111), (221, 112), (221, 113), (221, 114), (221, 115), (221, 117), (222, 108), (222, 110), (222, 111), (222, 112), (222, 113), (222, 114), (222, 115), (222, 117), (223, 108), (223, 110), (223, 111), (223, 112), (223, 113), (223, 114), (223, 115), (223, 117), (224, 108), (224, 110), (224, 111), (224, 112), (224, 113), (224, 114), (224, 115), (224, 117), (225, 108), (225, 110), (225, 111), (225, 112), (225, 113), (225, 114), (225, 115), (225, 116), (225, 118), (226, 108), (226, 110), (226, 111), (226, 112), (226, 113), (226, 114), (226, 115), (226, 116), (226, 118), (227, 108), (227, 110), (227, 111), (227, 112), (227, 113), (227, 114), (227, 115), (227, 116), (227, 118), (228, 107), (228, 109), (228, 110), (228, 111), (228, 112), (228, 113), (228, 114), (228, 115), (228, 116), (228, 118), (229, 107), (229, 109), (229, 110), (229, 111), (229, 112), (229, 113), (229, 114), (229, 115), (229, 116), (229, 118), (230, 106), (230, 107), (230, 108), (230, 109), (230, 110), (230, 111), (230, 112), (230, 113), (230, 114), (230, 115), (230, 117), (231, 106), (231, 108), (231, 109), (231, 110), (231, 111), (231, 112), (231, 113), (231, 114), (231, 115), (231, 117), (232, 106), (232, 108), (232, 109), (232, 110), (232, 111), (232, 112), (232, 113), (232, 114), (232, 116), (233, 105), (233, 107), (233, 108), (233, 109), (233, 110), (233, 111), (233, 115), (234, 105), (234, 112), (234, 114), (235, 105), (235, 107), (235, 108), (235, 109), (235, 110), (235, 111), ) coordinates_7F0013 = ((188, 132), (189, 126), (189, 128), (189, 129), (189, 130), (189, 131), (189, 133), (190, 126), (190, 133), (191, 126), (191, 128), (191, 129), (191, 130), (191, 131), (191, 133), (192, 126), (192, 127), (192, 128), (192, 129), (192, 130), (192, 131), (192, 133), (193, 127), (193, 129), (193, 130), (193, 131), (193, 133), (194, 127), (194, 129), (194, 130), (194, 131), (194, 132), (194, 133), (195, 127), (195, 129), (195, 130), (195, 134), (196, 127), (196, 131), (196, 132), (196, 133), (197, 127), (197, 128), (197, 130), (202, 127), (202, 130), (203, 127), (203, 131), (203, 132), (203, 133), (204, 127), (204, 129), (204, 130), (204, 134), (205, 127), (205, 129), (205, 130), (205, 131), (205, 133), (206, 127), (206, 129), (206, 130), (206, 131), (206, 133), (207, 126), (207, 128), (207, 129), (207, 130), (207, 131), (207, 133), (208, 126), (208, 128), (208, 129), (208, 130), (208, 131), (208, 133), (209, 126), (209, 133), (210, 128), (210, 129), (210, 130), (210, 131), (210, 133), ) coordinates_00007F = ((175, 138), (178, 140), (179, 141), (180, 142), (183, 144), (184, 145), (186, 146), (187, 147), (188, 148), (189, 151), (190, 149), (190, 153), (190, 154), (191, 150), (191, 152), (191, 155), (191, 156), (191, 157), (192, 151), (192, 153), (192, 154), (192, 160), (193, 151), (193, 153), (193, 154), (193, 157), (193, 158), (194, 152), (194, 156), (195, 153), (195, 154), (204, 153), (204, 154), (205, 152), (205, 156), (206, 151), (206, 153), (206, 154), (206, 158), (207, 151), (207, 153), (207, 154), (207, 158), (207, 160), (208, 150), (208, 155), (208, 156), (209, 149), (209, 153), (209, 154), (210, 151), (211, 148), (211, 149), (212, 147), (213, 146), (215, 145), (216, 144), (217, 143), (220, 141), (221, 140), (222, 139), (224, 138), ) coordinates_27007F = ((180, 49), (180, 51), (180, 52), (180, 53), (180, 54), (180, 55), (180, 56), (180, 57), (180, 58), (180, 59), (180, 60), (180, 63), (181, 49), (181, 61), (181, 62), (181, 64), (181, 88), (182, 49), (182, 51), (182, 52), (182, 53), (182, 54), (182, 55), (182, 56), (182, 57), (182, 58), (182, 59), (182, 60), (182, 65), (182, 86), (183, 49), (183, 51), (183, 52), (183, 53), (183, 54), (183, 55), (183, 56), (183, 57), (183, 58), (183, 59), (183, 60), (183, 61), (183, 62), (183, 63), (183, 65), (183, 84), (183, 85), (183, 89), (184, 49), (184, 51), (184, 52), (184, 53), (184, 54), (184, 55), (184, 56), (184, 57), (184, 58), (184, 59), (184, 60), (184, 61), (184, 62), (184, 63), (184, 64), (184, 83), (184, 86), (184, 87), (184, 88), (185, 49), (185, 51), (185, 52), (185, 53), (185, 54), (185, 55), (185, 56), (185, 57), (185, 58), (185, 59), (185, 60), (185, 61), (185, 62), (185, 63), (185, 64), (185, 65), (185, 68), (185, 69), (185, 70), (185, 71), (185, 72), (185, 73), (185, 74), (185, 75), (185, 76), (185, 77), (185, 78), (185, 79), (185, 80), (185, 81), (185, 84), (185, 85), (185, 86), (185, 87), (185, 88), (185, 89), (185, 92), (186, 49), (186, 51), (186, 52), (186, 53), (186, 54), (186, 55), (186, 56), (186, 57), (186, 58), (186, 59), (186, 60), (186, 61), (186, 62), (186, 63), (186, 64), (186, 65), (186, 66), (186, 67), (186, 83), (186, 84), (186, 85), (186, 86), (186, 87), (186, 88), (186, 89), (186, 90), (186, 93), (187, 49), (187, 51), (187, 52), (187, 53), (187, 54), (187, 55), (187, 56), (187, 57), (187, 58), (187, 59), (187, 60), (187, 61), (187, 62), (187, 63), (187, 64), (187, 65), (187, 66), (187, 67), (187, 68), (187, 69), (187, 70), (187, 71), (187, 72), (187, 73), (187, 74), (187, 75), (187, 76), (187, 77), (187, 78), (187, 79), (187, 80), (187, 81), (187, 82), (187, 83), (187, 84), (187, 85), (187, 86), (187, 87), (187, 88), (187, 89), (187, 90), (187, 91), (187, 92), (187, 94), (188, 49), (188, 51), (188, 52), (188, 53), (188, 54), (188, 55), (188, 56), (188, 57), (188, 58), (188, 59), (188, 60), (188, 61), (188, 62), (188, 63), (188, 64), (188, 65), (188, 66), (188, 67), (188, 68), (188, 69), (188, 70), (188, 71), (188, 72), (188, 73), (188, 74), (188, 75), (188, 76), (188, 77), (188, 78), (188, 79), (188, 80), (188, 81), (188, 82), (188, 83), (188, 84), (188, 85), (188, 86), (188, 87), (188, 88), (188, 89), (188, 90), (188, 91), (188, 92), (188, 93), (188, 96), (189, 50), (189, 52), (189, 53), (189, 54), (189, 55), (189, 56), (189, 57), (189, 58), (189, 59), (189, 60), (189, 61), (189, 62), (189, 63), (189, 64), (189, 65), (189, 66), (189, 67), (189, 68), (189, 69), (189, 70), (189, 71), (189, 72), (189, 73), (189, 74), (189, 75), (189, 76), (189, 77), (189, 78), (189, 79), (189, 80), (189, 81), (189, 82), (189, 83), (189, 84), (189, 85), (189, 86), (189, 87), (189, 88), (189, 89), (189, 90), (189, 91), (189, 92), (189, 93), (189, 94), (189, 97), (190, 50), (190, 52), (190, 53), (190, 54), (190, 55), (190, 56), (190, 57), (190, 58), (190, 59), (190, 60), (190, 61), (190, 62), (190, 63), (190, 64), (190, 65), (190, 66), (190, 67), (190, 68), (190, 69), (190, 70), (190, 71), (190, 72), (190, 73), (190, 74), (190, 75), (190, 76), (190, 77), (190, 78), (190, 79), (190, 80), (190, 81), (190, 82), (190, 83), (190, 84), (190, 85), (190, 86), (190, 87), (190, 88), (190, 89), (190, 90), (190, 91), (190, 92), (190, 93), (190, 94), (190, 95), (190, 97), (191, 50), (191, 52), (191, 53), (191, 54), (191, 55), (191, 56), (191, 57), (191, 58), (191, 59), (191, 60), (191, 61), (191, 62), (191, 63), (191, 64), (191, 65), (191, 66), (191, 67), (191, 68), (191, 69), (191, 70), (191, 71), (191, 72), (191, 73), (191, 74), (191, 75), (191, 76), (191, 77), (191, 78), (191, 79), (191, 80), (191, 81), (191, 82), (191, 83), (191, 84), (191, 85), (191, 86), (191, 87), (191, 88), (191, 89), (191, 90), (191, 91), (191, 92), (191, 93), (191, 94), (191, 95), (191, 97), (192, 51), (192, 53), (192, 54), (192, 55), (192, 56), (192, 57), (192, 58), (192, 59), (192, 60), (192, 61), (192, 62), (192, 63), (192, 64), (192, 65), (192, 66), (192, 67), (192, 68), (192, 69), (192, 70), (192, 71), (192, 72), (192, 73), (192, 74), (192, 75), (192, 76), (192, 77), (192, 78), (192, 79), (192, 80), (192, 81), (192, 82), (192, 83), (192, 84), (192, 85), (192, 86), (192, 87), (192, 88), (192, 89), (192, 90), (192, 91), (192, 92), (192, 93), (192, 94), (192, 95), (192, 97), (193, 51), (193, 54), (193, 55), (193, 56), (193, 57), (193, 58), (193, 59), (193, 60), (193, 61), (193, 62), (193, 63), (193, 64), (193, 65), (193, 66), (193, 67), (193, 68), (193, 69), (193, 70), (193, 71), (193, 72), (193, 73), (193, 74), (193, 75), (193, 76), (193, 77), (193, 78), (193, 79), (193, 80), (193, 81), (193, 82), (193, 83), (193, 84), (193, 85), (193, 86), (193, 87), (193, 88), (193, 89), (193, 90), (193, 91), (193, 92), (193, 93), (193, 94), (193, 95), (193, 97), (194, 52), (194, 56), (194, 57), (194, 58), (194, 59), (194, 60), (194, 61), (194, 62), (194, 63), (194, 64), (194, 65), (194, 66), (194, 67), (194, 68), (194, 69), (194, 70), (194, 71), (194, 72), (194, 73), (194, 74), (194, 75), (194, 76), (194, 77), (194, 78), (194, 79), (194, 80), (194, 81), (194, 82), (194, 83), (194, 84), (194, 85), (194, 86), (194, 87), (194, 88), (194, 89), (194, 90), (194, 91), (194, 92), (194, 93), (194, 94), (194, 95), (194, 97), (195, 54), (195, 57), (195, 58), (195, 59), (195, 60), (195, 61), (195, 62), (195, 63), (195, 64), (195, 65), (195, 66), (195, 67), (195, 68), (195, 69), (195, 70), (195, 71), (195, 72), (195, 73), (195, 74), (195, 75), (195, 76), (195, 77), (195, 78), (195, 79), (195, 80), (195, 81), (195, 82), (195, 83), (195, 84), (195, 85), (195, 86), (195, 87), (195, 88), (195, 89), (195, 90), (195, 91), (195, 92), (195, 93), (195, 94), (195, 95), (195, 97), (196, 56), (196, 65), (196, 66), (196, 67), (196, 68), (196, 69), (196, 70), (196, 71), (196, 72), (196, 73), (196, 74), (196, 75), (196, 76), (196, 77), (196, 78), (196, 79), (196, 80), (196, 81), (196, 82), (196, 83), (196, 84), (196, 85), (196, 86), (196, 87), (196, 88), (196, 89), (196, 96), (197, 57), (197, 58), (197, 59), (197, 60), (197, 61), (197, 62), (197, 63), (197, 64), (197, 67), (197, 68), (197, 69), (197, 70), (197, 71), (197, 72), (197, 73), (197, 74), (197, 75), (197, 76), (197, 77), (197, 78), (197, 79), (197, 80), (197, 81), (197, 82), (197, 83), (197, 84), (197, 85), (197, 86), (197, 87), (197, 90), (197, 91), (197, 92), (197, 93), (197, 95), (198, 66), (198, 67), (198, 68), (198, 69), (198, 70), (198, 71), (198, 72), (198, 73), (198, 74), (198, 75), (198, 76), (198, 77), (198, 78), (198, 79), (198, 80), (198, 81), (198, 82), (198, 83), (198, 84), (198, 85), (198, 86), (198, 87), (198, 88), (199, 67), (199, 69), (199, 70), (199, 71), (199, 72), (199, 73), (199, 74), (199, 75), (199, 76), (199, 77), (199, 78), (199, 79), (199, 80), (199, 81), (199, 82), (199, 83), (199, 84), (199, 85), (199, 87), (200, 67), (200, 69), (200, 70), (200, 71), (200, 72), (200, 73), (200, 74), (200, 75), (200, 76), (200, 77), (200, 78), (200, 79), (200, 80), (200, 81), (200, 82), (200, 83), (200, 84), (200, 85), (200, 87), (201, 63), (201, 64), (201, 65), (201, 66), (201, 67), (201, 68), (201, 69), (201, 70), (201, 71), (201, 72), (201, 73), (201, 74), (201, 75), (201, 76), (201, 77), (201, 78), (201, 79), (201, 80), (201, 81), (201, 82), (201, 83), (201, 84), (201, 85), (201, 86), (201, 87), (201, 88), (202, 57), (202, 59), (202, 60), (202, 61), (202, 62), (202, 67), (202, 68), (202, 69), (202, 70), (202, 71), (202, 72), (202, 73), (202, 74), (202, 75), (202, 76), (202, 77), (202, 78), (202, 79), (202, 80), (202, 81), (202, 82), (202, 83), (202, 84), (202, 85), (202, 86), (202, 87), (202, 90), (202, 91), (202, 92), (202, 93), (202, 95), (203, 55), (203, 63), (203, 64), (203, 65), (203, 66), (203, 67), (203, 68), (203, 69), (203, 70), (203, 71), (203, 72), (203, 73), (203, 74), (203, 75), (203, 76), (203, 77), (203, 78), (203, 79), (203, 80), (203, 81), (203, 82), (203, 83), (203, 84), (203, 85), (203, 86), (203, 87), (203, 88), (203, 89), (203, 96), (204, 54), (204, 57), (204, 58), (204, 59), (204, 60), (204, 61), (204, 62), (204, 63), (204, 64), (204, 65), (204, 66), (204, 67), (204, 68), (204, 69), (204, 70), (204, 71), (204, 72), (204, 73), (204, 74), (204, 75), (204, 76), (204, 77), (204, 78), (204, 79), (204, 80), (204, 81), (204, 82), (204, 83), (204, 84), (204, 85), (204, 86), (204, 87), (204, 88), (204, 89), (204, 90), (204, 91), (204, 92), (204, 93), (204, 94), (204, 95), (204, 97), (205, 53), (205, 55), (205, 56), (205, 57), (205, 58), (205, 59), (205, 60), (205, 61), (205, 62), (205, 63), (205, 64), (205, 65), (205, 66), (205, 67), (205, 68), (205, 69), (205, 70), (205, 71), (205, 72), (205, 73), (205, 74), (205, 75), (205, 76), (205, 77), (205, 78), (205, 79), (205, 80), (205, 81), (205, 82), (205, 83), (205, 84), (205, 85), (205, 86), (205, 87), (205, 88), (205, 89), (205, 90), (205, 91), (205, 92), (205, 93), (205, 94), (205, 95), (205, 97), (206, 52), (206, 54), (206, 55), (206, 56), (206, 57), (206, 58), (206, 59), (206, 60), (206, 61), (206, 62), (206, 63), (206, 64), (206, 65), (206, 66), (206, 67), (206, 68), (206, 69), (206, 70), (206, 71), (206, 72), (206, 73), (206, 74), (206, 75), (206, 76), (206, 77), (206, 78), (206, 79), (206, 80), (206, 81), (206, 82), (206, 83), (206, 84), (206, 85), (206, 86), (206, 87), (206, 88), (206, 89), (206, 90), (206, 91), (206, 92), (206, 93), (206, 94), (206, 95), (206, 97), (207, 51), (207, 53), (207, 54), (207, 55), (207, 56), (207, 57), (207, 58), (207, 59), (207, 60), (207, 61), (207, 62), (207, 63), (207, 64), (207, 65), (207, 66), (207, 67), (207, 68), (207, 69), (207, 70), (207, 71), (207, 72), (207, 73), (207, 74), (207, 75), (207, 76), (207, 77), (207, 78), (207, 79), (207, 80), (207, 81), (207, 82), (207, 83), (207, 84), (207, 85), (207, 86), (207, 87), (207, 88), (207, 89), (207, 90), (207, 91), (207, 92), (207, 93), (207, 94), (207, 95), (207, 97), (208, 51), (208, 53), (208, 54), (208, 55), (208, 56), (208, 57), (208, 58), (208, 59), (208, 60), (208, 61), (208, 62), (208, 63), (208, 64), (208, 65), (208, 66), (208, 67), (208, 68), (208, 69), (208, 70), (208, 71), (208, 72), (208, 73), (208, 74), (208, 75), (208, 76), (208, 77), (208, 78), (208, 79), (208, 80), (208, 81), (208, 82), (208, 83), (208, 84), (208, 85), (208, 86), (208, 87), (208, 88), (208, 89), (208, 90), (208, 91), (208, 92), (208, 93), (208, 94), (208, 95), (208, 97), (209, 50), (209, 52), (209, 53), (209, 54), (209, 55), (209, 56), (209, 57), (209, 58), (209, 59), (209, 60), (209, 61), (209, 62), (209, 63), (209, 64), (209, 65), (209, 66), (209, 67), (209, 68), (209, 69), (209, 70), (209, 71), (209, 72), (209, 73), (209, 74), (209, 75), (209, 76), (209, 77), (209, 78), (209, 79), (209, 80), (209, 81), (209, 82), (209, 83), (209, 84), (209, 85), (209, 86), (209, 87), (209, 88), (209, 89), (209, 90), (209, 91), (209, 92), (209, 93), (209, 94), (209, 95), (209, 97), (210, 50), (210, 52), (210, 53), (210, 54), (210, 55), (210, 56), (210, 57), (210, 58), (210, 59), (210, 60), (210, 61), (210, 62), (210, 63), (210, 64), (210, 65), (210, 66), (210, 67), (210, 68), (210, 69), (210, 70), (210, 71), (210, 72), (210, 73), (210, 74), (210, 75), (210, 76), (210, 77), (210, 78), (210, 79), (210, 80), (210, 81), (210, 82), (210, 83), (210, 84), (210, 85), (210, 86), (210, 87), (210, 88), (210, 89), (210, 90), (210, 91), (210, 92), (210, 93), (210, 94), (211, 50), (211, 52), (211, 53), (211, 54), (211, 55), (211, 56), (211, 57), (211, 58), (211, 59), (211, 60), (211, 61), (211, 62), (211, 63), (211, 64), (211, 65), (211, 66), (211, 67), (211, 68), (211, 69), (211, 70), (211, 71), (211, 72), (211, 73), (211, 74), (211, 75), (211, 76), (211, 77), (211, 78), (211, 79), (211, 80), (211, 81), (211, 82), (211, 83), (211, 84), (211, 85), (211, 86), (211, 87), (211, 88), (211, 89), (211, 90), (211, 91), (211, 92), (211, 93), (211, 96), (212, 49), (212, 51), (212, 52), (212, 53), (212, 54), (212, 55), (212, 56), (212, 57), (212, 58), (212, 59), (212, 60), (212, 61), (212, 62), (212, 63), (212, 64), (212, 65), (212, 66), (212, 67), (212, 68), (212, 69), (212, 70), (212, 71), (212, 72), (212, 73), (212, 74), (212, 75), (212, 76), (212, 77), (212, 78), (212, 79), (212, 80), (212, 81), (212, 82), (212, 83), (212, 84), (212, 85), (212, 86), (212, 87), (212, 88), (212, 89), (212, 90), (212, 91), (212, 92), (212, 94), (213, 49), (213, 51), (213, 52), (213, 53), (213, 54), (213, 55), (213, 56), (213, 57), (213, 58), (213, 59), (213, 60), (213, 61), (213, 62), (213, 63), (213, 64), (213, 65), (213, 66), (213, 83), (213, 84), (213, 85), (213, 86), (213, 87), (213, 88), (213, 89), (213, 90), (213, 93), (214, 49), (214, 51), (214, 52), (214, 53), (214, 54), (214, 55), (214, 56), (214, 57), (214, 58), (214, 59), (214, 60), (214, 61), (214, 62), (214, 63), (214, 64), (214, 65), (214, 68), (214, 69), (214, 70), (214, 71), (214, 72), (214, 73), (214, 74), (214, 75), (214, 76), (214, 77), (214, 78), (214, 79), (214, 80), (214, 81), (214, 82), (214, 85), (214, 86), (214, 87), (214, 88), (214, 89), (214, 92), (215, 49), (215, 51), (215, 52), (215, 53), (215, 54), (215, 55), (215, 56), (215, 57), (215, 58), (215, 59), (215, 60), (215, 61), (215, 62), (215, 63), (215, 64), (215, 66), (215, 83), (215, 86), (215, 87), (215, 88), (215, 90), (216, 49), (216, 51), (216, 52), (216, 53), (216, 54), (216, 55), (216, 56), (216, 57), (216, 58), (216, 59), (216, 60), (216, 61), (216, 62), (216, 63), (216, 65), (216, 85), (216, 89), (217, 49), (217, 51), (217, 52), (217, 53), (217, 54), (217, 55), (217, 56), (217, 57), (217, 58), (217, 59), (217, 86), (218, 49), (218, 59), (218, 60), (218, 61), (218, 62), (218, 64), (218, 88), (219, 49), (219, 51), (219, 52), (219, 53), (219, 54), (219, 55), (219, 56), (219, 57), (219, 58), (219, 59), ) coordinates_7F3500 = ((143, 142), (143, 144), (143, 145), (143, 146), (143, 147), (143, 149), (144, 140), (144, 151), (145, 139), (145, 142), (145, 143), (145, 144), (145, 145), (145, 146), (145, 147), (145, 148), (145, 149), (145, 153), (146, 138), (146, 140), (146, 141), (146, 142), (146, 143), (146, 144), (146, 145), (146, 146), (146, 147), (146, 148), (146, 149), (146, 150), (146, 151), (146, 154), (147, 137), (147, 139), (147, 140), (147, 141), (147, 142), (147, 143), (147, 144), (147, 145), (147, 146), (147, 147), (147, 148), (147, 149), (147, 150), (147, 151), (147, 152), (147, 153), (147, 156), (148, 136), (148, 138), (148, 139), (148, 140), (148, 141), (148, 142), (148, 143), (148, 144), (148, 145), (148, 146), (148, 147), (148, 148), (148, 149), (148, 150), (148, 151), (148, 152), (148, 153), (148, 154), (148, 157), (149, 138), (149, 139), (149, 140), (149, 141), (149, 142), (149, 143), (149, 144), (149, 145), (149, 146), (149, 147), (149, 148), (149, 149), (149, 150), (149, 151), (149, 152), (149, 153), (149, 154), (149, 155), (149, 156), (149, 158), (150, 135), (150, 137), (150, 138), (150, 139), (150, 140), (150, 141), (150, 142), (150, 143), (150, 144), (150, 145), (150, 146), (150, 147), (150, 148), (150, 149), (150, 150), (150, 151), (150, 152), (150, 153), (150, 154), (150, 155), (150, 156), (150, 157), (150, 159), (151, 134), (151, 136), (151, 137), (151, 138), (151, 139), (151, 140), (151, 141), (151, 142), (151, 143), (151, 144), (151, 145), (151, 146), (151, 147), (151, 148), (151, 149), (151, 150), (151, 151), (151, 152), (151, 153), (151, 154), (151, 155), (151, 156), (151, 157), (151, 158), (151, 160), (152, 134), (152, 136), (152, 137), (152, 138), (152, 139), (152, 140), (152, 141), (152, 142), (152, 143), (152, 144), (152, 145), (152, 146), (152, 147), (152, 148), (152, 149), (152, 150), (152, 151), (152, 152), (152, 153), (152, 154), (152, 155), (152, 156), (152, 157), (152, 158), (153, 133), (153, 135), (153, 136), (153, 137), (153, 138), (153, 139), (153, 140), (153, 141), (153, 142), (153, 143), (153, 144), (153, 145), (153, 146), (153, 147), (153, 148), (153, 149), (153, 150), (153, 151), (153, 152), (153, 153), (153, 154), (153, 155), (153, 156), (153, 157), (153, 158), (153, 159), (153, 161), (154, 133), (154, 135), (154, 136), (154, 137), (154, 138), (154, 139), (154, 140), (154, 141), (154, 142), (154, 143), (154, 144), (154, 145), (154, 146), (154, 147), (154, 148), (154, 149), (154, 150), (154, 151), (154, 152), (154, 153), (154, 154), (154, 155), (154, 156), (154, 157), (154, 158), (154, 159), (154, 160), (154, 162), (155, 133), (155, 135), (155, 136), (155, 137), (155, 138), (155, 139), (155, 140), (155, 141), (155, 142), (155, 143), (155, 144), (155, 145), (155, 146), (155, 147), (155, 148), (155, 149), (155, 150), (155, 151), (155, 152), (155, 153), (155, 154), (155, 155), (155, 156), (155, 157), (155, 158), (155, 159), (155, 160), (155, 161), (155, 163), (156, 133), (156, 135), (156, 136), (156, 137), (156, 138), (156, 139), (156, 140), (156, 141), (156, 142), (156, 143), (156, 144), (156, 145), (156, 146), (156, 147), (156, 148), (156, 149), (156, 150), (156, 151), (156, 152), (156, 153), (156, 154), (156, 155), (156, 156), (156, 157), (156, 158), (156, 159), (156, 160), (156, 161), (156, 163), (157, 133), (157, 135), (157, 136), (157, 137), (157, 138), (157, 139), (157, 140), (157, 141), (157, 142), (157, 143), (157, 144), (157, 145), (157, 146), (157, 147), (157, 148), (157, 149), (157, 150), (157, 151), (157, 152), (157, 153), (157, 154), (157, 155), (157, 156), (157, 157), (157, 158), (157, 159), (157, 160), (157, 161), (157, 162), (157, 164), (158, 133), (158, 135), (158, 136), (158, 137), (158, 138), (158, 139), (158, 140), (158, 141), (158, 142), (158, 143), (158, 144), (158, 145), (158, 146), (158, 147), (158, 148), (158, 149), (158, 150), (158, 151), (158, 152), (158, 153), (158, 154), (158, 155), (158, 156), (158, 157), (158, 158), (158, 159), (158, 160), (158, 161), (158, 162), (158, 163), (159, 133), (159, 135), (159, 136), (159, 137), (159, 138), (159, 139), (159, 140), (159, 141), (159, 142), (159, 143), (159, 144), (159, 145), (159, 146), (159, 147), (159, 148), (159, 149), (159, 150), (159, 151), (159, 152), (159, 153), (159, 154), (159, 155), (159, 156), (159, 157), (159, 158), (159, 159), (159, 160), (159, 161), (159, 162), (159, 163), (159, 165), (160, 134), (160, 135), (160, 136), (160, 137), (160, 138), (160, 139), (160, 140), (160, 141), (160, 142), (160, 143), (160, 144), (160, 145), (160, 146), (160, 147), (160, 148), (160, 149), (160, 150), (160, 151), (160, 152), (160, 153), (160, 154), (160, 155), (160, 156), (160, 157), (160, 158), (160, 159), (160, 160), (160, 161), (160, 162), (160, 163), (160, 164), (160, 166), (161, 134), (161, 136), (161, 137), (161, 138), (161, 139), (161, 140), (161, 141), (161, 142), (161, 143), (161, 144), (161, 145), (161, 146), (161, 147), (161, 148), (161, 149), (161, 150), (161, 151), (161, 152), (161, 153), (161, 154), (161, 155), (161, 156), (161, 157), (161, 158), (161, 159), (161, 160), (161, 161), (161, 162), (161, 163), (161, 164), (161, 166), (162, 134), (162, 136), (162, 137), (162, 138), (162, 139), (162, 140), (162, 141), (162, 142), (162, 143), (162, 144), (162, 145), (162, 146), (162, 147), (162, 148), (162, 149), (162, 150), (162, 151), (162, 152), (162, 153), (162, 154), (162, 155), (162, 156), (162, 157), (162, 158), (162, 159), (162, 160), (162, 161), (162, 162), (162, 163), (162, 164), (162, 165), (162, 167), (163, 135), (163, 137), (163, 138), (163, 139), (163, 140), (163, 141), (163, 142), (163, 143), (163, 144), (163, 145), (163, 146), (163, 147), (163, 148), (163, 149), (163, 150), (163, 151), (163, 152), (163, 153), (163, 154), (163, 155), (163, 156), (163, 157), (163, 158), (163, 159), (163, 160), (163, 161), (163, 162), (163, 163), (163, 164), (163, 165), (163, 166), (163, 168), (164, 135), (164, 137), (164, 138), (164, 139), (164, 140), (164, 141), (164, 142), (164, 143), (164, 144), (164, 145), (164, 146), (164, 147), (164, 148), (164, 149), (164, 150), (164, 151), (164, 152), (164, 153), (164, 154), (164, 155), (164, 156), (164, 157), (164, 158), (164, 159), (164, 160), (164, 161), (164, 162), (164, 163), (164, 164), (164, 165), (164, 166), (164, 167), (164, 170), (165, 136), (165, 138), (165, 139), (165, 140), (165, 141), (165, 142), (165, 143), (165, 144), (165, 145), (165, 146), (165, 147), (165, 148), (165, 149), (165, 150), (165, 151), (165, 152), (165, 153), (165, 154), (165, 155), (165, 156), (165, 157), (165, 158), (165, 159), (165, 160), (165, 161), (165, 162), (165, 163), (165, 164), (165, 165), (165, 166), (165, 167), (165, 168), (165, 171), (166, 136), (166, 138), (166, 139), (166, 140), (166, 141), (166, 142), (166, 143), (166, 144), (166, 145), (166, 146), (166, 147), (166, 148), (166, 149), (166, 150), (166, 151), (166, 152), (166, 153), (166, 154), (166, 155), (166, 156), (166, 157), (166, 158), (166, 159), (166, 160), (166, 161), (166, 162), (166, 163), (166, 164), (166, 165), (166, 166), (166, 167), (166, 168), (166, 169), (166, 170), (166, 173), (166, 195), (166, 198), (167, 137), (167, 139), (167, 140), (167, 141), (167, 142), (167, 143), (167, 144), (167, 145), (167, 146), (167, 147), (167, 148), (167, 149), (167, 150), (167, 151), (167, 152), (167, 153), (167, 154), (167, 155), (167, 156), (167, 157), (167, 158), (167, 159), (167, 160), (167, 161), (167, 162), (167, 163), (167, 164), (167, 165), (167, 166), (167, 167), (167, 168), (167, 169), (167, 170), (167, 171), (167, 172), (167, 175), (167, 176), (167, 194), (167, 198), (168, 137), (168, 139), (168, 140), (168, 141), (168, 142), (168, 143), (168, 144), (168, 145), (168, 146), (168, 147), (168, 148), (168, 149), (168, 150), (168, 151), (168, 152), (168, 153), (168, 154), (168, 155), (168, 156), (168, 157), (168, 158), (168, 159), (168, 160), (168, 161), (168, 162), (168, 163), (168, 164), (168, 165), (168, 166), (168, 167), (168, 168), (168, 169), (168, 170), (168, 171), (168, 172), (168, 173), (168, 174), (168, 177), (168, 178), (168, 179), (168, 193), (168, 195), (168, 197), (169, 138), (169, 140), (169, 141), (169, 142), (169, 143), (169, 144), (169, 145), (169, 146), (169, 147), (169, 148), (169, 149), (169, 150), (169, 151), (169, 152), (169, 153), (169, 154), (169, 155), (169, 156), (169, 157), (169, 158), (169, 159), (169, 160), (169, 161), (169, 162), (169, 163), (169, 164), (169, 165), (169, 166), (169, 167), (169, 168), (169, 169), (169, 170), (169, 171), (169, 172), (169, 173), (169, 174), (169, 175), (169, 176), (169, 180), (169, 181), (169, 182), (169, 183), (169, 191), (169, 194), (169, 195), (169, 197), (170, 138), (170, 140), (170, 141), (170, 142), (170, 143), (170, 144), (170, 145), (170, 146), (170, 147), (170, 148), (170, 149), (170, 150), (170, 151), (170, 152), (170, 153), (170, 154), (170, 155), (170, 156), (170, 157), (170, 158), (170, 159), (170, 160), (170, 161), (170, 162), (170, 163), (170, 164), (170, 165), (170, 166), (170, 167), (170, 168), (170, 169), (170, 170), (170, 171), (170, 172), (170, 173), (170, 174), (170, 175), (170, 176), (170, 177), (170, 178), (170, 179), (170, 184), (170, 185), (170, 186), (170, 187), (170, 188), (170, 189), (170, 190), (170, 193), (170, 194), (170, 195), (170, 197), (171, 138), (171, 140), (171, 141), (171, 142), (171, 143), (171, 144), (171, 145), (171, 146), (171, 147), (171, 148), (171, 149), (171, 150), (171, 151), (171, 152), (171, 153), (171, 154), (171, 155), (171, 156), (171, 157), (171, 158), (171, 159), (171, 160), (171, 161), (171, 162), (171, 163), (171, 164), (171, 165), (171, 166), (171, 167), (171, 168), (171, 169), (171, 170), (171, 171), (171, 172), (171, 173), (171, 174), (171, 175), (171, 176), (171, 177), (171, 178), (171, 179), (171, 180), (171, 181), (171, 182), (171, 183), (171, 191), (171, 192), (171, 193), (171, 194), (171, 195), (171, 197), (172, 139), (172, 141), (172, 142), (172, 143), (172, 144), (172, 145), (172, 146), (172, 147), (172, 148), (172, 149), (172, 150), (172, 151), (172, 152), (172, 153), (172, 154), (172, 155), (172, 156), (172, 157), (172, 158), (172, 159), (172, 160), (172, 161), (172, 162), (172, 163), (172, 164), (172, 165), (172, 166), (172, 167), (172, 168), (172, 169), (172, 170), (172, 171), (172, 172), (172, 173), (172, 174), (172, 175), (172, 176), (172, 177), (172, 178), (172, 179), (172, 180), (172, 181), (172, 182), (172, 183), (172, 184), (172, 185), (172, 186), (172, 187), (172, 188), (172, 189), (172, 190), (172, 191), (172, 192), (172, 193), (172, 194), (172, 196), (173, 139), (173, 141), (173, 142), (173, 143), (173, 144), (173, 145), (173, 146), (173, 147), (173, 148), (173, 149), (173, 150), (173, 151), (173, 152), (173, 153), (173, 154), (173, 155), (173, 156), (173, 157), (173, 158), (173, 159), (173, 160), (173, 161), (173, 162), (173, 163), (173, 164), (173, 165), (173, 166), (173, 167), (173, 168), (173, 169), (173, 170), (173, 171), (173, 172), (173, 173), (173, 174), (173, 175), (173, 176), (173, 177), (173, 178), (173, 179), (173, 180), (173, 181), (173, 182), (173, 183), (173, 184), (173, 185), (173, 186), (173, 187), (173, 188), (173, 189), (173, 190), (173, 191), (173, 192), (173, 193), (173, 194), (173, 196), (174, 139), (174, 141), (174, 142), (174, 143), (174, 144), (174, 145), (174, 146), (174, 147), (174, 148), (174, 149), (174, 150), (174, 151), (174, 152), (174, 153), (174, 154), (174, 155), (174, 156), (174, 157), (174, 158), (174, 159), (174, 160), (174, 161), (174, 162), (174, 163), (174, 164), (174, 165), (174, 166), (174, 167), (174, 168), (174, 169), (174, 170), (174, 171), (174, 172), (174, 173), (174, 174), (174, 175), (174, 176), (174, 177), (174, 178), (174, 179), (174, 180), (174, 181), (174, 182), (174, 183), (174, 184), (174, 185), (174, 186), (174, 187), (174, 188), (174, 189), (174, 190), (174, 191), (174, 192), (174, 193), (174, 195), (175, 140), (175, 142), (175, 143), (175, 144), (175, 145), (175, 146), (175, 147), (175, 148), (175, 149), (175, 150), (175, 151), (175, 152), (175, 153), (175, 154), (175, 155), (175, 156), (175, 157), (175, 158), (175, 159), (175, 160), (175, 161), (175, 162), (175, 163), (175, 164), (175, 165), (175, 166), (175, 167), (175, 168), (175, 169), (175, 170), (175, 171), (175, 172), (175, 173), (175, 174), (175, 175), (175, 176), (175, 177), (175, 178), (175, 179), (175, 180), (175, 181), (175, 182), (175, 183), (175, 184), (175, 185), (175, 186), (175, 187), (175, 188), (175, 189), (175, 190), (175, 191), (175, 192), (175, 193), (175, 195), (176, 141), (176, 143), (176, 144), (176, 145), (176, 146), (176, 147), (176, 148), (176, 149), (176, 150), (176, 151), (176, 152), (176, 153), (176, 154), (176, 155), (176, 156), (176, 157), (176, 158), (176, 159), (176, 160), (176, 161), (176, 162), (176, 163), (176, 164), (176, 165), (176, 166), (176, 167), (176, 168), (176, 169), (176, 170), (176, 171), (176, 172), (176, 173), (176, 174), (176, 175), (176, 176), (176, 177), (176, 178), (176, 179), (176, 180), (176, 181), (176, 182), (176, 183), (176, 184), (176, 185), (176, 186), (176, 187), (176, 188), (176, 189), (176, 190), (176, 191), (176, 192), (176, 193), (176, 195), (177, 142), (177, 144), (177, 145), (177, 146), (177, 147), (177, 148), (177, 149), (177, 150), (177, 151), (177, 152), (177, 153), (177, 154), (177, 155), (177, 156), (177, 157), (177, 158), (177, 159), (177, 160), (177, 161), (177, 162), (177, 163), (177, 164), (177, 165), (177, 166), (177, 167), (177, 168), (177, 169), (177, 170), (177, 171), (177, 172), (177, 173), (177, 174), (177, 175), (177, 176), (177, 177), (177, 178), (177, 179), (177, 180), (177, 181), (177, 182), (177, 183), (177, 184), (177, 185), (177, 186), (177, 187), (177, 188), (177, 189), (177, 190), (177, 191), (177, 192), (177, 194), (178, 142), (178, 144), (178, 145), (178, 146), (178, 147), (178, 148), (178, 149), (178, 150), (178, 151), (178, 152), (178, 153), (178, 154), (178, 155), (178, 156), (178, 157), (178, 158), (178, 159), (178, 160), (178, 161), (178, 162), (178, 163), (178, 164), (178, 165), (178, 166), (178, 167), (178, 168), (178, 169), (178, 170), (178, 171), (178, 172), (178, 173), (178, 174), (178, 175), (178, 176), (178, 177), (178, 178), (178, 179), (178, 180), (178, 181), (178, 182), (178, 183), (178, 184), (178, 185), (178, 186), (178, 187), (178, 188), (178, 189), (178, 190), (178, 191), (178, 192), (178, 194), (179, 143), (179, 145), (179, 146), (179, 147), (179, 148), (179, 149), (179, 150), (179, 151), (179, 152), (179, 153), (179, 154), (179, 155), (179, 156), (179, 157), (179, 158), (179, 159), (179, 160), (179, 161), (179, 162), (179, 163), (179, 164), (179, 165), (179, 166), (179, 167), (179, 168), (179, 169), (179, 170), (179, 171), (179, 172), (179, 173), (179, 174), (179, 175), (179, 176), (179, 177), (179, 178), (179, 179), (179, 180), (179, 181), (179, 182), (179, 183), (179, 184), (179, 185), (179, 186), (179, 187), (179, 188), (179, 189), (179, 190), (179, 191), (179, 192), (179, 194), (180, 144), (180, 146), (180, 147), (180, 148), (180, 149), (180, 150), (180, 151), (180, 152), (180, 153), (180, 154), (180, 155), (180, 156), (180, 157), (180, 158), (180, 159), (180, 160), (180, 161), (180, 162), (180, 163), (180, 164), (180, 165), (180, 166), (180, 167), (180, 168), (180, 169), (180, 170), (180, 171), (180, 172), (180, 173), (180, 174), (180, 175), (180, 176), (180, 177), (180, 178), (180, 179), (180, 180), (180, 181), (180, 182), (180, 183), (180, 184), (180, 185), (180, 186), (180, 187), (180, 188), (180, 189), (180, 190), (180, 191), (180, 192), (180, 194), (181, 145), (181, 147), (181, 148), (181, 149), (181, 150), (181, 151), (181, 152), (181, 153), (181, 154), (181, 155), (181, 156), (181, 157), (181, 158), (181, 159), (181, 160), (181, 161), (181, 162), (181, 163), (181, 164), (181, 165), (181, 166), (181, 167), (181, 168), (181, 169), (181, 170), (181, 171), (181, 172), (181, 173), (181, 174), (181, 175), (181, 176), (181, 177), (181, 178), (181, 179), (181, 180), (181, 181), (181, 182), (181, 183), (181, 184), (181, 185), (181, 186), (181, 187), (181, 188), (181, 189), (181, 190), (181, 191), (181, 194), (182, 145), (182, 147), (182, 148), (182, 149), (182, 150), (182, 151), (182, 152), (182, 153), (182, 154), (182, 155), (182, 156), (182, 157), (182, 158), (182, 159), (182, 160), (182, 161), (182, 162), (182, 163), (182, 164), (182, 165), (182, 166), (182, 167), (182, 168), (182, 169), (182, 170), (182, 171), (182, 172), (182, 173), (182, 174), (182, 175), (182, 176), (182, 177), (182, 178), (182, 179), (182, 180), (182, 181), (182, 182), (182, 183), (182, 184), (182, 185), (182, 186), (182, 187), (182, 188), (182, 189), (182, 190), (182, 192), (183, 146), (183, 148), (183, 149), (183, 150), (183, 151), (183, 152), (183, 153), (183, 154), (183, 155), (183, 156), (183, 157), (183, 158), (183, 159), (183, 160), (183, 161), (183, 162), (183, 163), (183, 164), (183, 165), (183, 166), (183, 167), (183, 168), (183, 169), (183, 170), (183, 171), (183, 172), (183, 173), (183, 174), (183, 175), (183, 176), (183, 177), (183, 178), (183, 179), (183, 180), (183, 181), (183, 182), (183, 183), (183, 184), (183, 185), (183, 186), (183, 187), (183, 188), (183, 189), (183, 191), (184, 147), (184, 149), (184, 150), (184, 151), (184, 152), (184, 153), (184, 154), (184, 155), (184, 156), (184, 157), (184, 158), (184, 159), (184, 160), (184, 161), (184, 162), (184, 163), (184, 164), (184, 165), (184, 166), (184, 167), (184, 168), (184, 169), (184, 170), (184, 171), (184, 172), (184, 173), (184, 174), (184, 175), (184, 176), (184, 177), (184, 178), (184, 179), (184, 180), (184, 181), (184, 182), (184, 183), (184, 184), (184, 185), (184, 186), (184, 187), (184, 188), (184, 190), (185, 148), (185, 151), (185, 152), (185, 153), (185, 154), (185, 155), (185, 156), (185, 157), (185, 158), (185, 159), (185, 160), (185, 161), (185, 162), (185, 163), (185, 164), (185, 165), (185, 166), (185, 167), (185, 168), (185, 169), (185, 170), (185, 171), (185, 172), (185, 173), (185, 174), (185, 175), (185, 176), (185, 177), (185, 178), (185, 179), (185, 180), (185, 181), (185, 182), (185, 183), (185, 184), (185, 185), (185, 186), (185, 187), (185, 190), (186, 149), (186, 153), (186, 154), (186, 155), (186, 156), (186, 157), (186, 158), (186, 159), (186, 160), (186, 161), (186, 162), (186, 163), (186, 164), (186, 165), (186, 166), (186, 167), (186, 168), (186, 169), (186, 170), (186, 171), (186, 172), (186, 173), (186, 174), (186, 175), (186, 176), (186, 177), (186, 178), (186, 179), (186, 180), (186, 187), (186, 189), (187, 151), (187, 156), (187, 157), (187, 158), (187, 159), (187, 160), (187, 161), (187, 162), (187, 163), (187, 164), (187, 165), (187, 166), (187, 167), (187, 168), (187, 169), (187, 170), (187, 171), (187, 172), (187, 173), (187, 174), (187, 175), (187, 176), (187, 181), (187, 182), (187, 183), (187, 184), (187, 185), (187, 186), (187, 187), (188, 153), (188, 159), (188, 160), (188, 161), (188, 162), (188, 163), (188, 164), (188, 165), (188, 166), (188, 167), (188, 168), (188, 169), (188, 170), (188, 171), (188, 172), (188, 173), (188, 177), (188, 178), (188, 179), (188, 180), (189, 156), (189, 157), (189, 158), (189, 165), (189, 166), (189, 167), (189, 174), (189, 175), (189, 176), (190, 159), (190, 160), (190, 161), (190, 162), (190, 163), (190, 164), (190, 165), (190, 166), (190, 167), (190, 168), (190, 169), (190, 170), (190, 171), (190, 173), (209, 159), (209, 160), (209, 161), (209, 162), (209, 163), (209, 164), (209, 165), (209, 166), (209, 167), (209, 168), (209, 169), (209, 170), (209, 171), (209, 172), (209, 173), (210, 156), (210, 157), (210, 175), (210, 176), (211, 153), (211, 158), (211, 159), (211, 160), (211, 161), (211, 162), (211, 163), (211, 164), (211, 165), (211, 166), (211, 167), (211, 168), (211, 169), (211, 170), (211, 171), (211, 172), (211, 173), (211, 174), (211, 177), (211, 178), (211, 179), (211, 180), (212, 151), (212, 155), (212, 156), (212, 157), (212, 158), (212, 159), (212, 160), (212, 161), (212, 162), (212, 163), (212, 164), (212, 165), (212, 166), (212, 167), (212, 168), (212, 169), (212, 170), (212, 171), (212, 172), (212, 173), (212, 174), (212, 175), (212, 176), (212, 182), (212, 183), (212, 184), (212, 185), (212, 186), (212, 187), (212, 189), (213, 149), (213, 153), (213, 154), (213, 155), (213, 156), (213, 157), (213, 158), (213, 159), (213, 160), (213, 161), (213, 162), (213, 163), (213, 164), (213, 165), (213, 166), (213, 167), (213, 168), (213, 169), (213, 170), (213, 171), (213, 172), (213, 173), (213, 174), (213, 175), (213, 176), (213, 177), (213, 178), (213, 179), (213, 180), (213, 181), (213, 189), (214, 148), (214, 151), (214, 152), (214, 153), (214, 154), (214, 155), (214, 156), (214, 157), (214, 158), (214, 159), (214, 160), (214, 161), (214, 162), (214, 163), (214, 164), (214, 165), (214, 166), (214, 167), (214, 168), (214, 169), (214, 170), (214, 171), (214, 172), (214, 173), (214, 174), (214, 175), (214, 176), (214, 177), (214, 178), (214, 179), (214, 180), (214, 181), (214, 182), (214, 183), (214, 184), (214, 185), (214, 186), (214, 187), (214, 190), (215, 147), (215, 149), (215, 150), (215, 151), (215, 152), (215, 153), (215, 154), (215, 155), (215, 156), (215, 157), (215, 158), (215, 159), (215, 160), (215, 161), (215, 162), (215, 163), (215, 164), (215, 165), (215, 166), (215, 167), (215, 168), (215, 169), (215, 170), (215, 171), (215, 172), (215, 173), (215, 174), (215, 175), (215, 176), (215, 177), (215, 178), (215, 179), (215, 180), (215, 181), (215, 182), (215, 183), (215, 184), (215, 185), (215, 186), (215, 187), (215, 188), (215, 190), (216, 146), (216, 148), (216, 149), (216, 150), (216, 151), (216, 152), (216, 153), (216, 154), (216, 155), (216, 156), (216, 157), (216, 158), (216, 159), (216, 160), (216, 161), (216, 162), (216, 163), (216, 164), (216, 165), (216, 166), (216, 167), (216, 168), (216, 169), (216, 170), (216, 171), (216, 172), (216, 173), (216, 174), (216, 175), (216, 176), (216, 177), (216, 178), (216, 179), (216, 180), (216, 181), (216, 182), (216, 183), (216, 184), (216, 185), (216, 186), (216, 187), (216, 188), (216, 189), (216, 191), (217, 145), (217, 147), (217, 148), (217, 149), (217, 150), (217, 151), (217, 152), (217, 153), (217, 154), (217, 155), (217, 156), (217, 157), (217, 158), (217, 159), (217, 160), (217, 161), (217, 162), (217, 163), (217, 164), (217, 165), (217, 166), (217, 167), (217, 168), (217, 169), (217, 170), (217, 171), (217, 172), (217, 173), (217, 174), (217, 175), (217, 176), (217, 177), (217, 178), (217, 179), (217, 180), (217, 181), (217, 182), (217, 183), (217, 184), (217, 185), (217, 186), (217, 187), (217, 188), (217, 189), (217, 190), (217, 192), (218, 145), (218, 147), (218, 148), (218, 149), (218, 150), (218, 151), (218, 152), (218, 153), (218, 154), (218, 155), (218, 156), (218, 157), (218, 158), (218, 159), (218, 160), (218, 161), (218, 162), (218, 163), (218, 164), (218, 165), (218, 166), (218, 167), (218, 168), (218, 169), (218, 170), (218, 171), (218, 172), (218, 173), (218, 174), (218, 175), (218, 176), (218, 177), (218, 178), (218, 179), (218, 180), (218, 181), (218, 182), (218, 183), (218, 184), (218, 185), (218, 186), (218, 187), (218, 188), (218, 189), (218, 190), (218, 191), (218, 194), (219, 144), (219, 146), (219, 147), (219, 148), (219, 149), (219, 150), (219, 151), (219, 152), (219, 153), (219, 154), (219, 155), (219, 156), (219, 157), (219, 158), (219, 159), (219, 160), (219, 161), (219, 162), (219, 163), (219, 164), (219, 165), (219, 166), (219, 167), (219, 168), (219, 169), (219, 170), (219, 171), (219, 172), (219, 173), (219, 174), (219, 175), (219, 176), (219, 177), (219, 178), (219, 179), (219, 180), (219, 181), (219, 182), (219, 183), (219, 184), (219, 185), (219, 186), (219, 187), (219, 188), (219, 189), (219, 190), (219, 191), (219, 192), (219, 194), (220, 143), (220, 145), (220, 146), (220, 147), (220, 148), (220, 149), (220, 150), (220, 151), (220, 152), (220, 153), (220, 154), (220, 155), (220, 156), (220, 157), (220, 158), (220, 159), (220, 160), (220, 161), (220, 162), (220, 163), (220, 164), (220, 165), (220, 166), (220, 167), (220, 168), (220, 169), (220, 170), (220, 171), (220, 172), (220, 173), (220, 174), (220, 175), (220, 176), (220, 177), (220, 178), (220, 179), (220, 180), (220, 181), (220, 182), (220, 183), (220, 184), (220, 185), (220, 186), (220, 187), (220, 188), (220, 189), (220, 190), (220, 191), (220, 192), (220, 194), (221, 142), (221, 144), (221, 145), (221, 146), (221, 147), (221, 148), (221, 149), (221, 150), (221, 151), (221, 152), (221, 153), (221, 154), (221, 155), (221, 156), (221, 157), (221, 158), (221, 159), (221, 160), (221, 161), (221, 162), (221, 163), (221, 164), (221, 165), (221, 166), (221, 167), (221, 168), (221, 169), (221, 170), (221, 171), (221, 172), (221, 173), (221, 174), (221, 175), (221, 176), (221, 177), (221, 178), (221, 179), (221, 180), (221, 181), (221, 182), (221, 183), (221, 184), (221, 185), (221, 186), (221, 187), (221, 188), (221, 189), (221, 190), (221, 191), (221, 192), (221, 194), (222, 144), (222, 145), (222, 146), (222, 147), (222, 148), (222, 149), (222, 150), (222, 151), (222, 152), (222, 153), (222, 154), (222, 155), (222, 156), (222, 157), (222, 158), (222, 159), (222, 160), (222, 161), (222, 162), (222, 163), (222, 164), (222, 165), (222, 166), (222, 167), (222, 168), (222, 169), (222, 170), (222, 171), (222, 172), (222, 173), (222, 174), (222, 175), (222, 176), (222, 177), (222, 178), (222, 179), (222, 180), (222, 181), (222, 182), (222, 183), (222, 184), (222, 185), (222, 186), (222, 187), (222, 188), (222, 189), (222, 190), (222, 191), (222, 192), (222, 194), (223, 141), (223, 143), (223, 144), (223, 145), (223, 146), (223, 147), (223, 148), (223, 149), (223, 150), (223, 151), (223, 152), (223, 153), (223, 154), (223, 155), (223, 156), (223, 157), (223, 158), (223, 159), (223, 160), (223, 161), (223, 162), (223, 163), (223, 164), (223, 165), (223, 166), (223, 167), (223, 168), (223, 169), (223, 170), (223, 171), (223, 172), (223, 173), (223, 174), (223, 175), (223, 176), (223, 177), (223, 178), (223, 179), (223, 180), (223, 181), (223, 182), (223, 183), (223, 184), (223, 185), (223, 186), (223, 187), (223, 188), (223, 189), (223, 190), (223, 191), (223, 192), (223, 193), (223, 195), (224, 140), (224, 142), (224, 143), (224, 144), (224, 145), (224, 146), (224, 147), (224, 148), (224, 149), (224, 150), (224, 151), (224, 152), (224, 153), (224, 154), (224, 155), (224, 156), (224, 157), (224, 158), (224, 159), (224, 160), (224, 161), (224, 162), (224, 163), (224, 164), (224, 165), (224, 166), (224, 167), (224, 168), (224, 169), (224, 170), (224, 171), (224, 172), (224, 173), (224, 174), (224, 175), (224, 176), (224, 177), (224, 178), (224, 179), (224, 180), (224, 181), (224, 182), (224, 183), (224, 184), (224, 185), (224, 186), (224, 187), (224, 188), (224, 189), (224, 190), (224, 191), (224, 192), (224, 193), (224, 195), (225, 139), (225, 141), (225, 142), (225, 143), (225, 144), (225, 145), (225, 146), (225, 147), (225, 148), (225, 149), (225, 150), (225, 151), (225, 152), (225, 153), (225, 154), (225, 155), (225, 156), (225, 157), (225, 158), (225, 159), (225, 160), (225, 161), (225, 162), (225, 163), (225, 164), (225, 165), (225, 166), (225, 167), (225, 168), (225, 169), (225, 170), (225, 171), (225, 172), (225, 173), (225, 174), (225, 175), (225, 176), (225, 177), (225, 178), (225, 179), (225, 180), (225, 181), (225, 182), (225, 183), (225, 184), (225, 185), (225, 186), (225, 187), (225, 188), (225, 189), (225, 190), (225, 191), (225, 192), (225, 193), (225, 195), (226, 139), (226, 141), (226, 142), (226, 143), (226, 144), (226, 145), (226, 146), (226, 147), (226, 148), (226, 149), (226, 150), (226, 151), (226, 152), (226, 153), (226, 154), (226, 155), (226, 156), (226, 157), (226, 158), (226, 159), (226, 160), (226, 161), (226, 162), (226, 163), (226, 164), (226, 165), (226, 166), (226, 167), (226, 168), (226, 169), (226, 170), (226, 171), (226, 172), (226, 173), (226, 174), (226, 175), (226, 176), (226, 177), (226, 178), (226, 179), (226, 180), (226, 181), (226, 182), (226, 183), (226, 184), (226, 185), (226, 186), (226, 187), (226, 188), (226, 189), (226, 190), (226, 191), (226, 192), (226, 193), (226, 194), (226, 196), (227, 139), (227, 141), (227, 142), (227, 143), (227, 144), (227, 145), (227, 146), (227, 147), (227, 148), (227, 149), (227, 150), (227, 151), (227, 152), (227, 153), (227, 154), (227, 155), (227, 156), (227, 157), (227, 158), (227, 159), (227, 160), (227, 161), (227, 162), (227, 163), (227, 164), (227, 165), (227, 166), (227, 167), (227, 168), (227, 169), (227, 170), (227, 171), (227, 172), (227, 173), (227, 174), (227, 175), (227, 176), (227, 177), (227, 178), (227, 179), (227, 180), (227, 181), (227, 182), (227, 183), (227, 184), (227, 185), (227, 186), (227, 187), (227, 188), (227, 189), (227, 190), (227, 191), (227, 192), (227, 193), (227, 194), (227, 196), (228, 138), (228, 140), (228, 141), (228, 142), (228, 143), (228, 144), (228, 145), (228, 146), (228, 147), (228, 148), (228, 149), (228, 150), (228, 151), (228, 152), (228, 153), (228, 154), (228, 155), (228, 156), (228, 157), (228, 158), (228, 159), (228, 160), (228, 161), (228, 162), (228, 163), (228, 164), (228, 165), (228, 166), (228, 167), (228, 168), (228, 169), (228, 170), (228, 171), (228, 172), (228, 173), (228, 174), (228, 175), (228, 176), (228, 177), (228, 178), (228, 179), (228, 180), (228, 181), (228, 182), (228, 183), (228, 191), (228, 192), (228, 193), (228, 194), (228, 195), (228, 197), (229, 138), (229, 140), (229, 141), (229, 142), (229, 143), (229, 144), (229, 145), (229, 146), (229, 147), (229, 148), (229, 149), (229, 150), (229, 151), (229, 152), (229, 153), (229, 154), (229, 155), (229, 156), (229, 157), (229, 158), (229, 159), (229, 160), (229, 161), (229, 162), (229, 163), (229, 164), (229, 165), (229, 166), (229, 167), (229, 168), (229, 169), (229, 170), (229, 171), (229, 172), (229, 173), (229, 174), (229, 175), (229, 176), (229, 177), (229, 178), (229, 179), (229, 184), (229, 185), (229, 186), (229, 187), (229, 188), (229, 189), (229, 190), (229, 193), (229, 194), (229, 195), (229, 197), (230, 138), (230, 140), (230, 141), (230, 142), (230, 143), (230, 144), (230, 145), (230, 146), (230, 147), (230, 148), (230, 149), (230, 150), (230, 151), (230, 152), (230, 153), (230, 154), (230, 155), (230, 156), (230, 157), (230, 158), (230, 159), (230, 160), (230, 161), (230, 162), (230, 163), (230, 164), (230, 165), (230, 166), (230, 167), (230, 168), (230, 169), (230, 170), (230, 171), (230, 172), (230, 173), (230, 174), (230, 175), (230, 176), (230, 180), (230, 181), (230, 182), (230, 183), (230, 191), (230, 192), (230, 194), (230, 195), (230, 197), (231, 137), (231, 139), (231, 140), (231, 141), (231, 142), (231, 143), (231, 144), (231, 145), (231, 146), (231, 147), (231, 148), (231, 149), (231, 150), (231, 151), (231, 152), (231, 153), (231, 154), (231, 155), (231, 156), (231, 157), (231, 158), (231, 159), (231, 160), (231, 161), (231, 162), (231, 163), (231, 164), (231, 165), (231, 166), (231, 167), (231, 168), (231, 169), (231, 170), (231, 171), (231, 172), (231, 173), (231, 174), (231, 177), (231, 178), (231, 179), (231, 193), (231, 195), (231, 197), (232, 137), (232, 139), (232, 140), (232, 141), (232, 142), (232, 143), (232, 144), (232, 145), (232, 146), (232, 147), (232, 148), (232, 149), (232, 150), (232, 151), (232, 152), (232, 153), (232, 154), (232, 155), (232, 156), (232, 157), (232, 158), (232, 159), (232, 160), (232, 161), (232, 162), (232, 163), (232, 164), (232, 165), (232, 166), (232, 167), (232, 168), (232, 169), (232, 170), (232, 171), (232, 175), (232, 176), (232, 194), (232, 198), (233, 136), (233, 138), (233, 139), (233, 140), (233, 141), (233, 142), (233, 143), (233, 144), (233, 145), (233, 146), (233, 147), (233, 148), (233, 149), (233, 150), (233, 151), (233, 152), (233, 153), (233, 154), (233, 155), (233, 156), (233, 157), (233, 158), (233, 159), (233, 160), (233, 161), (233, 162), (233, 163), (233, 164), (233, 165), (233, 166), (233, 167), (233, 168), (233, 169), (233, 170), (233, 173), (233, 195), (233, 198), (234, 136), (234, 138), (234, 139), (234, 140), (234, 141), (234, 142), (234, 143), (234, 144), (234, 145), (234, 146), (234, 147), (234, 148), (234, 149), (234, 150), (234, 151), (234, 152), (234, 153), (234, 154), (234, 155), (234, 156), (234, 157), (234, 158), (234, 159), (234, 160), (234, 161), (234, 162), (234, 163), (234, 164), (234, 165), (234, 166), (234, 167), (234, 168), (234, 171), (235, 135), (235, 137), (235, 138), (235, 139), (235, 140), (235, 141), (235, 142), (235, 143), (235, 144), (235, 145), (235, 146), (235, 147), (235, 148), (235, 149), (235, 150), (235, 151), (235, 152), (235, 153), (235, 154), (235, 155), (235, 156), (235, 157), (235, 158), (235, 159), (235, 160), (235, 161), (235, 162), (235, 163), (235, 164), (235, 165), (235, 166), (235, 167), (235, 170), (236, 135), (236, 137), (236, 138), (236, 139), (236, 140), (236, 141), (236, 142), (236, 143), (236, 144), (236, 145), (236, 146), (236, 147), (236, 148), (236, 149), (236, 150), (236, 151), (236, 152), (236, 153), (236, 154), (236, 155), (236, 156), (236, 157), (236, 158), (236, 159), (236, 160), (236, 161), (236, 162), (236, 163), (236, 164), (236, 165), (236, 166), (236, 168), (237, 134), (237, 136), (237, 137), (237, 138), (237, 139), (237, 140), (237, 141), (237, 142), (237, 143), (237, 144), (237, 145), (237, 146), (237, 147), (237, 148), (237, 149), (237, 150), (237, 151), (237, 152), (237, 153), (237, 154), (237, 155), (237, 156), (237, 157), (237, 158), (237, 159), (237, 160), (237, 161), (237, 162), (237, 163), (237, 164), (237, 165), (237, 167), (238, 134), (238, 136), (238, 137), (238, 138), (238, 139), (238, 140), (238, 141), (238, 142), (238, 143), (238, 144), (238, 145), (238, 146), (238, 147), (238, 148), (238, 149), (238, 150), (238, 151), (238, 152), (238, 153), (238, 154), (238, 155), (238, 156), (238, 157), (238, 158), (238, 159), (238, 160), (238, 161), (238, 162), (238, 163), (238, 164), (238, 166), (239, 133), (239, 134), (239, 135), (239, 136), (239, 137), (239, 138), (239, 139), (239, 140), (239, 141), (239, 142), (239, 143), (239, 144), (239, 145), (239, 146), (239, 147), (239, 148), (239, 149), (239, 150), (239, 151), (239, 152), (239, 153), (239, 154), (239, 155), (239, 156), (239, 157), (239, 158), (239, 159), (239, 160), (239, 161), (239, 162), (239, 163), (239, 164), (239, 166), (240, 133), (240, 135), (240, 136), (240, 137), (240, 138), (240, 139), (240, 140), (240, 141), (240, 142), (240, 143), (240, 144), (240, 145), (240, 146), (240, 147), (240, 148), (240, 149), (240, 150), (240, 151), (240, 152), (240, 153), (240, 154), (240, 155), (240, 156), (240, 157), (240, 158), (240, 159), (240, 160), (240, 161), (240, 162), (240, 163), (240, 165), (241, 133), (241, 135), (241, 136), (241, 137), (241, 138), (241, 139), (241, 140), (241, 141), (241, 142), (241, 143), (241, 144), (241, 145), (241, 146), (241, 147), (241, 148), (241, 149), (241, 150), (241, 151), (241, 152), (241, 153), (241, 154), (241, 155), (241, 156), (241, 157), (241, 158), (241, 159), (241, 160), (241, 161), (241, 162), (241, 164), (242, 133), (242, 135), (242, 136), (242, 137), (242, 138), (242, 139), (242, 140), (242, 141), (242, 142), (242, 143), (242, 144), (242, 145), (242, 146), (242, 147), (242, 148), (242, 149), (242, 150), (242, 151), (242, 152), (242, 153), (242, 154), (242, 155), (242, 156), (242, 157), (242, 158), (242, 159), (242, 160), (242, 161), (242, 162), (242, 164), (243, 133), (243, 135), (243, 136), (243, 137), (243, 138), (243, 139), (243, 140), (243, 141), (243, 142), (243, 143), (243, 144), (243, 145), (243, 146), (243, 147), (243, 148), (243, 149), (243, 150), (243, 151), (243, 152), (243, 153), (243, 154), (243, 155), (243, 156), (243, 157), (243, 158), (243, 159), (243, 160), (243, 161), (243, 163), (244, 133), (244, 135), (244, 136), (244, 137), (244, 138), (244, 139), (244, 140), (244, 141), (244, 142), (244, 143), (244, 144), (244, 145), (244, 146), (244, 147), (244, 148), (244, 149), (244, 150), (244, 151), (244, 152), (244, 153), (244, 154), (244, 155), (244, 156), (244, 157), (244, 158), (244, 159), (244, 160), (244, 161), (244, 163), (245, 133), (245, 135), (245, 136), (245, 137), (245, 138), (245, 139), (245, 140), (245, 141), (245, 142), (245, 143), (245, 144), (245, 145), (245, 146), (245, 147), (245, 148), (245, 149), (245, 150), (245, 151), (245, 152), (245, 153), (245, 154), (245, 155), (245, 156), (245, 157), (245, 158), (245, 159), (245, 160), (245, 162), (246, 133), (246, 135), (246, 136), (246, 137), (246, 138), (246, 139), (246, 140), (246, 141), (246, 142), (246, 143), (246, 144), (246, 145), (246, 146), (246, 147), (246, 148), (246, 149), (246, 150), (246, 151), (246, 152), (246, 153), (246, 154), (246, 155), (246, 156), (246, 157), (246, 158), (246, 159), (246, 161), (247, 134), (247, 136), (247, 137), (247, 138), (247, 139), (247, 140), (247, 141), (247, 142), (247, 143), (247, 144), (247, 145), (247, 146), (247, 147), (247, 148), (247, 149), (247, 150), (247, 151), (247, 152), (247, 153), (247, 154), (247, 155), (247, 156), (247, 157), (247, 158), (247, 160), (248, 134), (248, 136), (248, 137), (248, 138), (248, 139), (248, 140), (248, 141), (248, 142), (248, 143), (248, 144), (248, 145), (248, 146), (248, 147), (248, 148), (248, 149), (248, 150), (248, 151), (248, 152), (248, 153), (248, 154), (248, 155), (248, 156), (248, 157), (248, 160), (249, 135), (249, 137), (249, 138), (249, 139), (249, 140), (249, 141), (249, 142), (249, 143), (249, 144), (249, 145), (249, 146), (249, 147), (249, 148), (249, 149), (249, 150), (249, 151), (249, 152), (249, 153), (249, 154), (249, 155), (249, 156), (249, 157), (249, 159), (250, 136), (250, 138), (250, 139), (250, 140), (250, 141), (250, 142), (250, 143), (250, 144), (250, 145), (250, 146), (250, 147), (250, 148), (250, 149), (250, 150), (250, 151), (250, 152), (250, 153), (250, 154), (250, 155), (250, 158), (251, 136), (251, 138), (251, 139), (251, 140), (251, 141), (251, 142), (251, 143), (251, 144), (251, 145), (251, 146), (251, 147), (251, 148), (251, 149), (251, 150), (251, 151), (251, 152), (251, 153), (251, 154), (251, 157), (252, 137), (252, 139), (252, 140), (252, 141), (252, 142), (252, 143), (252, 144), (252, 145), (252, 146), (252, 147), (252, 148), (252, 149), (252, 150), (252, 151), (252, 152), (252, 153), (252, 156), (253, 138), (253, 140), (253, 141), (253, 142), (253, 143), (253, 144), (253, 145), (253, 146), (253, 147), (253, 148), (253, 149), (253, 150), (253, 151), (253, 154), (254, 139), (254, 142), (254, 143), (254, 144), (254, 145), (254, 146), (254, 147), (254, 148), (254, 149), (254, 153), (255, 140), (255, 151), (256, 142), (256, 144), (256, 145), (256, 146), (256, 147), (256, 149), ) coordinates_6BFF00 = ((36, 198), (36, 200), (36, 201), (36, 202), (37, 198), (37, 205), (38, 196), (38, 199), (38, 200), (38, 201), (38, 202), (38, 206), (39, 195), (39, 198), (39, 199), (39, 200), (39, 201), (39, 202), (39, 203), (39, 204), (39, 205), (39, 208), (40, 193), (40, 196), (40, 197), (40, 198), (40, 199), (40, 200), (40, 201), (40, 202), (40, 203), (40, 204), (40, 205), (40, 206), (40, 209), (41, 191), (41, 194), (41, 195), (41, 196), (41, 197), (41, 198), (41, 199), (41, 200), (41, 201), (41, 202), (41, 203), (41, 204), (41, 205), (41, 206), (41, 207), (41, 208), (41, 210), (42, 193), (42, 194), (42, 195), (42, 196), (42, 197), (42, 198), (42, 199), (42, 200), (42, 201), (42, 202), (42, 203), (42, 204), (42, 205), (42, 206), (42, 207), (42, 208), (42, 209), (42, 211), (43, 190), (43, 192), (43, 193), (43, 194), (43, 195), (43, 196), (43, 197), (43, 198), (43, 199), (43, 200), (43, 201), (43, 202), (43, 203), (43, 204), (43, 205), (43, 206), (43, 207), (43, 208), (43, 209), (43, 210), (43, 212), (44, 190), (44, 192), (44, 193), (44, 194), (44, 195), (44, 196), (44, 197), (44, 198), (44, 199), (44, 200), (44, 201), (44, 202), (44, 203), (44, 204), (44, 205), (44, 206), (44, 207), (44, 208), (44, 209), (44, 210), (44, 212), (45, 191), (45, 194), (45, 195), (45, 196), (45, 197), (45, 198), (45, 199), (45, 200), (45, 201), (45, 202), (45, 203), (45, 204), (45, 205), (45, 206), (45, 207), (45, 208), (45, 209), (45, 210), (45, 211), (45, 213), (46, 192), (46, 195), (46, 196), (46, 197), (46, 198), (46, 199), (46, 200), (46, 201), (46, 202), (46, 203), (46, 204), (46, 205), (46, 206), (46, 207), (46, 208), (46, 209), (46, 210), (46, 211), (46, 213), (47, 194), (47, 196), (47, 197), (47, 198), (47, 199), (47, 200), (47, 201), (47, 202), (47, 203), (47, 204), (47, 205), (47, 206), (47, 207), (47, 208), (47, 209), (47, 210), (47, 211), (47, 213), (48, 195), (48, 197), (48, 198), (48, 199), (48, 200), (48, 201), (48, 202), (48, 203), (48, 204), (48, 205), (48, 206), (48, 207), (48, 208), (48, 209), (48, 210), (48, 211), (48, 212), (48, 214), (49, 196), (49, 198), (49, 199), (49, 200), (49, 201), (49, 202), (49, 203), (49, 204), (49, 205), (49, 206), (49, 207), (49, 208), (49, 209), (49, 210), (49, 211), (49, 212), (49, 214), (50, 196), (50, 198), (50, 199), (50, 200), (50, 201), (50, 202), (50, 203), (50, 204), (50, 205), (50, 206), (50, 207), (50, 208), (50, 209), (50, 210), (50, 211), (50, 212), (50, 214), (51, 196), (51, 198), (51, 199), (51, 200), (51, 201), (51, 202), (51, 203), (51, 204), (51, 205), (51, 206), (51, 207), (51, 208), (51, 209), (51, 210), (51, 211), (51, 212), (51, 214), (52, 196), (52, 198), (52, 199), (52, 200), (52, 201), (52, 202), (52, 203), (52, 204), (52, 205), (52, 206), (52, 207), (52, 208), (52, 209), (52, 210), (52, 211), (52, 212), (52, 214), (53, 195), (53, 197), (53, 198), (53, 199), (53, 200), (53, 201), (53, 202), (53, 203), (53, 204), (53, 205), (53, 206), (53, 207), (53, 208), (53, 209), (53, 210), (53, 211), (53, 212), (53, 214), (54, 195), (54, 196), (54, 197), (54, 198), (54, 199), (54, 200), (54, 201), (54, 202), (54, 203), (54, 204), (54, 205), (54, 206), (54, 207), (54, 208), (54, 209), (54, 210), (54, 211), (54, 212), (54, 214), (55, 194), (55, 196), (55, 197), (55, 198), (55, 199), (55, 200), (55, 201), (55, 202), (55, 203), (55, 204), (55, 205), (55, 206), (55, 207), (55, 208), (55, 209), (55, 210), (55, 211), (55, 213), (56, 193), (56, 195), (56, 196), (56, 197), (56, 198), (56, 199), (56, 200), (56, 201), (56, 202), (56, 203), (56, 204), (56, 205), (56, 206), (56, 207), (56, 208), (56, 209), (56, 210), (56, 211), (56, 213), (57, 192), (57, 194), (57, 195), (57, 196), (57, 197), (57, 198), (57, 199), (57, 200), (57, 201), (57, 202), (57, 203), (57, 204), (57, 205), (57, 206), (57, 207), (57, 208), (57, 209), (57, 210), (57, 211), (57, 213), (58, 191), (58, 193), (58, 194), (58, 195), (58, 196), (58, 197), (58, 198), (58, 199), (58, 200), (58, 201), (58, 202), (58, 203), (58, 204), (58, 205), (58, 206), (58, 207), (58, 208), (58, 209), (58, 210), (58, 212), (59, 191), (59, 193), (59, 194), (59, 195), (59, 196), (59, 197), (59, 198), (59, 199), (59, 200), (59, 201), (59, 202), (59, 203), (59, 204), (59, 205), (59, 206), (59, 207), (59, 208), (59, 209), (59, 210), (59, 212), (60, 191), (60, 193), (60, 194), (60, 195), (60, 196), (60, 197), (60, 198), (60, 199), (60, 200), (60, 201), (60, 202), (60, 203), (60, 204), (60, 205), (60, 206), (60, 207), (60, 208), (60, 209), (60, 210), (60, 212), (61, 191), (61, 198), (61, 199), (61, 200), (61, 201), (61, 202), (61, 203), (61, 204), (61, 205), (61, 206), (61, 207), (61, 208), (61, 209), (61, 210), (61, 212), (62, 191), (62, 193), (62, 194), (62, 195), (62, 196), (62, 197), (62, 198), (62, 199), (62, 200), (62, 201), (62, 202), (62, 203), (62, 204), (62, 205), (62, 206), (62, 207), (62, 208), (62, 209), (62, 211), (63, 198), (63, 199), (63, 200), (63, 201), (63, 203), (63, 204), (63, 205), (63, 206), (63, 207), (63, 208), (63, 209), (63, 211), (64, 199), (64, 200), (64, 205), (64, 206), (64, 207), (64, 208), (64, 209), (64, 211), (65, 199), (65, 201), (65, 204), (65, 211), (66, 199), (66, 200), (66, 205), (66, 206), (66, 207), (66, 208), (66, 210), (67, 199), (332, 199), (333, 199), (333, 200), (333, 205), (333, 207), (333, 208), (333, 210), (334, 199), (334, 204), (334, 211), (335, 198), (335, 199), (335, 200), (335, 205), (335, 206), (335, 207), (335, 208), (335, 209), (335, 211), (336, 198), (336, 199), (336, 200), (336, 201), (336, 202), (336, 203), (336, 204), (336, 205), (336, 206), (336, 207), (336, 208), (336, 209), (336, 211), (337, 191), (337, 193), (337, 194), (337, 195), (337, 196), (337, 198), (337, 199), (337, 200), (337, 201), (337, 202), (337, 203), (337, 204), (337, 205), (337, 206), (337, 207), (337, 208), (337, 209), (337, 211), (338, 191), (338, 198), (338, 199), (338, 200), (338, 201), (338, 202), (338, 203), (338, 204), (338, 205), (338, 206), (338, 207), (338, 208), (338, 209), (338, 210), (338, 212), (339, 191), (339, 193), (339, 194), (339, 195), (339, 196), (339, 197), (339, 198), (339, 199), (339, 200), (339, 201), (339, 202), (339, 203), (339, 204), (339, 205), (339, 206), (339, 207), (339, 208), (339, 209), (339, 210), (339, 212), (340, 191), (340, 193), (340, 194), (340, 195), (340, 196), (340, 197), (340, 198), (340, 199), (340, 200), (340, 201), (340, 202), (340, 203), (340, 204), (340, 205), (340, 206), (340, 207), (340, 208), (340, 209), (340, 210), (340, 212), (341, 191), (341, 193), (341, 194), (341, 195), (341, 196), (341, 197), (341, 198), (341, 199), (341, 200), (341, 201), (341, 202), (341, 203), (341, 204), (341, 205), (341, 206), (341, 207), (341, 208), (341, 209), (341, 210), (341, 212), (342, 192), (342, 194), (342, 195), (342, 196), (342, 197), (342, 198), (342, 199), (342, 200), (342, 201), (342, 202), (342, 203), (342, 204), (342, 205), (342, 206), (342, 207), (342, 208), (342, 209), (342, 210), (342, 211), (342, 213), (343, 193), (343, 195), (343, 196), (343, 197), (343, 198), (343, 199), (343, 200), (343, 201), (343, 202), (343, 203), (343, 204), (343, 205), (343, 206), (343, 207), (343, 208), (343, 209), (343, 210), (343, 211), (343, 213), (344, 194), (344, 196), (344, 197), (344, 198), (344, 199), (344, 200), (344, 201), (344, 202), (344, 203), (344, 204), (344, 205), (344, 206), (344, 207), (344, 208), (344, 209), (344, 210), (344, 211), (344, 213), (345, 195), (345, 197), (345, 198), (345, 199), (345, 200), (345, 201), (345, 202), (345, 203), (345, 204), (345, 205), (345, 206), (345, 207), (345, 208), (345, 209), (345, 210), (345, 211), (345, 212), (345, 214), (346, 195), (346, 197), (346, 198), (346, 199), (346, 200), (346, 201), (346, 202), (346, 203), (346, 204), (346, 205), (346, 206), (346, 207), (346, 208), (346, 209), (346, 210), (346, 211), (346, 212), (346, 214), (347, 196), (347, 198), (347, 199), (347, 200), (347, 201), (347, 202), (347, 203), (347, 204), (347, 205), (347, 206), (347, 207), (347, 208), (347, 209), (347, 210), (347, 211), (347, 212), (347, 214), (348, 196), (348, 198), (348, 199), (348, 200), (348, 201), (348, 202), (348, 203), (348, 204), (348, 205), (348, 206), (348, 207), (348, 208), (348, 209), (348, 210), (348, 211), (348, 212), (348, 214), (349, 196), (349, 198), (349, 199), (349, 200), (349, 201), (349, 202), (349, 203), (349, 204), (349, 205), (349, 206), (349, 207), (349, 208), (349, 209), (349, 210), (349, 211), (349, 212), (349, 214), (350, 196), (350, 198), (350, 199), (350, 200), (350, 201), (350, 202), (350, 203), (350, 204), (350, 205), (350, 206), (350, 207), (350, 208), (350, 209), (350, 210), (350, 211), (350, 212), (350, 214), (351, 195), (351, 197), (351, 198), (351, 199), (351, 200), (351, 201), (351, 202), (351, 203), (351, 204), (351, 205), (351, 206), (351, 207), (351, 208), (351, 209), (351, 210), (351, 211), (351, 212), (351, 214), (352, 193), (352, 196), (352, 197), (352, 198), (352, 199), (352, 200), (352, 201), (352, 202), (352, 203), (352, 204), (352, 205), (352, 206), (352, 207), (352, 208), (352, 209), (352, 210), (352, 211), (352, 213), (353, 192), (353, 195), (353, 196), (353, 197), (353, 198), (353, 199), (353, 200), (353, 201), (353, 202), (353, 203), (353, 204), (353, 205), (353, 206), (353, 207), (353, 208), (353, 209), (353, 210), (353, 211), (353, 213), (354, 191), (354, 194), (354, 195), (354, 196), (354, 197), (354, 198), (354, 199), (354, 200), (354, 201), (354, 202), (354, 203), (354, 204), (354, 205), (354, 206), (354, 207), (354, 208), (354, 209), (354, 210), (354, 211), (354, 213), (355, 190), (355, 192), (355, 193), (355, 194), (355, 195), (355, 196), (355, 197), (355, 198), (355, 199), (355, 200), (355, 201), (355, 202), (355, 203), (355, 204), (355, 205), (355, 206), (355, 207), (355, 208), (355, 209), (355, 210), (355, 212), (356, 190), (356, 192), (356, 193), (356, 194), (356, 195), (356, 196), (356, 197), (356, 198), (356, 199), (356, 200), (356, 201), (356, 202), (356, 203), (356, 204), (356, 205), (356, 206), (356, 207), (356, 208), (356, 209), (357, 191), (357, 193), (357, 194), (357, 195), (357, 196), (357, 197), (357, 198), (357, 199), (357, 200), (357, 201), (357, 202), (357, 203), (357, 204), (357, 205), (357, 206), (357, 207), (357, 208), (357, 209), (357, 211), (358, 191), (358, 195), (358, 196), (358, 197), (358, 198), (358, 199), (358, 200), (358, 201), (358, 202), (358, 203), (358, 204), (358, 205), (358, 206), (358, 207), (358, 208), (358, 210), (359, 193), (359, 196), (359, 197), (359, 198), (359, 199), (359, 200), (359, 201), (359, 202), (359, 203), (359, 204), (359, 205), (359, 206), (359, 209), (360, 195), (360, 198), (360, 199), (360, 200), (360, 201), (360, 202), (360, 203), (360, 204), (360, 205), (360, 208), (361, 196), (361, 199), (361, 200), (361, 201), (361, 202), (361, 206), (362, 198), (362, 203), (362, 204), (363, 198), (363, 199), (363, 200), (363, 202), ) coordinates_00FF9C = ((164, 100), (164, 101), (164, 103), (165, 98), (165, 103), (166, 96), (166, 99), (166, 100), (166, 101), (166, 103), (167, 95), (167, 98), (167, 99), (167, 100), (167, 101), (167, 103), (168, 94), (168, 96), (168, 97), (168, 98), (168, 99), (168, 100), (168, 101), (168, 102), (168, 104), (169, 93), (169, 95), (169, 96), (169, 97), (169, 98), (169, 99), (169, 100), (169, 101), (169, 102), (169, 104), (170, 93), (170, 95), (170, 96), (170, 97), (170, 98), (170, 99), (170, 100), (170, 101), (170, 102), (170, 103), (170, 105), (171, 92), (171, 94), (171, 95), (171, 96), (171, 97), (171, 98), (171, 99), (171, 100), (171, 101), (171, 102), (171, 103), (171, 105), (172, 93), (172, 94), (172, 95), (172, 96), (172, 97), (172, 98), (172, 99), (172, 100), (172, 101), (172, 102), (172, 103), (172, 105), (173, 91), (173, 93), (173, 94), (173, 95), (173, 96), (173, 97), (173, 98), (173, 99), (173, 100), (173, 101), (173, 102), (173, 103), (173, 104), (173, 106), (174, 91), (174, 93), (174, 94), (174, 95), (174, 96), (174, 97), (174, 98), (174, 99), (174, 100), (174, 101), (174, 102), (174, 103), (174, 104), (174, 106), (175, 90), (175, 92), (175, 93), (175, 94), (175, 95), (175, 96), (175, 97), (175, 98), (175, 99), (175, 100), (175, 101), (175, 102), (175, 103), (175, 104), (175, 106), (176, 90), (176, 92), (176, 93), (176, 94), (176, 95), (176, 96), (176, 97), (176, 98), (176, 99), (176, 100), (176, 101), (176, 102), (176, 103), (176, 104), (176, 106), (177, 90), (177, 92), (177, 93), (177, 94), (177, 95), (177, 96), (177, 97), (177, 98), (177, 99), (177, 100), (177, 101), (177, 102), (177, 103), (177, 104), (177, 106), (178, 90), (178, 92), (178, 93), (178, 94), (178, 95), (178, 96), (178, 97), (178, 98), (178, 99), (178, 100), (178, 101), (178, 102), (178, 103), (178, 104), (178, 106), (179, 90), (179, 92), (179, 93), (179, 94), (179, 95), (179, 96), (179, 97), (179, 98), (179, 99), (179, 100), (179, 101), (179, 102), (179, 103), (179, 105), (180, 90), (180, 92), (180, 93), (180, 94), (180, 95), (180, 96), (180, 97), (180, 98), (180, 99), (180, 100), (180, 101), (180, 102), (180, 103), (180, 105), (181, 90), (181, 92), (181, 93), (181, 94), (181, 95), (181, 96), (181, 97), (181, 98), (181, 99), (181, 100), (181, 101), (181, 102), (181, 104), (182, 91), (182, 93), (182, 94), (182, 95), (182, 96), (182, 97), (182, 98), (182, 99), (182, 100), (182, 101), (182, 102), (182, 104), (183, 92), (183, 95), (183, 96), (183, 97), (183, 98), (183, 99), (183, 100), (183, 101), (183, 102), (183, 103), (183, 104), (184, 93), (184, 96), (184, 97), (184, 98), (184, 99), (184, 100), (184, 101), (184, 103), (185, 95), (185, 97), (185, 98), (185, 99), (185, 100), (185, 101), (185, 103), (186, 96), (186, 98), (186, 99), (186, 100), (186, 102), (187, 97), (187, 99), (187, 100), (187, 102), (188, 98), (188, 101), (189, 99), (189, 101), (190, 99), (190, 100), (208, 100), (209, 99), (209, 100), (210, 99), (210, 101), (211, 98), (211, 101), (212, 97), (212, 99), (212, 100), (212, 102), (213, 96), (213, 98), (213, 99), (213, 100), (213, 102), (214, 95), (214, 97), (214, 98), (214, 99), (214, 100), (214, 101), (214, 103), (215, 93), (215, 96), (215, 97), (215, 98), (215, 99), (215, 100), (215, 101), (215, 103), (216, 92), (216, 95), (216, 96), (216, 97), (216, 98), (216, 99), (216, 100), (216, 101), (216, 102), (216, 104), (217, 91), (217, 93), (217, 94), (217, 95), (217, 96), (217, 97), (217, 98), (217, 99), (217, 100), (217, 101), (217, 102), (217, 104), (218, 90), (218, 92), (218, 93), (218, 94), (218, 95), (218, 96), (218, 97), (218, 98), (218, 99), (218, 100), (218, 101), (218, 102), (218, 103), (218, 104), (218, 105), (219, 90), (219, 92), (219, 93), (219, 94), (219, 95), (219, 96), (219, 97), (219, 98), (219, 99), (219, 100), (219, 101), (219, 102), (219, 103), (219, 105), (220, 90), (220, 92), (220, 93), (220, 94), (220, 95), (220, 96), (220, 97), (220, 98), (220, 99), (220, 100), (220, 101), (220, 102), (220, 103), (220, 105), (221, 90), (221, 92), (221, 93), (221, 94), (221, 95), (221, 96), (221, 97), (221, 98), (221, 99), (221, 100), (221, 101), (221, 102), (221, 103), (221, 104), (221, 106), (222, 90), (222, 92), (222, 93), (222, 94), (222, 95), (222, 96), (222, 97), (222, 98), (222, 99), (222, 100), (222, 101), (222, 102), (222, 103), (222, 104), (222, 106), (223, 90), (223, 92), (223, 93), (223, 94), (223, 95), (223, 96), (223, 97), (223, 98), (223, 99), (223, 100), (223, 101), (223, 102), (223, 103), (223, 104), (223, 106), (224, 90), (224, 92), (224, 93), (224, 94), (224, 95), (224, 96), (224, 97), (224, 98), (224, 99), (224, 100), (224, 101), (224, 102), (224, 103), (224, 104), (224, 106), (225, 91), (225, 93), (225, 94), (225, 95), (225, 96), (225, 97), (225, 98), (225, 99), (225, 100), (225, 101), (225, 102), (225, 103), (225, 104), (225, 106), (226, 91), (226, 93), (226, 94), (226, 95), (226, 96), (226, 97), (226, 98), (226, 99), (226, 100), (226, 101), (226, 102), (226, 103), (226, 104), (226, 106), (227, 92), (227, 93), (227, 94), (227, 95), (227, 96), (227, 97), (227, 98), (227, 99), (227, 100), (227, 101), (227, 102), (227, 103), (227, 105), (228, 92), (228, 94), (228, 95), (228, 96), (228, 97), (228, 98), (228, 99), (228, 100), (228, 101), (228, 102), (228, 103), (228, 105), (229, 93), (229, 95), (229, 96), (229, 97), (229, 98), (229, 99), (229, 100), (229, 101), (229, 102), (229, 103), (229, 105), (230, 93), (230, 95), (230, 96), (230, 97), (230, 98), (230, 99), (230, 100), (230, 101), (230, 102), (230, 104), (231, 94), (231, 96), (231, 97), (231, 98), (231, 99), (231, 100), (231, 101), (231, 102), (231, 104), (232, 95), (232, 98), (232, 99), (232, 100), (232, 101), (232, 103), (233, 96), (233, 100), (233, 101), (233, 103), (234, 98), (234, 103), (235, 100), (235, 103), ) coordinates_2700FF = ((191, 213), (191, 214), (191, 215), (191, 216), (191, 217), (191, 219), (192, 208), (192, 209), (192, 211), (192, 212), (192, 219), (193, 208), (193, 217), (194, 208), (194, 210), (194, 211), (194, 212), (194, 213), (194, 214), (205, 208), (205, 210), (205, 211), (205, 212), (205, 213), (205, 215), (206, 208), (206, 216), (206, 217), (207, 209), (207, 211), (207, 212), (207, 219), (208, 213), (208, 214), (208, 215), (208, 216), (208, 217), (208, 219), ) coordinates_7F0009 = ((106, 180), (106, 182), (107, 177), (107, 179), (107, 184), (107, 185), (107, 186), (108, 174), (108, 175), (108, 176), (108, 180), (108, 181), (108, 182), (108, 187), (108, 188), (108, 189), (108, 190), (108, 191), (108, 192), (109, 170), (109, 172), (109, 173), (109, 177), (109, 178), (109, 179), (109, 180), (109, 181), (109, 182), (109, 183), (109, 184), (109, 185), (109, 186), (109, 194), (110, 168), (110, 174), (110, 175), (110, 176), (110, 177), (110, 178), (110, 179), (110, 180), (110, 181), (110, 182), (110, 183), (110, 184), (110, 185), (110, 186), (110, 187), (110, 188), (110, 189), (110, 190), (110, 191), (110, 192), (110, 196), (111, 167), (111, 170), (111, 171), (111, 172), (111, 173), (111, 174), (111, 175), (111, 176), (111, 177), (111, 178), (111, 179), (111, 180), (111, 181), (111, 182), (111, 183), (111, 184), (111, 185), (111, 186), (111, 187), (111, 188), (111, 189), (111, 190), (111, 191), (111, 192), (111, 193), (111, 194), (111, 198), (112, 166), (112, 168), (112, 169), (112, 170), (112, 171), (112, 172), (112, 173), (112, 174), (112, 175), (112, 176), (112, 177), (112, 178), (112, 179), (112, 180), (112, 181), (112, 182), (112, 183), (112, 184), (112, 185), (112, 186), (112, 187), (112, 188), (112, 189), (112, 190), (112, 191), (112, 192), (112, 193), (112, 194), (112, 195), (112, 196), (112, 197), (112, 200), (113, 165), (113, 167), (113, 168), (113, 169), (113, 170), (113, 171), (113, 172), (113, 173), (113, 174), (113, 175), (113, 176), (113, 177), (113, 178), (113, 179), (113, 180), (113, 181), (113, 182), (113, 183), (113, 184), (113, 185), (113, 186), (113, 187), (113, 188), (113, 189), (113, 190), (113, 191), (113, 192), (113, 193), (113, 194), (113, 195), (113, 196), (113, 197), (113, 198), (113, 199), (113, 202), (114, 164), (114, 166), (114, 167), (114, 168), (114, 169), (114, 170), (114, 171), (114, 172), (114, 173), (114, 174), (114, 175), (114, 176), (114, 177), (114, 178), (114, 179), (114, 180), (114, 181), (114, 182), (114, 183), (114, 184), (114, 185), (114, 186), (114, 187), (114, 188), (114, 189), (114, 190), (114, 191), (114, 192), (114, 193), (114, 194), (114, 195), (114, 196), (114, 197), (114, 198), (114, 199), (114, 200), (114, 201), (114, 204), (115, 163), (115, 165), (115, 166), (115, 167), (115, 168), (115, 169), (115, 170), (115, 171), (115, 172), (115, 173), (115, 174), (115, 175), (115, 176), (115, 177), (115, 178), (115, 179), (115, 180), (115, 181), (115, 182), (115, 183), (115, 184), (115, 185), (115, 186), (115, 187), (115, 188), (115, 189), (115, 190), (115, 191), (115, 192), (115, 193), (115, 194), (115, 195), (115, 196), (115, 197), (115, 198), (115, 199), (115, 200), (115, 201), (115, 202), (115, 203), (115, 206), (116, 162), (116, 164), (116, 165), (116, 166), (116, 167), (116, 168), (116, 169), (116, 170), (116, 171), (116, 172), (116, 173), (116, 174), (116, 175), (116, 176), (116, 177), (116, 178), (116, 179), (116, 180), (116, 181), (116, 182), (116, 183), (116, 184), (116, 185), (116, 186), (116, 187), (116, 188), (116, 189), (116, 190), (116, 191), (116, 192), (116, 193), (116, 194), (116, 195), (116, 196), (116, 197), (116, 198), (116, 199), (116, 200), (116, 201), (116, 202), (116, 203), (116, 204), (116, 207), (117, 162), (117, 164), (117, 165), (117, 166), (117, 167), (117, 168), (117, 169), (117, 170), (117, 171), (117, 172), (117, 173), (117, 174), (117, 175), (117, 176), (117, 177), (117, 178), (117, 179), (117, 180), (117, 181), (117, 182), (117, 183), (117, 184), (117, 185), (117, 186), (117, 187), (117, 188), (117, 189), (117, 190), (117, 191), (117, 192), (117, 193), (117, 194), (117, 195), (117, 196), (117, 197), (117, 198), (117, 199), (117, 200), (117, 201), (117, 202), (117, 203), (117, 204), (117, 205), (117, 206), (117, 208), (118, 161), (118, 163), (118, 164), (118, 165), (118, 166), (118, 167), (118, 168), (118, 169), (118, 170), (118, 171), (118, 172), (118, 173), (118, 174), (118, 175), (118, 176), (118, 177), (118, 178), (118, 179), (118, 180), (118, 181), (118, 182), (118, 183), (118, 184), (118, 185), (118, 186), (118, 187), (118, 188), (118, 189), (118, 190), (118, 191), (118, 192), (118, 193), (118, 194), (118, 195), (118, 196), (118, 197), (118, 198), (118, 199), (118, 200), (118, 201), (118, 202), (118, 203), (118, 204), (118, 205), (118, 206), (118, 207), (118, 209), (119, 161), (119, 163), (119, 164), (119, 165), (119, 166), (119, 167), (119, 168), (119, 169), (119, 170), (119, 171), (119, 172), (119, 173), (119, 174), (119, 175), (119, 176), (119, 177), (119, 178), (119, 179), (119, 180), (119, 181), (119, 182), (119, 183), (119, 184), (119, 185), (119, 186), (119, 187), (119, 188), (119, 189), (119, 190), (119, 191), (119, 192), (119, 193), (119, 194), (119, 195), (119, 196), (119, 197), (119, 198), (119, 199), (119, 200), (119, 201), (119, 202), (119, 203), (119, 204), (119, 205), (119, 206), (119, 207), (119, 209), (120, 160), (120, 162), (120, 163), (120, 164), (120, 165), (120, 166), (120, 167), (120, 168), (120, 169), (120, 170), (120, 171), (120, 172), (120, 173), (120, 174), (120, 175), (120, 176), (120, 177), (120, 178), (120, 179), (120, 180), (120, 181), (120, 182), (120, 183), (120, 184), (120, 185), (120, 186), (120, 187), (120, 188), (120, 189), (120, 190), (120, 191), (120, 192), (120, 193), (120, 194), (120, 195), (120, 196), (120, 197), (120, 198), (120, 199), (120, 200), (120, 201), (120, 202), (120, 203), (120, 204), (120, 205), (120, 206), (120, 207), (120, 208), (120, 210), (121, 160), (121, 162), (121, 163), (121, 164), (121, 165), (121, 166), (121, 167), (121, 168), (121, 169), (121, 170), (121, 171), (121, 172), (121, 173), (121, 174), (121, 175), (121, 176), (121, 177), (121, 178), (121, 179), (121, 180), (121, 181), (121, 182), (121, 183), (121, 184), (121, 185), (121, 186), (121, 187), (121, 188), (121, 189), (121, 190), (121, 191), (121, 192), (121, 193), (121, 194), (121, 195), (121, 196), (121, 197), (121, 198), (121, 199), (121, 200), (121, 201), (121, 202), (121, 203), (121, 204), (121, 205), (121, 206), (121, 207), (121, 208), (121, 209), (121, 210), (122, 160), (122, 162), (122, 163), (122, 164), (122, 165), (122, 166), (122, 167), (122, 168), (122, 169), (122, 170), (122, 171), (122, 172), (122, 173), (122, 174), (122, 175), (122, 176), (122, 177), (122, 178), (122, 179), (122, 180), (122, 181), (122, 182), (122, 183), (122, 184), (122, 185), (122, 186), (122, 187), (122, 188), (122, 189), (122, 190), (122, 191), (122, 192), (122, 193), (122, 194), (122, 195), (122, 196), (122, 197), (122, 198), (122, 199), (122, 200), (122, 201), (122, 202), (122, 203), (122, 204), (122, 205), (122, 206), (122, 207), (122, 208), (122, 209), (122, 211), (123, 159), (123, 161), (123, 162), (123, 163), (123, 164), (123, 165), (123, 166), (123, 167), (123, 168), (123, 169), (123, 170), (123, 171), (123, 172), (123, 173), (123, 174), (123, 175), (123, 176), (123, 177), (123, 178), (123, 179), (123, 180), (123, 181), (123, 182), (123, 183), (123, 184), (123, 185), (123, 186), (123, 187), (123, 188), (123, 189), (123, 190), (123, 191), (123, 192), (123, 193), (123, 194), (123, 195), (123, 196), (123, 197), (123, 198), (123, 199), (123, 200), (123, 201), (123, 202), (123, 203), (123, 204), (123, 205), (123, 206), (123, 207), (123, 208), (123, 209), (123, 210), (123, 212), (124, 159), (124, 161), (124, 162), (124, 163), (124, 164), (124, 165), (124, 166), (124, 167), (124, 168), (124, 169), (124, 170), (124, 171), (124, 172), (124, 173), (124, 174), (124, 175), (124, 176), (124, 177), (124, 178), (124, 179), (124, 180), (124, 181), (124, 182), (124, 183), (124, 184), (124, 185), (124, 186), (124, 187), (124, 188), (124, 189), (124, 190), (124, 191), (124, 192), (124, 193), (124, 194), (124, 195), (124, 196), (124, 197), (124, 198), (124, 199), (124, 200), (124, 201), (124, 202), (124, 203), (124, 204), (124, 205), (124, 206), (124, 207), (124, 208), (124, 209), (124, 210), (124, 212), (125, 159), (125, 161), (125, 162), (125, 163), (125, 164), (125, 165), (125, 166), (125, 167), (125, 168), (125, 169), (125, 170), (125, 171), (125, 172), (125, 173), (125, 174), (125, 175), (125, 176), (125, 177), (125, 178), (125, 179), (125, 180), (125, 181), (125, 182), (125, 183), (125, 184), (125, 185), (125, 186), (125, 187), (125, 188), (125, 189), (125, 190), (125, 191), (125, 192), (125, 193), (125, 194), (125, 195), (125, 196), (125, 197), (125, 198), (125, 199), (125, 200), (125, 201), (125, 202), (125, 203), (125, 204), (125, 205), (125, 206), (125, 207), (125, 208), (125, 209), (125, 210), (125, 211), (125, 213), (126, 159), (126, 161), (126, 162), (126, 163), (126, 164), (126, 165), (126, 166), (126, 167), (126, 168), (126, 169), (126, 170), (126, 171), (126, 172), (126, 173), (126, 174), (126, 175), (126, 176), (126, 177), (126, 178), (126, 179), (126, 180), (126, 181), (126, 182), (126, 183), (126, 184), (126, 185), (126, 186), (126, 187), (126, 188), (126, 189), (126, 190), (126, 191), (126, 192), (126, 193), (126, 194), (126, 195), (126, 196), (126, 197), (126, 198), (126, 199), (126, 200), (126, 201), (126, 202), (126, 203), (126, 204), (126, 205), (126, 206), (126, 207), (126, 208), (126, 209), (126, 210), (126, 211), (126, 212), (126, 214), (127, 159), (127, 161), (127, 162), (127, 163), (127, 164), (127, 165), (127, 166), (127, 167), (127, 168), (127, 169), (127, 170), (127, 171), (127, 172), (127, 173), (127, 174), (127, 175), (127, 176), (127, 177), (127, 178), (127, 179), (127, 180), (127, 181), (127, 182), (127, 183), (127, 184), (127, 185), (127, 186), (127, 187), (127, 188), (127, 189), (127, 190), (127, 191), (127, 192), (127, 193), (127, 194), (127, 195), (127, 196), (127, 197), (127, 198), (127, 199), (127, 200), (127, 201), (127, 202), (127, 203), (127, 204), (127, 205), (127, 206), (127, 207), (127, 208), (127, 209), (127, 210), (127, 211), (127, 212), (127, 213), (127, 215), (128, 159), (128, 161), (128, 162), (128, 163), (128, 164), (128, 165), (128, 166), (128, 167), (128, 168), (128, 169), (128, 170), (128, 171), (128, 172), (128, 173), (128, 174), (128, 175), (128, 176), (128, 177), (128, 178), (128, 179), (128, 180), (128, 181), (128, 182), (128, 183), (128, 184), (128, 185), (128, 186), (128, 187), (128, 188), (128, 189), (128, 190), (128, 191), (128, 192), (128, 193), (128, 194), (128, 195), (128, 196), (128, 197), (128, 198), (128, 199), (128, 200), (128, 201), (128, 202), (128, 203), (128, 204), (128, 205), (128, 206), (128, 207), (128, 208), (128, 209), (128, 210), (128, 211), (128, 212), (128, 213), (128, 214), (128, 216), (129, 159), (129, 161), (129, 162), (129, 163), (129, 164), (129, 165), (129, 166), (129, 167), (129, 168), (129, 169), (129, 170), (129, 171), (129, 172), (129, 173), (129, 174), (129, 175), (129, 176), (129, 177), (129, 178), (129, 179), (129, 180), (129, 181), (129, 182), (129, 183), (129, 184), (129, 185), (129, 186), (129, 187), (129, 188), (129, 189), (129, 190), (129, 191), (129, 192), (129, 193), (129, 194), (129, 195), (129, 196), (129, 197), (129, 198), (129, 199), (129, 200), (129, 201), (129, 202), (129, 203), (129, 204), (129, 205), (129, 206), (129, 207), (129, 208), (129, 209), (129, 210), (129, 211), (129, 212), (129, 213), (129, 214), (129, 215), (129, 218), (129, 220), (130, 159), (130, 161), (130, 162), (130, 163), (130, 164), (130, 165), (130, 166), (130, 167), (130, 168), (130, 169), (130, 170), (130, 171), (130, 172), (130, 173), (130, 174), (130, 175), (130, 176), (130, 177), (130, 178), (130, 179), (130, 180), (130, 181), (130, 182), (130, 183), (130, 184), (130, 185), (130, 186), (130, 187), (130, 188), (130, 189), (130, 190), (130, 191), (130, 192), (130, 193), (130, 194), (130, 195), (130, 196), (130, 197), (130, 198), (130, 199), (130, 200), (130, 201), (130, 202), (130, 203), (130, 204), (130, 205), (130, 206), (130, 207), (130, 208), (130, 209), (130, 210), (130, 211), (130, 212), (130, 213), (130, 214), (130, 215), (130, 216), (130, 220), (131, 159), (131, 161), (131, 162), (131, 163), (131, 164), (131, 165), (131, 166), (131, 167), (131, 168), (131, 169), (131, 170), (131, 171), (131, 172), (131, 173), (131, 174), (131, 175), (131, 176), (131, 177), (131, 178), (131, 179), (131, 180), (131, 181), (131, 182), (131, 183), (131, 184), (131, 185), (131, 186), (131, 187), (131, 188), (131, 189), (131, 190), (131, 191), (131, 192), (131, 193), (131, 194), (131, 195), (131, 196), (131, 197), (131, 198), (131, 199), (131, 200), (131, 201), (131, 202), (131, 203), (131, 204), (131, 205), (131, 206), (131, 207), (131, 208), (131, 209), (131, 210), (131, 211), (131, 212), (131, 213), (131, 214), (131, 215), (131, 216), (131, 217), (131, 218), (131, 220), (132, 159), (132, 161), (132, 162), (132, 163), (132, 164), (132, 165), (132, 166), (132, 167), (132, 168), (132, 169), (132, 170), (132, 171), (132, 172), (132, 173), (132, 174), (132, 175), (132, 176), (132, 177), (132, 178), (132, 179), (132, 180), (132, 181), (132, 182), (132, 183), (132, 184), (132, 185), (132, 186), (132, 187), (132, 188), (132, 189), (132, 190), (132, 191), (132, 192), (132, 193), (132, 194), (132, 195), (132, 196), (132, 197), (132, 198), (132, 199), (132, 200), (132, 201), (132, 202), (132, 203), (132, 204), (132, 205), (132, 206), (132, 207), (132, 208), (132, 209), (132, 210), (132, 211), (132, 212), (132, 213), (132, 214), (132, 215), (132, 216), (132, 217), (132, 218), (132, 219), (132, 221), (133, 159), (133, 161), (133, 162), (133, 163), (133, 164), (133, 165), (133, 166), (133, 167), (133, 168), (133, 169), (133, 170), (133, 171), (133, 172), (133, 173), (133, 174), (133, 175), (133, 176), (133, 177), (133, 178), (133, 179), (133, 180), (133, 181), (133, 182), (133, 183), (133, 184), (133, 185), (133, 186), (133, 187), (133, 188), (133, 189), (133, 190), (133, 191), (133, 192), (133, 193), (133, 194), (133, 195), (133, 196), (133, 197), (133, 198), (133, 199), (133, 200), (133, 201), (133, 202), (133, 203), (133, 204), (133, 205), (133, 206), (133, 207), (133, 208), (133, 209), (133, 210), (133, 211), (133, 212), (133, 213), (133, 214), (133, 215), (133, 216), (133, 217), (133, 218), (133, 219), (133, 220), (133, 222), (134, 160), (134, 162), (134, 163), (134, 164), (134, 165), (134, 166), (134, 167), (134, 168), (134, 169), (134, 170), (134, 171), (134, 172), (134, 173), (134, 174), (134, 175), (134, 176), (134, 177), (134, 178), (134, 179), (134, 180), (134, 181), (134, 182), (134, 183), (134, 184), (134, 185), (134, 186), (134, 187), (134, 188), (134, 189), (134, 190), (134, 191), (134, 192), (134, 193), (134, 194), (134, 195), (134, 196), (134, 197), (134, 198), (134, 199), (134, 200), (134, 201), (134, 202), (134, 203), (134, 204), (134, 205), (134, 206), (134, 207), (134, 208), (134, 209), (134, 210), (134, 211), (134, 212), (134, 213), (134, 214), (134, 215), (134, 216), (134, 217), (134, 218), (134, 219), (134, 220), (134, 221), (134, 223), (135, 160), (135, 162), (135, 163), (135, 164), (135, 165), (135, 166), (135, 167), (135, 168), (135, 169), (135, 170), (135, 171), (135, 172), (135, 173), (135, 174), (135, 175), (135, 176), (135, 177), (135, 178), (135, 179), (135, 180), (135, 181), (135, 182), (135, 183), (135, 184), (135, 185), (135, 186), (135, 187), (135, 188), (135, 189), (135, 190), (135, 191), (135, 192), (135, 193), (135, 194), (135, 195), (135, 196), (135, 197), (135, 198), (135, 199), (135, 200), (135, 201), (135, 202), (135, 203), (135, 204), (135, 205), (135, 206), (135, 207), (135, 208), (135, 209), (135, 210), (135, 211), (135, 212), (135, 213), (135, 214), (135, 215), (135, 216), (135, 217), (135, 218), (135, 219), (135, 220), (135, 221), (135, 222), (135, 224), (136, 160), (136, 162), (136, 163), (136, 164), (136, 165), (136, 166), (136, 167), (136, 168), (136, 169), (136, 170), (136, 171), (136, 172), (136, 173), (136, 174), (136, 175), (136, 176), (136, 177), (136, 178), (136, 179), (136, 180), (136, 181), (136, 182), (136, 183), (136, 184), (136, 185), (136, 186), (136, 187), (136, 188), (136, 189), (136, 190), (136, 191), (136, 192), (136, 193), (136, 194), (136, 195), (136, 196), (136, 197), (136, 198), (136, 199), (136, 200), (136, 201), (136, 202), (136, 203), (136, 204), (136, 205), (136, 206), (136, 207), (136, 208), (136, 209), (136, 210), (136, 211), (136, 212), (136, 213), (136, 214), (136, 215), (136, 216), (136, 217), (136, 218), (136, 219), (136, 220), (136, 221), (136, 222), (136, 223), (136, 226), (137, 161), (137, 163), (137, 164), (137, 165), (137, 166), (137, 167), (137, 168), (137, 169), (137, 170), (137, 171), (137, 172), (137, 173), (137, 174), (137, 175), (137, 176), (137, 177), (137, 178), (137, 179), (137, 180), (137, 181), (137, 182), (137, 183), (137, 184), (137, 185), (137, 186), (137, 187), (137, 188), (137, 189), (137, 190), (137, 191), (137, 192), (137, 193), (137, 194), (137, 195), (137, 196), (137, 197), (137, 198), (137, 199), (137, 200), (137, 201), (137, 202), (137, 203), (137, 204), (137, 205), (137, 206), (137, 207), (137, 208), (137, 209), (137, 210), (137, 211), (137, 212), (137, 213), (137, 214), (137, 215), (137, 216), (137, 217), (137, 218), (137, 219), (137, 220), (137, 221), (137, 222), (137, 223), (137, 224), (137, 227), (138, 162), (138, 164), (138, 165), (138, 166), (138, 167), (138, 168), (138, 169), (138, 170), (138, 171), (138, 172), (138, 173), (138, 174), (138, 175), (138, 176), (138, 177), (138, 178), (138, 179), (138, 180), (138, 181), (138, 182), (138, 183), (138, 184), (138, 185), (138, 186), (138, 187), (138, 188), (138, 189), (138, 190), (138, 191), (138, 192), (138, 193), (138, 194), (138, 195), (138, 196), (138, 197), (138, 198), (138, 199), (138, 200), (138, 201), (138, 202), (138, 203), (138, 204), (138, 205), (138, 206), (138, 207), (138, 208), (138, 209), (138, 210), (138, 211), (138, 212), (138, 213), (138, 214), (138, 215), (138, 216), (138, 217), (138, 218), (138, 219), (138, 220), (138, 221), (138, 222), (138, 223), (138, 224), (138, 225), (138, 227), (139, 163), (139, 166), (139, 167), (139, 168), (139, 169), (139, 170), (139, 171), (139, 172), (139, 173), (139, 174), (139, 175), (139, 176), (139, 177), (139, 178), (139, 179), (139, 180), (139, 181), (139, 182), (139, 183), (139, 184), (139, 185), (139, 186), (139, 187), (139, 188), (139, 189), (139, 190), (139, 191), (139, 192), (139, 193), (139, 194), (139, 195), (139, 196), (139, 197), (139, 198), (139, 199), (139, 200), (139, 201), (139, 202), (139, 203), (139, 204), (139, 205), (139, 206), (139, 207), (139, 208), (139, 209), (139, 210), (139, 211), (139, 212), (139, 213), (139, 214), (139, 215), (139, 216), (139, 217), (139, 218), (139, 219), (139, 220), (139, 221), (139, 222), (139, 223), (139, 224), (139, 225), (139, 226), (139, 228), (140, 164), (140, 168), (140, 169), (140, 170), (140, 171), (140, 172), (140, 173), (140, 174), (140, 175), (140, 176), (140, 177), (140, 178), (140, 179), (140, 180), (140, 181), (140, 182), (140, 183), (140, 184), (140, 185), (140, 186), (140, 187), (140, 188), (140, 189), (140, 190), (140, 191), (140, 192), (140, 193), (140, 194), (140, 195), (140, 196), (140, 197), (140, 198), (140, 199), (140, 200), (140, 201), (140, 202), (140, 203), (140, 204), (140, 205), (140, 206), (140, 207), (140, 208), (140, 209), (140, 210), (140, 211), (140, 212), (140, 213), (140, 214), (140, 215), (140, 216), (140, 217), (140, 218), (140, 219), (140, 220), (140, 221), (140, 222), (140, 223), (140, 224), (140, 225), (140, 226), (140, 228), (141, 166), (141, 170), (141, 171), (141, 172), (141, 173), (141, 174), (141, 175), (141, 176), (141, 177), (141, 178), (141, 179), (141, 180), (141, 181), (141, 182), (141, 183), (141, 184), (141, 185), (141, 186), (141, 187), (141, 188), (141, 189), (141, 190), (141, 191), (141, 192), (141, 193), (141, 194), (141, 195), (141, 196), (141, 197), (141, 198), (141, 199), (141, 200), (141, 201), (141, 202), (141, 203), (141, 204), (141, 205), (141, 206), (141, 207), (141, 208), (141, 209), (141, 210), (141, 211), (141, 212), (141, 213), (141, 214), (141, 215), (141, 216), (141, 217), (141, 218), (141, 219), (141, 220), (141, 221), (141, 222), (141, 223), (141, 224), (141, 225), (141, 226), (141, 228), (142, 168), (142, 172), (142, 173), (142, 174), (142, 175), (142, 176), (142, 177), (142, 178), (142, 179), (142, 180), (142, 181), (142, 182), (142, 183), (142, 184), (142, 185), (142, 186), (142, 187), (142, 188), (142, 189), (142, 190), (142, 191), (142, 192), (142, 193), (142, 194), (142, 195), (142, 196), (142, 197), (142, 198), (142, 199), (142, 200), (142, 201), (142, 202), (142, 203), (142, 204), (142, 205), (142, 206), (142, 207), (142, 208), (142, 209), (142, 210), (142, 211), (142, 212), (142, 213), (142, 214), (142, 215), (142, 216), (142, 217), (142, 218), (142, 219), (142, 220), (142, 221), (142, 222), (142, 223), (142, 224), (142, 225), (142, 226), (142, 228), (143, 170), (143, 173), (143, 174), (143, 175), (143, 176), (143, 177), (143, 178), (143, 179), (143, 180), (143, 181), (143, 182), (143, 183), (143, 184), (143, 185), (143, 186), (143, 187), (143, 188), (143, 189), (143, 190), (143, 191), (143, 192), (143, 193), (143, 194), (143, 195), (143, 196), (143, 197), (143, 198), (143, 199), (143, 200), (143, 201), (143, 202), (143, 203), (143, 204), (143, 205), (143, 206), (143, 207), (143, 208), (143, 209), (143, 210), (143, 211), (143, 212), (143, 213), (143, 214), (143, 215), (143, 216), (143, 217), (143, 218), (143, 219), (143, 220), (143, 221), (143, 222), (143, 223), (143, 224), (143, 225), (143, 226), (143, 228), (144, 172), (144, 174), (144, 175), (144, 176), (144, 177), (144, 178), (144, 179), (144, 180), (144, 181), (144, 182), (144, 183), (144, 184), (144, 185), (144, 186), (144, 187), (144, 188), (144, 189), (144, 190), (144, 191), (144, 192), (144, 193), (144, 194), (144, 195), (144, 196), (144, 197), (144, 198), (144, 199), (144, 200), (144, 201), (144, 202), (144, 203), (144, 204), (144, 205), (144, 206), (144, 207), (144, 208), (144, 209), (144, 210), (144, 211), (144, 212), (144, 213), (144, 214), (144, 215), (144, 216), (144, 217), (144, 218), (144, 219), (144, 220), (144, 221), (144, 222), (144, 223), (144, 224), (144, 225), (144, 226), (144, 228), (145, 173), (145, 175), (145, 176), (145, 177), (145, 178), (145, 179), (145, 180), (145, 181), (145, 182), (145, 183), (145, 184), (145, 185), (145, 186), (145, 187), (145, 188), (145, 189), (145, 190), (145, 191), (145, 192), (145, 193), (145, 194), (145, 195), (145, 196), (145, 197), (145, 198), (145, 199), (145, 200), (145, 201), (145, 202), (145, 203), (145, 204), (145, 205), (145, 206), (145, 207), (145, 208), (145, 209), (145, 210), (145, 211), (145, 212), (145, 213), (145, 214), (145, 215), (145, 216), (145, 217), (145, 218), (145, 219), (145, 220), (145, 221), (145, 222), (145, 223), (145, 224), (145, 225), (145, 226), (145, 228), (146, 174), (146, 176), (146, 177), (146, 178), (146, 179), (146, 180), (146, 181), (146, 182), (146, 183), (146, 184), (146, 185), (146, 186), (146, 187), (146, 188), (146, 189), (146, 190), (146, 191), (146, 192), (146, 193), (146, 194), (146, 195), (146, 196), (146, 197), (146, 198), (146, 199), (146, 200), (146, 201), (146, 202), (146, 203), (146, 204), (146, 205), (146, 206), (146, 207), (146, 208), (146, 209), (146, 210), (146, 211), (146, 212), (146, 213), (146, 214), (146, 215), (146, 216), (146, 217), (146, 218), (146, 219), (146, 220), (146, 221), (146, 222), (146, 223), (146, 224), (146, 225), (146, 226), (146, 228), (147, 174), (147, 176), (147, 177), (147, 178), (147, 179), (147, 180), (147, 181), (147, 182), (147, 183), (147, 184), (147, 185), (147, 186), (147, 187), (147, 188), (147, 189), (147, 190), (147, 191), (147, 192), (147, 193), (147, 194), (147, 195), (147, 196), (147, 197), (147, 198), (147, 199), (147, 200), (147, 201), (147, 202), (147, 203), (147, 204), (147, 205), (147, 206), (147, 207), (147, 208), (147, 209), (147, 210), (147, 211), (147, 212), (147, 213), (147, 214), (147, 215), (147, 216), (147, 217), (147, 218), (147, 219), (147, 220), (147, 221), (147, 222), (147, 223), (147, 224), (147, 225), (147, 226), (147, 227), (147, 229), (148, 175), (148, 177), (148, 178), (148, 179), (148, 180), (148, 181), (148, 182), (148, 183), (148, 184), (148, 185), (148, 186), (148, 187), (148, 188), (148, 189), (148, 190), (148, 191), (148, 192), (148, 193), (148, 194), (148, 195), (148, 196), (148, 197), (148, 198), (148, 199), (148, 200), (148, 201), (148, 202), (148, 203), (148, 204), (148, 205), (148, 206), (148, 207), (148, 208), (148, 209), (148, 210), (148, 211), (148, 212), (148, 213), (148, 214), (148, 215), (148, 216), (148, 217), (148, 218), (148, 219), (148, 220), (148, 221), (148, 222), (148, 223), (148, 224), (148, 225), (148, 226), (148, 227), (148, 229), (149, 176), (149, 178), (149, 179), (149, 180), (149, 181), (149, 182), (149, 183), (149, 184), (149, 185), (149, 186), (149, 187), (149, 188), (149, 189), (149, 190), (149, 191), (149, 192), (149, 193), (149, 194), (149, 195), (149, 196), (149, 197), (149, 198), (149, 199), (149, 200), (149, 201), (149, 202), (149, 203), (149, 204), (149, 205), (149, 206), (149, 207), (149, 208), (149, 209), (149, 210), (149, 211), (149, 212), (149, 213), (149, 214), (149, 215), (149, 216), (149, 217), (149, 218), (149, 219), (149, 220), (149, 221), (149, 222), (149, 223), (149, 224), (149, 225), (149, 226), (149, 227), (149, 228), (149, 230), (150, 176), (150, 178), (150, 179), (150, 180), (150, 181), (150, 182), (150, 183), (150, 184), (150, 185), (150, 186), (150, 187), (150, 188), (150, 189), (150, 190), (150, 191), (150, 192), (150, 193), (150, 194), (150, 195), (150, 196), (150, 197), (150, 198), (150, 199), (150, 200), (150, 201), (150, 202), (150, 203), (150, 204), (150, 205), (150, 206), (150, 207), (150, 208), (150, 209), (150, 210), (150, 211), (150, 212), (150, 213), (150, 214), (150, 215), (150, 216), (150, 217), (150, 218), (150, 219), (150, 220), (150, 221), (150, 222), (150, 223), (150, 224), (150, 225), (150, 226), (150, 227), (150, 228), (150, 230), (151, 177), (151, 179), (151, 180), (151, 181), (151, 182), (151, 183), (151, 184), (151, 185), (151, 186), (151, 187), (151, 188), (151, 189), (151, 190), (151, 191), (151, 192), (151, 193), (151, 194), (151, 195), (151, 196), (151, 197), (151, 198), (151, 199), (151, 200), (151, 201), (151, 202), (151, 203), (151, 204), (151, 205), (151, 206), (151, 207), (151, 208), (151, 209), (151, 210), (151, 211), (151, 212), (151, 213), (151, 214), (151, 215), (151, 216), (151, 217), (151, 218), (151, 219), (151, 220), (151, 221), (151, 222), (151, 223), (151, 224), (151, 225), (151, 226), (151, 227), (151, 228), (151, 230), (152, 178), (152, 180), (152, 181), (152, 182), (152, 183), (152, 184), (152, 185), (152, 186), (152, 187), (152, 188), (152, 189), (152, 190), (152, 191), (152, 192), (152, 193), (152, 194), (152, 195), (152, 196), (152, 197), (152, 198), (152, 199), (152, 200), (152, 201), (152, 202), (152, 203), (152, 204), (152, 205), (152, 206), (152, 207), (152, 208), (152, 209), (152, 210), (152, 211), (152, 212), (152, 213), (152, 214), (152, 215), (152, 216), (152, 217), (152, 218), (152, 219), (152, 220), (152, 221), (152, 222), (152, 223), (152, 224), (152, 225), (152, 226), (152, 227), (152, 228), (152, 230), (153, 181), (153, 182), (153, 183), (153, 184), (153, 185), (153, 186), (153, 187), (153, 188), (153, 189), (153, 190), (153, 191), (153, 192), (153, 193), (153, 194), (153, 195), (153, 196), (153, 197), (153, 198), (153, 199), (153, 200), (153, 201), (153, 202), (153, 203), (153, 204), (153, 205), (153, 206), (153, 207), (153, 208), (153, 209), (153, 210), (153, 211), (153, 212), (153, 213), (153, 214), (153, 215), (153, 216), (153, 217), (153, 218), (153, 219), (153, 220), (153, 221), (153, 222), (153, 223), (153, 224), (153, 225), (153, 226), (153, 227), (153, 228), (153, 230), (154, 179), (154, 181), (154, 182), (154, 183), (154, 184), (154, 185), (154, 186), (154, 187), (154, 188), (154, 189), (154, 190), (154, 191), (154, 192), (154, 193), (154, 194), (154, 195), (154, 196), (154, 197), (154, 198), (154, 199), (154, 200), (154, 201), (154, 202), (154, 203), (154, 204), (154, 205), (154, 206), (154, 207), (154, 208), (154, 209), (154, 210), (154, 211), (154, 212), (154, 213), (154, 214), (154, 215), (154, 216), (154, 217), (154, 218), (154, 219), (154, 220), (154, 221), (154, 222), (154, 223), (154, 224), (154, 225), (154, 226), (154, 227), (154, 228), (154, 230), (155, 180), (155, 183), (155, 184), (155, 185), (155, 186), (155, 187), (155, 188), (155, 189), (155, 190), (155, 191), (155, 192), (155, 193), (155, 194), (155, 195), (155, 196), (155, 197), (155, 198), (155, 199), (155, 200), (155, 201), (155, 202), (155, 203), (155, 204), (155, 205), (155, 206), (155, 207), (155, 208), (155, 209), (155, 210), (155, 211), (155, 212), (155, 213), (155, 214), (155, 215), (155, 216), (155, 217), (155, 218), (155, 219), (155, 220), (155, 221), (155, 222), (155, 223), (155, 224), (155, 225), (155, 226), (155, 227), (155, 228), (155, 230), (156, 181), (156, 184), (156, 185), (156, 186), (156, 187), (156, 188), (156, 189), (156, 190), (156, 191), (156, 192), (156, 193), (156, 194), (156, 195), (156, 196), (156, 197), (156, 198), (156, 199), (156, 200), (156, 201), (156, 202), (156, 203), (156, 204), (156, 205), (156, 206), (156, 207), (156, 208), (156, 209), (156, 210), (156, 211), (156, 212), (156, 213), (156, 214), (156, 215), (156, 216), (156, 217), (156, 218), (156, 219), (156, 220), (156, 221), (156, 222), (156, 223), (156, 224), (156, 225), (156, 226), (156, 227), (156, 229), (157, 182), (157, 183), (157, 186), (157, 187), (157, 188), (157, 189), (157, 190), (157, 191), (157, 192), (157, 193), (157, 194), (157, 195), (157, 196), (157, 197), (157, 198), (157, 199), (157, 200), (157, 201), (157, 202), (157, 203), (157, 204), (157, 205), (157, 206), (157, 207), (157, 208), (157, 209), (157, 210), (157, 211), (157, 212), (157, 213), (157, 214), (157, 215), (157, 216), (157, 217), (157, 218), (157, 219), (157, 220), (157, 221), (157, 222), (157, 223), (157, 224), (157, 225), (157, 226), (157, 227), (157, 229), (158, 184), (158, 189), (158, 190), (158, 191), (158, 192), (158, 193), (158, 194), (158, 195), (158, 196), (158, 197), (158, 198), (158, 199), (158, 200), (158, 201), (158, 202), (158, 203), (158, 204), (158, 205), (158, 206), (158, 207), (158, 208), (158, 209), (158, 210), (158, 211), (158, 212), (158, 213), (158, 214), (158, 215), (158, 216), (158, 217), (158, 218), (158, 219), (158, 220), (158, 221), (158, 222), (158, 223), (158, 224), (158, 225), (158, 226), (158, 229), (159, 187), (159, 188), (159, 191), (159, 192), (159, 193), (159, 194), (159, 195), (159, 196), (159, 197), (159, 198), (159, 199), (159, 200), (159, 201), (159, 202), (159, 203), (159, 204), (159, 205), (159, 215), (159, 216), (159, 217), (159, 218), (159, 219), (159, 220), (159, 221), (159, 222), (159, 223), (159, 224), (159, 227), (159, 229), (160, 189), (160, 193), (160, 194), (160, 195), (160, 196), (160, 197), (160, 198), (160, 199), (160, 200), (160, 201), (160, 202), (160, 203), (160, 204), (160, 207), (160, 208), (160, 209), (160, 210), (160, 211), (160, 212), (160, 213), (160, 214), (160, 218), (160, 219), (160, 220), (160, 221), (160, 222), (160, 223), (160, 226), (161, 191), (161, 194), (161, 195), (161, 196), (161, 197), (161, 198), (161, 199), (161, 200), (161, 201), (161, 202), (161, 205), (161, 215), (161, 216), (161, 217), (161, 220), (161, 221), (161, 222), (161, 224), (162, 193), (162, 195), (162, 196), (162, 197), (162, 198), (162, 199), (162, 200), (162, 203), (162, 218), (162, 219), (162, 223), (163, 194), (163, 201), (163, 202), (163, 222), (164, 195), (164, 197), (164, 198), (164, 200), (235, 195), (235, 197), (235, 198), (235, 200), (236, 194), (236, 202), (236, 220), (236, 222), (237, 193), (237, 195), (237, 196), (237, 197), (237, 198), (237, 199), (237, 200), (237, 203), (237, 204), (237, 218), (237, 219), (237, 223), (238, 191), (238, 194), (238, 195), (238, 196), (238, 197), (238, 198), (238, 199), (238, 200), (238, 201), (238, 202), (238, 205), (238, 215), (238, 216), (238, 217), (238, 220), (238, 221), (238, 222), (238, 224), (239, 189), (239, 193), (239, 194), (239, 195), (239, 196), (239, 197), (239, 198), (239, 199), (239, 200), (239, 201), (239, 202), (239, 203), (239, 204), (239, 207), (239, 208), (239, 209), (239, 210), (239, 211), (239, 212), (239, 213), (239, 214), (239, 218), (239, 219), (239, 220), (239, 221), (239, 222), (239, 223), (239, 226), (240, 186), (240, 187), (240, 191), (240, 192), (240, 193), (240, 194), (240, 195), (240, 196), (240, 197), (240, 198), (240, 199), (240, 200), (240, 201), (240, 202), (240, 203), (240, 204), (240, 205), (240, 206), (240, 215), (240, 216), (240, 217), (240, 218), (240, 219), (240, 220), (240, 221), (240, 222), (240, 223), (240, 224), (240, 227), (240, 229), (241, 184), (241, 189), (241, 190), (241, 191), (241, 192), (241, 193), (241, 194), (241, 195), (241, 196), (241, 197), (241, 198), (241, 199), (241, 200), (241, 201), (241, 202), (241, 203), (241, 204), (241, 205), (241, 206), (241, 207), (241, 208), (241, 209), (241, 210), (241, 211), (241, 212), (241, 213), (241, 214), (241, 215), (241, 216), (241, 217), (241, 218), (241, 219), (241, 220), (241, 221), (241, 222), (241, 223), (241, 224), (241, 225), (241, 226), (241, 229), (242, 182), (242, 186), (242, 187), (242, 188), (242, 189), (242, 190), (242, 191), (242, 192), (242, 193), (242, 194), (242, 195), (242, 196), (242, 197), (242, 198), (242, 199), (242, 200), (242, 201), (242, 202), (242, 203), (242, 204), (242, 205), (242, 206), (242, 207), (242, 208), (242, 209), (242, 210), (242, 211), (242, 212), (242, 213), (242, 214), (242, 215), (242, 216), (242, 217), (242, 218), (242, 219), (242, 220), (242, 221), (242, 222), (242, 223), (242, 224), (242, 225), (242, 226), (242, 227), (242, 229), (243, 181), (243, 184), (243, 185), (243, 186), (243, 187), (243, 188), (243, 189), (243, 190), (243, 191), (243, 192), (243, 193), (243, 194), (243, 195), (243, 196), (243, 197), (243, 198), (243, 199), (243, 200), (243, 201), (243, 202), (243, 203), (243, 204), (243, 205), (243, 206), (243, 207), (243, 208), (243, 209), (243, 210), (243, 211), (243, 212), (243, 213), (243, 214), (243, 215), (243, 216), (243, 217), (243, 218), (243, 219), (243, 220), (243, 221), (243, 222), (243, 223), (243, 224), (243, 225), (243, 226), (243, 227), (243, 229), (244, 180), (244, 182), (244, 183), (244, 184), (244, 185), (244, 186), (244, 187), (244, 188), (244, 189), (244, 190), (244, 191), (244, 192), (244, 193), (244, 194), (244, 195), (244, 196), (244, 197), (244, 198), (244, 199), (244, 200), (244, 201), (244, 202), (244, 203), (244, 204), (244, 205), (244, 206), (244, 207), (244, 208), (244, 209), (244, 210), (244, 211), (244, 212), (244, 213), (244, 214), (244, 215), (244, 216), (244, 217), (244, 218), (244, 219), (244, 220), (244, 221), (244, 222), (244, 223), (244, 224), (244, 225), (244, 226), (244, 227), (244, 228), (244, 230), (245, 179), (245, 181), (245, 182), (245, 183), (245, 184), (245, 185), (245, 186), (245, 187), (245, 188), (245, 189), (245, 190), (245, 191), (245, 192), (245, 193), (245, 194), (245, 195), (245, 196), (245, 197), (245, 198), (245, 199), (245, 200), (245, 201), (245, 202), (245, 203), (245, 204), (245, 205), (245, 206), (245, 207), (245, 208), (245, 209), (245, 210), (245, 211), (245, 212), (245, 213), (245, 214), (245, 215), (245, 216), (245, 217), (245, 218), (245, 219), (245, 220), (245, 221), (245, 222), (245, 223), (245, 224), (245, 225), (245, 226), (245, 227), (245, 228), (245, 230), (246, 178), (246, 180), (246, 181), (246, 182), (246, 183), (246, 184), (246, 185), (246, 186), (246, 187), (246, 188), (246, 189), (246, 190), (246, 191), (246, 192), (246, 193), (246, 194), (246, 195), (246, 196), (246, 197), (246, 198), (246, 199), (246, 200), (246, 201), (246, 202), (246, 203), (246, 204), (246, 205), (246, 206), (246, 207), (246, 208), (246, 209), (246, 210), (246, 211), (246, 212), (246, 213), (246, 214), (246, 215), (246, 216), (246, 217), (246, 218), (246, 219), (246, 220), (246, 221), (246, 222), (246, 223), (246, 224), (246, 225), (246, 226), (246, 227), (246, 228), (246, 230), (247, 178), (247, 180), (247, 181), (247, 182), (247, 183), (247, 184), (247, 185), (247, 186), (247, 187), (247, 188), (247, 189), (247, 190), (247, 191), (247, 192), (247, 193), (247, 194), (247, 195), (247, 196), (247, 197), (247, 198), (247, 199), (247, 200), (247, 201), (247, 202), (247, 203), (247, 204), (247, 205), (247, 206), (247, 207), (247, 208), (247, 209), (247, 210), (247, 211), (247, 212), (247, 213), (247, 214), (247, 215), (247, 216), (247, 217), (247, 218), (247, 219), (247, 220), (247, 221), (247, 222), (247, 223), (247, 224), (247, 225), (247, 226), (247, 227), (247, 228), (247, 230), (248, 177), (248, 179), (248, 180), (248, 181), (248, 182), (248, 183), (248, 184), (248, 185), (248, 186), (248, 187), (248, 188), (248, 189), (248, 190), (248, 191), (248, 192), (248, 193), (248, 194), (248, 195), (248, 196), (248, 197), (248, 198), (248, 199), (248, 200), (248, 201), (248, 202), (248, 203), (248, 204), (248, 205), (248, 206), (248, 207), (248, 208), (248, 209), (248, 210), (248, 211), (248, 212), (248, 213), (248, 214), (248, 215), (248, 216), (248, 217), (248, 218), (248, 219), (248, 220), (248, 221), (248, 222), (248, 223), (248, 224), (248, 225), (248, 226), (248, 227), (248, 228), (248, 230), (249, 176), (249, 178), (249, 179), (249, 180), (249, 181), (249, 182), (249, 183), (249, 184), (249, 185), (249, 186), (249, 187), (249, 188), (249, 189), (249, 190), (249, 191), (249, 192), (249, 193), (249, 194), (249, 195), (249, 196), (249, 197), (249, 198), (249, 199), (249, 200), (249, 201), (249, 202), (249, 203), (249, 204), (249, 205), (249, 206), (249, 207), (249, 208), (249, 209), (249, 210), (249, 211), (249, 212), (249, 213), (249, 214), (249, 215), (249, 216), (249, 217), (249, 218), (249, 219), (249, 220), (249, 221), (249, 222), (249, 223), (249, 224), (249, 225), (249, 226), (249, 227), (249, 228), (249, 230), (250, 176), (250, 178), (250, 179), (250, 180), (250, 181), (250, 182), (250, 183), (250, 184), (250, 185), (250, 186), (250, 187), (250, 188), (250, 189), (250, 190), (250, 191), (250, 192), (250, 193), (250, 194), (250, 195), (250, 196), (250, 197), (250, 198), (250, 199), (250, 200), (250, 201), (250, 202), (250, 203), (250, 204), (250, 205), (250, 206), (250, 207), (250, 208), (250, 209), (250, 210), (250, 211), (250, 212), (250, 213), (250, 214), (250, 215), (250, 216), (250, 217), (250, 218), (250, 219), (250, 220), (250, 221), (250, 222), (250, 223), (250, 224), (250, 225), (250, 226), (250, 227), (250, 228), (250, 230), (251, 175), (251, 177), (251, 178), (251, 179), (251, 180), (251, 181), (251, 182), (251, 183), (251, 184), (251, 185), (251, 186), (251, 187), (251, 188), (251, 189), (251, 190), (251, 191), (251, 192), (251, 193), (251, 194), (251, 195), (251, 196), (251, 197), (251, 198), (251, 199), (251, 200), (251, 201), (251, 202), (251, 203), (251, 204), (251, 205), (251, 206), (251, 207), (251, 208), (251, 209), (251, 210), (251, 211), (251, 212), (251, 213), (251, 214), (251, 215), (251, 216), (251, 217), (251, 218), (251, 219), (251, 220), (251, 221), (251, 222), (251, 223), (251, 224), (251, 225), (251, 226), (251, 227), (251, 229), (252, 174), (252, 176), (252, 177), (252, 178), (252, 179), (252, 180), (252, 181), (252, 182), (252, 183), (252, 184), (252, 185), (252, 186), (252, 187), (252, 188), (252, 189), (252, 190), (252, 191), (252, 192), (252, 193), (252, 194), (252, 195), (252, 196), (252, 197), (252, 198), (252, 199), (252, 200), (252, 201), (252, 202), (252, 203), (252, 204), (252, 205), (252, 206), (252, 207), (252, 208), (252, 209), (252, 210), (252, 211), (252, 212), (252, 213), (252, 214), (252, 215), (252, 216), (252, 217), (252, 218), (252, 219), (252, 220), (252, 221), (252, 222), (252, 223), (252, 224), (252, 225), (252, 226), (252, 227), (252, 229), (253, 176), (253, 177), (253, 178), (253, 179), (253, 180), (253, 181), (253, 182), (253, 183), (253, 184), (253, 185), (253, 186), (253, 187), (253, 188), (253, 189), (253, 190), (253, 191), (253, 192), (253, 193), (253, 194), (253, 195), (253, 196), (253, 197), (253, 198), (253, 199), (253, 200), (253, 201), (253, 202), (253, 203), (253, 204), (253, 205), (253, 206), (253, 207), (253, 208), (253, 209), (253, 210), (253, 211), (253, 212), (253, 213), (253, 214), (253, 215), (253, 216), (253, 217), (253, 218), (253, 219), (253, 220), (253, 221), (253, 222), (253, 223), (253, 224), (253, 225), (253, 226), (253, 228), (254, 173), (254, 175), (254, 176), (254, 177), (254, 178), (254, 179), (254, 180), (254, 181), (254, 182), (254, 183), (254, 184), (254, 185), (254, 186), (254, 187), (254, 188), (254, 189), (254, 190), (254, 191), (254, 192), (254, 193), (254, 194), (254, 195), (254, 196), (254, 197), (254, 198), (254, 199), (254, 200), (254, 201), (254, 202), (254, 203), (254, 204), (254, 205), (254, 206), (254, 207), (254, 208), (254, 209), (254, 210), (254, 211), (254, 212), (254, 213), (254, 214), (254, 215), (254, 216), (254, 217), (254, 218), (254, 219), (254, 220), (254, 221), (254, 222), (254, 223), (254, 224), (254, 225), (254, 226), (254, 228), (255, 174), (255, 175), (255, 176), (255, 177), (255, 178), (255, 179), (255, 180), (255, 181), (255, 182), (255, 183), (255, 184), (255, 185), (255, 186), (255, 187), (255, 188), (255, 189), (255, 190), (255, 191), (255, 192), (255, 193), (255, 194), (255, 195), (255, 196), (255, 197), (255, 198), (255, 199), (255, 200), (255, 201), (255, 202), (255, 203), (255, 204), (255, 205), (255, 206), (255, 207), (255, 208), (255, 209), (255, 210), (255, 211), (255, 212), (255, 213), (255, 214), (255, 215), (255, 216), (255, 217), (255, 218), (255, 219), (255, 220), (255, 221), (255, 222), (255, 223), (255, 224), (255, 225), (255, 226), (255, 228), (256, 170), (256, 173), (256, 174), (256, 175), (256, 176), (256, 177), (256, 178), (256, 179), (256, 180), (256, 181), (256, 182), (256, 183), (256, 184), (256, 185), (256, 186), (256, 187), (256, 188), (256, 189), (256, 190), (256, 191), (256, 192), (256, 193), (256, 194), (256, 195), (256, 196), (256, 197), (256, 198), (256, 199), (256, 200), (256, 201), (256, 202), (256, 203), (256, 204), (256, 205), (256, 206), (256, 207), (256, 208), (256, 209), (256, 210), (256, 211), (256, 212), (256, 213), (256, 214), (256, 215), (256, 216), (256, 217), (256, 218), (256, 219), (256, 220), (256, 221), (256, 222), (256, 223), (256, 224), (256, 225), (256, 226), (256, 228), (257, 168), (257, 172), (257, 173), (257, 174), (257, 175), (257, 176), (257, 177), (257, 178), (257, 179), (257, 180), (257, 181), (257, 182), (257, 183), (257, 184), (257, 185), (257, 186), (257, 187), (257, 188), (257, 189), (257, 190), (257, 191), (257, 192), (257, 193), (257, 194), (257, 195), (257, 196), (257, 197), (257, 198), (257, 199), (257, 200), (257, 201), (257, 202), (257, 203), (257, 204), (257, 205), (257, 206), (257, 207), (257, 208), (257, 209), (257, 210), (257, 211), (257, 212), (257, 213), (257, 214), (257, 215), (257, 216), (257, 217), (257, 218), (257, 219), (257, 220), (257, 221), (257, 222), (257, 223), (257, 224), (257, 225), (257, 226), (257, 228), (258, 166), (258, 170), (258, 171), (258, 172), (258, 173), (258, 174), (258, 175), (258, 176), (258, 177), (258, 178), (258, 179), (258, 180), (258, 181), (258, 182), (258, 183), (258, 184), (258, 185), (258, 186), (258, 187), (258, 188), (258, 189), (258, 190), (258, 191), (258, 192), (258, 193), (258, 194), (258, 195), (258, 196), (258, 197), (258, 198), (258, 199), (258, 200), (258, 201), (258, 202), (258, 203), (258, 204), (258, 205), (258, 206), (258, 207), (258, 208), (258, 209), (258, 210), (258, 211), (258, 212), (258, 213), (258, 214), (258, 215), (258, 216), (258, 217), (258, 218), (258, 219), (258, 220), (258, 221), (258, 222), (258, 223), (258, 224), (258, 225), (258, 226), (258, 228), (259, 164), (259, 168), (259, 169), (259, 170), (259, 171), (259, 172), (259, 173), (259, 174), (259, 175), (259, 176), (259, 177), (259, 178), (259, 179), (259, 180), (259, 181), (259, 182), (259, 183), (259, 184), (259, 185), (259, 186), (259, 187), (259, 188), (259, 189), (259, 190), (259, 191), (259, 192), (259, 193), (259, 194), (259, 195), (259, 196), (259, 197), (259, 198), (259, 199), (259, 200), (259, 201), (259, 202), (259, 203), (259, 204), (259, 205), (259, 206), (259, 207), (259, 208), (259, 209), (259, 210), (259, 211), (259, 212), (259, 213), (259, 214), (259, 215), (259, 216), (259, 217), (259, 218), (259, 219), (259, 220), (259, 221), (259, 222), (259, 223), (259, 224), (259, 225), (259, 226), (259, 228), (260, 163), (260, 166), (260, 167), (260, 168), (260, 169), (260, 170), (260, 171), (260, 172), (260, 173), (260, 174), (260, 175), (260, 176), (260, 177), (260, 178), (260, 179), (260, 180), (260, 181), (260, 182), (260, 183), (260, 184), (260, 185), (260, 186), (260, 187), (260, 188), (260, 189), (260, 190), (260, 191), (260, 192), (260, 193), (260, 194), (260, 195), (260, 196), (260, 197), (260, 198), (260, 199), (260, 200), (260, 201), (260, 202), (260, 203), (260, 204), (260, 205), (260, 206), (260, 207), (260, 208), (260, 209), (260, 210), (260, 211), (260, 212), (260, 213), (260, 214), (260, 215), (260, 216), (260, 217), (260, 218), (260, 219), (260, 220), (260, 221), (260, 222), (260, 223), (260, 224), (260, 225), (260, 226), (260, 228), (261, 162), (261, 164), (261, 165), (261, 166), (261, 167), (261, 168), (261, 169), (261, 170), (261, 171), (261, 172), (261, 173), (261, 174), (261, 175), (261, 176), (261, 177), (261, 178), (261, 179), (261, 180), (261, 181), (261, 182), (261, 183), (261, 184), (261, 185), (261, 186), (261, 187), (261, 188), (261, 189), (261, 190), (261, 191), (261, 192), (261, 193), (261, 194), (261, 195), (261, 196), (261, 197), (261, 198), (261, 199), (261, 200), (261, 201), (261, 202), (261, 203), (261, 204), (261, 205), (261, 206), (261, 207), (261, 208), (261, 209), (261, 210), (261, 211), (261, 212), (261, 213), (261, 214), (261, 215), (261, 216), (261, 217), (261, 218), (261, 219), (261, 220), (261, 221), (261, 222), (261, 223), (261, 224), (261, 225), (261, 227), (262, 161), (262, 163), (262, 164), (262, 165), (262, 166), (262, 167), (262, 168), (262, 169), (262, 170), (262, 171), (262, 172), (262, 173), (262, 174), (262, 175), (262, 176), (262, 177), (262, 178), (262, 179), (262, 180), (262, 181), (262, 182), (262, 183), (262, 184), (262, 185), (262, 186), (262, 187), (262, 188), (262, 189), (262, 190), (262, 191), (262, 192), (262, 193), (262, 194), (262, 195), (262, 196), (262, 197), (262, 198), (262, 199), (262, 200), (262, 201), (262, 202), (262, 203), (262, 204), (262, 205), (262, 206), (262, 207), (262, 208), (262, 209), (262, 210), (262, 211), (262, 212), (262, 213), (262, 214), (262, 215), (262, 216), (262, 217), (262, 218), (262, 219), (262, 220), (262, 221), (262, 222), (262, 223), (262, 224), (262, 227), (263, 160), (263, 162), (263, 163), (263, 164), (263, 165), (263, 166), (263, 167), (263, 168), (263, 169), (263, 170), (263, 171), (263, 172), (263, 173), (263, 174), (263, 175), (263, 176), (263, 177), (263, 178), (263, 179), (263, 180), (263, 181), (263, 182), (263, 183), (263, 184), (263, 185), (263, 186), (263, 187), (263, 188), (263, 189), (263, 190), (263, 191), (263, 192), (263, 193), (263, 194), (263, 195), (263, 196), (263, 197), (263, 198), (263, 199), (263, 200), (263, 201), (263, 202), (263, 203), (263, 204), (263, 205), (263, 206), (263, 207), (263, 208), (263, 209), (263, 210), (263, 211), (263, 212), (263, 213), (263, 214), (263, 215), (263, 216), (263, 217), (263, 218), (263, 219), (263, 220), (263, 221), (263, 222), (263, 223), (264, 160), (264, 162), (264, 163), (264, 164), (264, 165), (264, 166), (264, 167), (264, 168), (264, 169), (264, 170), (264, 171), (264, 172), (264, 173), (264, 174), (264, 175), (264, 176), (264, 177), (264, 178), (264, 179), (264, 180), (264, 181), (264, 182), (264, 183), (264, 184), (264, 185), (264, 186), (264, 187), (264, 188), (264, 189), (264, 190), (264, 191), (264, 192), (264, 193), (264, 194), (264, 195), (264, 196), (264, 197), (264, 198), (264, 199), (264, 200), (264, 201), (264, 202), (264, 203), (264, 204), (264, 205), (264, 206), (264, 207), (264, 208), (264, 209), (264, 210), (264, 211), (264, 212), (264, 213), (264, 214), (264, 215), (264, 216), (264, 217), (264, 218), (264, 219), (264, 220), (264, 221), (264, 222), (264, 224), (265, 160), (265, 162), (265, 163), (265, 164), (265, 165), (265, 166), (265, 167), (265, 168), (265, 169), (265, 170), (265, 171), (265, 172), (265, 173), (265, 174), (265, 175), (265, 176), (265, 177), (265, 178), (265, 179), (265, 180), (265, 181), (265, 182), (265, 183), (265, 184), (265, 185), (265, 186), (265, 187), (265, 188), (265, 189), (265, 190), (265, 191), (265, 192), (265, 193), (265, 194), (265, 195), (265, 196), (265, 197), (265, 198), (265, 199), (265, 200), (265, 201), (265, 202), (265, 203), (265, 204), (265, 205), (265, 206), (265, 207), (265, 208), (265, 209), (265, 210), (265, 211), (265, 212), (265, 213), (265, 214), (265, 215), (265, 216), (265, 217), (265, 218), (265, 219), (265, 220), (265, 221), (265, 223), (266, 159), (266, 161), (266, 162), (266, 163), (266, 164), (266, 165), (266, 166), (266, 167), (266, 168), (266, 169), (266, 170), (266, 171), (266, 172), (266, 173), (266, 174), (266, 175), (266, 176), (266, 177), (266, 178), (266, 179), (266, 180), (266, 181), (266, 182), (266, 183), (266, 184), (266, 185), (266, 186), (266, 187), (266, 188), (266, 189), (266, 190), (266, 191), (266, 192), (266, 193), (266, 194), (266, 195), (266, 196), (266, 197), (266, 198), (266, 199), (266, 200), (266, 201), (266, 202), (266, 203), (266, 204), (266, 205), (266, 206), (266, 207), (266, 208), (266, 209), (266, 210), (266, 211), (266, 212), (266, 213), (266, 214), (266, 215), (266, 216), (266, 217), (266, 218), (266, 219), (266, 220), (266, 222), (267, 159), (267, 161), (267, 162), (267, 163), (267, 164), (267, 165), (267, 166), (267, 167), (267, 168), (267, 169), (267, 170), (267, 171), (267, 172), (267, 173), (267, 174), (267, 175), (267, 176), (267, 177), (267, 178), (267, 179), (267, 180), (267, 181), (267, 182), (267, 183), (267, 184), (267, 185), (267, 186), (267, 187), (267, 188), (267, 189), (267, 190), (267, 191), (267, 192), (267, 193), (267, 194), (267, 195), (267, 196), (267, 197), (267, 198), (267, 199), (267, 200), (267, 201), (267, 202), (267, 203), (267, 204), (267, 205), (267, 206), (267, 207), (267, 208), (267, 209), (267, 210), (267, 211), (267, 212), (267, 213), (267, 214), (267, 215), (267, 216), (267, 217), (267, 218), (267, 219), (267, 221), (268, 159), (268, 161), (268, 162), (268, 163), (268, 164), (268, 165), (268, 166), (268, 167), (268, 168), (268, 169), (268, 170), (268, 171), (268, 172), (268, 173), (268, 174), (268, 175), (268, 176), (268, 177), (268, 178), (268, 179), (268, 180), (268, 181), (268, 182), (268, 183), (268, 184), (268, 185), (268, 186), (268, 187), (268, 188), (268, 189), (268, 190), (268, 191), (268, 192), (268, 193), (268, 194), (268, 195), (268, 196), (268, 197), (268, 198), (268, 199), (268, 200), (268, 201), (268, 202), (268, 203), (268, 204), (268, 205), (268, 206), (268, 207), (268, 208), (268, 209), (268, 210), (268, 211), (268, 212), (268, 213), (268, 214), (268, 215), (268, 216), (268, 217), (268, 218), (268, 220), (269, 159), (269, 161), (269, 162), (269, 163), (269, 164), (269, 165), (269, 166), (269, 167), (269, 168), (269, 169), (269, 170), (269, 171), (269, 172), (269, 173), (269, 174), (269, 175), (269, 176), (269, 177), (269, 178), (269, 179), (269, 180), (269, 181), (269, 182), (269, 183), (269, 184), (269, 185), (269, 186), (269, 187), (269, 188), (269, 189), (269, 190), (269, 191), (269, 192), (269, 193), (269, 194), (269, 195), (269, 196), (269, 197), (269, 198), (269, 199), (269, 200), (269, 201), (269, 202), (269, 203), (269, 204), (269, 205), (269, 206), (269, 207), (269, 208), (269, 209), (269, 210), (269, 211), (269, 212), (269, 213), (269, 214), (269, 215), (269, 216), (269, 220), (270, 159), (270, 161), (270, 162), (270, 163), (270, 164), (270, 165), (270, 166), (270, 167), (270, 168), (270, 169), (270, 170), (270, 171), (270, 172), (270, 173), (270, 174), (270, 175), (270, 176), (270, 177), (270, 178), (270, 179), (270, 180), (270, 181), (270, 182), (270, 183), (270, 184), (270, 185), (270, 186), (270, 187), (270, 188), (270, 189), (270, 190), (270, 191), (270, 192), (270, 193), (270, 194), (270, 195), (270, 196), (270, 197), (270, 198), (270, 199), (270, 200), (270, 201), (270, 202), (270, 203), (270, 204), (270, 205), (270, 206), (270, 207), (270, 208), (270, 209), (270, 210), (270, 211), (270, 212), (270, 213), (270, 214), (270, 215), (270, 218), (271, 159), (271, 161), (271, 162), (271, 163), (271, 164), (271, 165), (271, 166), (271, 167), (271, 168), (271, 169), (271, 170), (271, 171), (271, 172), (271, 173), (271, 174), (271, 175), (271, 176), (271, 177), (271, 178), (271, 179), (271, 180), (271, 181), (271, 182), (271, 183), (271, 184), (271, 185), (271, 186), (271, 187), (271, 188), (271, 189), (271, 190), (271, 191), (271, 192), (271, 193), (271, 194), (271, 195), (271, 196), (271, 197), (271, 198), (271, 199), (271, 200), (271, 201), (271, 202), (271, 203), (271, 204), (271, 205), (271, 206), (271, 207), (271, 208), (271, 209), (271, 210), (271, 211), (271, 212), (271, 213), (271, 214), (271, 216), (272, 159), (272, 161), (272, 162), (272, 163), (272, 164), (272, 165), (272, 166), (272, 167), (272, 168), (272, 169), (272, 170), (272, 171), (272, 172), (272, 173), (272, 174), (272, 175), (272, 176), (272, 177), (272, 178), (272, 179), (272, 180), (272, 181), (272, 182), (272, 183), (272, 184), (272, 185), (272, 186), (272, 187), (272, 188), (272, 189), (272, 190), (272, 191), (272, 192), (272, 193), (272, 194), (272, 195), (272, 196), (272, 197), (272, 198), (272, 199), (272, 200), (272, 201), (272, 202), (272, 203), (272, 204), (272, 205), (272, 206), (272, 207), (272, 208), (272, 209), (272, 210), (272, 211), (272, 212), (272, 213), (272, 215), (273, 159), (273, 161), (273, 162), (273, 163), (273, 164), (273, 165), (273, 166), (273, 167), (273, 168), (273, 169), (273, 170), (273, 171), (273, 172), (273, 173), (273, 174), (273, 175), (273, 176), (273, 177), (273, 178), (273, 179), (273, 180), (273, 181), (273, 182), (273, 183), (273, 184), (273, 185), (273, 186), (273, 187), (273, 188), (273, 189), (273, 190), (273, 191), (273, 192), (273, 193), (273, 194), (273, 195), (273, 196), (273, 197), (273, 198), (273, 199), (273, 200), (273, 201), (273, 202), (273, 203), (273, 204), (273, 205), (273, 206), (273, 207), (273, 208), (273, 209), (273, 210), (273, 211), (273, 212), (273, 214), (274, 159), (274, 161), (274, 162), (274, 163), (274, 164), (274, 165), (274, 166), (274, 167), (274, 168), (274, 169), (274, 170), (274, 171), (274, 172), (274, 173), (274, 174), (274, 175), (274, 176), (274, 177), (274, 178), (274, 179), (274, 180), (274, 181), (274, 182), (274, 183), (274, 184), (274, 185), (274, 186), (274, 187), (274, 188), (274, 189), (274, 190), (274, 191), (274, 192), (274, 193), (274, 194), (274, 195), (274, 196), (274, 197), (274, 198), (274, 199), (274, 200), (274, 201), (274, 202), (274, 203), (274, 204), (274, 205), (274, 206), (274, 207), (274, 208), (274, 209), (274, 210), (274, 211), (274, 213), (275, 159), (275, 161), (275, 162), (275, 163), (275, 164), (275, 165), (275, 166), (275, 167), (275, 168), (275, 169), (275, 170), (275, 171), (275, 172), (275, 173), (275, 174), (275, 175), (275, 176), (275, 177), (275, 178), (275, 179), (275, 180), (275, 181), (275, 182), (275, 183), (275, 184), (275, 185), (275, 186), (275, 187), (275, 188), (275, 189), (275, 190), (275, 191), (275, 192), (275, 193), (275, 194), (275, 195), (275, 196), (275, 197), (275, 198), (275, 199), (275, 200), (275, 201), (275, 202), (275, 203), (275, 204), (275, 205), (275, 206), (275, 207), (275, 208), (275, 209), (275, 210), (275, 212), (276, 159), (276, 161), (276, 162), (276, 163), (276, 164), (276, 165), (276, 166), (276, 167), (276, 168), (276, 169), (276, 170), (276, 171), (276, 172), (276, 173), (276, 174), (276, 175), (276, 176), (276, 177), (276, 178), (276, 179), (276, 180), (276, 181), (276, 182), (276, 183), (276, 184), (276, 185), (276, 186), (276, 187), (276, 188), (276, 189), (276, 190), (276, 191), (276, 192), (276, 193), (276, 194), (276, 195), (276, 196), (276, 197), (276, 198), (276, 199), (276, 200), (276, 201), (276, 202), (276, 203), (276, 204), (276, 205), (276, 206), (276, 207), (276, 208), (276, 209), (276, 210), (276, 212), (277, 160), (277, 162), (277, 163), (277, 164), (277, 165), (277, 166), (277, 167), (277, 168), (277, 169), (277, 170), (277, 171), (277, 172), (277, 173), (277, 174), (277, 175), (277, 176), (277, 177), (277, 178), (277, 179), (277, 180), (277, 181), (277, 182), (277, 183), (277, 184), (277, 185), (277, 186), (277, 187), (277, 188), (277, 189), (277, 190), (277, 191), (277, 192), (277, 193), (277, 194), (277, 195), (277, 196), (277, 197), (277, 198), (277, 199), (277, 200), (277, 201), (277, 202), (277, 203), (277, 204), (277, 205), (277, 206), (277, 207), (277, 208), (277, 209), (277, 211), (278, 160), (278, 162), (278, 163), (278, 164), (278, 165), (278, 166), (278, 167), (278, 168), (278, 169), (278, 170), (278, 171), (278, 172), (278, 173), (278, 174), (278, 175), (278, 176), (278, 177), (278, 178), (278, 179), (278, 180), (278, 181), (278, 182), (278, 183), (278, 184), (278, 185), (278, 186), (278, 187), (278, 188), (278, 189), (278, 190), (278, 191), (278, 192), (278, 193), (278, 194), (278, 195), (278, 196), (278, 197), (278, 198), (278, 199), (278, 200), (278, 201), (278, 202), (278, 203), (278, 204), (278, 205), (278, 206), (278, 207), (278, 208), (278, 210), (279, 160), (279, 162), (279, 163), (279, 164), (279, 165), (279, 166), (279, 167), (279, 168), (279, 169), (279, 170), (279, 171), (279, 172), (279, 173), (279, 174), (279, 175), (279, 176), (279, 177), (279, 178), (279, 179), (279, 180), (279, 181), (279, 182), (279, 183), (279, 184), (279, 185), (279, 186), (279, 187), (279, 188), (279, 189), (279, 190), (279, 191), (279, 192), (279, 193), (279, 194), (279, 195), (279, 196), (279, 197), (279, 198), (279, 199), (279, 200), (279, 201), (279, 202), (279, 203), (279, 204), (279, 205), (279, 206), (279, 207), (279, 208), (279, 210), (280, 161), (280, 163), (280, 164), (280, 165), (280, 166), (280, 167), (280, 168), (280, 169), (280, 170), (280, 171), (280, 172), (280, 173), (280, 174), (280, 175), (280, 176), (280, 177), (280, 178), (280, 179), (280, 180), (280, 181), (280, 182), (280, 183), (280, 184), (280, 185), (280, 186), (280, 187), (280, 188), (280, 189), (280, 190), (280, 191), (280, 192), (280, 193), (280, 194), (280, 195), (280, 196), (280, 197), (280, 198), (280, 199), (280, 200), (280, 201), (280, 202), (280, 203), (280, 204), (280, 205), (280, 206), (280, 207), (280, 209), (281, 161), (281, 163), (281, 164), (281, 165), (281, 166), (281, 167), (281, 168), (281, 169), (281, 170), (281, 171), (281, 172), (281, 173), (281, 174), (281, 175), (281, 176), (281, 177), (281, 178), (281, 179), (281, 180), (281, 181), (281, 182), (281, 183), (281, 184), (281, 185), (281, 186), (281, 187), (281, 188), (281, 189), (281, 190), (281, 191), (281, 192), (281, 193), (281, 194), (281, 195), (281, 196), (281, 197), (281, 198), (281, 199), (281, 200), (281, 201), (281, 202), (281, 203), (281, 204), (281, 205), (281, 206), (281, 207), (281, 209), (282, 162), (282, 164), (282, 165), (282, 166), (282, 167), (282, 168), (282, 169), (282, 170), (282, 171), (282, 172), (282, 173), (282, 174), (282, 175), (282, 176), (282, 177), (282, 178), (282, 179), (282, 180), (282, 181), (282, 182), (282, 183), (282, 184), (282, 185), (282, 186), (282, 187), (282, 188), (282, 189), (282, 190), (282, 191), (282, 192), (282, 193), (282, 194), (282, 195), (282, 196), (282, 197), (282, 198), (282, 199), (282, 200), (282, 201), (282, 202), (282, 203), (282, 204), (282, 205), (282, 206), (282, 208), (283, 162), (283, 164), (283, 165), (283, 166), (283, 167), (283, 168), (283, 169), (283, 170), (283, 171), (283, 172), (283, 173), (283, 174), (283, 175), (283, 176), (283, 177), (283, 178), (283, 179), (283, 180), (283, 181), (283, 182), (283, 183), (283, 184), (283, 185), (283, 186), (283, 187), (283, 188), (283, 189), (283, 190), (283, 191), (283, 192), (283, 193), (283, 194), (283, 195), (283, 196), (283, 197), (283, 198), (283, 199), (283, 200), (283, 201), (283, 202), (283, 203), (283, 204), (283, 207), (284, 163), (284, 165), (284, 166), (284, 167), (284, 168), (284, 169), (284, 170), (284, 171), (284, 172), (284, 173), (284, 174), (284, 175), (284, 176), (284, 177), (284, 178), (284, 179), (284, 180), (284, 181), (284, 182), (284, 183), (284, 184), (284, 185), (284, 186), (284, 187), (284, 188), (284, 189), (284, 190), (284, 191), (284, 192), (284, 193), (284, 194), (284, 195), (284, 196), (284, 197), (284, 198), (284, 199), (284, 200), (284, 201), (284, 202), (284, 206), (285, 164), (285, 166), (285, 167), (285, 168), (285, 169), (285, 170), (285, 171), (285, 172), (285, 173), (285, 174), (285, 175), (285, 176), (285, 177), (285, 178), (285, 179), (285, 180), (285, 181), (285, 182), (285, 183), (285, 184), (285, 185), (285, 186), (285, 187), (285, 188), (285, 189), (285, 190), (285, 191), (285, 192), (285, 193), (285, 194), (285, 195), (285, 196), (285, 197), (285, 198), (285, 199), (285, 200), (285, 204), (286, 165), (286, 167), (286, 168), (286, 169), (286, 170), (286, 171), (286, 172), (286, 173), (286, 174), (286, 175), (286, 176), (286, 177), (286, 178), (286, 179), (286, 180), (286, 181), (286, 182), (286, 183), (286, 184), (286, 185), (286, 186), (286, 187), (286, 188), (286, 189), (286, 190), (286, 191), (286, 192), (286, 193), (286, 194), (286, 195), (286, 196), (286, 197), (286, 198), (286, 202), (287, 166), (287, 168), (287, 169), (287, 170), (287, 171), (287, 172), (287, 173), (287, 174), (287, 175), (287, 176), (287, 177), (287, 178), (287, 179), (287, 180), (287, 181), (287, 182), (287, 183), (287, 184), (287, 185), (287, 186), (287, 187), (287, 188), (287, 189), (287, 190), (287, 191), (287, 192), (287, 193), (287, 194), (287, 195), (287, 196), (287, 200), (288, 167), (288, 170), (288, 171), (288, 172), (288, 173), (288, 174), (288, 175), (288, 176), (288, 177), (288, 178), (288, 179), (288, 180), (288, 181), (288, 182), (288, 183), (288, 184), (288, 185), (288, 186), (288, 187), (288, 188), (288, 189), (288, 190), (288, 191), (288, 192), (288, 193), (288, 194), (288, 198), (289, 168), (289, 174), (289, 175), (289, 176), (289, 177), (289, 178), (289, 179), (289, 180), (289, 181), (289, 182), (289, 183), (289, 184), (289, 185), (289, 186), (289, 187), (289, 188), (289, 189), (289, 190), (289, 191), (289, 192), (289, 196), (290, 170), (290, 171), (290, 172), (290, 173), (290, 177), (290, 178), (290, 179), (290, 180), (290, 181), (290, 182), (290, 183), (290, 184), (290, 185), (290, 186), (290, 194), (291, 174), (291, 176), (291, 180), (291, 181), (291, 182), (291, 186), (291, 187), (291, 188), (291, 189), (291, 190), (291, 192), (292, 177), (292, 178), (292, 179), (292, 180), (292, 183), (292, 184), (292, 185), (293, 182), ) coordinates_13007F = ((103, 234), (104, 233), (104, 234), (105, 232), (105, 235), (106, 231), (106, 233), (106, 234), (106, 236), (107, 230), (107, 232), (107, 233), (107, 234), (107, 236), (108, 229), (108, 231), (108, 232), (108, 233), (108, 234), (108, 235), (108, 237), (109, 227), (109, 230), (109, 231), (109, 232), (109, 233), (109, 234), (109, 235), (109, 237), (110, 225), (110, 229), (110, 230), (110, 231), (110, 232), (110, 237), (110, 238), (111, 225), (111, 227), (111, 228), (111, 229), (111, 230), (111, 233), (111, 234), (111, 235), (111, 236), (112, 225), (112, 227), (112, 228), (112, 231), (112, 232), (113, 225), (113, 230), (114, 225), (114, 228), (115, 225), (115, 226), (284, 225), (285, 225), (285, 228), (286, 225), (286, 230), (287, 225), (287, 227), (287, 228), (287, 231), (287, 232), (288, 225), (288, 227), (288, 228), (288, 229), (288, 230), (288, 234), (288, 235), (288, 236), (288, 238), (289, 225), (289, 229), (289, 230), (289, 231), (289, 232), (289, 233), (289, 237), (290, 228), (290, 230), (290, 231), (290, 232), (290, 233), (290, 234), (290, 235), (290, 237), (291, 229), (291, 231), (291, 232), (291, 233), (291, 234), (291, 235), (291, 237), (292, 230), (292, 232), (292, 233), (292, 234), (292, 236), (293, 231), (293, 233), (293, 235), (294, 232), (294, 235), (295, 233), (295, 234), (296, 234), ) coordinates_357F00 = ((64, 189), (64, 191), (64, 192), (64, 193), (64, 194), (65, 189), (65, 196), (66, 189), (66, 191), (66, 192), (66, 193), (66, 194), (66, 195), (66, 197), (67, 189), (67, 191), (67, 192), (67, 193), (67, 194), (67, 195), (67, 197), (67, 202), (68, 189), (68, 191), (68, 192), (68, 193), (68, 194), (68, 195), (68, 196), (68, 197), (68, 203), (68, 205), (69, 190), (69, 192), (69, 193), (69, 194), (69, 199), (69, 200), (69, 201), (69, 202), (70, 190), (70, 195), (70, 196), (70, 197), (70, 198), (71, 190), (71, 192), (71, 193), (71, 194), (328, 190), (328, 192), (328, 193), (328, 194), (329, 190), (329, 196), (329, 197), (329, 198), (330, 190), (330, 192), (330, 193), (330, 194), (330, 195), (330, 199), (330, 200), (330, 202), (331, 189), (331, 191), (331, 192), (331, 193), (331, 194), (331, 195), (331, 197), (331, 201), (331, 203), (331, 205), (332, 189), (332, 191), (332, 192), (332, 193), (332, 194), (332, 195), (332, 197), (332, 202), (333, 189), (333, 191), (333, 192), (333, 193), (333, 194), (333, 197), (334, 189), (334, 196), (335, 189), (335, 191), (335, 192), (335, 193), (335, 194), ) coordinates_00FF57 = ((73, 200), (73, 202), (73, 203), (73, 204), (73, 205), (73, 206), (74, 198), (74, 199), (74, 208), (75, 196), (75, 200), (75, 201), (75, 202), (75, 203), (75, 204), (75, 205), (75, 206), (75, 207), (75, 210), (75, 211), (76, 194), (76, 197), (76, 198), (76, 199), (76, 200), (76, 201), (76, 202), (76, 203), (76, 204), (76, 205), (76, 206), (76, 207), (76, 208), (76, 209), (76, 213), (77, 192), (77, 195), (77, 196), (77, 197), (77, 198), (77, 199), (77, 200), (77, 201), (77, 202), (77, 203), (77, 204), (77, 205), (77, 206), (77, 207), (77, 208), (77, 209), (77, 210), (77, 211), (77, 215), (78, 190), (78, 191), (78, 194), (78, 195), (78, 196), (78, 197), (78, 198), (78, 199), (78, 200), (78, 201), (78, 202), (78, 203), (78, 204), (78, 205), (78, 206), (78, 207), (78, 208), (78, 209), (78, 210), (78, 211), (78, 212), (78, 213), (78, 216), (79, 189), (79, 192), (79, 193), (79, 194), (79, 195), (79, 196), (79, 197), (79, 198), (79, 199), (79, 200), (79, 201), (79, 202), (79, 203), (79, 204), (79, 205), (79, 206), (79, 207), (79, 208), (79, 209), (79, 210), (79, 211), (79, 212), (79, 213), (79, 214), (79, 215), (79, 218), (80, 187), (80, 190), (80, 191), (80, 192), (80, 193), (80, 194), (80, 195), (80, 196), (80, 197), (80, 198), (80, 199), (80, 200), (80, 201), (80, 202), (80, 203), (80, 204), (80, 205), (80, 206), (80, 207), (80, 208), (80, 209), (80, 210), (80, 211), (80, 212), (80, 213), (80, 214), (80, 215), (80, 216), (80, 219), (81, 186), (81, 189), (81, 190), (81, 191), (81, 192), (81, 193), (81, 194), (81, 195), (81, 196), (81, 197), (81, 198), (81, 199), (81, 200), (81, 201), (81, 202), (81, 203), (81, 204), (81, 205), (81, 206), (81, 207), (81, 208), (81, 209), (81, 210), (81, 211), (81, 212), (81, 213), (81, 214), (81, 215), (81, 216), (81, 217), (81, 218), (81, 221), (82, 184), (82, 187), (82, 188), (82, 189), (82, 190), (82, 191), (82, 192), (82, 193), (82, 194), (82, 195), (82, 196), (82, 197), (82, 198), (82, 199), (82, 200), (82, 201), (82, 202), (82, 203), (82, 204), (82, 205), (82, 206), (82, 207), (82, 208), (82, 209), (82, 210), (82, 211), (82, 212), (82, 213), (82, 215), (82, 216), (82, 217), (82, 218), (82, 219), (82, 222), (83, 181), (83, 186), (83, 187), (83, 188), (83, 189), (83, 190), (83, 191), (83, 192), (83, 193), (83, 194), (83, 195), (83, 196), (83, 197), (83, 198), (83, 199), (83, 200), (83, 201), (83, 202), (83, 203), (83, 204), (83, 205), (83, 206), (83, 207), (83, 208), (83, 209), (83, 210), (83, 211), (83, 216), (83, 217), (83, 218), (83, 219), (83, 220), (83, 222), (84, 184), (84, 185), (84, 186), (84, 187), (84, 188), (84, 189), (84, 190), (84, 191), (84, 192), (84, 193), (84, 194), (84, 195), (84, 196), (84, 197), (84, 198), (84, 199), (84, 200), (84, 201), (84, 202), (84, 203), (84, 204), (84, 205), (84, 206), (84, 207), (84, 208), (84, 209), (84, 210), (84, 211), (84, 216), (84, 217), (84, 218), (84, 219), (84, 220), (84, 221), (84, 223), (85, 180), (85, 182), (85, 183), (85, 184), (85, 185), (85, 186), (85, 187), (85, 188), (85, 189), (85, 190), (85, 191), (85, 192), (85, 193), (85, 194), (85, 195), (85, 196), (85, 197), (85, 198), (85, 199), (85, 200), (85, 201), (85, 202), (85, 203), (85, 204), (85, 205), (85, 206), (85, 207), (85, 208), (85, 209), (85, 210), (85, 212), (85, 216), (85, 218), (85, 219), (85, 220), (85, 221), (85, 222), (85, 224), (86, 179), (86, 181), (86, 182), (86, 183), (86, 184), (86, 185), (86, 186), (86, 187), (86, 188), (86, 189), (86, 190), (86, 191), (86, 192), (86, 193), (86, 194), (86, 195), (86, 196), (86, 197), (86, 198), (86, 199), (86, 200), (86, 201), (86, 202), (86, 203), (86, 204), (86, 205), (86, 206), (86, 207), (86, 208), (86, 209), (86, 211), (86, 216), (86, 218), (86, 219), (86, 220), (86, 221), (86, 222), (86, 224), (87, 178), (87, 180), (87, 181), (87, 182), (87, 183), (87, 184), (87, 185), (87, 186), (87, 187), (87, 188), (87, 189), (87, 190), (87, 191), (87, 192), (87, 193), (87, 194), (87, 195), (87, 196), (87, 197), (87, 198), (87, 199), (87, 200), (87, 201), (87, 202), (87, 203), (87, 204), (87, 205), (87, 206), (87, 207), (87, 208), (87, 210), (87, 216), (87, 218), (87, 219), (87, 220), (87, 221), (87, 222), (87, 223), (87, 225), (88, 177), (88, 179), (88, 180), (88, 181), (88, 182), (88, 183), (88, 184), (88, 185), (88, 186), (88, 187), (88, 188), (88, 189), (88, 190), (88, 191), (88, 192), (88, 193), (88, 194), (88, 195), (88, 196), (88, 197), (88, 198), (88, 199), (88, 200), (88, 201), (88, 202), (88, 203), (88, 204), (88, 205), (88, 206), (88, 207), (88, 209), (88, 217), (88, 219), (88, 220), (88, 221), (88, 222), (88, 223), (88, 224), (88, 226), (89, 176), (89, 178), (89, 179), (89, 180), (89, 181), (89, 182), (89, 183), (89, 184), (89, 185), (89, 186), (89, 187), (89, 188), (89, 189), (89, 190), (89, 191), (89, 192), (89, 193), (89, 194), (89, 195), (89, 196), (89, 197), (89, 198), (89, 199), (89, 200), (89, 201), (89, 202), (89, 203), (89, 204), (89, 205), (89, 206), (89, 207), (89, 209), (89, 217), (89, 219), (89, 220), (89, 221), (89, 222), (89, 223), (89, 224), (89, 227), (90, 176), (90, 178), (90, 179), (90, 180), (90, 181), (90, 182), (90, 183), (90, 184), (90, 185), (90, 186), (90, 187), (90, 188), (90, 189), (90, 190), (90, 191), (90, 192), (90, 193), (90, 194), (90, 195), (90, 196), (90, 197), (90, 198), (90, 199), (90, 200), (90, 201), (90, 202), (90, 203), (90, 204), (90, 205), (90, 206), (90, 208), (90, 218), (90, 220), (90, 221), (90, 222), (90, 223), (90, 225), (90, 228), (91, 176), (91, 178), (91, 179), (91, 180), (91, 181), (91, 182), (91, 183), (91, 184), (91, 185), (91, 186), (91, 187), (91, 188), (91, 189), (91, 190), (91, 191), (91, 192), (91, 193), (91, 194), (91, 195), (91, 196), (91, 197), (91, 198), (91, 199), (91, 200), (91, 201), (91, 202), (91, 203), (91, 204), (91, 205), (91, 206), (91, 208), (91, 218), (91, 220), (91, 221), (91, 224), (91, 229), (92, 176), (92, 180), (92, 181), (92, 182), (92, 183), (92, 184), (92, 185), (92, 186), (92, 187), (92, 188), (92, 189), (92, 190), (92, 191), (92, 192), (92, 193), (92, 194), (92, 195), (92, 196), (92, 197), (92, 198), (92, 199), (92, 200), (92, 201), (92, 202), (92, 203), (92, 204), (92, 205), (92, 207), (92, 218), (92, 223), (93, 177), (93, 179), (93, 196), (93, 197), (93, 198), (93, 199), (93, 200), (93, 201), (93, 202), (93, 203), (93, 204), (93, 205), (93, 206), (93, 207), (93, 219), (93, 221), (94, 180), (94, 181), (94, 182), (94, 183), (94, 184), (94, 185), (94, 186), (94, 187), (94, 188), (94, 189), (94, 190), (94, 191), (94, 192), (94, 193), (94, 194), (94, 195), (94, 198), (94, 199), (94, 200), (94, 201), (94, 202), (94, 203), (94, 204), (94, 206), (94, 219), (95, 196), (95, 197), (95, 201), (95, 202), (95, 203), (95, 204), (95, 206), (96, 198), (96, 200), (96, 205), (97, 201), (97, 203), (97, 205), (106, 222), (106, 224), (106, 225), (106, 226), (106, 228), (106, 229), (107, 223), (107, 227), (108, 224), (108, 226), (291, 224), (291, 226), (292, 223), (292, 227), (292, 228), (293, 222), (293, 224), (293, 225), (293, 226), (293, 227), (293, 229), (301, 205), (302, 201), (302, 202), (302, 203), (302, 205), (303, 198), (303, 200), (303, 205), (304, 196), (304, 197), (304, 201), (304, 202), (304, 203), (304, 204), (304, 206), (305, 180), (305, 181), (305, 182), (305, 183), (305, 184), (305, 185), (305, 186), (305, 187), (305, 188), (305, 189), (305, 190), (305, 191), (305, 192), (305, 193), (305, 194), (305, 195), (305, 198), (305, 199), (305, 200), (305, 201), (305, 202), (305, 203), (305, 204), (305, 206), (305, 219), (306, 177), (306, 179), (306, 196), (306, 197), (306, 198), (306, 199), (306, 200), (306, 201), (306, 202), (306, 203), (306, 204), (306, 205), (306, 207), (306, 219), (306, 221), (307, 176), (307, 180), (307, 181), (307, 182), (307, 183), (307, 184), (307, 185), (307, 186), (307, 187), (307, 188), (307, 189), (307, 190), (307, 191), (307, 192), (307, 193), (307, 194), (307, 195), (307, 196), (307, 197), (307, 198), (307, 199), (307, 200), (307, 201), (307, 202), (307, 203), (307, 204), (307, 205), (307, 207), (307, 218), (307, 220), (307, 223), (308, 176), (308, 178), (308, 179), (308, 180), (308, 181), (308, 182), (308, 183), (308, 184), (308, 185), (308, 186), (308, 187), (308, 188), (308, 189), (308, 190), (308, 191), (308, 192), (308, 193), (308, 194), (308, 195), (308, 196), (308, 197), (308, 198), (308, 199), (308, 200), (308, 201), (308, 202), (308, 203), (308, 204), (308, 205), (308, 206), (308, 208), (308, 218), (308, 220), (308, 221), (308, 224), (308, 229), (309, 176), (309, 178), (309, 179), (309, 180), (309, 181), (309, 182), (309, 183), (309, 184), (309, 185), (309, 186), (309, 187), (309, 188), (309, 189), (309, 190), (309, 191), (309, 192), (309, 193), (309, 194), (309, 195), (309, 196), (309, 197), (309, 198), (309, 199), (309, 200), (309, 201), (309, 202), (309, 203), (309, 204), (309, 205), (309, 206), (309, 208), (309, 218), (309, 220), (309, 221), (309, 222), (309, 223), (309, 227), (310, 176), (310, 178), (310, 179), (310, 180), (310, 181), (310, 182), (310, 183), (310, 184), (310, 185), (310, 186), (310, 187), (310, 188), (310, 189), (310, 190), (310, 191), (310, 192), (310, 193), (310, 194), (310, 195), (310, 196), (310, 197), (310, 198), (310, 199), (310, 200), (310, 201), (310, 202), (310, 203), (310, 204), (310, 205), (310, 206), (310, 207), (310, 209), (310, 217), (310, 219), (310, 220), (310, 221), (310, 222), (310, 223), (310, 224), (310, 226), (311, 177), (311, 179), (311, 180), (311, 181), (311, 182), (311, 183), (311, 184), (311, 185), (311, 186), (311, 187), (311, 188), (311, 189), (311, 190), (311, 191), (311, 192), (311, 193), (311, 194), (311, 195), (311, 196), (311, 197), (311, 198), (311, 199), (311, 200), (311, 201), (311, 202), (311, 203), (311, 204), (311, 205), (311, 206), (311, 207), (311, 209), (311, 217), (311, 219), (311, 220), (311, 221), (311, 222), (311, 223), (311, 225), (312, 178), (312, 180), (312, 181), (312, 182), (312, 183), (312, 184), (312, 185), (312, 186), (312, 187), (312, 188), (312, 189), (312, 190), (312, 191), (312, 192), (312, 193), (312, 194), (312, 195), (312, 196), (312, 197), (312, 198), (312, 199), (312, 200), (312, 201), (312, 202), (312, 203), (312, 204), (312, 205), (312, 206), (312, 207), (312, 208), (312, 210), (312, 216), (312, 218), (312, 219), (312, 220), (312, 221), (312, 222), (312, 224), (313, 179), (313, 181), (313, 182), (313, 183), (313, 184), (313, 185), (313, 186), (313, 187), (313, 188), (313, 189), (313, 190), (313, 191), (313, 192), (313, 193), (313, 194), (313, 195), (313, 196), (313, 197), (313, 198), (313, 199), (313, 200), (313, 201), (313, 202), (313, 203), (313, 204), (313, 205), (313, 206), (313, 207), (313, 208), (313, 209), (313, 211), (313, 216), (313, 218), (313, 219), (313, 220), (313, 221), (313, 222), (313, 224), (314, 180), (314, 182), (314, 183), (314, 184), (314, 185), (314, 186), (314, 187), (314, 188), (314, 189), (314, 190), (314, 191), (314, 192), (314, 193), (314, 194), (314, 195), (314, 196), (314, 197), (314, 198), (314, 199), (314, 200), (314, 201), (314, 202), (314, 203), (314, 204), (314, 205), (314, 206), (314, 207), (314, 208), (314, 209), (314, 210), (314, 212), (314, 216), (314, 218), (314, 219), (314, 220), (314, 221), (314, 223), (315, 181), (315, 184), (315, 185), (315, 186), (315, 187), (315, 188), (315, 189), (315, 190), (315, 191), (315, 192), (315, 193), (315, 194), (315, 195), (315, 196), (315, 197), (315, 198), (315, 199), (315, 200), (315, 201), (315, 202), (315, 203), (315, 204), (315, 205), (315, 206), (315, 207), (315, 208), (315, 209), (315, 210), (315, 211), (315, 213), (315, 216), (315, 217), (315, 218), (315, 219), (315, 220), (315, 222), (316, 181), (316, 183), (316, 186), (316, 187), (316, 188), (316, 189), (316, 190), (316, 191), (316, 192), (316, 193), (316, 194), (316, 195), (316, 196), (316, 197), (316, 198), (316, 199), (316, 200), (316, 201), (316, 202), (316, 203), (316, 204), (316, 205), (316, 206), (316, 207), (316, 208), (316, 209), (316, 210), (316, 211), (316, 212), (316, 216), (316, 217), (316, 218), (316, 219), (316, 222), (317, 184), (317, 185), (317, 188), (317, 189), (317, 190), (317, 191), (317, 192), (317, 193), (317, 194), (317, 195), (317, 196), (317, 197), (317, 198), (317, 199), (317, 200), (317, 201), (317, 202), (317, 203), (317, 204), (317, 205), (317, 206), (317, 207), (317, 208), (317, 209), (317, 210), (317, 211), (317, 212), (317, 213), (317, 215), (317, 216), (317, 217), (317, 218), (317, 219), (317, 221), (318, 186), (318, 189), (318, 190), (318, 191), (318, 192), (318, 193), (318, 194), (318, 195), (318, 196), (318, 197), (318, 198), (318, 199), (318, 200), (318, 201), (318, 202), (318, 203), (318, 204), (318, 205), (318, 206), (318, 207), (318, 208), (318, 209), (318, 210), (318, 211), (318, 212), (318, 213), (318, 214), (318, 215), (318, 216), (318, 217), (318, 220), (319, 188), (319, 190), (319, 191), (319, 192), (319, 193), (319, 194), (319, 195), (319, 196), (319, 197), (319, 198), (319, 199), (319, 200), (319, 201), (319, 202), (319, 203), (319, 204), (319, 205), (319, 206), (319, 207), (319, 208), (319, 209), (319, 210), (319, 211), (319, 212), (319, 213), (319, 214), (319, 215), (319, 216), (319, 219), (320, 189), (320, 192), (320, 193), (320, 194), (320, 195), (320, 196), (320, 197), (320, 198), (320, 199), (320, 200), (320, 201), (320, 202), (320, 203), (320, 204), (320, 205), (320, 206), (320, 207), (320, 208), (320, 209), (320, 210), (320, 211), (320, 212), (320, 213), (320, 214), (320, 215), (320, 218), (321, 190), (321, 193), (321, 194), (321, 195), (321, 196), (321, 197), (321, 198), (321, 199), (321, 200), (321, 201), (321, 202), (321, 203), (321, 204), (321, 205), (321, 206), (321, 207), (321, 208), (321, 209), (321, 210), (321, 211), (321, 212), (321, 213), (321, 216), (322, 192), (322, 194), (322, 195), (322, 196), (322, 197), (322, 198), (322, 199), (322, 200), (322, 201), (322, 202), (322, 203), (322, 204), (322, 205), (322, 206), (322, 207), (322, 208), (322, 209), (322, 210), (322, 211), (322, 215), (323, 193), (323, 196), (323, 197), (323, 198), (323, 199), (323, 200), (323, 201), (323, 202), (323, 203), (323, 204), (323, 205), (323, 206), (323, 207), (323, 208), (323, 213), (324, 194), (324, 195), (324, 199), (324, 200), (324, 201), (324, 202), (324, 203), (324, 204), (324, 211), (325, 196), (325, 198), (325, 205), (325, 206), (325, 207), (325, 208), (326, 200), (326, 201), (326, 202), (326, 203), (326, 204), ) coordinates_001D7F = ((189, 183), (189, 184), (189, 185), (189, 186), (189, 187), (189, 188), (189, 189), (189, 190), (189, 191), (189, 192), (189, 193), (189, 194), (190, 178), (190, 179), (190, 180), (190, 181), (190, 182), (190, 195), (190, 196), (191, 175), (191, 177), (191, 182), (191, 183), (191, 184), (191, 185), (191, 186), (191, 187), (191, 188), (191, 189), (191, 190), (191, 191), (191, 192), (191, 193), (191, 194), (191, 197), (191, 198), (192, 163), (192, 164), (192, 165), (192, 166), (192, 167), (192, 168), (192, 169), (192, 170), (192, 171), (192, 172), (192, 173), (192, 174), (192, 178), (192, 179), (192, 180), (192, 181), (192, 182), (192, 183), (192, 184), (192, 185), (192, 186), (192, 187), (192, 188), (192, 189), (192, 190), (192, 191), (192, 192), (192, 193), (192, 194), (192, 195), (192, 196), (192, 200), (192, 201), (193, 161), (193, 162), (193, 175), (193, 176), (193, 177), (193, 178), (193, 179), (193, 180), (193, 181), (193, 182), (193, 183), (193, 184), (193, 185), (193, 186), (193, 187), (193, 188), (193, 189), (193, 190), (193, 191), (193, 192), (193, 193), (193, 194), (193, 195), (193, 196), (193, 197), (193, 198), (193, 199), (193, 202), (193, 203), (193, 204), (193, 206), (194, 159), (194, 160), (194, 163), (194, 164), (194, 165), (194, 166), (194, 167), (194, 168), (194, 169), (194, 170), (194, 171), (194, 172), (194, 173), (194, 174), (194, 175), (194, 176), (194, 177), (194, 178), (194, 179), (194, 180), (194, 181), (194, 182), (194, 183), (194, 184), (194, 185), (194, 186), (194, 187), (194, 188), (194, 189), (194, 190), (194, 191), (194, 192), (194, 193), (194, 194), (194, 195), (194, 196), (194, 197), (194, 198), (194, 199), (194, 200), (194, 201), (194, 206), (195, 157), (195, 158), (195, 161), (195, 162), (195, 163), (195, 164), (195, 165), (195, 166), (195, 167), (195, 168), (195, 169), (195, 170), (195, 171), (195, 172), (195, 173), (195, 174), (195, 175), (195, 176), (195, 177), (195, 178), (195, 179), (195, 180), (195, 181), (195, 182), (195, 183), (195, 184), (195, 185), (195, 186), (195, 187), (195, 188), (195, 189), (195, 190), (195, 191), (195, 192), (195, 193), (195, 194), (195, 195), (195, 196), (195, 197), (195, 198), (195, 199), (195, 200), (195, 201), (195, 202), (195, 203), (195, 206), (196, 155), (196, 156), (196, 159), (196, 160), (196, 161), (196, 162), (196, 163), (196, 164), (196, 165), (196, 166), (196, 167), (196, 168), (196, 169), (196, 170), (196, 171), (196, 172), (196, 173), (196, 174), (196, 175), (196, 176), (196, 177), (196, 178), (196, 179), (196, 180), (196, 181), (196, 182), (196, 183), (196, 184), (196, 185), (196, 186), (196, 187), (196, 188), (196, 189), (196, 190), (196, 191), (196, 192), (196, 193), (196, 194), (196, 195), (196, 196), (196, 204), (196, 205), (197, 154), (197, 157), (197, 158), (197, 159), (197, 160), (197, 161), (197, 162), (197, 163), (197, 164), (197, 165), (197, 166), (197, 167), (197, 168), (197, 169), (197, 170), (197, 171), (197, 172), (197, 173), (197, 174), (197, 175), (197, 176), (197, 177), (197, 178), (197, 179), (197, 180), (197, 181), (197, 182), (197, 183), (197, 184), (197, 185), (197, 186), (197, 187), (197, 188), (197, 189), (197, 190), (197, 191), (197, 192), (197, 193), (197, 194), (197, 195), (197, 197), (197, 198), (197, 199), (197, 200), (197, 201), (197, 202), (198, 154), (198, 156), (198, 157), (198, 158), (198, 159), (198, 160), (198, 161), (198, 162), (198, 163), (198, 164), (198, 165), (198, 166), (198, 167), (198, 168), (198, 169), (198, 170), (198, 171), (198, 172), (198, 173), (198, 174), (198, 175), (198, 176), (198, 177), (198, 178), (198, 179), (198, 180), (198, 181), (198, 182), (198, 183), (198, 184), (198, 185), (198, 186), (198, 187), (198, 188), (198, 189), (198, 190), (198, 191), (198, 192), (198, 193), (198, 194), (198, 195), (198, 196), (199, 154), (199, 156), (199, 157), (199, 158), (199, 159), (199, 160), (199, 161), (199, 162), (199, 163), (199, 164), (199, 165), (199, 166), (199, 167), (199, 168), (199, 169), (199, 170), (199, 171), (199, 172), (199, 173), (199, 174), (199, 175), (199, 176), (199, 177), (199, 178), (199, 179), (199, 180), (199, 181), (199, 182), (199, 183), (199, 184), (199, 185), (199, 186), (199, 187), (199, 188), (199, 189), (199, 190), (199, 191), (199, 192), (199, 193), (199, 195), (200, 154), (200, 156), (200, 157), (200, 158), (200, 159), (200, 160), (200, 161), (200, 162), (200, 163), (200, 164), (200, 165), (200, 166), (200, 167), (200, 168), (200, 169), (200, 170), (200, 171), (200, 172), (200, 173), (200, 174), (200, 175), (200, 176), (200, 177), (200, 178), (200, 179), (200, 180), (200, 181), (200, 182), (200, 183), (200, 184), (200, 185), (200, 186), (200, 187), (200, 188), (200, 189), (200, 190), (200, 191), (200, 192), (200, 193), (200, 194), (200, 195), (201, 154), (201, 156), (201, 157), (201, 158), (201, 159), (201, 160), (201, 161), (201, 162), (201, 163), (201, 164), (201, 165), (201, 166), (201, 167), (201, 168), (201, 169), (201, 170), (201, 171), (201, 172), (201, 173), (201, 174), (201, 175), (201, 176), (201, 177), (201, 178), (201, 179), (201, 180), (201, 181), (201, 182), (201, 183), (201, 184), (201, 185), (201, 186), (201, 187), (201, 188), (201, 189), (201, 190), (201, 191), (201, 192), (201, 193), (201, 194), (201, 195), (201, 196), (201, 197), (201, 198), (201, 199), (201, 200), (202, 154), (202, 158), (202, 159), (202, 160), (202, 161), (202, 162), (202, 163), (202, 164), (202, 165), (202, 166), (202, 167), (202, 168), (202, 169), (202, 170), (202, 171), (202, 172), (202, 173), (202, 174), (202, 175), (202, 176), (202, 177), (202, 178), (202, 179), (202, 180), (202, 181), (202, 182), (202, 183), (202, 184), (202, 185), (202, 186), (202, 187), (202, 188), (202, 189), (202, 190), (202, 191), (202, 192), (202, 193), (202, 194), (202, 195), (202, 201), (202, 203), (203, 156), (203, 160), (203, 161), (203, 162), (203, 163), (203, 164), (203, 165), (203, 166), (203, 167), (203, 168), (203, 169), (203, 170), (203, 171), (203, 172), (203, 173), (203, 174), (203, 175), (203, 176), (203, 177), (203, 178), (203, 179), (203, 180), (203, 181), (203, 182), (203, 183), (203, 184), (203, 185), (203, 186), (203, 187), (203, 188), (203, 189), (203, 190), (203, 191), (203, 192), (203, 193), (203, 194), (203, 195), (203, 196), (203, 197), (203, 198), (203, 199), (203, 200), (203, 205), (204, 158), (204, 162), (204, 163), (204, 164), (204, 165), (204, 166), (204, 167), (204, 168), (204, 169), (204, 170), (204, 171), (204, 172), (204, 173), (204, 174), (204, 175), (204, 176), (204, 177), (204, 178), (204, 179), (204, 180), (204, 181), (204, 182), (204, 183), (204, 184), (204, 185), (204, 186), (204, 187), (204, 188), (204, 189), (204, 190), (204, 191), (204, 192), (204, 193), (204, 194), (204, 195), (204, 196), (204, 197), (204, 198), (204, 199), (204, 200), (204, 201), (204, 202), (204, 203), (204, 206), (205, 160), (205, 163), (205, 164), (205, 165), (205, 166), (205, 167), (205, 168), (205, 169), (205, 170), (205, 171), (205, 172), (205, 173), (205, 174), (205, 175), (205, 176), (205, 177), (205, 178), (205, 179), (205, 180), (205, 181), (205, 182), (205, 183), (205, 184), (205, 185), (205, 186), (205, 187), (205, 188), (205, 189), (205, 190), (205, 191), (205, 192), (205, 193), (205, 194), (205, 195), (205, 196), (205, 197), (205, 198), (205, 199), (205, 200), (205, 201), (205, 206), (206, 162), (206, 175), (206, 176), (206, 177), (206, 178), (206, 179), (206, 180), (206, 181), (206, 182), (206, 183), (206, 184), (206, 185), (206, 186), (206, 187), (206, 188), (206, 189), (206, 190), (206, 191), (206, 192), (206, 193), (206, 194), (206, 195), (206, 196), (206, 197), (206, 198), (206, 202), (206, 203), (206, 204), (207, 164), (207, 165), (207, 166), (207, 167), (207, 168), (207, 169), (207, 170), (207, 171), (207, 172), (207, 173), (207, 174), (207, 178), (207, 179), (207, 180), (207, 181), (207, 182), (207, 183), (207, 184), (207, 185), (207, 186), (207, 187), (207, 188), (207, 189), (207, 190), (207, 191), (207, 192), (207, 193), (207, 194), (207, 195), (207, 196), (207, 200), (207, 201), (208, 175), (208, 176), (208, 177), (208, 183), (208, 184), (208, 185), (208, 186), (208, 187), (208, 188), (208, 189), (208, 190), (208, 191), (208, 192), (208, 193), (208, 197), (208, 198), (209, 179), (209, 180), (209, 181), (209, 182), (209, 196), (210, 183), (210, 184), (210, 185), (210, 186), (210, 187), (210, 188), (210, 189), (210, 190), (210, 191), (210, 192), (210, 193), ) coordinates_7F002B = ((65, 268), (65, 270), (66, 267), (66, 272), (67, 267), (67, 268), (67, 269), (67, 270), (67, 274), (68, 265), (68, 267), (68, 268), (68, 269), (68, 270), (68, 271), (68, 272), (68, 275), (69, 261), (69, 262), (69, 263), (69, 264), (69, 267), (69, 268), (69, 269), (69, 270), (69, 271), (69, 272), (69, 273), (69, 274), (69, 277), (70, 257), (70, 259), (70, 260), (70, 265), (70, 266), (70, 267), (70, 268), (70, 269), (70, 270), (70, 271), (70, 272), (70, 273), (70, 274), (70, 275), (70, 278), (71, 255), (71, 261), (71, 262), (71, 263), (71, 264), (71, 265), (71, 266), (71, 267), (71, 268), (71, 269), (71, 270), (71, 271), (71, 272), (71, 273), (71, 274), (71, 275), (71, 276), (71, 279), (72, 254), (72, 257), (72, 258), (72, 259), (72, 260), (72, 261), (72, 262), (72, 263), (72, 264), (72, 265), (72, 266), (72, 267), (72, 268), (72, 269), (72, 270), (72, 271), (72, 272), (72, 273), (72, 274), (72, 275), (72, 276), (72, 277), (72, 278), (72, 280), (73, 254), (73, 256), (73, 257), (73, 258), (73, 259), (73, 260), (73, 261), (73, 262), (73, 263), (73, 264), (73, 265), (73, 266), (73, 267), (73, 268), (73, 269), (73, 270), (73, 271), (73, 272), (73, 273), (73, 274), (73, 275), (73, 276), (73, 277), (73, 278), (73, 279), (73, 281), (74, 253), (74, 255), (74, 256), (74, 257), (74, 258), (74, 259), (74, 260), (74, 261), (74, 262), (74, 263), (74, 264), (74, 265), (74, 266), (74, 267), (74, 268), (74, 269), (74, 270), (74, 271), (74, 272), (74, 273), (74, 274), (74, 275), (74, 276), (74, 277), (74, 278), (74, 279), (74, 280), (74, 282), (75, 253), (75, 255), (75, 256), (75, 257), (75, 258), (75, 259), (75, 260), (75, 261), (75, 262), (75, 263), (75, 264), (75, 265), (75, 266), (75, 267), (75, 268), (75, 269), (75, 270), (75, 271), (75, 272), (75, 273), (75, 274), (75, 275), (75, 276), (75, 277), (75, 278), (75, 279), (75, 280), (75, 281), (75, 283), (76, 253), (76, 255), (76, 256), (76, 257), (76, 258), (76, 259), (76, 260), (76, 261), (76, 262), (76, 263), (76, 264), (76, 265), (76, 266), (76, 267), (76, 268), (76, 269), (76, 270), (76, 271), (76, 272), (76, 273), (76, 274), (76, 275), (76, 276), (76, 277), (76, 278), (76, 279), (76, 280), (76, 281), (76, 282), (76, 284), (77, 253), (77, 255), (77, 256), (77, 257), (77, 258), (77, 259), (77, 260), (77, 261), (77, 262), (77, 263), (77, 264), (77, 265), (77, 266), (77, 267), (77, 268), (77, 269), (77, 270), (77, 271), (77, 272), (77, 273), (77, 274), (77, 275), (77, 276), (77, 277), (77, 278), (77, 279), (77, 280), (77, 281), (77, 282), (77, 283), (77, 285), (78, 239), (78, 240), (78, 253), (78, 256), (78, 257), (78, 258), (78, 259), (78, 260), (78, 261), (78, 262), (78, 263), (78, 264), (78, 265), (78, 266), (78, 267), (78, 268), (78, 269), (78, 270), (78, 271), (78, 272), (78, 273), (78, 274), (78, 275), (78, 276), (78, 277), (78, 278), (78, 279), (78, 280), (78, 281), (78, 282), (78, 283), (78, 284), (78, 286), (79, 238), (79, 242), (79, 254), (79, 255), (79, 259), (79, 260), (79, 261), (79, 262), (79, 263), (79, 264), (79, 265), (79, 266), (79, 267), (79, 268), (79, 269), (79, 270), (79, 271), (79, 272), (79, 273), (79, 274), (79, 275), (79, 276), (79, 277), (79, 278), (79, 279), (79, 280), (79, 281), (79, 282), (79, 283), (79, 284), (79, 285), (79, 287), (80, 237), (80, 239), (80, 240), (80, 243), (80, 256), (80, 258), (80, 262), (80, 263), (80, 264), (80, 265), (80, 266), (80, 267), (80, 268), (80, 269), (80, 270), (80, 271), (80, 272), (80, 273), (80, 274), (80, 275), (80, 276), (80, 277), (80, 278), (80, 279), (80, 280), (80, 281), (80, 282), (80, 283), (80, 284), (80, 285), (80, 286), (80, 288), (81, 236), (81, 238), (81, 239), (81, 240), (81, 241), (81, 244), (81, 259), (81, 261), (81, 265), (81, 266), (81, 267), (81, 268), (81, 269), (81, 270), (81, 271), (81, 272), (81, 273), (81, 274), (81, 275), (81, 276), (81, 277), (81, 278), (81, 279), (81, 280), (81, 281), (81, 282), (81, 283), (81, 284), (81, 285), (81, 286), (81, 288), (82, 235), (82, 237), (82, 238), (82, 239), (82, 240), (82, 241), (82, 242), (82, 245), (82, 263), (82, 264), (82, 267), (82, 268), (82, 269), (82, 270), (82, 271), (82, 272), (82, 273), (82, 274), (82, 275), (82, 276), (82, 277), (82, 278), (82, 279), (82, 280), (82, 281), (82, 282), (82, 283), (82, 284), (82, 285), (82, 286), (82, 287), (82, 289), (83, 235), (83, 237), (83, 238), (83, 239), (83, 240), (83, 241), (83, 242), (83, 243), (83, 246), (83, 265), (83, 269), (83, 270), (83, 271), (83, 272), (83, 273), (83, 274), (83, 275), (83, 276), (83, 277), (83, 278), (83, 279), (83, 280), (83, 281), (83, 282), (83, 283), (83, 284), (83, 285), (83, 286), (83, 287), (83, 288), (83, 290), (84, 234), (84, 236), (84, 237), (84, 238), (84, 239), (84, 240), (84, 241), (84, 242), (84, 243), (84, 244), (84, 267), (84, 270), (84, 271), (84, 272), (84, 273), (84, 274), (84, 275), (84, 276), (84, 277), (84, 278), (84, 279), (84, 280), (84, 281), (84, 282), (84, 283), (84, 284), (84, 285), (84, 286), (84, 287), (84, 288), (84, 290), (85, 235), (85, 236), (85, 237), (85, 238), (85, 239), (85, 240), (85, 241), (85, 242), (85, 243), (85, 244), (85, 245), (85, 269), (85, 272), (85, 273), (85, 274), (85, 275), (85, 276), (85, 277), (85, 278), (85, 279), (85, 280), (85, 281), (85, 282), (85, 283), (85, 284), (85, 285), (85, 286), (85, 287), (85, 288), (85, 289), (85, 291), (86, 230), (86, 234), (86, 235), (86, 236), (86, 237), (86, 238), (86, 239), (86, 240), (86, 241), (86, 242), (86, 243), (86, 244), (86, 245), (86, 246), (86, 248), (86, 270), (86, 273), (86, 274), (86, 275), (86, 276), (86, 277), (86, 278), (86, 279), (86, 280), (86, 281), (86, 282), (86, 283), (86, 284), (86, 285), (86, 286), (86, 287), (86, 288), (86, 289), (86, 290), (86, 292), (87, 230), (87, 232), (87, 233), (87, 234), (87, 235), (87, 236), (87, 237), (87, 238), (87, 239), (87, 240), (87, 241), (87, 242), (87, 243), (87, 244), (87, 245), (87, 246), (87, 247), (87, 249), (87, 274), (87, 275), (87, 276), (87, 277), (87, 278), (87, 279), (87, 280), (87, 281), (87, 282), (87, 283), (87, 284), (87, 285), (87, 286), (87, 287), (87, 288), (87, 289), (87, 290), (87, 292), (88, 231), (88, 233), (88, 234), (88, 235), (88, 236), (88, 237), (88, 238), (88, 239), (88, 240), (88, 241), (88, 242), (88, 243), (88, 244), (88, 245), (88, 246), (88, 247), (88, 248), (88, 250), (88, 273), (88, 275), (88, 276), (88, 277), (88, 278), (88, 279), (88, 280), (88, 281), (88, 282), (88, 283), (88, 284), (88, 285), (88, 286), (88, 287), (88, 288), (88, 289), (88, 290), (88, 291), (88, 293), (89, 232), (89, 235), (89, 236), (89, 237), (89, 238), (89, 239), (89, 240), (89, 241), (89, 242), (89, 243), (89, 244), (89, 245), (89, 246), (89, 247), (89, 248), (89, 249), (89, 251), (89, 274), (89, 277), (89, 278), (89, 279), (89, 280), (89, 281), (89, 282), (89, 283), (89, 284), (89, 285), (89, 286), (89, 287), (89, 288), (89, 289), (89, 290), (89, 291), (89, 293), (90, 233), (90, 236), (90, 237), (90, 238), (90, 239), (90, 240), (90, 241), (90, 242), (90, 243), (90, 244), (90, 245), (90, 246), (90, 247), (90, 248), (90, 249), (90, 250), (90, 252), (90, 275), (90, 278), (90, 279), (90, 280), (90, 281), (90, 282), (90, 283), (90, 284), (90, 285), (90, 286), (90, 287), (90, 288), (90, 289), (90, 290), (90, 291), (90, 293), (91, 235), (91, 238), (91, 239), (91, 240), (91, 241), (91, 242), (91, 243), (91, 244), (91, 245), (91, 246), (91, 247), (91, 248), (91, 249), (91, 250), (91, 251), (91, 253), (91, 277), (91, 279), (91, 280), (91, 281), (91, 282), (91, 283), (91, 284), (91, 285), (91, 286), (91, 287), (91, 288), (91, 289), (91, 290), (91, 291), (91, 292), (91, 294), (92, 236), (92, 240), (92, 241), (92, 242), (92, 243), (92, 244), (92, 245), (92, 246), (92, 247), (92, 248), (92, 249), (92, 250), (92, 251), (92, 253), (92, 278), (92, 280), (92, 281), (92, 282), (92, 283), (92, 284), (92, 285), (92, 286), (92, 287), (92, 288), (92, 289), (92, 290), (92, 291), (92, 292), (92, 294), (93, 238), (93, 241), (93, 242), (93, 243), (93, 244), (93, 245), (93, 246), (93, 247), (93, 248), (93, 249), (93, 250), (93, 252), (93, 279), (93, 281), (93, 282), (93, 283), (93, 284), (93, 285), (93, 286), (93, 287), (93, 288), (93, 289), (93, 290), (93, 291), (93, 292), (93, 294), (94, 240), (94, 242), (94, 243), (94, 244), (94, 245), (94, 246), (94, 247), (94, 248), (94, 249), (94, 251), (94, 280), (94, 282), (94, 283), (94, 284), (94, 285), (94, 286), (94, 287), (94, 288), (94, 289), (94, 290), (94, 291), (94, 293), (95, 241), (95, 243), (95, 244), (95, 245), (95, 246), (95, 247), (95, 248), (95, 250), (95, 281), (95, 283), (95, 284), (95, 285), (95, 286), (95, 287), (95, 288), (95, 289), (95, 290), (95, 293), (96, 242), (96, 244), (96, 245), (96, 246), (96, 247), (96, 249), (96, 282), (96, 284), (96, 285), (96, 286), (96, 287), (96, 288), (96, 289), (96, 290), (96, 292), (97, 243), (97, 248), (97, 284), (97, 285), (97, 286), (97, 287), (97, 288), (97, 291), (98, 244), (98, 247), (98, 283), (98, 285), (98, 286), (98, 287), (98, 290), (99, 284), (99, 286), (99, 289), (100, 284), (100, 287), (101, 285), (101, 286), (298, 285), (298, 286), (299, 284), (299, 287), (300, 244), (300, 284), (300, 286), (300, 289), (301, 244), (301, 247), (301, 283), (301, 285), (301, 286), (301, 287), (301, 290), (302, 243), (302, 282), (302, 284), (302, 285), (302, 286), (302, 287), (302, 288), (302, 291), (303, 242), (303, 244), (303, 245), (303, 246), (303, 247), (303, 249), (303, 282), (303, 284), (303, 285), (303, 286), (303, 287), (303, 288), (303, 289), (303, 290), (303, 292), (304, 241), (304, 243), (304, 244), (304, 245), (304, 246), (304, 247), (304, 248), (304, 250), (304, 281), (304, 283), (304, 284), (304, 285), (304, 286), (304, 287), (304, 288), (304, 289), (304, 290), (304, 291), (304, 293), (305, 242), (305, 243), (305, 244), (305, 245), (305, 246), (305, 247), (305, 248), (305, 249), (305, 251), (305, 280), (305, 282), (305, 283), (305, 284), (305, 285), (305, 286), (305, 287), (305, 288), (305, 289), (305, 290), (305, 291), (305, 293), (306, 238), (306, 241), (306, 242), (306, 243), (306, 244), (306, 245), (306, 246), (306, 247), (306, 248), (306, 249), (306, 250), (306, 252), (306, 279), (306, 281), (306, 282), (306, 283), (306, 284), (306, 285), (306, 286), (306, 287), (306, 288), (306, 289), (306, 290), (306, 291), (306, 292), (306, 294), (307, 236), (307, 240), (307, 241), (307, 242), (307, 243), (307, 244), (307, 245), (307, 246), (307, 247), (307, 248), (307, 249), (307, 250), (307, 251), (307, 253), (307, 278), (307, 280), (307, 281), (307, 282), (307, 283), (307, 284), (307, 285), (307, 286), (307, 287), (307, 288), (307, 289), (307, 290), (307, 291), (307, 292), (307, 294), (308, 235), (308, 238), (308, 239), (308, 240), (308, 241), (308, 242), (308, 243), (308, 244), (308, 245), (308, 246), (308, 247), (308, 248), (308, 249), (308, 250), (308, 251), (308, 253), (308, 279), (308, 280), (308, 281), (308, 282), (308, 283), (308, 284), (308, 285), (308, 286), (308, 287), (308, 288), (308, 289), (308, 290), (308, 291), (308, 292), (308, 294), (309, 233), (309, 236), (309, 237), (309, 238), (309, 239), (309, 240), (309, 241), (309, 242), (309, 243), (309, 244), (309, 245), (309, 246), (309, 247), (309, 248), (309, 249), (309, 250), (309, 252), (309, 275), (309, 278), (309, 279), (309, 280), (309, 281), (309, 282), (309, 283), (309, 284), (309, 285), (309, 286), (309, 287), (309, 288), (309, 289), (309, 290), (309, 291), (309, 293), (310, 232), (310, 235), (310, 236), (310, 237), (310, 238), (310, 239), (310, 240), (310, 241), (310, 242), (310, 243), (310, 244), (310, 245), (310, 246), (310, 247), (310, 248), (310, 249), (310, 251), (310, 274), (310, 277), (310, 278), (310, 279), (310, 280), (310, 281), (310, 282), (310, 283), (310, 284), (310, 285), (310, 286), (310, 287), (310, 288), (310, 289), (310, 290), (310, 291), (310, 293), (311, 231), (311, 233), (311, 234), (311, 235), (311, 236), (311, 237), (311, 238), (311, 239), (311, 240), (311, 241), (311, 242), (311, 243), (311, 244), (311, 245), (311, 246), (311, 247), (311, 248), (311, 250), (311, 273), (311, 275), (311, 276), (311, 277), (311, 278), (311, 279), (311, 280), (311, 281), (311, 282), (311, 283), (311, 284), (311, 285), (311, 286), (311, 287), (311, 288), (311, 289), (311, 290), (311, 291), (311, 293), (312, 230), (312, 232), (312, 233), (312, 234), (312, 235), (312, 236), (312, 237), (312, 238), (312, 239), (312, 240), (312, 241), (312, 242), (312, 243), (312, 244), (312, 245), (312, 246), (312, 247), (312, 249), (312, 271), (312, 274), (312, 275), (312, 276), (312, 277), (312, 278), (312, 279), (312, 280), (312, 281), (312, 282), (312, 283), (312, 284), (312, 285), (312, 286), (312, 287), (312, 288), (312, 289), (312, 290), (312, 292), (313, 230), (313, 234), (313, 235), (313, 236), (313, 237), (313, 238), (313, 239), (313, 240), (313, 241), (313, 242), (313, 243), (313, 244), (313, 245), (313, 246), (313, 248), (313, 270), (313, 273), (313, 274), (313, 275), (313, 276), (313, 277), (313, 278), (313, 279), (313, 280), (313, 281), (313, 282), (313, 283), (313, 284), (313, 285), (313, 286), (313, 287), (313, 288), (313, 289), (313, 290), (313, 292), (314, 235), (314, 236), (314, 237), (314, 238), (314, 239), (314, 240), (314, 241), (314, 242), (314, 243), (314, 244), (314, 245), (314, 247), (314, 268), (314, 271), (314, 272), (314, 273), (314, 274), (314, 275), (314, 276), (314, 277), (314, 278), (314, 279), (314, 280), (314, 281), (314, 282), (314, 283), (314, 284), (314, 285), (314, 286), (314, 287), (314, 288), (314, 289), (314, 291), (315, 234), (315, 236), (315, 237), (315, 238), (315, 239), (315, 240), (315, 241), (315, 242), (315, 243), (315, 244), (315, 267), (315, 270), (315, 271), (315, 272), (315, 273), (315, 274), (315, 275), (315, 276), (315, 277), (315, 278), (315, 279), (315, 280), (315, 281), (315, 282), (315, 283), (315, 284), (315, 285), (315, 286), (315, 287), (315, 288), (315, 290), (316, 235), (316, 237), (316, 238), (316, 239), (316, 240), (316, 241), (316, 242), (316, 243), (316, 265), (316, 268), (316, 269), (316, 270), (316, 271), (316, 272), (316, 273), (316, 274), (316, 275), (316, 276), (316, 277), (316, 278), (316, 279), (316, 280), (316, 281), (316, 282), (316, 283), (316, 284), (316, 285), (316, 286), (316, 287), (316, 288), (316, 290), (317, 235), (317, 237), (317, 238), (317, 239), (317, 240), (317, 241), (317, 242), (317, 245), (317, 262), (317, 263), (317, 264), (317, 267), (317, 268), (317, 269), (317, 270), (317, 271), (317, 272), (317, 273), (317, 274), (317, 275), (317, 276), (317, 277), (317, 278), (317, 279), (317, 280), (317, 281), (317, 282), (317, 283), (317, 284), (317, 285), (317, 286), (317, 287), (317, 289), (318, 236), (318, 238), (318, 239), (318, 240), (318, 241), (318, 244), (318, 259), (318, 261), (318, 265), (318, 266), (318, 267), (318, 268), (318, 269), (318, 270), (318, 271), (318, 272), (318, 273), (318, 274), (318, 275), (318, 276), (318, 277), (318, 278), (318, 279), (318, 280), (318, 281), (318, 282), (318, 283), (318, 284), (318, 285), (318, 286), (318, 288), (319, 237), (319, 239), (319, 240), (319, 243), (319, 256), (319, 258), (319, 262), (319, 263), (319, 264), (319, 265), (319, 266), (319, 267), (319, 268), (319, 269), (319, 270), (319, 271), (319, 272), (319, 273), (319, 274), (319, 275), (319, 276), (319, 277), (319, 278), (319, 279), (319, 280), (319, 281), (319, 282), (319, 283), (319, 284), (319, 285), (320, 238), (320, 254), (320, 259), (320, 260), (320, 261), (320, 262), (320, 263), (320, 264), (320, 265), (320, 266), (320, 267), (320, 268), (320, 269), (320, 270), (320, 271), (320, 272), (320, 273), (320, 274), (320, 275), (320, 276), (320, 277), (320, 278), (320, 279), (320, 280), (320, 281), (320, 282), (320, 283), (320, 284), (320, 285), (320, 287), (321, 239), (321, 240), (321, 253), (321, 256), (321, 257), (321, 258), (321, 259), (321, 260), (321, 261), (321, 262), (321, 263), (321, 264), (321, 265), (321, 266), (321, 267), (321, 268), (321, 269), (321, 270), (321, 271), (321, 272), (321, 273), (321, 274), (321, 275), (321, 276), (321, 277), (321, 278), (321, 279), (321, 280), (321, 281), (321, 282), (321, 283), (321, 284), (321, 286), (322, 253), (322, 255), (322, 256), (322, 257), (322, 258), (322, 259), (322, 260), (322, 261), (322, 262), (322, 263), (322, 264), (322, 265), (322, 266), (322, 267), (322, 268), (322, 269), (322, 270), (322, 271), (322, 272), (322, 273), (322, 274), (322, 275), (322, 276), (322, 277), (322, 278), (322, 279), (322, 280), (322, 281), (322, 282), (322, 283), (322, 285), (323, 253), (323, 255), (323, 256), (323, 257), (323, 258), (323, 259), (323, 260), (323, 261), (323, 262), (323, 263), (323, 264), (323, 265), (323, 266), (323, 267), (323, 268), (323, 269), (323, 270), (323, 271), (323, 272), (323, 273), (323, 274), (323, 275), (323, 276), (323, 277), (323, 278), (323, 279), (323, 280), (323, 281), (323, 282), (323, 284), (324, 253), (324, 255), (324, 256), (324, 257), (324, 258), (324, 259), (324, 260), (324, 261), (324, 262), (324, 263), (324, 264), (324, 265), (324, 266), (324, 267), (324, 268), (324, 269), (324, 270), (324, 271), (324, 272), (324, 273), (324, 274), (324, 275), (324, 276), (324, 277), (324, 278), (324, 279), (324, 280), (324, 281), (324, 283), (325, 253), (325, 255), (325, 256), (325, 257), (325, 258), (325, 259), (325, 260), (325, 261), (325, 262), (325, 263), (325, 264), (325, 265), (325, 266), (325, 267), (325, 268), (325, 269), (325, 270), (325, 271), (325, 272), (325, 273), (325, 274), (325, 275), (325, 276), (325, 277), (325, 278), (325, 279), (325, 280), (325, 282), (326, 254), (326, 256), (326, 257), (326, 258), (326, 259), (326, 260), (326, 261), (326, 262), (326, 263), (326, 264), (326, 265), (326, 266), (326, 267), (326, 268), (326, 269), (326, 270), (326, 271), (326, 272), (326, 273), (326, 274), (326, 275), (326, 276), (326, 277), (326, 278), (326, 279), (326, 281), (327, 254), (327, 257), (327, 258), (327, 259), (327, 260), (327, 261), (327, 262), (327, 263), (327, 264), (327, 265), (327, 266), (327, 267), (327, 268), (327, 269), (327, 270), (327, 271), (327, 272), (327, 273), (327, 274), (327, 275), (327, 276), (327, 277), (327, 278), (327, 280), (328, 255), (328, 261), (328, 262), (328, 263), (328, 264), (328, 265), (328, 266), (328, 267), (328, 268), (328, 269), (328, 270), (328, 271), (328, 272), (328, 273), (328, 274), (328, 275), (328, 276), (328, 279), (329, 257), (329, 259), (329, 260), (329, 265), (329, 266), (329, 267), (329, 268), (329, 269), (329, 270), (329, 271), (329, 272), (329, 273), (329, 274), (329, 275), (329, 278), (330, 261), (330, 262), (330, 263), (330, 264), (330, 267), (330, 268), (330, 269), (330, 270), (330, 271), (330, 272), (330, 273), (330, 274), (330, 276), (331, 265), (331, 267), (331, 268), (331, 269), (331, 270), (331, 271), (331, 272), (331, 275), (332, 267), (332, 269), (332, 270), (332, 274), (333, 267), (333, 272), (334, 268), (334, 270), ) coordinates_C3FF00 = ((94, 296), (95, 295), (95, 297), (96, 294), (96, 297), (97, 293), (97, 295), (97, 296), (97, 298), (98, 292), (98, 294), (98, 295), (98, 296), (98, 298), (99, 291), (99, 293), (99, 294), (99, 295), (99, 296), (99, 297), (99, 299), (100, 290), (100, 292), (100, 293), (100, 294), (100, 295), (100, 296), (100, 297), (100, 299), (101, 289), (101, 291), (101, 292), (101, 293), (101, 294), (101, 295), (101, 296), (101, 297), (101, 299), (102, 287), (102, 290), (102, 291), (102, 292), (102, 293), (102, 294), (102, 295), (102, 296), (102, 297), (102, 298), (102, 300), (103, 285), (103, 286), (103, 289), (103, 290), (103, 291), (103, 292), (103, 293), (103, 294), (103, 295), (103, 296), (103, 297), (103, 298), (103, 300), (104, 268), (104, 283), (104, 287), (104, 288), (104, 289), (104, 290), (104, 291), (104, 292), (104, 293), (104, 294), (104, 295), (104, 296), (104, 297), (104, 298), (104, 299), (104, 301), (105, 268), (105, 270), (105, 271), (105, 282), (105, 285), (105, 286), (105, 287), (105, 288), (105, 289), (105, 290), (105, 291), (105, 292), (105, 293), (105, 294), (105, 295), (105, 296), (105, 297), (105, 298), (105, 299), (105, 300), (105, 302), (106, 268), (106, 272), (106, 282), (106, 284), (106, 285), (106, 286), (106, 287), (106, 288), (106, 289), (106, 290), (106, 291), (106, 292), (106, 293), (106, 294), (106, 295), (106, 296), (106, 297), (106, 298), (106, 299), (106, 300), (106, 301), (106, 303), (107, 269), (107, 271), (107, 274), (107, 282), (107, 284), (107, 285), (107, 286), (107, 287), (107, 288), (107, 289), (107, 290), (107, 291), (107, 292), (107, 293), (107, 294), (107, 295), (107, 296), (107, 297), (107, 298), (107, 299), (107, 300), (107, 301), (107, 303), (108, 269), (108, 271), (108, 272), (108, 273), (108, 276), (108, 282), (108, 284), (108, 285), (108, 286), (108, 287), (108, 288), (108, 289), (108, 290), (108, 291), (108, 292), (108, 293), (108, 294), (108, 295), (108, 296), (108, 297), (108, 298), (108, 299), (108, 300), (108, 301), (108, 302), (108, 304), (109, 269), (109, 271), (109, 272), (109, 273), (109, 274), (109, 277), (109, 278), (109, 281), (109, 283), (109, 284), (109, 285), (109, 286), (109, 287), (109, 288), (109, 289), (109, 290), (109, 291), (109, 292), (109, 293), (109, 294), (109, 295), (109, 296), (109, 297), (109, 298), (109, 299), (109, 300), (109, 301), (109, 302), (109, 303), (109, 305), (110, 269), (110, 271), (110, 272), (110, 273), (110, 274), (110, 275), (110, 276), (110, 279), (110, 282), (110, 283), (110, 284), (110, 285), (110, 286), (110, 287), (110, 288), (110, 289), (110, 290), (110, 291), (110, 292), (110, 293), (110, 294), (110, 295), (110, 296), (110, 297), (110, 298), (110, 299), (110, 300), (110, 301), (110, 302), (110, 303), (110, 305), (111, 270), (111, 272), (111, 273), (111, 274), (111, 275), (111, 276), (111, 277), (111, 278), (111, 281), (111, 282), (111, 283), (111, 284), (111, 285), (111, 286), (111, 287), (111, 288), (111, 289), (111, 290), (111, 291), (111, 292), (111, 293), (111, 294), (111, 295), (111, 296), (111, 297), (111, 298), (111, 299), (111, 300), (111, 301), (111, 302), (111, 303), (111, 304), (111, 306), (112, 270), (112, 272), (112, 273), (112, 274), (112, 275), (112, 276), (112, 277), (112, 278), (112, 279), (112, 280), (112, 281), (112, 282), (112, 283), (112, 284), (112, 285), (112, 286), (112, 287), (112, 288), (112, 289), (112, 290), (112, 291), (112, 292), (112, 293), (112, 294), (112, 295), (112, 296), (112, 297), (112, 298), (112, 299), (112, 300), (112, 301), (112, 302), (112, 303), (112, 304), (112, 306), (113, 270), (113, 272), (113, 273), (113, 274), (113, 275), (113, 276), (113, 277), (113, 278), (113, 279), (113, 280), (113, 281), (113, 282), (113, 283), (113, 284), (113, 285), (113, 286), (113, 287), (113, 288), (113, 289), (113, 290), (113, 291), (113, 292), (113, 293), (113, 294), (113, 295), (113, 296), (113, 297), (113, 298), (113, 299), (113, 300), (113, 301), (113, 302), (113, 303), (113, 304), (113, 306), (114, 270), (114, 272), (114, 273), (114, 274), (114, 275), (114, 276), (114, 277), (114, 278), (114, 279), (114, 280), (114, 281), (114, 282), (114, 283), (114, 284), (114, 285), (114, 286), (114, 287), (114, 288), (114, 289), (114, 290), (114, 291), (114, 292), (114, 293), (114, 294), (114, 295), (114, 296), (114, 297), (114, 298), (114, 299), (114, 300), (114, 301), (114, 302), (114, 303), (114, 304), (114, 306), (115, 270), (115, 272), (115, 273), (115, 274), (115, 275), (115, 276), (115, 277), (115, 278), (115, 279), (115, 280), (115, 281), (115, 282), (115, 283), (115, 284), (115, 285), (115, 286), (115, 287), (115, 288), (115, 289), (115, 290), (115, 291), (115, 292), (115, 293), (115, 294), (115, 295), (115, 296), (115, 297), (115, 298), (115, 299), (115, 300), (115, 301), (115, 302), (115, 303), (115, 304), (115, 306), (116, 269), (116, 271), (116, 272), (116, 273), (116, 274), (116, 275), (116, 276), (116, 277), (116, 278), (116, 279), (116, 280), (116, 281), (116, 282), (116, 283), (116, 284), (116, 285), (116, 286), (116, 287), (116, 288), (116, 289), (116, 290), (116, 291), (116, 292), (116, 293), (116, 294), (116, 295), (116, 296), (116, 297), (116, 298), (116, 299), (116, 300), (116, 301), (116, 302), (116, 303), (116, 304), (116, 305), (116, 306), (116, 307), (117, 265), (117, 266), (117, 269), (117, 271), (117, 272), (117, 273), (117, 274), (117, 275), (117, 276), (117, 277), (117, 278), (117, 279), (117, 280), (117, 281), (117, 282), (117, 283), (117, 284), (117, 285), (117, 286), (117, 287), (117, 288), (117, 289), (117, 290), (117, 291), (117, 292), (117, 293), (117, 294), (117, 295), (117, 296), (117, 297), (117, 298), (117, 299), (117, 300), (117, 301), (117, 302), (117, 303), (117, 304), (117, 305), (117, 307), (118, 264), (118, 269), (118, 270), (118, 271), (118, 272), (118, 273), (118, 274), (118, 275), (118, 276), (118, 277), (118, 278), (118, 279), (118, 280), (118, 281), (118, 282), (118, 283), (118, 284), (118, 285), (118, 286), (118, 287), (118, 288), (118, 289), (118, 290), (118, 291), (118, 292), (118, 293), (118, 294), (118, 295), (118, 296), (118, 297), (118, 298), (118, 299), (118, 300), (118, 301), (118, 302), (118, 303), (118, 304), (118, 305), (118, 307), (119, 264), (119, 266), (119, 269), (119, 270), (119, 271), (119, 272), (119, 273), (119, 274), (119, 275), (119, 276), (119, 277), (119, 278), (119, 279), (119, 280), (119, 281), (119, 282), (119, 283), (119, 284), (119, 285), (119, 286), (119, 287), (119, 288), (119, 289), (119, 290), (119, 291), (119, 292), (119, 293), (119, 294), (119, 295), (119, 296), (119, 297), (119, 298), (119, 299), (119, 300), (119, 301), (119, 302), (119, 303), (119, 304), (119, 305), (119, 307), (120, 264), (120, 266), (120, 267), (120, 268), (120, 269), (120, 270), (120, 271), (120, 272), (120, 273), (120, 274), (120, 275), (120, 276), (120, 277), (120, 278), (120, 279), (120, 280), (120, 281), (120, 282), (120, 283), (120, 284), (120, 285), (120, 286), (120, 287), (120, 288), (120, 289), (120, 290), (120, 291), (120, 292), (120, 293), (120, 294), (120, 295), (120, 296), (120, 297), (120, 298), (120, 299), (120, 300), (120, 301), (120, 302), (120, 303), (120, 304), (120, 305), (120, 307), (121, 263), (121, 264), (121, 265), (121, 266), (121, 267), (121, 268), (121, 269), (121, 270), (121, 271), (121, 272), (121, 273), (121, 274), (121, 275), (121, 276), (121, 277), (121, 278), (121, 279), (121, 280), (121, 281), (121, 282), (121, 283), (121, 284), (121, 285), (121, 286), (121, 287), (121, 288), (121, 289), (121, 290), (121, 291), (121, 292), (121, 293), (121, 294), (121, 295), (121, 296), (121, 297), (121, 298), (121, 299), (121, 300), (121, 301), (121, 302), (121, 303), (121, 304), (121, 305), (121, 306), (121, 307), (122, 263), (122, 265), (122, 266), (122, 267), (122, 268), (122, 269), (122, 270), (122, 271), (122, 272), (122, 273), (122, 274), (122, 275), (122, 276), (122, 277), (122, 278), (122, 279), (122, 280), (122, 281), (122, 282), (122, 283), (122, 284), (122, 285), (122, 286), (122, 287), (122, 288), (122, 289), (122, 290), (122, 291), (122, 292), (122, 293), (122, 294), (122, 295), (122, 296), (122, 297), (122, 298), (122, 299), (122, 300), (122, 301), (122, 302), (122, 303), (122, 304), (122, 306), (123, 263), (123, 265), (123, 266), (123, 267), (123, 268), (123, 269), (123, 270), (123, 271), (123, 272), (123, 273), (123, 274), (123, 275), (123, 276), (123, 277), (123, 278), (123, 279), (123, 280), (123, 281), (123, 282), (123, 283), (123, 284), (123, 285), (123, 286), (123, 287), (123, 288), (123, 289), (123, 290), (123, 291), (123, 292), (123, 293), (123, 294), (123, 295), (123, 296), (123, 297), (123, 298), (123, 299), (123, 300), (123, 301), (123, 302), (123, 303), (123, 304), (123, 306), (124, 263), (124, 265), (124, 266), (124, 267), (124, 268), (124, 269), (124, 270), (124, 271), (124, 272), (124, 273), (124, 274), (124, 275), (124, 276), (124, 277), (124, 278), (124, 279), (124, 280), (124, 281), (124, 282), (124, 283), (124, 284), (124, 285), (124, 286), (124, 287), (124, 288), (124, 289), (124, 290), (124, 291), (124, 292), (124, 293), (124, 294), (124, 295), (124, 296), (124, 297), (124, 298), (124, 299), (124, 300), (124, 301), (124, 302), (124, 303), (124, 304), (124, 306), (125, 263), (125, 265), (125, 266), (125, 267), (125, 268), (125, 269), (125, 270), (125, 271), (125, 272), (125, 273), (125, 274), (125, 275), (125, 276), (125, 277), (125, 278), (125, 279), (125, 280), (125, 281), (125, 282), (125, 283), (125, 284), (125, 285), (125, 286), (125, 287), (125, 288), (125, 289), (125, 290), (125, 291), (125, 292), (125, 293), (125, 294), (125, 295), (125, 296), (125, 297), (125, 298), (125, 299), (125, 300), (125, 301), (125, 302), (125, 303), (125, 304), (125, 306), (126, 263), (126, 265), (126, 266), (126, 267), (126, 268), (126, 269), (126, 270), (126, 271), (126, 272), (126, 273), (126, 274), (126, 275), (126, 276), (126, 277), (126, 278), (126, 279), (126, 280), (126, 281), (126, 282), (126, 283), (126, 284), (126, 285), (126, 286), (126, 287), (126, 288), (126, 289), (126, 290), (126, 291), (126, 292), (126, 293), (126, 294), (126, 295), (126, 296), (126, 297), (126, 298), (126, 299), (126, 300), (126, 301), (126, 302), (126, 303), (126, 304), (126, 306), (127, 263), (127, 265), (127, 266), (127, 267), (127, 268), (127, 269), (127, 270), (127, 271), (127, 272), (127, 273), (127, 274), (127, 275), (127, 276), (127, 277), (127, 278), (127, 279), (127, 280), (127, 281), (127, 282), (127, 283), (127, 284), (127, 285), (127, 286), (127, 287), (127, 288), (127, 289), (127, 290), (127, 291), (127, 292), (127, 293), (127, 294), (127, 295), (127, 296), (127, 297), (127, 298), (127, 299), (127, 300), (127, 301), (127, 302), (127, 303), (127, 305), (128, 263), (128, 265), (128, 266), (128, 267), (128, 268), (128, 269), (128, 270), (128, 271), (128, 272), (128, 273), (128, 274), (128, 275), (128, 276), (128, 277), (128, 278), (128, 279), (128, 280), (128, 281), (128, 282), (128, 283), (128, 284), (128, 285), (128, 286), (128, 287), (128, 288), (128, 289), (128, 290), (128, 291), (128, 292), (128, 293), (128, 294), (128, 295), (128, 296), (128, 297), (128, 298), (128, 299), (128, 300), (128, 301), (128, 302), (128, 303), (128, 305), (129, 263), (129, 265), (129, 266), (129, 267), (129, 268), (129, 269), (129, 270), (129, 271), (129, 272), (129, 273), (129, 274), (129, 275), (129, 276), (129, 277), (129, 278), (129, 279), (129, 280), (129, 281), (129, 282), (129, 283), (129, 284), (129, 285), (129, 286), (129, 287), (129, 288), (129, 289), (129, 290), (129, 291), (129, 292), (129, 293), (129, 294), (129, 295), (129, 296), (129, 297), (129, 298), (129, 299), (129, 300), (129, 301), (129, 302), (129, 303), (129, 305), (130, 263), (130, 265), (130, 266), (130, 267), (130, 268), (130, 269), (130, 270), (130, 271), (130, 272), (130, 273), (130, 274), (130, 275), (130, 276), (130, 277), (130, 278), (130, 279), (130, 280), (130, 281), (130, 282), (130, 283), (130, 284), (130, 285), (130, 286), (130, 287), (130, 288), (130, 289), (130, 290), (130, 291), (130, 292), (130, 293), (130, 294), (130, 295), (130, 296), (130, 297), (130, 298), (130, 299), (130, 300), (130, 301), (130, 302), (130, 304), (131, 264), (131, 266), (131, 267), (131, 268), (131, 269), (131, 270), (131, 271), (131, 272), (131, 273), (131, 274), (131, 275), (131, 276), (131, 277), (131, 278), (131, 279), (131, 280), (131, 281), (131, 282), (131, 283), (131, 284), (131, 285), (131, 286), (131, 287), (131, 288), (131, 289), (131, 290), (131, 291), (131, 292), (131, 293), (131, 294), (131, 295), (131, 296), (131, 297), (131, 298), (131, 299), (131, 300), (131, 301), (131, 302), (131, 304), (132, 264), (132, 266), (132, 267), (132, 268), (132, 269), (132, 270), (132, 271), (132, 272), (132, 273), (132, 274), (132, 275), (132, 276), (132, 277), (132, 278), (132, 279), (132, 280), (132, 281), (132, 282), (132, 283), (132, 284), (132, 285), (132, 286), (132, 287), (132, 288), (132, 289), (132, 290), (132, 291), (132, 292), (132, 293), (132, 294), (132, 295), (132, 296), (132, 297), (132, 298), (132, 299), (132, 300), (132, 301), (132, 303), (133, 265), (133, 267), (133, 268), (133, 269), (133, 270), (133, 271), (133, 272), (133, 273), (133, 274), (133, 275), (133, 276), (133, 277), (133, 278), (133, 279), (133, 280), (133, 281), (133, 282), (133, 283), (133, 284), (133, 285), (133, 286), (133, 287), (133, 288), (133, 289), (133, 290), (133, 291), (133, 292), (133, 293), (133, 294), (133, 295), (133, 296), (133, 297), (133, 298), (133, 299), (133, 300), (133, 301), (133, 303), (134, 265), (134, 269), (134, 270), (134, 271), (134, 272), (134, 273), (134, 274), (134, 275), (134, 276), (134, 277), (134, 278), (134, 279), (134, 280), (134, 281), (134, 282), (134, 283), (134, 284), (134, 285), (134, 286), (134, 287), (134, 288), (134, 289), (134, 290), (134, 291), (134, 292), (134, 293), (134, 294), (134, 295), (134, 296), (134, 297), (134, 298), (134, 299), (134, 300), (134, 302), (135, 266), (135, 268), (135, 271), (135, 272), (135, 273), (135, 274), (135, 275), (135, 276), (135, 277), (135, 278), (135, 279), (135, 280), (135, 281), (135, 282), (135, 283), (135, 284), (135, 285), (135, 286), (135, 287), (135, 288), (135, 289), (135, 290), (135, 291), (135, 292), (135, 293), (135, 294), (135, 295), (135, 296), (135, 297), (135, 298), (135, 299), (135, 301), (136, 269), (136, 278), (136, 279), (136, 280), (136, 281), (136, 282), (136, 283), (136, 284), (136, 285), (136, 286), (136, 287), (136, 288), (136, 289), (136, 290), (136, 291), (136, 292), (136, 293), (136, 294), (136, 295), (136, 296), (136, 297), (136, 298), (136, 300), (137, 271), (137, 273), (137, 274), (137, 275), (137, 276), (137, 277), (137, 280), (137, 281), (137, 282), (137, 283), (137, 284), (137, 285), (137, 286), (137, 287), (137, 288), (137, 289), (137, 290), (137, 291), (137, 292), (137, 293), (137, 294), (137, 295), (137, 299), (138, 279), (138, 283), (138, 284), (138, 285), (138, 286), (138, 287), (138, 288), (138, 289), (138, 290), (138, 291), (138, 292), (138, 293), (138, 297), (139, 280), (139, 281), (139, 282), (139, 287), (139, 288), (139, 289), (139, 294), (139, 295), (140, 283), (140, 285), (140, 286), (140, 290), (140, 291), (140, 293), (141, 287), (141, 288), (141, 289), (258, 286), (258, 287), (258, 288), (258, 289), (259, 283), (259, 284), (259, 285), (259, 286), (259, 290), (259, 291), (259, 293), (260, 280), (260, 286), (260, 287), (260, 288), (260, 289), (260, 290), (260, 294), (260, 295), (261, 278), (261, 279), (261, 283), (261, 284), (261, 285), (261, 286), (261, 287), (261, 288), (261, 289), (261, 290), (261, 291), (261, 292), (261, 293), (261, 297), (261, 298), (262, 270), (262, 271), (262, 272), (262, 273), (262, 274), (262, 275), (262, 276), (262, 277), (262, 280), (262, 281), (262, 282), (262, 283), (262, 284), (262, 285), (262, 286), (262, 287), (262, 288), (262, 289), (262, 290), (262, 291), (262, 292), (262, 293), (262, 294), (262, 295), (262, 296), (262, 299), (263, 269), (263, 278), (263, 279), (263, 280), (263, 281), (263, 282), (263, 283), (263, 284), (263, 285), (263, 286), (263, 287), (263, 288), (263, 289), (263, 290), (263, 291), (263, 292), (263, 293), (263, 294), (263, 295), (263, 296), (263, 297), (263, 298), (264, 266), (264, 268), (264, 270), (264, 271), (264, 272), (264, 273), (264, 274), (264, 275), (264, 276), (264, 277), (264, 278), (264, 279), (264, 280), (264, 281), (264, 282), (264, 283), (264, 284), (264, 285), (264, 286), (264, 287), (264, 288), (264, 289), (264, 290), (264, 291), (264, 292), (264, 293), (264, 294), (264, 295), (264, 296), (264, 297), (264, 298), (264, 299), (265, 265), (265, 269), (265, 270), (265, 271), (265, 272), (265, 273), (265, 274), (265, 275), (265, 276), (265, 277), (265, 278), (265, 279), (265, 280), (265, 281), (265, 282), (265, 283), (265, 284), (265, 285), (265, 286), (265, 287), (265, 288), (265, 289), (265, 290), (265, 291), (265, 292), (265, 293), (265, 294), (265, 295), (265, 296), (265, 297), (265, 298), (265, 299), (265, 300), (265, 302), (266, 265), (266, 267), (266, 268), (266, 269), (266, 270), (266, 271), (266, 272), (266, 273), (266, 274), (266, 275), (266, 276), (266, 277), (266, 278), (266, 279), (266, 280), (266, 281), (266, 282), (266, 283), (266, 284), (266, 285), (266, 286), (266, 287), (266, 288), (266, 289), (266, 290), (266, 291), (266, 292), (266, 293), (266, 294), (266, 295), (266, 296), (266, 297), (266, 298), (266, 299), (266, 300), (266, 301), (266, 303), (267, 264), (267, 266), (267, 267), (267, 268), (267, 269), (267, 270), (267, 271), (267, 272), (267, 273), (267, 274), (267, 275), (267, 276), (267, 277), (267, 278), (267, 279), (267, 280), (267, 281), (267, 282), (267, 283), (267, 284), (267, 285), (267, 286), (267, 287), (267, 288), (267, 289), (267, 290), (267, 291), (267, 292), (267, 293), (267, 294), (267, 295), (267, 296), (267, 297), (267, 298), (267, 299), (267, 300), (267, 301), (267, 302), (267, 303), (268, 264), (268, 266), (268, 267), (268, 268), (268, 269), (268, 270), (268, 271), (268, 272), (268, 273), (268, 274), (268, 275), (268, 276), (268, 277), (268, 278), (268, 279), (268, 280), (268, 281), (268, 282), (268, 283), (268, 284), (268, 285), (268, 286), (268, 287), (268, 288), (268, 289), (268, 290), (268, 291), (268, 292), (268, 293), (268, 294), (268, 295), (268, 296), (268, 297), (268, 298), (268, 299), (268, 300), (268, 301), (268, 302), (268, 304), (269, 263), (269, 265), (269, 266), (269, 267), (269, 268), (269, 269), (269, 270), (269, 271), (269, 272), (269, 273), (269, 274), (269, 275), (269, 276), (269, 277), (269, 278), (269, 279), (269, 280), (269, 281), (269, 282), (269, 283), (269, 284), (269, 285), (269, 286), (269, 287), (269, 288), (269, 289), (269, 290), (269, 291), (269, 292), (269, 293), (269, 294), (269, 295), (269, 296), (269, 297), (269, 298), (269, 299), (269, 300), (269, 301), (269, 302), (269, 304), (270, 263), (270, 265), (270, 266), (270, 267), (270, 268), (270, 269), (270, 270), (270, 271), (270, 272), (270, 273), (270, 274), (270, 275), (270, 276), (270, 277), (270, 278), (270, 279), (270, 280), (270, 281), (270, 282), (270, 283), (270, 284), (270, 285), (270, 286), (270, 287), (270, 288), (270, 289), (270, 290), (270, 291), (270, 292), (270, 293), (270, 294), (270, 295), (270, 296), (270, 297), (270, 298), (270, 299), (270, 300), (270, 301), (270, 302), (270, 303), (270, 305), (271, 263), (271, 265), (271, 266), (271, 267), (271, 268), (271, 269), (271, 270), (271, 271), (271, 272), (271, 273), (271, 274), (271, 275), (271, 276), (271, 277), (271, 278), (271, 279), (271, 280), (271, 281), (271, 282), (271, 283), (271, 284), (271, 285), (271, 286), (271, 287), (271, 288), (271, 289), (271, 290), (271, 291), (271, 292), (271, 293), (271, 294), (271, 295), (271, 296), (271, 297), (271, 298), (271, 299), (271, 300), (271, 301), (271, 302), (271, 303), (271, 305), (272, 263), (272, 265), (272, 266), (272, 267), (272, 268), (272, 269), (272, 270), (272, 271), (272, 272), (272, 273), (272, 274), (272, 275), (272, 276), (272, 277), (272, 278), (272, 279), (272, 280), (272, 281), (272, 282), (272, 283), (272, 284), (272, 285), (272, 286), (272, 287), (272, 288), (272, 289), (272, 290), (272, 291), (272, 292), (272, 293), (272, 294), (272, 295), (272, 296), (272, 297), (272, 298), (272, 299), (272, 300), (272, 301), (272, 302), (272, 303), (272, 305), (273, 263), (273, 265), (273, 266), (273, 267), (273, 268), (273, 269), (273, 270), (273, 271), (273, 272), (273, 273), (273, 274), (273, 275), (273, 276), (273, 277), (273, 278), (273, 279), (273, 280), (273, 281), (273, 282), (273, 283), (273, 284), (273, 285), (273, 286), (273, 287), (273, 288), (273, 289), (273, 290), (273, 291), (273, 292), (273, 293), (273, 294), (273, 295), (273, 296), (273, 297), (273, 298), (273, 299), (273, 300), (273, 301), (273, 302), (273, 303), (273, 304), (273, 306), (274, 263), (274, 265), (274, 266), (274, 267), (274, 268), (274, 269), (274, 270), (274, 271), (274, 272), (274, 273), (274, 274), (274, 275), (274, 276), (274, 277), (274, 278), (274, 279), (274, 280), (274, 281), (274, 282), (274, 283), (274, 284), (274, 285), (274, 286), (274, 287), (274, 288), (274, 289), (274, 290), (274, 291), (274, 292), (274, 293), (274, 294), (274, 295), (274, 296), (274, 297), (274, 298), (274, 299), (274, 300), (274, 301), (274, 302), (274, 303), (274, 304), (274, 306), (275, 263), (275, 265), (275, 266), (275, 267), (275, 268), (275, 269), (275, 270), (275, 271), (275, 272), (275, 273), (275, 274), (275, 275), (275, 276), (275, 277), (275, 278), (275, 279), (275, 280), (275, 281), (275, 282), (275, 283), (275, 284), (275, 285), (275, 286), (275, 287), (275, 288), (275, 289), (275, 290), (275, 291), (275, 292), (275, 293), (275, 294), (275, 295), (275, 296), (275, 297), (275, 298), (275, 299), (275, 300), (275, 301), (275, 302), (275, 303), (275, 304), (275, 306), (276, 263), (276, 265), (276, 266), (276, 267), (276, 268), (276, 269), (276, 270), (276, 271), (276, 272), (276, 273), (276, 274), (276, 275), (276, 276), (276, 277), (276, 278), (276, 279), (276, 280), (276, 281), (276, 282), (276, 283), (276, 284), (276, 285), (276, 286), (276, 287), (276, 288), (276, 289), (276, 290), (276, 291), (276, 292), (276, 293), (276, 294), (276, 295), (276, 296), (276, 297), (276, 298), (276, 299), (276, 300), (276, 301), (276, 302), (276, 303), (276, 304), (276, 306), (277, 263), (277, 265), (277, 266), (277, 267), (277, 268), (277, 269), (277, 270), (277, 271), (277, 272), (277, 273), (277, 274), (277, 275), (277, 276), (277, 277), (277, 278), (277, 279), (277, 280), (277, 281), (277, 282), (277, 283), (277, 284), (277, 285), (277, 286), (277, 287), (277, 288), (277, 289), (277, 290), (277, 291), (277, 292), (277, 293), (277, 294), (277, 295), (277, 296), (277, 297), (277, 298), (277, 299), (277, 300), (277, 301), (277, 302), (277, 303), (277, 304), (277, 306), (278, 263), (278, 264), (278, 265), (278, 266), (278, 267), (278, 268), (278, 269), (278, 270), (278, 271), (278, 272), (278, 273), (278, 274), (278, 275), (278, 276), (278, 277), (278, 278), (278, 279), (278, 280), (278, 281), (278, 282), (278, 283), (278, 284), (278, 285), (278, 286), (278, 287), (278, 288), (278, 289), (278, 290), (278, 291), (278, 292), (278, 293), (278, 294), (278, 295), (278, 296), (278, 297), (278, 298), (278, 299), (278, 300), (278, 301), (278, 302), (278, 303), (278, 304), (278, 305), (278, 306), (278, 307), (279, 264), (279, 266), (279, 267), (279, 268), (279, 269), (279, 270), (279, 271), (279, 272), (279, 273), (279, 274), (279, 275), (279, 276), (279, 277), (279, 278), (279, 279), (279, 280), (279, 281), (279, 282), (279, 283), (279, 284), (279, 285), (279, 286), (279, 287), (279, 288), (279, 289), (279, 290), (279, 291), (279, 292), (279, 293), (279, 294), (279, 295), (279, 296), (279, 297), (279, 298), (279, 299), (279, 300), (279, 301), (279, 302), (279, 303), (279, 304), (279, 305), (279, 307), (280, 264), (280, 266), (280, 269), (280, 270), (280, 271), (280, 272), (280, 273), (280, 274), (280, 275), (280, 276), (280, 277), (280, 278), (280, 279), (280, 280), (280, 281), (280, 282), (280, 283), (280, 284), (280, 285), (280, 286), (280, 287), (280, 288), (280, 289), (280, 290), (280, 291), (280, 292), (280, 293), (280, 294), (280, 295), (280, 296), (280, 297), (280, 298), (280, 299), (280, 300), (280, 301), (280, 302), (280, 303), (280, 304), (280, 305), (280, 307), (281, 264), (281, 267), (281, 269), (281, 270), (281, 271), (281, 272), (281, 273), (281, 274), (281, 275), (281, 276), (281, 277), (281, 278), (281, 279), (281, 280), (281, 281), (281, 282), (281, 283), (281, 284), (281, 285), (281, 286), (281, 287), (281, 288), (281, 289), (281, 290), (281, 291), (281, 292), (281, 293), (281, 294), (281, 295), (281, 296), (281, 297), (281, 298), (281, 299), (281, 300), (281, 301), (281, 302), (281, 303), (281, 304), (281, 305), (281, 307), (282, 265), (282, 266), (282, 269), (282, 271), (282, 272), (282, 273), (282, 274), (282, 275), (282, 276), (282, 277), (282, 278), (282, 279), (282, 280), (282, 281), (282, 282), (282, 283), (282, 284), (282, 285), (282, 286), (282, 287), (282, 288), (282, 289), (282, 290), (282, 291), (282, 292), (282, 293), (282, 294), (282, 295), (282, 296), (282, 297), (282, 298), (282, 299), (282, 300), (282, 301), (282, 302), (282, 303), (282, 304), (282, 305), (282, 307), (283, 269), (283, 271), (283, 272), (283, 273), (283, 274), (283, 275), (283, 276), (283, 277), (283, 278), (283, 279), (283, 280), (283, 281), (283, 282), (283, 283), (283, 284), (283, 285), (283, 286), (283, 287), (283, 288), (283, 289), (283, 290), (283, 291), (283, 292), (283, 293), (283, 294), (283, 295), (283, 296), (283, 297), (283, 298), (283, 299), (283, 300), (283, 301), (283, 302), (283, 303), (283, 304), (283, 305), (283, 306), (283, 307), (284, 270), (284, 272), (284, 273), (284, 274), (284, 275), (284, 276), (284, 277), (284, 278), (284, 279), (284, 280), (284, 281), (284, 282), (284, 283), (284, 284), (284, 285), (284, 286), (284, 287), (284, 288), (284, 289), (284, 290), (284, 291), (284, 292), (284, 293), (284, 294), (284, 295), (284, 296), (284, 297), (284, 298), (284, 299), (284, 300), (284, 301), (284, 302), (284, 303), (284, 304), (284, 306), (285, 270), (285, 272), (285, 273), (285, 274), (285, 275), (285, 276), (285, 277), (285, 278), (285, 279), (285, 280), (285, 281), (285, 282), (285, 283), (285, 284), (285, 285), (285, 286), (285, 287), (285, 288), (285, 289), (285, 290), (285, 291), (285, 292), (285, 293), (285, 294), (285, 295), (285, 296), (285, 297), (285, 298), (285, 299), (285, 300), (285, 301), (285, 302), (285, 303), (285, 304), (285, 306), (286, 270), (286, 272), (286, 273), (286, 274), (286, 275), (286, 276), (286, 277), (286, 278), (286, 279), (286, 280), (286, 281), (286, 282), (286, 283), (286, 284), (286, 285), (286, 286), (286, 287), (286, 288), (286, 289), (286, 290), (286, 291), (286, 292), (286, 293), (286, 294), (286, 295), (286, 296), (286, 297), (286, 298), (286, 299), (286, 300), (286, 301), (286, 302), (286, 303), (286, 304), (286, 306), (287, 270), (287, 272), (287, 273), (287, 274), (287, 275), (287, 276), (287, 277), (287, 278), (287, 279), (287, 280), (287, 281), (287, 282), (287, 283), (287, 284), (287, 285), (287, 286), (287, 287), (287, 288), (287, 289), (287, 290), (287, 291), (287, 292), (287, 293), (287, 294), (287, 295), (287, 296), (287, 297), (287, 298), (287, 299), (287, 300), (287, 301), (287, 302), (287, 303), (287, 304), (287, 306), (288, 270), (288, 272), (288, 273), (288, 274), (288, 275), (288, 276), (288, 277), (288, 278), (288, 281), (288, 282), (288, 283), (288, 284), (288, 285), (288, 286), (288, 287), (288, 288), (288, 289), (288, 290), (288, 291), (288, 292), (288, 293), (288, 294), (288, 295), (288, 296), (288, 297), (288, 298), (288, 299), (288, 300), (288, 301), (288, 302), (288, 303), (288, 304), (288, 306), (289, 269), (289, 271), (289, 272), (289, 273), (289, 274), (289, 275), (289, 276), (289, 279), (289, 280), (289, 282), (289, 283), (289, 284), (289, 285), (289, 286), (289, 287), (289, 288), (289, 289), (289, 290), (289, 291), (289, 292), (289, 293), (289, 294), (289, 295), (289, 296), (289, 297), (289, 298), (289, 299), (289, 300), (289, 301), (289, 302), (289, 303), (289, 305), (290, 269), (290, 271), (290, 272), (290, 273), (290, 274), (290, 277), (290, 281), (290, 283), (290, 284), (290, 285), (290, 286), (290, 287), (290, 288), (290, 289), (290, 290), (290, 291), (290, 292), (290, 293), (290, 294), (290, 295), (290, 296), (290, 297), (290, 298), (290, 299), (290, 300), (290, 301), (290, 302), (290, 303), (290, 305), (291, 269), (291, 271), (291, 272), (291, 276), (291, 282), (291, 284), (291, 285), (291, 286), (291, 287), (291, 288), (291, 289), (291, 290), (291, 291), (291, 292), (291, 293), (291, 294), (291, 295), (291, 296), (291, 297), (291, 298), (291, 299), (291, 300), (291, 301), (291, 302), (291, 304), (292, 269), (292, 274), (292, 282), (292, 284), (292, 285), (292, 286), (292, 287), (292, 288), (292, 289), (292, 290), (292, 291), (292, 292), (292, 293), (292, 294), (292, 295), (292, 296), (292, 297), (292, 298), (292, 299), (292, 300), (292, 301), (292, 303), (293, 268), (293, 272), (293, 282), (293, 284), (293, 285), (293, 286), (293, 287), (293, 288), (293, 289), (293, 290), (293, 291), (293, 292), (293, 293), (293, 294), (293, 295), (293, 296), (293, 297), (293, 298), (293, 299), (293, 300), (293, 301), (293, 303), (294, 268), (294, 270), (294, 282), (294, 285), (294, 286), (294, 287), (294, 288), (294, 289), (294, 290), (294, 291), (294, 292), (294, 293), (294, 294), (294, 295), (294, 296), (294, 297), (294, 298), (294, 299), (294, 300), (294, 302), (295, 268), (295, 283), (295, 287), (295, 288), (295, 289), (295, 290), (295, 291), (295, 292), (295, 293), (295, 294), (295, 295), (295, 296), (295, 297), (295, 298), (295, 299), (295, 301), (296, 286), (296, 289), (296, 290), (296, 291), (296, 292), (296, 293), (296, 294), (296, 295), (296, 296), (296, 297), (296, 298), (296, 300), (297, 287), (297, 290), (297, 291), (297, 292), (297, 293), (297, 294), (297, 295), (297, 296), (297, 297), (297, 298), (297, 300), (298, 289), (298, 291), (298, 292), (298, 293), (298, 294), (298, 295), (298, 296), (298, 297), (298, 299), (299, 290), (299, 293), (299, 294), (299, 295), (299, 296), (299, 297), (299, 299), (300, 291), (300, 294), (300, 295), (300, 296), (300, 297), (300, 299), (301, 292), (301, 295), (301, 296), (301, 298), (302, 293), (302, 295), (302, 296), (302, 298), (303, 294), (303, 297), (304, 295), (304, 297), (305, 296), ) coordinates_097F00 = ((162, 207), (162, 209), (162, 210), (162, 211), (162, 212), (162, 213), (163, 205), (163, 214), (163, 216), (164, 203), (164, 207), (164, 208), (164, 209), (164, 210), (164, 211), (164, 212), (164, 213), (164, 217), (164, 218), (164, 219), (165, 201), (165, 202), (165, 205), (165, 206), (165, 207), (165, 208), (165, 209), (165, 210), (165, 211), (165, 212), (165, 213), (165, 214), (165, 215), (165, 216), (165, 220), (165, 222), (166, 200), (166, 203), (166, 204), (166, 205), (166, 206), (166, 207), (166, 208), (166, 209), (166, 210), (166, 211), (166, 212), (166, 213), (166, 214), (166, 215), (166, 216), (166, 217), (166, 218), (166, 219), (166, 222), (167, 200), (167, 202), (167, 203), (167, 204), (167, 205), (167, 206), (167, 207), (167, 208), (167, 209), (167, 210), (167, 211), (167, 212), (167, 213), (167, 214), (167, 215), (167, 216), (167, 217), (167, 218), (167, 219), (167, 220), (167, 222), (168, 200), (168, 202), (168, 203), (168, 204), (168, 205), (168, 206), (168, 207), (168, 208), (168, 209), (168, 210), (168, 211), (168, 212), (168, 213), (168, 214), (168, 215), (168, 216), (168, 217), (168, 218), (168, 219), (168, 220), (168, 222), (169, 199), (169, 201), (169, 202), (169, 203), (169, 204), (169, 205), (169, 206), (169, 207), (169, 208), (169, 209), (169, 210), (169, 211), (169, 212), (169, 213), (169, 214), (169, 215), (169, 216), (169, 217), (169, 218), (169, 219), (169, 220), (169, 222), (170, 199), (170, 201), (170, 202), (170, 203), (170, 204), (170, 205), (170, 206), (170, 207), (170, 208), (170, 209), (170, 210), (170, 211), (170, 212), (170, 213), (170, 214), (170, 215), (170, 216), (170, 217), (170, 218), (170, 219), (170, 220), (170, 222), (171, 199), (171, 201), (171, 202), (171, 203), (171, 204), (171, 205), (171, 206), (171, 207), (171, 208), (171, 209), (171, 210), (171, 211), (171, 212), (171, 213), (171, 214), (171, 215), (171, 216), (171, 217), (171, 218), (171, 219), (171, 220), (171, 221), (171, 223), (172, 198), (172, 199), (172, 200), (172, 201), (172, 202), (172, 203), (172, 204), (172, 205), (172, 206), (172, 207), (172, 208), (172, 209), (172, 210), (172, 211), (172, 212), (172, 213), (172, 214), (172, 215), (172, 216), (172, 217), (172, 218), (172, 219), (172, 220), (172, 222), (173, 198), (173, 200), (173, 201), (173, 202), (173, 203), (173, 204), (173, 205), (173, 206), (173, 207), (173, 208), (173, 209), (173, 210), (173, 211), (173, 212), (173, 213), (173, 214), (173, 215), (173, 216), (173, 217), (173, 218), (173, 219), (173, 221), (174, 198), (174, 200), (174, 201), (174, 202), (174, 203), (174, 204), (174, 205), (174, 206), (174, 207), (174, 208), (174, 209), (174, 210), (174, 211), (174, 212), (174, 213), (174, 214), (174, 215), (174, 216), (174, 217), (174, 218), (174, 219), (174, 221), (175, 197), (175, 199), (175, 200), (175, 201), (175, 202), (175, 203), (175, 204), (175, 205), (175, 206), (175, 207), (175, 208), (175, 209), (175, 210), (175, 211), (175, 212), (175, 213), (175, 214), (175, 215), (175, 216), (175, 217), (175, 218), (175, 220), (176, 197), (176, 199), (176, 200), (176, 201), (176, 202), (176, 203), (176, 204), (176, 205), (176, 206), (176, 207), (176, 208), (176, 209), (176, 210), (176, 211), (176, 212), (176, 213), (176, 214), (176, 215), (176, 216), (176, 219), (177, 197), (177, 199), (177, 200), (177, 201), (177, 202), (177, 203), (177, 204), (177, 205), (177, 206), (177, 207), (177, 208), (177, 209), (177, 210), (177, 211), (177, 212), (177, 213), (177, 214), (177, 215), (177, 218), (178, 196), (178, 198), (178, 199), (178, 200), (178, 201), (178, 202), (178, 203), (178, 204), (178, 205), (178, 206), (178, 207), (178, 208), (178, 209), (178, 210), (178, 211), (178, 212), (178, 216), (179, 196), (179, 213), (179, 214), (180, 196), (180, 198), (180, 199), (180, 200), (180, 201), (180, 202), (180, 203), (180, 204), (180, 205), (180, 206), (180, 207), (180, 208), (180, 209), (180, 210), (180, 211), (218, 196), (219, 196), (219, 198), (219, 199), (219, 200), (219, 201), (219, 202), (219, 203), (219, 204), (219, 205), (219, 206), (219, 207), (219, 208), (219, 209), (219, 210), (219, 211), (219, 212), (220, 196), (220, 213), (220, 215), (221, 196), (221, 198), (221, 199), (221, 200), (221, 201), (221, 202), (221, 203), (221, 204), (221, 205), (221, 206), (221, 207), (221, 208), (221, 209), (221, 210), (221, 211), (221, 212), (221, 216), (221, 217), (222, 197), (222, 199), (222, 200), (222, 201), (222, 202), (222, 203), (222, 204), (222, 205), (222, 206), (222, 207), (222, 208), (222, 209), (222, 210), (222, 211), (222, 212), (222, 213), (222, 214), (222, 215), (222, 218), (223, 197), (223, 199), (223, 200), (223, 201), (223, 202), (223, 203), (223, 204), (223, 205), (223, 206), (223, 207), (223, 208), (223, 209), (223, 210), (223, 211), (223, 212), (223, 213), (223, 214), (223, 215), (223, 216), (223, 217), (223, 219), (224, 197), (224, 199), (224, 200), (224, 201), (224, 202), (224, 203), (224, 204), (224, 205), (224, 206), (224, 207), (224, 208), (224, 209), (224, 210), (224, 211), (224, 212), (224, 213), (224, 214), (224, 215), (224, 216), (224, 217), (224, 218), (224, 220), (225, 198), (225, 200), (225, 201), (225, 202), (225, 203), (225, 204), (225, 205), (225, 206), (225, 207), (225, 208), (225, 209), (225, 210), (225, 211), (225, 212), (225, 213), (225, 214), (225, 215), (225, 216), (225, 217), (225, 218), (225, 219), (225, 221), (226, 198), (226, 200), (226, 201), (226, 202), (226, 203), (226, 204), (226, 205), (226, 206), (226, 207), (226, 208), (226, 209), (226, 210), (226, 211), (226, 212), (226, 213), (226, 214), (226, 215), (226, 216), (226, 217), (226, 218), (226, 219), (226, 220), (227, 199), (227, 201), (227, 202), (227, 203), (227, 204), (227, 205), (227, 206), (227, 207), (227, 208), (227, 209), (227, 210), (227, 211), (227, 212), (227, 213), (227, 214), (227, 215), (227, 216), (227, 217), (227, 218), (227, 219), (227, 220), (227, 222), (228, 199), (228, 201), (228, 202), (228, 203), (228, 204), (228, 205), (228, 206), (228, 207), (228, 208), (228, 209), (228, 210), (228, 211), (228, 212), (228, 213), (228, 214), (228, 215), (228, 216), (228, 217), (228, 218), (228, 219), (228, 220), (228, 221), (228, 223), (229, 199), (229, 201), (229, 202), (229, 203), (229, 204), (229, 205), (229, 206), (229, 207), (229, 208), (229, 209), (229, 210), (229, 211), (229, 212), (229, 213), (229, 214), (229, 215), (229, 216), (229, 217), (229, 218), (229, 219), (229, 220), (229, 222), (230, 199), (230, 201), (230, 202), (230, 203), (230, 204), (230, 205), (230, 206), (230, 207), (230, 208), (230, 209), (230, 210), (230, 211), (230, 212), (230, 213), (230, 214), (230, 215), (230, 216), (230, 217), (230, 218), (230, 219), (230, 220), (230, 222), (231, 200), (231, 202), (231, 203), (231, 204), (231, 205), (231, 206), (231, 207), (231, 208), (231, 209), (231, 210), (231, 211), (231, 212), (231, 213), (231, 214), (231, 215), (231, 216), (231, 217), (231, 218), (231, 219), (231, 220), (231, 222), (232, 200), (232, 202), (232, 203), (232, 204), (232, 205), (232, 206), (232, 207), (232, 208), (232, 209), (232, 210), (232, 211), (232, 212), (232, 213), (232, 214), (232, 215), (232, 216), (232, 217), (232, 218), (232, 219), (232, 220), (232, 222), (233, 200), (233, 203), (233, 204), (233, 205), (233, 206), (233, 207), (233, 208), (233, 209), (233, 210), (233, 211), (233, 212), (233, 213), (233, 214), (233, 215), (233, 216), (233, 217), (233, 218), (233, 219), (233, 222), (234, 202), (234, 205), (234, 206), (234, 207), (234, 208), (234, 209), (234, 210), (234, 211), (234, 212), (234, 213), (234, 214), (234, 215), (234, 216), (234, 220), (234, 222), (235, 203), (235, 204), (235, 207), (235, 208), (235, 209), (235, 210), (235, 211), (235, 212), (235, 213), (235, 217), (235, 218), (236, 205), (236, 214), (236, 216), (237, 207), (237, 209), (237, 210), (237, 211), (237, 212), (237, 213), ) coordinates_92FF00 = ((161, 227), (161, 229), (162, 226), (162, 229), (163, 225), (163, 227), (163, 228), (163, 229), (163, 230), (164, 224), (164, 226), (164, 227), (164, 228), (164, 230), (165, 224), (165, 226), (165, 227), (165, 228), (165, 229), (165, 231), (166, 224), (166, 226), (166, 227), (166, 228), (166, 229), (166, 231), (167, 224), (167, 226), (167, 227), (167, 228), (167, 229), (167, 231), (168, 224), (168, 225), (168, 226), (168, 227), (168, 228), (168, 229), (168, 231), (169, 225), (169, 227), (169, 228), (169, 229), (169, 231), (170, 225), (170, 227), (170, 228), (170, 229), (170, 231), (171, 225), (171, 227), (171, 228), (171, 229), (171, 231), (172, 224), (172, 226), (172, 227), (172, 228), (172, 230), (173, 224), (173, 226), (173, 227), (173, 228), (173, 230), (174, 223), (174, 225), (174, 226), (174, 227), (174, 229), (175, 222), (175, 224), (175, 225), (175, 226), (175, 227), (175, 229), (176, 222), (176, 224), (176, 225), (176, 226), (176, 227), (176, 229), (177, 221), (177, 223), (177, 224), (177, 225), (177, 226), (177, 227), (177, 229), (178, 222), (178, 223), (178, 224), (178, 225), (178, 226), (178, 227), (178, 229), (179, 218), (179, 221), (179, 222), (179, 223), (179, 224), (179, 225), (179, 226), (179, 227), (179, 229), (180, 216), (180, 220), (180, 221), (180, 222), (180, 223), (180, 224), (180, 225), (180, 226), (180, 228), (181, 214), (181, 215), (181, 218), (181, 219), (181, 220), (181, 221), (181, 222), (181, 223), (181, 224), (181, 225), (181, 226), (181, 228), (182, 208), (182, 209), (182, 210), (182, 211), (182, 212), (182, 216), (182, 217), (182, 218), (182, 219), (182, 220), (182, 221), (182, 222), (182, 223), (182, 224), (182, 225), (182, 226), (182, 228), (183, 194), (183, 196), (183, 197), (183, 198), (183, 199), (183, 200), (183, 201), (183, 202), (183, 203), (183, 204), (183, 205), (183, 206), (183, 207), (183, 214), (183, 215), (183, 216), (183, 217), (183, 218), (183, 219), (183, 220), (183, 221), (183, 222), (183, 223), (183, 224), (183, 225), (183, 227), (184, 193), (184, 208), (184, 209), (184, 210), (184, 211), (184, 212), (184, 213), (184, 214), (184, 215), (184, 216), (184, 217), (184, 218), (184, 219), (184, 220), (184, 221), (184, 222), (184, 223), (184, 224), (184, 225), (184, 227), (185, 192), (185, 194), (185, 195), (185, 196), (185, 197), (185, 198), (185, 199), (185, 200), (185, 201), (185, 202), (185, 203), (185, 204), (185, 205), (185, 206), (185, 207), (185, 208), (185, 209), (185, 210), (185, 211), (185, 212), (185, 213), (185, 214), (185, 215), (185, 216), (185, 217), (185, 218), (185, 219), (185, 220), (185, 221), (185, 222), (185, 223), (185, 224), (185, 226), (186, 191), (186, 195), (186, 196), (186, 197), (186, 198), (186, 199), (186, 200), (186, 201), (186, 202), (186, 203), (186, 204), (186, 205), (186, 206), (186, 207), (186, 208), (186, 209), (186, 210), (186, 211), (186, 212), (186, 213), (186, 214), (186, 215), (186, 216), (186, 217), (186, 218), (186, 219), (186, 220), (186, 221), (186, 222), (186, 223), (186, 226), (187, 191), (187, 193), (187, 194), (187, 198), (187, 199), (187, 200), (187, 201), (187, 202), (187, 203), (187, 204), (187, 205), (187, 206), (187, 207), (187, 208), (187, 209), (187, 210), (187, 211), (187, 212), (187, 213), (187, 214), (187, 215), (187, 216), (187, 217), (187, 218), (187, 225), (188, 196), (188, 197), (188, 200), (188, 201), (188, 202), (188, 203), (188, 204), (188, 205), (188, 206), (188, 207), (188, 208), (188, 209), (188, 210), (188, 218), (188, 219), (188, 220), (188, 221), (188, 223), (189, 198), (189, 199), (189, 203), (189, 204), (189, 205), (189, 206), (189, 207), (189, 211), (189, 212), (189, 213), (189, 214), (189, 215), (189, 216), (189, 217), (190, 200), (190, 202), (190, 208), (190, 209), (190, 210), (191, 203), (191, 205), (191, 207), (208, 203), (208, 204), (208, 205), (208, 207), (209, 200), (209, 209), (209, 210), (209, 211), (210, 198), (210, 199), (210, 203), (210, 204), (210, 205), (210, 206), (210, 207), (210, 212), (210, 213), (210, 214), (210, 215), (210, 216), (210, 217), (210, 218), (211, 195), (211, 196), (211, 200), (211, 201), (211, 202), (211, 203), (211, 204), (211, 205), (211, 206), (211, 207), (211, 208), (211, 209), (211, 210), (211, 211), (211, 219), (211, 220), (211, 221), (211, 222), (211, 223), (211, 224), (212, 191), (212, 193), (212, 194), (212, 198), (212, 199), (212, 200), (212, 201), (212, 202), (212, 203), (212, 204), (212, 205), (212, 206), (212, 207), (212, 208), (212, 209), (212, 210), (212, 211), (212, 212), (212, 213), (212, 214), (212, 215), (212, 216), (212, 217), (212, 218), (212, 225), (213, 191), (213, 195), (213, 196), (213, 197), (213, 198), (213, 199), (213, 200), (213, 201), (213, 202), (213, 203), (213, 204), (213, 205), (213, 206), (213, 207), (213, 208), (213, 209), (213, 210), (213, 211), (213, 212), (213, 213), (213, 214), (213, 215), (213, 216), (213, 217), (213, 218), (213, 219), (213, 220), (213, 221), (213, 222), (213, 223), (213, 226), (214, 192), (214, 194), (214, 195), (214, 196), (214, 197), (214, 198), (214, 199), (214, 200), (214, 201), (214, 202), (214, 203), (214, 204), (214, 205), (214, 206), (214, 207), (214, 208), (214, 209), (214, 210), (214, 211), (214, 212), (214, 213), (214, 214), (214, 215), (214, 216), (214, 217), (214, 218), (214, 219), (214, 220), (214, 221), (214, 222), (214, 223), (214, 224), (214, 226), (215, 193), (215, 209), (215, 210), (215, 211), (215, 212), (215, 213), (215, 214), (215, 215), (215, 216), (215, 217), (215, 218), (215, 219), (215, 220), (215, 221), (215, 222), (215, 223), (215, 224), (215, 225), (215, 227), (216, 194), (216, 196), (216, 197), (216, 198), (216, 199), (216, 200), (216, 201), (216, 202), (216, 203), (216, 204), (216, 205), (216, 206), (216, 207), (216, 208), (216, 214), (216, 215), (216, 216), (216, 217), (216, 218), (216, 219), (216, 220), (216, 221), (216, 222), (216, 223), (216, 224), (216, 225), (216, 226), (216, 227), (217, 209), (217, 210), (217, 211), (217, 212), (217, 213), (217, 216), (217, 217), (217, 218), (217, 219), (217, 220), (217, 221), (217, 222), (217, 223), (217, 224), (217, 225), (217, 226), (217, 228), (218, 214), (218, 215), (218, 218), (218, 219), (218, 220), (218, 221), (218, 222), (218, 223), (218, 224), (218, 225), (218, 226), (218, 228), (219, 216), (219, 217), (219, 220), (219, 221), (219, 222), (219, 223), (219, 224), (219, 225), (219, 226), (219, 228), (220, 218), (220, 221), (220, 222), (220, 223), (220, 224), (220, 225), (220, 226), (220, 227), (220, 229), (221, 222), (221, 223), (221, 224), (221, 225), (221, 226), (221, 227), (221, 229), (222, 221), (222, 223), (222, 224), (222, 225), (222, 226), (222, 227), (222, 229), (223, 222), (223, 224), (223, 225), (223, 226), (223, 227), (223, 229), (224, 224), (224, 225), (224, 226), (224, 227), (224, 229), (225, 223), (225, 225), (225, 226), (225, 227), (225, 229), (226, 224), (226, 226), (226, 227), (226, 228), (226, 230), (227, 224), (227, 226), (227, 227), (227, 228), (227, 230), (228, 225), (228, 227), (228, 228), (228, 229), (228, 231), (229, 225), (229, 227), (229, 228), (229, 229), (229, 231), (230, 225), (230, 227), (230, 228), (230, 229), (230, 231), (231, 224), (231, 226), (231, 227), (231, 228), (231, 229), (231, 231), (232, 224), (232, 226), (232, 227), (232, 228), (232, 229), (232, 231), (233, 224), (233, 226), (233, 227), (233, 228), (233, 229), (233, 231), (234, 224), (234, 226), (234, 227), (234, 228), (234, 229), (234, 231), (235, 224), (235, 226), (235, 227), (235, 228), (235, 230), (236, 225), (236, 228), (236, 229), (236, 230), (237, 226), (237, 229), (238, 229), ) coordinates_7F006B = ((98, 86), (98, 88), (98, 89), (98, 90), (98, 91), (98, 92), (98, 93), (99, 84), (99, 94), (99, 95), (100, 83), (100, 86), (100, 87), (100, 88), (100, 89), (100, 90), (100, 91), (100, 92), (100, 93), (100, 97), (100, 98), (101, 82), (101, 84), (101, 85), (101, 86), (101, 87), (101, 88), (101, 89), (101, 90), (101, 91), (101, 92), (101, 93), (101, 94), (101, 95), (101, 99), (101, 100), (101, 101), (102, 81), (102, 83), (102, 84), (102, 85), (102, 86), (102, 87), (102, 88), (102, 89), (102, 90), (102, 91), (102, 92), (102, 93), (102, 94), (102, 95), (102, 96), (102, 97), (102, 98), (102, 102), (102, 103), (102, 104), (102, 105), (103, 80), (103, 82), (103, 83), (103, 84), (103, 85), (103, 86), (103, 87), (103, 88), (103, 89), (103, 90), (103, 91), (103, 92), (103, 93), (103, 94), (103, 95), (103, 96), (103, 97), (103, 98), (103, 99), (103, 100), (103, 101), (103, 106), (103, 107), (103, 109), (104, 79), (104, 81), (104, 82), (104, 83), (104, 84), (104, 85), (104, 86), (104, 87), (104, 88), (104, 89), (104, 90), (104, 91), (104, 92), (104, 93), (104, 94), (104, 95), (104, 96), (104, 97), (104, 98), (104, 99), (104, 100), (104, 101), (104, 102), (104, 103), (104, 104), (104, 105), (104, 106), (104, 110), (105, 78), (105, 80), (105, 81), (105, 82), (105, 83), (105, 84), (105, 85), (105, 86), (105, 87), (105, 88), (105, 89), (105, 90), (105, 91), (105, 92), (105, 93), (105, 94), (105, 95), (105, 96), (105, 97), (105, 98), (105, 99), (105, 100), (105, 101), (105, 102), (105, 103), (105, 104), (105, 105), (105, 106), (105, 107), (105, 108), (105, 109), (105, 111), (106, 79), (106, 80), (106, 81), (106, 82), (106, 83), (106, 84), (106, 85), (106, 86), (106, 87), (106, 88), (106, 89), (106, 90), (106, 91), (106, 92), (106, 93), (106, 94), (106, 95), (106, 96), (106, 97), (106, 98), (106, 99), (106, 100), (106, 101), (106, 102), (106, 103), (106, 104), (106, 105), (106, 106), (106, 107), (106, 108), (106, 109), (106, 111), (107, 77), (107, 79), (107, 80), (107, 81), (107, 82), (107, 83), (107, 84), (107, 85), (107, 86), (107, 87), (107, 88), (107, 89), (107, 90), (107, 91), (107, 92), (107, 93), (107, 94), (107, 95), (107, 96), (107, 97), (107, 98), (107, 99), (107, 100), (107, 101), (107, 102), (107, 103), (107, 104), (107, 105), (107, 106), (107, 107), (107, 108), (107, 109), (107, 110), (107, 112), (108, 76), (108, 78), (108, 79), (108, 80), (108, 81), (108, 82), (108, 83), (108, 84), (108, 85), (108, 86), (108, 87), (108, 88), (108, 89), (108, 90), (108, 91), (108, 92), (108, 93), (108, 94), (108, 95), (108, 96), (108, 97), (108, 98), (108, 99), (108, 100), (108, 101), (108, 102), (108, 103), (108, 104), (108, 105), (108, 106), (108, 107), (108, 108), (108, 109), (108, 110), (108, 112), (109, 77), (109, 78), (109, 79), (109, 80), (109, 81), (109, 82), (109, 83), (109, 84), (109, 85), (109, 86), (109, 87), (109, 88), (109, 89), (109, 90), (109, 91), (109, 92), (109, 93), (109, 94), (109, 95), (109, 96), (109, 97), (109, 98), (109, 99), (109, 100), (109, 101), (109, 102), (109, 103), (109, 104), (109, 105), (109, 106), (109, 107), (109, 108), (109, 109), (109, 110), (109, 111), (109, 113), (110, 75), (110, 77), (110, 78), (110, 79), (110, 80), (110, 81), (110, 82), (110, 83), (110, 84), (110, 85), (110, 86), (110, 87), (110, 88), (110, 89), (110, 90), (110, 91), (110, 92), (110, 93), (110, 94), (110, 95), (110, 96), (110, 97), (110, 98), (110, 99), (110, 100), (110, 101), (110, 102), (110, 103), (110, 104), (110, 105), (110, 106), (110, 107), (110, 108), (110, 109), (110, 110), (110, 111), (110, 113), (111, 74), (111, 76), (111, 77), (111, 78), (111, 79), (111, 80), (111, 81), (111, 82), (111, 83), (111, 84), (111, 85), (111, 86), (111, 87), (111, 88), (111, 89), (111, 90), (111, 91), (111, 92), (111, 93), (111, 94), (111, 95), (111, 96), (111, 97), (111, 98), (111, 99), (111, 100), (111, 101), (111, 102), (111, 103), (111, 104), (111, 105), (111, 106), (111, 107), (111, 108), (111, 109), (111, 110), (111, 111), (111, 113), (112, 74), (112, 76), (112, 77), (112, 78), (112, 79), (112, 80), (112, 81), (112, 82), (112, 83), (112, 84), (112, 85), (112, 86), (112, 87), (112, 88), (112, 89), (112, 90), (112, 91), (112, 92), (112, 93), (112, 94), (112, 95), (112, 96), (112, 97), (112, 98), (112, 99), (112, 100), (112, 101), (112, 102), (112, 103), (112, 104), (112, 105), (112, 106), (112, 107), (112, 108), (112, 109), (112, 110), (112, 111), (112, 113), (113, 73), (113, 75), (113, 76), (113, 77), (113, 78), (113, 79), (113, 80), (113, 81), (113, 82), (113, 83), (113, 84), (113, 85), (113, 86), (113, 87), (113, 88), (113, 89), (113, 90), (113, 91), (113, 92), (113, 93), (113, 94), (113, 95), (113, 96), (113, 97), (113, 98), (113, 99), (113, 100), (113, 101), (113, 102), (113, 103), (113, 104), (113, 105), (113, 106), (113, 107), (113, 108), (113, 109), (113, 110), (113, 111), (113, 113), (114, 73), (114, 75), (114, 76), (114, 77), (114, 78), (114, 79), (114, 80), (114, 81), (114, 82), (114, 83), (114, 84), (114, 85), (114, 86), (114, 87), (114, 88), (114, 89), (114, 90), (114, 91), (114, 92), (114, 93), (114, 94), (114, 95), (114, 96), (114, 97), (114, 98), (114, 99), (114, 100), (114, 101), (114, 102), (114, 103), (114, 104), (114, 105), (114, 106), (114, 107), (114, 108), (114, 109), (114, 110), (114, 111), (114, 113), (115, 72), (115, 74), (115, 75), (115, 76), (115, 77), (115, 78), (115, 79), (115, 80), (115, 81), (115, 82), (115, 83), (115, 84), (115, 85), (115, 86), (115, 87), (115, 88), (115, 89), (115, 90), (115, 91), (115, 92), (115, 93), (115, 94), (115, 95), (115, 96), (115, 97), (115, 98), (115, 99), (115, 100), (115, 101), (115, 102), (115, 103), (115, 104), (115, 105), (115, 106), (115, 107), (115, 108), (115, 109), (115, 110), (115, 111), (115, 113), (116, 72), (116, 74), (116, 75), (116, 76), (116, 77), (116, 78), (116, 79), (116, 80), (116, 81), (116, 82), (116, 83), (116, 84), (116, 85), (116, 86), (116, 87), (116, 88), (116, 89), (116, 90), (116, 91), (116, 92), (116, 93), (116, 94), (116, 95), (116, 96), (116, 97), (116, 98), (116, 99), (116, 100), (116, 101), (116, 102), (116, 103), (116, 104), (116, 105), (116, 106), (116, 107), (116, 108), (116, 109), (116, 110), (116, 111), (116, 113), (117, 71), (117, 73), (117, 74), (117, 75), (117, 76), (117, 77), (117, 78), (117, 79), (117, 80), (117, 81), (117, 82), (117, 83), (117, 84), (117, 85), (117, 86), (117, 87), (117, 88), (117, 89), (117, 90), (117, 91), (117, 92), (117, 93), (117, 94), (117, 95), (117, 96), (117, 97), (117, 98), (117, 99), (117, 100), (117, 101), (117, 102), (117, 103), (117, 104), (117, 105), (117, 106), (117, 107), (117, 108), (117, 109), (117, 110), (117, 111), (117, 113), (118, 71), (118, 73), (118, 74), (118, 75), (118, 76), (118, 77), (118, 78), (118, 79), (118, 80), (118, 81), (118, 82), (118, 83), (118, 84), (118, 85), (118, 86), (118, 87), (118, 88), (118, 89), (118, 90), (118, 91), (118, 92), (118, 93), (118, 94), (118, 95), (118, 96), (118, 97), (118, 98), (118, 99), (118, 100), (118, 101), (118, 102), (118, 103), (118, 104), (118, 105), (118, 106), (118, 107), (118, 108), (118, 109), (118, 110), (118, 111), (118, 113), (119, 70), (119, 72), (119, 73), (119, 74), (119, 75), (119, 76), (119, 77), (119, 78), (119, 79), (119, 80), (119, 81), (119, 82), (119, 83), (119, 84), (119, 85), (119, 86), (119, 87), (119, 88), (119, 89), (119, 90), (119, 91), (119, 92), (119, 93), (119, 94), (119, 95), (119, 96), (119, 97), (119, 98), (119, 99), (119, 100), (119, 101), (119, 102), (119, 103), (119, 104), (119, 105), (119, 106), (119, 107), (119, 108), (119, 109), (119, 110), (119, 111), (119, 113), (120, 70), (120, 72), (120, 73), (120, 74), (120, 75), (120, 76), (120, 77), (120, 78), (120, 79), (120, 80), (120, 81), (120, 82), (120, 83), (120, 84), (120, 85), (120, 86), (120, 87), (120, 88), (120, 89), (120, 90), (120, 91), (120, 92), (120, 93), (120, 94), (120, 95), (120, 96), (120, 97), (120, 98), (120, 99), (120, 100), (120, 101), (120, 102), (120, 103), (120, 104), (120, 105), (120, 106), (120, 107), (120, 108), (120, 109), (120, 110), (120, 111), (120, 113), (121, 69), (121, 71), (121, 72), (121, 73), (121, 74), (121, 75), (121, 76), (121, 77), (121, 78), (121, 79), (121, 80), (121, 81), (121, 82), (121, 83), (121, 84), (121, 85), (121, 86), (121, 87), (121, 88), (121, 89), (121, 90), (121, 91), (121, 92), (121, 93), (121, 94), (121, 95), (121, 96), (121, 97), (121, 98), (121, 99), (121, 100), (121, 101), (121, 102), (121, 103), (121, 104), (121, 105), (121, 106), (121, 107), (121, 108), (121, 109), (121, 110), (121, 111), (121, 113), (122, 69), (122, 71), (122, 72), (122, 73), (122, 74), (122, 75), (122, 76), (122, 77), (122, 78), (122, 79), (122, 80), (122, 81), (122, 82), (122, 83), (122, 84), (122, 85), (122, 86), (122, 87), (122, 88), (122, 89), (122, 90), (122, 91), (122, 92), (122, 93), (122, 94), (122, 95), (122, 96), (122, 97), (122, 98), (122, 99), (122, 100), (122, 101), (122, 102), (122, 103), (122, 104), (122, 105), (122, 106), (122, 107), (122, 108), (122, 109), (122, 110), (122, 111), (122, 113), (123, 68), (123, 70), (123, 71), (123, 72), (123, 73), (123, 74), (123, 75), (123, 76), (123, 77), (123, 78), (123, 79), (123, 80), (123, 81), (123, 82), (123, 83), (123, 84), (123, 85), (123, 86), (123, 87), (123, 88), (123, 89), (123, 90), (123, 91), (123, 92), (123, 93), (123, 94), (123, 95), (123, 96), (123, 97), (123, 98), (123, 99), (123, 100), (123, 101), (123, 102), (123, 103), (123, 104), (123, 105), (123, 106), (123, 107), (123, 108), (123, 109), (123, 110), (123, 111), (123, 112), (123, 114), (124, 68), (124, 69), (124, 70), (124, 71), (124, 72), (124, 73), (124, 74), (124, 75), (124, 76), (124, 77), (124, 78), (124, 79), (124, 80), (124, 81), (124, 82), (124, 83), (124, 84), (124, 85), (124, 86), (124, 87), (124, 88), (124, 89), (124, 90), (124, 91), (124, 92), (124, 93), (124, 94), (124, 95), (124, 96), (124, 97), (124, 98), (124, 99), (124, 100), (124, 101), (124, 102), (124, 103), (124, 104), (124, 105), (124, 106), (124, 107), (124, 108), (124, 109), (124, 110), (124, 111), (124, 112), (124, 114), (125, 67), (125, 69), (125, 70), (125, 71), (125, 72), (125, 73), (125, 74), (125, 75), (125, 76), (125, 77), (125, 78), (125, 79), (125, 80), (125, 81), (125, 82), (125, 83), (125, 84), (125, 85), (125, 86), (125, 87), (125, 88), (125, 89), (125, 90), (125, 91), (125, 92), (125, 93), (125, 94), (125, 95), (125, 96), (125, 97), (125, 98), (125, 99), (125, 100), (125, 101), (125, 102), (125, 103), (125, 104), (125, 105), (125, 106), (125, 107), (125, 108), (125, 109), (125, 110), (125, 111), (125, 112), (125, 113), (125, 114), (125, 116), (125, 117), (126, 66), (126, 68), (126, 69), (126, 70), (126, 71), (126, 72), (126, 73), (126, 74), (126, 75), (126, 76), (126, 77), (126, 78), (126, 79), (126, 80), (126, 81), (126, 82), (126, 83), (126, 84), (126, 85), (126, 86), (126, 87), (126, 88), (126, 89), (126, 90), (126, 91), (126, 92), (126, 93), (126, 94), (126, 95), (126, 96), (126, 97), (126, 98), (126, 99), (126, 100), (126, 101), (126, 102), (126, 103), (126, 104), (126, 105), (126, 106), (126, 107), (126, 108), (126, 109), (126, 110), (126, 111), (126, 112), (126, 113), (126, 114), (126, 117), (127, 66), (127, 68), (127, 69), (127, 70), (127, 71), (127, 72), (127, 73), (127, 74), (127, 75), (127, 76), (127, 77), (127, 78), (127, 79), (127, 80), (127, 81), (127, 82), (127, 83), (127, 84), (127, 85), (127, 86), (127, 93), (127, 94), (127, 95), (127, 96), (127, 97), (127, 98), (127, 99), (127, 100), (127, 101), (127, 102), (127, 103), (127, 104), (127, 105), (127, 106), (127, 107), (127, 108), (127, 109), (127, 110), (127, 111), (127, 112), (127, 113), (127, 114), (127, 115), (127, 117), (128, 65), (128, 67), (128, 68), (128, 69), (128, 70), (128, 71), (128, 72), (128, 73), (128, 74), (128, 75), (128, 76), (128, 77), (128, 78), (128, 79), (128, 80), (128, 81), (128, 82), (128, 83), (128, 84), (128, 85), (128, 88), (128, 89), (128, 90), (128, 91), (128, 94), (128, 95), (128, 96), (128, 97), (128, 98), (128, 99), (128, 100), (128, 101), (128, 102), (128, 103), (128, 104), (128, 105), (128, 106), (128, 107), (128, 108), (128, 109), (128, 110), (128, 111), (128, 112), (128, 113), (128, 114), (128, 115), (128, 117), (129, 65), (129, 67), (129, 68), (129, 69), (129, 70), (129, 71), (129, 72), (129, 73), (129, 74), (129, 75), (129, 76), (129, 77), (129, 78), (129, 79), (129, 80), (129, 81), (129, 82), (129, 83), (129, 86), (129, 93), (129, 96), (129, 97), (129, 98), (129, 99), (129, 100), (129, 101), (129, 102), (129, 103), (129, 104), (129, 105), (129, 106), (129, 107), (129, 108), (129, 109), (129, 110), (129, 111), (129, 112), (129, 113), (129, 114), (129, 115), (129, 117), (130, 64), (130, 66), (130, 67), (130, 68), (130, 69), (130, 70), (130, 71), (130, 72), (130, 73), (130, 74), (130, 75), (130, 76), (130, 77), (130, 78), (130, 79), (130, 80), (130, 81), (130, 82), (130, 85), (130, 97), (130, 98), (130, 99), (130, 100), (130, 101), (130, 102), (130, 103), (130, 104), (130, 105), (130, 106), (130, 107), (130, 108), (130, 109), (130, 110), (130, 111), (130, 112), (130, 113), (130, 114), (130, 115), (130, 117), (131, 64), (131, 66), (131, 67), (131, 68), (131, 69), (131, 70), (131, 71), (131, 72), (131, 73), (131, 74), (131, 75), (131, 76), (131, 77), (131, 78), (131, 79), (131, 80), (131, 81), (131, 96), (131, 98), (131, 99), (131, 100), (131, 101), (131, 102), (131, 103), (131, 104), (131, 105), (131, 106), (131, 107), (131, 108), (131, 109), (131, 110), (131, 111), (131, 112), (131, 113), (131, 114), (131, 115), (131, 116), (131, 118), (132, 63), (132, 65), (132, 66), (132, 67), (132, 68), (132, 69), (132, 70), (132, 71), (132, 72), (132, 73), (132, 74), (132, 75), (132, 76), (132, 77), (132, 78), (132, 79), (132, 80), (132, 81), (132, 83), (132, 97), (132, 99), (132, 100), (132, 101), (132, 102), (132, 103), (132, 104), (132, 105), (132, 106), (132, 107), (132, 108), (132, 109), (132, 110), (132, 111), (132, 112), (132, 113), (132, 114), (132, 115), (132, 116), (132, 118), (133, 63), (133, 65), (133, 66), (133, 67), (133, 68), (133, 69), (133, 70), (133, 71), (133, 72), (133, 73), (133, 74), (133, 75), (133, 76), (133, 77), (133, 78), (133, 79), (133, 80), (133, 82), (133, 98), (133, 100), (133, 101), (133, 102), (133, 103), (133, 104), (133, 105), (133, 106), (133, 107), (133, 108), (133, 109), (133, 110), (133, 111), (133, 112), (133, 113), (133, 114), (133, 115), (133, 116), (133, 118), (134, 62), (134, 64), (134, 65), (134, 66), (134, 67), (134, 68), (134, 69), (134, 70), (134, 71), (134, 72), (134, 73), (134, 74), (134, 75), (134, 76), (134, 77), (134, 78), (134, 79), (134, 81), (134, 99), (134, 101), (134, 102), (134, 103), (134, 104), (134, 105), (134, 106), (134, 107), (134, 108), (134, 109), (134, 110), (134, 111), (134, 112), (134, 113), (134, 114), (134, 115), (134, 116), (134, 118), (135, 62), (135, 64), (135, 65), (135, 66), (135, 67), (135, 68), (135, 69), (135, 70), (135, 71), (135, 72), (135, 73), (135, 74), (135, 75), (135, 76), (135, 77), (135, 78), (135, 79), (135, 81), (135, 100), (135, 102), (135, 103), (135, 104), (135, 105), (135, 106), (135, 107), (135, 108), (135, 109), (135, 110), (135, 111), (135, 112), (135, 113), (135, 114), (135, 115), (135, 116), (135, 117), (135, 119), (136, 61), (136, 63), (136, 64), (136, 65), (136, 66), (136, 67), (136, 68), (136, 69), (136, 70), (136, 71), (136, 72), (136, 73), (136, 74), (136, 75), (136, 76), (136, 77), (136, 78), (136, 80), (136, 101), (136, 103), (136, 104), (136, 105), (136, 106), (136, 107), (136, 108), (136, 109), (136, 110), (136, 111), (136, 112), (136, 113), (136, 114), (136, 115), (136, 116), (136, 117), (136, 119), (137, 61), (137, 63), (137, 64), (137, 65), (137, 66), (137, 67), (137, 68), (137, 69), (137, 70), (137, 71), (137, 72), (137, 73), (137, 74), (137, 75), (137, 76), (137, 77), (137, 78), (137, 80), (137, 102), (137, 104), (137, 105), (137, 106), (137, 107), (137, 108), (137, 109), (137, 110), (137, 111), (137, 112), (137, 113), (137, 114), (137, 115), (137, 116), (137, 117), (137, 119), (138, 60), (138, 62), (138, 63), (138, 64), (138, 65), (138, 66), (138, 67), (138, 68), (138, 69), (138, 70), (138, 71), (138, 72), (138, 73), (138, 74), (138, 75), (138, 76), (138, 77), (138, 78), (138, 80), (138, 103), (138, 105), (138, 106), (138, 107), (138, 108), (138, 109), (138, 110), (138, 111), (138, 112), (138, 113), (138, 114), (138, 115), (138, 116), (138, 117), (138, 119), (139, 60), (139, 62), (139, 63), (139, 64), (139, 65), (139, 66), (139, 67), (139, 68), (139, 69), (139, 70), (139, 71), (139, 72), (139, 73), (139, 74), (139, 75), (139, 76), (139, 77), (139, 78), (139, 80), (139, 104), (139, 106), (139, 107), (139, 108), (139, 109), (139, 110), (139, 111), (139, 112), (139, 113), (139, 114), (139, 115), (139, 116), (139, 117), (139, 119), (140, 59), (140, 61), (140, 62), (140, 63), (140, 64), (140, 65), (140, 66), (140, 67), (140, 68), (140, 69), (140, 70), (140, 71), (140, 72), (140, 73), (140, 74), (140, 75), (140, 76), (140, 77), (140, 79), (140, 105), (140, 108), (140, 109), (140, 110), (140, 111), (140, 112), (140, 113), (140, 114), (140, 115), (140, 118), (140, 119), (141, 59), (141, 61), (141, 62), (141, 63), (141, 64), (141, 65), (141, 66), (141, 67), (141, 68), (141, 69), (141, 70), (141, 71), (141, 72), (141, 73), (141, 74), (141, 75), (141, 76), (141, 77), (141, 79), (141, 106), (141, 109), (141, 110), (141, 111), (141, 112), (141, 116), (142, 58), (142, 60), (142, 61), (142, 62), (142, 63), (142, 64), (142, 65), (142, 66), (142, 67), (142, 68), (142, 69), (142, 70), (142, 71), (142, 72), (142, 73), (142, 74), (142, 75), (142, 76), (142, 77), (142, 79), (142, 107), (142, 114), (142, 115), (143, 58), (143, 60), (143, 61), (143, 62), (143, 63), (143, 64), (143, 65), (143, 66), (143, 67), (143, 68), (143, 69), (143, 70), (143, 71), (143, 72), (143, 73), (143, 74), (143, 75), (143, 76), (143, 77), (143, 79), (143, 109), (143, 112), (144, 57), (144, 59), (144, 60), (144, 61), (144, 62), (144, 63), (144, 64), (144, 65), (144, 66), (144, 67), (144, 68), (144, 69), (144, 70), (144, 71), (144, 72), (144, 73), (144, 74), (144, 75), (144, 76), (144, 77), (144, 78), (144, 79), (145, 57), (145, 59), (145, 60), (145, 61), (145, 62), (145, 63), (145, 64), (145, 65), (145, 66), (145, 67), (145, 68), (145, 69), (145, 70), (145, 71), (145, 72), (145, 73), (145, 74), (145, 75), (145, 76), (145, 78), (146, 57), (146, 59), (146, 60), (146, 61), (146, 62), (146, 63), (146, 64), (146, 65), (146, 66), (146, 67), (146, 68), (146, 69), (146, 70), (146, 71), (146, 72), (146, 73), (146, 74), (146, 75), (146, 76), (146, 78), (147, 56), (147, 58), (147, 59), (147, 60), (147, 61), (147, 62), (147, 63), (147, 64), (147, 65), (147, 66), (147, 67), (147, 68), (147, 69), (147, 70), (147, 71), (147, 72), (147, 73), (147, 74), (147, 75), (147, 77), (148, 56), (148, 58), (148, 59), (148, 60), (148, 61), (148, 62), (148, 63), (148, 64), (148, 65), (148, 66), (148, 67), (148, 68), (148, 69), (148, 70), (148, 71), (148, 72), (148, 73), (148, 74), (148, 75), (148, 77), (149, 55), (149, 57), (149, 58), (149, 59), (149, 60), (149, 61), (149, 62), (149, 63), (149, 64), (149, 65), (149, 66), (149, 67), (149, 68), (149, 69), (149, 70), (149, 71), (149, 72), (149, 73), (149, 74), (149, 76), (150, 55), (150, 57), (150, 58), (150, 59), (150, 60), (150, 61), (150, 62), (150, 63), (150, 64), (150, 65), (150, 66), (150, 67), (150, 68), (150, 69), (150, 70), (150, 71), (150, 72), (150, 73), (150, 74), (150, 76), (151, 55), (151, 57), (151, 58), (151, 59), (151, 60), (151, 61), (151, 62), (151, 63), (151, 64), (151, 65), (151, 66), (151, 67), (151, 68), (151, 69), (151, 70), (151, 71), (151, 72), (151, 73), (151, 75), (152, 54), (152, 56), (152, 57), (152, 58), (152, 59), (152, 60), (152, 61), (152, 62), (152, 63), (152, 64), (152, 65), (152, 66), (152, 67), (152, 68), (152, 69), (152, 70), (152, 71), (152, 72), (152, 73), (152, 75), (153, 54), (153, 56), (153, 57), (153, 58), (153, 59), (153, 60), (153, 61), (153, 62), (153, 63), (153, 64), (153, 65), (153, 66), (153, 67), (153, 68), (153, 69), (153, 70), (153, 71), (153, 72), (153, 74), (154, 53), (154, 55), (154, 56), (154, 57), (154, 58), (154, 59), (154, 60), (154, 61), (154, 62), (154, 63), (154, 64), (154, 65), (154, 66), (154, 67), (154, 68), (154, 69), (154, 70), (154, 71), (154, 72), (154, 74), (155, 53), (155, 55), (155, 56), (155, 57), (155, 58), (155, 59), (155, 60), (155, 61), (155, 62), (155, 63), (155, 64), (155, 65), (155, 66), (155, 67), (155, 68), (155, 69), (155, 70), (155, 71), (155, 73), (156, 53), (156, 55), (156, 56), (156, 57), (156, 58), (156, 59), (156, 60), (156, 61), (156, 62), (156, 63), (156, 64), (156, 65), (156, 66), (156, 67), (156, 68), (156, 69), (156, 70), (156, 72), (157, 52), (157, 54), (157, 55), (157, 56), (157, 57), (157, 58), (157, 59), (157, 60), (157, 61), (157, 62), (157, 63), (157, 64), (157, 65), (157, 66), (157, 67), (157, 68), (157, 69), (157, 70), (157, 72), (158, 52), (158, 54), (158, 55), (158, 56), (158, 57), (158, 58), (158, 59), (158, 60), (158, 61), (158, 62), (158, 63), (158, 64), (158, 65), (158, 66), (158, 67), (158, 68), (158, 69), (158, 71), (159, 52), (159, 54), (159, 55), (159, 56), (159, 57), (159, 58), (159, 59), (159, 60), (159, 61), (159, 62), (159, 63), (159, 64), (159, 65), (159, 66), (159, 67), (159, 68), (159, 69), (159, 71), (160, 51), (160, 53), (160, 54), (160, 55), (160, 56), (160, 57), (160, 58), (160, 59), (160, 60), (160, 61), (160, 62), (160, 63), (160, 64), (160, 65), (160, 66), (160, 67), (160, 68), (160, 70), (161, 51), (161, 53), (161, 54), (161, 55), (161, 56), (161, 57), (161, 58), (161, 59), (161, 60), (161, 61), (161, 62), (161, 63), (161, 64), (161, 65), (161, 66), (161, 67), (161, 68), (161, 70), (162, 51), (162, 53), (162, 54), (162, 55), (162, 56), (162, 57), (162, 58), (162, 59), (162, 60), (162, 61), (162, 62), (162, 63), (162, 64), (162, 65), (162, 66), (162, 67), (162, 69), (163, 51), (163, 53), (163, 54), (163, 55), (163, 56), (163, 57), (163, 58), (163, 59), (163, 60), (163, 61), (163, 62), (163, 63), (163, 64), (163, 65), (163, 66), (163, 67), (163, 69), (164, 50), (164, 52), (164, 53), (164, 54), (164, 55), (164, 56), (164, 57), (164, 58), (164, 59), (164, 60), (164, 61), (164, 62), (164, 63), (164, 64), (164, 65), (164, 66), (164, 68), (165, 50), (165, 52), (165, 53), (165, 54), (165, 55), (165, 56), (165, 57), (165, 58), (165, 59), (165, 60), (165, 61), (165, 62), (165, 63), (165, 64), (165, 65), (165, 66), (165, 67), (166, 50), (166, 52), (166, 53), (166, 54), (166, 55), (166, 56), (166, 57), (166, 58), (166, 59), (166, 60), (166, 61), (166, 62), (166, 63), (166, 64), (166, 65), (166, 67), (167, 50), (167, 52), (167, 53), (167, 54), (167, 55), (167, 56), (167, 57), (167, 58), (167, 59), (167, 60), (167, 61), (167, 62), (167, 63), (167, 64), (167, 65), (167, 66), (168, 50), (168, 52), (168, 53), (168, 54), (168, 55), (168, 56), (168, 57), (168, 58), (168, 59), (168, 60), (168, 61), (168, 62), (168, 63), (168, 64), (168, 66), (169, 49), (169, 51), (169, 52), (169, 53), (169, 54), (169, 55), (169, 56), (169, 57), (169, 58), (169, 59), (169, 60), (169, 61), (169, 62), (169, 63), (169, 64), (169, 66), (170, 49), (170, 51), (170, 52), (170, 53), (170, 54), (170, 55), (170, 56), (170, 57), (170, 58), (170, 59), (170, 60), (170, 61), (170, 62), (170, 63), (170, 65), (171, 49), (171, 51), (171, 52), (171, 53), (171, 54), (171, 55), (171, 56), (171, 57), (171, 58), (171, 59), (171, 60), (171, 61), (171, 62), (171, 63), (171, 65), (172, 49), (172, 51), (172, 52), (172, 53), (172, 54), (172, 55), (172, 56), (172, 57), (172, 58), (172, 59), (172, 60), (172, 61), (172, 62), (172, 64), (173, 49), (173, 51), (173, 52), (173, 53), (173, 54), (173, 55), (173, 56), (173, 57), (173, 58), (173, 59), (173, 60), (173, 61), (173, 62), (173, 64), (174, 49), (174, 51), (174, 52), (174, 53), (174, 54), (174, 55), (174, 56), (174, 57), (174, 58), (174, 59), (174, 60), (174, 61), (174, 62), (174, 64), (175, 49), (175, 51), (175, 52), (175, 53), (175, 54), (175, 55), (175, 56), (175, 57), (175, 58), (175, 59), (175, 60), (175, 61), (175, 63), (176, 49), (176, 52), (176, 53), (176, 54), (176, 55), (176, 56), (176, 57), (176, 58), (176, 59), (176, 60), (176, 61), (176, 63), (177, 49), (177, 51), (177, 52), (177, 63), (178, 52), (178, 53), (178, 54), (178, 55), (178, 56), (178, 57), (178, 58), (178, 59), (178, 60), (178, 61), (178, 63), (221, 51), (221, 52), (221, 53), (221, 54), (221, 55), (221, 56), (221, 57), (221, 58), (221, 59), (221, 60), (221, 61), (221, 63), (222, 49), (222, 63), (223, 49), (223, 51), (223, 52), (223, 53), (223, 54), (223, 55), (223, 56), (223, 57), (223, 58), (223, 59), (223, 60), (223, 61), (223, 63), (224, 49), (224, 51), (224, 52), (224, 53), (224, 54), (224, 55), (224, 56), (224, 57), (224, 58), (224, 59), (224, 60), (224, 61), (224, 63), (225, 49), (225, 51), (225, 52), (225, 53), (225, 54), (225, 55), (225, 56), (225, 57), (225, 58), (225, 59), (225, 60), (225, 61), (225, 62), (225, 64), (226, 49), (226, 51), (226, 52), (226, 53), (226, 54), (226, 55), (226, 56), (226, 57), (226, 58), (226, 59), (226, 60), (226, 61), (226, 62), (226, 64), (227, 49), (227, 51), (227, 52), (227, 53), (227, 54), (227, 55), (227, 56), (227, 57), (227, 58), (227, 59), (227, 60), (227, 61), (227, 62), (227, 64), (228, 49), (228, 51), (228, 52), (228, 53), (228, 54), (228, 55), (228, 56), (228, 57), (228, 58), (228, 59), (228, 60), (228, 61), (228, 62), (228, 63), (228, 65), (229, 49), (229, 51), (229, 52), (229, 53), (229, 54), (229, 55), (229, 56), (229, 57), (229, 58), (229, 59), (229, 60), (229, 61), (229, 62), (229, 63), (229, 65), (230, 49), (230, 51), (230, 52), (230, 53), (230, 54), (230, 55), (230, 56), (230, 57), (230, 58), (230, 59), (230, 60), (230, 61), (230, 62), (230, 63), (230, 64), (230, 66), (231, 50), (231, 52), (231, 53), (231, 54), (231, 55), (231, 56), (231, 57), (231, 58), (231, 59), (231, 60), (231, 61), (231, 62), (231, 63), (231, 64), (231, 66), (232, 50), (232, 52), (232, 53), (232, 54), (232, 55), (232, 56), (232, 57), (232, 58), (232, 59), (232, 60), (232, 61), (232, 62), (232, 63), (232, 64), (232, 65), (232, 67), (233, 50), (233, 52), (233, 53), (233, 54), (233, 55), (233, 56), (233, 57), (233, 58), (233, 59), (233, 60), (233, 61), (233, 62), (233, 63), (233, 64), (233, 65), (233, 67), (234, 50), (234, 52), (234, 53), (234, 54), (234, 55), (234, 56), (234, 57), (234, 58), (234, 59), (234, 60), (234, 61), (234, 62), (234, 63), (234, 64), (234, 65), (234, 66), (234, 68), (235, 50), (235, 52), (235, 53), (235, 54), (235, 55), (235, 56), (235, 57), (235, 58), (235, 59), (235, 60), (235, 61), (235, 62), (235, 63), (235, 64), (235, 65), (235, 66), (235, 68), (236, 51), (236, 53), (236, 54), (236, 55), (236, 56), (236, 57), (236, 58), (236, 59), (236, 60), (236, 61), (236, 62), (236, 63), (236, 64), (236, 65), (236, 66), (236, 67), (236, 69), (237, 51), (237, 53), (237, 54), (237, 55), (237, 56), (237, 57), (237, 58), (237, 59), (237, 60), (237, 61), (237, 62), (237, 63), (237, 64), (237, 65), (237, 66), (237, 67), (237, 69), (238, 51), (238, 53), (238, 54), (238, 55), (238, 56), (238, 57), (238, 58), (238, 59), (238, 60), (238, 61), (238, 62), (238, 63), (238, 64), (238, 65), (238, 66), (238, 67), (238, 68), (238, 70), (239, 51), (239, 52), (239, 53), (239, 54), (239, 55), (239, 56), (239, 57), (239, 58), (239, 59), (239, 60), (239, 61), (239, 62), (239, 63), (239, 64), (239, 65), (239, 66), (239, 67), (239, 68), (239, 70), (240, 52), (240, 54), (240, 55), (240, 56), (240, 57), (240, 58), (240, 59), (240, 60), (240, 61), (240, 62), (240, 63), (240, 64), (240, 65), (240, 66), (240, 67), (240, 68), (240, 69), (240, 71), (241, 52), (241, 54), (241, 55), (241, 56), (241, 57), (241, 58), (241, 59), (241, 60), (241, 61), (241, 62), (241, 63), (241, 64), (241, 65), (241, 66), (241, 67), (241, 68), (241, 69), (241, 71), (242, 52), (242, 54), (242, 55), (242, 56), (242, 57), (242, 58), (242, 59), (242, 60), (242, 61), (242, 62), (242, 63), (242, 64), (242, 65), (242, 66), (242, 67), (242, 68), (242, 69), (242, 70), (242, 72), (243, 53), (243, 55), (243, 56), (243, 57), (243, 58), (243, 59), (243, 60), (243, 61), (243, 62), (243, 63), (243, 64), (243, 65), (243, 66), (243, 67), (243, 68), (243, 69), (243, 70), (243, 72), (244, 53), (244, 55), (244, 56), (244, 57), (244, 58), (244, 59), (244, 60), (244, 61), (244, 62), (244, 63), (244, 64), (244, 65), (244, 66), (244, 67), (244, 68), (244, 69), (244, 70), (244, 71), (244, 73), (245, 53), (245, 55), (245, 56), (245, 57), (245, 58), (245, 59), (245, 60), (245, 61), (245, 62), (245, 63), (245, 64), (245, 65), (245, 66), (245, 67), (245, 68), (245, 69), (245, 70), (245, 71), (245, 72), (245, 74), (246, 54), (246, 56), (246, 57), (246, 58), (246, 59), (246, 60), (246, 61), (246, 62), (246, 63), (246, 64), (246, 65), (246, 66), (246, 67), (246, 68), (246, 69), (246, 70), (246, 71), (246, 72), (246, 74), (247, 54), (247, 56), (247, 57), (247, 58), (247, 59), (247, 60), (247, 61), (247, 62), (247, 63), (247, 64), (247, 65), (247, 66), (247, 67), (247, 68), (247, 69), (247, 70), (247, 71), (247, 72), (247, 73), (247, 75), (248, 55), (248, 57), (248, 58), (248, 59), (248, 60), (248, 61), (248, 62), (248, 63), (248, 64), (248, 65), (248, 66), (248, 67), (248, 68), (248, 69), (248, 70), (248, 71), (248, 72), (248, 73), (248, 75), (249, 55), (249, 57), (249, 58), (249, 59), (249, 60), (249, 61), (249, 62), (249, 63), (249, 64), (249, 65), (249, 66), (249, 67), (249, 68), (249, 69), (249, 70), (249, 71), (249, 72), (249, 73), (249, 74), (249, 76), (250, 55), (250, 57), (250, 58), (250, 59), (250, 60), (250, 61), (250, 62), (250, 63), (250, 64), (250, 65), (250, 66), (250, 67), (250, 68), (250, 69), (250, 70), (250, 71), (250, 72), (250, 73), (250, 74), (250, 76), (251, 56), (251, 58), (251, 59), (251, 60), (251, 61), (251, 62), (251, 63), (251, 64), (251, 65), (251, 66), (251, 67), (251, 68), (251, 69), (251, 70), (251, 71), (251, 72), (251, 73), (251, 74), (251, 75), (251, 77), (252, 56), (252, 58), (252, 59), (252, 60), (252, 61), (252, 62), (252, 63), (252, 64), (252, 65), (252, 66), (252, 67), (252, 68), (252, 69), (252, 70), (252, 71), (252, 72), (252, 73), (252, 74), (252, 75), (252, 77), (253, 57), (253, 59), (253, 60), (253, 61), (253, 62), (253, 63), (253, 64), (253, 65), (253, 66), (253, 67), (253, 68), (253, 69), (253, 70), (253, 71), (253, 72), (253, 73), (253, 74), (253, 75), (253, 76), (253, 78), (254, 57), (254, 59), (254, 60), (254, 61), (254, 62), (254, 63), (254, 64), (254, 65), (254, 66), (254, 67), (254, 68), (254, 69), (254, 70), (254, 71), (254, 72), (254, 73), (254, 74), (254, 75), (254, 76), (254, 78), (255, 58), (255, 60), (255, 61), (255, 62), (255, 63), (255, 64), (255, 65), (255, 66), (255, 67), (255, 68), (255, 69), (255, 70), (255, 71), (255, 72), (255, 73), (255, 74), (255, 75), (255, 76), (255, 77), (255, 79), (256, 58), (256, 60), (256, 61), (256, 62), (256, 63), (256, 64), (256, 65), (256, 66), (256, 67), (256, 68), (256, 69), (256, 70), (256, 71), (256, 72), (256, 73), (256, 74), (256, 75), (256, 76), (256, 77), (256, 79), (256, 109), (256, 111), (256, 112), (257, 58), (257, 60), (257, 61), (257, 62), (257, 63), (257, 64), (257, 65), (257, 66), (257, 67), (257, 68), (257, 69), (257, 70), (257, 71), (257, 72), (257, 73), (257, 74), (257, 75), (257, 76), (257, 77), (257, 79), (257, 107), (257, 115), (258, 59), (258, 61), (258, 62), (258, 63), (258, 64), (258, 65), (258, 66), (258, 67), (258, 68), (258, 69), (258, 70), (258, 71), (258, 72), (258, 73), (258, 74), (258, 75), (258, 76), (258, 77), (258, 79), (258, 106), (258, 109), (258, 110), (258, 111), (258, 112), (258, 113), (258, 116), (258, 117), (259, 59), (259, 61), (259, 62), (259, 63), (259, 64), (259, 65), (259, 66), (259, 67), (259, 68), (259, 69), (259, 70), (259, 71), (259, 72), (259, 73), (259, 74), (259, 75), (259, 76), (259, 77), (259, 79), (259, 105), (259, 107), (259, 108), (259, 109), (259, 110), (259, 111), (259, 112), (259, 113), (259, 114), (259, 115), (259, 118), (259, 119), (260, 60), (260, 62), (260, 63), (260, 64), (260, 65), (260, 66), (260, 67), (260, 68), (260, 69), (260, 70), (260, 71), (260, 72), (260, 73), (260, 74), (260, 75), (260, 76), (260, 77), (260, 78), (260, 80), (260, 104), (260, 106), (260, 107), (260, 108), (260, 109), (260, 110), (260, 111), (260, 112), (260, 113), (260, 114), (260, 115), (260, 116), (260, 117), (261, 60), (261, 62), (261, 63), (261, 64), (261, 65), (261, 66), (261, 67), (261, 68), (261, 69), (261, 70), (261, 71), (261, 72), (261, 73), (261, 74), (261, 75), (261, 76), (261, 77), (261, 78), (261, 80), (261, 103), (261, 105), (261, 106), (261, 107), (261, 108), (261, 109), (261, 110), (261, 111), (261, 112), (261, 113), (261, 114), (261, 115), (261, 116), (261, 117), (261, 119), (262, 61), (262, 63), (262, 64), (262, 65), (262, 66), (262, 67), (262, 68), (262, 69), (262, 70), (262, 71), (262, 72), (262, 73), (262, 74), (262, 75), (262, 76), (262, 77), (262, 78), (262, 80), (262, 102), (262, 104), (262, 105), (262, 106), (262, 107), (262, 108), (262, 109), (262, 110), (262, 111), (262, 112), (262, 113), (262, 114), (262, 115), (262, 116), (262, 117), (262, 119), (263, 61), (263, 63), (263, 64), (263, 65), (263, 66), (263, 67), (263, 68), (263, 69), (263, 70), (263, 71), (263, 72), (263, 73), (263, 74), (263, 75), (263, 76), (263, 77), (263, 78), (263, 79), (263, 80), (263, 81), (263, 101), (263, 103), (263, 104), (263, 105), (263, 106), (263, 107), (263, 108), (263, 109), (263, 110), (263, 111), (263, 112), (263, 113), (263, 114), (263, 115), (263, 116), (263, 117), (263, 119), (264, 62), (264, 64), (264, 65), (264, 66), (264, 67), (264, 68), (264, 69), (264, 70), (264, 71), (264, 72), (264, 73), (264, 74), (264, 75), (264, 76), (264, 77), (264, 78), (264, 79), (264, 81), (264, 100), (264, 102), (264, 103), (264, 104), (264, 105), (264, 106), (264, 107), (264, 108), (264, 109), (264, 110), (264, 111), (264, 112), (264, 113), (264, 114), (264, 115), (264, 116), (264, 117), (264, 119), (265, 62), (265, 64), (265, 65), (265, 66), (265, 67), (265, 68), (265, 69), (265, 70), (265, 71), (265, 72), (265, 73), (265, 74), (265, 75), (265, 76), (265, 77), (265, 78), (265, 79), (265, 81), (265, 99), (265, 101), (265, 102), (265, 103), (265, 104), (265, 105), (265, 106), (265, 107), (265, 108), (265, 109), (265, 110), (265, 111), (265, 112), (265, 113), (265, 114), (265, 115), (265, 116), (265, 118), (266, 63), (266, 65), (266, 66), (266, 67), (266, 68), (266, 69), (266, 70), (266, 71), (266, 72), (266, 73), (266, 74), (266, 75), (266, 76), (266, 77), (266, 78), (266, 79), (266, 80), (266, 82), (266, 98), (266, 100), (266, 101), (266, 102), (266, 103), (266, 104), (266, 105), (266, 106), (266, 107), (266, 108), (266, 109), (266, 110), (266, 111), (266, 112), (266, 113), (266, 114), (266, 115), (266, 116), (266, 118), (267, 63), (267, 65), (267, 66), (267, 67), (267, 68), (267, 69), (267, 70), (267, 71), (267, 72), (267, 73), (267, 74), (267, 75), (267, 76), (267, 77), (267, 78), (267, 79), (267, 80), (267, 81), (267, 83), (267, 97), (267, 99), (267, 100), (267, 101), (267, 102), (267, 103), (267, 104), (267, 105), (267, 106), (267, 107), (267, 108), (267, 109), (267, 110), (267, 111), (267, 112), (267, 113), (267, 114), (267, 115), (267, 116), (267, 118), (268, 64), (268, 66), (268, 67), (268, 68), (268, 69), (268, 70), (268, 71), (268, 72), (268, 73), (268, 74), (268, 75), (268, 76), (268, 77), (268, 78), (268, 79), (268, 80), (268, 81), (268, 82), (268, 84), (268, 96), (268, 98), (268, 99), (268, 100), (268, 101), (268, 102), (268, 103), (268, 104), (268, 105), (268, 106), (268, 107), (268, 108), (268, 109), (268, 110), (268, 111), (268, 112), (268, 113), (268, 114), (268, 115), (268, 116), (268, 118), (269, 64), (269, 66), (269, 67), (269, 68), (269, 69), (269, 70), (269, 71), (269, 72), (269, 73), (269, 74), (269, 75), (269, 76), (269, 77), (269, 78), (269, 79), (269, 80), (269, 81), (269, 82), (269, 85), (269, 94), (269, 97), (269, 98), (269, 99), (269, 100), (269, 101), (269, 102), (269, 103), (269, 104), (269, 105), (269, 106), (269, 107), (269, 108), (269, 109), (269, 110), (269, 111), (269, 112), (269, 113), (269, 114), (269, 115), (269, 117), (270, 65), (270, 67), (270, 68), (270, 69), (270, 70), (270, 71), (270, 72), (270, 73), (270, 74), (270, 75), (270, 76), (270, 77), (270, 78), (270, 79), (270, 80), (270, 81), (270, 82), (270, 83), (270, 86), (270, 93), (270, 96), (270, 97), (270, 98), (270, 99), (270, 100), (270, 101), (270, 102), (270, 103), (270, 104), (270, 105), (270, 106), (270, 107), (270, 108), (270, 109), (270, 110), (270, 111), (270, 112), (270, 113), (270, 114), (270, 115), (270, 117), (271, 65), (271, 67), (271, 68), (271, 69), (271, 70), (271, 71), (271, 72), (271, 73), (271, 74), (271, 75), (271, 76), (271, 77), (271, 78), (271, 79), (271, 80), (271, 81), (271, 82), (271, 83), (271, 84), (271, 85), (271, 88), (271, 89), (271, 90), (271, 91), (271, 94), (271, 95), (271, 96), (271, 97), (271, 98), (271, 99), (271, 100), (271, 101), (271, 102), (271, 103), (271, 104), (271, 105), (271, 106), (271, 107), (271, 108), (271, 109), (271, 110), (271, 111), (271, 112), (271, 113), (271, 114), (271, 115), (271, 117), (272, 66), (272, 68), (272, 69), (272, 70), (272, 71), (272, 72), (272, 73), (272, 74), (272, 75), (272, 76), (272, 77), (272, 78), (272, 79), (272, 80), (272, 81), (272, 82), (272, 83), (272, 84), (272, 85), (272, 86), (272, 92), (272, 93), (272, 94), (272, 95), (272, 96), (272, 97), (272, 98), (272, 99), (272, 100), (272, 101), (272, 102), (272, 103), (272, 104), (272, 105), (272, 106), (272, 107), (272, 108), (272, 109), (272, 110), (272, 111), (272, 112), (272, 113), (272, 114), (272, 115), (272, 117), (273, 67), (273, 68), (273, 69), (273, 70), (273, 71), (273, 72), (273, 73), (273, 74), (273, 75), (273, 76), (273, 77), (273, 78), (273, 79), (273, 80), (273, 81), (273, 82), (273, 83), (273, 84), (273, 85), (273, 86), (273, 87), (273, 88), (273, 89), (273, 90), (273, 91), (273, 92), (273, 93), (273, 94), (273, 95), (273, 96), (273, 97), (273, 98), (273, 99), (273, 100), (273, 101), (273, 102), (273, 103), (273, 104), (273, 105), (273, 106), (273, 107), (273, 108), (273, 109), (273, 110), (273, 111), (273, 112), (273, 113), (273, 114), (273, 117), (274, 67), (274, 69), (274, 70), (274, 71), (274, 72), (274, 73), (274, 74), (274, 75), (274, 76), (274, 77), (274, 78), (274, 79), (274, 80), (274, 81), (274, 82), (274, 83), (274, 84), (274, 85), (274, 86), (274, 87), (274, 88), (274, 89), (274, 90), (274, 91), (274, 92), (274, 93), (274, 94), (274, 95), (274, 96), (274, 97), (274, 98), (274, 99), (274, 100), (274, 101), (274, 102), (274, 103), (274, 104), (274, 105), (274, 106), (274, 107), (274, 108), (274, 109), (274, 110), (274, 111), (274, 112), (274, 113), (274, 116), (275, 68), (275, 70), (275, 71), (275, 72), (275, 73), (275, 74), (275, 75), (275, 76), (275, 77), (275, 78), (275, 79), (275, 80), (275, 81), (275, 82), (275, 83), (275, 84), (275, 85), (275, 86), (275, 87), (275, 88), (275, 89), (275, 90), (275, 91), (275, 92), (275, 93), (275, 94), (275, 95), (275, 96), (275, 97), (275, 98), (275, 99), (275, 100), (275, 101), (275, 102), (275, 103), (275, 104), (275, 105), (275, 106), (275, 107), (275, 108), (275, 109), (275, 110), (275, 111), (275, 112), (275, 114), (276, 68), (276, 70), (276, 71), (276, 72), (276, 73), (276, 74), (276, 75), (276, 76), (276, 77), (276, 78), (276, 79), (276, 80), (276, 81), (276, 82), (276, 83), (276, 84), (276, 85), (276, 86), (276, 87), (276, 88), (276, 89), (276, 90), (276, 91), (276, 92), (276, 93), (276, 94), (276, 95), (276, 96), (276, 97), (276, 98), (276, 99), (276, 100), (276, 101), (276, 102), (276, 103), (276, 104), (276, 105), (276, 106), (276, 107), (276, 108), (276, 109), (276, 110), (276, 111), (276, 112), (276, 113), (276, 114), (277, 69), (277, 71), (277, 72), (277, 73), (277, 74), (277, 75), (277, 76), (277, 77), (277, 78), (277, 79), (277, 80), (277, 81), (277, 82), (277, 83), (277, 84), (277, 85), (277, 86), (277, 87), (277, 88), (277, 89), (277, 90), (277, 91), (277, 92), (277, 93), (277, 94), (277, 95), (277, 96), (277, 97), (277, 98), (277, 99), (277, 100), (277, 101), (277, 102), (277, 103), (277, 104), (277, 105), (277, 106), (277, 107), (277, 108), (277, 109), (277, 110), (277, 111), (277, 113), (278, 69), (278, 71), (278, 72), (278, 73), (278, 74), (278, 75), (278, 76), (278, 77), (278, 78), (278, 79), (278, 80), (278, 81), (278, 82), (278, 83), (278, 84), (278, 85), (278, 86), (278, 87), (278, 88), (278, 89), (278, 90), (278, 91), (278, 92), (278, 93), (278, 94), (278, 95), (278, 96), (278, 97), (278, 98), (278, 99), (278, 100), (278, 101), (278, 102), (278, 103), (278, 104), (278, 105), (278, 106), (278, 107), (278, 108), (278, 109), (278, 110), (278, 111), (278, 113), (279, 70), (279, 72), (279, 73), (279, 74), (279, 75), (279, 76), (279, 77), (279, 78), (279, 79), (279, 80), (279, 81), (279, 82), (279, 83), (279, 84), (279, 85), (279, 86), (279, 87), (279, 88), (279, 89), (279, 90), (279, 91), (279, 92), (279, 93), (279, 94), (279, 95), (279, 96), (279, 97), (279, 98), (279, 99), (279, 100), (279, 101), (279, 102), (279, 103), (279, 104), (279, 105), (279, 106), (279, 107), (279, 108), (279, 109), (279, 110), (279, 111), (279, 113), (280, 70), (280, 72), (280, 73), (280, 74), (280, 75), (280, 76), (280, 77), (280, 78), (280, 79), (280, 80), (280, 81), (280, 82), (280, 83), (280, 84), (280, 85), (280, 86), (280, 87), (280, 88), (280, 89), (280, 90), (280, 91), (280, 92), (280, 93), (280, 94), (280, 95), (280, 96), (280, 97), (280, 98), (280, 99), (280, 100), (280, 101), (280, 102), (280, 103), (280, 104), (280, 105), (280, 106), (280, 107), (280, 108), (280, 109), (280, 110), (280, 111), (280, 113), (281, 71), (281, 73), (281, 74), (281, 75), (281, 76), (281, 77), (281, 78), (281, 79), (281, 80), (281, 81), (281, 82), (281, 83), (281, 84), (281, 85), (281, 86), (281, 87), (281, 88), (281, 89), (281, 90), (281, 91), (281, 92), (281, 93), (281, 94), (281, 95), (281, 96), (281, 97), (281, 98), (281, 99), (281, 100), (281, 101), (281, 102), (281, 103), (281, 104), (281, 105), (281, 106), (281, 107), (281, 108), (281, 109), (281, 110), (281, 111), (281, 113), (282, 71), (282, 73), (282, 74), (282, 75), (282, 76), (282, 77), (282, 78), (282, 79), (282, 80), (282, 81), (282, 82), (282, 83), (282, 84), (282, 85), (282, 86), (282, 87), (282, 88), (282, 89), (282, 90), (282, 91), (282, 92), (282, 93), (282, 94), (282, 95), (282, 96), (282, 97), (282, 98), (282, 99), (282, 100), (282, 101), (282, 102), (282, 103), (282, 104), (282, 105), (282, 106), (282, 107), (282, 108), (282, 109), (282, 110), (282, 111), (282, 113), (283, 72), (283, 74), (283, 75), (283, 76), (283, 77), (283, 78), (283, 79), (283, 80), (283, 81), (283, 82), (283, 83), (283, 84), (283, 85), (283, 86), (283, 87), (283, 88), (283, 89), (283, 90), (283, 91), (283, 92), (283, 93), (283, 94), (283, 95), (283, 96), (283, 97), (283, 98), (283, 99), (283, 100), (283, 101), (283, 102), (283, 103), (283, 104), (283, 105), (283, 106), (283, 107), (283, 108), (283, 109), (283, 110), (283, 111), (283, 113), (284, 72), (284, 74), (284, 75), (284, 76), (284, 77), (284, 78), (284, 79), (284, 80), (284, 81), (284, 82), (284, 83), (284, 84), (284, 85), (284, 86), (284, 87), (284, 88), (284, 89), (284, 90), (284, 91), (284, 92), (284, 93), (284, 94), (284, 95), (284, 96), (284, 97), (284, 98), (284, 99), (284, 100), (284, 101), (284, 102), (284, 103), (284, 104), (284, 105), (284, 106), (284, 107), (284, 108), (284, 109), (284, 110), (284, 111), (284, 113), (285, 73), (285, 75), (285, 76), (285, 77), (285, 78), (285, 79), (285, 80), (285, 81), (285, 82), (285, 83), (285, 84), (285, 85), (285, 86), (285, 87), (285, 88), (285, 89), (285, 90), (285, 91), (285, 92), (285, 93), (285, 94), (285, 95), (285, 96), (285, 97), (285, 98), (285, 99), (285, 100), (285, 101), (285, 102), (285, 103), (285, 104), (285, 105), (285, 106), (285, 107), (285, 108), (285, 109), (285, 110), (285, 111), (285, 113), (286, 73), (286, 75), (286, 76), (286, 77), (286, 78), (286, 79), (286, 80), (286, 81), (286, 82), (286, 83), (286, 84), (286, 85), (286, 86), (286, 87), (286, 88), (286, 89), (286, 90), (286, 91), (286, 92), (286, 93), (286, 94), (286, 95), (286, 96), (286, 97), (286, 98), (286, 99), (286, 100), (286, 101), (286, 102), (286, 103), (286, 104), (286, 105), (286, 106), (286, 107), (286, 108), (286, 109), (286, 110), (286, 111), (286, 113), (287, 74), (287, 76), (287, 77), (287, 78), (287, 79), (287, 80), (287, 81), (287, 82), (287, 83), (287, 84), (287, 85), (287, 86), (287, 87), (287, 88), (287, 89), (287, 90), (287, 91), (287, 92), (287, 93), (287, 94), (287, 95), (287, 96), (287, 97), (287, 98), (287, 99), (287, 100), (287, 101), (287, 102), (287, 103), (287, 104), (287, 105), (287, 106), (287, 107), (287, 108), (287, 109), (287, 110), (287, 111), (287, 113), (288, 74), (288, 76), (288, 77), (288, 78), (288, 79), (288, 80), (288, 81), (288, 82), (288, 83), (288, 84), (288, 85), (288, 86), (288, 87), (288, 88), (288, 89), (288, 90), (288, 91), (288, 92), (288, 93), (288, 94), (288, 95), (288, 96), (288, 97), (288, 98), (288, 99), (288, 100), (288, 101), (288, 102), (288, 103), (288, 104), (288, 105), (288, 106), (288, 107), (288, 108), (288, 109), (288, 110), (288, 111), (288, 113), (289, 75), (289, 77), (289, 78), (289, 79), (289, 80), (289, 81), (289, 82), (289, 83), (289, 84), (289, 85), (289, 86), (289, 87), (289, 88), (289, 89), (289, 90), (289, 91), (289, 92), (289, 93), (289, 94), (289, 95), (289, 96), (289, 97), (289, 98), (289, 99), (289, 100), (289, 101), (289, 102), (289, 103), (289, 104), (289, 105), (289, 106), (289, 107), (289, 108), (289, 109), (289, 110), (289, 111), (289, 113), (290, 76), (290, 78), (290, 79), (290, 80), (290, 81), (290, 82), (290, 83), (290, 84), (290, 85), (290, 86), (290, 87), (290, 88), (290, 89), (290, 90), (290, 91), (290, 92), (290, 93), (290, 94), (290, 95), (290, 96), (290, 97), (290, 98), (290, 99), (290, 100), (290, 101), (290, 102), (290, 103), (290, 104), (290, 105), (290, 106), (290, 107), (290, 108), (290, 109), (290, 110), (290, 111), (290, 112), (290, 113), (291, 76), (291, 78), (291, 79), (291, 80), (291, 81), (291, 82), (291, 83), (291, 84), (291, 85), (291, 86), (291, 87), (291, 88), (291, 89), (291, 90), (291, 91), (291, 92), (291, 93), (291, 94), (291, 95), (291, 96), (291, 97), (291, 98), (291, 99), (291, 100), (291, 101), (291, 102), (291, 103), (291, 104), (291, 105), (291, 106), (291, 107), (291, 108), (291, 109), (291, 110), (291, 112), (292, 77), (292, 79), (292, 80), (292, 81), (292, 82), (292, 83), (292, 84), (292, 85), (292, 86), (292, 87), (292, 88), (292, 89), (292, 90), (292, 91), (292, 92), (292, 93), (292, 94), (292, 95), (292, 96), (292, 97), (292, 98), (292, 99), (292, 100), (292, 101), (292, 102), (292, 103), (292, 104), (292, 105), (292, 106), (292, 107), (292, 108), (292, 109), (292, 110), (292, 112), (293, 78), (293, 80), (293, 81), (293, 82), (293, 83), (293, 84), (293, 85), (293, 86), (293, 87), (293, 88), (293, 89), (293, 90), (293, 91), (293, 92), (293, 93), (293, 94), (293, 95), (293, 96), (293, 97), (293, 98), (293, 99), (293, 100), (293, 101), (293, 102), (293, 103), (293, 104), (293, 105), (293, 106), (293, 107), (293, 108), (293, 109), (293, 111), (294, 78), (294, 80), (294, 81), (294, 82), (294, 83), (294, 84), (294, 85), (294, 86), (294, 87), (294, 88), (294, 89), (294, 90), (294, 91), (294, 92), (294, 93), (294, 94), (294, 95), (294, 96), (294, 97), (294, 98), (294, 99), (294, 100), (294, 101), (294, 102), (294, 103), (294, 104), (294, 105), (294, 106), (294, 107), (294, 108), (294, 109), (294, 111), (295, 79), (295, 81), (295, 82), (295, 83), (295, 84), (295, 85), (295, 86), (295, 87), (295, 88), (295, 89), (295, 90), (295, 91), (295, 92), (295, 93), (295, 94), (295, 95), (295, 96), (295, 97), (295, 98), (295, 99), (295, 100), (295, 101), (295, 102), (295, 103), (295, 104), (295, 105), (295, 110), (296, 80), (296, 82), (296, 83), (296, 84), (296, 85), (296, 86), (296, 87), (296, 88), (296, 89), (296, 90), (296, 91), (296, 92), (296, 93), (296, 94), (296, 95), (296, 96), (296, 97), (296, 98), (296, 99), (296, 100), (296, 101), (296, 106), (296, 107), (296, 109), (297, 81), (297, 83), (297, 84), (297, 85), (297, 86), (297, 87), (297, 88), (297, 89), (297, 90), (297, 91), (297, 92), (297, 93), (297, 94), (297, 95), (297, 96), (297, 97), (297, 98), (297, 102), (297, 103), (297, 104), (297, 105), (298, 82), (298, 84), (298, 85), (298, 86), (298, 87), (298, 88), (298, 89), (298, 90), (298, 91), (298, 92), (298, 93), (298, 94), (298, 95), (298, 99), (298, 100), (299, 83), (299, 86), (299, 87), (299, 88), (299, 89), (299, 90), (299, 91), (299, 92), (299, 93), (299, 96), (299, 97), (299, 98), (300, 84), (300, 95), (301, 86), (301, 88), (301, 89), (301, 90), (301, 91), (301, 92), ) coordinates_7F004E = ((101, 244), (101, 246), (102, 244), (102, 247), (103, 244), (103, 247), (104, 244), (104, 246), (104, 248), (105, 245), (105, 247), (105, 249), (106, 245), (106, 247), (106, 248), (106, 250), (107, 245), (107, 247), (107, 248), (107, 249), (107, 251), (108, 245), (108, 247), (108, 248), (108, 249), (108, 250), (108, 252), (109, 245), (109, 247), (109, 248), (109, 249), (109, 250), (109, 252), (110, 245), (110, 247), (110, 248), (110, 249), (110, 250), (110, 252), (111, 246), (111, 248), (111, 249), (111, 250), (111, 252), (112, 246), (112, 248), (112, 249), (112, 250), (112, 252), (113, 234), (113, 236), (113, 238), (113, 246), (113, 248), (113, 249), (113, 250), (113, 252), (114, 232), (114, 233), (114, 238), (114, 246), (114, 248), (114, 249), (114, 250), (114, 252), (115, 230), (115, 234), (115, 235), (115, 236), (115, 238), (115, 246), (115, 248), (115, 249), (115, 250), (115, 251), (115, 253), (116, 228), (116, 232), (116, 233), (116, 234), (116, 235), (116, 237), (116, 247), (116, 249), (116, 250), (116, 251), (116, 253), (117, 225), (117, 230), (117, 231), (117, 232), (117, 233), (117, 234), (117, 235), (117, 237), (117, 247), (117, 249), (117, 250), (117, 251), (117, 253), (118, 225), (118, 228), (118, 229), (118, 230), (118, 231), (118, 232), (118, 233), (118, 234), (118, 235), (118, 237), (118, 247), (118, 249), (118, 253), (119, 225), (119, 227), (119, 228), (119, 229), (119, 230), (119, 231), (119, 232), (119, 233), (119, 234), (119, 235), (119, 237), (119, 247), (119, 248), (119, 251), (120, 224), (120, 226), (120, 227), (120, 228), (120, 229), (120, 230), (120, 231), (120, 232), (120, 233), (120, 234), (120, 235), (120, 237), (120, 248), (121, 224), (121, 226), (121, 227), (121, 228), (121, 229), (121, 230), (121, 231), (121, 232), (121, 233), (121, 234), (121, 235), (121, 237), (121, 248), (122, 224), (122, 226), (122, 227), (122, 228), (122, 229), (122, 230), (122, 231), (122, 232), (122, 233), (122, 234), (122, 235), (122, 237), (122, 248), (123, 223), (123, 225), (123, 226), (123, 227), (123, 228), (123, 229), (123, 230), (123, 231), (123, 232), (123, 233), (123, 234), (123, 235), (123, 237), (124, 223), (124, 225), (124, 226), (124, 227), (124, 228), (124, 229), (124, 230), (124, 231), (124, 232), (124, 233), (124, 234), (124, 235), (124, 237), (124, 249), (125, 223), (125, 225), (125, 226), (125, 227), (125, 228), (125, 229), (125, 230), (125, 231), (125, 232), (125, 233), (125, 234), (125, 235), (125, 236), (125, 237), (125, 250), (126, 222), (126, 224), (126, 225), (126, 226), (126, 227), (126, 228), (126, 229), (126, 230), (126, 231), (126, 232), (126, 233), (126, 234), (126, 236), (126, 250), (126, 251), (127, 222), (127, 224), (127, 225), (127, 226), (127, 227), (127, 228), (127, 229), (127, 230), (127, 231), (127, 232), (127, 233), (127, 234), (127, 236), (127, 250), (128, 222), (128, 224), (128, 225), (128, 226), (128, 227), (128, 228), (128, 229), (128, 230), (128, 231), (128, 232), (128, 233), (128, 234), (128, 236), (128, 251), (129, 222), (129, 224), (129, 225), (129, 226), (129, 227), (129, 228), (129, 229), (129, 230), (129, 231), (129, 232), (129, 233), (129, 234), (129, 236), (129, 252), (130, 222), (130, 224), (130, 225), (130, 226), (130, 227), (130, 228), (130, 229), (130, 230), (130, 231), (130, 232), (130, 233), (130, 234), (130, 236), (131, 223), (131, 225), (131, 226), (131, 227), (131, 228), (131, 229), (131, 230), (131, 231), (131, 232), (131, 233), (131, 234), (131, 236), (132, 223), (132, 226), (132, 227), (132, 228), (132, 229), (132, 230), (132, 231), (132, 232), (132, 233), (132, 235), (133, 225), (133, 227), (133, 228), (133, 229), (133, 230), (133, 231), (133, 232), (133, 233), (133, 235), (134, 226), (134, 228), (134, 229), (134, 230), (134, 231), (134, 232), (134, 233), (134, 235), (135, 227), (135, 229), (135, 230), (135, 231), (135, 232), (135, 233), (135, 235), (136, 228), (136, 230), (136, 231), (136, 232), (136, 234), (137, 229), (137, 231), (137, 232), (137, 234), (138, 230), (138, 234), (139, 230), (139, 233), (260, 230), (260, 233), (261, 234), (262, 229), (262, 231), (262, 232), (262, 234), (263, 228), (263, 230), (263, 231), (263, 232), (263, 234), (264, 227), (264, 229), (264, 230), (264, 231), (264, 232), (264, 233), (264, 235), (265, 226), (265, 228), (265, 229), (265, 230), (265, 231), (265, 232), (265, 233), (265, 235), (266, 224), (266, 227), (266, 228), (266, 229), (266, 230), (266, 231), (266, 232), (266, 233), (266, 235), (267, 223), (267, 226), (267, 227), (267, 228), (267, 229), (267, 230), (267, 231), (267, 232), (267, 233), (267, 235), (268, 223), (268, 225), (268, 226), (268, 227), (268, 228), (268, 229), (268, 230), (268, 231), (268, 232), (268, 233), (268, 234), (268, 236), (269, 222), (269, 224), (269, 225), (269, 226), (269, 227), (269, 228), (269, 229), (269, 230), (269, 231), (269, 232), (269, 233), (269, 234), (269, 236), (269, 252), (270, 222), (270, 224), (270, 225), (270, 226), (270, 227), (270, 228), (270, 229), (270, 230), (270, 231), (270, 232), (270, 233), (270, 234), (270, 236), (270, 251), (271, 222), (271, 224), (271, 225), (271, 226), (271, 227), (271, 228), (271, 229), (271, 230), (271, 231), (271, 232), (271, 233), (271, 234), (271, 236), (271, 250), (271, 253), (272, 222), (272, 224), (272, 225), (272, 226), (272, 227), (272, 228), (272, 229), (272, 230), (272, 231), (272, 232), (272, 233), (272, 234), (272, 236), (272, 250), (272, 252), (273, 222), (273, 224), (273, 225), (273, 226), (273, 227), (273, 228), (273, 229), (273, 230), (273, 231), (273, 232), (273, 233), (273, 234), (273, 236), (273, 250), (273, 251), (274, 223), (274, 225), (274, 226), (274, 227), (274, 228), (274, 229), (274, 230), (274, 231), (274, 232), (274, 233), (274, 234), (274, 235), (274, 237), (274, 250), (275, 223), (275, 225), (275, 226), (275, 227), (275, 228), (275, 229), (275, 230), (275, 231), (275, 232), (275, 233), (275, 234), (275, 235), (275, 237), (276, 223), (276, 225), (276, 226), (276, 227), (276, 228), (276, 229), (276, 230), (276, 231), (276, 232), (276, 233), (276, 234), (276, 235), (276, 237), (277, 224), (277, 226), (277, 227), (277, 228), (277, 229), (277, 230), (277, 231), (277, 232), (277, 233), (277, 234), (277, 235), (277, 237), (277, 248), (278, 224), (278, 226), (278, 227), (278, 228), (278, 229), (278, 230), (278, 231), (278, 232), (278, 233), (278, 234), (278, 235), (278, 237), (278, 248), (278, 249), (279, 224), (279, 226), (279, 227), (279, 228), (279, 229), (279, 230), (279, 231), (279, 232), (279, 233), (279, 234), (279, 235), (279, 237), (279, 248), (279, 250), (280, 225), (280, 227), (280, 228), (280, 229), (280, 230), (280, 231), (280, 232), (280, 233), (280, 234), (280, 235), (280, 237), (280, 247), (280, 249), (280, 252), (281, 225), (281, 228), (281, 229), (281, 230), (281, 231), (281, 232), (281, 233), (281, 234), (281, 235), (281, 237), (281, 247), (281, 249), (281, 250), (281, 253), (282, 225), (282, 230), (282, 231), (282, 232), (282, 233), (282, 234), (282, 235), (282, 237), (282, 247), (282, 249), (282, 250), (282, 251), (282, 253), (283, 228), (283, 232), (283, 233), (283, 234), (283, 235), (283, 237), (283, 247), (283, 249), (283, 250), (283, 251), (283, 253), (284, 230), (284, 234), (284, 235), (284, 236), (284, 238), (284, 246), (284, 248), (284, 249), (284, 250), (284, 251), (284, 253), (285, 232), (285, 233), (285, 238), (285, 246), (285, 248), (285, 249), (285, 250), (285, 251), (285, 253), (286, 234), (286, 235), (286, 236), (286, 238), (286, 246), (286, 248), (286, 249), (286, 250), (286, 252), (287, 246), (287, 248), (287, 249), (287, 250), (287, 252), (288, 246), (288, 248), (288, 249), (288, 250), (288, 252), (289, 245), (289, 247), (289, 248), (289, 249), (289, 251), (290, 245), (290, 247), (290, 248), (290, 249), (290, 251), (291, 245), (291, 247), (291, 248), (291, 249), (291, 251), (292, 245), (292, 247), (292, 248), (292, 249), (292, 251), (293, 245), (293, 247), (293, 248), (293, 249), (293, 250), (294, 245), (294, 247), (294, 248), (294, 250), (295, 244), (295, 246), (295, 247), (296, 244), (296, 246), (296, 248), (297, 244), (297, 247), (298, 244), (298, 246), ) coordinates_FF0013 = ((141, 230), (141, 232), (142, 230), (142, 232), (143, 230), (143, 232), (144, 230), (144, 232), (145, 230), (145, 232), (146, 231), (146, 232), (147, 231), (147, 232), (148, 232), (149, 232), (150, 232), (151, 232), (152, 232), (153, 232), (154, 232), (155, 232), (156, 232), (157, 231), (157, 232), (158, 231), (158, 232), (159, 231), (159, 232), (160, 231), (160, 232), (161, 231), (161, 232), (162, 232), (163, 232), (174, 231), (175, 231), (176, 231), (223, 231), (224, 231), (236, 232), (237, 231), (237, 232), (238, 231), (238, 232), (239, 231), (239, 232), (240, 231), (240, 232), (241, 231), (241, 232), (242, 231), (242, 232), (243, 232), (244, 232), (245, 232), (246, 232), (247, 232), (248, 232), (249, 232), (250, 232), (251, 232), (252, 231), (252, 232), (253, 231), (253, 232), (254, 230), (254, 232), (255, 230), (255, 232), (256, 230), (256, 232), (257, 230), (257, 232), (258, 230), (258, 232), ) coordinates_61FF00 = ((69, 145), (69, 146), (69, 147), (69, 149), (70, 142), (70, 144), (70, 150), (71, 140), (71, 141), (71, 145), (71, 146), (71, 147), (71, 148), (71, 150), (72, 137), (72, 138), (72, 142), (72, 143), (72, 144), (72, 145), (72, 146), (72, 147), (72, 148), (72, 150), (73, 135), (73, 136), (73, 139), (73, 140), (73, 141), (73, 142), (73, 143), (73, 144), (73, 145), (73, 146), (73, 147), (73, 148), (73, 149), (73, 151), (74, 134), (74, 137), (74, 138), (74, 139), (74, 140), (74, 141), (74, 142), (74, 143), (74, 144), (74, 145), (74, 146), (74, 147), (74, 148), (74, 149), (74, 151), (75, 132), (75, 135), (75, 136), (75, 137), (75, 138), (75, 139), (75, 140), (75, 141), (75, 142), (75, 143), (75, 144), (75, 145), (75, 146), (75, 147), (75, 148), (75, 149), (75, 150), (75, 152), (76, 130), (76, 133), (76, 134), (76, 135), (76, 136), (76, 137), (76, 138), (76, 139), (76, 140), (76, 141), (76, 142), (76, 143), (76, 144), (76, 145), (76, 146), (76, 147), (76, 148), (76, 149), (76, 150), (76, 152), (77, 129), (77, 132), (77, 133), (77, 134), (77, 135), (77, 136), (77, 137), (77, 138), (77, 139), (77, 140), (77, 141), (77, 142), (77, 143), (77, 144), (77, 145), (77, 146), (77, 147), (77, 148), (77, 149), (77, 150), (77, 152), (78, 127), (78, 130), (78, 131), (78, 132), (78, 133), (78, 134), (78, 135), (78, 136), (78, 137), (78, 138), (78, 139), (78, 140), (78, 141), (78, 142), (78, 143), (78, 144), (78, 145), (78, 146), (78, 147), (78, 148), (78, 149), (78, 150), (78, 151), (78, 153), (79, 126), (79, 129), (79, 130), (79, 131), (79, 132), (79, 133), (79, 134), (79, 135), (79, 136), (79, 137), (79, 138), (79, 139), (79, 140), (79, 141), (79, 142), (79, 143), (79, 144), (79, 145), (79, 146), (79, 147), (79, 148), (79, 149), (79, 150), (79, 151), (79, 153), (80, 124), (80, 127), (80, 128), (80, 129), (80, 130), (80, 131), (80, 132), (80, 133), (80, 134), (80, 135), (80, 136), (80, 137), (80, 138), (80, 139), (80, 140), (80, 141), (80, 142), (80, 143), (80, 144), (80, 145), (80, 146), (80, 147), (80, 148), (80, 149), (80, 150), (80, 151), (80, 152), (80, 154), (81, 123), (81, 126), (81, 127), (81, 128), (81, 129), (81, 130), (81, 131), (81, 132), (81, 133), (81, 134), (81, 135), (81, 136), (81, 137), (81, 138), (81, 139), (81, 140), (81, 141), (81, 142), (81, 143), (81, 144), (81, 145), (81, 146), (81, 147), (81, 148), (81, 149), (81, 150), (81, 151), (81, 152), (81, 154), (82, 122), (82, 124), (82, 125), (82, 126), (82, 127), (82, 128), (82, 129), (82, 130), (82, 131), (82, 132), (82, 133), (82, 134), (82, 135), (82, 136), (82, 137), (82, 138), (82, 139), (82, 140), (82, 141), (82, 142), (82, 143), (82, 144), (82, 145), (82, 146), (82, 147), (82, 148), (82, 149), (82, 150), (82, 151), (82, 152), (82, 154), (83, 121), (83, 123), (83, 124), (83, 125), (83, 126), (83, 127), (83, 128), (83, 129), (83, 130), (83, 131), (83, 132), (83, 133), (83, 134), (83, 135), (83, 136), (83, 137), (83, 138), (83, 139), (83, 140), (83, 141), (83, 142), (83, 143), (83, 144), (83, 145), (83, 146), (83, 147), (83, 148), (83, 149), (83, 150), (83, 151), (83, 152), (83, 153), (83, 155), (84, 120), (84, 122), (84, 123), (84, 124), (84, 125), (84, 126), (84, 127), (84, 128), (84, 129), (84, 130), (84, 131), (84, 132), (84, 133), (84, 134), (84, 135), (84, 136), (84, 137), (84, 138), (84, 139), (84, 140), (84, 141), (84, 142), (84, 143), (84, 144), (84, 145), (84, 146), (84, 147), (84, 148), (84, 149), (84, 150), (84, 151), (84, 152), (84, 153), (84, 155), (85, 121), (85, 122), (85, 123), (85, 124), (85, 125), (85, 126), (85, 127), (85, 128), (85, 129), (85, 130), (85, 131), (85, 132), (85, 133), (85, 134), (85, 135), (85, 136), (85, 137), (85, 138), (85, 139), (85, 140), (85, 141), (85, 142), (85, 143), (85, 144), (85, 145), (85, 146), (85, 147), (85, 148), (85, 149), (85, 150), (85, 151), (85, 152), (85, 153), (85, 155), (86, 117), (86, 120), (86, 121), (86, 122), (86, 123), (86, 124), (86, 125), (86, 126), (86, 127), (86, 128), (86, 129), (86, 130), (86, 131), (86, 132), (86, 133), (86, 134), (86, 135), (86, 136), (86, 137), (86, 138), (86, 139), (86, 140), (86, 141), (86, 142), (86, 143), (86, 144), (86, 145), (86, 146), (86, 147), (86, 148), (86, 149), (86, 150), (86, 151), (86, 152), (86, 153), (86, 155), (87, 116), (87, 119), (87, 120), (87, 121), (87, 122), (87, 123), (87, 124), (87, 125), (87, 126), (87, 127), (87, 128), (87, 129), (87, 130), (87, 131), (87, 132), (87, 133), (87, 134), (87, 135), (87, 136), (87, 137), (87, 138), (87, 139), (87, 140), (87, 141), (87, 142), (87, 143), (87, 144), (87, 145), (87, 146), (87, 147), (87, 148), (87, 149), (87, 150), (87, 151), (87, 152), (87, 153), (87, 155), (88, 118), (88, 119), (88, 120), (88, 121), (88, 122), (88, 123), (88, 124), (88, 125), (88, 126), (88, 127), (88, 128), (88, 129), (88, 130), (88, 131), (88, 132), (88, 133), (88, 134), (88, 135), (88, 136), (88, 137), (88, 138), (88, 139), (88, 140), (88, 141), (88, 142), (88, 143), (88, 144), (88, 145), (88, 146), (88, 147), (88, 148), (88, 149), (88, 150), (88, 151), (88, 152), (88, 153), (88, 155), (89, 115), (89, 117), (89, 118), (89, 119), (89, 120), (89, 121), (89, 122), (89, 123), (89, 124), (89, 125), (89, 126), (89, 127), (89, 128), (89, 129), (89, 130), (89, 131), (89, 132), (89, 133), (89, 134), (89, 135), (89, 136), (89, 137), (89, 138), (89, 139), (89, 140), (89, 141), (89, 142), (89, 143), (89, 144), (89, 145), (89, 146), (89, 147), (89, 148), (89, 149), (89, 150), (89, 151), (89, 152), (89, 153), (89, 154), (89, 156), (90, 114), (90, 116), (90, 117), (90, 118), (90, 119), (90, 120), (90, 121), (90, 122), (90, 123), (90, 124), (90, 125), (90, 126), (90, 127), (90, 128), (90, 129), (90, 130), (90, 131), (90, 132), (90, 133), (90, 134), (90, 135), (90, 136), (90, 137), (90, 138), (90, 139), (90, 140), (90, 141), (90, 142), (90, 143), (90, 144), (90, 145), (90, 146), (90, 147), (90, 148), (90, 149), (90, 150), (90, 151), (90, 152), (90, 153), (90, 154), (90, 156), (91, 113), (91, 115), (91, 116), (91, 117), (91, 118), (91, 119), (91, 120), (91, 121), (91, 122), (91, 123), (91, 124), (91, 125), (91, 126), (91, 127), (91, 128), (91, 129), (91, 130), (91, 131), (91, 132), (91, 133), (91, 134), (91, 135), (91, 136), (91, 137), (91, 138), (91, 139), (91, 140), (91, 141), (91, 142), (91, 143), (91, 144), (91, 145), (91, 146), (91, 147), (91, 148), (91, 149), (91, 150), (91, 151), (91, 152), (91, 153), (91, 154), (91, 156), (92, 112), (92, 114), (92, 115), (92, 116), (92, 117), (92, 118), (92, 119), (92, 120), (92, 121), (92, 122), (92, 123), (92, 124), (92, 125), (92, 126), (92, 127), (92, 128), (92, 129), (92, 130), (92, 131), (92, 132), (92, 133), (92, 134), (92, 135), (92, 136), (92, 137), (92, 138), (92, 139), (92, 140), (92, 141), (92, 142), (92, 143), (92, 144), (92, 145), (92, 146), (92, 147), (92, 148), (92, 149), (92, 150), (92, 151), (92, 152), (92, 153), (92, 154), (92, 156), (93, 112), (93, 114), (93, 115), (93, 116), (93, 117), (93, 118), (93, 119), (93, 120), (93, 121), (93, 122), (93, 123), (93, 124), (93, 125), (93, 126), (93, 127), (93, 128), (93, 129), (93, 130), (93, 131), (93, 132), (93, 133), (93, 134), (93, 135), (93, 136), (93, 137), (93, 138), (93, 139), (93, 140), (93, 141), (93, 142), (93, 143), (93, 144), (93, 145), (93, 146), (93, 147), (93, 148), (93, 149), (93, 150), (93, 151), (93, 152), (93, 153), (93, 154), (93, 156), (94, 111), (94, 113), (94, 114), (94, 115), (94, 116), (94, 117), (94, 118), (94, 119), (94, 120), (94, 121), (94, 122), (94, 123), (94, 124), (94, 125), (94, 126), (94, 127), (94, 128), (94, 129), (94, 130), (94, 131), (94, 132), (94, 133), (94, 134), (94, 135), (94, 136), (94, 137), (94, 138), (94, 139), (94, 140), (94, 141), (94, 142), (94, 143), (94, 144), (94, 145), (94, 146), (94, 147), (94, 148), (94, 149), (94, 150), (94, 151), (94, 152), (94, 153), (94, 154), (94, 155), (94, 157), (95, 111), (95, 112), (95, 113), (95, 114), (95, 115), (95, 116), (95, 117), (95, 118), (95, 119), (95, 120), (95, 121), (95, 122), (95, 123), (95, 124), (95, 125), (95, 126), (95, 127), (95, 128), (95, 129), (95, 130), (95, 131), (95, 132), (95, 133), (95, 134), (95, 135), (95, 136), (95, 137), (95, 138), (95, 139), (95, 140), (95, 141), (95, 142), (95, 143), (95, 144), (95, 145), (95, 146), (95, 147), (95, 148), (95, 149), (95, 150), (95, 151), (95, 152), (95, 153), (95, 154), (95, 155), (95, 157), (96, 110), (96, 112), (96, 113), (96, 114), (96, 115), (96, 116), (96, 117), (96, 118), (96, 119), (96, 120), (96, 121), (96, 122), (96, 123), (96, 124), (96, 125), (96, 126), (96, 127), (96, 128), (96, 129), (96, 130), (96, 131), (96, 132), (96, 133), (96, 134), (96, 135), (96, 136), (96, 137), (96, 138), (96, 139), (96, 140), (96, 141), (96, 142), (96, 143), (96, 144), (96, 145), (96, 146), (96, 147), (96, 148), (96, 149), (96, 150), (96, 151), (96, 152), (96, 153), (96, 154), (96, 155), (96, 156), (96, 157), (97, 110), (97, 112), (97, 113), (97, 114), (97, 115), (97, 116), (97, 117), (97, 118), (97, 119), (97, 120), (97, 121), (97, 122), (97, 123), (97, 124), (97, 125), (97, 126), (97, 127), (97, 128), (97, 129), (97, 130), (97, 131), (97, 132), (97, 133), (97, 134), (97, 135), (97, 136), (97, 137), (97, 138), (97, 139), (97, 140), (97, 141), (97, 142), (97, 143), (97, 144), (97, 145), (97, 146), (97, 147), (97, 148), (97, 149), (97, 150), (97, 151), (97, 152), (97, 153), (97, 154), (97, 156), (98, 109), (98, 111), (98, 112), (98, 113), (98, 114), (98, 115), (98, 116), (98, 117), (98, 118), (98, 119), (98, 120), (98, 121), (98, 122), (98, 123), (98, 124), (98, 125), (98, 126), (98, 127), (98, 128), (98, 129), (98, 130), (98, 131), (98, 132), (98, 133), (98, 134), (98, 135), (98, 136), (98, 137), (98, 138), (98, 139), (98, 140), (98, 141), (98, 142), (98, 143), (98, 144), (98, 145), (98, 146), (98, 147), (98, 148), (98, 149), (98, 150), (98, 151), (98, 152), (98, 153), (98, 154), (98, 156), (99, 109), (99, 111), (99, 112), (99, 113), (99, 114), (99, 115), (99, 116), (99, 117), (99, 118), (99, 119), (99, 120), (99, 121), (99, 122), (99, 123), (99, 124), (99, 125), (99, 126), (99, 127), (99, 128), (99, 129), (99, 130), (99, 131), (99, 132), (99, 133), (99, 134), (99, 135), (99, 136), (99, 137), (99, 138), (99, 139), (99, 140), (99, 141), (99, 142), (99, 143), (99, 144), (99, 145), (99, 146), (99, 147), (99, 148), (99, 149), (99, 150), (99, 151), (99, 152), (99, 153), (99, 154), (99, 156), (100, 109), (100, 111), (100, 112), (100, 113), (100, 114), (100, 115), (100, 116), (100, 117), (100, 118), (100, 119), (100, 120), (100, 121), (100, 122), (100, 123), (100, 124), (100, 125), (100, 126), (100, 127), (100, 128), (100, 129), (100, 130), (100, 131), (100, 132), (100, 133), (100, 134), (100, 135), (100, 136), (100, 137), (100, 138), (100, 139), (100, 140), (100, 141), (100, 142), (100, 143), (100, 144), (100, 145), (100, 146), (100, 147), (100, 148), (100, 149), (100, 150), (100, 151), (100, 152), (100, 153), (100, 154), (100, 156), (101, 109), (101, 112), (101, 113), (101, 114), (101, 115), (101, 116), (101, 117), (101, 118), (101, 119), (101, 120), (101, 121), (101, 122), (101, 123), (101, 124), (101, 125), (101, 126), (101, 127), (101, 128), (101, 129), (101, 130), (101, 131), (101, 132), (101, 133), (101, 134), (101, 135), (101, 136), (101, 137), (101, 138), (101, 139), (101, 140), (101, 141), (101, 142), (101, 143), (101, 144), (101, 145), (101, 146), (101, 147), (101, 148), (101, 149), (101, 150), (101, 151), (101, 152), (101, 153), (101, 154), (101, 156), (102, 111), (102, 113), (102, 114), (102, 115), (102, 116), (102, 117), (102, 118), (102, 119), (102, 120), (102, 121), (102, 122), (102, 123), (102, 124), (102, 125), (102, 126), (102, 127), (102, 128), (102, 129), (102, 130), (102, 131), (102, 132), (102, 133), (102, 134), (102, 135), (102, 136), (102, 137), (102, 138), (102, 139), (102, 140), (102, 141), (102, 142), (102, 143), (102, 144), (102, 145), (102, 146), (102, 147), (102, 148), (102, 149), (102, 150), (102, 151), (102, 152), (102, 153), (102, 155), (103, 112), (103, 114), (103, 115), (103, 116), (103, 117), (103, 118), (103, 119), (103, 120), (103, 121), (103, 122), (103, 123), (103, 124), (103, 125), (103, 126), (103, 127), (103, 128), (103, 129), (103, 130), (103, 131), (103, 132), (103, 133), (103, 134), (103, 135), (103, 136), (103, 137), (103, 138), (103, 139), (103, 140), (103, 141), (103, 142), (103, 143), (103, 144), (103, 145), (103, 146), (103, 147), (103, 148), (103, 149), (103, 150), (103, 151), (103, 152), (103, 153), (103, 155), (104, 112), (104, 114), (104, 115), (104, 116), (104, 117), (104, 118), (104, 119), (104, 120), (104, 121), (104, 122), (104, 123), (104, 124), (104, 125), (104, 126), (104, 127), (104, 128), (104, 129), (104, 130), (104, 131), (104, 132), (104, 133), (104, 134), (104, 135), (104, 136), (104, 137), (104, 138), (104, 139), (104, 140), (104, 141), (104, 142), (104, 143), (104, 144), (104, 145), (104, 146), (104, 147), (104, 148), (104, 149), (104, 150), (104, 151), (104, 152), (104, 153), (104, 155), (105, 113), (105, 115), (105, 116), (105, 117), (105, 118), (105, 119), (105, 120), (105, 121), (105, 122), (105, 123), (105, 124), (105, 125), (105, 126), (105, 127), (105, 128), (105, 129), (105, 130), (105, 131), (105, 132), (105, 133), (105, 134), (105, 135), (105, 136), (105, 137), (105, 138), (105, 139), (105, 140), (105, 141), (105, 142), (105, 143), (105, 144), (105, 145), (105, 146), (105, 147), (105, 148), (105, 149), (105, 150), (105, 151), (105, 152), (105, 154), (106, 114), (106, 116), (106, 117), (106, 118), (106, 119), (106, 120), (106, 121), (106, 122), (106, 123), (106, 124), (106, 125), (106, 126), (106, 127), (106, 128), (106, 129), (106, 130), (106, 131), (106, 132), (106, 133), (106, 134), (106, 135), (106, 136), (106, 137), (106, 138), (106, 139), (106, 140), (106, 141), (106, 142), (106, 143), (106, 144), (106, 145), (106, 146), (106, 147), (106, 148), (106, 149), (106, 150), (106, 151), (106, 152), (106, 154), (107, 114), (107, 116), (107, 117), (107, 118), (107, 119), (107, 120), (107, 121), (107, 122), (107, 123), (107, 124), (107, 125), (107, 126), (107, 127), (107, 128), (107, 129), (107, 130), (107, 131), (107, 132), (107, 133), (107, 134), (107, 135), (107, 136), (107, 137), (107, 138), (107, 139), (107, 140), (107, 141), (107, 142), (107, 143), (107, 144), (107, 145), (107, 146), (107, 147), (107, 148), (107, 149), (107, 150), (107, 151), (107, 152), (107, 153), (108, 114), (108, 116), (108, 117), (108, 118), (108, 119), (108, 120), (108, 121), (108, 122), (108, 123), (108, 124), (108, 125), (108, 126), (108, 127), (108, 128), (108, 129), (108, 130), (108, 131), (108, 132), (108, 133), (108, 134), (108, 135), (108, 136), (108, 137), (108, 138), (108, 139), (108, 140), (108, 141), (108, 142), (108, 143), (108, 144), (108, 145), (108, 146), (108, 147), (108, 148), (108, 149), (108, 150), (108, 151), (108, 153), (109, 115), (109, 117), (109, 118), (109, 119), (109, 120), (109, 121), (109, 122), (109, 123), (109, 124), (109, 125), (109, 126), (109, 127), (109, 128), (109, 129), (109, 130), (109, 131), (109, 132), (109, 133), (109, 134), (109, 135), (109, 136), (109, 137), (109, 138), (109, 139), (109, 140), (109, 141), (109, 142), (109, 143), (109, 144), (109, 145), (109, 146), (109, 147), (109, 148), (109, 149), (109, 150), (109, 151), (109, 152), (110, 115), (110, 117), (110, 118), (110, 119), (110, 120), (110, 121), (110, 122), (110, 123), (110, 124), (110, 125), (110, 126), (110, 127), (110, 128), (110, 129), (110, 130), (110, 131), (110, 132), (110, 133), (110, 134), (110, 135), (110, 136), (110, 137), (110, 138), (110, 139), (110, 140), (110, 141), (110, 142), (110, 143), (110, 144), (110, 145), (110, 146), (110, 147), (110, 148), (110, 149), (110, 150), (110, 152), (111, 115), (111, 117), (111, 118), (111, 119), (111, 120), (111, 121), (111, 122), (111, 123), (111, 124), (111, 125), (111, 126), (111, 127), (111, 128), (111, 129), (111, 130), (111, 131), (111, 132), (111, 133), (111, 134), (111, 135), (111, 136), (111, 137), (111, 138), (111, 139), (111, 140), (111, 141), (111, 142), (111, 143), (111, 144), (111, 145), (111, 146), (111, 147), (111, 148), (111, 149), (111, 151), (112, 116), (112, 119), (112, 120), (112, 121), (112, 122), (112, 123), (112, 124), (112, 125), (112, 126), (112, 127), (112, 128), (112, 129), (112, 130), (112, 131), (112, 132), (112, 133), (112, 134), (112, 135), (112, 136), (112, 137), (112, 138), (112, 139), (112, 140), (112, 141), (112, 142), (112, 143), (112, 144), (112, 145), (112, 146), (112, 147), (112, 148), (112, 149), (112, 151), (113, 116), (113, 117), (113, 120), (113, 121), (113, 122), (113, 123), (113, 124), (113, 125), (113, 126), (113, 127), (113, 128), (113, 129), (113, 130), (113, 131), (113, 132), (113, 133), (113, 134), (113, 135), (113, 136), (113, 137), (113, 138), (113, 139), (113, 140), (113, 141), (113, 142), (113, 143), (113, 144), (113, 145), (113, 146), (113, 147), (113, 148), (113, 150), (114, 119), (114, 121), (114, 122), (114, 123), (114, 124), (114, 125), (114, 126), (114, 127), (114, 128), (114, 129), (114, 130), (114, 131), (114, 132), (114, 133), (114, 134), (114, 135), (114, 136), (114, 137), (114, 138), (114, 139), (114, 140), (114, 141), (114, 142), (114, 143), (114, 144), (114, 145), (114, 146), (114, 147), (114, 149), (115, 120), (115, 122), (115, 123), (115, 124), (115, 125), (115, 126), (115, 127), (115, 128), (115, 129), (115, 130), (115, 131), (115, 132), (115, 133), (115, 134), (115, 135), (115, 136), (115, 137), (115, 138), (115, 139), (115, 140), (115, 141), (115, 142), (115, 143), (115, 144), (115, 145), (115, 146), (115, 149), (116, 120), (116, 122), (116, 123), (116, 124), (116, 125), (116, 126), (116, 127), (116, 128), (116, 129), (116, 130), (116, 131), (116, 132), (116, 133), (116, 134), (116, 135), (116, 136), (116, 137), (116, 138), (116, 139), (116, 140), (116, 141), (116, 142), (116, 143), (116, 144), (116, 145), (116, 146), (116, 148), (117, 120), (117, 122), (117, 123), (117, 124), (117, 125), (117, 126), (117, 127), (117, 128), (117, 129), (117, 130), (117, 131), (117, 132), (117, 133), (117, 134), (117, 135), (117, 136), (117, 137), (117, 138), (117, 139), (117, 140), (117, 141), (117, 142), (117, 143), (117, 144), (117, 145), (117, 147), (118, 120), (118, 122), (118, 123), (118, 124), (118, 125), (118, 126), (118, 127), (118, 128), (118, 129), (118, 130), (118, 131), (118, 132), (118, 133), (118, 134), (118, 135), (118, 136), (118, 137), (118, 138), (118, 139), (118, 140), (118, 141), (118, 142), (118, 143), (118, 144), (118, 146), (119, 120), (119, 122), (119, 123), (119, 124), (119, 125), (119, 126), (119, 127), (119, 128), (119, 129), (119, 130), (119, 131), (119, 132), (119, 133), (119, 134), (119, 135), (119, 136), (119, 137), (119, 138), (119, 139), (119, 140), (119, 141), (119, 142), (119, 143), (119, 145), (120, 120), (120, 122), (120, 123), (120, 124), (120, 125), (120, 126), (120, 127), (120, 128), (120, 129), (120, 130), (120, 131), (120, 132), (120, 133), (120, 134), (120, 135), (120, 136), (120, 137), (120, 138), (120, 139), (120, 140), (120, 141), (120, 142), (120, 144), (121, 119), (121, 121), (121, 122), (121, 123), (121, 124), (121, 125), (121, 126), (121, 127), (121, 128), (121, 129), (121, 130), (121, 131), (121, 132), (121, 133), (121, 134), (121, 135), (121, 136), (121, 137), (121, 138), (121, 139), (121, 140), (121, 141), (121, 143), (122, 119), (122, 121), (122, 122), (122, 123), (122, 124), (122, 125), (122, 126), (122, 127), (122, 128), (122, 129), (122, 130), (122, 131), (122, 132), (122, 133), (122, 134), (122, 135), (122, 136), (122, 137), (122, 138), (122, 139), (122, 140), (122, 142), (123, 119), (123, 121), (123, 122), (123, 123), (123, 124), (123, 125), (123, 126), (123, 127), (123, 128), (123, 129), (123, 130), (123, 131), (123, 132), (123, 133), (123, 134), (123, 135), (123, 136), (123, 137), (123, 138), (123, 141), (124, 119), (124, 121), (124, 122), (124, 123), (124, 124), (124, 125), (124, 126), (124, 127), (124, 128), (124, 129), (124, 130), (124, 131), (124, 132), (124, 133), (124, 134), (124, 135), (124, 136), (124, 137), (124, 140), (125, 119), (125, 121), (125, 122), (125, 123), (125, 124), (125, 125), (125, 126), (125, 127), (125, 128), (125, 129), (125, 130), (125, 131), (125, 132), (125, 133), (125, 134), (125, 135), (125, 138), (126, 119), (126, 121), (126, 122), (126, 123), (126, 124), (126, 125), (126, 126), (126, 127), (126, 128), (126, 129), (126, 130), (126, 131), (126, 132), (126, 133), (126, 137), (127, 119), (127, 121), (127, 122), (127, 123), (127, 124), (127, 125), (127, 126), (127, 127), (127, 128), (127, 129), (127, 130), (127, 131), (127, 132), (127, 135), (128, 119), (128, 121), (128, 122), (128, 123), (128, 124), (128, 125), (128, 126), (128, 127), (128, 128), (128, 129), (128, 130), (128, 131), (128, 133), (129, 119), (129, 121), (129, 122), (129, 123), (129, 124), (129, 125), (129, 126), (129, 127), (129, 128), (129, 129), (129, 130), (129, 132), (130, 120), (130, 122), (130, 123), (130, 124), (130, 125), (130, 126), (130, 127), (130, 128), (130, 129), (130, 131), (131, 120), (131, 122), (131, 123), (131, 124), (131, 125), (131, 126), (131, 127), (131, 128), (131, 130), (132, 120), (132, 122), (132, 123), (132, 124), (132, 125), (132, 126), (132, 127), (132, 129), (133, 120), (133, 122), (133, 123), (133, 124), (133, 125), (133, 126), (133, 128), (134, 121), (134, 123), (134, 124), (134, 125), (134, 126), (134, 128), (135, 121), (135, 123), (135, 124), (135, 125), (135, 127), (136, 121), (136, 123), (136, 124), (136, 126), (137, 121), (137, 123), (137, 125), (138, 124), (139, 122), (139, 123), (260, 122), (260, 123), (261, 125), (262, 121), (262, 123), (263, 121), (263, 123), (263, 124), (263, 126), (264, 121), (264, 123), (264, 124), (264, 125), (264, 127), (265, 121), (265, 123), (265, 124), (265, 125), (265, 126), (265, 128), (266, 120), (266, 122), (266, 123), (266, 124), (266, 125), (266, 126), (266, 128), (267, 120), (267, 122), (267, 123), (267, 124), (267, 125), (267, 126), (267, 127), (267, 129), (268, 120), (268, 122), (268, 123), (268, 124), (268, 125), (268, 126), (268, 127), (268, 128), (268, 130), (269, 120), (269, 122), (269, 123), (269, 124), (269, 125), (269, 126), (269, 127), (269, 128), (269, 129), (269, 131), (270, 119), (270, 121), (270, 122), (270, 123), (270, 124), (270, 125), (270, 126), (270, 127), (270, 128), (270, 129), (270, 130), (270, 132), (271, 119), (271, 121), (271, 122), (271, 123), (271, 124), (271, 125), (271, 126), (271, 127), (271, 128), (271, 129), (271, 130), (271, 131), (271, 133), (272, 119), (272, 121), (272, 122), (272, 123), (272, 124), (272, 125), (272, 126), (272, 127), (272, 128), (272, 129), (272, 130), (272, 131), (272, 132), (272, 135), (273, 119), (273, 121), (273, 122), (273, 123), (273, 124), (273, 125), (273, 126), (273, 127), (273, 128), (273, 129), (273, 130), (273, 131), (273, 132), (273, 133), (273, 137), (274, 119), (274, 121), (274, 122), (274, 123), (274, 124), (274, 125), (274, 126), (274, 127), (274, 128), (274, 129), (274, 130), (274, 131), (274, 132), (274, 133), (274, 134), (274, 135), (274, 138), (275, 119), (275, 121), (275, 122), (275, 123), (275, 124), (275, 125), (275, 126), (275, 127), (275, 128), (275, 129), (275, 130), (275, 131), (275, 132), (275, 133), (275, 134), (275, 135), (275, 136), (275, 137), (275, 140), (276, 119), (276, 121), (276, 122), (276, 123), (276, 124), (276, 125), (276, 126), (276, 127), (276, 128), (276, 129), (276, 130), (276, 131), (276, 132), (276, 133), (276, 134), (276, 135), (276, 136), (276, 137), (276, 138), (276, 141), (277, 119), (277, 121), (277, 122), (277, 123), (277, 124), (277, 125), (277, 126), (277, 127), (277, 128), (277, 129), (277, 130), (277, 131), (277, 132), (277, 133), (277, 134), (277, 135), (277, 136), (277, 137), (277, 138), (277, 139), (277, 140), (277, 142), (278, 119), (278, 121), (278, 122), (278, 123), (278, 124), (278, 125), (278, 126), (278, 127), (278, 128), (278, 129), (278, 130), (278, 131), (278, 132), (278, 133), (278, 134), (278, 135), (278, 136), (278, 137), (278, 138), (278, 139), (278, 140), (278, 141), (278, 143), (279, 120), (279, 122), (279, 123), (279, 124), (279, 125), (279, 126), (279, 127), (279, 128), (279, 129), (279, 130), (279, 131), (279, 132), (279, 133), (279, 134), (279, 135), (279, 136), (279, 137), (279, 138), (279, 139), (279, 140), (279, 141), (279, 142), (279, 144), (280, 120), (280, 122), (280, 123), (280, 124), (280, 125), (280, 126), (280, 127), (280, 128), (280, 129), (280, 130), (280, 131), (280, 132), (280, 133), (280, 134), (280, 135), (280, 136), (280, 137), (280, 138), (280, 139), (280, 140), (280, 141), (280, 142), (280, 143), (280, 145), (281, 120), (281, 122), (281, 123), (281, 124), (281, 125), (281, 126), (281, 127), (281, 128), (281, 129), (281, 130), (281, 131), (281, 132), (281, 133), (281, 134), (281, 135), (281, 136), (281, 137), (281, 138), (281, 139), (281, 140), (281, 141), (281, 142), (281, 143), (281, 144), (281, 146), (282, 120), (282, 122), (282, 123), (282, 124), (282, 125), (282, 126), (282, 127), (282, 128), (282, 129), (282, 130), (282, 131), (282, 132), (282, 133), (282, 134), (282, 135), (282, 136), (282, 137), (282, 138), (282, 139), (282, 140), (282, 141), (282, 142), (282, 143), (282, 144), (282, 145), (282, 147), (283, 120), (283, 122), (283, 123), (283, 124), (283, 125), (283, 126), (283, 127), (283, 128), (283, 129), (283, 130), (283, 131), (283, 132), (283, 133), (283, 134), (283, 135), (283, 136), (283, 137), (283, 138), (283, 139), (283, 140), (283, 141), (283, 142), (283, 143), (283, 144), (283, 145), (283, 146), (283, 148), (284, 120), (284, 122), (284, 123), (284, 124), (284, 125), (284, 126), (284, 127), (284, 128), (284, 129), (284, 130), (284, 131), (284, 132), (284, 133), (284, 134), (284, 135), (284, 136), (284, 137), (284, 138), (284, 139), (284, 140), (284, 141), (284, 142), (284, 143), (284, 144), (284, 145), (284, 146), (284, 147), (284, 149), (285, 119), (285, 121), (285, 122), (285, 123), (285, 124), (285, 125), (285, 126), (285, 127), (285, 128), (285, 129), (285, 130), (285, 131), (285, 132), (285, 133), (285, 134), (285, 135), (285, 136), (285, 137), (285, 138), (285, 139), (285, 140), (285, 141), (285, 142), (285, 143), (285, 144), (285, 145), (285, 146), (285, 147), (285, 149), (286, 116), (286, 120), (286, 121), (286, 122), (286, 123), (286, 124), (286, 125), (286, 126), (286, 127), (286, 128), (286, 129), (286, 130), (286, 131), (286, 132), (286, 133), (286, 134), (286, 135), (286, 136), (286, 137), (286, 138), (286, 139), (286, 140), (286, 141), (286, 142), (286, 143), (286, 144), (286, 145), (286, 146), (286, 147), (286, 148), (286, 150), (287, 116), (287, 119), (287, 120), (287, 121), (287, 122), (287, 123), (287, 124), (287, 125), (287, 126), (287, 127), (287, 128), (287, 129), (287, 130), (287, 131), (287, 132), (287, 133), (287, 134), (287, 135), (287, 136), (287, 137), (287, 138), (287, 139), (287, 140), (287, 141), (287, 142), (287, 143), (287, 144), (287, 145), (287, 146), (287, 147), (287, 148), (287, 149), (287, 151), (288, 115), (288, 117), (288, 118), (288, 119), (288, 120), (288, 121), (288, 122), (288, 123), (288, 124), (288, 125), (288, 126), (288, 127), (288, 128), (288, 129), (288, 130), (288, 131), (288, 132), (288, 133), (288, 134), (288, 135), (288, 136), (288, 137), (288, 138), (288, 139), (288, 140), (288, 141), (288, 142), (288, 143), (288, 144), (288, 145), (288, 146), (288, 147), (288, 148), (288, 149), (288, 151), (289, 115), (289, 117), (289, 118), (289, 119), (289, 120), (289, 121), (289, 122), (289, 123), (289, 124), (289, 125), (289, 126), (289, 127), (289, 128), (289, 129), (289, 130), (289, 131), (289, 132), (289, 133), (289, 134), (289, 135), (289, 136), (289, 137), (289, 138), (289, 139), (289, 140), (289, 141), (289, 142), (289, 143), (289, 144), (289, 145), (289, 146), (289, 147), (289, 148), (289, 149), (289, 150), (289, 152), (290, 115), (290, 117), (290, 118), (290, 119), (290, 120), (290, 121), (290, 122), (290, 123), (290, 124), (290, 125), (290, 126), (290, 127), (290, 128), (290, 129), (290, 130), (290, 131), (290, 132), (290, 133), (290, 134), (290, 135), (290, 136), (290, 137), (290, 138), (290, 139), (290, 140), (290, 141), (290, 142), (290, 143), (290, 144), (290, 145), (290, 146), (290, 147), (290, 148), (290, 149), (290, 150), (290, 151), (290, 153), (291, 114), (291, 116), (291, 117), (291, 118), (291, 119), (291, 120), (291, 121), (291, 122), (291, 123), (291, 124), (291, 125), (291, 126), (291, 127), (291, 128), (291, 129), (291, 130), (291, 131), (291, 132), (291, 133), (291, 134), (291, 135), (291, 136), (291, 137), (291, 138), (291, 139), (291, 140), (291, 141), (291, 142), (291, 143), (291, 144), (291, 145), (291, 146), (291, 147), (291, 148), (291, 149), (291, 150), (291, 151), (291, 153), (292, 114), (292, 116), (292, 117), (292, 118), (292, 119), (292, 120), (292, 121), (292, 122), (292, 123), (292, 124), (292, 125), (292, 126), (292, 127), (292, 128), (292, 129), (292, 130), (292, 131), (292, 132), (292, 133), (292, 134), (292, 135), (292, 136), (292, 137), (292, 138), (292, 139), (292, 140), (292, 141), (292, 142), (292, 143), (292, 144), (292, 145), (292, 146), (292, 147), (292, 148), (292, 149), (292, 150), (292, 151), (292, 152), (292, 154), (293, 114), (293, 116), (293, 117), (293, 118), (293, 119), (293, 120), (293, 121), (293, 122), (293, 123), (293, 124), (293, 125), (293, 126), (293, 127), (293, 128), (293, 129), (293, 130), (293, 131), (293, 132), (293, 133), (293, 134), (293, 135), (293, 136), (293, 137), (293, 138), (293, 139), (293, 140), (293, 141), (293, 142), (293, 143), (293, 144), (293, 145), (293, 146), (293, 147), (293, 148), (293, 149), (293, 150), (293, 151), (293, 152), (293, 154), (294, 113), (294, 115), (294, 116), (294, 117), (294, 118), (294, 119), (294, 120), (294, 121), (294, 122), (294, 123), (294, 124), (294, 125), (294, 126), (294, 127), (294, 128), (294, 129), (294, 130), (294, 131), (294, 132), (294, 133), (294, 134), (294, 135), (294, 136), (294, 137), (294, 138), (294, 139), (294, 140), (294, 141), (294, 142), (294, 143), (294, 144), (294, 145), (294, 146), (294, 147), (294, 148), (294, 149), (294, 150), (294, 151), (294, 152), (294, 154), (295, 112), (295, 114), (295, 115), (295, 116), (295, 117), (295, 118), (295, 119), (295, 120), (295, 121), (295, 122), (295, 123), (295, 124), (295, 125), (295, 126), (295, 127), (295, 128), (295, 129), (295, 130), (295, 131), (295, 132), (295, 133), (295, 134), (295, 135), (295, 136), (295, 137), (295, 138), (295, 139), (295, 140), (295, 141), (295, 142), (295, 143), (295, 144), (295, 145), (295, 146), (295, 147), (295, 148), (295, 149), (295, 150), (295, 151), (295, 152), (295, 153), (295, 155), (296, 112), (296, 114), (296, 115), (296, 116), (296, 117), (296, 118), (296, 119), (296, 120), (296, 121), (296, 122), (296, 123), (296, 124), (296, 125), (296, 126), (296, 127), (296, 128), (296, 129), (296, 130), (296, 131), (296, 132), (296, 133), (296, 134), (296, 135), (296, 136), (296, 137), (296, 138), (296, 139), (296, 140), (296, 141), (296, 142), (296, 143), (296, 144), (296, 145), (296, 146), (296, 147), (296, 148), (296, 149), (296, 150), (296, 151), (296, 152), (296, 153), (296, 155), (297, 111), (297, 113), (297, 114), (297, 115), (297, 116), (297, 117), (297, 118), (297, 119), (297, 120), (297, 121), (297, 122), (297, 123), (297, 124), (297, 125), (297, 126), (297, 127), (297, 128), (297, 129), (297, 130), (297, 131), (297, 132), (297, 133), (297, 134), (297, 135), (297, 136), (297, 137), (297, 138), (297, 139), (297, 140), (297, 141), (297, 142), (297, 143), (297, 144), (297, 145), (297, 146), (297, 147), (297, 148), (297, 149), (297, 150), (297, 151), (297, 152), (297, 153), (297, 155), (298, 109), (298, 112), (298, 113), (298, 114), (298, 115), (298, 116), (298, 117), (298, 118), (298, 119), (298, 120), (298, 121), (298, 122), (298, 123), (298, 124), (298, 125), (298, 126), (298, 127), (298, 128), (298, 129), (298, 130), (298, 131), (298, 132), (298, 133), (298, 134), (298, 135), (298, 136), (298, 137), (298, 138), (298, 139), (298, 140), (298, 141), (298, 142), (298, 143), (298, 144), (298, 145), (298, 146), (298, 147), (298, 148), (298, 149), (298, 150), (298, 151), (298, 152), (298, 153), (298, 154), (298, 156), (299, 109), (299, 111), (299, 112), (299, 113), (299, 114), (299, 115), (299, 116), (299, 117), (299, 118), (299, 119), (299, 120), (299, 121), (299, 122), (299, 123), (299, 124), (299, 125), (299, 126), (299, 127), (299, 128), (299, 129), (299, 130), (299, 131), (299, 132), (299, 133), (299, 134), (299, 135), (299, 136), (299, 137), (299, 138), (299, 139), (299, 140), (299, 141), (299, 142), (299, 143), (299, 144), (299, 145), (299, 146), (299, 147), (299, 148), (299, 149), (299, 150), (299, 151), (299, 152), (299, 153), (299, 154), (299, 156), (300, 109), (300, 111), (300, 112), (300, 113), (300, 114), (300, 115), (300, 116), (300, 117), (300, 118), (300, 119), (300, 120), (300, 121), (300, 122), (300, 123), (300, 124), (300, 125), (300, 126), (300, 127), (300, 128), (300, 129), (300, 130), (300, 131), (300, 132), (300, 133), (300, 134), (300, 135), (300, 136), (300, 137), (300, 138), (300, 139), (300, 140), (300, 141), (300, 142), (300, 143), (300, 144), (300, 145), (300, 146), (300, 147), (300, 148), (300, 149), (300, 150), (300, 151), (300, 152), (300, 153), (300, 154), (300, 156), (301, 109), (301, 111), (301, 112), (301, 113), (301, 114), (301, 115), (301, 116), (301, 117), (301, 118), (301, 119), (301, 120), (301, 121), (301, 122), (301, 123), (301, 124), (301, 125), (301, 126), (301, 127), (301, 128), (301, 129), (301, 130), (301, 131), (301, 132), (301, 133), (301, 134), (301, 135), (301, 136), (301, 137), (301, 138), (301, 139), (301, 140), (301, 141), (301, 142), (301, 143), (301, 144), (301, 145), (301, 146), (301, 147), (301, 148), (301, 149), (301, 150), (301, 151), (301, 152), (301, 153), (301, 154), (301, 156), (302, 110), (302, 112), (302, 113), (302, 114), (302, 115), (302, 116), (302, 117), (302, 118), (302, 119), (302, 120), (302, 121), (302, 122), (302, 123), (302, 124), (302, 125), (302, 126), (302, 127), (302, 128), (302, 129), (302, 130), (302, 131), (302, 132), (302, 133), (302, 134), (302, 135), (302, 136), (302, 137), (302, 138), (302, 139), (302, 140), (302, 141), (302, 142), (302, 143), (302, 144), (302, 145), (302, 146), (302, 147), (302, 148), (302, 149), (302, 150), (302, 151), (302, 152), (302, 153), (302, 154), (302, 156), (303, 110), (303, 112), (303, 113), (303, 114), (303, 115), (303, 116), (303, 117), (303, 118), (303, 119), (303, 120), (303, 121), (303, 122), (303, 123), (303, 124), (303, 125), (303, 126), (303, 127), (303, 128), (303, 129), (303, 130), (303, 131), (303, 132), (303, 133), (303, 134), (303, 135), (303, 136), (303, 137), (303, 138), (303, 139), (303, 140), (303, 141), (303, 142), (303, 143), (303, 144), (303, 145), (303, 146), (303, 147), (303, 148), (303, 149), (303, 150), (303, 151), (303, 152), (303, 153), (303, 154), (303, 155), (303, 156), (303, 157), (304, 111), (304, 113), (304, 114), (304, 115), (304, 116), (304, 117), (304, 118), (304, 119), (304, 120), (304, 121), (304, 122), (304, 123), (304, 124), (304, 125), (304, 126), (304, 127), (304, 128), (304, 129), (304, 130), (304, 131), (304, 132), (304, 133), (304, 134), (304, 135), (304, 136), (304, 137), (304, 138), (304, 139), (304, 140), (304, 141), (304, 142), (304, 143), (304, 144), (304, 145), (304, 146), (304, 147), (304, 148), (304, 149), (304, 150), (304, 151), (304, 152), (304, 153), (304, 154), (304, 155), (304, 157), (305, 111), (305, 113), (305, 114), (305, 115), (305, 116), (305, 117), (305, 118), (305, 119), (305, 120), (305, 121), (305, 122), (305, 123), (305, 124), (305, 125), (305, 126), (305, 127), (305, 128), (305, 129), (305, 130), (305, 131), (305, 132), (305, 133), (305, 134), (305, 135), (305, 136), (305, 137), (305, 138), (305, 139), (305, 140), (305, 141), (305, 142), (305, 143), (305, 144), (305, 145), (305, 146), (305, 147), (305, 148), (305, 149), (305, 150), (305, 151), (305, 152), (305, 153), (305, 154), (305, 155), (305, 157), (306, 112), (306, 114), (306, 115), (306, 116), (306, 117), (306, 118), (306, 119), (306, 120), (306, 121), (306, 122), (306, 123), (306, 124), (306, 125), (306, 126), (306, 127), (306, 128), (306, 129), (306, 130), (306, 131), (306, 132), (306, 133), (306, 134), (306, 135), (306, 136), (306, 137), (306, 138), (306, 139), (306, 140), (306, 141), (306, 142), (306, 143), (306, 144), (306, 145), (306, 146), (306, 147), (306, 148), (306, 149), (306, 150), (306, 151), (306, 152), (306, 153), (306, 154), (306, 156), (307, 112), (307, 114), (307, 115), (307, 116), (307, 117), (307, 118), (307, 119), (307, 120), (307, 121), (307, 122), (307, 123), (307, 124), (307, 125), (307, 126), (307, 127), (307, 128), (307, 129), (307, 130), (307, 131), (307, 132), (307, 133), (307, 134), (307, 135), (307, 136), (307, 137), (307, 138), (307, 139), (307, 140), (307, 141), (307, 142), (307, 143), (307, 144), (307, 145), (307, 146), (307, 147), (307, 148), (307, 149), (307, 150), (307, 151), (307, 152), (307, 153), (307, 154), (307, 156), (308, 113), (308, 115), (308, 116), (308, 117), (308, 118), (308, 119), (308, 120), (308, 121), (308, 122), (308, 123), (308, 124), (308, 125), (308, 126), (308, 127), (308, 128), (308, 129), (308, 130), (308, 131), (308, 132), (308, 133), (308, 134), (308, 135), (308, 136), (308, 137), (308, 138), (308, 139), (308, 140), (308, 141), (308, 142), (308, 143), (308, 144), (308, 145), (308, 146), (308, 147), (308, 148), (308, 149), (308, 150), (308, 151), (308, 152), (308, 153), (308, 154), (308, 156), (309, 114), (309, 116), (309, 117), (309, 118), (309, 119), (309, 120), (309, 121), (309, 122), (309, 123), (309, 124), (309, 125), (309, 126), (309, 127), (309, 128), (309, 129), (309, 130), (309, 131), (309, 132), (309, 133), (309, 134), (309, 135), (309, 136), (309, 137), (309, 138), (309, 139), (309, 140), (309, 141), (309, 142), (309, 143), (309, 144), (309, 145), (309, 146), (309, 147), (309, 148), (309, 149), (309, 150), (309, 151), (309, 152), (309, 153), (309, 154), (309, 156), (310, 115), (310, 117), (310, 118), (310, 119), (310, 120), (310, 121), (310, 122), (310, 123), (310, 124), (310, 125), (310, 126), (310, 127), (310, 128), (310, 129), (310, 130), (310, 131), (310, 132), (310, 133), (310, 134), (310, 135), (310, 136), (310, 137), (310, 138), (310, 139), (310, 140), (310, 141), (310, 142), (310, 143), (310, 144), (310, 145), (310, 146), (310, 147), (310, 148), (310, 149), (310, 150), (310, 151), (310, 152), (310, 153), (310, 154), (310, 156), (311, 116), (311, 118), (311, 119), (311, 120), (311, 121), (311, 122), (311, 123), (311, 124), (311, 125), (311, 126), (311, 127), (311, 128), (311, 129), (311, 130), (311, 131), (311, 132), (311, 133), (311, 134), (311, 135), (311, 136), (311, 137), (311, 138), (311, 139), (311, 140), (311, 141), (311, 142), (311, 143), (311, 144), (311, 145), (311, 146), (311, 147), (311, 148), (311, 149), (311, 150), (311, 151), (311, 152), (311, 153), (311, 155), (312, 119), (312, 120), (312, 121), (312, 122), (312, 123), (312, 124), (312, 125), (312, 126), (312, 127), (312, 128), (312, 129), (312, 130), (312, 131), (312, 132), (312, 133), (312, 134), (312, 135), (312, 136), (312, 137), (312, 138), (312, 139), (312, 140), (312, 141), (312, 142), (312, 143), (312, 144), (312, 145), (312, 146), (312, 147), (312, 148), (312, 149), (312, 150), (312, 151), (312, 152), (312, 153), (312, 155), (313, 120), (313, 121), (313, 122), (313, 123), (313, 124), (313, 125), (313, 126), (313, 127), (313, 128), (313, 129), (313, 130), (313, 131), (313, 132), (313, 133), (313, 134), (313, 135), (313, 136), (313, 137), (313, 138), (313, 139), (313, 140), (313, 141), (313, 142), (313, 143), (313, 144), (313, 145), (313, 146), (313, 147), (313, 148), (313, 149), (313, 150), (313, 151), (313, 152), (313, 153), (313, 155), (314, 119), (314, 121), (314, 122), (314, 123), (314, 124), (314, 125), (314, 126), (314, 127), (314, 128), (314, 129), (314, 130), (314, 131), (314, 132), (314, 133), (314, 134), (314, 135), (314, 136), (314, 137), (314, 138), (314, 139), (314, 140), (314, 141), (314, 142), (314, 143), (314, 144), (314, 145), (314, 146), (314, 147), (314, 148), (314, 149), (314, 150), (314, 151), (314, 152), (314, 153), (314, 155), (315, 120), (315, 122), (315, 123), (315, 124), (315, 125), (315, 126), (315, 127), (315, 128), (315, 129), (315, 130), (315, 131), (315, 132), (315, 133), (315, 134), (315, 135), (315, 136), (315, 137), (315, 138), (315, 139), (315, 140), (315, 141), (315, 142), (315, 143), (315, 144), (315, 145), (315, 146), (315, 147), (315, 148), (315, 149), (315, 150), (315, 151), (315, 152), (315, 153), (315, 155), (316, 121), (316, 123), (316, 124), (316, 125), (316, 126), (316, 127), (316, 128), (316, 129), (316, 130), (316, 131), (316, 132), (316, 133), (316, 134), (316, 135), (316, 136), (316, 137), (316, 138), (316, 139), (316, 140), (316, 141), (316, 142), (316, 143), (316, 144), (316, 145), (316, 146), (316, 147), (316, 148), (316, 149), (316, 150), (316, 151), (316, 152), (316, 153), (316, 155), (317, 122), (317, 125), (317, 126), (317, 127), (317, 128), (317, 129), (317, 130), (317, 131), (317, 132), (317, 133), (317, 134), (317, 135), (317, 136), (317, 137), (317, 138), (317, 139), (317, 140), (317, 141), (317, 142), (317, 143), (317, 144), (317, 145), (317, 146), (317, 147), (317, 148), (317, 149), (317, 150), (317, 151), (317, 152), (317, 154), (318, 123), (318, 126), (318, 127), (318, 128), (318, 129), (318, 130), (318, 131), (318, 132), (318, 133), (318, 134), (318, 135), (318, 136), (318, 137), (318, 138), (318, 139), (318, 140), (318, 141), (318, 142), (318, 143), (318, 144), (318, 145), (318, 146), (318, 147), (318, 148), (318, 149), (318, 150), (318, 151), (318, 152), (318, 154), (319, 127), (319, 128), (319, 129), (319, 130), (319, 131), (319, 132), (319, 133), (319, 134), (319, 135), (319, 136), (319, 137), (319, 138), (319, 139), (319, 140), (319, 141), (319, 142), (319, 143), (319, 144), (319, 145), (319, 146), (319, 147), (319, 148), (319, 149), (319, 150), (319, 151), (319, 152), (319, 154), (320, 126), (320, 129), (320, 130), (320, 131), (320, 132), (320, 133), (320, 134), (320, 135), (320, 136), (320, 137), (320, 138), (320, 139), (320, 140), (320, 141), (320, 142), (320, 143), (320, 144), (320, 145), (320, 146), (320, 147), (320, 148), (320, 149), (320, 150), (320, 151), (320, 153), (321, 127), (321, 130), (321, 131), (321, 132), (321, 133), (321, 134), (321, 135), (321, 136), (321, 137), (321, 138), (321, 139), (321, 140), (321, 141), (321, 142), (321, 143), (321, 144), (321, 145), (321, 146), (321, 147), (321, 148), (321, 149), (321, 150), (321, 151), (321, 153), (322, 129), (322, 132), (322, 133), (322, 134), (322, 135), (322, 136), (322, 137), (322, 138), (322, 139), (322, 140), (322, 141), (322, 142), (322, 143), (322, 144), (322, 145), (322, 146), (322, 147), (322, 148), (322, 149), (322, 150), (322, 152), (323, 130), (323, 134), (323, 135), (323, 136), (323, 137), (323, 138), (323, 139), (323, 140), (323, 141), (323, 142), (323, 143), (323, 144), (323, 145), (323, 146), (323, 147), (323, 148), (323, 149), (323, 150), (323, 152), (324, 132), (324, 135), (324, 136), (324, 137), (324, 138), (324, 139), (324, 140), (324, 141), (324, 142), (324, 143), (324, 144), (324, 145), (324, 146), (324, 147), (324, 148), (324, 149), (324, 150), (324, 152), (325, 134), (325, 137), (325, 138), (325, 139), (325, 140), (325, 141), (325, 142), (325, 143), (325, 144), (325, 145), (325, 146), (325, 147), (325, 148), (325, 149), (325, 151), (326, 136), (326, 139), (326, 140), (326, 141), (326, 142), (326, 143), (326, 144), (326, 145), (326, 146), (326, 147), (326, 148), (326, 149), (326, 151), (327, 137), (327, 138), (327, 142), (327, 143), (327, 144), (327, 145), (327, 146), (327, 147), (327, 148), (327, 150), (328, 140), (328, 141), (328, 145), (328, 146), (328, 147), (328, 148), (328, 150), (329, 142), (329, 144), (329, 150), (330, 145), (330, 146), (330, 147), (330, 149), ) coordinates_8900FF = ((61, 184), (61, 186), (61, 187), (61, 189), (62, 182), (62, 183), (62, 189), (63, 180), (63, 184), (63, 185), (63, 187), (64, 178), (64, 181), (64, 182), (64, 183), (64, 184), (64, 186), (65, 177), (65, 180), (65, 181), (65, 182), (65, 183), (65, 184), (65, 186), (66, 175), (66, 178), (66, 179), (66, 180), (66, 181), (66, 182), (66, 183), (66, 184), (66, 186), (67, 174), (67, 177), (67, 178), (67, 179), (67, 180), (67, 181), (67, 182), (67, 183), (67, 184), (67, 185), (67, 187), (68, 176), (68, 177), (68, 178), (68, 179), (68, 180), (68, 181), (68, 182), (68, 183), (68, 184), (68, 185), (68, 187), (69, 173), (69, 175), (69, 176), (69, 177), (69, 178), (69, 179), (69, 180), (69, 181), (69, 182), (69, 183), (69, 184), (69, 185), (69, 187), (70, 172), (70, 174), (70, 175), (70, 176), (70, 177), (70, 178), (70, 179), (70, 180), (70, 181), (70, 182), (70, 183), (70, 184), (70, 185), (70, 186), (70, 188), (71, 171), (71, 173), (71, 174), (71, 175), (71, 176), (71, 177), (71, 178), (71, 179), (71, 180), (71, 181), (71, 182), (71, 183), (71, 184), (71, 185), (71, 186), (71, 188), (72, 171), (72, 173), (72, 174), (72, 175), (72, 176), (72, 177), (72, 178), (72, 179), (72, 180), (72, 181), (72, 182), (72, 183), (72, 184), (72, 187), (72, 188), (73, 170), (73, 172), (73, 173), (73, 174), (73, 175), (73, 176), (73, 177), (73, 178), (73, 179), (73, 180), (73, 181), (73, 182), (73, 183), (73, 185), (74, 169), (74, 171), (74, 172), (74, 173), (74, 174), (74, 175), (74, 176), (74, 177), (74, 178), (74, 179), (74, 180), (74, 181), (74, 182), (74, 184), (75, 169), (75, 171), (75, 172), (75, 173), (75, 174), (75, 175), (75, 176), (75, 177), (75, 178), (75, 179), (75, 180), (75, 181), (75, 183), (76, 168), (76, 170), (76, 171), (76, 172), (76, 173), (76, 174), (76, 175), (76, 176), (76, 177), (76, 178), (76, 179), (76, 180), (76, 182), (77, 168), (77, 170), (77, 171), (77, 172), (77, 173), (77, 174), (77, 175), (77, 176), (77, 177), (77, 178), (77, 179), (77, 181), (78, 168), (78, 170), (78, 171), (78, 172), (78, 173), (78, 174), (78, 175), (78, 176), (78, 177), (78, 178), (78, 180), (79, 168), (79, 170), (79, 171), (79, 172), (79, 173), (79, 174), (79, 175), (79, 176), (79, 177), (79, 178), (79, 180), (80, 168), (80, 170), (80, 171), (80, 172), (80, 173), (80, 174), (80, 175), (80, 176), (80, 177), (80, 179), (81, 168), (81, 170), (81, 171), (81, 172), (81, 173), (81, 174), (81, 175), (81, 176), (81, 177), (81, 179), (82, 168), (82, 170), (82, 171), (82, 172), (82, 173), (82, 174), (82, 175), (82, 176), (82, 177), (82, 179), (83, 169), (83, 171), (83, 172), (83, 173), (83, 174), (83, 175), (83, 176), (83, 177), (83, 179), (84, 169), (84, 171), (84, 172), (84, 173), (84, 174), (84, 175), (84, 176), (84, 178), (85, 169), (85, 171), (85, 172), (85, 173), (85, 174), (85, 175), (86, 170), (86, 172), (86, 173), (86, 174), (86, 176), (87, 170), (87, 173), (87, 175), (88, 171), (89, 172), (89, 174), (310, 172), (310, 174), (311, 171), (311, 175), (312, 170), (312, 173), (312, 175), (313, 170), (313, 172), (313, 173), (313, 174), (313, 177), (314, 169), (314, 171), (314, 172), (314, 173), (314, 174), (314, 175), (314, 178), (315, 169), (315, 171), (315, 172), (315, 173), (315, 174), (315, 175), (315, 176), (315, 178), (316, 169), (316, 171), (316, 172), (316, 173), (316, 174), (316, 175), (316, 176), (316, 177), (316, 179), (317, 168), (317, 170), (317, 171), (317, 172), (317, 173), (317, 174), (317, 175), (317, 176), (317, 177), (317, 179), (318, 168), (318, 170), (318, 171), (318, 172), (318, 173), (318, 174), (318, 175), (318, 176), (318, 177), (318, 179), (319, 168), (319, 170), (319, 171), (319, 172), (319, 173), (319, 174), (319, 175), (319, 176), (319, 177), (319, 179), (320, 168), (320, 170), (320, 171), (320, 172), (320, 173), (320, 174), (320, 175), (320, 176), (320, 177), (320, 178), (320, 180), (321, 168), (321, 170), (321, 171), (321, 172), (321, 173), (321, 174), (321, 175), (321, 176), (321, 177), (321, 178), (321, 180), (322, 168), (322, 170), (322, 171), (322, 172), (322, 173), (322, 174), (322, 175), (322, 176), (322, 177), (322, 178), (322, 179), (322, 181), (323, 168), (323, 170), (323, 171), (323, 172), (323, 173), (323, 174), (323, 175), (323, 176), (323, 177), (323, 178), (323, 179), (323, 180), (323, 182), (324, 169), (324, 171), (324, 172), (324, 173), (324, 174), (324, 175), (324, 176), (324, 177), (324, 178), (324, 179), (324, 180), (324, 181), (324, 183), (325, 169), (325, 171), (325, 172), (325, 173), (325, 174), (325, 175), (325, 176), (325, 177), (325, 178), (325, 179), (325, 180), (325, 181), (325, 182), (325, 184), (326, 170), (326, 172), (326, 173), (326, 174), (326, 175), (326, 176), (326, 177), (326, 178), (326, 179), (326, 180), (326, 181), (326, 182), (326, 183), (326, 186), (327, 171), (327, 173), (327, 174), (327, 175), (327, 176), (327, 177), (327, 178), (327, 179), (327, 180), (327, 181), (327, 182), (327, 183), (327, 184), (327, 187), (327, 188), (328, 171), (328, 173), (328, 174), (328, 175), (328, 176), (328, 177), (328, 178), (328, 179), (328, 180), (328, 181), (328, 182), (328, 183), (328, 184), (328, 185), (328, 186), (328, 188), (329, 172), (329, 174), (329, 175), (329, 176), (329, 177), (329, 178), (329, 179), (329, 180), (329, 181), (329, 182), (329, 183), (329, 184), (329, 185), (329, 186), (329, 188), (330, 173), (330, 175), (330, 176), (330, 177), (330, 178), (330, 179), (330, 180), (330, 181), (330, 182), (330, 183), (330, 184), (330, 185), (330, 187), (331, 174), (331, 176), (331, 177), (331, 178), (331, 179), (331, 180), (331, 181), (331, 182), (331, 183), (331, 184), (331, 185), (331, 187), (332, 177), (332, 178), (332, 179), (332, 180), (332, 181), (332, 182), (332, 183), (332, 184), (332, 185), (332, 187), (333, 176), (333, 178), (333, 179), (333, 180), (333, 181), (333, 182), (333, 183), (333, 184), (333, 186), (334, 177), (334, 180), (334, 181), (334, 182), (334, 183), (334, 184), (334, 186), (335, 178), (335, 182), (335, 183), (335, 184), (335, 186), (336, 180), (336, 184), (336, 185), (336, 187), (337, 182), (337, 183), (337, 189), (338, 185), (338, 186), (338, 187), (338, 189), ) coordinates_00C4FF = ((37, 171), (37, 172), (37, 173), (37, 174), (37, 175), (37, 176), (37, 178), (38, 167), (38, 168), (38, 169), (38, 170), (38, 178), (39, 165), (39, 166), (39, 171), (39, 172), (39, 173), (39, 174), (39, 175), (39, 176), (39, 177), (39, 179), (40, 162), (40, 167), (40, 168), (40, 169), (40, 170), (40, 171), (40, 172), (40, 173), (40, 174), (40, 175), (40, 176), (40, 177), (40, 178), (41, 160), (41, 164), (41, 165), (41, 166), (41, 167), (41, 168), (41, 169), (41, 170), (41, 171), (41, 172), (41, 173), (41, 174), (41, 175), (41, 176), (41, 177), (41, 178), (41, 179), (41, 181), (42, 158), (42, 159), (42, 162), (42, 163), (42, 164), (42, 165), (42, 166), (42, 167), (42, 168), (42, 169), (42, 170), (42, 171), (42, 172), (42, 173), (42, 174), (42, 175), (42, 176), (42, 177), (42, 178), (42, 179), (42, 180), (42, 183), (42, 184), (42, 185), (43, 153), (43, 154), (43, 155), (43, 156), (43, 160), (43, 161), (43, 162), (43, 163), (43, 164), (43, 165), (43, 166), (43, 167), (43, 168), (43, 169), (43, 170), (43, 171), (43, 172), (43, 173), (43, 174), (43, 175), (43, 176), (43, 177), (43, 178), (43, 179), (43, 180), (43, 181), (43, 186), (44, 146), (44, 147), (44, 148), (44, 149), (44, 150), (44, 151), (44, 152), (44, 157), (44, 158), (44, 159), (44, 160), (44, 161), (44, 162), (44, 163), (44, 164), (44, 165), (44, 166), (44, 167), (44, 168), (44, 169), (44, 170), (44, 171), (44, 172), (44, 173), (44, 174), (44, 175), (44, 176), (44, 177), (44, 178), (44, 179), (44, 180), (44, 181), (44, 182), (44, 183), (44, 184), (44, 187), (45, 142), (45, 143), (45, 144), (45, 145), (45, 153), (45, 154), (45, 155), (45, 156), (45, 157), (45, 158), (45, 159), (45, 160), (45, 161), (45, 162), (45, 163), (45, 164), (45, 165), (45, 166), (45, 167), (45, 168), (45, 169), (45, 170), (45, 171), (45, 172), (45, 173), (45, 174), (45, 175), (45, 176), (45, 177), (45, 178), (45, 179), (45, 180), (45, 181), (45, 182), (45, 185), (46, 139), (46, 146), (46, 147), (46, 148), (46, 149), (46, 150), (46, 151), (46, 152), (46, 153), (46, 154), (46, 155), (46, 156), (46, 157), (46, 158), (46, 159), (46, 160), (46, 161), (46, 162), (46, 163), (46, 164), (46, 165), (46, 166), (46, 167), (46, 168), (46, 169), (46, 170), (46, 171), (46, 172), (46, 173), (46, 174), (46, 175), (46, 176), (46, 177), (46, 178), (46, 179), (46, 180), (46, 181), (46, 184), (47, 137), (47, 141), (47, 142), (47, 143), (47, 144), (47, 145), (47, 146), (47, 147), (47, 148), (47, 149), (47, 150), (47, 151), (47, 152), (47, 153), (47, 154), (47, 155), (47, 156), (47, 157), (47, 158), (47, 159), (47, 160), (47, 161), (47, 162), (47, 163), (47, 164), (47, 165), (47, 166), (47, 167), (47, 168), (47, 169), (47, 170), (47, 171), (47, 172), (47, 173), (47, 174), (47, 175), (47, 176), (47, 177), (47, 178), (47, 179), (47, 182), (48, 135), (48, 139), (48, 140), (48, 141), (48, 142), (48, 143), (48, 144), (48, 145), (48, 146), (48, 147), (48, 148), (48, 149), (48, 150), (48, 151), (48, 152), (48, 153), (48, 154), (48, 155), (48, 156), (48, 157), (48, 158), (48, 159), (48, 160), (48, 161), (48, 162), (48, 163), (48, 164), (48, 165), (48, 166), (48, 167), (48, 168), (48, 169), (48, 170), (48, 171), (48, 172), (48, 173), (48, 174), (48, 175), (48, 176), (48, 177), (48, 178), (48, 181), (49, 133), (49, 134), (49, 137), (49, 138), (49, 139), (49, 140), (49, 141), (49, 142), (49, 143), (49, 144), (49, 145), (49, 146), (49, 147), (49, 148), (49, 149), (49, 150), (49, 151), (49, 152), (49, 153), (49, 154), (49, 155), (49, 156), (49, 157), (49, 158), (49, 159), (49, 160), (49, 161), (49, 162), (49, 163), (49, 164), (49, 165), (49, 166), (49, 167), (49, 168), (49, 169), (49, 170), (49, 171), (49, 172), (49, 173), (49, 174), (49, 175), (49, 176), (49, 179), (50, 132), (50, 135), (50, 136), (50, 137), (50, 138), (50, 139), (50, 140), (50, 141), (50, 142), (50, 143), (50, 144), (50, 145), (50, 146), (50, 147), (50, 148), (50, 149), (50, 150), (50, 151), (50, 152), (50, 153), (50, 154), (50, 155), (50, 156), (50, 157), (50, 158), (50, 159), (50, 160), (50, 161), (50, 162), (50, 163), (50, 164), (50, 165), (50, 166), (50, 167), (50, 168), (50, 169), (50, 170), (50, 171), (50, 172), (50, 173), (50, 174), (50, 178), (51, 130), (51, 133), (51, 134), (51, 135), (51, 136), (51, 137), (51, 138), (51, 139), (51, 140), (51, 141), (51, 142), (51, 143), (51, 144), (51, 145), (51, 146), (51, 147), (51, 148), (51, 149), (51, 150), (51, 151), (51, 152), (51, 153), (51, 154), (51, 155), (51, 156), (51, 157), (51, 158), (51, 159), (51, 160), (51, 161), (51, 162), (51, 163), (51, 164), (51, 165), (51, 166), (51, 167), (51, 168), (51, 169), (51, 170), (51, 171), (51, 172), (51, 176), (52, 129), (52, 132), (52, 133), (52, 134), (52, 135), (52, 136), (52, 137), (52, 138), (52, 139), (52, 140), (52, 141), (52, 142), (52, 143), (52, 144), (52, 145), (52, 146), (52, 147), (52, 148), (52, 149), (52, 150), (52, 151), (52, 152), (52, 153), (52, 154), (52, 155), (52, 156), (52, 157), (52, 158), (52, 159), (52, 160), (52, 161), (52, 162), (52, 163), (52, 164), (52, 165), (52, 166), (52, 167), (52, 168), (52, 169), (52, 170), (52, 174), (53, 127), (53, 130), (53, 131), (53, 132), (53, 133), (53, 134), (53, 135), (53, 136), (53, 137), (53, 138), (53, 139), (53, 140), (53, 141), (53, 142), (53, 143), (53, 144), (53, 145), (53, 146), (53, 147), (53, 148), (53, 149), (53, 150), (53, 151), (53, 152), (53, 153), (53, 154), (53, 155), (53, 156), (53, 157), (53, 158), (53, 159), (53, 160), (53, 161), (53, 162), (53, 163), (53, 164), (53, 165), (53, 166), (53, 167), (53, 168), (53, 172), (54, 126), (54, 129), (54, 130), (54, 131), (54, 132), (54, 133), (54, 134), (54, 135), (54, 136), (54, 137), (54, 138), (54, 139), (54, 140), (54, 141), (54, 142), (54, 143), (54, 144), (54, 145), (54, 146), (54, 147), (54, 148), (54, 149), (54, 150), (54, 151), (54, 152), (54, 153), (54, 154), (54, 155), (54, 156), (54, 157), (54, 158), (54, 159), (54, 160), (54, 161), (54, 162), (54, 163), (54, 164), (54, 165), (54, 166), (54, 170), (55, 124), (55, 127), (55, 128), (55, 129), (55, 130), (55, 131), (55, 132), (55, 133), (55, 134), (55, 135), (55, 136), (55, 137), (55, 138), (55, 139), (55, 140), (55, 141), (55, 142), (55, 143), (55, 144), (55, 145), (55, 146), (55, 147), (55, 148), (55, 149), (55, 150), (55, 151), (55, 152), (55, 153), (55, 154), (55, 155), (55, 156), (55, 157), (55, 158), (55, 159), (55, 160), (55, 161), (55, 162), (55, 163), (55, 164), (55, 168), (56, 123), (56, 126), (56, 127), (56, 128), (56, 129), (56, 130), (56, 131), (56, 132), (56, 133), (56, 134), (56, 135), (56, 136), (56, 137), (56, 138), (56, 139), (56, 140), (56, 141), (56, 142), (56, 143), (56, 144), (56, 145), (56, 146), (56, 147), (56, 148), (56, 149), (56, 150), (56, 151), (56, 152), (56, 153), (56, 154), (56, 155), (56, 156), (56, 157), (56, 158), (56, 159), (56, 160), (56, 161), (56, 162), (56, 166), (57, 122), (57, 124), (57, 125), (57, 126), (57, 127), (57, 128), (57, 129), (57, 130), (57, 131), (57, 132), (57, 133), (57, 134), (57, 135), (57, 136), (57, 137), (57, 138), (57, 139), (57, 140), (57, 141), (57, 142), (57, 143), (57, 144), (57, 145), (57, 146), (57, 147), (57, 148), (57, 149), (57, 150), (57, 151), (57, 152), (57, 153), (57, 154), (57, 155), (57, 156), (57, 157), (57, 158), (57, 159), (57, 160), (57, 163), (57, 164), (58, 120), (58, 123), (58, 124), (58, 125), (58, 126), (58, 127), (58, 128), (58, 129), (58, 130), (58, 131), (58, 132), (58, 133), (58, 134), (58, 135), (58, 136), (58, 137), (58, 138), (58, 139), (58, 140), (58, 141), (58, 142), (58, 143), (58, 144), (58, 145), (58, 146), (58, 147), (58, 148), (58, 149), (58, 150), (58, 151), (58, 152), (58, 153), (58, 154), (58, 155), (58, 156), (58, 157), (58, 161), (59, 119), (59, 122), (59, 123), (59, 124), (59, 125), (59, 126), (59, 127), (59, 128), (59, 129), (59, 130), (59, 131), (59, 132), (59, 133), (59, 134), (59, 135), (59, 136), (59, 137), (59, 138), (59, 139), (59, 140), (59, 141), (59, 142), (59, 143), (59, 144), (59, 145), (59, 146), (59, 147), (59, 148), (59, 149), (59, 150), (59, 151), (59, 152), (59, 153), (59, 154), (59, 155), (59, 159), (60, 118), (60, 121), (60, 122), (60, 123), (60, 124), (60, 125), (60, 126), (60, 127), (60, 128), (60, 129), (60, 130), (60, 131), (60, 132), (60, 133), (60, 134), (60, 135), (60, 136), (60, 137), (60, 138), (60, 139), (60, 140), (60, 141), (60, 142), (60, 143), (60, 144), (60, 145), (60, 146), (60, 147), (60, 148), (60, 149), (60, 150), (60, 151), (60, 152), (60, 153), (60, 154), (60, 157), (61, 117), (61, 119), (61, 120), (61, 121), (61, 122), (61, 123), (61, 124), (61, 125), (61, 126), (61, 127), (61, 128), (61, 129), (61, 130), (61, 131), (61, 132), (61, 133), (61, 134), (61, 135), (61, 136), (61, 137), (61, 138), (61, 139), (61, 140), (61, 141), (61, 142), (61, 143), (61, 144), (61, 145), (61, 146), (61, 147), (61, 148), (61, 149), (61, 150), (61, 151), (61, 152), (61, 153), (61, 155), (62, 116), (62, 118), (62, 119), (62, 120), (62, 121), (62, 122), (62, 123), (62, 124), (62, 125), (62, 126), (62, 127), (62, 128), (62, 129), (62, 130), (62, 131), (62, 132), (62, 133), (62, 134), (62, 135), (62, 136), (62, 137), (62, 138), (62, 139), (62, 140), (62, 141), (62, 142), (62, 143), (62, 144), (62, 145), (62, 146), (62, 147), (62, 148), (62, 149), (62, 150), (62, 151), (62, 152), (62, 154), (63, 115), (63, 117), (63, 118), (63, 119), (63, 120), (63, 121), (63, 122), (63, 123), (63, 124), (63, 125), (63, 126), (63, 127), (63, 128), (63, 129), (63, 130), (63, 131), (63, 132), (63, 133), (63, 134), (63, 135), (63, 136), (63, 137), (63, 138), (63, 139), (63, 140), (63, 141), (63, 142), (63, 143), (63, 144), (63, 145), (63, 146), (63, 147), (63, 148), (63, 149), (63, 150), (63, 151), (63, 153), (64, 114), (64, 116), (64, 117), (64, 118), (64, 119), (64, 120), (64, 121), (64, 122), (64, 123), (64, 124), (64, 125), (64, 126), (64, 127), (64, 128), (64, 129), (64, 130), (64, 131), (64, 132), (64, 133), (64, 134), (64, 135), (64, 136), (64, 137), (64, 138), (64, 139), (64, 140), (64, 141), (64, 142), (64, 143), (64, 144), (64, 145), (64, 146), (64, 147), (64, 148), (64, 149), (64, 150), (64, 152), (65, 113), (65, 115), (65, 116), (65, 117), (65, 118), (65, 119), (65, 120), (65, 121), (65, 122), (65, 123), (65, 124), (65, 125), (65, 126), (65, 127), (65, 128), (65, 129), (65, 130), (65, 131), (65, 132), (65, 133), (65, 134), (65, 135), (65, 136), (65, 137), (65, 138), (65, 139), (65, 140), (65, 141), (65, 142), (65, 143), (65, 144), (65, 145), (65, 146), (65, 147), (65, 151), (66, 112), (66, 114), (66, 115), (66, 116), (66, 117), (66, 118), (66, 119), (66, 120), (66, 121), (66, 122), (66, 123), (66, 124), (66, 125), (66, 126), (66, 127), (66, 128), (66, 129), (66, 130), (66, 131), (66, 132), (66, 133), (66, 134), (66, 135), (66, 136), (66, 137), (66, 138), (66, 139), (66, 140), (66, 141), (66, 142), (66, 143), (66, 148), (66, 150), (67, 111), (67, 113), (67, 114), (67, 115), (67, 116), (67, 117), (67, 118), (67, 119), (67, 120), (67, 121), (67, 122), (67, 123), (67, 124), (67, 125), (67, 126), (67, 127), (67, 128), (67, 129), (67, 130), (67, 131), (67, 132), (67, 133), (67, 134), (67, 135), (67, 136), (67, 137), (67, 138), (67, 139), (67, 140), (67, 144), (67, 145), (67, 146), (67, 147), (68, 110), (68, 112), (68, 113), (68, 114), (68, 115), (68, 116), (68, 117), (68, 118), (68, 119), (68, 120), (68, 121), (68, 122), (68, 123), (68, 124), (68, 125), (68, 126), (68, 127), (68, 128), (68, 129), (68, 130), (68, 131), (68, 132), (68, 133), (68, 134), (68, 135), (68, 136), (68, 137), (68, 138), (68, 141), (68, 142), (68, 143), (69, 110), (69, 112), (69, 113), (69, 114), (69, 115), (69, 116), (69, 117), (69, 118), (69, 119), (69, 120), (69, 121), (69, 122), (69, 123), (69, 124), (69, 125), (69, 126), (69, 127), (69, 128), (69, 129), (69, 130), (69, 131), (69, 132), (69, 133), (69, 134), (69, 135), (69, 136), (69, 139), (69, 140), (70, 109), (70, 111), (70, 112), (70, 113), (70, 114), (70, 115), (70, 116), (70, 117), (70, 118), (70, 119), (70, 120), (70, 121), (70, 122), (70, 123), (70, 124), (70, 125), (70, 126), (70, 127), (70, 128), (70, 129), (70, 130), (70, 131), (70, 132), (70, 133), (70, 134), (70, 137), (70, 138), (71, 108), (71, 110), (71, 111), (71, 112), (71, 113), (71, 114), (71, 115), (71, 116), (71, 117), (71, 118), (71, 119), (71, 120), (71, 121), (71, 122), (71, 123), (71, 124), (71, 125), (71, 126), (71, 127), (71, 128), (71, 129), (71, 130), (71, 131), (71, 132), (71, 135), (71, 136), (72, 107), (72, 109), (72, 110), (72, 111), (72, 112), (72, 113), (72, 114), (72, 115), (72, 116), (72, 117), (72, 118), (72, 119), (72, 120), (72, 121), (72, 122), (72, 123), (72, 124), (72, 125), (72, 126), (72, 127), (72, 128), (72, 129), (72, 130), (72, 133), (72, 134), (73, 107), (73, 109), (73, 110), (73, 111), (73, 112), (73, 113), (73, 114), (73, 115), (73, 116), (73, 117), (73, 118), (73, 119), (73, 120), (73, 121), (73, 122), (73, 123), (73, 124), (73, 125), (73, 126), (73, 127), (73, 128), (73, 129), (73, 132), (74, 106), (74, 108), (74, 109), (74, 110), (74, 111), (74, 112), (74, 113), (74, 114), (74, 115), (74, 116), (74, 117), (74, 118), (74, 119), (74, 120), (74, 121), (74, 122), (74, 123), (74, 124), (74, 125), (74, 126), (74, 127), (74, 130), (75, 106), (75, 108), (75, 109), (75, 110), (75, 111), (75, 112), (75, 113), (75, 114), (75, 115), (75, 116), (75, 117), (75, 118), (75, 119), (75, 120), (75, 121), (75, 122), (75, 123), (75, 124), (75, 125), (75, 126), (75, 129), (76, 105), (76, 107), (76, 108), (76, 109), (76, 110), (76, 111), (76, 112), (76, 113), (76, 114), (76, 115), (76, 116), (76, 117), (76, 118), (76, 119), (76, 120), (76, 121), (76, 122), (76, 123), (76, 124), (76, 127), (77, 105), (77, 107), (77, 108), (77, 109), (77, 110), (77, 111), (77, 112), (77, 113), (77, 114), (77, 115), (77, 116), (77, 117), (77, 118), (77, 119), (77, 120), (77, 121), (77, 122), (77, 123), (77, 126), (78, 104), (78, 106), (78, 107), (78, 108), (78, 109), (78, 110), (78, 111), (78, 112), (78, 113), (78, 114), (78, 115), (78, 116), (78, 117), (78, 118), (78, 119), (78, 120), (78, 121), (78, 124), (79, 103), (79, 105), (79, 106), (79, 107), (79, 108), (79, 109), (79, 110), (79, 111), (79, 112), (79, 113), (79, 114), (79, 115), (79, 116), (79, 117), (79, 118), (79, 119), (79, 120), (79, 123), (80, 102), (80, 104), (80, 105), (80, 106), (80, 107), (80, 108), (80, 109), (80, 110), (80, 111), (80, 112), (80, 113), (80, 114), (80, 115), (80, 116), (80, 117), (80, 118), (80, 119), (80, 122), (81, 101), (81, 103), (81, 104), (81, 105), (81, 106), (81, 107), (81, 108), (81, 109), (81, 110), (81, 111), (81, 112), (81, 113), (81, 114), (81, 115), (81, 116), (81, 117), (81, 118), (81, 120), (82, 100), (82, 102), (82, 103), (82, 104), (82, 105), (82, 106), (82, 107), (82, 108), (82, 109), (82, 110), (82, 111), (82, 112), (82, 113), (82, 114), (82, 115), (82, 116), (82, 117), (82, 119), (83, 99), (83, 101), (83, 102), (83, 103), (83, 104), (83, 105), (83, 106), (83, 107), (83, 108), (83, 109), (83, 110), (83, 111), (83, 112), (83, 113), (83, 114), (83, 115), (83, 116), (83, 118), (84, 98), (84, 100), (84, 101), (84, 102), (84, 103), (84, 104), (84, 105), (84, 106), (84, 107), (84, 108), (84, 109), (84, 110), (84, 111), (84, 112), (84, 113), (84, 114), (84, 115), (84, 117), (85, 97), (85, 99), (85, 100), (85, 101), (85, 102), (85, 103), (85, 104), (85, 105), (85, 106), (85, 107), (85, 108), (85, 109), (85, 110), (85, 111), (85, 112), (85, 113), (85, 114), (85, 116), (86, 96), (86, 98), (86, 99), (86, 100), (86, 101), (86, 102), (86, 103), (86, 104), (86, 105), (86, 106), (86, 107), (86, 108), (86, 109), (86, 110), (86, 111), (86, 112), (86, 113), (86, 115), (87, 95), (87, 97), (87, 98), (87, 99), (87, 100), (87, 101), (87, 102), (87, 103), (87, 104), (87, 105), (87, 106), (87, 107), (87, 108), (87, 109), (87, 110), (87, 111), (87, 112), (87, 114), (88, 94), (88, 96), (88, 97), (88, 98), (88, 99), (88, 100), (88, 101), (88, 102), (88, 103), (88, 104), (88, 105), (88, 106), (88, 107), (88, 108), (88, 109), (88, 110), (88, 111), (88, 113), (89, 93), (89, 95), (89, 96), (89, 97), (89, 98), (89, 99), (89, 100), (89, 101), (89, 102), (89, 103), (89, 104), (89, 105), (89, 106), (89, 107), (89, 108), (89, 109), (89, 110), (89, 112), (90, 92), (90, 94), (90, 95), (90, 96), (90, 97), (90, 98), (90, 99), (90, 100), (90, 101), (90, 102), (90, 103), (90, 104), (90, 105), (90, 106), (90, 107), (90, 108), (90, 109), (90, 111), (91, 92), (91, 94), (91, 95), (91, 96), (91, 97), (91, 98), (91, 99), (91, 100), (91, 101), (91, 102), (91, 103), (91, 104), (91, 105), (91, 106), (91, 107), (91, 108), (91, 109), (91, 111), (92, 91), (92, 93), (92, 94), (92, 95), (92, 96), (92, 97), (92, 98), (92, 99), (92, 100), (92, 101), (92, 102), (92, 103), (92, 104), (92, 105), (92, 106), (92, 107), (92, 108), (92, 110), (93, 90), (93, 92), (93, 93), (93, 94), (93, 95), (93, 96), (93, 97), (93, 98), (93, 99), (93, 100), (93, 101), (93, 102), (93, 103), (93, 104), (93, 105), (93, 106), (93, 107), (93, 109), (94, 90), (94, 92), (94, 93), (94, 94), (94, 95), (94, 96), (94, 97), (94, 98), (94, 99), (94, 100), (94, 101), (94, 102), (94, 103), (94, 104), (94, 105), (94, 106), (94, 107), (94, 109), (95, 90), (95, 94), (95, 95), (95, 96), (95, 97), (95, 98), (95, 99), (95, 100), (95, 101), (95, 102), (95, 103), (95, 104), (95, 105), (95, 106), (95, 108), (96, 90), (96, 92), (96, 93), (96, 97), (96, 98), (96, 99), (96, 100), (96, 101), (96, 102), (96, 103), (96, 104), (96, 105), (96, 106), (96, 108), (97, 95), (97, 96), (97, 100), (97, 101), (97, 102), (97, 103), (97, 104), (97, 105), (97, 107), (98, 97), (98, 103), (98, 104), (98, 105), (98, 107), (99, 100), (99, 101), (99, 102), (99, 107), (100, 103), (100, 104), (100, 105), (100, 107), (299, 103), (299, 104), (299, 105), (299, 107), (300, 100), (300, 101), (300, 107), (301, 97), (301, 98), (301, 102), (301, 103), (301, 104), (301, 105), (301, 107), (302, 94), (302, 95), (302, 96), (302, 99), (302, 100), (302, 101), (302, 102), (302, 103), (302, 104), (302, 105), (302, 107), (303, 90), (303, 92), (303, 93), (303, 97), (303, 98), (303, 99), (303, 100), (303, 101), (303, 102), (303, 103), (303, 104), (303, 105), (303, 106), (303, 108), (304, 90), (304, 94), (304, 95), (304, 96), (304, 97), (304, 98), (304, 99), (304, 100), (304, 101), (304, 102), (304, 103), (304, 104), (304, 105), (304, 106), (304, 108), (305, 90), (305, 92), (305, 93), (305, 94), (305, 95), (305, 96), (305, 97), (305, 98), (305, 99), (305, 100), (305, 101), (305, 102), (305, 103), (305, 104), (305, 105), (305, 106), (305, 107), (305, 109), (306, 91), (306, 92), (306, 93), (306, 94), (306, 95), (306, 96), (306, 97), (306, 98), (306, 99), (306, 100), (306, 101), (306, 102), (306, 103), (306, 104), (306, 105), (306, 106), (306, 107), (306, 109), (307, 91), (307, 93), (307, 94), (307, 95), (307, 96), (307, 97), (307, 98), (307, 99), (307, 100), (307, 101), (307, 102), (307, 103), (307, 104), (307, 105), (307, 106), (307, 107), (307, 108), (307, 110), (308, 92), (308, 94), (308, 95), (308, 96), (308, 97), (308, 98), (308, 99), (308, 100), (308, 101), (308, 102), (308, 103), (308, 104), (308, 105), (308, 106), (308, 107), (308, 108), (308, 109), (308, 111), (309, 92), (309, 94), (309, 95), (309, 96), (309, 97), (309, 98), (309, 99), (309, 100), (309, 101), (309, 102), (309, 103), (309, 104), (309, 105), (309, 106), (309, 107), (309, 108), (309, 109), (310, 93), (310, 95), (310, 96), (310, 97), (310, 98), (310, 99), (310, 100), (310, 101), (310, 102), (310, 103), (310, 104), (310, 105), (310, 106), (310, 107), (310, 108), (310, 109), (310, 110), (310, 112), (311, 94), (311, 96), (311, 97), (311, 98), (311, 99), (311, 100), (311, 101), (311, 102), (311, 103), (311, 104), (311, 105), (311, 106), (311, 107), (311, 108), (311, 109), (311, 110), (311, 111), (311, 113), (312, 95), (312, 97), (312, 98), (312, 99), (312, 100), (312, 101), (312, 102), (312, 103), (312, 104), (312, 105), (312, 106), (312, 107), (312, 108), (312, 109), (312, 110), (312, 111), (312, 112), (312, 114), (313, 96), (313, 98), (313, 99), (313, 100), (313, 101), (313, 102), (313, 103), (313, 104), (313, 105), (313, 106), (313, 107), (313, 108), (313, 109), (313, 110), (313, 111), (313, 112), (313, 113), (313, 115), (314, 97), (314, 99), (314, 100), (314, 101), (314, 102), (314, 103), (314, 104), (314, 105), (314, 106), (314, 107), (314, 108), (314, 109), (314, 110), (314, 111), (314, 112), (314, 113), (314, 114), (314, 116), (315, 98), (315, 100), (315, 101), (315, 102), (315, 103), (315, 104), (315, 105), (315, 106), (315, 107), (315, 108), (315, 109), (315, 110), (315, 111), (315, 112), (315, 113), (315, 114), (315, 115), (315, 117), (316, 99), (316, 101), (316, 102), (316, 103), (316, 104), (316, 105), (316, 106), (316, 107), (316, 108), (316, 109), (316, 110), (316, 111), (316, 112), (316, 113), (316, 114), (316, 115), (316, 116), (316, 118), (317, 100), (317, 102), (317, 103), (317, 104), (317, 105), (317, 106), (317, 107), (317, 108), (317, 109), (317, 110), (317, 111), (317, 112), (317, 113), (317, 114), (317, 115), (317, 116), (317, 117), (317, 119), (318, 101), (318, 103), (318, 104), (318, 105), (318, 106), (318, 107), (318, 108), (318, 109), (318, 110), (318, 111), (318, 112), (318, 113), (318, 114), (318, 115), (318, 116), (318, 117), (318, 118), (318, 120), (319, 102), (319, 104), (319, 105), (319, 106), (319, 107), (319, 108), (319, 109), (319, 110), (319, 111), (319, 112), (319, 113), (319, 114), (319, 115), (319, 116), (319, 117), (319, 118), (319, 119), (319, 122), (320, 103), (320, 105), (320, 106), (320, 107), (320, 108), (320, 109), (320, 110), (320, 111), (320, 112), (320, 113), (320, 114), (320, 115), (320, 116), (320, 117), (320, 118), (320, 119), (320, 120), (320, 123), (321, 104), (321, 106), (321, 107), (321, 108), (321, 109), (321, 110), (321, 111), (321, 112), (321, 113), (321, 114), (321, 115), (321, 116), (321, 117), (321, 118), (321, 119), (321, 120), (321, 121), (321, 122), (321, 124), (322, 105), (322, 107), (322, 108), (322, 109), (322, 110), (322, 111), (322, 112), (322, 113), (322, 114), (322, 115), (322, 116), (322, 117), (322, 118), (322, 119), (322, 120), (322, 121), (322, 122), (322, 123), (322, 126), (323, 105), (323, 107), (323, 108), (323, 109), (323, 110), (323, 111), (323, 112), (323, 113), (323, 114), (323, 115), (323, 116), (323, 117), (323, 118), (323, 119), (323, 120), (323, 121), (323, 122), (323, 123), (323, 124), (323, 127), (324, 106), (324, 108), (324, 109), (324, 110), (324, 111), (324, 112), (324, 113), (324, 114), (324, 115), (324, 116), (324, 117), (324, 118), (324, 119), (324, 120), (324, 121), (324, 122), (324, 123), (324, 124), (324, 125), (324, 126), (324, 129), (325, 106), (325, 108), (325, 109), (325, 110), (325, 111), (325, 112), (325, 113), (325, 114), (325, 115), (325, 116), (325, 117), (325, 118), (325, 119), (325, 120), (325, 121), (325, 122), (325, 123), (325, 124), (325, 125), (325, 126), (325, 127), (325, 130), (326, 107), (326, 109), (326, 110), (326, 111), (326, 112), (326, 113), (326, 114), (326, 115), (326, 116), (326, 117), (326, 118), (326, 119), (326, 120), (326, 121), (326, 122), (326, 123), (326, 124), (326, 125), (326, 126), (326, 127), (326, 128), (326, 129), (326, 132), (327, 109), (327, 110), (327, 111), (327, 112), (327, 113), (327, 114), (327, 115), (327, 116), (327, 117), (327, 118), (327, 119), (327, 120), (327, 121), (327, 122), (327, 123), (327, 124), (327, 125), (327, 126), (327, 127), (327, 128), (327, 129), (327, 130), (327, 134), (328, 108), (328, 110), (328, 111), (328, 112), (328, 113), (328, 114), (328, 115), (328, 116), (328, 117), (328, 118), (328, 119), (328, 120), (328, 121), (328, 122), (328, 123), (328, 124), (328, 125), (328, 126), (328, 127), (328, 128), (328, 129), (328, 130), (328, 131), (328, 132), (328, 135), (328, 136), (329, 109), (329, 111), (329, 112), (329, 113), (329, 114), (329, 115), (329, 116), (329, 117), (329, 118), (329, 119), (329, 120), (329, 121), (329, 122), (329, 123), (329, 124), (329, 125), (329, 126), (329, 127), (329, 128), (329, 129), (329, 130), (329, 131), (329, 132), (329, 133), (329, 134), (329, 137), (329, 138), (330, 110), (330, 112), (330, 113), (330, 114), (330, 115), (330, 116), (330, 117), (330, 118), (330, 119), (330, 120), (330, 121), (330, 122), (330, 123), (330, 124), (330, 125), (330, 126), (330, 127), (330, 128), (330, 129), (330, 130), (330, 131), (330, 132), (330, 133), (330, 134), (330, 135), (330, 136), (330, 139), (330, 140), (331, 110), (331, 112), (331, 113), (331, 114), (331, 115), (331, 116), (331, 117), (331, 118), (331, 119), (331, 120), (331, 121), (331, 122), (331, 123), (331, 124), (331, 125), (331, 126), (331, 127), (331, 128), (331, 129), (331, 130), (331, 131), (331, 132), (331, 133), (331, 134), (331, 135), (331, 136), (331, 137), (331, 138), (331, 141), (331, 142), (331, 143), (332, 111), (332, 113), (332, 114), (332, 115), (332, 116), (332, 117), (332, 118), (332, 119), (332, 120), (332, 121), (332, 122), (332, 123), (332, 124), (332, 125), (332, 126), (332, 127), (332, 128), (332, 129), (332, 130), (332, 131), (332, 132), (332, 133), (332, 134), (332, 135), (332, 136), (332, 137), (332, 138), (332, 139), (332, 140), (332, 144), (332, 145), (332, 146), (332, 147), (332, 149), (333, 112), (333, 114), (333, 115), (333, 116), (333, 117), (333, 118), (333, 119), (333, 120), (333, 121), (333, 122), (333, 123), (333, 124), (333, 125), (333, 126), (333, 127), (333, 128), (333, 129), (333, 130), (333, 131), (333, 132), (333, 133), (333, 134), (333, 135), (333, 136), (333, 137), (333, 138), (333, 139), (333, 140), (333, 141), (333, 142), (333, 143), (333, 150), (334, 113), (334, 115), (334, 116), (334, 117), (334, 118), (334, 119), (334, 120), (334, 121), (334, 122), (334, 123), (334, 124), (334, 125), (334, 126), (334, 127), (334, 128), (334, 129), (334, 130), (334, 131), (334, 132), (334, 133), (334, 134), (334, 135), (334, 136), (334, 137), (334, 138), (334, 139), (334, 140), (334, 141), (334, 142), (334, 143), (334, 144), (334, 145), (334, 146), (334, 147), (334, 148), (334, 151), (335, 114), (335, 116), (335, 117), (335, 118), (335, 119), (335, 120), (335, 121), (335, 122), (335, 123), (335, 124), (335, 125), (335, 126), (335, 127), (335, 128), (335, 129), (335, 130), (335, 131), (335, 132), (335, 133), (335, 134), (335, 135), (335, 136), (335, 137), (335, 138), (335, 139), (335, 140), (335, 141), (335, 142), (335, 143), (335, 144), (335, 145), (335, 146), (335, 147), (335, 148), (335, 149), (335, 150), (335, 152), (336, 115), (336, 117), (336, 118), (336, 119), (336, 120), (336, 121), (336, 122), (336, 123), (336, 124), (336, 125), (336, 126), (336, 127), (336, 128), (336, 129), (336, 130), (336, 131), (336, 132), (336, 133), (336, 134), (336, 135), (336, 136), (336, 137), (336, 138), (336, 139), (336, 140), (336, 141), (336, 142), (336, 143), (336, 144), (336, 145), (336, 146), (336, 147), (336, 148), (336, 149), (336, 150), (336, 151), (336, 153), (337, 116), (337, 118), (337, 119), (337, 120), (337, 121), (337, 122), (337, 123), (337, 124), (337, 125), (337, 126), (337, 127), (337, 128), (337, 129), (337, 130), (337, 131), (337, 132), (337, 133), (337, 134), (337, 135), (337, 136), (337, 137), (337, 138), (337, 139), (337, 140), (337, 141), (337, 142), (337, 143), (337, 144), (337, 145), (337, 146), (337, 147), (337, 148), (337, 149), (337, 150), (337, 151), (337, 152), (337, 154), (338, 117), (338, 119), (338, 120), (338, 121), (338, 122), (338, 123), (338, 124), (338, 125), (338, 126), (338, 127), (338, 128), (338, 129), (338, 130), (338, 131), (338, 132), (338, 133), (338, 134), (338, 135), (338, 136), (338, 137), (338, 138), (338, 139), (338, 140), (338, 141), (338, 142), (338, 143), (338, 144), (338, 145), (338, 146), (338, 147), (338, 148), (338, 149), (338, 150), (338, 151), (338, 152), (338, 153), (339, 118), (339, 121), (339, 122), (339, 123), (339, 124), (339, 125), (339, 126), (339, 127), (339, 128), (339, 129), (339, 130), (339, 131), (339, 132), (339, 133), (339, 134), (339, 135), (339, 136), (339, 137), (339, 138), (339, 139), (339, 140), (339, 141), (339, 142), (339, 143), (339, 144), (339, 145), (339, 146), (339, 147), (339, 148), (339, 149), (339, 150), (339, 151), (339, 152), (339, 153), (339, 154), (339, 157), (340, 119), (340, 122), (340, 123), (340, 124), (340, 125), (340, 126), (340, 127), (340, 128), (340, 129), (340, 130), (340, 131), (340, 132), (340, 133), (340, 134), (340, 135), (340, 136), (340, 137), (340, 138), (340, 139), (340, 140), (340, 141), (340, 142), (340, 143), (340, 144), (340, 145), (340, 146), (340, 147), (340, 148), (340, 149), (340, 150), (340, 151), (340, 152), (340, 153), (340, 154), (340, 155), (340, 156), (340, 159), (341, 123), (341, 124), (341, 125), (341, 126), (341, 127), (341, 128), (341, 129), (341, 130), (341, 131), (341, 132), (341, 133), (341, 134), (341, 135), (341, 136), (341, 137), (341, 138), (341, 139), (341, 140), (341, 141), (341, 142), (341, 143), (341, 144), (341, 145), (341, 146), (341, 147), (341, 148), (341, 149), (341, 150), (341, 151), (341, 152), (341, 153), (341, 154), (341, 155), (341, 156), (341, 157), (341, 158), (341, 161), (341, 162), (342, 122), (342, 124), (342, 125), (342, 126), (342, 127), (342, 128), (342, 129), (342, 130), (342, 131), (342, 132), (342, 133), (342, 134), (342, 135), (342, 136), (342, 137), (342, 138), (342, 139), (342, 140), (342, 141), (342, 142), (342, 143), (342, 144), (342, 145), (342, 146), (342, 147), (342, 148), (342, 149), (342, 150), (342, 151), (342, 152), (342, 153), (342, 154), (342, 155), (342, 156), (342, 157), (342, 158), (342, 159), (342, 160), (342, 164), (343, 123), (343, 126), (343, 127), (343, 128), (343, 129), (343, 130), (343, 131), (343, 132), (343, 133), (343, 134), (343, 135), (343, 136), (343, 137), (343, 138), (343, 139), (343, 140), (343, 141), (343, 142), (343, 143), (343, 144), (343, 145), (343, 146), (343, 147), (343, 148), (343, 149), (343, 150), (343, 151), (343, 152), (343, 153), (343, 154), (343, 155), (343, 156), (343, 157), (343, 158), (343, 159), (343, 160), (343, 161), (343, 162), (343, 166), (344, 124), (344, 127), (344, 128), (344, 129), (344, 130), (344, 131), (344, 132), (344, 133), (344, 134), (344, 135), (344, 136), (344, 137), (344, 138), (344, 139), (344, 140), (344, 141), (344, 142), (344, 143), (344, 144), (344, 145), (344, 146), (344, 147), (344, 148), (344, 149), (344, 150), (344, 151), (344, 152), (344, 153), (344, 154), (344, 155), (344, 156), (344, 157), (344, 158), (344, 159), (344, 160), (344, 161), (344, 162), (344, 163), (344, 164), (344, 168), (345, 126), (345, 129), (345, 130), (345, 131), (345, 132), (345, 133), (345, 134), (345, 135), (345, 136), (345, 137), (345, 138), (345, 139), (345, 140), (345, 141), (345, 142), (345, 143), (345, 144), (345, 145), (345, 146), (345, 147), (345, 148), (345, 149), (345, 150), (345, 151), (345, 152), (345, 153), (345, 154), (345, 155), (345, 156), (345, 157), (345, 158), (345, 159), (345, 160), (345, 161), (345, 162), (345, 163), (345, 164), (345, 165), (345, 166), (345, 170), (346, 127), (346, 130), (346, 131), (346, 132), (346, 133), (346, 134), (346, 135), (346, 136), (346, 137), (346, 138), (346, 139), (346, 140), (346, 141), (346, 142), (346, 143), (346, 144), (346, 145), (346, 146), (346, 147), (346, 148), (346, 149), (346, 150), (346, 151), (346, 152), (346, 153), (346, 154), (346, 155), (346, 156), (346, 157), (346, 158), (346, 159), (346, 160), (346, 161), (346, 162), (346, 163), (346, 164), (346, 165), (346, 166), (346, 167), (346, 168), (346, 172), (347, 129), (347, 132), (347, 133), (347, 134), (347, 135), (347, 136), (347, 137), (347, 138), (347, 139), (347, 140), (347, 141), (347, 142), (347, 143), (347, 144), (347, 145), (347, 146), (347, 147), (347, 148), (347, 149), (347, 150), (347, 151), (347, 152), (347, 153), (347, 154), (347, 155), (347, 156), (347, 157), (347, 158), (347, 159), (347, 160), (347, 161), (347, 162), (347, 163), (347, 164), (347, 165), (347, 166), (347, 167), (347, 168), (347, 169), (347, 170), (347, 174), (348, 130), (348, 134), (348, 135), (348, 136), (348, 137), (348, 138), (348, 139), (348, 140), (348, 141), (348, 142), (348, 143), (348, 144), (348, 145), (348, 146), (348, 147), (348, 148), (348, 149), (348, 150), (348, 151), (348, 152), (348, 153), (348, 154), (348, 155), (348, 156), (348, 157), (348, 158), (348, 159), (348, 160), (348, 161), (348, 162), (348, 163), (348, 164), (348, 165), (348, 166), (348, 167), (348, 168), (348, 169), (348, 170), (348, 171), (348, 172), (348, 176), (349, 132), (349, 135), (349, 136), (349, 137), (349, 138), (349, 139), (349, 140), (349, 141), (349, 142), (349, 143), (349, 144), (349, 145), (349, 146), (349, 147), (349, 148), (349, 149), (349, 150), (349, 151), (349, 152), (349, 153), (349, 154), (349, 155), (349, 156), (349, 157), (349, 158), (349, 159), (349, 160), (349, 161), (349, 162), (349, 163), (349, 164), (349, 165), (349, 166), (349, 167), (349, 168), (349, 169), (349, 170), (349, 171), (349, 172), (349, 173), (349, 174), (349, 175), (349, 178), (350, 134), (350, 137), (350, 138), (350, 139), (350, 140), (350, 141), (350, 142), (350, 143), (350, 144), (350, 145), (350, 146), (350, 147), (350, 148), (350, 149), (350, 150), (350, 151), (350, 152), (350, 153), (350, 154), (350, 155), (350, 156), (350, 157), (350, 158), (350, 159), (350, 160), (350, 161), (350, 162), (350, 163), (350, 164), (350, 165), (350, 166), (350, 167), (350, 168), (350, 169), (350, 170), (350, 171), (350, 172), (350, 173), (350, 174), (350, 175), (350, 176), (350, 179), (351, 135), (351, 139), (351, 140), (351, 141), (351, 142), (351, 143), (351, 144), (351, 145), (351, 146), (351, 147), (351, 148), (351, 149), (351, 150), (351, 151), (351, 152), (351, 153), (351, 154), (351, 155), (351, 156), (351, 157), (351, 158), (351, 159), (351, 160), (351, 161), (351, 162), (351, 163), (351, 164), (351, 165), (351, 166), (351, 167), (351, 168), (351, 169), (351, 170), (351, 171), (351, 172), (351, 173), (351, 174), (351, 175), (351, 176), (351, 177), (351, 178), (351, 181), (352, 137), (352, 142), (352, 143), (352, 144), (352, 145), (352, 146), (352, 147), (352, 148), (352, 149), (352, 150), (352, 151), (352, 152), (352, 153), (352, 154), (352, 155), (352, 156), (352, 157), (352, 158), (352, 159), (352, 160), (352, 161), (352, 162), (352, 163), (352, 164), (352, 165), (352, 166), (352, 167), (352, 168), (352, 169), (352, 170), (352, 171), (352, 172), (352, 173), (352, 174), (352, 175), (352, 176), (352, 177), (352, 178), (352, 179), (352, 182), (353, 139), (353, 141), (353, 147), (353, 148), (353, 149), (353, 150), (353, 151), (353, 152), (353, 153), (353, 154), (353, 155), (353, 156), (353, 157), (353, 158), (353, 159), (353, 160), (353, 161), (353, 162), (353, 163), (353, 164), (353, 165), (353, 166), (353, 167), (353, 168), (353, 169), (353, 170), (353, 171), (353, 172), (353, 173), (353, 174), (353, 175), (353, 176), (353, 177), (353, 178), (353, 179), (353, 180), (353, 181), (353, 184), (354, 142), (354, 143), (354, 144), (354, 145), (354, 146), (354, 154), (354, 155), (354, 156), (354, 157), (354, 158), (354, 159), (354, 160), (354, 161), (354, 162), (354, 163), (354, 164), (354, 165), (354, 166), (354, 167), (354, 168), (354, 169), (354, 170), (354, 171), (354, 172), (354, 173), (354, 174), (354, 175), (354, 176), (354, 177), (354, 178), (354, 179), (354, 180), (354, 181), (354, 182), (354, 185), (354, 186), (355, 147), (355, 148), (355, 149), (355, 150), (355, 151), (355, 152), (355, 153), (355, 158), (355, 159), (355, 160), (355, 161), (355, 162), (355, 163), (355, 164), (355, 165), (355, 166), (355, 167), (355, 168), (355, 169), (355, 170), (355, 171), (355, 172), (355, 173), (355, 174), (355, 175), (355, 176), (355, 177), (355, 178), (355, 179), (355, 180), (355, 181), (355, 182), (355, 183), (355, 184), (355, 187), (356, 154), (356, 155), (356, 156), (356, 157), (356, 160), (356, 161), (356, 162), (356, 163), (356, 164), (356, 165), (356, 166), (356, 167), (356, 168), (356, 169), (356, 170), (356, 171), (356, 172), (356, 173), (356, 174), (356, 175), (356, 176), (356, 177), (356, 178), (356, 179), (356, 180), (356, 181), (356, 186), (357, 158), (357, 159), (357, 162), (357, 163), (357, 164), (357, 165), (357, 166), (357, 167), (357, 168), (357, 169), (357, 170), (357, 171), (357, 172), (357, 173), (357, 174), (357, 175), (357, 176), (357, 177), (357, 178), (357, 179), (357, 182), (357, 183), (357, 184), (358, 160), (358, 165), (358, 166), (358, 167), (358, 168), (358, 169), (358, 170), (358, 171), (358, 172), (358, 173), (358, 174), (358, 175), (358, 176), (358, 177), (358, 178), (358, 181), (359, 162), (359, 167), (359, 168), (359, 169), (359, 170), (359, 171), (359, 172), (359, 173), (359, 174), (359, 175), (359, 176), (359, 177), (359, 178), (359, 179), (360, 165), (360, 166), (360, 171), (360, 172), (360, 173), (360, 174), (360, 175), (360, 176), (360, 177), (360, 179), (361, 168), (361, 169), (361, 170), (361, 178), (362, 171), (362, 172), (362, 173), (362, 174), (362, 175), (362, 176), (362, 178), ) coordinates_7F0027 = ((53, 219), (54, 218), (54, 220), (55, 218), (55, 221), (56, 218), (56, 220), (56, 222), (57, 217), (57, 219), (57, 220), (57, 221), (57, 223), (58, 217), (58, 219), (58, 220), (58, 221), (58, 222), (58, 224), (59, 216), (59, 218), (59, 219), (59, 220), (59, 221), (59, 222), (59, 223), (60, 216), (60, 218), (60, 219), (60, 220), (60, 221), (60, 222), (60, 223), (60, 224), (61, 216), (61, 218), (61, 219), (61, 220), (61, 221), (61, 222), (61, 223), (61, 224), (61, 225), (61, 228), (62, 215), (62, 217), (62, 218), (62, 219), (62, 220), (62, 221), (62, 222), (62, 223), (62, 224), (62, 225), (62, 226), (62, 229), (63, 215), (63, 217), (63, 218), (63, 219), (63, 220), (63, 221), (63, 222), (63, 223), (63, 224), (63, 225), (63, 226), (63, 227), (63, 230), (64, 215), (64, 217), (64, 218), (64, 219), (64, 220), (64, 221), (64, 222), (64, 223), (64, 224), (64, 225), (64, 226), (64, 227), (64, 228), (64, 231), (65, 215), (65, 217), (65, 218), (65, 219), (65, 220), (65, 221), (65, 222), (65, 223), (65, 224), (65, 225), (65, 226), (65, 227), (65, 228), (65, 229), (65, 232), (66, 215), (66, 217), (66, 218), (66, 219), (66, 220), (66, 221), (66, 222), (66, 223), (66, 224), (66, 225), (66, 226), (66, 227), (66, 228), (66, 229), (66, 230), (66, 231), (66, 233), (67, 215), (67, 217), (67, 218), (67, 219), (67, 220), (67, 221), (67, 222), (67, 223), (67, 224), (67, 225), (67, 226), (67, 227), (67, 228), (67, 229), (67, 230), (67, 231), (67, 232), (67, 234), (68, 215), (68, 217), (68, 218), (68, 219), (68, 220), (68, 221), (68, 222), (68, 223), (68, 224), (68, 225), (68, 226), (68, 227), (68, 228), (68, 229), (68, 230), (68, 231), (68, 232), (68, 233), (68, 235), (69, 217), (69, 218), (69, 219), (69, 220), (69, 221), (69, 222), (69, 223), (69, 224), (69, 225), (69, 226), (69, 227), (69, 228), (69, 229), (69, 230), (69, 231), (69, 232), (69, 233), (69, 234), (69, 236), (70, 216), (70, 218), (70, 219), (70, 220), (70, 221), (70, 222), (70, 223), (70, 224), (70, 225), (70, 226), (70, 227), (70, 228), (70, 229), (70, 230), (70, 231), (70, 232), (70, 233), (70, 234), (70, 235), (70, 237), (71, 217), (71, 219), (71, 220), (71, 221), (71, 222), (71, 223), (71, 224), (71, 225), (71, 226), (71, 227), (71, 228), (71, 229), (71, 230), (71, 231), (71, 232), (71, 233), (71, 234), (71, 235), (71, 237), (72, 218), (72, 221), (72, 222), (72, 223), (72, 224), (72, 225), (72, 226), (72, 227), (72, 228), (72, 229), (72, 230), (72, 231), (72, 232), (72, 233), (72, 234), (72, 235), (72, 237), (73, 219), (73, 222), (73, 223), (73, 224), (73, 225), (73, 226), (73, 227), (73, 228), (73, 229), (73, 230), (73, 231), (73, 232), (73, 233), (73, 234), (73, 235), (73, 236), (73, 237), (73, 238), (74, 221), (74, 224), (74, 225), (74, 226), (74, 227), (74, 228), (74, 229), (74, 230), (74, 231), (74, 232), (74, 233), (74, 234), (74, 235), (74, 236), (74, 238), (75, 222), (75, 225), (75, 226), (75, 227), (75, 228), (75, 229), (75, 230), (75, 231), (75, 232), (75, 233), (75, 234), (75, 235), (75, 236), (75, 237), (76, 224), (76, 226), (76, 227), (76, 228), (76, 229), (76, 230), (76, 231), (76, 232), (76, 233), (76, 234), (76, 235), (76, 236), (76, 239), (77, 224), (77, 226), (77, 227), (77, 228), (77, 229), (77, 230), (77, 231), (77, 232), (77, 233), (77, 234), (77, 235), (77, 237), (78, 225), (78, 227), (78, 228), (78, 229), (78, 230), (78, 231), (78, 232), (78, 233), (78, 234), (78, 236), (79, 225), (79, 227), (79, 228), (79, 229), (79, 230), (79, 231), (79, 232), (79, 233), (79, 235), (80, 226), (80, 228), (80, 229), (80, 230), (80, 231), (80, 232), (80, 233), (80, 235), (81, 226), (81, 228), (81, 229), (81, 230), (81, 231), (81, 232), (81, 234), (82, 226), (82, 228), (82, 229), (82, 230), (82, 231), (82, 233), (83, 227), (83, 232), (84, 227), (84, 229), (84, 231), (315, 227), (315, 229), (315, 231), (316, 227), (316, 232), (317, 226), (317, 228), (317, 229), (317, 230), (317, 231), (317, 233), (318, 226), (318, 228), (318, 229), (318, 230), (318, 231), (318, 232), (318, 234), (319, 226), (319, 228), (319, 229), (319, 230), (319, 231), (319, 232), (319, 233), (319, 235), (320, 225), (320, 227), (320, 228), (320, 229), (320, 230), (320, 231), (320, 232), (320, 233), (320, 235), (321, 225), (321, 227), (321, 228), (321, 229), (321, 230), (321, 231), (321, 232), (321, 233), (321, 234), (321, 236), (322, 224), (322, 226), (322, 227), (322, 228), (322, 229), (322, 230), (322, 231), (322, 232), (322, 233), (322, 234), (322, 235), (322, 237), (323, 223), (323, 225), (323, 226), (323, 227), (323, 228), (323, 229), (323, 230), (323, 231), (323, 232), (323, 233), (323, 234), (323, 235), (323, 236), (323, 239), (324, 222), (324, 224), (324, 225), (324, 226), (324, 227), (324, 228), (324, 229), (324, 230), (324, 231), (324, 232), (324, 233), (324, 234), (324, 235), (324, 236), (324, 238), (325, 221), (325, 224), (325, 225), (325, 226), (325, 227), (325, 228), (325, 229), (325, 230), (325, 231), (325, 232), (325, 233), (325, 234), (325, 235), (325, 236), (325, 238), (326, 219), (326, 222), (326, 223), (326, 224), (326, 225), (326, 226), (326, 227), (326, 228), (326, 229), (326, 230), (326, 231), (326, 232), (326, 233), (326, 234), (326, 235), (326, 237), (327, 218), (327, 221), (327, 222), (327, 223), (327, 224), (327, 225), (327, 226), (327, 227), (327, 228), (327, 229), (327, 230), (327, 231), (327, 232), (327, 233), (327, 234), (327, 235), (327, 237), (328, 219), (328, 220), (328, 221), (328, 222), (328, 223), (328, 224), (328, 225), (328, 226), (328, 227), (328, 228), (328, 229), (328, 230), (328, 231), (328, 232), (328, 233), (328, 234), (328, 235), (328, 237), (329, 216), (329, 218), (329, 219), (329, 220), (329, 221), (329, 222), (329, 223), (329, 224), (329, 225), (329, 226), (329, 227), (329, 228), (329, 229), (329, 230), (329, 231), (329, 232), (329, 233), (329, 234), (329, 235), (329, 237), (330, 215), (330, 217), (330, 218), (330, 219), (330, 220), (330, 221), (330, 222), (330, 223), (330, 224), (330, 225), (330, 226), (330, 227), (330, 228), (330, 229), (330, 230), (330, 231), (330, 232), (330, 233), (330, 234), (330, 236), (331, 215), (331, 217), (331, 218), (331, 219), (331, 220), (331, 221), (331, 222), (331, 223), (331, 224), (331, 225), (331, 226), (331, 227), (331, 228), (331, 229), (331, 230), (331, 231), (331, 232), (331, 233), (331, 235), (332, 215), (332, 217), (332, 218), (332, 219), (332, 220), (332, 221), (332, 222), (332, 223), (332, 224), (332, 225), (332, 226), (332, 227), (332, 228), (332, 229), (332, 230), (332, 231), (332, 232), (332, 234), (333, 215), (333, 217), (333, 218), (333, 219), (333, 220), (333, 221), (333, 222), (333, 223), (333, 224), (333, 225), (333, 226), (333, 227), (333, 228), (333, 229), (333, 230), (333, 233), (334, 215), (334, 217), (334, 218), (334, 219), (334, 220), (334, 221), (334, 222), (334, 223), (334, 224), (334, 225), (334, 226), (334, 227), (334, 228), (334, 229), (334, 232), (335, 215), (335, 217), (335, 218), (335, 219), (335, 220), (335, 221), (335, 222), (335, 223), (335, 224), (335, 225), (335, 226), (335, 227), (335, 228), (335, 231), (336, 215), (336, 217), (336, 218), (336, 219), (336, 220), (336, 221), (336, 222), (336, 223), (336, 224), (336, 225), (336, 226), (336, 227), (336, 230), (337, 215), (337, 217), (337, 218), (337, 219), (337, 220), (337, 221), (337, 222), (337, 223), (337, 224), (337, 225), (337, 226), (337, 229), (338, 216), (338, 218), (338, 219), (338, 220), (338, 221), (338, 222), (338, 223), (338, 224), (338, 225), (339, 216), (339, 218), (339, 219), (339, 220), (339, 221), (339, 222), (339, 223), (339, 224), (339, 226), (340, 216), (340, 217), (340, 218), (340, 219), (340, 220), (340, 221), (340, 222), (340, 223), (340, 225), (341, 217), (341, 219), (341, 220), (341, 221), (341, 222), (341, 224), (342, 217), (342, 219), (342, 220), (342, 221), (342, 223), (343, 218), (343, 220), (343, 222), (344, 218), (344, 221), (345, 218), (345, 220), (346, 219), ) coordinates_FF004E = ((44, 223), (44, 224), (44, 225), (44, 226), (45, 221), (45, 227), (45, 228), (45, 230), (46, 220), (46, 223), (46, 224), (46, 225), (46, 226), (46, 231), (46, 233), (47, 219), (47, 221), (47, 222), (47, 223), (47, 224), (47, 225), (47, 226), (47, 227), (47, 228), (47, 229), (47, 230), (47, 234), (47, 235), (48, 219), (48, 221), (48, 222), (48, 223), (48, 224), (48, 225), (48, 226), (48, 227), (48, 228), (48, 229), (48, 230), (48, 231), (48, 232), (48, 233), (48, 237), (49, 219), (49, 221), (49, 222), (49, 223), (49, 224), (49, 225), (49, 226), (49, 227), (49, 228), (49, 229), (49, 230), (49, 231), (49, 232), (49, 233), (49, 234), (49, 235), (49, 240), (50, 219), (50, 221), (50, 222), (50, 223), (50, 224), (50, 225), (50, 226), (50, 227), (50, 228), (50, 229), (50, 230), (50, 231), (50, 232), (50, 233), (50, 234), (50, 235), (50, 236), (50, 237), (50, 238), (50, 240), (51, 220), (51, 222), (51, 223), (51, 224), (51, 225), (51, 226), (51, 227), (51, 228), (51, 229), (51, 230), (51, 231), (51, 232), (51, 233), (51, 234), (51, 235), (51, 236), (51, 237), (51, 238), (51, 240), (52, 221), (52, 223), (52, 224), (52, 225), (52, 226), (52, 227), (52, 228), (52, 229), (52, 230), (52, 231), (52, 232), (52, 233), (52, 234), (52, 235), (52, 236), (52, 237), (52, 238), (52, 240), (53, 222), (53, 224), (53, 225), (53, 226), (53, 227), (53, 228), (53, 229), (53, 230), (53, 231), (53, 232), (53, 233), (53, 234), (53, 235), (53, 236), (53, 237), (53, 238), (53, 240), (54, 223), (54, 225), (54, 226), (54, 227), (54, 228), (54, 229), (54, 230), (54, 231), (54, 232), (54, 233), (54, 234), (54, 235), (54, 236), (54, 237), (54, 238), (54, 239), (54, 240), (55, 224), (55, 226), (55, 227), (55, 228), (55, 229), (55, 230), (55, 231), (55, 232), (55, 233), (55, 234), (55, 235), (55, 236), (55, 237), (55, 239), (56, 225), (56, 227), (56, 228), (56, 229), (56, 230), (56, 231), (56, 232), (56, 233), (56, 234), (56, 235), (56, 236), (56, 237), (56, 239), (57, 226), (57, 228), (57, 229), (57, 230), (57, 231), (57, 232), (57, 233), (57, 234), (57, 235), (57, 236), (57, 237), (57, 239), (58, 227), (58, 229), (58, 230), (58, 231), (58, 232), (58, 233), (58, 234), (58, 235), (58, 236), (58, 237), (58, 239), (59, 228), (59, 230), (59, 231), (59, 232), (59, 233), (59, 234), (59, 235), (59, 236), (59, 237), (59, 239), (60, 229), (60, 231), (60, 232), (60, 233), (60, 234), (60, 235), (60, 236), (60, 237), (60, 239), (61, 230), (61, 232), (61, 233), (61, 234), (61, 235), (61, 236), (61, 237), (61, 239), (62, 231), (62, 233), (62, 234), (62, 235), (62, 236), (62, 237), (62, 239), (63, 232), (63, 235), (63, 236), (63, 237), (63, 239), (64, 233), (64, 236), (64, 237), (64, 239), (65, 234), (65, 237), (65, 239), (66, 235), (66, 239), (67, 236), (67, 239), (68, 239), (331, 237), (331, 239), (332, 236), (332, 239), (333, 235), (333, 239), (334, 234), (334, 237), (334, 239), (335, 233), (335, 236), (335, 237), (335, 239), (336, 232), (336, 234), (336, 235), (336, 236), (336, 237), (336, 239), (337, 231), (337, 233), (337, 234), (337, 235), (337, 236), (337, 237), (337, 239), (338, 230), (338, 232), (338, 233), (338, 234), (338, 235), (338, 236), (338, 237), (338, 239), (339, 229), (339, 231), (339, 232), (339, 233), (339, 234), (339, 235), (339, 236), (339, 237), (339, 239), (340, 228), (340, 230), (340, 231), (340, 232), (340, 233), (340, 234), (340, 235), (340, 236), (340, 237), (340, 239), (341, 227), (341, 229), (341, 230), (341, 231), (341, 232), (341, 233), (341, 234), (341, 235), (341, 236), (341, 237), (341, 239), (342, 226), (342, 228), (342, 229), (342, 230), (342, 231), (342, 232), (342, 233), (342, 234), (342, 235), (342, 236), (342, 237), (342, 239), (343, 225), (343, 227), (343, 228), (343, 229), (343, 230), (343, 231), (343, 232), (343, 233), (343, 234), (343, 235), (343, 236), (343, 237), (343, 239), (344, 224), (344, 226), (344, 227), (344, 228), (344, 229), (344, 230), (344, 231), (344, 232), (344, 233), (344, 234), (344, 235), (344, 236), (344, 237), (344, 239), (345, 223), (345, 225), (345, 226), (345, 227), (345, 228), (345, 229), (345, 230), (345, 231), (345, 232), (345, 233), (345, 234), (345, 235), (345, 236), (345, 237), (345, 238), (345, 239), (345, 240), (346, 222), (346, 224), (346, 225), (346, 226), (346, 227), (346, 228), (346, 229), (346, 230), (346, 231), (346, 232), (346, 233), (346, 234), (346, 235), (346, 236), (346, 237), (346, 238), (346, 240), (347, 221), (347, 223), (347, 224), (347, 225), (347, 226), (347, 227), (347, 228), (347, 229), (347, 230), (347, 231), (347, 232), (347, 233), (347, 234), (347, 235), (347, 236), (347, 237), (347, 238), (347, 240), (348, 222), (348, 223), (348, 224), (348, 225), (348, 226), (348, 227), (348, 228), (348, 229), (348, 230), (348, 231), (348, 232), (348, 233), (348, 234), (348, 235), (348, 236), (348, 237), (348, 238), (348, 240), (349, 219), (349, 221), (349, 222), (349, 223), (349, 224), (349, 225), (349, 226), (349, 227), (349, 228), (349, 229), (349, 230), (349, 231), (349, 232), (349, 233), (349, 234), (349, 235), (349, 236), (349, 237), (349, 240), (350, 219), (350, 221), (350, 222), (350, 223), (350, 224), (350, 225), (350, 226), (350, 227), (350, 228), (350, 229), (350, 230), (350, 231), (350, 232), (350, 233), (350, 234), (350, 235), (350, 240), (351, 219), (351, 221), (351, 222), (351, 223), (351, 224), (351, 225), (351, 226), (351, 227), (351, 228), (351, 229), (351, 230), (351, 231), (351, 232), (351, 233), (351, 237), (352, 221), (352, 222), (352, 223), (352, 224), (352, 225), (352, 226), (352, 227), (352, 228), (352, 229), (352, 230), (352, 234), (352, 235), (353, 220), (353, 224), (353, 225), (353, 231), (353, 232), (353, 233), (354, 221), (354, 223), (354, 226), (354, 227), (354, 228), (354, 229), (354, 230), (355, 224), (355, 225), ) coordinates_FF3000 = ((50, 242), (50, 244), (51, 242), (51, 245), (51, 247), (52, 242), (52, 244), (52, 249), (53, 242), (53, 244), (53, 245), (53, 246), (53, 247), (53, 251), (54, 242), (54, 244), (54, 245), (54, 246), (54, 247), (54, 248), (54, 249), (54, 253), (55, 242), (55, 244), (55, 245), (55, 246), (55, 247), (55, 248), (55, 249), (55, 250), (55, 251), (55, 255), (56, 242), (56, 244), (56, 245), (56, 246), (56, 247), (56, 248), (56, 249), (56, 250), (56, 251), (56, 252), (56, 253), (56, 257), (57, 242), (57, 244), (57, 245), (57, 246), (57, 247), (57, 248), (57, 249), (57, 250), (57, 251), (57, 252), (57, 253), (57, 254), (57, 255), (57, 258), (57, 259), (58, 241), (58, 242), (58, 243), (58, 244), (58, 245), (58, 246), (58, 247), (58, 248), (58, 249), (58, 250), (58, 251), (58, 252), (58, 253), (58, 254), (58, 255), (58, 256), (58, 257), (58, 260), (59, 241), (59, 243), (59, 244), (59, 245), (59, 246), (59, 247), (59, 248), (59, 249), (59, 250), (59, 251), (59, 252), (59, 253), (59, 254), (59, 255), (59, 256), (59, 257), (59, 258), (59, 259), (59, 262), (60, 241), (60, 243), (60, 244), (60, 245), (60, 246), (60, 247), (60, 248), (60, 249), (60, 250), (60, 251), (60, 252), (60, 253), (60, 254), (60, 255), (60, 256), (60, 257), (60, 258), (60, 259), (60, 260), (60, 263), (61, 241), (61, 243), (61, 244), (61, 245), (61, 246), (61, 247), (61, 248), (61, 249), (61, 250), (61, 251), (61, 252), (61, 253), (61, 254), (61, 255), (61, 256), (61, 257), (61, 258), (61, 259), (61, 260), (61, 261), (61, 262), (61, 264), (62, 241), (62, 243), (62, 244), (62, 245), (62, 246), (62, 247), (62, 248), (62, 249), (62, 250), (62, 251), (62, 252), (62, 253), (62, 254), (62, 255), (62, 256), (62, 257), (62, 258), (62, 259), (62, 260), (62, 261), (62, 262), (62, 263), (62, 265), (63, 241), (63, 243), (63, 244), (63, 245), (63, 246), (63, 247), (63, 248), (63, 249), (63, 250), (63, 251), (63, 252), (63, 253), (63, 254), (63, 255), (63, 256), (63, 257), (63, 258), (63, 259), (63, 260), (63, 261), (63, 262), (63, 263), (63, 264), (63, 266), (64, 241), (64, 243), (64, 244), (64, 245), (64, 246), (64, 247), (64, 248), (64, 249), (64, 250), (64, 251), (64, 252), (64, 253), (64, 254), (64, 255), (64, 256), (64, 257), (64, 258), (64, 259), (64, 260), (64, 261), (64, 262), (64, 263), (64, 264), (64, 266), (65, 241), (65, 243), (65, 244), (65, 245), (65, 246), (65, 247), (65, 248), (65, 249), (65, 250), (65, 251), (65, 252), (65, 253), (65, 254), (65, 255), (65, 256), (65, 257), (65, 258), (65, 259), (65, 260), (65, 261), (65, 262), (65, 263), (66, 241), (66, 243), (66, 244), (66, 245), (66, 246), (66, 247), (66, 248), (66, 249), (66, 250), (66, 251), (66, 252), (66, 253), (66, 254), (66, 255), (66, 256), (66, 257), (66, 258), (66, 259), (66, 265), (67, 241), (67, 243), (67, 244), (67, 245), (67, 246), (67, 247), (67, 248), (67, 249), (67, 250), (67, 251), (67, 252), (67, 253), (67, 254), (67, 255), (67, 260), (67, 261), (67, 263), (68, 241), (68, 243), (68, 244), (68, 245), (68, 246), (68, 247), (68, 248), (68, 249), (68, 250), (68, 251), (68, 252), (68, 253), (68, 254), (68, 257), (68, 258), (68, 259), (69, 241), (69, 243), (69, 244), (69, 245), (69, 246), (69, 247), (69, 248), (69, 249), (69, 250), (69, 251), (69, 252), (69, 255), (70, 241), (70, 244), (70, 245), (70, 246), (70, 247), (70, 248), (70, 249), (70, 250), (70, 251), (71, 242), (71, 245), (71, 246), (71, 247), (71, 248), (71, 249), (71, 250), (71, 251), (71, 252), (72, 243), (72, 247), (72, 248), (72, 249), (72, 250), (72, 252), (73, 245), (73, 249), (73, 251), (74, 247), (74, 251), (75, 249), (75, 251), (324, 249), (324, 251), (325, 247), (325, 251), (326, 245), (326, 249), (326, 251), (327, 243), (327, 247), (327, 248), (327, 249), (327, 250), (327, 252), (328, 242), (328, 245), (328, 246), (328, 247), (328, 248), (328, 249), (328, 250), (328, 251), (328, 253), (329, 241), (329, 244), (329, 245), (329, 246), (329, 247), (329, 248), (329, 249), (329, 250), (329, 251), (329, 252), (329, 254), (330, 241), (330, 243), (330, 244), (330, 245), (330, 246), (330, 247), (330, 248), (330, 249), (330, 250), (330, 251), (330, 252), (330, 255), (331, 241), (331, 243), (331, 244), (331, 245), (331, 246), (331, 247), (331, 248), (331, 249), (331, 250), (331, 251), (331, 252), (331, 253), (331, 254), (331, 257), (331, 258), (331, 259), (332, 241), (332, 243), (332, 244), (332, 245), (332, 246), (332, 247), (332, 248), (332, 249), (332, 250), (332, 251), (332, 252), (332, 253), (332, 254), (332, 255), (332, 256), (332, 260), (332, 261), (332, 263), (333, 241), (333, 243), (333, 244), (333, 245), (333, 246), (333, 247), (333, 248), (333, 249), (333, 250), (333, 251), (333, 252), (333, 253), (333, 254), (333, 255), (333, 256), (333, 257), (333, 258), (333, 259), (333, 265), (334, 241), (334, 243), (334, 244), (334, 245), (334, 246), (334, 247), (334, 248), (334, 249), (334, 250), (334, 251), (334, 252), (334, 253), (334, 254), (334, 255), (334, 256), (334, 257), (334, 258), (334, 259), (334, 260), (334, 261), (334, 262), (334, 263), (334, 266), (335, 241), (335, 243), (335, 244), (335, 245), (335, 246), (335, 247), (335, 248), (335, 249), (335, 250), (335, 251), (335, 252), (335, 253), (335, 254), (335, 255), (335, 256), (335, 257), (335, 258), (335, 259), (335, 260), (335, 261), (335, 262), (335, 263), (335, 264), (335, 266), (336, 241), (336, 243), (336, 244), (336, 245), (336, 246), (336, 247), (336, 248), (336, 249), (336, 250), (336, 251), (336, 252), (336, 253), (336, 254), (336, 255), (336, 256), (336, 257), (336, 258), (336, 259), (336, 260), (336, 261), (336, 262), (336, 263), (336, 264), (336, 266), (337, 241), (337, 243), (337, 244), (337, 245), (337, 246), (337, 247), (337, 248), (337, 249), (337, 250), (337, 251), (337, 252), (337, 253), (337, 254), (337, 255), (337, 256), (337, 257), (337, 258), (337, 259), (337, 260), (337, 261), (337, 262), (337, 263), (337, 265), (338, 241), (338, 243), (338, 244), (338, 245), (338, 246), (338, 247), (338, 248), (338, 249), (338, 250), (338, 251), (338, 252), (338, 253), (338, 254), (338, 255), (338, 256), (338, 257), (338, 258), (338, 259), (338, 260), (338, 261), (338, 264), (339, 241), (339, 243), (339, 244), (339, 245), (339, 246), (339, 247), (339, 248), (339, 249), (339, 250), (339, 251), (339, 252), (339, 253), (339, 254), (339, 255), (339, 256), (339, 257), (339, 258), (339, 259), (339, 260), (339, 263), (340, 241), (340, 243), (340, 244), (340, 245), (340, 246), (340, 247), (340, 248), (340, 249), (340, 250), (340, 251), (340, 252), (340, 253), (340, 254), (340, 255), (340, 256), (340, 257), (340, 258), (340, 261), (340, 262), (341, 241), (341, 242), (341, 243), (341, 244), (341, 245), (341, 246), (341, 247), (341, 248), (341, 249), (341, 250), (341, 251), (341, 252), (341, 253), (341, 254), (341, 255), (341, 256), (341, 257), (341, 260), (342, 242), (342, 244), (342, 245), (342, 246), (342, 247), (342, 248), (342, 249), (342, 250), (342, 251), (342, 252), (342, 253), (342, 254), (342, 255), (342, 258), (343, 242), (343, 244), (343, 245), (343, 246), (343, 247), (343, 248), (343, 249), (343, 250), (343, 251), (343, 252), (343, 253), (343, 257), (344, 242), (344, 244), (344, 245), (344, 246), (344, 247), (344, 248), (344, 249), (344, 250), (344, 251), (344, 255), (345, 242), (345, 244), (345, 245), (345, 246), (345, 247), (345, 248), (345, 249), (345, 253), (346, 242), (346, 244), (346, 245), (346, 246), (346, 247), (346, 251), (347, 242), (347, 244), (347, 249), (348, 242), (348, 245), (348, 246), (349, 242), (349, 244), ) coordinates_FF0057 = ((94, 253), (94, 254), (94, 256), (95, 257), (96, 252), (96, 254), (96, 255), (96, 256), (96, 258), (97, 251), (97, 253), (97, 254), (97, 255), (97, 256), (97, 257), (97, 259), (98, 250), (98, 252), (98, 253), (98, 254), (98, 255), (98, 256), (98, 257), (98, 258), (99, 249), (99, 251), (99, 252), (99, 253), (99, 254), (99, 255), (99, 256), (99, 257), (99, 258), (99, 260), (100, 247), (100, 250), (100, 251), (100, 252), (100, 253), (100, 254), (100, 255), (100, 256), (100, 257), (100, 258), (100, 259), (100, 261), (101, 248), (101, 250), (101, 251), (101, 252), (101, 253), (101, 254), (101, 255), (101, 256), (101, 257), (101, 258), (101, 259), (101, 260), (101, 262), (102, 249), (102, 251), (102, 252), (102, 253), (102, 254), (102, 255), (102, 256), (102, 257), (102, 258), (102, 259), (102, 260), (103, 250), (103, 252), (103, 253), (103, 254), (103, 255), (103, 256), (103, 257), (103, 258), (103, 259), (103, 260), (103, 261), (103, 264), (104, 251), (104, 253), (104, 254), (104, 255), (104, 256), (104, 257), (104, 258), (104, 259), (104, 260), (104, 261), (104, 262), (104, 266), (105, 252), (105, 254), (105, 255), (105, 256), (105, 257), (105, 258), (105, 259), (105, 260), (105, 261), (105, 262), (105, 263), (105, 264), (105, 266), (106, 253), (106, 255), (106, 256), (106, 257), (106, 258), (106, 259), (106, 260), (106, 261), (106, 262), (106, 263), (106, 264), (106, 266), (107, 253), (107, 255), (107, 256), (107, 257), (107, 258), (107, 259), (107, 260), (107, 261), (107, 262), (107, 263), (107, 264), (107, 266), (108, 254), (108, 256), (108, 257), (108, 258), (108, 259), (108, 260), (108, 261), (108, 262), (108, 263), (108, 264), (108, 265), (108, 267), (109, 254), (109, 256), (109, 257), (109, 258), (109, 259), (109, 260), (109, 261), (109, 262), (109, 263), (109, 264), (109, 265), (109, 267), (110, 254), (110, 256), (110, 257), (110, 258), (110, 259), (110, 260), (110, 261), (110, 262), (110, 263), (110, 264), (110, 265), (110, 267), (111, 254), (111, 256), (111, 257), (111, 258), (111, 259), (111, 260), (111, 261), (111, 262), (111, 263), (111, 264), (111, 265), (111, 267), (112, 254), (112, 256), (112, 257), (112, 258), (112, 259), (112, 260), (112, 261), (112, 262), (112, 263), (112, 264), (112, 265), (112, 266), (112, 268), (113, 254), (113, 256), (113, 257), (113, 258), (113, 259), (113, 260), (113, 261), (113, 262), (113, 263), (113, 264), (113, 265), (113, 266), (113, 268), (114, 254), (114, 256), (114, 257), (114, 258), (114, 259), (114, 260), (114, 261), (114, 262), (114, 263), (114, 268), (115, 255), (115, 257), (115, 258), (115, 259), (115, 260), (115, 261), (115, 262), (115, 267), (116, 255), (116, 257), (116, 258), (116, 259), (116, 260), (116, 261), (116, 263), (117, 255), (117, 257), (117, 258), (117, 259), (117, 260), (117, 261), (117, 263), (118, 255), (118, 257), (118, 258), (118, 259), (118, 260), (118, 262), (119, 255), (119, 257), (119, 258), (119, 259), (119, 260), (119, 262), (120, 253), (120, 255), (120, 256), (120, 257), (120, 258), (120, 259), (120, 261), (121, 251), (121, 255), (121, 256), (121, 257), (121, 258), (121, 259), (121, 261), (122, 250), (122, 253), (122, 254), (122, 255), (122, 256), (122, 257), (122, 258), (122, 259), (122, 261), (123, 251), (123, 253), (123, 254), (123, 255), (123, 256), (123, 257), (123, 258), (123, 259), (123, 261), (124, 252), (124, 254), (124, 255), (124, 256), (124, 257), (124, 258), (124, 259), (124, 261), (125, 252), (125, 254), (125, 255), (125, 256), (125, 257), (125, 258), (125, 259), (125, 261), (126, 253), (126, 256), (126, 257), (126, 258), (126, 259), (126, 261), (127, 254), (127, 261), (128, 257), (128, 258), (128, 259), (128, 261), (270, 261), (271, 255), (271, 257), (271, 258), (271, 259), (271, 261), (272, 254), (272, 261), (273, 254), (273, 256), (273, 257), (273, 258), (273, 259), (273, 261), (274, 253), (274, 255), (274, 256), (274, 257), (274, 258), (274, 259), (274, 261), (275, 254), (275, 255), (275, 256), (275, 257), (275, 258), (275, 259), (275, 261), (276, 250), (276, 253), (276, 254), (276, 255), (276, 256), (276, 257), (276, 258), (276, 259), (276, 261), (277, 251), (277, 253), (277, 254), (277, 255), (277, 256), (277, 257), (277, 258), (277, 259), (277, 261), (278, 252), (278, 255), (278, 256), (278, 257), (278, 258), (278, 259), (278, 261), (279, 253), (279, 255), (279, 256), (279, 257), (279, 258), (279, 259), (279, 261), (280, 254), (280, 256), (280, 257), (280, 258), (280, 259), (280, 260), (280, 262), (281, 255), (281, 257), (281, 258), (281, 259), (281, 260), (281, 262), (282, 256), (282, 258), (282, 259), (282, 260), (282, 261), (282, 263), (283, 256), (283, 258), (283, 259), (283, 260), (283, 261), (283, 263), (283, 267), (284, 255), (284, 257), (284, 258), (284, 259), (284, 260), (284, 261), (284, 262), (284, 263), (284, 265), (284, 267), (285, 255), (285, 257), (285, 258), (285, 259), (285, 260), (285, 261), (285, 262), (285, 263), (285, 268), (286, 255), (286, 257), (286, 258), (286, 259), (286, 260), (286, 261), (286, 262), (286, 263), (286, 264), (286, 265), (286, 266), (286, 268), (287, 254), (287, 256), (287, 257), (287, 258), (287, 259), (287, 260), (287, 261), (287, 262), (287, 263), (287, 264), (287, 265), (287, 266), (287, 268), (288, 254), (288, 256), (288, 257), (288, 258), (288, 259), (288, 260), (288, 261), (288, 262), (288, 263), (288, 264), (288, 265), (288, 267), (289, 254), (289, 256), (289, 257), (289, 258), (289, 259), (289, 260), (289, 261), (289, 262), (289, 263), (289, 264), (289, 265), (289, 267), (290, 253), (290, 255), (290, 256), (290, 257), (290, 258), (290, 259), (290, 260), (290, 261), (290, 262), (290, 263), (290, 264), (290, 265), (290, 267), (291, 253), (291, 255), (291, 256), (291, 257), (291, 258), (291, 259), (291, 260), (291, 261), (291, 262), (291, 263), (291, 264), (291, 265), (291, 267), (292, 253), (292, 255), (292, 256), (292, 257), (292, 258), (292, 259), (292, 260), (292, 261), (292, 262), (292, 263), (292, 264), (292, 266), (293, 253), (293, 255), (293, 256), (293, 257), (293, 258), (293, 259), (293, 260), (293, 261), (293, 262), (293, 263), (293, 264), (293, 266), (294, 252), (294, 254), (294, 255), (294, 256), (294, 257), (294, 258), (294, 259), (294, 260), (294, 261), (294, 262), (294, 263), (294, 266), (295, 252), (295, 254), (295, 255), (295, 256), (295, 257), (295, 258), (295, 259), (295, 260), (295, 261), (295, 262), (295, 266), (296, 251), (296, 253), (296, 254), (296, 255), (296, 256), (296, 257), (296, 258), (296, 259), (296, 260), (296, 261), (297, 250), (297, 252), (297, 253), (297, 254), (297, 255), (297, 256), (297, 257), (297, 258), (297, 259), (297, 260), (298, 249), (298, 251), (298, 252), (298, 253), (298, 254), (298, 255), (298, 256), (298, 257), (298, 258), (298, 259), (298, 260), (298, 262), (299, 248), (299, 250), (299, 251), (299, 252), (299, 253), (299, 254), (299, 255), (299, 256), (299, 257), (299, 258), (299, 259), (299, 261), (300, 249), (300, 251), (300, 252), (300, 253), (300, 254), (300, 255), (300, 256), (300, 257), (300, 258), (300, 260), (301, 250), (301, 252), (301, 253), (301, 254), (301, 255), (301, 256), (301, 257), (301, 259), (302, 251), (302, 253), (302, 254), (302, 255), (302, 256), (302, 257), (302, 259), (303, 252), (303, 254), (303, 255), (303, 256), (303, 258), (304, 253), (304, 257), (305, 254), (305, 256), ) coordinates_4E007F = ((34, 185), (34, 187), (34, 188), (34, 189), (34, 190), (34, 191), (35, 182), (35, 183), (35, 184), (35, 192), (35, 193), (35, 194), (35, 195), (35, 197), (36, 180), (36, 185), (36, 186), (36, 187), (36, 188), (36, 189), (36, 190), (36, 191), (36, 196), (37, 180), (37, 182), (37, 183), (37, 184), (37, 185), (37, 186), (37, 187), (37, 188), (37, 189), (37, 190), (37, 191), (37, 195), (38, 180), (38, 183), (38, 184), (38, 185), (38, 186), (38, 187), (38, 188), (38, 189), (38, 190), (38, 193), (39, 181), (39, 186), (39, 187), (39, 188), (39, 189), (39, 191), (40, 183), (40, 185), (40, 188), (40, 190), (41, 186), (41, 189), (42, 188), (43, 188), (356, 188), (357, 188), (358, 186), (358, 189), (359, 183), (359, 185), (359, 188), (359, 190), (360, 181), (360, 186), (360, 187), (360, 188), (360, 189), (360, 191), (361, 180), (361, 183), (361, 184), (361, 185), (361, 186), (361, 187), (361, 188), (361, 189), (361, 190), (361, 193), (362, 180), (362, 182), (362, 183), (362, 184), (362, 185), (362, 186), (362, 187), (362, 188), (362, 189), (362, 190), (362, 191), (362, 195), (363, 180), (363, 185), (363, 186), (363, 187), (363, 188), (363, 189), (363, 190), (363, 191), (363, 196), (364, 183), (364, 184), (364, 192), (364, 193), (364, 194), (364, 195), (365, 185), (365, 187), (365, 188), (365, 189), (365, 190), ) coordinates_137F00 = ((86, 213), (86, 214), (87, 212), (87, 214), (88, 212), (88, 215), (89, 211), (89, 213), (89, 215), (90, 210), (90, 212), (90, 213), (90, 215), (91, 210), (91, 212), (91, 213), (91, 214), (91, 216), (92, 209), (92, 211), (92, 212), (92, 213), (92, 214), (92, 216), (92, 226), (92, 228), (93, 209), (93, 211), (93, 212), (93, 213), (93, 214), (93, 215), (93, 217), (93, 224), (93, 229), (94, 208), (94, 210), (94, 211), (94, 212), (94, 213), (94, 214), (94, 215), (94, 217), (94, 223), (94, 226), (94, 227), (94, 230), (95, 208), (95, 210), (95, 211), (95, 212), (95, 213), (95, 214), (95, 215), (95, 216), (95, 217), (95, 221), (95, 224), (95, 225), (95, 226), (95, 227), (95, 228), (95, 232), (96, 208), (96, 210), (96, 211), (96, 212), (96, 213), (96, 214), (96, 215), (96, 216), (96, 217), (96, 219), (96, 220), (96, 223), (96, 224), (96, 225), (96, 226), (96, 227), (96, 228), (96, 229), (96, 230), (97, 207), (97, 210), (97, 211), (97, 212), (97, 213), (97, 214), (97, 215), (97, 216), (97, 217), (97, 218), (97, 221), (97, 222), (97, 223), (97, 224), (97, 225), (97, 226), (97, 227), (97, 228), (97, 229), (97, 230), (97, 231), (97, 233), (98, 207), (98, 209), (98, 212), (98, 213), (98, 214), (98, 215), (98, 216), (98, 217), (98, 218), (98, 219), (98, 220), (98, 221), (98, 222), (98, 223), (98, 224), (98, 225), (98, 226), (98, 227), (98, 228), (98, 229), (98, 230), (98, 231), (98, 233), (99, 210), (99, 213), (99, 214), (99, 215), (99, 216), (99, 217), (99, 218), (99, 219), (99, 220), (99, 221), (99, 222), (99, 223), (99, 224), (99, 225), (99, 226), (99, 227), (99, 228), (99, 229), (99, 230), (99, 231), (99, 233), (100, 212), (100, 215), (100, 216), (100, 217), (100, 218), (100, 219), (100, 220), (100, 221), (100, 222), (100, 223), (100, 224), (100, 225), (100, 226), (100, 227), (100, 228), (100, 229), (100, 230), (100, 231), (100, 232), (100, 234), (101, 213), (101, 216), (101, 217), (101, 218), (101, 219), (101, 220), (101, 221), (101, 222), (101, 223), (101, 224), (101, 225), (101, 226), (101, 227), (101, 228), (101, 229), (101, 230), (101, 231), (101, 234), (102, 215), (102, 218), (102, 219), (102, 220), (102, 221), (102, 222), (102, 223), (102, 224), (102, 225), (102, 226), (102, 227), (102, 228), (102, 229), (102, 230), (102, 232), (103, 216), (103, 228), (103, 231), (104, 218), (104, 220), (104, 221), (104, 222), (104, 223), (104, 224), (104, 225), (104, 226), (104, 227), (104, 228), (104, 230), (295, 218), (295, 220), (295, 221), (295, 222), (295, 223), (295, 224), (295, 225), (295, 226), (295, 227), (295, 228), (295, 230), (296, 216), (296, 231), (297, 214), (297, 218), (297, 219), (297, 220), (297, 221), (297, 222), (297, 223), (297, 224), (297, 225), (297, 226), (297, 227), (297, 228), (297, 229), (297, 230), (297, 232), (298, 213), (298, 216), (298, 217), (298, 218), (298, 219), (298, 220), (298, 221), (298, 222), (298, 223), (298, 224), (298, 225), (298, 226), (298, 227), (298, 228), (298, 229), (298, 230), (298, 231), (298, 234), (299, 212), (299, 214), (299, 215), (299, 216), (299, 217), (299, 218), (299, 219), (299, 220), (299, 221), (299, 222), (299, 223), (299, 224), (299, 225), (299, 226), (299, 227), (299, 228), (299, 229), (299, 230), (299, 231), (299, 232), (299, 234), (300, 210), (300, 213), (300, 214), (300, 215), (300, 216), (300, 217), (300, 218), (300, 219), (300, 220), (300, 221), (300, 222), (300, 223), (300, 224), (300, 225), (300, 226), (300, 227), (300, 228), (300, 229), (300, 230), (300, 231), (300, 233), (301, 207), (301, 209), (301, 212), (301, 213), (301, 214), (301, 215), (301, 216), (301, 217), (301, 218), (301, 219), (301, 220), (301, 221), (301, 222), (301, 223), (301, 224), (301, 225), (301, 226), (301, 227), (301, 228), (301, 229), (301, 230), (301, 231), (301, 233), (302, 207), (302, 210), (302, 211), (302, 212), (302, 213), (302, 214), (302, 215), (302, 216), (302, 217), (302, 218), (302, 221), (302, 222), (302, 223), (302, 224), (302, 225), (302, 226), (302, 227), (302, 228), (302, 229), (302, 230), (302, 231), (302, 233), (303, 208), (303, 210), (303, 211), (303, 212), (303, 213), (303, 214), (303, 215), (303, 216), (303, 217), (303, 219), (303, 220), (303, 223), (303, 224), (303, 225), (303, 226), (303, 227), (303, 228), (303, 229), (303, 230), (304, 208), (304, 210), (304, 211), (304, 212), (304, 213), (304, 214), (304, 215), (304, 216), (304, 217), (304, 221), (304, 222), (304, 225), (304, 226), (304, 227), (304, 228), (304, 232), (305, 208), (305, 210), (305, 211), (305, 212), (305, 213), (305, 214), (305, 215), (305, 217), (305, 223), (305, 226), (305, 227), (305, 230), (306, 209), (306, 211), (306, 212), (306, 213), (306, 214), (306, 215), (306, 216), (306, 217), (306, 224), (306, 228), (307, 209), (307, 211), (307, 212), (307, 213), (307, 214), (307, 216), (307, 226), (307, 227), (308, 210), (308, 212), (308, 213), (308, 214), (308, 216), (309, 212), (309, 213), (309, 215), (310, 211), (310, 213), (310, 215), (311, 212), (311, 214), (311, 215), (312, 212), (312, 214), (313, 213), (313, 214), ) coordinates_7F0061 = ((130, 254), (130, 256), (130, 257), (130, 258), (130, 259), (130, 261), (131, 256), (131, 261), (132, 257), (132, 262), (133, 259), (134, 261), (134, 263), (265, 261), (265, 263), (266, 259), (267, 257), (267, 262), (268, 256), (268, 261), (269, 254), (269, 256), (269, 257), (269, 258), (269, 259), )
782.235641
865
0.485855
9fee91fe2e8d112a7a12578571967ac17dd261c6
1,417
py
Python
src/pyrfc/__init__.py
coledong/PyRFC
073bfbd330a6f5581d507c7936974b19147355ea
[ "Apache-2.0" ]
1
2020-06-03T17:56:51.000Z
2020-06-03T17:56:51.000Z
src/pyrfc/__init__.py
coledong/PyRFC
073bfbd330a6f5581d507c7936974b19147355ea
[ "Apache-2.0" ]
null
null
null
src/pyrfc/__init__.py
coledong/PyRFC
073bfbd330a6f5581d507c7936974b19147355ea
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 SAP AG. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: //www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, # either express or implied. See the License for the specific. # language governing permissions and limitations under the License. # import from internal modules that they could be directly imported from # the pyrfc package # Set DLL path, due to https://docs.python.org/3.8/whatsnew/3.8.html#bpo-36085-whatsnew import os if os.name == "nt": try: os.add_dll_directory(os.path.join(os.environ["SAPNWRFC_HOME"], "lib")) except Exception: pass from ._exception import ( RFCError, RFCLibError, CommunicationError, LogonError, ABAPApplicationError, ABAPRuntimeError, ExternalAuthorizationError, ExternalApplicationError, ExternalRuntimeError, ) from .pyrfc import ( get_nwrfclib_version, Connection, Throughput, TypeDescription, FunctionDescription, ) __author__ = """"Srdjan Boskovic""" __email__ = "srdjan.boskovic@sap.com" __version__ = "2.0.5"
28.34
88
0.703599
082d881741a10b0ce11d96970cda7042f4cec15e
6,808
py
Python
rich/_palettes.py
BIGBALLON/rich
4e24f2ef1a978ce5f1b01b2b26b36f87b87566f2
[ "MIT" ]
16
2020-09-20T22:32:54.000Z
2021-04-02T17:14:25.000Z
rich/_palettes.py
BIGBALLON/rich
4e24f2ef1a978ce5f1b01b2b26b36f87b87566f2
[ "MIT" ]
42
2020-12-16T07:03:59.000Z
2022-03-28T20:11:50.000Z
rich/_palettes.py
BIGBALLON/rich
4e24f2ef1a978ce5f1b01b2b26b36f87b87566f2
[ "MIT" ]
3
2021-05-21T21:26:34.000Z
2021-10-05T16:57:57.000Z
from .palette import Palette # The standard ansi colors WINDOWS_PALETTE = Palette( [ (0, 0, 0), (128, 0, 0), (0, 128, 0), (128, 128, 0), (0, 0, 128), (128, 0, 128), (0, 128, 128), (192, 192, 192), ] ) # # The standard ansi colors (including bright variants) STANDARD_PALETTE = Palette( [ (0, 0, 0), (170, 0, 0), (0, 170, 0), (170, 85, 0), (0, 0, 170), (170, 0, 170), (0, 170, 170), (170, 170, 170), (85, 85, 85), (255, 85, 85), (85, 255, 85), (255, 255, 85), (85, 85, 255), (255, 85, 255), (85, 255, 255), (255, 255, 255), ] ) # The 256 color palette EIGHT_BIT_PALETTE = Palette( [ (0, 0, 0), (128, 0, 0), (0, 128, 0), (128, 128, 0), (0, 0, 128), (128, 0, 128), (0, 128, 128), (192, 192, 192), (128, 128, 128), (255, 0, 0), (0, 255, 0), (255, 255, 0), (0, 0, 255), (255, 0, 255), (0, 255, 255), (255, 255, 255), (0, 0, 0), (0, 0, 95), (0, 0, 135), (0, 0, 175), (0, 0, 215), (0, 0, 255), (0, 95, 0), (0, 95, 95), (0, 95, 135), (0, 95, 175), (0, 95, 215), (0, 95, 255), (0, 135, 0), (0, 135, 95), (0, 135, 135), (0, 135, 175), (0, 135, 215), (0, 135, 255), (0, 175, 0), (0, 175, 95), (0, 175, 135), (0, 175, 175), (0, 175, 215), (0, 175, 255), (0, 215, 0), (0, 215, 95), (0, 215, 135), (0, 215, 175), (0, 215, 215), (0, 215, 255), (0, 255, 0), (0, 255, 95), (0, 255, 135), (0, 255, 175), (0, 255, 215), (0, 255, 255), (95, 0, 0), (95, 0, 95), (95, 0, 135), (95, 0, 175), (95, 0, 215), (95, 0, 255), (95, 95, 0), (95, 95, 95), (95, 95, 135), (95, 95, 175), (95, 95, 215), (95, 95, 255), (95, 135, 0), (95, 135, 95), (95, 135, 135), (95, 135, 175), (95, 135, 215), (95, 135, 255), (95, 175, 0), (95, 175, 95), (95, 175, 135), (95, 175, 175), (95, 175, 215), (95, 175, 255), (95, 215, 0), (95, 215, 95), (95, 215, 135), (95, 215, 175), (95, 215, 215), (95, 215, 255), (95, 255, 0), (95, 255, 95), (95, 255, 135), (95, 255, 175), (95, 255, 215), (95, 255, 255), (135, 0, 0), (135, 0, 95), (135, 0, 135), (135, 0, 175), (135, 0, 215), (135, 0, 255), (135, 95, 0), (135, 95, 95), (135, 95, 135), (135, 95, 175), (135, 95, 215), (135, 95, 255), (135, 135, 0), (135, 135, 95), (135, 135, 135), (135, 135, 175), (135, 135, 215), (135, 135, 255), (135, 175, 0), (135, 175, 95), (135, 175, 135), (135, 175, 175), (135, 175, 215), (135, 175, 255), (135, 215, 0), (135, 215, 95), (135, 215, 135), (135, 215, 175), (135, 215, 215), (135, 215, 255), (135, 255, 0), (135, 255, 95), (135, 255, 135), (135, 255, 175), (135, 255, 215), (135, 255, 255), (175, 0, 0), (175, 0, 95), (175, 0, 135), (175, 0, 175), (175, 0, 215), (175, 0, 255), (175, 95, 0), (175, 95, 95), (175, 95, 135), (175, 95, 175), (175, 95, 215), (175, 95, 255), (175, 135, 0), (175, 135, 95), (175, 135, 135), (175, 135, 175), (175, 135, 215), (175, 135, 255), (175, 175, 0), (175, 175, 95), (175, 175, 135), (175, 175, 175), (175, 175, 215), (175, 175, 255), (175, 215, 0), (175, 215, 95), (175, 215, 135), (175, 215, 175), (175, 215, 215), (175, 215, 255), (175, 255, 0), (175, 255, 95), (175, 255, 135), (175, 255, 175), (175, 255, 215), (175, 255, 255), (215, 0, 0), (215, 0, 95), (215, 0, 135), (215, 0, 175), (215, 0, 215), (215, 0, 255), (215, 95, 0), (215, 95, 95), (215, 95, 135), (215, 95, 175), (215, 95, 215), (215, 95, 255), (215, 135, 0), (215, 135, 95), (215, 135, 135), (215, 135, 175), (215, 135, 215), (215, 135, 255), (215, 175, 0), (215, 175, 95), (215, 175, 135), (215, 175, 175), (215, 175, 215), (215, 175, 255), (215, 215, 0), (215, 215, 95), (215, 215, 135), (215, 215, 175), (215, 215, 215), (215, 215, 255), (215, 255, 0), (215, 255, 95), (215, 255, 135), (215, 255, 175), (215, 255, 215), (215, 255, 255), (255, 0, 0), (255, 0, 95), (255, 0, 135), (255, 0, 175), (255, 0, 215), (255, 0, 255), (255, 95, 0), (255, 95, 95), (255, 95, 135), (255, 95, 175), (255, 95, 215), (255, 95, 255), (255, 135, 0), (255, 135, 95), (255, 135, 135), (255, 135, 175), (255, 135, 215), (255, 135, 255), (255, 175, 0), (255, 175, 95), (255, 175, 135), (255, 175, 175), (255, 175, 215), (255, 175, 255), (255, 215, 0), (255, 215, 95), (255, 215, 135), (255, 215, 175), (255, 215, 215), (255, 215, 255), (255, 255, 0), (255, 255, 95), (255, 255, 135), (255, 255, 175), (255, 255, 215), (255, 255, 255), (8, 8, 8), (18, 18, 18), (28, 28, 28), (38, 38, 38), (48, 48, 48), (58, 58, 58), (68, 68, 68), (78, 78, 78), (88, 88, 88), (98, 98, 98), (108, 108, 108), (118, 118, 118), (128, 128, 128), (138, 138, 138), (148, 148, 148), (158, 158, 158), (168, 168, 168), (178, 178, 178), (188, 188, 188), (198, 198, 198), (208, 208, 208), (218, 218, 218), (228, 228, 228), (238, 238, 238), ] )
22.543046
56
0.328437
9c9b53c4944db740fb42850c8b5af13165bfe2fb
7,962
py
Python
TimeWrapper_JE/venv/Lib/site-packages/pip/_internal/cli/base_command.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
TimeWrapper_JE/venv/Lib/site-packages/pip/_internal/cli/base_command.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
TimeWrapper_JE/venv/Lib/site-packages/pip/_internal/cli/base_command.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
1
2021-06-20T19:28:37.000Z
2021-06-20T19:28:37.000Z
"""Base Command class, and related routines""" import logging import logging.config import optparse import os import sys import traceback from optparse import Values from typing import Any, List, Optional, Tuple from pip._internal.cli import cmdoptions from pip._internal.cli.command_context import CommandContextMixIn from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter from pip._internal.cli.status_codes import ( ERROR, PREVIOUS_BUILD_DIR_ERROR, UNKNOWN_ERROR, VIRTUALENV_NOT_FOUND, ) from pip._internal.exceptions import ( BadCommand, CommandError, InstallationError, NetworkConnectionError, PreviousBuildDirError, UninstallationError, ) from pip._internal.utils.deprecation import deprecated from pip._internal.utils.filesystem import check_path_owner from pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging from pip._internal.utils.misc import get_prog, normalize_path from pip._internal.utils.temp_dir import TempDirectoryTypeRegistry as TempDirRegistry from pip._internal.utils.temp_dir import global_tempdir_manager, tempdir_registry from pip._internal.utils.virtualenv import running_under_virtualenv __all__ = ["Command"] logger = logging.getLogger(__name__) class Command(CommandContextMixIn): usage = None # type: str ignore_require_venv = False # type: bool def __init__(self, name, summary, isolated=False): # type: (str, str, bool) -> None super().__init__() self.name = name self.summary = summary self.parser = ConfigOptionParser( usage=self.usage, prog=f"{get_prog()} {name}", formatter=UpdatingDefaultsHelpFormatter(), add_help_option=False, name=name, description=self.__doc__, isolated=isolated, ) self.tempdir_registry = None # type: Optional[TempDirRegistry] # Commands should add options to this option group optgroup_name = f"{self.name.capitalize()} Options" self.cmd_opts = optparse.OptionGroup(self.parser, optgroup_name) # Add the general options gen_opts = cmdoptions.make_option_group( cmdoptions.general_group, self.parser, ) self.parser.add_option_group(gen_opts) self.add_options() def add_options(self): # type: () -> None pass def handle_pip_version_check(self, options): # type: (Values) -> None """ This is a no-op so that commands by default do not do the pip version check. """ # Make sure we do the pip version check if the index_group options # are present. assert not hasattr(options, "no_index") def run(self, options, args): # type: (Values, List[Any]) -> int raise NotImplementedError def parse_args(self, args): # type: (List[str]) -> Tuple[Any, Any] # factored out for testability return self.parser.parse_args(args) def main(self, args): # type: (List[str]) -> int try: with self.main_context(): return self._main(args) finally: logging.shutdown() def _main(self, args): # type: (List[str]) -> int # We must initialize this before the tempdir manager, otherwise the # configuration would not be accessible by the time we clean up the # tempdir manager. self.tempdir_registry = self.enter_context(tempdir_registry()) # Intentionally set as early as possible so globally-managed temporary # directories are available to the rest of the code. self.enter_context(global_tempdir_manager()) options, args = self.parse_args(args) # Set verbosity so that it can be used elsewhere. self.verbosity = options.verbose - options.quiet level_number = setup_logging( verbosity=self.verbosity, no_color=options.no_color, user_log_file=options.log, ) # TODO: Try to get these passing down from the command? # without resorting to os.environ to hold these. # This also affects isolated builds and it should. if options.no_input: os.environ["PIP_NO_INPUT"] = "1" if options.exists_action: os.environ["PIP_EXISTS_ACTION"] = " ".join(options.exists_action) if options.require_venv and not self.ignore_require_venv: # If a venv is required check if it can really be found if not running_under_virtualenv(): logger.critical("Could not find an activated virtualenv (required).") sys.exit(VIRTUALENV_NOT_FOUND) if options.cache_dir: options.cache_dir = normalize_path(options.cache_dir) if not check_path_owner(options.cache_dir): logger.warning( "The directory '%s' or its parent directory is not owned " "or is not writable by the current user. The cache " "has been disabled. Check the permissions and owner of " "that directory. If executing pip with sudo, you should " "use sudo's -H flag.", options.cache_dir, ) options.cache_dir = None if getattr(options, "build_dir", None): deprecated( reason=( "The -b/--build/--build-dir/--build-directory " "option is deprecated and has no effect anymore." ), replacement=( "use the TMPDIR/TEMP/TMP environment variable, " "possibly combined with --no-clean" ), gone_in="21.3", issue=8333, ) if "2020-resolver" in options.features_enabled: logger.warning( "--use-feature=2020-resolver no longer has any effect, " "since it is now the default dependency resolver in pip. " "This will become an error in pip 21.0." ) try: status = self.run(options, args) assert isinstance(status, int) return status except PreviousBuildDirError as exc: logger.critical(str(exc)) logger.debug("Exception information:", exc_info=True) return PREVIOUS_BUILD_DIR_ERROR except ( InstallationError, UninstallationError, BadCommand, NetworkConnectionError, ) as exc: logger.critical(str(exc)) logger.debug("Exception information:", exc_info=True) return ERROR except CommandError as exc: logger.critical("%s", exc) logger.debug("Exception information:", exc_info=True) return ERROR except BrokenStdoutLoggingError: # Bypass our logger and write any remaining messages to stderr # because stdout no longer works. print("ERROR: Pipe to stdout was broken", file=sys.stderr) if level_number <= logging.DEBUG: traceback.print_exc(file=sys.stderr) return ERROR except KeyboardInterrupt: logger.critical("Operation cancelled by user") logger.debug("Exception information:", exc_info=True) return ERROR except BaseException: logger.critical("Exception:", exc_info=True) return UNKNOWN_ERROR finally: self.handle_pip_version_check(options)
35.864865
87
0.601105
f58c115847f3d0e2109da87a3245c07b6f82922b
26
py
Python
terrascript/kubernetes/__init__.py
GarnerCorp/python-terrascript
ec6c2d9114dcd3cb955dd46069f8ba487e320a8c
[ "BSD-2-Clause" ]
null
null
null
terrascript/kubernetes/__init__.py
GarnerCorp/python-terrascript
ec6c2d9114dcd3cb955dd46069f8ba487e320a8c
[ "BSD-2-Clause" ]
null
null
null
terrascript/kubernetes/__init__.py
GarnerCorp/python-terrascript
ec6c2d9114dcd3cb955dd46069f8ba487e320a8c
[ "BSD-2-Clause" ]
1
2018-11-15T16:23:05.000Z
2018-11-15T16:23:05.000Z
"""2019-05-28 10:49:51"""
13
25
0.538462
6ef8dc1caadc6a1ad2e7410242b2e7f50a4d6285
2,801
py
Python
src/ralph_assets/models_util.py
vi4m/ralph_assets
d174e8f769da2d5a335d24bbef5d0ca2e205383c
[ "Apache-2.0" ]
null
null
null
src/ralph_assets/models_util.py
vi4m/ralph_assets
d174e8f769da2d5a335d24bbef5d0ca2e205383c
[ "Apache-2.0" ]
null
null
null
src/ralph_assets/models_util.py
vi4m/ralph_assets
d174e8f769da2d5a335d24bbef5d0ca2e205383c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Model utilities and mixins.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import models from lck.django.choices import Choices from ralph.account.models import Region from ralph import middleware from datetime import datetime from django.utils.translation import ugettext_lazy as _ class LastSeen(models.Model): last_seen = models.DateTimeField(verbose_name=_("last seen"), default=datetime.now) class Meta: abstract = True def save(self, update_last_seen=False, *args, **kwargs): if update_last_seen: self.last_seen = datetime.now() super(LastSeen, self).save(*args, **kwargs) class SavingUser(models.Model): class Meta: abstract = True def save(self, user=None, *args, **kwargs): self.saving_user = user return super(SavingUser, self).save(user=user, *args, **kwargs) class ProblemSeverity(Choices): _ = Choices.Choice warning = _("Warning") correct_me = _("Correct me") error = _("Error") class ImportProblem(models.Model): """Any problem with importing the resource from XLS/CSV.""" content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() resource = generic.GenericForeignKey('content_type', 'object_id') severity = models.PositiveSmallIntegerField(choices=ProblemSeverity()) message = models.TextField() def __str__(self): return self.message def add_problem(resource, severity, message): """Add a problem to the resource :param resource: Any django model instance :param severity: An instance of `ralph_assets.models.util.ProblemSeverity` :param message: A string describing the problem""" problem = ImportProblem( severity=severity, message=message, ) problem.resource = resource problem.save() class RegionalizedDBManager(models.Manager): def get_query_set(self): query_set = super(RegionalizedDBManager, self).get_query_set() regions = middleware.get_actual_regions() query_set = query_set.filter(region__in=regions) return query_set class Regionalized(models.Model): """Describes an abstract model with region definition in ``region`` field defined in ralph.accounts.models.Region""" objects = RegionalizedDBManager() admin_objects = models.Manager() region = models.ForeignKey(Region) class Meta: abstract = True def __unicode__(self): return self.region.name
28.01
78
0.706176
b96bbe4c152fd198cecca087eeee0a2cb6bc663b
5,757
py
Python
tools/generate-tempest-plugins-list.py
cityofships/tempest
59aa6811a3664d88b8939603b8e974644fbe21fa
[ "Apache-2.0" ]
254
2015-01-05T19:22:52.000Z
2022-03-29T08:14:54.000Z
tools/generate-tempest-plugins-list.py
cityofships/tempest
59aa6811a3664d88b8939603b8e974644fbe21fa
[ "Apache-2.0" ]
13
2015-03-02T15:53:04.000Z
2022-02-16T02:28:14.000Z
tools/generate-tempest-plugins-list.py
cityofships/tempest
59aa6811a3664d88b8939603b8e974644fbe21fa
[ "Apache-2.0" ]
367
2015-01-07T15:05:39.000Z
2022-03-04T09:50:35.000Z
#! /usr/bin/env python # Copyright 2016 Hewlett Packard Enterprise Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # This script is intended to be run as part of a periodic proposal bot # job in OpenStack infrastructure. # # In order to function correctly, the environment in which the # script runs must have # * network access to the review.opendev.org Gerrit API # working directory # * network access to https://opendev.org/openstack import json import re import sys import urllib3 from urllib3.util import retry # List of projects having tempest plugin stale or unmaintained for a long time # (6 months or more) # TODO(masayukig): Some of these can be removed from NON_ACTIVE_LIST in the # future when the patches are merged. NON_ACTIVE_LIST = [ 'x/gce-api', # It looks gce-api doesn't support python3 yet # https://bugs.launchpad.net/gce-api/+bug/1931094 'x/glare', # To avoid sanity-job failure 'x/group-based-policy', # https://bugs.launchpad.net/group-based-policy/+bug/1931091 'x/intel-nfv-ci-tests', # To avoid sanity-job failure 'openstack/networking-generic-switch', # This is not a real tempest plugin, # https://review.opendev.org/#/c/634846/ 'x/networking-plumgrid', # No longer contains tempest tests 'x/networking-spp', # https://review.opendev.org/#/c/635098/ # networking-spp is missing neutron-tempest-plugin as a dep plus # test-requirements.txt is nested in a openstack dir and sanity script # doesn't count with such scenario yet 'openstack/neutron-dynamic-routing', # As tests have been migrated to neutron-tempest-plugin: # https://review.opendev.org/#/c/637718/ 'openstack/neutron-vpnaas', # As tests have been migrated to neutron-tempest-plugin: # https://review.opendev.org/c/openstack/neutron-vpnaas/+/695834 'x/valet', # valet is unmaintained now # https://review.opendev.org/c/x/valet/+/638339 'x/kingbird', # kingbird is unmaintained now # https://bugs.launchpad.net/kingbird/+bug/1869722 'x/mogan', # mogan is unmaintained now, remove from the list when this is merged: # https://review.opendev.org/c/x/mogan/+/767718 'x/vmware-nsx-tempest-plugin' # Failing since 2021-08-27 # https://zuul.opendev.org/t/openstack/build # /45f6c8d3c62d4387a70b7b471ec687c8 # Below plugins failing for error in psycopg2 __init__ # ImportError: libpq.so.5: cannot open shared object # file: No such file or directory # https://zuul.opendev.org/t/openstack/build # /b61a48196dfa476d83645aea4853e544/log/job-output.txt#271722 # Failing since 2021-09-08 'x/networking-l2gw-tempest-plugin' 'x/novajoin-tempest-plugin' 'x/ranger-tempest-plugin' 'x/tap-as-a-service-tempest-plugin' 'x/trio2o' ] url = 'https://review.opendev.org/projects/' # This is what a project looks like ''' "openstack-attic/akanda": { "id": "openstack-attic%2Fakanda", "state": "READ_ONLY" }, ''' http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED') retries = retry.Retry(status_forcelist=[500], backoff_factor=1.0) def has_tempest_plugin(proj): try: r = http.request('GET', "https://opendev.org/%s/raw/branch/" "master/setup.cfg" % proj, retries=retries) if r.status == 404: return False except urllib3.exceptions.MaxRetryError as err: # We should not ignore non 404 errors. raise err p = re.compile(r'^tempest\.test_plugins', re.M) if p.findall(r.data.decode('utf-8')): return True else: False if len(sys.argv) > 1 and sys.argv[1] == 'nonactivelist': for non_active_plugin in NON_ACTIVE_LIST: print(non_active_plugin) # We just need NON_ACTIVE_LIST when we use this `nonactivelist` option. # So, this exits here. sys.exit() r = http.request('GET', url, retries=retries) # Gerrit prepends 4 garbage octets to the JSON, in order to counter # cross-site scripting attacks. Therefore we must discard it so the # json library won't choke. content = r.data.decode('utf-8')[4:] projects = sorted(json.loads(content)) # Retrieve projects having no deployment tool repo (such as deb, # puppet, ansible, etc.), infra repos, ui or spec namespace as those # namespaces do not contains tempest plugins. projects_list = [i for i in projects if not ( i.startswith('openstack-dev/') or i.startswith('openstack-infra/') or i.startswith('openstack/ansible-') or i.startswith('openstack/charm-') or i.startswith('openstack/cookbook-openstack-') or i.startswith('openstack/devstack-') or i.startswith('openstack/fuel-') or i.startswith('openstack/deb-') or i.startswith('openstack/puppet-') or i.startswith('openstack/openstack-ansible-') or i.startswith('x/deb-') or i.startswith('x/fuel-') or i.startswith('x/python-') or i.startswith('zuul/') or i.endswith('-ui') or i.endswith('-specs'))] found_plugins = list(filter(has_tempest_plugin, projects_list)) # We have tempest plugins not only in 'openstack/' namespace but also the # other name spaces such as 'airship/', 'x/', etc. # So, we print all of them here. for project in found_plugins: print(project)
37.383117
78
0.70106
2e6084ccc55954e25925ca6df8701f9d4b67bd15
185
py
Python
x_rebirth_station_calculator/station_data/wares/surface_miner_urv_mk2.py
Phipsz/XRebirthStationCalculator
ac31c2f5816be34a7df2d7c4eb4bd5e01f7ff835
[ "MIT" ]
1
2016-04-17T11:00:22.000Z
2016-04-17T11:00:22.000Z
x_rebirth_station_calculator/station_data/wares/surface_miner_urv_mk2.py
Phipsz/XRebirthStationCalculator
ac31c2f5816be34a7df2d7c4eb4bd5e01f7ff835
[ "MIT" ]
null
null
null
x_rebirth_station_calculator/station_data/wares/surface_miner_urv_mk2.py
Phipsz/XRebirthStationCalculator
ac31c2f5816be34a7df2d7c4eb4bd5e01f7ff835
[ "MIT" ]
null
null
null
from x_rebirth_station_calculator.station_data.station_base import Ware names = {'L044': 'Surface Miner URV Mk2', 'L049': 'Tagebau-URV Mk2'} SurfaceMinerURVMk2 = Ware(names)
26.428571
71
0.740541
d9f2ff0aeca975dd1e71c83436607932dcf8a1a6
2,346
py
Python
iriusrisk-python-client-lib/test/test_threats_api.py
iriusrisk/iriusrisk-python-client-lib
4912706cd1e5c0bc555dbc7da02fb64cbeab3b18
[ "Apache-2.0" ]
null
null
null
iriusrisk-python-client-lib/test/test_threats_api.py
iriusrisk/iriusrisk-python-client-lib
4912706cd1e5c0bc555dbc7da02fb64cbeab3b18
[ "Apache-2.0" ]
null
null
null
iriusrisk-python-client-lib/test/test_threats_api.py
iriusrisk/iriusrisk-python-client-lib
4912706cd1e5c0bc555dbc7da02fb64cbeab3b18
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ IriusRisk API Products API # noqa: E501 OpenAPI spec version: 1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import iriusrisk_python_client_lib from iriusrisk_python_client_lib.api.threats_api import ThreatsApi # noqa: E501 from iriusrisk_python_client_lib.rest import ApiException class TestThreatsApi(unittest.TestCase): """ThreatsApi unit test stubs""" def setUp(self): self.api = iriusrisk_python_client_lib.api.threats_api.ThreatsApi() # noqa: E501 def tearDown(self): pass def test_libraries_library_ref_riskpatterns_risk_pattern_ref_usecases_use_case_ref_threats_post(self): """Test case for libraries_library_ref_riskpatterns_risk_pattern_ref_usecases_use_case_ref_threats_post Creates a new threat in a library. # noqa: E501 """ pass def test_libraries_library_ref_riskpatterns_risk_pattern_ref_usecases_use_case_ref_threats_threat_ref_countermeasures_put(self): """Test case for libraries_library_ref_riskpatterns_risk_pattern_ref_usecases_use_case_ref_threats_threat_ref_countermeasures_put Associates a countermeasure to a threat in a risk pattern. # noqa: E501 """ pass def test_libraries_library_ref_riskpatterns_risk_pattern_ref_usecases_use_case_ref_threats_threat_ref_weaknesses_put(self): """Test case for libraries_library_ref_riskpatterns_risk_pattern_ref_usecases_use_case_ref_threats_threat_ref_weaknesses_put Associates weakness to a threat in a risk pattern. # noqa: E501 """ pass def test_libraries_library_ref_riskpatterns_risk_pattern_ref_usecases_use_case_ref_threats_threat_ref_weaknesses_weakness_ref_countermeasures_put(self): """Test case for libraries_library_ref_riskpatterns_risk_pattern_ref_usecases_use_case_ref_threats_threat_ref_weaknesses_weakness_ref_countermeasures_put Associates a countermeasure to a weakness in a risk pattern. # noqa: E501 """ pass def test_products_ref_threats_get(self): """Test case for products_ref_threats_get Gets a list of all threats of a product # noqa: E501 """ pass if __name__ == '__main__': unittest.main()
33.514286
161
0.768542
65f7bba3b5c556a183226c492f4fde582343e814
874
py
Python
gaphor/UML/usecases/extend.py
bertob/gaphor
a1d6f8dd8c878f299980bba6c055436148573274
[ "Apache-2.0" ]
null
null
null
gaphor/UML/usecases/extend.py
bertob/gaphor
a1d6f8dd8c878f299980bba6c055436148573274
[ "Apache-2.0" ]
null
null
null
gaphor/UML/usecases/extend.py
bertob/gaphor
a1d6f8dd8c878f299980bba6c055436148573274
[ "Apache-2.0" ]
null
null
null
"""Use case extension relationship.""" from gaphor import UML from gaphor.diagram.presentation import LinePresentation, Named from gaphor.diagram.shapes import Box, EditableText, Text, draw_arrow_head from gaphor.diagram.support import represents from gaphor.UML.modelfactory import stereotypes_str @represents(UML.Extend) class ExtendItem(LinePresentation, Named): """Use case extension relationship.""" def __init__(self, id=None, model=None): super().__init__(id, model, style={"dash-style": (7.0, 5.0)}) self.shape_middle = Box( Text(text=lambda: stereotypes_str(self.subject, ("extend",))), EditableText(text=lambda: self.subject.name or ""), ) self.watch("subject.appliedStereotype.classifier.name").watch( "subject[NamedElement].name" ) self.draw_head = draw_arrow_head
34.96
74
0.697941
9c265d7af0dc76b2721d6537a935c688e8cd0ab1
835
py
Python
app/core/tests/test_commands.py
Mimicx/recipe-app-api
4aa0ad098d414861b628e50948b741dc56a5847a
[ "MIT" ]
null
null
null
app/core/tests/test_commands.py
Mimicx/recipe-app-api
4aa0ad098d414861b628e50948b741dc56a5847a
[ "MIT" ]
null
null
null
app/core/tests/test_commands.py
Mimicx/recipe-app-api
4aa0ad098d414861b628e50948b741dc56a5847a
[ "MIT" ]
null
null
null
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase class CommandTests(TestCase): def test_wait_for_db_ready(self): """Test Waiting for db when db is available""" with patch('django.db.utils.ConnectionHandler.__getitem__') as gi: gi.return_value = True call_command('wait_for_db') self.assertEqual(gi.call_count, 1) @patch('time.sleep', return_value=True) def test_wait_for_db(self, ts): """ TEST waiting fro db """ with patch('django.db.utils.ConnectionHandler.__getitem__') as gi: gi.side_effect = [OperationalError] * 5 + [True] call_command('wait_for_db') self.assertEqual(gi.call_count, 6)
33.4
74
0.665868
be9a755e995d43297395442ccbd32758e60581f6
1,597
py
Python
jenkjobs/__init__.py
UCL/jenkjobs
63945399310111f35f39b6ae74cfca4d9eb1d75b
[ "Apache-2.0" ]
null
null
null
jenkjobs/__init__.py
UCL/jenkjobs
63945399310111f35f39b6ae74cfca4d9eb1d75b
[ "Apache-2.0" ]
null
null
null
jenkjobs/__init__.py
UCL/jenkjobs
63945399310111f35f39b6ae74cfca4d9eb1d75b
[ "Apache-2.0" ]
null
null
null
def rsdt_doxygen(parser, xml_parent, data): """yaml: junit Publish Doxygen documentation Sameas as jenkins Example:: publishers: - rsdt_doxygen: doxyfile: path to doxyfile relative to workspace. Required. folder: path to working directory relative to workspace. Defaults to "" node: nodename. Defaults to "". keep: whether to keep previous docs. Defaults to false. """ from jenkins_jobs.errors import JenkinsJobsException from xml.etree.ElementTree import SubElement doxygen = SubElement(xml_parent, 'hudson.plugins.doxygen.DoxygenArchiver') if not data['doxyfile']: raise JenkinsJobsException("The path to a doxyfile must be specified.") SubElement(doxygen, 'doxyfilePath').text = data['doxyfile'] SubElement(doxygen, 'runOnChild').text = data.get("node", "") SubElement(doxygen, 'folderWhereYouRunDoxygen').text \ = data.get("folder", "") SubElement(doxygen, 'keepAll').text = data.get("keep", "false") def trac(parser, xml_parent, data): """yaml: trac Adds trac property. Requires trac plugin. Example:: properties: - track: url: url to trac """ from jenkins_jobs.errors import JenkinsJobsException from xml.etree.ElementTree import SubElement trac = SubElement(xml_parent, 'hudson.plugins.trac.TracProjectProperty') if not data['url']: raise JenkinsJobsException("The path to a doxyfile must be specified.") SubElement(trac, 'tracWebsite').text = data['url']
33.978723
79
0.66124
9d8b32e80f2eb829d0b4b554273e23770f8111b4
1,794
py
Python
pymatgen/tests/test_init.py
JiQi535/pymatgen
9dc1a8e3658da846e79c25d55c399c13ec25646b
[ "MIT" ]
null
null
null
pymatgen/tests/test_init.py
JiQi535/pymatgen
9dc1a8e3658da846e79c25d55c399c13ec25646b
[ "MIT" ]
null
null
null
pymatgen/tests/test_init.py
JiQi535/pymatgen
9dc1a8e3658da846e79c25d55c399c13ec25646b
[ "MIT" ]
1
2020-10-20T02:09:02.000Z
2020-10-20T02:09:02.000Z
import os import unittest import warnings import ruamel.yaml as yaml from pymatgen import ( SETTINGS, SETTINGS_FILE, Structure, _load_pmg_settings, get_structure_from_mp, loadfn, ) from pymatgen.io.vasp import Vasprun test_dir = os.path.join(os.path.dirname(__file__), "..", "..", "test_files") class SettingsTestCase(unittest.TestCase): # def test_something(self): # SETTINGS = _load_pmg_settings() # if os.path.exists(SETTINGS_FILE): # with open(SETTINGS_FILE, "rt") as f: # d = yaml.safe_load(f) # for k, v in d.items(): # self.assertEqual(v, SETTINGS[k]) # else: # for k, v in SETTINGS.items(): # self.assertEqual(v, os.environ.get(k)) @unittest.skipIf( not SETTINGS.get("PMG_MAPI_KEY"), "PMG_MAPI_KEY environment variable not set." ) def test_get_structure_from_mp(self): with warnings.catch_warnings(): warnings.simplefilter("ignore") self.assertEqual(get_structure_from_mp("Li2O").formula, "Li2 O1") self.assertRaises(ValueError, get_structure_from_mp, "LiNaKCs") def test_loadfn(self): with warnings.catch_warnings(): warnings.simplefilter("ignore") obj = loadfn(os.path.join(test_dir, "Li2O.cif")) self.assertIsInstance(obj, Structure) obj = loadfn(os.path.join(test_dir, "POSCAR")) self.assertIsInstance(obj, Structure) obj = loadfn(os.path.join(test_dir, "LiFePO4.vasp")) self.assertIsInstance(obj, Structure) obj = loadfn(os.path.join(test_dir, "vasprun.xml")) self.assertIsInstance(obj, Vasprun) if __name__ == "__main__": unittest.main()
31.473684
86
0.618729
b49319025df18d07f9b6b31ca9b68fefc2004be3
1,921
py
Python
CloudBackup/utils.py
520github/CloudBackup
ec4a48f1ba438dbaf45d518c5ae0f192b6e7aa96
[ "Apache-2.0" ]
9
2015-08-23T09:08:14.000Z
2019-04-29T02:08:11.000Z
CloudBackup/utils.py
chineking/CloudBackup
ec4a48f1ba438dbaf45d518c5ae0f192b6e7aa96
[ "Apache-2.0" ]
null
null
null
CloudBackup/utils.py
chineking/CloudBackup
ec4a48f1ba438dbaf45d518c5ae0f192b6e7aa96
[ "Apache-2.0" ]
5
2016-07-19T03:38:10.000Z
2017-12-06T21:13:42.000Z
#!/usr/bin/env python #coding=utf-8 ''' Copyright (c) 2012 chine <qin@qinxuye.me> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 2012-5-1 @author: Chine ''' __author__ = "Chine King" import os import sys import platform import subprocess from CloudBackup.test.settings import EXE_COMPILE def join_path(*path): return '/'.join([p.strip('/') for p in path]) def join_local_path(*path): return os.path.join(*(p.replace('/', os.sep) for p in path)) def get_sys_encoding(): return sys.getfilesystemencoding() def is_windows(): return platform.system() is 'Windows' def win_hide_file(log_file): if isinstance(log_file, str): log_file = log_file.decode('utf-8') if is_windows() and os.path.exists(log_file): try: subprocess.call('attrib +h %s' % log_file.encode('gbk'), shell=True) except UnicodeEncodeError: subprocess.call('attrib +h %s' % log_file.encode('utf-8'), shell=True) get_root_path = lambda: os.path.dirname(__file__) def get_info_path(): if is_windows() and EXE_COMPILE: import win32api exe_name = win32api.GetModuleFileName((win32api.GetModuleHandle(None))) dirname = os.path.dirname(exe_name) return os.path.join(dirname, '.info') else: return os.path.join(get_root_path(), '.info') def ensure_folder_exsits(dirname): if not os.path.exists(dirname): os.makedirs(dirname)
29.106061
82
0.704321
c8ea3272ace7d8f099460af09d5a19a8dbd84349
10,548
py
Python
softgym/envs/flex_env.py
ipab-rad/softgym
eeee770d8720c2cebaa9c5f72408b3340b07d367
[ "BSD-3-Clause" ]
147
2020-11-12T16:48:55.000Z
2022-03-29T02:21:13.000Z
softgym/envs/flex_env.py
ipab-rad/softgym
eeee770d8720c2cebaa9c5f72408b3340b07d367
[ "BSD-3-Clause" ]
28
2020-11-20T23:09:58.000Z
2022-03-31T14:51:16.000Z
softgym/envs/flex_env.py
ipab-rad/softgym
eeee770d8720c2cebaa9c5f72408b3340b07d367
[ "BSD-3-Clause" ]
29
2020-11-12T06:25:19.000Z
2022-03-28T14:10:55.000Z
import os import copy from gym import error import numpy as np import gym from softgym.utils.visualization import save_numpy_as_gif import cv2 import os.path as osp import pickle try: import pyflex except ImportError as e: raise error.DependencyNotInstalled("{}. (You need to first compile the python binding)".format(e)) class FlexEnv(gym.Env): def __init__(self, device_id=-1, headless=False, render=True, horizon=100, camera_width=720, camera_height=720, num_variations=1, action_repeat=8, camera_name='default_camera', deterministic=True, use_cached_states=True, save_cached_states=True, **kwargs): self.camera_params, self.camera_width, self.camera_height, self.camera_name = {}, camera_width, camera_height, camera_name pyflex.init(headless, render, camera_width, camera_height) self.record_video, self.video_path, self.video_name = False, None, None self.metadata = {'render.modes': ['human', 'rgb_array']} if device_id == -1 and 'gpu_id' in os.environ: device_id = int(os.environ['gpu_id']) self.device_id = device_id self.horizon = horizon self.time_step = 0 self.action_repeat = action_repeat self.recording = False self.prev_reward = None self.deterministic = deterministic self.use_cached_states = use_cached_states self.save_cached_states = save_cached_states self.current_config = self.get_default_config() self.current_config_id = None self.cached_configs, self.cached_init_states = None, None self.num_variations = num_variations self.dim_position = 4 self.dim_velocity = 3 self.dim_shape_state = 14 self.particle_num = 0 self.eval_flag = False # version 1 does not support robot, while version 2 does. pyflex_root = os.environ['PYFLEXROOT'] if 'Robotics' in pyflex_root: self.version = 2 else: self.version = 1 def get_cached_configs_and_states(self, cached_states_path, num_variations): """ If the path exists, load from it. Should be a list of (config, states) :param cached_states_path: :return: """ if self.cached_configs is not None and self.cached_init_states is not None and len(self.cached_configs) == num_variations: return self.cached_configs, self.cached_init_states if not cached_states_path.startswith('/'): cur_dir = osp.dirname(osp.abspath(__file__)) cached_states_path = osp.join(cur_dir, '../cached_initial_states', cached_states_path) if self.use_cached_states and osp.exists(cached_states_path): # Load from cached file with open(cached_states_path, "rb") as handle: self.cached_configs, self.cached_init_states = pickle.load(handle) print('{} config and state pairs loaded from {}'.format(len(self.cached_init_states), cached_states_path)) if len(self.cached_configs) == num_variations: return self.cached_configs, self.cached_init_states self.cached_configs, self.cached_init_states = self.generate_env_variation(num_variations) if self.save_cached_states: with open(cached_states_path, 'wb') as handle: pickle.dump((self.cached_configs, self.cached_init_states), handle, protocol=pickle.HIGHEST_PROTOCOL) print('{} config and state pairs generated and saved to {}'.format(len(self.cached_init_states), cached_states_path)) return self.cached_configs, self.cached_init_states def get_current_config(self): return self.current_config def update_camera(self, camera_name, camera_param=None): """ :param camera_name: The camera_name to switch to :param camera_param: None if only switching cameras. Otherwise, should be a dictionary :return: """ if camera_param is not None: self.camera_params[camera_name] = camera_param else: camera_param = self.camera_params[camera_name] pyflex.set_camera_params( np.array([*camera_param['pos'], *camera_param['angle'], camera_param['width'], camera_param['height']])) def get_state(self): pos = pyflex.get_positions() vel = pyflex.get_velocities() shape_pos = pyflex.get_shape_states() phase = pyflex.get_phases() camera_params = copy.deepcopy(self.camera_params) return {'particle_pos': pos, 'particle_vel': vel, 'shape_pos': shape_pos, 'phase': phase, 'camera_params': camera_params, 'config_id': self.current_config_id} def set_state(self, state_dict): pyflex.set_positions(state_dict['particle_pos']) pyflex.set_velocities(state_dict['particle_vel']) pyflex.set_shape_states(state_dict['shape_pos']) pyflex.set_phases(state_dict['phase']) self.camera_params = copy.deepcopy(state_dict['camera_params']) self.update_camera(self.camera_name) def close(self): pyflex.clean() def get_colors(self): ''' Overload the group parameters as colors also ''' groups = pyflex.get_groups() return groups def set_colors(self, colors): pyflex.set_groups(colors) def start_record(self): self.video_frames = [] self.recording = True def end_record(self, video_path=None, **kwargs): if not self.recording: print('function end_record: Error! Not recording video') self.recording = False if video_path is not None: save_numpy_as_gif(np.array(self.video_frames), video_path, **kwargs) del self.video_frames def reset(self, config=None, initial_state=None, config_id=None): if config is None: if config_id is None: if self.eval_flag: eval_beg = int(0.8 * len(self.cached_configs)) config_id = np.random.randint(low=eval_beg, high=len(self.cached_configs)) if not self.deterministic else eval_beg else: train_high = int(0.8 * len(self.cached_configs)) config_id = np.random.randint(low=0, high=max(train_high, 1)) if not self.deterministic else 0 self.current_config = self.cached_configs[config_id] self.current_config_id = config_id self.set_scene(self.cached_configs[config_id], self.cached_init_states[config_id]) else: self.current_config = config self.set_scene(config, initial_state) self.particle_num = pyflex.get_n_particles() self.prev_reward = 0. self.time_step = 0 obs = self._reset() if self.recording: self.video_frames.append(self.render(mode='rgb_array')) return obs def step(self, action, record_continuous_video=False, img_size=None): """ If record_continuous_video is set to True, will record an image for each sub-step""" frames = [] for i in range(self.action_repeat): self._step(action) if record_continuous_video and i % 2 == 0: # No need to record each step frames.append(self.get_image(img_size, img_size)) obs = self._get_obs() reward = self.compute_reward(action, obs, set_prev_reward=True) info = self._get_info() if self.recording: self.video_frames.append(self.render(mode='rgb_array')) self.time_step += 1 done = False if self.time_step >= self.horizon: done = True if record_continuous_video: info['flex_env_recorded_frames'] = frames return obs, reward, done, info def initialize_camera(self): """ This function sets the postion and orientation of the camera camera_pos: np.ndarray (3x1). (x,y,z) coordinate of the camera camera_angle: np.ndarray (3x1). (x,y,z) angle of the camera (in degree). Note: to set camera, you need 1) implement this function in your environement, set value of self.camera_pos and self.camera_angle. 2) add the self.camera_pos and self.camera_angle to your scene parameters, and pass it when initializing your scene. 3) implement the CenterCamera function in your scene.h file. Pls see a sample usage in pour_water.py and softgym_PourWater.h if you do not want to set the camera, you can just not implement CenterCamera in your scene.h file, and pass no camera params to your scene. """ raise NotImplementedError def render(self, mode='rgb_array'): if mode == 'rgb_array': img = pyflex.render() width, height = self.camera_params['default_camera']['width'], self.camera_params['default_camera']['height'] img = img.reshape(height, width, 4)[::-1, :, :3] # Need to reverse the height dimension return img elif mode == 'human': raise NotImplementedError def get_image(self, width=720, height=720): """ use pyflex.render to get a rendered image. """ img = self.render(mode='rgb_array') img = img.astype(np.uint8) if width != img.shape[0] or height != img.shape[1]: img = cv2.resize(img, (width, height)) return img def set_scene(self, config, state=None): """ Set up the flex scene """ raise NotImplementedError def get_default_config(self): """ Generate the default config of the environment scenes""" raise NotImplementedError def generate_env_variation(self, num_variations, **kwargs): """ Generate a list of configs and states :return: """ raise NotImplementedError def compute_reward(self, action=None, obs=None, set_prev_reward=False): """ set_prev_reward is used for calculate delta rewards""" raise NotImplementedError def _get_obs(self): raise NotImplementedError def _get_info(self): raise NotImplementedError def _reset(self): raise NotImplementedError def _step(self, action): raise NotImplementedError def _seed(self): pass
39.505618
134
0.639173
fd690743d6cf0b6844287fe92101ded8d030480a
2,486
py
Python
Accuracy.py
ChrisZeThird/Image-Recognition-without-using-Neural-Network
305b78b23cd1af2f60384180b1a0d9323e40c427
[ "Apache-2.0" ]
1
2021-09-14T17:19:38.000Z
2021-09-14T17:19:38.000Z
Accuracy.py
ChrisZeThird/Image-Recognition-without-using-Neural-Network
305b78b23cd1af2f60384180b1a0d9323e40c427
[ "Apache-2.0" ]
null
null
null
Accuracy.py
ChrisZeThird/Image-Recognition-without-using-Neural-Network
305b78b23cd1af2f60384180b1a0d9323e40c427
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Sep 14 15:25:24 2021 @author: ChrisZeThird """ """Separated file, meant to calculate the accuracy of the PictureRecognition programm, for different values of: - K : the size of the batch - delta : the precision The goal is to plot thanks to matplotlib, the evolution of the accuracy depending on K and delta, in order to maximise it.""" import matplotlib.pyplot as plt import PictureRecognition as pr import Image_Recognition_MNIST as irm """Accuracy calculation""" def accuracy(x,y,K,delta): """Input -> x : list of numpy array, contains the pictures y : numpy array, contains the labels K : integer, gives the size of the batch studied delta : flot, precision given by the user, with delta in [0,1] Output -> float, gives the accuracy of the programm""" R = pr.Recognition(x, y, 28, 28, K, delta) result = [0]*K for k in range(K): p = R.prediction(x[k]) if p == y[k,0]: result[k] = 1 return sum(result)/K """Variable call""" x = irm.x y = irm.y """PLotting of the different accuracy""" delta_list = [0.70, 0.80, 0.90] #list of different threshold values K_list = [100, 200, 500, 1000] #list of different size of batches acc_list100 = [] acc_list200 = [] acc_list500 = [] acc_list1000 = [] K0 = 100 K1 = 200 K2 = 500 K3 = 1000 for n in range(3): delta0 = delta_list[n] a0 = accuracy(x, y, K0, delta0) a1 = accuracy(x, y, K1, delta0) a2 = accuracy(x, y, K2, delta0) a3 = accuracy(x, y, K3, delta0) acc_list100.append(a0) acc_list200.append(a1) acc_list500.append(a2) acc_list1000.append(a3) #setting plot fig = plt.figure(figsize=(16,9)) ax1 = fig.add_subplot(2, 2, 1) ax2 = fig.add_subplot(2, 2, 2) ax3 = fig.add_subplot(2, 2, 3) ax4 = fig.add_subplot(2, 2, 4) ax1.set_ylabel('Accuracy', fontsize=9) ax1.set_xlabel('Threshold', labelpad = 9) ax1.bar(delta_list,acc_list1000) ax2.set_ylabel('Accuracy', fontsize=9) ax2.set_xlabel('Threshold', labelpad = 9) ax2.plot(delta_list,acc_list200) ax3.set_ylabel('Accuracy', fontsize=9) ax3.set_xlabel('Threshold', labelpad = 9) ax3.plot(delta_list,acc_list500) ax4.set_ylabel('Accuracy', fontsize=9) ax4.set_xlabel('Threshold', labelpad = 9) ax4.plot(delta_list,acc_list1000) plt.show()
25.628866
129
0.628721
90889b450d7bf8d6c7ebe763ef2667c8c26640b0
8,821
py
Python
intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_system_replacemsggroup_nntp.py
Stienvdh/statrick
7b092fc42171e226718a70a285a4b323f2f395ad
[ "MIT" ]
null
null
null
intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_system_replacemsggroup_nntp.py
Stienvdh/statrick
7b092fc42171e226718a70a285a4b323f2f395ad
[ "MIT" ]
null
null
null
intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_system_replacemsggroup_nntp.py
Stienvdh/statrick
7b092fc42171e226718a70a285a4b323f2f395ad
[ "MIT" ]
null
null
null
#!/usr/bin/python from __future__ import absolute_import, division, print_function # Copyright 2019-2020 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fmgr_system_replacemsggroup_nntp short_description: Replacement message table entries. description: - This module is able to configure a FortiManager device. - Examples include all parameters and values which need to be adjusted to data sources before usage. version_added: "2.10" author: - Link Zheng (@chillancezen) - Jie Xue (@JieX19) - Frank Shen (@fshen01) - Hongbin Lu (@fgtdev-hblu) notes: - Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work. - To create or update an object, use state present directive. - To delete an object, use state absent directive. - Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded options: bypass_validation: description: only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters required: false type: bool default: false workspace_locking_adom: description: the adom to lock for FortiManager running in workspace mode, the value can be global and others including root required: false type: str workspace_locking_timeout: description: the maximum time in seconds to wait for other user to release the workspace lock required: false type: int default: 300 state: description: the directive to create, update or delete an object type: str required: true choices: - present - absent rc_succeeded: description: the rc codes list with which the conditions to succeed will be overriden type: list required: false rc_failed: description: the rc codes list with which the conditions to fail will be overriden type: list required: false adom: description: the parameter (adom) in requested url type: str required: true replacemsg-group: description: the parameter (replacemsg-group) in requested url type: str required: true system_replacemsggroup_nntp: description: the top level parameters set required: false type: dict suboptions: buffer: type: str description: 'Message string.' format: type: str description: 'Format flag.' choices: - 'none' - 'text' - 'html' - 'wml' header: type: str description: 'Header flag.' choices: - 'none' - 'http' - '8bit' msg-type: type: str description: 'Message type.' ''' EXAMPLES = ''' - hosts: fortimanager-inventory collections: - fortinet.fortimanager connection: httpapi vars: ansible_httpapi_use_ssl: True ansible_httpapi_validate_certs: False ansible_httpapi_port: 443 tasks: - name: Replacement message table entries. fmgr_system_replacemsggroup_nntp: bypass_validation: False workspace_locking_adom: <value in [global, custom adom including root]> workspace_locking_timeout: 300 rc_succeeded: [0, -2, -3, ...] rc_failed: [-2, -3, ...] adom: <your own value> replacemsg-group: <your own value> state: <value in [present, absent]> system_replacemsggroup_nntp: buffer: <value of string> format: <value in [none, text, html, ...]> header: <value in [none, http, 8bit]> msg-type: <value of string> ''' RETURN = ''' request_url: description: The full url requested returned: always type: str sample: /sys/login/user response_code: description: The status of api request returned: always type: int sample: 0 response_message: description: The descriptive message of the api response type: str returned: always sample: OK. ''' from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.connection import Connection from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import check_galaxy_version from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import check_parameter_bypass def main(): jrpc_urls = [ '/pm/config/adom/{adom}/obj/system/replacemsg-group/{replacemsg-group}/nntp', '/pm/config/global/obj/system/replacemsg-group/{replacemsg-group}/nntp' ] perobject_jrpc_urls = [ '/pm/config/adom/{adom}/obj/system/replacemsg-group/{replacemsg-group}/nntp/{nntp}', '/pm/config/global/obj/system/replacemsg-group/{replacemsg-group}/nntp/{nntp}' ] url_params = ['adom', 'replacemsg-group'] module_primary_key = 'msg-type' module_arg_spec = { 'bypass_validation': { 'type': 'bool', 'required': False, 'default': False }, 'workspace_locking_adom': { 'type': 'str', 'required': False }, 'workspace_locking_timeout': { 'type': 'int', 'required': False, 'default': 300 }, 'rc_succeeded': { 'required': False, 'type': 'list' }, 'rc_failed': { 'required': False, 'type': 'list' }, 'state': { 'type': 'str', 'required': True, 'choices': [ 'present', 'absent' ] }, 'adom': { 'required': True, 'type': 'str' }, 'replacemsg-group': { 'required': True, 'type': 'str' }, 'system_replacemsggroup_nntp': { 'required': False, 'type': 'dict', 'options': { 'buffer': { 'required': False, 'type': 'str' }, 'format': { 'required': False, 'choices': [ 'none', 'text', 'html', 'wml' ], 'type': 'str' }, 'header': { 'required': False, 'choices': [ 'none', 'http', '8bit' ], 'type': 'str' }, 'msg-type': { 'required': True, 'type': 'str' } } } } params_validation_blob = [] check_galaxy_version(module_arg_spec) module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'system_replacemsggroup_nntp'), supports_check_mode=False) fmgr = None if module._socket_path: connection = Connection(module._socket_path) fmgr = NAPIManager(jrpc_urls, perobject_jrpc_urls, module_primary_key, url_params, module, connection, top_level_schema_name='data') fmgr.validate_parameters(params_validation_blob) fmgr.process_curd() else: module.fail_json(msg='MUST RUN IN HTTPAPI MODE') module.exit_json(meta=module.params) if __name__ == '__main__': main()
32.430147
153
0.578052
de7d5f726ff7202c0a52af62d0fa46f24ed034ca
4,644
py
Python
src/faro/proto/proto_types.py
amanvell/faro
2c4e5b86406937e1dd3fa9f339cfbca2325d98d6
[ "MIT" ]
null
null
null
src/faro/proto/proto_types.py
amanvell/faro
2c4e5b86406937e1dd3fa9f339cfbca2325d98d6
[ "MIT" ]
null
null
null
src/faro/proto/proto_types.py
amanvell/faro
2c4e5b86406937e1dd3fa9f339cfbca2325d98d6
[ "MIT" ]
null
null
null
''' MIT License Copyright 2019 Oak Ridge National Laboratory Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Created on Jul 26, 2018 @author: bolme ''' import numpy as np import pyvision as pv import faro.proto.geometry_pb2 as geometry import faro.proto.image_pb2 as image import faro.proto.face_service_pb2 as fsd def image_np2proto(im): '''Convert a numpy array to a protobuf format.''' #if isinstance(im,pv.Image): # im = im.asOpenCV2()[:,:,::-1] # Convert bgr to rgb #im = np.array(im,dtype=np.uint8) #print('dtype',im.dtype,im.shape,im) assert im.dtype == np.uint8 # Currently only uint8 supported result = image.Image() result.width = im.shape[1] result.height = im.shape[0] if len(im.shape) > 2: result.channels = im.shape[2] else: result.channels = 1 result.type = image.Image.UINT8 result.data = im.tostring() return result def image_pv2proto(im): '''Convert a numpy array to a protobuf format.''' assert isinstance(im,pv.Image) im = im.asOpenCV2()[:,:,::-1] # Convert bgr to rgb assert im.dtype == np.uint8 # Currently only uint8 supported result = image.Image() result.width = im.shape[1] result.height = im.shape[0] result.channels = im.shape[2] result.type = image.Image.UINT8 result.data = im.tostring() return result def image_proto2np(pb_data): '''Convert a protobuf image to a numpy array.''' shape = pb_data.height,pb_data.width,pb_data.channels assert pb_data.type == image.Image.UINT8 # Currently only uint8 supported data = np.fromstring(pb_data.data,dtype=np.uint8) data.shape = shape return data def image_proto2pv(pb_data): '''Convert a protobuf image to a numpy array.''' shape = pb_data.height,pb_data.width,pb_data.channels assert pb_data.type == image.Image.UINT8 # Currently only uint8 supported data = np.fromstring(pb_data.data,dtype=np.uint8) data.shape = shape if shape[2] == 3: data = pv.Image(data[:,:,::-1]) # convert rgb to bgr elif shape[2] == 1: data = pv.Image(1.0*data[:,:,0].T) # convert rgb to bgr else: raise ValueError("Unhandled image format. shape=%s type=%s"%(shape,data.dtype)) return data def detection_val2proto(score=-1000000,x=0,y=0,width=0,height=0): det = fsd.FaceDetection() det.score = score det.location.x = x det.location.y = y det.location.width = width det.location.height = height return det def rect_val2proto(x=0,y=0,width=0,height=0): ''' Examples: createRect(x,y,width,height) ''' location = geometry.Rect() location.x = x location.y = y location.width = width location.height = height return location def rect_proto2pv(proto_rect): return pv.Rect(proto_rect.x, proto_rect.y, proto_rect.width, proto_rect.height) def vector_np2proto(vec): protovec = geometry.Vector() assert len(vec.shape) == 1 protovec.data.extend(vec) return protovec def vector_proto2np(protovec): vec = np.array(protovec.data,dtype=np.float32) return vec def matrix_np2proto(mat): result = geometry.Matrix() for row in mat: result.rows.add().CopyFrom(vector_np2proto(row)) return result #protovec = geometry.Vector() #assert len(vec.shape) == 1 #protovec.length=vec.shape[0] #protovec.data.extend(vec) #return protovec def matrix_proto2np(protomat): mat = [] for row in protomat.rows: vec = vector_proto2np(row) mat.append(vec) mat = np.array(mat,dtype=np.float32) return mat
30.96
88
0.687123
1050627f9c9c549b5d570ecb31c9941c2a9a19f1
4,062
py
Python
tests/test_UniformMultiLayerLeverDrive2d_historic.py
tdegeus/FrictionQPotGooseFEM
094d3dbe3a458b56203e5151157b26ca5bb6b497
[ "MIT" ]
null
null
null
tests/test_UniformMultiLayerLeverDrive2d_historic.py
tdegeus/FrictionQPotGooseFEM
094d3dbe3a458b56203e5151157b26ca5bb6b497
[ "MIT" ]
null
null
null
tests/test_UniformMultiLayerLeverDrive2d_historic.py
tdegeus/FrictionQPotGooseFEM
094d3dbe3a458b56203e5151157b26ca5bb6b497
[ "MIT" ]
null
null
null
import os import unittest import FrictionQPotFEM import GMatElastoPlasticQPot.Cartesian2d as GMat import GooseFEM import h5py import numpy as np import prrng class test_UniformMultiLayerIndividualDrive2d(unittest.TestCase): """ Tests """ def test_historic(self): """ A simple historic run. Thanks to prrng this test can be run on any platform, but also from any API (Python or C++). """ # Define a geometry N = 3**2 h = np.pi L = h * float(N) mesh = GooseFEM.Mesh.Quad4.Regular(N, 11, h) coor = mesh.coor() conn = mesh.conn() dofs = mesh.dofs() elem = mesh.elementgrid() height = [1.5 * h, 3.5 * h, 5.5 * h, 7.5 * h, 9.5 * h] active = [[False, False], [False, False], [True, False], [False, False], [True, False]] layers = [ elem[:3, :].ravel(), elem[3, :].ravel(), elem[4:7, :].ravel(), elem[7, :].ravel(), elem[8:, :].ravel(), ] layers = [np.sort(i) for i in layers] left = mesh.nodesLeftOpenEdge() right = mesh.nodesRightOpenEdge() dofs[left] = dofs[right] top = mesh.nodesTopEdge() bottom = mesh.nodesBottomEdge() np.concatenate((dofs[bottom].ravel(), dofs[top].ravel())) system = FrictionQPotFEM.UniformMultiLayerLeverDrive2d.System( coor=coor, conn=conn, dofs=dofs, iip=dofs[mesh.nodesBottomEdge(), :].ravel(), elem=layers, node=[np.unique(conn[i, :]) for i in layers], layer_is_plastic=[False, True, False, True, False], ) nelas = system.elastic().size nplas = system.plastic().size # Parameters c = 1.0 G = 1.0 K = 10.0 * G rho = G / c**2.0 qL = 2.0 * np.pi / L qh = 2.0 * np.pi / h alpha = np.sqrt(2.0) * qL * c * rho dt = 1.0 / (c * qh) / 10.0 generators = prrng.pcg32_array(np.arange(nplas), np.zeros(nplas)) epsy = np.hstack((generators.random([1]), generators.weibull([1000], k=2.0))) epsy *= 1.0e-3 epsy += 1.0e-5 epsy = np.cumsum(epsy, 1) # Initialise system system.setMassMatrix(rho * np.ones(mesh.nelem())) system.setDampingMatrix(alpha * np.ones(mesh.nelem())) system.setElastic(K * np.ones(nelas), G * np.ones(nelas)) system.setPlastic(K * np.ones(nplas), G * np.ones(nplas), epsy) system.setDt(dt) system.layerSetTargetActive(active) system.layerSetDriveStiffness(1e-3) system.setLeverProperties(12 * h, height) # Drive system.initEventDriven(0.1, active) ninc = 20 collect_Eps = np.zeros(ninc) collect_Sig = np.zeros(ninc) collect_Sig_plastic = np.zeros(ninc) quad = system.quad() dV = quad.AsTensor(2, quad.dV()) for inc in range(ninc): if inc % 2 == 0: system.eventDrivenStep(deps=1e-5, kick=True, iterative=True, yield_element=False) system.minimise() else: system.eventDrivenStep(deps=1e-5, kick=False, iterative=True, yield_element=False) Epsbar = np.average(system.Eps(), weights=dV, axis=(0, 1)) Sigbar = np.average(system.Sig(), weights=dV, axis=(0, 1)) collect_Eps[inc] = GMat.Epsd(Epsbar) collect_Sig[inc] = GMat.Sigd(Sigbar) collect_Sig_plastic[inc] = GMat.Sigd(np.mean(system.plastic_Sig(), axis=(0, 1))) with h5py.File(os.path.splitext(__file__)[0] + ".h5") as file: self.assertTrue(np.allclose(collect_Eps, file["Eps"][...])) self.assertTrue(np.allclose(collect_Sig, file["Sig"][...])) self.assertTrue(np.allclose(collect_Sig_plastic, file["Sig_plastic"][...])) self.assertTrue(np.allclose(system.u(), file["u_last"][...])) if __name__ == "__main__": unittest.main()
31.007634
100
0.552437
f816dbcf18adf40376ffcce2541c413d6d5d3ddc
1,717
py
Python
clipl/scripts/csv2root.py
thomas-mueller/clipl
4c8c61dd4a09fee6ad2ec65f3baa6854cf9cce69
[ "MIT" ]
null
null
null
clipl/scripts/csv2root.py
thomas-mueller/clipl
4c8c61dd4a09fee6ad2ec65f3baa6854cf9cce69
[ "MIT" ]
null
null
null
clipl/scripts/csv2root.py
thomas-mueller/clipl
4c8c61dd4a09fee6ad2ec65f3baa6854cf9cce69
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import clipl.utility.logger as logger log = logging.getLogger(__name__) import argparse import numpy import os import ROOT ROOT.gROOT.SetBatch(True) ROOT.PyConfig.IgnoreCommandLineOptions = True ROOT.gErrorIgnoreLevel = ROOT.kError import clipl.utility.tfilecontextmanager as tfilecontextmanager import clipl.utility.tools as tools def csv2root(args): csv_filename = args[0] variable_list = args[1] root_filename = os.path.splitext(csv_filename)[0]+".root" with tfilecontextmanager.TFileContextManager(root_filename, "RECREATE") as root_file: tree = ROOT.TTree("tree", csv_filename) tree.ReadFile(csv_filename, variable_list) tree.Write(tree.GetName()) log.info("Converted {csv} to {root}:tree.".format(csv=csv_filename, root=root_filename)) def main(): parser = argparse.ArgumentParser(description="Convert CSV files to ROOT files.", parents=[logger.loggingParser]) parser.add_argument("files", nargs="+", help="CSV Files.") parser.add_argument("--variable-lists", nargs="+", default=[""], help="Variable lists (in case the CSV has no header), e.g. var1:var2:... [Default: %(default)s]") parser.add_argument("-n", "--n-processes", type=int, default=1, help="Number of (parallel) processes. [Default: %(default)s]") args = parser.parse_args() logger.initLogger(args) if len(args.variable_lists) == 1: args.variable_lists = args.variable_lists * len(args.files) tools.parallelize(csv2root, zip(args.files, args.variable_lists), n_processes=args.n_processes, description="Converting") if __name__ == "__main__": main()
31.218182
122
0.704718
97fd67068c265539675a46166cee4a9aff92d7c7
7,117
py
Python
modules/tools/open_space_visualization/auto_param_tuning.py
seeclong/apollo
99c8afb5ebcae2a3c9359a156a957ff03944b27b
[ "Apache-2.0" ]
27
2019-04-06T02:27:14.000Z
2021-11-27T13:47:06.000Z
modules/tools/open_space_visualization/auto_param_tuning.py
seeclong/apollo
99c8afb5ebcae2a3c9359a156a957ff03944b27b
[ "Apache-2.0" ]
7
2021-03-10T18:14:25.000Z
2022-02-27T04:46:46.000Z
modules/tools/open_space_visualization/auto_param_tuning.py
seeclong/apollo
99c8afb5ebcae2a3c9359a156a957ff03944b27b
[ "Apache-2.0" ]
38
2019-04-15T10:58:37.000Z
2022-01-27T08:52:39.000Z
#!/usr/bin/env python ############################################################################### # Copyright 2019 The Apollo Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### import random import argparse from google.protobuf.internal import decoder from google.protobuf.internal import encoder import hybrid_a_star_visualizer import distance_approach_visualizer import common.proto_utils as proto_utils from modules.planning.proto import planner_open_space_config_pb2 random.seed(99999) rand_num = 1000 original_file_path = "/apollo/modules/planning/conf/planner_open_space_config.pb.txt" optimal_file_path = "/apollo/modules/planning/conf/optimal_planner_open_space_config_-8_4.pb.txt" # tunning_object = "coarse_trajectory" tunning_object = "smooth_trajectory" def load_open_space_protobuf(filename): open_space_params = planner_open_space_config_pb2.PlannerOpenSpaceConfig() proto_utils.get_pb_from_text_file(filename, open_space_params) return open_space_params def GetParamsForTunning(tunning_object): param_names_and_range = [] if tunning_object == "coarse_trajectory": param_names_and_range.append( ("warm_start_config.traj_forward_penalty", 2.0)) param_names_and_range.append( ("warm_start_config.traj_back_penalty", 2.0)) param_names_and_range.append( ("warm_start_config.traj_gear_switch_penalty", 2.0)) param_names_and_range.append( ("warm_start_config.traj_steer_penalty", 3.0)) param_names_and_range.append( ("warm_start_config.traj_steer_change_penalty", 2.0)) elif tunning_object == "smooth_trajectory": param_names_and_range.append( ("distance_approach_config.weight_steer", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_a", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_steer_rate", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_a_rate", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_x", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_y", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_phi", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_v", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_steer_stitching", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_a_stitching", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_first_order_time", 2.0)) param_names_and_range.append( ("distance_approach_config.weight_second_order_time", 2.0)) return param_names_and_range def RandSampling(param_names_and_range, origin_open_space_params): params_lists = [] for iter in range(0, rand_num): rand_params = planner_open_space_config_pb2.PlannerOpenSpaceConfig() rand_params.CopyFrom(origin_open_space_params) for param in param_names_and_range: exec("rand_params." + str(param[0]) + "=random.uniform(max(rand_params." + str(param[0]) + " - " + str(param[1]) + ",0.0)" + " ,rand_params." + str(param[0]) + " + " + str(param[1]) + ")") params_lists.append(rand_params) return params_lists def TestingParams(params_lists, tunning_object): key_to_evaluations = {} for iter in range(0, len(params_lists)): evaluation = ParamEvaluation(params_lists[iter], tunning_object) key_to_evaluations[iter] = evaluation return key_to_evaluations def ParamEvaluation(params, tunning_object): proto_utils.write_pb_to_text_file(params, original_file_path) if tunning_object == "coarse_trajectory": visualize_flag = False success, x_out, y_out, phi_out, v_out, a_out, steer_out, planning_time = hybrid_a_star_visualizer.HybridAStarPlan( visualize_flag) if not success: return float('inf') else: return planning_time elif tunning_object == "smooth_trajectory": visualize_flag = False success, opt_x_out, opt_y_out, opt_phi_out, opt_v_out, opt_a_out, opt_steer_out, opt_time_out, planning_time = distance_approach_visualizer.SmoothTrajectory( visualize_flag) if not success: return float('inf') else: return planning_time def GetOptimalParams(params_lists, key_to_evaluations): tmp = [] for key, value in key_to_evaluations.items(): tmptuple = (value, key) tmp.append(tmptuple) tmp = sorted(tmp) optimal_params = params_lists[tmp[0][1]] optimal_evaluation = tmp[0][0] return optimal_params, optimal_evaluation if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument( "--InputConfig", help="original conf address to be tuned", type=str, default=original_file_path) parser.add_argument("--OutputConfig", help="tuned conf address", type=str, default=optimal_file_path) parser.add_argument("--TunningObject", help="algorithm to be tuned", type=str, default=tunning_object) args = parser.parse_args() original_file_path = args.InputConfig optimal_file_path = args.OutputConfig tunning_object = args.TunningObject param_names_and_range = GetParamsForTunning(tunning_object) origin_open_space_params = load_open_space_protobuf(original_file_path) params_lists = RandSampling( param_names_and_range, origin_open_space_params) key_to_evaluations = TestingParams(params_lists, tunning_object) optimal_params, optimal_evaluation = GetOptimalParams( params_lists, key_to_evaluations) origin_evaluation = ParamEvaluation( origin_open_space_params, tunning_object) print("optimal_evaluation is " + str(optimal_evaluation)) print("origin_evaluation is " + str(origin_evaluation)) improvement_percentage = ( origin_evaluation - optimal_evaluation) / origin_evaluation print("improvement_percentage is " + str(improvement_percentage)) proto_utils.write_pb_to_text_file(optimal_params, optimal_file_path) proto_utils.write_pb_to_text_file( origin_open_space_params, original_file_path)
42.616766
165
0.701138
22e994ea03651bba511bb46735cb31fe285bb524
7,207
py
Python
judger.py
SkyErnest/legal_basis
7fc2aaffa54c6bc6fc8713e5755edff9b3d296e4
[ "BSD-3-Clause" ]
null
null
null
judger.py
SkyErnest/legal_basis
7fc2aaffa54c6bc6fc8713e5755edff9b3d296e4
[ "BSD-3-Clause" ]
null
null
null
judger.py
SkyErnest/legal_basis
7fc2aaffa54c6bc6fc8713e5755edff9b3d296e4
[ "BSD-3-Clause" ]
null
null
null
from math import log import os import json import numpy as np class Judger: # Initialize Judger, with the path of accusation list and law articles list def __init__(self, accusation_path, law_path): self.accu_dic = {} f = open(accusation_path, "r",encoding='utf-8') self.task1_cnt = 0 for line in f: self.task1_cnt += 1 self.accu_dic[line[:-1]] = self.task1_cnt self.law_dic = {} f = open(law_path, "r",encoding='utf-8') self.task2_cnt = 0 for line in f: self.task2_cnt += 1 self.law_dic[int(line[:-1])] = self.task2_cnt # Format the result generated by the Predictor class @staticmethod def format_result(result): rex = {"accusation": [], "articles": [], "imprisonment": -3} res_acc = [] for x in result["accusation"]: if not (x is None): res_acc.append(int(x)) rex["accusation"] = res_acc if not (result["imprisonment"] is None): rex["imprisonment"] = int(result["imprisonment"]) else: rex["imprisonment"] = -3 res_art = [] for x in result["articles"]: if not (x is None): res_art.append(int(x)) rex["articles"] = res_art return rex # Gen new results according to the truth and users output def gen_new_result(self, result, truth, label): s1 = set(label["accusation"]) s2 = set() for name in truth["accusation"]: s2.add(self.accu_dic[name.replace("[", "").replace("]", "")]) for a in range(0, self.task1_cnt): in1 = (a + 1) in s1 in2 = (a + 1) in s2 if in1: if in2: result[0][a]["TP"] += 1 else: result[0][a]["FP"] += 1 else: if in2: result[0][a]["FN"] += 1 else: result[0][a]["TN"] += 1 s1 = set(label["articles"]) s2 = set() for name in truth["relevant_articles"]: s2.add(self.law_dic[name]) for a in range(0, self.task2_cnt): in1 = (a + 1) in s1 in2 = (a + 1) in s2 if in1: if in2: result[1][a]["TP"] += 1 else: result[1][a]["FP"] += 1 else: if in2: result[1][a]["FN"] += 1 else: result[1][a]["TN"] += 1 result[2]["cnt"] += 1 sc = 0 if truth["term_of_imprisonment"]["death_penalty"]: if label["imprisonment"] == -2: sc = 1 elif truth["term_of_imprisonment"]["life_imprisonment"]: if label["imprisonment"] == -1: sc = 1 else: if label["imprisonment"] < 0: sc = 0 else: v1 = truth["term_of_imprisonment"]["imprisonment"] v2 = label["imprisonment"] v = abs(log(v1 + 1) - log(v2 + 1)) if v <= 0.2: sc = 1 elif v <= 0.4: sc = 0.8 elif v <= 0.6: sc = 0.6 elif v <= 0.8: sc = 0.4 elif v <= 1.0: sc = 0.2 else: sc = 0 sc = sc * 1.0 result[2]["score"] += sc return result # Calculate precision, recall and f1 value # According to https://github.com/dice-group/gerbil/wiki/Precision,-Recall-and-F1-measure @staticmethod def get_value(res): if res["TP"] == 0: if res["FP"] == 0 and res["FN"] == 0: precision = 1.0 recall = 1.0 f1 = 1.0 else: precision = 0.0 recall = 0.0 f1 = 0.0 else: precision = 1.0 * res["TP"] / (res["TP"] + res["FP"]) recall = 1.0 * res["TP"] / (res["TP"] + res["FN"]) f1 = 2 * precision * recall / (precision + recall) return precision, recall, f1 # Generate score for the first two subtasks def gen_score(self, arr): sumf = 0 y = {"TP": 0, "FP": 0, "FN": 0, "TN": 0} for x in arr: p, r, f = self.get_value(x) sumf += f for z in x.keys(): y[z] += x[z] _, __, f_ = self.get_value(y) return (f_ + sumf * 1.0 / len(arr)) / 2.0 # Generatue all scores def get_score(self, result): s1 = self.gen_score(result[0]) s2 = self.gen_score(result[1]) s3 = 1.0 * result[2]["score"] / result[2]["cnt"] return [s1, s2, s3] # Test with ground truth path and the user's output path def test(self, truth_path, output_path): cnt = 0 result = [[], [], {}] for a in range(0, self.task1_cnt): result[0].append({"TP": 0, "FP": 0, "TN": 0, "FN": 0}) for a in range(0, self.task2_cnt): result[1].append({"TP": 0, "FP": 0, "TN": 0, "FN": 0}) result[2] = {"cnt": 0, "score": 0} inf = open(truth_path, "r",encoding='utf-8') ouf = open(output_path, "r",encoding='utf-8') for line in inf: ground_truth = json.loads(line)["meta"] user_output = json.loads(ouf.readline()) cnt += 1 result = self.gen_new_result(result, ground_truth, user_output) return result if __name__ == '__main__': J = Judger('accu.txt', 'law.txt') res = J.test('data_test.json', 'data_test_predict.json') total_score = 0 for task_idx in range(2): TP_micro = 0 FP_micro = 0 FN_micro = 0 f1 = [] for class_idx in range(len(res[task_idx])): if res[task_idx][class_idx]["TP"] == 0: f1.append(0) continue TP_micro += res[task_idx][class_idx]["TP"] FP_micro += res[task_idx][class_idx]["FP"] FN_micro += res[task_idx][class_idx]["FN"] precision = res[task_idx][class_idx]["TP"] * 1.0 / (res[task_idx][class_idx]["TP"] + res[task_idx][class_idx]["FP"]) recall = res[task_idx][class_idx]["TP"] * 1.0 / (res[task_idx][class_idx]["TP"] + res[task_idx][class_idx]["FN"]) f1.append(2 * precision * recall / (precision + recall)) precision_micro = TP_micro * 1.0 / (TP_micro + FP_micro) recall_micro = TP_micro * 1.0 / (TP_micro + FN_micro) F1_micro = 2 * precision_micro * recall_micro / (precision_micro + recall_micro) F1_macro = np.sum(f1) / len(f1) total_score += 100.0 * (F1_micro + F1_macro)/2 print('task id: {}, F1_micro: {}, F1_macro: {}, final score: {}'.format(task_idx + 1, F1_micro, F1_macro, 100.0 * (F1_micro + F1_macro)/2)) total_score += res[2]['score'] / res[2]['cnt'] * 100 print('task id: 3, score:{}'.format(res[2]['score'] / res[2]['cnt'] * 100)) print('total score:', total_score)
33.995283
147
0.475371
9e95c5c83911e24fca27e522db17f04abe6efa75
981
py
Python
tests/validation/test_square_client_id_validation.py
babenek/CredSweeper
4d69ec934b45fd2f68e00b636077e5edfd1ff6ca
[ "MIT" ]
17
2021-10-22T00:29:46.000Z
2022-03-21T03:05:56.000Z
tests/validation/test_square_client_id_validation.py
babenek/CredSweeper
4d69ec934b45fd2f68e00b636077e5edfd1ff6ca
[ "MIT" ]
29
2021-11-05T21:10:51.000Z
2022-03-30T10:41:08.000Z
tests/validation/test_square_client_id_validation.py
babenek/CredSweeper
4d69ec934b45fd2f68e00b636077e5edfd1ff6ca
[ "MIT" ]
16
2021-11-05T20:39:54.000Z
2022-03-11T00:57:32.000Z
from os import environ from typing import List import pytest from credsweeper.common.constants import KeyValidationOption from credsweeper.credentials import LineData from credsweeper.validations import SquareClientIdValidation from tests.test_utils.dummy_line_data import get_line_data @pytest.mark.api_validation class TestSquareClientIdValidation: @pytest.fixture def line_data_list(self) -> List[LineData]: line_data_list = [] line_data = get_line_data() line_data.value = "sq0idp-1235567212325-12355672" line_data_list.append(line_data) return line_data_list @pytest.mark.skipif(environ.get("CIRCLE_PROJECT_USERNAME") is not None, reason="Server blocking requests from CI server") def test_verify_n(self, line_data_list: pytest.fixture) -> None: validation_result = SquareClientIdValidation.verify(line_data_list) assert validation_result is KeyValidationOption.INVALID_KEY
35.035714
75
0.763507
d76dd38661bf94014edf6b1833bc964eafb0b52b
10,970
py
Python
lexilla/scripts/LexillaData.py
xelliott/Notepad3
984e637ceae20b085d84e6294b6c63ca9ec78839
[ "BSD-3-Clause" ]
null
null
null
lexilla/scripts/LexillaData.py
xelliott/Notepad3
984e637ceae20b085d84e6294b6c63ca9ec78839
[ "BSD-3-Clause" ]
null
null
null
lexilla/scripts/LexillaData.py
xelliott/Notepad3
984e637ceae20b085d84e6294b6c63ca9ec78839
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # ScintillaData.py - implemented 2013 by Neil Hodgson neilh@scintilla.org # Released to the public domain. # Common code used by Scintilla and SciTE for source file regeneration. # The ScintillaData object exposes information about Scintilla as properties: # Version properties # version # versionDotted # versionCommad # # Date last modified # dateModified # yearModified # mdyModified # dmyModified # myModified # # Information about lexers and properties defined in lexers # lexFiles # sorted list of lexer files # lexerModules # sorted list of module names # lexerProperties # sorted list of lexer properties # propertyDocuments # dictionary of property documentation { name: document string } # sclexFromName # dictionary of SCLEX_* IDs { name: SCLEX_ID } # fileFromSclex # dictionary of file names { SCLEX_ID: file name } # This file can be run to see the data it provides. # Requires Python 3.6 or later import datetime, pathlib, sys, textwrap thisPath = pathlib.Path(__file__).resolve() sys.path.append(str(thisPath.parent.parent.parent / "scintilla" / "scripts")) import FileGenerator neutralEncoding = "latin_1" def FindModules(lexFile): modules = [] partLine = "" with lexFile.open(encoding=neutralEncoding) as f: for l in f.readlines(): l = l.rstrip() if partLine or l.startswith("LexerModule"): if ")" in l: l = partLine + l l = l.replace("(", " ") l = l.replace(")", " ") l = l.replace(",", " ") parts = l.split() modules.append([parts[1], parts[2], parts[4][1:-1]]) partLine = "" else: partLine = partLine + l return modules def FindLexersInXcode(xCodeProject): lines = FileGenerator.ReadFileAsList(xCodeProject) uidsOfBuild = {} markersPBXBuildFile = ["Begin PBXBuildFile section", "", "End PBXBuildFile section"] for buildLine in lines[FileGenerator.FindSectionInList(lines, markersPBXBuildFile)]: # Occurs for each file in the build. Find the UIDs used for the file. #\t\t[0-9A-F]+ /* [a-zA-Z]+.cxx in sources */ = {isa = PBXBuildFile; fileRef = [0-9A-F]+ /* [a-zA-Z]+ */; }; pieces = buildLine.split() uid1 = pieces[0] filename = pieces[2].split(".")[0] uid2 = pieces[12] uidsOfBuild[filename] = [uid1, uid2] lexers = {} markersLexers = ["/* Lexers */ =", "children", ");"] for lexerLine in lines[FileGenerator.FindSectionInList(lines, markersLexers)]: #\t\t\t\t[0-9A-F]+ /* [a-zA-Z]+.cxx */, uid, _, rest = lexerLine.partition("/* ") uid = uid.strip() lexer, _, _ = rest.partition(".") lexers[lexer] = uidsOfBuild[lexer] return lexers # Properties that start with lexer. or fold. are automatically found but there are some # older properties that don't follow this pattern so must be explicitly listed. knownIrregularProperties = [ "fold", "styling.within.preprocessor", "tab.timmy.whinge.level", "asp.default.language", "html.tags.case.sensitive", "ps.level", "ps.tokenize", "sql.backslash.escapes", "nsis.uservars", "nsis.ignorecase" ] def FindProperties(lexFile): properties = {} with open(lexFile, encoding=neutralEncoding) as f: for l in f.readlines(): if ("GetProperty" in l or "DefineProperty" in l) and "\"" in l: l = l.strip() if not l.startswith("//"): # Drop comments propertyName = l.split("\"")[1] if propertyName.lower() == propertyName: # Only allow lower case property names if propertyName in knownIrregularProperties or \ propertyName.startswith("fold.") or \ propertyName.startswith("lexer."): properties[propertyName] = 1 return properties def FindPropertyDocumentation(lexFile): documents = {} with lexFile.open(encoding=neutralEncoding) as f: name = "" for l in f.readlines(): l = l.strip() if "// property " in l: propertyName = l.split()[2] if propertyName.lower() == propertyName: # Only allow lower case property names name = propertyName documents[name] = "" elif "DefineProperty" in l and "\"" in l: propertyName = l.split("\"")[1] if propertyName.lower() == propertyName: # Only allow lower case property names name = propertyName documents[name] = "" elif name: if l.startswith("//"): if documents[name]: documents[name] += " " documents[name] += l[2:].strip() elif l.startswith("\""): l = l[1:].strip() if l.endswith(";"): l = l[:-1].strip() if l.endswith(")"): l = l[:-1].strip() if l.endswith("\""): l = l[:-1] # Fix escaped double quotes l = l.replace("\\\"", "\"") documents[name] += l else: name = "" for name in list(documents.keys()): if documents[name] == "": del documents[name] return documents def FindCredits(historyFile): credits = [] stage = 0 with historyFile.open(encoding="utf-8") as f: for l in f.readlines(): l = l.strip() if stage == 0 and l == "<table>": stage = 1 elif stage == 1 and l == "</table>": stage = 2 if stage == 1 and l.startswith("<td>"): credit = l[4:-5] if "<a" in l: title, a, rest = credit.partition("<a href=") urlplus, _bracket, end = rest.partition(">") name = end.split("<")[0] url = urlplus[1:-1] credit = title.strip() if credit: credit += " " credit += name + " " + url credits.append(credit) return credits def ciKey(a): return str(a).lower() def SortListInsensitive(l): l.sort(key=ciKey) class LexillaData: def __init__(self, scintillaRoot): # Discover version information self.version = (scintillaRoot / "version.txt").read_text().strip() self.versionDotted = self.version[0] + '.' + self.version[1] + '.' + \ self.version[2] self.versionCommad = self.versionDotted.replace(".", ", ") + ', 0' with (scintillaRoot / "doc" / "Lexilla.html").open() as f: self.dateModified = [l for l in f.readlines() if "Date.Modified" in l]\ [0].split('\"')[3] # 20130602 # Lexilla.html dtModified = datetime.datetime.strptime(self.dateModified, "%Y%m%d") self.yearModified = self.dateModified[0:4] monthModified = dtModified.strftime("%B") dayModified = "%d" % dtModified.day self.mdyModified = monthModified + " " + dayModified + " " + self.yearModified # May 22 2013 # Lexilla.html, SciTE.html self.dmyModified = dayModified + " " + monthModified + " " + self.yearModified # 22 May 2013 # LexillaHistory.html -- only first should change self.myModified = monthModified + " " + self.yearModified # Find all the lexer source code files lexFilePaths = list((scintillaRoot / "lexers").glob("Lex*.cxx")) lexFilePathsEx = list((scintillaRoot / "lexers_x").glob("Lex*.cxx")) lexFilePaths.extend(lexFilePathsEx) SortListInsensitive(lexFilePaths) self.lexFiles = [f.stem for f in lexFilePaths] self.lexerModules = [] lexerProperties = set() self.propertyDocuments = {} self.sclexFromName = {} self.fileFromSclex = {} for lexFile in lexFilePaths: modules = FindModules(lexFile) for module in modules: self.sclexFromName[module[2]] = module[1] self.fileFromSclex[module[1]] = lexFile self.lexerModules.append(module[0]) for k in FindProperties(lexFile).keys(): lexerProperties.add(k) documents = FindPropertyDocumentation(lexFile) for k in documents.keys(): if k not in self.propertyDocuments: self.propertyDocuments[k] = documents[k] SortListInsensitive(self.lexerModules) self.lexerProperties = list(lexerProperties) SortListInsensitive(self.lexerProperties) self.lexersXcode = FindLexersInXcode(scintillaRoot / "src/Lexilla/Lexilla.xcodeproj/project.pbxproj") self.credits = FindCredits(scintillaRoot / "doc" / "LexillaHistory.html") def printWrapped(text): print(textwrap.fill(text, subsequent_indent=" ")) if __name__=="__main__": sci = LexillaData(pathlib.Path(__file__).resolve().parent.parent) print("Version %s %s %s" % (sci.version, sci.versionDotted, sci.versionCommad)) print("Date last modified %s %s %s %s %s" % ( sci.dateModified, sci.yearModified, sci.mdyModified, sci.dmyModified, sci.myModified)) printWrapped(str(len(sci.lexFiles)) + " lexer files: " + ", ".join(sci.lexFiles)) printWrapped(str(len(sci.lexerModules)) + " lexer modules: " + ", ".join(sci.lexerModules)) #~ printWrapped(str(len(sci.lexersXcode)) + " Xcode lexer references: " + ", ".join( #~ [lex+":"+uids[0]+","+uids[1] for lex, uids in sci.lexersXcode.items()])) print("Lexer name to ID:") lexNames = sorted(sci.sclexFromName.keys()) for lexName in lexNames: sclex = sci.sclexFromName[lexName] fileName = sci.fileFromSclex[sclex].name print(" " + lexName + " -> " + sclex + " in " + fileName) printWrapped("Lexer properties: " + ", ".join(sci.lexerProperties)) print("Lexer property documentation:") documentProperties = list(sci.propertyDocuments.keys()) SortListInsensitive(documentProperties) for k in documentProperties: print(" " + k) print(textwrap.fill(sci.propertyDocuments[k], initial_indent=" ", subsequent_indent=" ")) print("Credits:") for c in sci.credits: sys.stdout.buffer.write(b" " + c.encode("utf-8") + b"\n")
39.602888
116
0.555971
31296104b82e438ac3520f0576d7c7cf6af130f8
5,017
py
Python
src/fileutil.py
militiaonly/spark1707
3d4a3945ca2190628ea6a8593d3adadfd1a71dfb
[ "MIT" ]
null
null
null
src/fileutil.py
militiaonly/spark1707
3d4a3945ca2190628ea6a8593d3adadfd1a71dfb
[ "MIT" ]
null
null
null
src/fileutil.py
militiaonly/spark1707
3d4a3945ca2190628ea6a8593d3adadfd1a71dfb
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- encoding=utf-8 -*- ######################################## # Copyright (c) 2017 Shanghai Kimstars # ######################################## import os import json import logging import random import datetime # wrtnode.__name__ logger = logging.getLogger('wrtnode.' + __name__) def dt_to_strftime(dt, randomsecond=False): """ @brief format datetime to string in '%Y-%m-%d %H:%M:%S.%f' @param utcdt The utcdt @return { description_of_the_return_value } """ if not isinstance(dt, datetime.datetime): return None if randomsecond: randomsecond = dt.second + random.randint(0, 2) else: randomsecond = dt.second strftime = '%0.4d-%0.2d-%0.2d %0.2d:%0.2d:%0.2d' % (dt.year, dt.month, dt.day, dt.hour, dt.minute, randomsecond) return strftime def read_json_file(path): ####################### # read JSON file ####################### json_string = "" file_error = False try: jfile = open(path, "r") lines = jfile.readlines() except IOError as err: logger.error('read_json_file: ' + str(err)) file_error = True else: for line in lines: json_string = json_string + line.strip() # allow comma in the last line json_string = json_string.replace(',}', '}') finally: if 'jfile' in locals(): jfile.close() if file_error: return None try: jsonObject = json.loads(json_string) except Exception as e: jsonObject = None logger.error('read_json_file: ' + str(e)) return jsonObject def read_txt_file(path): ####################### # read txt file # real all lines ####################### json_string = "" file_error = False try: jfile = open(path, "r") lines = jfile.read() except IOError as err: logger.error('read_txt_file: ' + str(err)) file_error = True finally: if 'jfile' in locals(): jfile.close() if file_error: return None else: return lines def write_json_file(path, contentOject): # json_string = json.dumps(contentOject, 'utf-8') json_string = json.dumps(contentOject, sort_keys=True, indent=4, ensure_ascii=False) try: config_file = open(path, "w") config_file.write(json_string) r = True except IOError as err: errorStr = 'File Error:' + str(err) logger.error(errorStr) r = False finally: if 'config_file' in locals(): config_file.close() return r def check_key_types(jsonObject, key, types): """ @brief check the dict key and type @param jsonObject The json object @param key The key @param types tuple of types @return True/False """ if not isinstance(jsonObject, dict): return False if not (key in jsonObject): # s = "%s not found in jsonObject" % key # logger.debug(s) return False if not isinstance(jsonObject[key], types): # s = "jsonObject['%s'] is not in types %s" % (key, str(types)) # logger.debug(s) return False return True def list_files(path=None, postfix=None): if path is None: path = '.' files = [] postfix_list = [] if isinstance(postfix, str): postfix_list.append(postfix) elif isinstance(postfix, tuple): for item in postfix: postfix_list.append(item) elif postfix is None: postfix_list = None for file in os.listdir(path): if postfix_list is None: files.append(file) else: s = file.split('.') if len(s) > 1 and s[1] in postfix_list: files.append(file) return files def check_mqtt_config(jsonObject): if not isinstance(jsonObject, dict): return False if not check_key_types(jsonObject, 'host', str): err = "key 'host' error" logger.error(err) return False if not check_key_types(jsonObject, 'port', (int, float)): err = "key 'port' error" logger.error(err) return False if not check_key_types(jsonObject, 'keepalive', (int, float)): err = "key 'keepalive' error" logger.error(err) return False if not check_key_types(jsonObject, 'topicPrefix', str): err = "key 'topicPrefix' error" logger.error(err) return False if not check_key_types(jsonObject, 'useTLS', bool): err = "key 'useTLS' error" logger.error(err) return False return True
25.467005
71
0.527407
209fd46c9c5a3475246dfa73ee923f0b8e428619
2,115
py
Python
AutoPoly/extern/moltemplate/common/amber/amberparm_pair_to_lt.py
Chenghao-Wu/AutoPoly
e7b5d098c1fa33a11189e831ce6e5f121fc7615c
[ "MIT" ]
1
2021-09-09T21:53:41.000Z
2021-09-09T21:53:41.000Z
AutoPoly/extern/moltemplate/common/amber/amberparm_pair_to_lt.py
Chenghao-Wu/AutoPoly
e7b5d098c1fa33a11189e831ce6e5f121fc7615c
[ "MIT" ]
null
null
null
AutoPoly/extern/moltemplate/common/amber/amberparm_pair_to_lt.py
Chenghao-Wu/AutoPoly
e7b5d098c1fa33a11189e831ce6e5f121fc7615c
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys lines_gaff = sys.stdin.readlines() #pair_style = 'lj/charmm/coul/long' # NOTE: Long-range coulombic forces were disabled intentionally. (See below) # If you want to use long-range electrostatics, uncomment these lines: # Instead I use hybrid lj/charmm/coul/charmm by default, because # LAMMPS complains if you attempt to use lj/charmm/coul/long on a # system if it does not contain any charged particles. # Currently, moltemplate does not assign atomic charge, # so this problem occurs frequently. #pair_style = 'lj/charmm/coul/charmm' pair_style = 'lj/charmm/coul/long' sys.stdout.write(' write_once(\"In Settings\") {\n') for i in range(0, len(lines_gaff)): line = lines_gaff[i] tokens= line.split() atype = tokens[0] # UGGHHH # OLD CODE: #sig=tokens[1] # CORRECTION #1 # It looks the number in this part of the file is an atom radii, not a # diameter. In other words, this number is 0.5*sigma instead of sigma. # So we multiply it by 2.0. #sig=str(2.0*float(tokens[1])) # # CORRECTION #2 # It also appears as though they are using this convention for LennardJones # U(r)=epsilon*((s/r)^12-2*(s/r)^6) instead of 4*eps*((s/r)^12-(s/r)^6) # ...where "s" is shorthand for "sigma".. # This means we must ALSO multiply sigma in gaff.dat by 2**(-1.0/6) # (This change makes the two U(r) formulas equivalent.) # I had to figure this out by iterations of trial and error. # The official AMBER documentation is quite vague about the LJ parameters. # My apologies to everyone effected by this bug! -Andrew 2014-5-19 # http://ambermd.org/formats.html#parm.dat # http://structbio.vanderbilt.edu/archives/amber-archive/2009/5072.php) sig=str(float(tokens[1])*2.0*pow(2.0, (-1.0/6.0))) eps=tokens[2] comments=' '.join(tokens[3:]) sys.stdout.write(' pair_coeff @atom:'+atype+' @atom:'+atype+' '+pair_style+' '+eps+' '+sig+' # '+comments+'\n') sys.stdout.write(' } # (end of pair_coeffs)\n') sys.stdout.write('\n')
36.465517
120
0.655792
4d50934172f1c53deda5ac95ad59d75afb849e5d
451
py
Python
test_minHeap.py
codeocelot/datastructures
cec1253a287b00b72fbbc82660cd464a376c967d
[ "Apache-2.0" ]
null
null
null
test_minHeap.py
codeocelot/datastructures
cec1253a287b00b72fbbc82660cd464a376c967d
[ "Apache-2.0" ]
null
null
null
test_minHeap.py
codeocelot/datastructures
cec1253a287b00b72fbbc82660cd464a376c967d
[ "Apache-2.0" ]
null
null
null
from unittest import TestCase from min_heap import MinHeap class TestMinHeap(TestCase): def test_pop(self): init = [1, 2, 3, 4, 5, 6, 7] heap = MinHeap(init) r = heap.pop() self.assertEqual(r, 1) self.assertEqual(heap.values, [2, 4, 3, 7, 5, 6]) def test_push(self): init = [2, 7, 9, 5] heap = MinHeap(init) heap.push(1) self.assertEqual(heap.values, [1, 2, 9, 7, 5])
25.055556
57
0.554324