max_stars_repo_path
stringlengths
4
237
max_stars_repo_name
stringlengths
6
117
max_stars_count
int64
0
95.2k
id
stringlengths
1
7
content
stringlengths
12
593k
input_ids
sequencelengths
7
549k
functions/is_the_cat.py
mirumirumi/your-cat-sam
3
87325
<reponame>mirumirumi/your-cat-sam import os import img import json import boto3 import proxy_response from boto3 import Session from aws_lambda_powertools import Logger # PowerTools logger = Logger() # Rekognition session = Session(region_name="ap-northeast-1") rekognition_client = session.client("rekognition") CONFIDENCE_THRESHOLD = 60.0 @logger.inject_lambda_context() def lambda_handler(event, context): print("🍊") body = json.loads(event["body"]) logger.info(body) key = img.to_jpg(body["image_data"]["base64"]) # rekognition with open("/tmp/" + key, mode="rb") as f: file = f.read() try: res = rekognition_client.detect_labels(Image={ "Bytes": file }) except Exception as e: logger.exception(f"failed detect labels: {e}") return proxy_response._500() else: logger.info(res) # delete file in this runtime os.remove("/tmp/" + key) result = { "cat": get_label_data(res, "Cat"), "dog": get_label_data(res, "Dog") } logger.info(result) print("🍊") return proxy_response._200(result) def get_label_data(label_datas: dict, name: str) -> dict: result = {} for label in label_datas["Labels"]: if label["Name"] == name: if CONFIDENCE_THRESHOLD < label["Confidence"]: result["judge"] = True result["bounding_box"] = [] for bbs in label["Instances"]: result["bounding_box"].append({ "width": bbs["BoundingBox"]["Width"], "height": bbs["BoundingBox"]["Height"], "left": bbs["BoundingBox"]["Left"], "top": bbs["BoundingBox"]["Top"] }) break else: result["judge"] = False return result
[ 1, 529, 276, 1112, 420, 29958, 11038, 398, 381, 15547, 29914, 8066, 29899, 4117, 29899, 13445, 13, 5215, 2897, 13, 5215, 10153, 13, 5215, 4390, 13, 5215, 289, 3747, 29941, 13, 5215, 10166, 29918, 5327, 13, 3166, 289, 3747, 29941, 1053, 16441, 13, 3166, 25879, 29918, 2892, 29918, 13519, 8504, 1053, 28468, 13, 13, 29937, 9206, 24183, 13, 21707, 353, 28468, 580, 13, 13, 29937, 830, 29895, 3811, 654, 13, 7924, 353, 16441, 29898, 12803, 29918, 978, 543, 481, 29899, 29876, 27374, 29899, 29896, 1159, 13, 22218, 3811, 654, 29918, 4645, 353, 4867, 29889, 4645, 703, 22218, 3811, 654, 1159, 13, 6007, 29943, 1367, 1430, 4741, 29918, 4690, 1525, 7068, 5607, 29928, 353, 29871, 29953, 29900, 29889, 29900, 13, 13, 13, 29992, 21707, 29889, 21920, 29918, 2892, 29918, 4703, 580, 13, 1753, 14013, 29918, 13789, 29898, 3696, 29892, 3030, 1125, 13, 1678, 1596, 703, 243, 162, 144, 141, 1159, 13, 1678, 3573, 353, 4390, 29889, 18132, 29898, 3696, 3366, 2587, 20068, 13, 1678, 17927, 29889, 3888, 29898, 2587, 29897, 13, 13, 1678, 1820, 353, 10153, 29889, 517, 29918, 6173, 29898, 2587, 3366, 3027, 29918, 1272, 3108, 3366, 3188, 29953, 29946, 20068, 13, 13, 1678, 396, 337, 29895, 3811, 654, 13, 1678, 411, 1722, 11974, 7050, 12975, 718, 1820, 29892, 4464, 543, 6050, 1159, 408, 285, 29901, 13, 4706, 934, 353, 285, 29889, 949, 580, 13, 4706, 1018, 29901, 13, 9651, 620, 353, 337, 29895, 3811, 654, 29918, 4645, 29889, 4801, 522, 29918, 21134, 29898, 2940, 3790, 13, 18884, 376, 11207, 1115, 934, 13, 9651, 5615, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 17927, 29889, 11739, 29898, 29888, 29908, 26061, 6459, 11073, 29901, 426, 29872, 27195, 13, 9651, 736, 10166, 29918, 5327, 3032, 29945, 29900, 29900, 580, 13, 4706, 1683, 29901, 13, 9651, 17927, 29889, 3888, 29898, 690, 29897, 13, 13, 1678, 396, 5217, 934, 297, 445, 10073, 13, 1678, 2897, 29889, 5992, 11974, 7050, 12975, 718, 1820, 29897, 13, 13, 1678, 1121, 353, 426, 13, 4706, 376, 4117, 1115, 679, 29918, 1643, 29918, 1272, 29898, 690, 29892, 376, 9694, 4968, 13, 4706, 376, 26169, 1115, 679, 29918, 1643, 29918, 1272, 29898, 690, 29892, 376, 29928, 468, 1159, 13, 1678, 500, 13, 13, 1678, 17927, 29889, 3888, 29898, 2914, 29897, 13, 1678, 1596, 703, 243, 162, 144, 141, 1159, 13, 1678, 736, 10166, 29918, 5327, 3032, 29906, 29900, 29900, 29898, 2914, 29897, 13, 13, 13, 1753, 679, 29918, 1643, 29918, 1272, 29898, 1643, 29918, 14538, 29901, 9657, 29892, 1024, 29901, 851, 29897, 1599, 9657, 29901, 13, 1678, 1121, 353, 6571, 13, 1678, 363, 3858, 297, 3858, 29918, 14538, 3366, 4775, 29879, 3108, 29901, 13, 4706, 565, 3858, 3366, 1170, 3108, 1275, 1024, 29901, 13, 9651, 565, 8707, 29943, 1367, 1430, 4741, 29918, 4690, 1525, 7068, 5607, 29928, 529, 3858, 3366, 16376, 5084, 3108, 29901, 13, 18884, 1121, 3366, 17675, 479, 3108, 353, 5852, 13, 18884, 1121, 3366, 9917, 292, 29918, 1884, 3108, 353, 5159, 13, 18884, 363, 289, 5824, 297, 3858, 3366, 3379, 2925, 3108, 29901, 13, 462, 1678, 1121, 3366, 9917, 292, 29918, 1884, 16862, 4397, 3319, 13, 462, 4706, 376, 2103, 1115, 289, 5824, 3366, 29933, 12449, 3313, 3108, 3366, 6110, 12436, 13, 462, 4706, 376, 3545, 1115, 289, 5824, 3366, 29933, 12449, 3313, 3108, 3366, 7011, 12436, 13, 462, 4706, 376, 1563, 1115, 289, 5824, 3366, 29933, 12449, 3313, 3108, 3366, 8091, 12436, 13, 462, 4706, 376, 3332, 1115, 289, 5824, 3366, 29933, 12449, 3313, 3108, 3366, 7031, 3108, 13, 462, 1678, 5615, 13, 18884, 2867, 13, 4706, 1683, 29901, 13, 9651, 1121, 3366, 17675, 479, 3108, 353, 7700, 13, 1678, 736, 1121, 13, 13, 13, 2 ]
c2_python-operating-system/6_bash-scripting/_scripts/random_exit.py
DrShams/google-it-automation
0
56761
#!/usr/bin/python3 import sys import random value=random.randint(0, 3) print("Returning: " + str(value)) sys.exit(value)
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 13, 5215, 10876, 13, 5215, 4036, 13, 13, 1767, 29922, 8172, 29889, 9502, 524, 29898, 29900, 29892, 29871, 29941, 29897, 13, 2158, 703, 11609, 292, 29901, 376, 718, 851, 29898, 1767, 876, 13, 9675, 29889, 13322, 29898, 1767, 29897, 13, 2 ]
Apps/phciscowebex/ciscowebex_connector.py
emanuel2rw/phantom-apps
74
134456
<filename>Apps/phciscowebex/ciscowebex_connector.py # File: ciscowebex_connector.py # # Copyright (c) 2021 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # -- # Phantom App imports import os import time import phantom.app as phantom from phantom.base_connector import BaseConnector from phantom.action_result import ActionResult # Usage of the consts file is recommended import requests import json from bs4 import BeautifulSoup from django.http import HttpResponse from ciscowebex_consts import * class RetVal(tuple): def __new__(cls, val1, val2): return tuple.__new__(RetVal, (val1, val2)) def _get_error_message_from_exception(e): """ This function is used to get appropriate error message from the exception. :param e: Exception object :return: error code and message """ error_msg = UNKNOWN_ERR_MSG error_code = UNKNOWN_ERR_CODE_MSG try: if e.args: if len(e.args) > 1: error_code = e.args[0] error_msg = e.args[1] elif len(e.args) == 1: error_code = UNKNOWN_ERR_CODE_MSG error_msg = e.args[0] else: error_code = UNKNOWN_ERR_CODE_MSG error_msg = UNKNOWN_ERR_MSG except: error_code = UNKNOWN_ERR_CODE_MSG error_msg = UNKNOWN_ERR_MSG return error_code, error_msg def _handle_rest_request(request, path_parts): """ Handle requests for authorization. :param request: Data given to REST endpoint :param path_parts: Parts of the URL passed :return: Dictionary containing response parameters """ if len(path_parts) < 2: return HttpResponse('error: True, message: Invalid REST endpoint request', content_type=WEBEX_STR_TEXT, status=404) call_type = path_parts[1] # To handle authorize request in test connectivity action if call_type == 'start_oauth': return _handle_login_redirect(request, 'authorization_url') # To handle response from Webex login page if call_type == 'result': return_val = _handle_login_response(request) asset_id = request.GET.get('state') if asset_id and asset_id.isalnum(): app_dir = os.path.dirname(os.path.abspath(__file__)) auth_status_file_path = '{0}/{1}_{2}'.format(app_dir, asset_id, 'oauth_task.out') real_auth_status_file_path = os.path.abspath(auth_status_file_path) if not os.path.dirname(real_auth_status_file_path) == app_dir: return HttpResponse("Error: Invalid asset_id", content_type=WEBEX_STR_TEXT, status=400) open(auth_status_file_path, 'w').close() return return_val return HttpResponse('error: Invalid endpoint', content_type=WEBEX_STR_TEXT, status=404) def _handle_login_response(request): """ This function is used to get the login response of authorization request from Webex login page. :param request: Data given to REST endpoint :return: HttpResponse. The response displayed on authorization URL page """ asset_id = request.GET.get('state') if not asset_id: return HttpResponse('ERROR: Asset ID not found in URL\n{}'.format(json.dumps(request.GET)), content_type=WEBEX_STR_TEXT, status=400) # Check for error in URL error = request.GET.get('error') error_description = request.GET.get('error_description') # If there is an error in response if error: message = 'Error: {0}'.format(error) if error_description: message = '{0} Details: {1}'.format(message, error_description) return HttpResponse('Server returned {0}'.format(message), content_type=WEBEX_STR_TEXT, status=400) code = request.GET.get(WEBEX_STR_CODE) # If code is not available if not code: return HttpResponse('Error while authenticating\n{0}'.format(json.dumps(request.GET)), content_type=WEBEX_STR_TEXT, status=400) state = _load_app_state(asset_id) state[WEBEX_STR_CODE] = code _save_app_state(state, asset_id, None) return HttpResponse(WEBEX_SUCCESS_CODE_RECEIVED_MESSAGE, content_type=WEBEX_STR_TEXT) def _handle_login_redirect(request, key): """ This function is used to redirect login request to Cisco webex login page. :param request: Data given to REST endpoint :param key: Key to search in state file :return: response authorization_url/admin_consent_url """ asset_id = request.GET.get('asset_id') if not asset_id: return HttpResponse('ERROR: Asset ID not found in URL', content_type=WEBEX_STR_TEXT, status=400) state = _load_app_state(asset_id) if not state: return HttpResponse('ERROR: Invalid asset_id', content_type=WEBEX_STR_TEXT, status=400) url = state.get(key) if not url: return HttpResponse('App state is invalid, {key} not found.'.format(key=key), content_type=WEBEX_STR_TEXT, status=400) response = HttpResponse(status=302) response['Location'] = url return response def _load_app_state(asset_id, app_connector=None): """ This function is used to load the current state file. :param asset_id: asset_id :param app_connector: Object of app_connector class :return: state: Current state file as a dictionary """ asset_id = str(asset_id) if not asset_id or not asset_id.isalnum(): if app_connector: app_connector.debug_print('In _load_app_state: Invalid asset_id') return {} app_dir = os.path.dirname(os.path.abspath(__file__)) state_file = '{0}/{1}_state.json'.format(app_dir, asset_id) real_state_file_path = os.path.abspath(state_file) if not os.path.dirname(real_state_file_path) == app_dir: if app_connector: app_connector.debug_print('In _load_app_state: Invalid asset_id') return {} state = {} try: with open(real_state_file_path, 'r') as state_file_obj: state = json.load(state_file_obj) except Exception as e: if app_connector: error_code, error_msg = _get_error_message_from_exception(e) app_connector.debug_print('In _load_app_state: Error Code: {0}. Error Message: {1}'.format(error_code, error_msg)) if app_connector: app_connector.debug_print('Loaded state: ', state) return state def _save_app_state(state, asset_id, app_connector=None): """ This function is used to save current state in file. :param state: Dictionary which contains data to write in state file :param asset_id: asset_id :param app_connector: Object of app_connector class :return: status: phantom.APP_SUCCESS|phantom.APP_ERROR """ asset_id = str(asset_id) if not asset_id or not asset_id.isalnum(): if app_connector: app_connector.debug_print('In _save_app_state: Invalid asset_id') return {} app_dir = os.path.split(__file__)[0] state_file = '{0}/{1}_state.json'.format(app_dir, asset_id) real_state_file_path = os.path.abspath(state_file) if not os.path.dirname(real_state_file_path) == app_dir: if app_connector: app_connector.debug_print('In _save_app_state: Invalid asset_id') return {} if app_connector: app_connector.debug_print('Saving state: ', state) try: with open(real_state_file_path, 'w+') as state_file_obj: state_file_obj.write(json.dumps(state)) except Exception as e: error_code, error_msg = _get_error_message_from_exception(e) if app_connector: app_connector.debug_print('Unable to save state file: Error Code: {0}. Error Message: {1}'.format(error_code, error_msg)) return phantom.APP_ERROR return phantom.APP_SUCCESS def _get_dir_name_from_app_name(app_name): """ Get name of the directory for the app. :param app_name: Name of the application for which directory name is required :return: app_name: Name of the directory for the application """ app_name = ''.join([x for x in app_name if x.isalnum()]) app_name = app_name.lower() if not app_name: app_name = 'app_for_phantom' return app_name class CiscoWebexConnector(BaseConnector): def __init__(self): # Call the BaseConnectors init first super(CiscoWebexConnector, self).__init__() self._api_key = None self._state = None self._client_id = None self._client_secret = None self._access_token = None self._refresh_token = None # Variable to hold a base_url in case the app makes REST calls # Do note that the app json defines the asset config, so please # modify this as you deem fit. self._base_url = None def _process_empty_reponse(self, response, action_result): if response.status_code == 200: return RetVal(phantom.APP_SUCCESS, {}) return RetVal(action_result.set_status(phantom.APP_ERROR, WEBEX_ERR_EMPTY_RESPONSE), None) def _process_html_response(self, response, action_result): # An html response, treat it like an error status_code = response.status_code try: soup = BeautifulSoup(response.text, "html.parser") error_text = soup.text split_lines = error_text.split('\n') split_lines = [x.strip() for x in split_lines if x.strip()] error_text = '\n'.join(split_lines) except: error_text = "Cannot parse error details" message = "Status Code: {0}. Data from server:\n{1}\n".format(status_code, error_text) message = message.replace('{', '{{').replace('}', '}}') return RetVal(action_result.set_status(phantom.APP_ERROR, message), None) def _process_json_response(self, r, action_result): # Try a json parse try: resp_json = r.json() except Exception as e: return RetVal(action_result.set_status(phantom.APP_ERROR, "Unable to parse JSON response. Error: {0}".format(str(e))), None) # Please specify the status codes here if 200 <= r.status_code < 399: return RetVal(phantom.APP_SUCCESS, resp_json) # You should process the error returned in the json message = "Error from server. Status Code: {0} Data from server: {1}".format( r.status_code, r.text.replace('{', '{{').replace('}', '}}')) return RetVal(action_result.set_status(phantom.APP_ERROR, message), None) def _process_response(self, r, action_result): # store the r_text in debug data, it will get dumped in the logs if the action fails if r.status_code == 401: return RetVal(action_result.set_status(phantom.APP_ERROR, "Access token is expired or invalid"), None) if hasattr(action_result, 'add_debug_data'): action_result.add_debug_data({'r_status_code': r.status_code}) action_result.add_debug_data({'r_text': r.text}) action_result.add_debug_data({'r_headers': r.headers}) # Process each 'Content-Type' of response separately # Process a json response if 'json' in r.headers.get('Content-Type', ''): return self._process_json_response(r, action_result) # Process an HTML resonse, Do this no matter what the api talks. # There is a high chance of a PROXY in between phantom and the rest of # world, in case of errors, PROXY's return HTML, this function parses # the error and adds it to the action_result. if 'html' in r.headers.get('Content-Type', ''): return self._process_html_response(r, action_result) # it's not content-type that is to be parsed, handle an empty response if not r.text: return self._process_empty_reponse(r, action_result) # everything else is actually an error at this point message = "Can't process response from server. Status Code: {0} Data from server: {1}".format( r.status_code, r.text.replace('{', '{{').replace('}', '}}')) return RetVal(action_result.set_status(phantom.APP_ERROR, message), None) def _make_rest_call(self, endpoint, action_result, headers=None, params=None, data=None, method="get", verify=False): resp_json = None try: request_func = getattr(requests, method) except AttributeError: return RetVal(action_result.set_status(phantom.APP_ERROR, "Invalid method: {0}".format(method)), resp_json) try: r = request_func(endpoint, json=data, headers=headers, verify=verify, params=params) except Exception as e: error_msg = _get_error_message_from_exception(e) return RetVal(action_result.set_status(phantom.APP_ERROR, "Error Connecting to server. Details: {0}" .format(error_msg)), resp_json) return self._process_response(r, action_result) def _get_asset_name(self, action_result): """ Get name of the asset using Phantom URL. :param action_result: object of ActionResult class :return: status phantom.APP_ERROR/phantom.APP_SUCCESS(along with appropriate message), asset name """ asset_id = self.get_asset_id() rest_endpoint = PHANTOM_ASSET_ENDPOINT.format(asset_id=asset_id) url = '{}{}'.format(self.get_phantom_base_url() + 'rest', rest_endpoint) ret_val, resp_json = self._make_rest_call(action_result=action_result, endpoint=url) if phantom.is_fail(ret_val): return ret_val, None asset_name = resp_json.get('name') if not asset_name: return action_result.set_status(phantom.APP_ERROR, WEBEX_ERR_ASSET_NAME_NOT_FOUND.format(asset_id), None) return phantom.APP_SUCCESS, asset_name def _get_phantom_base_url(self, action_result): """ Get base url of phantom. :param action_result: object of ActionResult class :return: status phantom.APP_ERROR/phantom.APP_SUCCESS(along with appropriate message), base url of phantom """ url = '{0}{1}{2}'.format(BaseConnector._get_phantom_base_url(), 'rest', PHANTOM_SYSTEM_INFO_ENDPOINT) ret_val, resp_json = self._make_rest_call(action_result=action_result, endpoint=url, verify=False) if phantom.is_fail(ret_val): return ret_val, None phantom_base_url = resp_json.get('base_url') if not phantom_base_url: return action_result.set_status(phantom.APP_ERROR, WEBEX_ERR_PHANTOM_BASE_URL_NOT_FOUND), None return phantom.APP_SUCCESS, phantom_base_url.rstrip('/') def _get_app_rest_url(self, action_result): """ Get URL for making rest calls. :param action_result: object of ActionResult class :return: status phantom.APP_ERROR/phantom.APP_SUCCESS(along with appropriate message), URL to make rest calls """ ret_val, phantom_base_url = self._get_phantom_base_url(action_result) if phantom.is_fail(ret_val): return action_result.get_status(), None ret_val, asset_name = self._get_asset_name(action_result) if phantom.is_fail(ret_val): return action_result.get_status(), None self.save_progress('Using Phantom base URL as: {0}'.format(phantom_base_url)) app_json = self.get_app_json() app_name = app_json['name'] app_dir_name = _get_dir_name_from_app_name(app_name) url_to_app_rest = '{0}/rest/handler/{1}_{2}/{3}'.format(phantom_base_url, app_dir_name, app_json['appid'], asset_name) return phantom.APP_SUCCESS, url_to_app_rest def _generate_new_access_token(self, action_result, data): """ This function is used to generate new access token using the code obtained on authorization. s :param action_result: object of ActionResult class :param data: Data to send in REST call :return: status phantom.APP_ERROR/phantom.APP_SUCCESS """ req_url = '{}{}'.format(self._base_url, WEBEX_ACCESS_TOKEN_ENDPOINT) ret_val, resp_json = self._make_rest_call(action_result=action_result, endpoint=req_url, data=data, method='post') if phantom.is_fail(ret_val): return action_result.get_status() # If there is any error while generating access_token, API returns 200 with error and error_description fields if not resp_json.get(WEBEX_STR_ACCESS_TOKEN): if resp_json.get('message'): return action_result.set_status(phantom.APP_ERROR, status_message=resp_json['message']) return action_result.set_status(phantom.APP_ERROR, status_message='Error while generating access_token') self._state[WEBEX_STR_TOKEN] = resp_json self.save_state(self._state) _save_app_state(self._state, self.get_asset_id(), self) self._state = self.load_state() self._access_token = resp_json[WEBEX_STR_ACCESS_TOKEN] self._refresh_token = resp_json[WEBEX_STR_REFRESH_TOKEN] # Scenario - # # If the corresponding state file doesn't have the correct owner, owner group or permissions, # the newly generated token is not being saved to state file and automatic workflow for the token has been stopped. # So we have to check that token from response and token which is saved to state file after successful generation of the new token are the same or not. if self._access_token != self._state.get(WEBEX_STR_TOKEN, {}).get(WEBEX_STR_ACCESS_TOKEN): message = "Error occurred while saving the newly generated access token (in place of the expired token) in the state file." message += " Please check the owner, owner group, and the permissions of the state file. The Phantom " message += "user should have the correct access rights and ownership for the corresponding state file (refer to the readme file for more information)." return action_result.set_status(phantom.APP_ERROR, message) return phantom.APP_SUCCESS def _wait(self, action_result): """ This function is used to hold the action till user login. :param action_result: Object of ActionResult class :return: status (success/failed) """ app_dir = os.path.dirname(os.path.abspath(__file__)) # file to check whether the request has been granted or not auth_status_file_path = '{0}/{1}_{2}'.format(app_dir, self.get_asset_id(), 'oauth_task.out') time_out = False # wait-time while request is being granted for _ in range(OAUTH_WAIT_INTERVALS): self.send_progress('Waiting...') if os.path.isfile(auth_status_file_path): time_out = True os.unlink(auth_status_file_path) break time.sleep(OAUTH_WAIT_TIME) if not time_out: return action_result.set_status(phantom.APP_ERROR, status_message=WEBEX_ERR_TIMEOUT) self.send_progress('Authenticated') return phantom.APP_SUCCESS def _update_request(self, action_result, endpoint, headers=None, params=None, data=None, method='get'): """ This function is used to update the headers with access_token before making REST call. :param endpoint: REST endpoint that needs to appended to the service address :param action_result: object of ActionResult class :param headers: request headers :param params: request parameters :param data: request body :param method: GET/POST/PUT/DELETE/PATCH (Default will be GET) :return: status phantom.APP_ERROR/phantom.APP_SUCCESS(along with appropriate message), response obtained by making an API call """ if not endpoint.startswith(self._base_url): endpoint = '{0}{1}'.format(self._base_url, endpoint) if headers is None: headers = {} token_data = { WEBEX_STR_CLIENT_ID: self._client_id, WEBEX_STR_SECRET: self._client_secret, WEBEX_STR_GRANT_TYPE: WEBEX_STR_REFRESH_TOKEN, WEBEX_STR_REFRESH_TOKEN: self._refresh_token } if not self._access_token: if not self._refresh_token: # If none of the access_token and refresh_token is available return action_result.set_status(phantom.APP_ERROR, status_message=WEBEX_ERR_TOKEN_NOT_AVAILABLE), None # If refresh_token is available and access_token is not available, generate new access_token status = self._generate_new_access_token(action_result=action_result, data=token_data) if phantom.is_fail(status): return action_result.get_status(), None headers.update({'Authorization': 'Bearer {0}'.format(self._access_token)}) if not headers.get('Content-Type'): headers.update({'Content-Type': 'application/json'}) ret_val, resp_json = self._make_rest_call(action_result=action_result, endpoint=endpoint, headers=headers, params=params, data=data, method=method) # If token is expired, generate new token if 'Access token is expired or invalid' in action_result.get_message(): status = self._generate_new_access_token(action_result=action_result, data=token_data) if phantom.is_fail(status): return action_result.get_status(), None headers.update({'Authorization': 'Bearer {0}'.format(self._access_token)}) ret_val, resp_json = self._make_rest_call(action_result=action_result, endpoint=endpoint, headers=headers, params=params, data=data, method=method) if phantom.is_fail(ret_val): return action_result.get_status(), None return phantom.APP_SUCCESS, resp_json def _handle_test_connectivity(self, param): action_result = self.add_action_result(ActionResult(dict(param))) app_state = {} self.save_progress("Validating API Key") # If API key exists, skipping oAuth authentication if self._api_key: ret_val, response = self._make_rest_call_using_api_key(WEBEX_GET_ROOMS_ENDPOINT, action_result, params=None) if phantom.is_fail(ret_val): self.save_progress(WEBEX_ERR_TEST_CONNECTIVITY) return action_result.get_status() self.save_progress(WEBEX_SUCCESS_TEST_CONNECTIVITY) return action_result.set_status(phantom.APP_SUCCESS) # Get initial REST URL ret_val, app_rest_url = self._get_app_rest_url(action_result) if phantom.is_fail(ret_val): self.save_progress("Rest URL not available. Error: {error}".format(error=action_result.get_message())) return action_result.set_status(phantom.APP_ERROR, status_message="Test Connectivity Failed") # Append /result to create redirect_uri redirect_uri = '{0}/result'.format(app_rest_url) app_state[WEBEX_STR_REDIRECT_URI] = redirect_uri self.save_progress("Using OAuth URL:") self.save_progress(redirect_uri) # Authorization URL used to make request for getting code which is used to generate access token authorization_url = AUTHORIZATION_URL.format(client_id=self._client_id, redirect_uri=redirect_uri, response_type=WEBEX_STR_CODE, state=self.get_asset_id(), scope=SCOPE) authorization_url = '{}{}'.format(self._base_url, authorization_url) app_state['authorization_url'] = authorization_url # URL which would be shown to the user url_for_authorize_request = '{0}/start_oauth?asset_id={1}&'.format(app_rest_url, self.get_asset_id()) _save_app_state(app_state, self.get_asset_id(), self) self.save_progress('Please authorize user in a separate tab using URL') self.save_progress(url_for_authorize_request) # Wait time for authorization time.sleep(15) # Wait for some while user login to Cisco webex status = self._wait(action_result=action_result) # Empty message to override last message of waiting self.send_progress('') if phantom.is_fail(status): return action_result.get_status() self.save_progress('Code Received') self._state = _load_app_state(self.get_asset_id(), self) # if code is not available in the state file if not self._state or not self._state.get(WEBEX_STR_CODE): return action_result.set_status(phantom.APP_ERROR, status_message=WEBEX_ERR_TEST_CONNECTIVITY) current_code = self._state[WEBEX_STR_CODE] self.save_state(self._state) _save_app_state(self._state, self.get_asset_id(), self) self.save_progress('Generating access token') data = { WEBEX_STR_CLIENT_ID: self._client_id, WEBEX_STR_SECRET: self._client_secret, WEBEX_STR_GRANT_TYPE: 'authorization_code', WEBEX_STR_REDIRECT_URI: redirect_uri, WEBEX_STR_CODE: current_code } # For first time access, new access token is generated ret_val = self._generate_new_access_token(action_result=action_result, data=data) if phantom.is_fail(ret_val): self.save_progress(WEBEX_ERR_TEST_CONNECTIVITY) return action_result.get_status() self.save_progress('Getting info about the rooms to verify token') url = '{}{}'.format(self._base_url, WEBEX_GET_ROOMS_ENDPOINT) ret_val, response = self._update_request(action_result=action_result, endpoint=url) if phantom.is_fail(ret_val): self.save_progress(WEBEX_ERR_TEST_CONNECTIVITY) return action_result.get_status() self.save_progress('Got room details successfully') self.save_progress(WEBEX_SUCCESS_TEST_CONNECTIVITY) return action_result.set_status(phantom.APP_SUCCESS) def _make_rest_call_using_api_key(self, endpoint, action_result, params=None, data=None, method="get", verify=False): # Create a URL to connect to url = self._base_url + endpoint authToken = "Bearer " + self._api_key headers = {'Content-Type': 'application/json', 'Authorization': authToken} return self._make_rest_call(url, action_result, params=params, headers=headers, data=data, method=method, verify=verify) def _handle_list_rooms(self, param): self.save_progress("In action handler for: {0}".format(self.get_action_identifier())) action_result = self.add_action_result(ActionResult(dict(param))) if self._api_key: ret_val, response = self._make_rest_call_using_api_key(WEBEX_GET_ROOMS_ENDPOINT, action_result) else: ret_val, response = self._update_request(action_result, WEBEX_GET_ROOMS_ENDPOINT) if phantom.is_fail(ret_val): return action_result.get_status() summary = action_result.update_summary({'total_rooms': 0}) resp_value = response.get('items', []) if type(resp_value) != list: resp_value = [resp_value] for curr_item in resp_value: action_result.add_data(curr_item) summary['total_rooms'] = action_result.get_data_size() if phantom.is_fail(ret_val): return action_result.get_status() return action_result.set_status(phantom.APP_SUCCESS) def _handle_get_user(self, param): self.save_progress("In action handler for: {0}".format(self.get_action_identifier())) action_result = self.add_action_result(ActionResult(dict(param))) uri_endpoint = WEBEX_GET_USER_ENDPOINT.format(param['email_address']) if self._api_key: ret_val, response = self._make_rest_call_using_api_key(uri_endpoint, action_result, params=None) else: ret_val, response = self._update_request(action_result, uri_endpoint) if phantom.is_fail(ret_val): return action_result.get_status() summary = action_result.update_summary({'found_user': False}) resp_value = response.get('items', []) for resp in resp_value: action_result.add_data(resp) is_user_found = True if action_result.get_data_size() > 0 else False summary['found_user'] = is_user_found if phantom.is_fail(ret_val): return action_result.get_status() if not is_user_found: return action_result.set_status(phantom.APP_ERROR, WEBEX_ERR_USER_NOT_FOUND) return action_result.set_status(phantom.APP_SUCCESS) def _handle_send_message(self, param): self.save_progress("In action handler for: {0}".format(self.get_action_identifier())) action_result = self.add_action_result(ActionResult(dict(param))) type = param['destination_type'] if type == "user": uri_endpoint = WEBEX_SEND_MESSAGE_ENDPOINT user_id = param['endpoint_id'] message = param['message'] data = {'toPersonId': user_id, 'text': message} else: uri_endpoint = WEBEX_SEND_MESSAGE_ENDPOINT user_id = param['endpoint_id'] message = param['message'] data = {"roomId": user_id, "text": message} if self._api_key: ret_val, response = self._make_rest_call_using_api_key(uri_endpoint, action_result, data=data, method="post") else: ret_val, response = self._update_request(action_result, uri_endpoint, data=data, method="post") if phantom.is_fail(ret_val): return action_result.get_status() action_result.add_data(response) message = WEBEX_SUCCESS_SEND_MESSAGE summary = action_result.update_summary({}) summary['message'] = message if phantom.is_fail(ret_val): return action_result.get_status() return action_result.set_status(phantom.APP_SUCCESS, message) def handle_action(self, param): ret_val = phantom.APP_SUCCESS action_id = self.get_action_identifier() if action_id == 'test_connectivity': ret_val = self._handle_test_connectivity(param) elif action_id == 'list_rooms': ret_val = self._handle_list_rooms(param) elif action_id == 'get_user': ret_val = self._handle_get_user(param) elif action_id == 'send_message': ret_val = self._handle_send_message(param) return ret_val def initialize(self): # Load the state in initialize, use it to store data # that needs to be accessed across actions self._state = self.load_state() config = self.get_config() self._base_url = BASE_URL self._api_key = config.get('authorization_key', None) self._client_id = config.get(WEBEX_STR_CLIENT_ID, None) self._client_secret = config.get(WEBEX_STR_SECRET, None) self._access_token = self._state.get(WEBEX_STR_TOKEN, {}).get(WEBEX_STR_ACCESS_TOKEN) self._refresh_token = self._state.get(WEBEX_STR_TOKEN, {}).get(WEBEX_STR_REFRESH_TOKEN) if not self._api_key and (not self._client_id and not self._client_secret): return self.set_status(phantom.APP_ERROR, status_message=WEBEX_ERR_REQUIRED_CONFIG_PARAMS) if not self._api_key and ((self._client_id and not self._client_secret) or (self._client_secret and not self._client_id)): return self.set_status(phantom.APP_ERROR, status_message=WEBEX_ERR_REQUIRED_CONFIG_PARAMS) return phantom.APP_SUCCESS def finalize(self): # Save the state, this data is saved accross actions and app upgrades self.save_state(self._state) return phantom.APP_SUCCESS if __name__ == '__main__': import sys import pudb import argparse pudb.set_trace() argparser = argparse.ArgumentParser() argparser.add_argument('input_test_json', help='Input Test JSON file') argparser.add_argument('-u', '--username', help='username', required=False) argparser.add_argument('-p', '--password', help='password', required=False) args = argparser.parse_args() session_id = None username = args.username password = <PASSWORD> if username is not None and password is None: # User specified a username but not a password, so ask import getpass password = getpass.getpass("Password: ") if username and password: try: print("Accessing the Login page") r = requests.get(BaseConnector._get_phantom_base_url() + "login", verify=False) csrftoken = r.cookies['csrftoken'] data = dict() data['username'] = username data['password'] = password data['csrfmiddlewaretoken'] = csrftoken headers = dict() headers['Cookie'] = 'csrftoken=' + csrftoken headers['Referer'] = BaseConnector._get_phantom_base_url() print("Logging into Platform to get the session id") r2 = requests.post(BaseConnector._get_phantom_base_url(), verify=False, data=data, headers=headers) session_id = r2.cookies['sessionid'] except Exception as e: print("Unable to get session id from the platfrom. Error: " + str(e)) exit(1) if len(sys.argv) < 2: print("No test json specified as input") exit(0) with open(args.input_test_json) as f: in_json = f.read() in_json = json.loads(in_json) print(json.dumps(in_json, indent=4)) connector = CiscoWebexConnector() connector.print_progress_message = True if session_id is not None: in_json['user_session_token'] = session_id ret_val = connector._handle_action(json.dumps(in_json), None) print(json.dumps(json.loads(ret_val), indent=4)) exit(0)
[ 1, 529, 9507, 29958, 2052, 29879, 29914, 561, 3476, 20587, 774, 735, 29914, 3476, 20587, 774, 735, 29918, 11958, 2801, 29889, 2272, 13, 29937, 3497, 29901, 274, 10669, 340, 774, 735, 29918, 11958, 2801, 29889, 2272, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29896, 317, 572, 2960, 9266, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 13380, 29871, 29906, 29889, 29900, 313, 991, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 29889, 3945, 29897, 13, 29937, 1192, 13, 13, 29937, 1963, 15762, 2401, 24802, 13, 5215, 2897, 13, 5215, 931, 13, 13, 5215, 1374, 15762, 29889, 932, 408, 1374, 15762, 13, 3166, 1374, 15762, 29889, 3188, 29918, 11958, 2801, 1053, 7399, 20971, 2801, 13, 3166, 1374, 15762, 29889, 2467, 29918, 2914, 1053, 9123, 3591, 13, 13, 29937, 10783, 482, 310, 278, 1040, 29879, 934, 338, 13622, 13, 5215, 7274, 13, 5215, 4390, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 3166, 9557, 29889, 1124, 1053, 9056, 5103, 13, 3166, 274, 10669, 340, 774, 735, 29918, 3075, 29879, 1053, 334, 13, 13, 13, 1990, 4649, 1440, 29898, 23583, 1125, 13, 1678, 822, 4770, 1482, 12035, 25932, 29892, 659, 29896, 29892, 659, 29906, 1125, 13, 4706, 736, 18761, 17255, 1482, 12035, 8015, 1440, 29892, 313, 791, 29896, 29892, 659, 29906, 876, 13, 13, 13, 1753, 903, 657, 29918, 2704, 29918, 4906, 29918, 3166, 29918, 11739, 29898, 29872, 1125, 13, 1678, 9995, 910, 740, 338, 1304, 304, 679, 8210, 1059, 2643, 515, 278, 3682, 29889, 13, 1678, 584, 3207, 321, 29901, 8960, 1203, 13, 1678, 584, 2457, 29901, 1059, 775, 322, 2643, 13, 1678, 9995, 13, 1678, 1059, 29918, 7645, 353, 8291, 29968, 6632, 16048, 29918, 21662, 29918, 4345, 29954, 13, 1678, 1059, 29918, 401, 353, 8291, 29968, 6632, 16048, 29918, 21662, 29918, 16524, 29918, 4345, 29954, 13, 1678, 1018, 29901, 13, 4706, 565, 321, 29889, 5085, 29901, 13, 9651, 565, 7431, 29898, 29872, 29889, 5085, 29897, 1405, 29871, 29896, 29901, 13, 18884, 1059, 29918, 401, 353, 321, 29889, 5085, 29961, 29900, 29962, 13, 18884, 1059, 29918, 7645, 353, 321, 29889, 5085, 29961, 29896, 29962, 13, 9651, 25342, 7431, 29898, 29872, 29889, 5085, 29897, 1275, 29871, 29896, 29901, 13, 18884, 1059, 29918, 401, 353, 8291, 29968, 6632, 16048, 29918, 21662, 29918, 16524, 29918, 4345, 29954, 13, 18884, 1059, 29918, 7645, 353, 321, 29889, 5085, 29961, 29900, 29962, 13, 4706, 1683, 29901, 13, 9651, 1059, 29918, 401, 353, 8291, 29968, 6632, 16048, 29918, 21662, 29918, 16524, 29918, 4345, 29954, 13, 9651, 1059, 29918, 7645, 353, 8291, 29968, 6632, 16048, 29918, 21662, 29918, 4345, 29954, 13, 1678, 5174, 29901, 13, 4706, 1059, 29918, 401, 353, 8291, 29968, 6632, 16048, 29918, 21662, 29918, 16524, 29918, 4345, 29954, 13, 4706, 1059, 29918, 7645, 353, 8291, 29968, 6632, 16048, 29918, 21662, 29918, 4345, 29954, 13, 13, 1678, 736, 1059, 29918, 401, 29892, 1059, 29918, 7645, 13, 13, 13, 1753, 903, 8411, 29918, 5060, 29918, 3827, 29898, 3827, 29892, 2224, 29918, 20895, 1125, 13, 1678, 9995, 29273, 7274, 363, 28733, 29889, 13, 13, 1678, 584, 3207, 2009, 29901, 3630, 2183, 304, 16759, 16248, 13, 1678, 584, 3207, 2224, 29918, 20895, 29901, 3455, 29879, 310, 278, 3988, 4502, 13, 1678, 584, 2457, 29901, 13343, 6943, 2933, 4128, 13, 1678, 9995, 13, 13, 1678, 565, 7431, 29898, 2084, 29918, 20895, 29897, 529, 29871, 29906, 29901, 13, 4706, 736, 9056, 5103, 877, 2704, 29901, 5852, 29892, 2643, 29901, 21403, 16759, 16248, 2009, 742, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29892, 4660, 29922, 29946, 29900, 29946, 29897, 13, 13, 1678, 1246, 29918, 1853, 353, 2224, 29918, 20895, 29961, 29896, 29962, 13, 13, 1678, 396, 1763, 4386, 4148, 675, 2009, 297, 1243, 4511, 2068, 3158, 13, 1678, 565, 1246, 29918, 1853, 1275, 525, 2962, 29918, 23106, 2396, 13, 4706, 736, 903, 8411, 29918, 7507, 29918, 17886, 29898, 3827, 29892, 525, 8921, 2133, 29918, 2271, 1495, 13, 13, 1678, 396, 1763, 4386, 2933, 515, 2563, 735, 6464, 1813, 13, 1678, 565, 1246, 29918, 1853, 1275, 525, 2914, 2396, 13, 4706, 736, 29918, 791, 353, 903, 8411, 29918, 7507, 29918, 5327, 29898, 3827, 29897, 13, 4706, 24342, 29918, 333, 353, 2009, 29889, 7194, 29889, 657, 877, 3859, 1495, 13, 4706, 565, 24342, 29918, 333, 322, 24342, 29918, 333, 29889, 275, 284, 1949, 7295, 13, 9651, 623, 29918, 3972, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 876, 13, 9651, 4817, 29918, 4882, 29918, 1445, 29918, 2084, 353, 22372, 29900, 6822, 29912, 29896, 3227, 29906, 29913, 4286, 4830, 29898, 932, 29918, 3972, 29892, 24342, 29918, 333, 29892, 525, 23106, 29918, 7662, 29889, 449, 1495, 13, 9651, 1855, 29918, 5150, 29918, 4882, 29918, 1445, 29918, 2084, 353, 2897, 29889, 2084, 29889, 370, 1028, 493, 29898, 5150, 29918, 4882, 29918, 1445, 29918, 2084, 29897, 13, 9651, 565, 451, 2897, 29889, 2084, 29889, 25721, 29898, 6370, 29918, 5150, 29918, 4882, 29918, 1445, 29918, 2084, 29897, 1275, 623, 29918, 3972, 29901, 13, 18884, 736, 9056, 5103, 703, 2392, 29901, 21403, 24342, 29918, 333, 613, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29892, 4660, 29922, 29946, 29900, 29900, 29897, 13, 9651, 1722, 29898, 5150, 29918, 4882, 29918, 1445, 29918, 2084, 29892, 525, 29893, 2824, 5358, 580, 13, 13, 4706, 736, 736, 29918, 791, 13, 1678, 736, 9056, 5103, 877, 2704, 29901, 21403, 16248, 742, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29892, 4660, 29922, 29946, 29900, 29946, 29897, 13, 13, 13, 1753, 903, 8411, 29918, 7507, 29918, 5327, 29898, 3827, 1125, 13, 1678, 9995, 910, 740, 338, 1304, 304, 679, 278, 6464, 2933, 310, 28733, 2009, 515, 2563, 735, 6464, 1813, 29889, 13, 13, 1678, 584, 3207, 2009, 29901, 3630, 2183, 304, 16759, 16248, 13, 1678, 584, 2457, 29901, 9056, 5103, 29889, 450, 2933, 8833, 373, 28733, 3988, 1813, 13, 1678, 9995, 13, 13, 1678, 24342, 29918, 333, 353, 2009, 29889, 7194, 29889, 657, 877, 3859, 1495, 13, 1678, 565, 451, 24342, 29918, 333, 29901, 13, 4706, 736, 9056, 5103, 877, 11432, 29901, 1094, 842, 3553, 451, 1476, 297, 3988, 29905, 29876, 8875, 4286, 4830, 29898, 3126, 29889, 29881, 17204, 29898, 3827, 29889, 7194, 8243, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29892, 4660, 29922, 29946, 29900, 29900, 29897, 13, 13, 1678, 396, 5399, 363, 1059, 297, 3988, 13, 1678, 1059, 353, 2009, 29889, 7194, 29889, 657, 877, 2704, 1495, 13, 1678, 1059, 29918, 8216, 353, 2009, 29889, 7194, 29889, 657, 877, 2704, 29918, 8216, 1495, 13, 13, 1678, 396, 960, 727, 338, 385, 1059, 297, 2933, 13, 1678, 565, 1059, 29901, 13, 4706, 2643, 353, 525, 2392, 29901, 426, 29900, 29913, 4286, 4830, 29898, 2704, 29897, 13, 4706, 565, 1059, 29918, 8216, 29901, 13, 9651, 2643, 353, 22372, 29900, 29913, 25577, 29901, 426, 29896, 29913, 4286, 4830, 29898, 4906, 29892, 1059, 29918, 8216, 29897, 13, 4706, 736, 9056, 5103, 877, 6004, 4133, 426, 29900, 29913, 4286, 4830, 29898, 4906, 511, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29892, 4660, 29922, 29946, 29900, 29900, 29897, 13, 13, 1678, 775, 353, 2009, 29889, 7194, 29889, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 16524, 29897, 13, 13, 1678, 396, 960, 775, 338, 451, 3625, 13, 1678, 565, 451, 775, 29901, 13, 4706, 736, 9056, 5103, 877, 2392, 1550, 15585, 1218, 29905, 29876, 29912, 29900, 29913, 4286, 4830, 29898, 3126, 29889, 29881, 17204, 29898, 3827, 29889, 7194, 8243, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29892, 4660, 29922, 29946, 29900, 29900, 29897, 13, 13, 1678, 2106, 353, 903, 1359, 29918, 932, 29918, 3859, 29898, 24129, 29918, 333, 29897, 13, 1678, 2106, 29961, 8851, 29933, 5746, 29918, 10810, 29918, 16524, 29962, 353, 775, 13, 1678, 903, 7620, 29918, 932, 29918, 3859, 29898, 3859, 29892, 24342, 29918, 333, 29892, 6213, 29897, 13, 13, 1678, 736, 9056, 5103, 29898, 8851, 29933, 5746, 29918, 14605, 26925, 29918, 16524, 29918, 1525, 4741, 5667, 3352, 29918, 2303, 1799, 10461, 29892, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29897, 13, 13, 13, 1753, 903, 8411, 29918, 7507, 29918, 17886, 29898, 3827, 29892, 1820, 1125, 13, 1678, 9995, 910, 740, 338, 1304, 304, 6684, 6464, 2009, 304, 315, 275, 1111, 1856, 735, 6464, 1813, 29889, 13, 13, 1678, 584, 3207, 2009, 29901, 3630, 2183, 304, 16759, 16248, 13, 1678, 584, 3207, 1820, 29901, 7670, 304, 2740, 297, 2106, 934, 13, 1678, 584, 2457, 29901, 2933, 28733, 29918, 2271, 29914, 6406, 29918, 3200, 296, 29918, 2271, 13, 1678, 9995, 13, 13, 1678, 24342, 29918, 333, 353, 2009, 29889, 7194, 29889, 657, 877, 24129, 29918, 333, 1495, 13, 1678, 565, 451, 24342, 29918, 333, 29901, 13, 4706, 736, 9056, 5103, 877, 11432, 29901, 1094, 842, 3553, 451, 1476, 297, 3988, 742, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29892, 4660, 29922, 29946, 29900, 29900, 29897, 13, 1678, 2106, 353, 903, 1359, 29918, 932, 29918, 3859, 29898, 24129, 29918, 333, 29897, 13, 1678, 565, 451, 2106, 29901, 13, 4706, 736, 9056, 5103, 877, 11432, 29901, 21403, 24342, 29918, 333, 742, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29892, 4660, 29922, 29946, 29900, 29900, 29897, 13, 1678, 3142, 353, 2106, 29889, 657, 29898, 1989, 29897, 13, 1678, 565, 451, 3142, 29901, 13, 4706, 736, 9056, 5103, 877, 2052, 2106, 338, 8340, 29892, 426, 1989, 29913, 451, 1476, 29889, 4286, 4830, 29898, 1989, 29922, 1989, 511, 2793, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16975, 29892, 4660, 29922, 29946, 29900, 29900, 29897, 13, 1678, 2933, 353, 9056, 5103, 29898, 4882, 29922, 29941, 29900, 29906, 29897, 13, 1678, 2933, 1839, 6508, 2033, 353, 3142, 13, 1678, 736, 2933, 13, 13, 13, 1753, 903, 1359, 29918, 932, 29918, 3859, 29898, 24129, 29918, 333, 29892, 623, 29918, 11958, 2801, 29922, 8516, 1125, 13, 1678, 9995, 910, 740, 338, 1304, 304, 2254, 278, 1857, 2106, 934, 29889, 13, 13, 1678, 584, 3207, 24342, 29918, 333, 29901, 24342, 29918, 333, 13, 1678, 584, 3207, 623, 29918, 11958, 2801, 29901, 4669, 310, 623, 29918, 11958, 2801, 770, 13, 1678, 584, 2457, 29901, 2106, 29901, 9626, 2106, 934, 408, 263, 8600, 13, 1678, 9995, 13, 13, 1678, 24342, 29918, 333, 353, 851, 29898, 24129, 29918, 333, 29897, 13, 1678, 565, 451, 24342, 29918, 333, 470, 451, 24342, 29918, 333, 29889, 275, 284, 1949, 7295, 13, 4706, 565, 623, 29918, 11958, 2801, 29901, 13, 9651, 623, 29918, 11958, 2801, 29889, 8382, 29918, 2158, 877, 797, 903, 1359, 29918, 932, 29918, 3859, 29901, 21403, 24342, 29918, 333, 1495, 13, 4706, 736, 6571, 13, 13, 1678, 623, 29918, 3972, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 876, 13, 1678, 2106, 29918, 1445, 353, 22372, 29900, 6822, 29912, 29896, 2403, 3859, 29889, 3126, 4286, 4830, 29898, 932, 29918, 3972, 29892, 24342, 29918, 333, 29897, 13, 1678, 1855, 29918, 3859, 29918, 1445, 29918, 2084, 353, 2897, 29889, 2084, 29889, 370, 1028, 493, 29898, 3859, 29918, 1445, 29897, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 25721, 29898, 6370, 29918, 3859, 29918, 1445, 29918, 2084, 29897, 1275, 623, 29918, 3972, 29901, 13, 4706, 565, 623, 29918, 11958, 2801, 29901, 13, 9651, 623, 29918, 11958, 2801, 29889, 8382, 29918, 2158, 877, 797, 903, 1359, 29918, 932, 29918, 3859, 29901, 21403, 24342, 29918, 333, 1495, 13, 4706, 736, 6571, 13, 13, 1678, 2106, 353, 6571, 13, 1678, 1018, 29901, 13, 4706, 411, 1722, 29898, 6370, 29918, 3859, 29918, 1445, 29918, 2084, 29892, 525, 29878, 1495, 408, 2106, 29918, 1445, 29918, 5415, 29901, 13, 9651, 2106, 353, 4390, 29889, 1359, 29898, 3859, 29918, 1445, 29918, 5415, 29897, 13, 1678, 5174, 8960, 408, 321, 29901, 13, 4706, 565, 623, 29918, 11958, 2801, 29901, 13, 9651, 1059, 29918, 401, 29892, 1059, 29918, 7645, 353, 903, 657, 29918, 2704, 29918, 4906, 29918, 3166, 29918, 11739, 29898, 29872, 29897, 13, 9651, 623, 29918, 11958, 2801, 29889, 8382, 29918, 2158, 877, 797, 903, 1359, 29918, 932, 29918, 3859, 29901, 4829, 5920, 29901, 426, 29900, 1836, 4829, 7777, 29901, 426, 29896, 29913, 4286, 4830, 29898, 2704, 29918, 401, 29892, 1059, 29918, 7645, 876, 13, 13, 1678, 565, 623, 29918, 11958, 2801, 29901, 13, 4706, 623, 29918, 11958, 2801, 29889, 8382, 29918, 2158, 877, 29147, 2106, 29901, 13420, 2106, 29897, 13, 13, 1678, 736, 2106, 13, 13, 13, 1753, 903, 7620, 29918, 932, 29918, 3859, 29898, 3859, 29892, 24342, 29918, 333, 29892, 623, 29918, 11958, 2801, 29922, 8516, 1125, 13, 1678, 9995, 910, 740, 338, 1304, 304, 4078, 1857, 2106, 297, 934, 29889, 13, 13, 1678, 584, 3207, 2106, 29901, 13343, 607, 3743, 848, 304, 2436, 297, 2106, 934, 13, 1678, 584, 3207, 24342, 29918, 333, 29901, 24342, 29918, 333, 13, 1678, 584, 3207, 623, 29918, 11958, 2801, 29901, 4669, 310, 623, 29918, 11958, 2801, 770, 13, 1678, 584, 2457, 29901, 4660, 29901, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 29989, 27473, 29889, 20576, 29918, 11432, 13, 1678, 9995, 13, 13, 1678, 24342, 29918, 333, 353, 851, 29898, 24129, 29918, 333, 29897, 13, 1678, 565, 451, 24342, 29918, 333, 470, 451, 24342, 29918, 333, 29889, 275, 284, 1949, 7295, 13, 4706, 565, 623, 29918, 11958, 2801, 29901, 13, 9651, 623, 29918, 11958, 2801, 29889, 8382, 29918, 2158, 877, 797, 903, 7620, 29918, 932, 29918, 3859, 29901, 21403, 24342, 29918, 333, 1495, 13, 4706, 736, 6571, 13, 13, 1678, 623, 29918, 3972, 353, 2897, 29889, 2084, 29889, 5451, 22168, 1445, 1649, 9601, 29900, 29962, 13, 1678, 2106, 29918, 1445, 353, 22372, 29900, 6822, 29912, 29896, 2403, 3859, 29889, 3126, 4286, 4830, 29898, 932, 29918, 3972, 29892, 24342, 29918, 333, 29897, 13, 13, 1678, 1855, 29918, 3859, 29918, 1445, 29918, 2084, 353, 2897, 29889, 2084, 29889, 370, 1028, 493, 29898, 3859, 29918, 1445, 29897, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 25721, 29898, 6370, 29918, 3859, 29918, 1445, 29918, 2084, 29897, 1275, 623, 29918, 3972, 29901, 13, 4706, 565, 623, 29918, 11958, 2801, 29901, 13, 9651, 623, 29918, 11958, 2801, 29889, 8382, 29918, 2158, 877, 797, 903, 7620, 29918, 932, 29918, 3859, 29901, 21403, 24342, 29918, 333, 1495, 13, 4706, 736, 6571, 13, 13, 1678, 565, 623, 29918, 11958, 2801, 29901, 13, 4706, 623, 29918, 11958, 2801, 29889, 8382, 29918, 2158, 877, 29903, 5555, 2106, 29901, 13420, 2106, 29897, 13, 13, 1678, 1018, 29901, 13, 4706, 411, 1722, 29898, 6370, 29918, 3859, 29918, 1445, 29918, 2084, 29892, 525, 29893, 29974, 1495, 408, 2106, 29918, 1445, 29918, 5415, 29901, 13, 9651, 2106, 29918, 1445, 29918, 5415, 29889, 3539, 29898, 3126, 29889, 29881, 17204, 29898, 3859, 876, 13, 1678, 5174, 8960, 408, 321, 29901, 13, 4706, 1059, 29918, 401, 29892, 1059, 29918, 7645, 353, 903, 657, 29918, 2704, 29918, 4906, 29918, 3166, 29918, 11739, 29898, 29872, 29897, 13, 4706, 565, 623, 29918, 11958, 2801, 29901, 13, 9651, 623, 29918, 11958, 2801, 29889, 8382, 29918, 2158, 877, 2525, 519, 304, 4078, 2106, 934, 29901, 4829, 5920, 29901, 426, 29900, 1836, 4829, 7777, 29901, 426, 29896, 29913, 4286, 4830, 29898, 2704, 29918, 401, 29892, 1059, 29918, 7645, 876, 13, 4706, 736, 1374, 15762, 29889, 20576, 29918, 11432, 13, 13, 1678, 736, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 13, 13, 13, 1753, 903, 657, 29918, 3972, 29918, 978, 29918, 3166, 29918, 932, 29918, 978, 29898, 932, 29918, 978, 1125, 13, 1678, 9995, 3617, 1024, 310, 278, 3884, 363, 278, 623, 29889, 13, 13, 1678, 584, 3207, 623, 29918, 978, 29901, 4408, 310, 278, 2280, 363, 607, 3884, 1024, 338, 3734, 13, 1678, 584, 2457, 29901, 623, 29918, 978, 29901, 4408, 310, 278, 3884, 363, 278, 2280, 13, 1678, 9995, 13, 13, 1678, 623, 29918, 978, 353, 525, 4286, 7122, 4197, 29916, 363, 921, 297, 623, 29918, 978, 565, 921, 29889, 275, 284, 1949, 580, 2314, 13, 1678, 623, 29918, 978, 353, 623, 29918, 978, 29889, 13609, 580, 13, 1678, 565, 451, 623, 29918, 978, 29901, 13, 4706, 623, 29918, 978, 353, 525, 932, 29918, 1454, 29918, 27473, 29915, 13, 1678, 736, 623, 29918, 978, 13, 13, 13, 1990, 315, 275, 1111, 3609, 735, 20971, 2801, 29898, 5160, 20971, 2801, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 13, 4706, 396, 8251, 278, 7399, 17918, 943, 2069, 937, 13, 4706, 2428, 29898, 29907, 275, 1111, 3609, 735, 20971, 2801, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 4706, 1583, 3032, 2754, 29918, 1989, 353, 6213, 13, 4706, 1583, 3032, 3859, 353, 6213, 13, 4706, 1583, 3032, 4645, 29918, 333, 353, 6213, 13, 4706, 1583, 3032, 4645, 29918, 19024, 353, 6213, 13, 4706, 1583, 3032, 5943, 29918, 6979, 353, 6213, 13, 4706, 1583, 3032, 22379, 29918, 6979, 353, 6213, 13, 13, 4706, 396, 28736, 304, 4808, 263, 2967, 29918, 2271, 297, 1206, 278, 623, 3732, 16759, 5717, 13, 4706, 396, 1938, 4443, 393, 278, 623, 4390, 17645, 278, 24342, 2295, 29892, 577, 3113, 13, 4706, 396, 6623, 445, 408, 366, 316, 331, 6216, 29889, 13, 4706, 1583, 3032, 3188, 29918, 2271, 353, 6213, 13, 13, 1678, 822, 903, 5014, 29918, 6310, 29918, 276, 1713, 29898, 1311, 29892, 2933, 29892, 3158, 29918, 2914, 1125, 13, 13, 4706, 565, 2933, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 29901, 13, 9651, 736, 4649, 1440, 29898, 27473, 29889, 20576, 29918, 14605, 26925, 29892, 426, 1800, 13, 13, 4706, 736, 4649, 1440, 29898, 2467, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 399, 25752, 5746, 29918, 21662, 29918, 29923, 3580, 15631, 29918, 1525, 5550, 1164, 1660, 511, 6213, 29897, 13, 13, 1678, 822, 903, 5014, 29918, 1420, 29918, 5327, 29898, 1311, 29892, 2933, 29892, 3158, 29918, 2914, 1125, 13, 13, 4706, 396, 530, 3472, 2933, 29892, 7539, 372, 763, 385, 1059, 13, 4706, 4660, 29918, 401, 353, 2933, 29889, 4882, 29918, 401, 13, 13, 4706, 1018, 29901, 13, 9651, 22300, 353, 25685, 29903, 1132, 29898, 5327, 29889, 726, 29892, 376, 1420, 29889, 16680, 1159, 13, 9651, 1059, 29918, 726, 353, 22300, 29889, 726, 13, 9651, 6219, 29918, 9012, 353, 1059, 29918, 726, 29889, 5451, 28909, 29876, 1495, 13, 9651, 6219, 29918, 9012, 353, 518, 29916, 29889, 17010, 580, 363, 921, 297, 6219, 29918, 9012, 565, 921, 29889, 17010, 580, 29962, 13, 9651, 1059, 29918, 726, 353, 11297, 29876, 4286, 7122, 29898, 5451, 29918, 9012, 29897, 13, 4706, 5174, 29901, 13, 9651, 1059, 29918, 726, 353, 376, 29089, 6088, 1059, 4902, 29908, 13, 13, 4706, 2643, 353, 376, 5709, 5920, 29901, 426, 29900, 1836, 3630, 515, 1923, 3583, 29876, 29912, 29896, 1012, 29876, 1642, 4830, 29898, 4882, 29918, 401, 29892, 1059, 29918, 726, 29897, 13, 13, 4706, 2643, 353, 2643, 29889, 6506, 877, 29912, 742, 525, 6224, 2824, 6506, 877, 29913, 742, 525, 930, 1495, 13, 13, 4706, 736, 4649, 1440, 29898, 2467, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 2643, 511, 6213, 29897, 13, 13, 1678, 822, 903, 5014, 29918, 3126, 29918, 5327, 29898, 1311, 29892, 364, 29892, 3158, 29918, 2914, 1125, 13, 13, 4706, 396, 3967, 263, 4390, 6088, 13, 4706, 1018, 29901, 13, 9651, 4613, 29918, 3126, 353, 364, 29889, 3126, 580, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 736, 4649, 1440, 29898, 2467, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 376, 2525, 519, 304, 6088, 4663, 2933, 29889, 4829, 29901, 426, 29900, 29913, 1642, 4830, 29898, 710, 29898, 29872, 876, 511, 6213, 29897, 13, 13, 4706, 396, 3529, 6084, 278, 4660, 11561, 1244, 13, 4706, 565, 29871, 29906, 29900, 29900, 5277, 364, 29889, 4882, 29918, 401, 529, 29871, 29941, 29929, 29929, 29901, 13, 9651, 736, 4649, 1440, 29898, 27473, 29889, 20576, 29918, 14605, 26925, 29892, 4613, 29918, 3126, 29897, 13, 13, 4706, 396, 887, 881, 1889, 278, 1059, 4133, 297, 278, 4390, 13, 4706, 2643, 353, 376, 2392, 515, 1923, 29889, 16034, 5920, 29901, 426, 29900, 29913, 3630, 515, 1923, 29901, 426, 29896, 29913, 1642, 4830, 29898, 13, 9651, 364, 29889, 4882, 29918, 401, 29892, 364, 29889, 726, 29889, 6506, 877, 29912, 742, 525, 6224, 2824, 6506, 877, 29913, 742, 525, 930, 8785, 13, 13, 4706, 736, 4649, 1440, 29898, 2467, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 2643, 511, 6213, 29897, 13, 13, 1678, 822, 903, 5014, 29918, 5327, 29898, 1311, 29892, 364, 29892, 3158, 29918, 2914, 1125, 13, 4706, 396, 3787, 278, 364, 29918, 726, 297, 4744, 848, 29892, 372, 674, 679, 16766, 287, 297, 278, 10748, 565, 278, 3158, 8465, 13, 4706, 565, 364, 29889, 4882, 29918, 401, 1275, 29871, 29946, 29900, 29896, 29901, 13, 9651, 736, 4649, 1440, 29898, 2467, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 376, 6638, 5993, 338, 1518, 2859, 470, 8340, 4968, 6213, 29897, 13, 13, 4706, 565, 756, 5552, 29898, 2467, 29918, 2914, 29892, 525, 1202, 29918, 8382, 29918, 1272, 29374, 13, 9651, 3158, 29918, 2914, 29889, 1202, 29918, 8382, 29918, 1272, 3319, 29915, 29878, 29918, 4882, 29918, 401, 2396, 364, 29889, 4882, 29918, 401, 1800, 13, 9651, 3158, 29918, 2914, 29889, 1202, 29918, 8382, 29918, 1272, 3319, 29915, 29878, 29918, 726, 2396, 364, 29889, 726, 1800, 13, 9651, 3158, 29918, 2914, 29889, 1202, 29918, 8382, 29918, 1272, 3319, 29915, 29878, 29918, 13662, 2396, 364, 29889, 13662, 1800, 13, 13, 4706, 396, 10554, 1269, 525, 3916, 29899, 1542, 29915, 310, 2933, 16949, 13, 13, 4706, 396, 10554, 263, 4390, 2933, 13, 4706, 565, 525, 3126, 29915, 297, 364, 29889, 13662, 29889, 657, 877, 3916, 29899, 1542, 742, 6629, 1125, 13, 9651, 736, 1583, 3032, 5014, 29918, 3126, 29918, 5327, 29898, 29878, 29892, 3158, 29918, 2914, 29897, 13, 13, 4706, 396, 10554, 385, 4544, 27396, 344, 29892, 1938, 445, 694, 4383, 825, 278, 7882, 5969, 2039, 29889, 13, 4706, 396, 1670, 338, 263, 1880, 8825, 310, 263, 13756, 18454, 297, 1546, 1374, 15762, 322, 278, 1791, 310, 13, 4706, 396, 3186, 29892, 297, 1206, 310, 4436, 29892, 13756, 18454, 29915, 29879, 736, 4544, 29892, 445, 740, 610, 29879, 267, 13, 4706, 396, 278, 1059, 322, 12778, 372, 304, 278, 3158, 29918, 2914, 29889, 13, 4706, 565, 525, 1420, 29915, 297, 364, 29889, 13662, 29889, 657, 877, 3916, 29899, 1542, 742, 6629, 1125, 13, 9651, 736, 1583, 3032, 5014, 29918, 1420, 29918, 5327, 29898, 29878, 29892, 3158, 29918, 2914, 29897, 13, 13, 4706, 396, 372, 29915, 29879, 451, 2793, 29899, 1853, 393, 338, 304, 367, 21213, 29892, 4386, 385, 4069, 2933, 13, 4706, 565, 451, 364, 29889, 726, 29901, 13, 9651, 736, 1583, 3032, 5014, 29918, 6310, 29918, 276, 1713, 29898, 29878, 29892, 3158, 29918, 2914, 29897, 13, 13, 4706, 396, 4129, 1683, 338, 2869, 385, 1059, 472, 445, 1298, 13, 4706, 2643, 353, 376, 6028, 29915, 29873, 1889, 2933, 515, 1923, 29889, 16034, 5920, 29901, 426, 29900, 29913, 3630, 515, 1923, 29901, 426, 29896, 29913, 1642, 4830, 29898, 13, 9651, 364, 29889, 4882, 29918, 401, 29892, 364, 29889, 726, 29889, 6506, 877, 29912, 742, 525, 6224, 2824, 6506, 877, 29913, 742, 525, 930, 8785, 13, 13, 4706, 736, 4649, 1440, 29898, 2467, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 2643, 511, 6213, 29897, 13, 13, 1678, 822, 903, 5675, 29918, 5060, 29918, 4804, 29898, 1311, 29892, 16248, 29892, 3158, 29918, 2914, 29892, 9066, 29922, 8516, 29892, 8636, 29922, 8516, 29892, 848, 29922, 8516, 29892, 1158, 543, 657, 613, 11539, 29922, 8824, 1125, 13, 13, 4706, 4613, 29918, 3126, 353, 6213, 13, 13, 4706, 1018, 29901, 13, 9651, 2009, 29918, 9891, 353, 679, 5552, 29898, 24830, 29892, 1158, 29897, 13, 4706, 5174, 23833, 2392, 29901, 13, 9651, 736, 4649, 1440, 29898, 2467, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 376, 13919, 1158, 29901, 426, 29900, 29913, 1642, 4830, 29898, 5696, 8243, 4613, 29918, 3126, 29897, 13, 13, 4706, 1018, 29901, 13, 9651, 364, 353, 2009, 29918, 9891, 29898, 29734, 29892, 4390, 29922, 1272, 29892, 9066, 29922, 13662, 29892, 11539, 29922, 27902, 29892, 8636, 29922, 7529, 29897, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1059, 29918, 7645, 353, 903, 657, 29918, 2704, 29918, 4906, 29918, 3166, 29918, 11739, 29898, 29872, 29897, 13, 9651, 736, 4649, 1440, 29898, 2467, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 376, 2392, 14971, 292, 304, 1923, 29889, 25577, 29901, 426, 29900, 5038, 13, 462, 462, 462, 259, 869, 4830, 29898, 2704, 29918, 7645, 8243, 4613, 29918, 3126, 29897, 13, 13, 4706, 736, 1583, 3032, 5014, 29918, 5327, 29898, 29878, 29892, 3158, 29918, 2914, 29897, 13, 13, 1678, 822, 903, 657, 29918, 24129, 29918, 978, 29898, 1311, 29892, 3158, 29918, 2914, 1125, 13, 4706, 9995, 3617, 1024, 310, 278, 24342, 773, 1963, 15762, 3988, 29889, 13, 13, 4706, 584, 3207, 3158, 29918, 2914, 29901, 1203, 310, 9123, 3591, 770, 13, 4706, 584, 2457, 29901, 4660, 1374, 15762, 29889, 20576, 29918, 11432, 29914, 27473, 29889, 20576, 29918, 14605, 26925, 29898, 284, 549, 411, 8210, 2643, 511, 24342, 1024, 13, 4706, 9995, 13, 13, 4706, 24342, 29918, 333, 353, 1583, 29889, 657, 29918, 24129, 29918, 333, 580, 13, 4706, 1791, 29918, 29734, 353, 349, 29950, 2190, 4986, 29924, 29918, 3289, 10490, 29918, 1430, 11191, 6992, 29911, 29889, 4830, 29898, 24129, 29918, 333, 29922, 24129, 29918, 333, 29897, 13, 4706, 3142, 353, 22372, 1157, 29913, 4286, 4830, 29898, 1311, 29889, 657, 29918, 27473, 29918, 3188, 29918, 2271, 580, 718, 525, 5060, 742, 1791, 29918, 29734, 29897, 13, 4706, 3240, 29918, 791, 29892, 4613, 29918, 3126, 353, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29892, 16248, 29922, 2271, 29897, 13, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3240, 29918, 791, 29892, 6213, 13, 13, 4706, 24342, 29918, 978, 353, 4613, 29918, 3126, 29889, 657, 877, 978, 1495, 13, 4706, 565, 451, 24342, 29918, 978, 29901, 13, 9651, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 399, 25752, 5746, 29918, 21662, 29918, 3289, 10490, 29918, 5813, 29918, 12256, 29918, 5800, 18783, 29889, 4830, 29898, 24129, 29918, 333, 511, 6213, 29897, 13, 13, 4706, 736, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 29892, 24342, 29918, 978, 13, 13, 1678, 822, 903, 657, 29918, 27473, 29918, 3188, 29918, 2271, 29898, 1311, 29892, 3158, 29918, 2914, 1125, 13, 4706, 9995, 3617, 2967, 3142, 310, 1374, 15762, 29889, 13, 13, 4706, 584, 3207, 3158, 29918, 2914, 29901, 1203, 310, 9123, 3591, 770, 13, 4706, 584, 2457, 29901, 4660, 1374, 15762, 29889, 20576, 29918, 11432, 29914, 27473, 29889, 20576, 29918, 14605, 26925, 29898, 284, 549, 411, 8210, 2643, 511, 13, 4706, 2967, 3142, 310, 1374, 15762, 13, 4706, 9995, 13, 13, 4706, 3142, 353, 22372, 29900, 1157, 29896, 1157, 29906, 29913, 4286, 4830, 29898, 5160, 20971, 2801, 3032, 657, 29918, 27473, 29918, 3188, 29918, 2271, 3285, 525, 5060, 742, 349, 29950, 2190, 4986, 29924, 29918, 14816, 1254, 12665, 29918, 11690, 29918, 1430, 11191, 6992, 29911, 29897, 13, 4706, 3240, 29918, 791, 29892, 4613, 29918, 3126, 353, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29892, 16248, 29922, 2271, 29892, 11539, 29922, 8824, 29897, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3240, 29918, 791, 29892, 6213, 13, 13, 4706, 1374, 15762, 29918, 3188, 29918, 2271, 353, 4613, 29918, 3126, 29889, 657, 877, 3188, 29918, 2271, 1495, 13, 4706, 565, 451, 1374, 15762, 29918, 3188, 29918, 2271, 29901, 13, 9651, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 399, 25752, 5746, 29918, 21662, 29918, 19689, 2190, 4986, 29924, 29918, 25416, 29918, 4219, 29918, 12256, 29918, 5800, 18783, 511, 6213, 13, 13, 4706, 736, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 29892, 1374, 15762, 29918, 3188, 29918, 2271, 29889, 29878, 17010, 11219, 1495, 13, 13, 1678, 822, 903, 657, 29918, 932, 29918, 5060, 29918, 2271, 29898, 1311, 29892, 3158, 29918, 2914, 1125, 13, 4706, 9995, 3617, 3988, 363, 3907, 1791, 5717, 29889, 13, 13, 4706, 584, 3207, 3158, 29918, 2914, 29901, 1203, 310, 9123, 3591, 770, 13, 4706, 584, 2457, 29901, 4660, 1374, 15762, 29889, 20576, 29918, 11432, 29914, 27473, 29889, 20576, 29918, 14605, 26925, 29898, 284, 549, 411, 8210, 2643, 511, 13, 4706, 3988, 304, 1207, 1791, 5717, 13, 4706, 9995, 13, 13, 4706, 3240, 29918, 791, 29892, 1374, 15762, 29918, 3188, 29918, 2271, 353, 1583, 3032, 657, 29918, 27473, 29918, 3188, 29918, 2271, 29898, 2467, 29918, 2914, 29897, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 3285, 6213, 13, 13, 4706, 3240, 29918, 791, 29892, 24342, 29918, 978, 353, 1583, 3032, 657, 29918, 24129, 29918, 978, 29898, 2467, 29918, 2914, 29897, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 3285, 6213, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 877, 15156, 1963, 15762, 2967, 3988, 408, 29901, 426, 29900, 29913, 4286, 4830, 29898, 27473, 29918, 3188, 29918, 2271, 876, 13, 4706, 623, 29918, 3126, 353, 1583, 29889, 657, 29918, 932, 29918, 3126, 580, 13, 4706, 623, 29918, 978, 353, 623, 29918, 3126, 1839, 978, 2033, 13, 13, 4706, 623, 29918, 3972, 29918, 978, 353, 903, 657, 29918, 3972, 29918, 978, 29918, 3166, 29918, 932, 29918, 978, 29898, 932, 29918, 978, 29897, 13, 4706, 3142, 29918, 517, 29918, 932, 29918, 5060, 353, 22372, 29900, 6822, 5060, 29914, 13789, 19248, 29896, 3227, 29906, 6822, 29912, 29941, 29913, 4286, 4830, 29898, 27473, 29918, 3188, 29918, 2271, 29892, 623, 29918, 3972, 29918, 978, 29892, 623, 29918, 3126, 1839, 932, 333, 7464, 13, 462, 462, 462, 18884, 24342, 29918, 978, 29897, 13, 4706, 736, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 29892, 3142, 29918, 517, 29918, 932, 29918, 5060, 13, 13, 1678, 822, 903, 17158, 29918, 1482, 29918, 5943, 29918, 6979, 29898, 1311, 29892, 3158, 29918, 2914, 29892, 848, 1125, 13, 4706, 9995, 910, 740, 338, 1304, 304, 5706, 716, 2130, 5993, 773, 278, 775, 7625, 373, 28733, 29889, 13, 29879, 13, 4706, 584, 3207, 3158, 29918, 2914, 29901, 1203, 310, 9123, 3591, 770, 13, 4706, 584, 3207, 848, 29901, 3630, 304, 3638, 297, 16759, 1246, 13, 4706, 584, 2457, 29901, 4660, 1374, 15762, 29889, 20576, 29918, 11432, 29914, 27473, 29889, 20576, 29918, 14605, 26925, 13, 4706, 9995, 13, 13, 4706, 12428, 29918, 2271, 353, 22372, 1157, 29913, 4286, 4830, 29898, 1311, 3032, 3188, 29918, 2271, 29892, 399, 25752, 5746, 29918, 2477, 23524, 29918, 4986, 29968, 1430, 29918, 1430, 11191, 6992, 29911, 29897, 13, 4706, 3240, 29918, 791, 29892, 4613, 29918, 3126, 353, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29892, 16248, 29922, 7971, 29918, 2271, 29892, 13, 462, 462, 462, 29871, 848, 29922, 1272, 29892, 1158, 2433, 2490, 1495, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 396, 960, 727, 338, 738, 1059, 1550, 14655, 2130, 29918, 6979, 29892, 3450, 3639, 29871, 29906, 29900, 29900, 411, 1059, 322, 1059, 29918, 8216, 4235, 13, 4706, 565, 451, 4613, 29918, 3126, 29889, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 2477, 23524, 29918, 4986, 29968, 1430, 1125, 13, 9651, 565, 4613, 29918, 3126, 29889, 657, 877, 4906, 29374, 13, 18884, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 4660, 29918, 4906, 29922, 13713, 29918, 3126, 1839, 4906, 11287, 13, 13, 9651, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 4660, 29918, 4906, 2433, 2392, 1550, 14655, 2130, 29918, 6979, 1495, 13, 13, 4706, 1583, 3032, 3859, 29961, 8851, 29933, 5746, 29918, 10810, 29918, 4986, 29968, 1430, 29962, 353, 4613, 29918, 3126, 13, 4706, 1583, 29889, 7620, 29918, 3859, 29898, 1311, 3032, 3859, 29897, 13, 4706, 903, 7620, 29918, 932, 29918, 3859, 29898, 1311, 3032, 3859, 29892, 1583, 29889, 657, 29918, 24129, 29918, 333, 3285, 1583, 29897, 13, 4706, 1583, 3032, 3859, 353, 1583, 29889, 1359, 29918, 3859, 580, 13, 13, 4706, 1583, 3032, 5943, 29918, 6979, 353, 4613, 29918, 3126, 29961, 8851, 29933, 5746, 29918, 10810, 29918, 2477, 23524, 29918, 4986, 29968, 1430, 29962, 13, 4706, 1583, 3032, 22379, 29918, 6979, 353, 4613, 29918, 3126, 29961, 8851, 29933, 5746, 29918, 10810, 29918, 25866, 1525, 7068, 29918, 4986, 29968, 1430, 29962, 13, 13, 4706, 396, 2522, 24893, 448, 13, 4706, 396, 13, 4706, 396, 960, 278, 6590, 2106, 934, 1838, 29915, 29873, 505, 278, 1959, 12271, 29892, 12271, 2318, 470, 11239, 29892, 13, 4706, 396, 278, 15141, 5759, 5993, 338, 451, 1641, 7160, 304, 2106, 934, 322, 18428, 27321, 363, 278, 5993, 756, 1063, 11084, 29889, 13, 4706, 396, 1105, 591, 505, 304, 1423, 393, 5993, 515, 2933, 322, 5993, 607, 338, 7160, 304, 2106, 934, 1156, 9150, 12623, 310, 278, 716, 5993, 526, 278, 1021, 470, 451, 29889, 13, 13, 4706, 565, 1583, 3032, 5943, 29918, 6979, 2804, 1583, 3032, 3859, 29889, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 4986, 29968, 1430, 29892, 6571, 467, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 2477, 23524, 29918, 4986, 29968, 1430, 1125, 13, 9651, 2643, 353, 376, 2392, 10761, 1550, 14238, 278, 15141, 5759, 2130, 5993, 313, 262, 2058, 310, 278, 1518, 2859, 5993, 29897, 297, 278, 2106, 934, 1213, 13, 9651, 2643, 4619, 376, 3529, 1423, 278, 12271, 29892, 12271, 2318, 29892, 322, 278, 11239, 310, 278, 2106, 934, 29889, 450, 1963, 15762, 376, 13, 9651, 2643, 4619, 376, 1792, 881, 505, 278, 1959, 2130, 10462, 322, 27428, 363, 278, 6590, 2106, 934, 313, 20275, 304, 278, 1303, 1004, 934, 363, 901, 2472, 467, 29908, 13, 9651, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 2643, 29897, 13, 13, 4706, 736, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 13, 13, 1678, 822, 903, 10685, 29898, 1311, 29892, 3158, 29918, 2914, 1125, 13, 4706, 9995, 910, 740, 338, 1304, 304, 4808, 278, 3158, 3428, 1404, 6464, 29889, 13, 13, 4706, 584, 3207, 3158, 29918, 2914, 29901, 4669, 310, 9123, 3591, 770, 13, 4706, 584, 2457, 29901, 4660, 313, 8698, 29914, 26061, 29897, 13, 4706, 9995, 13, 13, 4706, 623, 29918, 3972, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 876, 13, 4706, 396, 934, 304, 1423, 3692, 278, 2009, 756, 1063, 16896, 470, 451, 13, 4706, 4817, 29918, 4882, 29918, 1445, 29918, 2084, 353, 22372, 29900, 6822, 29912, 29896, 3227, 29906, 29913, 4286, 4830, 29898, 932, 29918, 3972, 29892, 1583, 29889, 657, 29918, 24129, 29918, 333, 3285, 525, 23106, 29918, 7662, 29889, 449, 1495, 13, 4706, 931, 29918, 449, 353, 7700, 13, 13, 4706, 396, 4480, 29899, 2230, 1550, 2009, 338, 1641, 16896, 13, 4706, 363, 903, 297, 3464, 29898, 29949, 20656, 29950, 29918, 12982, 1806, 29918, 23845, 8932, 29903, 1125, 13, 9651, 1583, 29889, 6717, 29918, 18035, 877, 15716, 292, 856, 1495, 13, 9651, 565, 2897, 29889, 2084, 29889, 275, 1445, 29898, 5150, 29918, 4882, 29918, 1445, 29918, 2084, 1125, 13, 18884, 931, 29918, 449, 353, 5852, 13, 18884, 2897, 29889, 348, 2324, 29898, 5150, 29918, 4882, 29918, 1445, 29918, 2084, 29897, 13, 18884, 2867, 13, 9651, 931, 29889, 17059, 29898, 29949, 20656, 29950, 29918, 12982, 1806, 29918, 15307, 29897, 13, 13, 4706, 565, 451, 931, 29918, 449, 29901, 13, 9651, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 4660, 29918, 4906, 29922, 8851, 29933, 5746, 29918, 21662, 29918, 15307, 12015, 29897, 13, 4706, 1583, 29889, 6717, 29918, 18035, 877, 6444, 4173, 630, 1495, 13, 4706, 736, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 13, 13, 1678, 822, 903, 5504, 29918, 3827, 29898, 1311, 29892, 3158, 29918, 2914, 29892, 16248, 29892, 9066, 29922, 8516, 29892, 8636, 29922, 8516, 29892, 848, 29922, 8516, 29892, 1158, 2433, 657, 29374, 13, 4706, 9995, 910, 740, 338, 1304, 304, 2767, 278, 9066, 411, 2130, 29918, 6979, 1434, 3907, 16759, 1246, 29889, 13, 13, 4706, 584, 3207, 16248, 29901, 16759, 16248, 393, 4225, 304, 623, 2760, 304, 278, 2669, 3211, 13, 4706, 584, 3207, 3158, 29918, 2914, 29901, 1203, 310, 9123, 3591, 770, 13, 4706, 584, 3207, 9066, 29901, 2009, 9066, 13, 4706, 584, 3207, 8636, 29901, 2009, 4128, 13, 4706, 584, 3207, 848, 29901, 2009, 3573, 13, 4706, 584, 3207, 1158, 29901, 12354, 29914, 5438, 29914, 12336, 29914, 2287, 18476, 29914, 29925, 14789, 313, 4592, 674, 367, 12354, 29897, 13, 4706, 584, 2457, 29901, 4660, 1374, 15762, 29889, 20576, 29918, 11432, 29914, 27473, 29889, 20576, 29918, 14605, 26925, 29898, 284, 549, 411, 8210, 2643, 511, 13, 4706, 2933, 7625, 491, 3907, 385, 3450, 1246, 13, 4706, 9995, 13, 13, 4706, 565, 451, 16248, 29889, 27382, 2541, 29898, 1311, 3032, 3188, 29918, 2271, 1125, 13, 9651, 16248, 353, 22372, 29900, 1157, 29896, 29913, 4286, 4830, 29898, 1311, 3032, 3188, 29918, 2271, 29892, 16248, 29897, 13, 13, 4706, 565, 9066, 338, 6213, 29901, 13, 9651, 9066, 353, 6571, 13, 13, 4706, 5993, 29918, 1272, 353, 426, 13, 9651, 399, 25752, 5746, 29918, 10810, 29918, 27205, 3919, 29918, 1367, 29901, 1583, 3032, 4645, 29918, 333, 29892, 13, 9651, 399, 25752, 5746, 29918, 10810, 29918, 1660, 22245, 29911, 29901, 1583, 3032, 4645, 29918, 19024, 29892, 13, 9651, 399, 25752, 5746, 29918, 10810, 29918, 14345, 13566, 29918, 11116, 29901, 399, 25752, 5746, 29918, 10810, 29918, 25866, 1525, 7068, 29918, 4986, 29968, 1430, 29892, 13, 9651, 399, 25752, 5746, 29918, 10810, 29918, 25866, 1525, 7068, 29918, 4986, 29968, 1430, 29901, 1583, 3032, 22379, 29918, 6979, 13, 4706, 500, 13, 13, 4706, 565, 451, 1583, 3032, 5943, 29918, 6979, 29901, 13, 9651, 565, 451, 1583, 3032, 22379, 29918, 6979, 29901, 13, 18884, 396, 960, 5642, 310, 278, 2130, 29918, 6979, 322, 11086, 29918, 6979, 338, 3625, 13, 18884, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 4660, 29918, 4906, 29922, 8851, 29933, 5746, 29918, 21662, 29918, 4986, 29968, 1430, 29918, 12256, 29918, 26612, 6227, 6181, 511, 6213, 13, 13, 9651, 396, 960, 11086, 29918, 6979, 338, 3625, 322, 2130, 29918, 6979, 338, 451, 3625, 29892, 5706, 716, 2130, 29918, 6979, 13, 9651, 4660, 353, 1583, 3032, 17158, 29918, 1482, 29918, 5943, 29918, 6979, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29892, 848, 29922, 6979, 29918, 1272, 29897, 13, 13, 9651, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 4882, 1125, 13, 18884, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 3285, 6213, 13, 13, 4706, 9066, 29889, 5504, 3319, 29915, 25471, 2396, 525, 29933, 799, 261, 426, 29900, 29913, 4286, 4830, 29898, 1311, 3032, 5943, 29918, 6979, 26972, 13, 4706, 565, 451, 9066, 29889, 657, 877, 3916, 29899, 1542, 29374, 13, 9651, 9066, 29889, 5504, 3319, 29915, 3916, 29899, 1542, 2396, 525, 6214, 29914, 3126, 29915, 1800, 13, 13, 4706, 3240, 29918, 791, 29892, 4613, 29918, 3126, 353, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29892, 16248, 29922, 29734, 29892, 9066, 29922, 13662, 29892, 13, 462, 462, 462, 29871, 8636, 29922, 7529, 29892, 848, 29922, 1272, 29892, 1158, 29922, 5696, 29897, 13, 13, 4706, 396, 960, 5993, 338, 1518, 2859, 29892, 5706, 716, 5993, 13, 4706, 565, 525, 6638, 5993, 338, 1518, 2859, 470, 8340, 29915, 297, 3158, 29918, 2914, 29889, 657, 29918, 4906, 7295, 13, 9651, 4660, 353, 1583, 3032, 17158, 29918, 1482, 29918, 5943, 29918, 6979, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29892, 848, 29922, 6979, 29918, 1272, 29897, 13, 13, 9651, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 4882, 1125, 13, 18884, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 3285, 6213, 13, 13, 9651, 9066, 29889, 5504, 3319, 29915, 25471, 2396, 525, 29933, 799, 261, 426, 29900, 29913, 4286, 4830, 29898, 1311, 3032, 5943, 29918, 6979, 26972, 13, 9651, 3240, 29918, 791, 29892, 4613, 29918, 3126, 353, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29892, 16248, 29922, 29734, 29892, 9066, 29922, 13662, 29892, 13, 462, 462, 462, 418, 8636, 29922, 7529, 29892, 848, 29922, 1272, 29892, 1158, 29922, 5696, 29897, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 3285, 6213, 13, 13, 4706, 736, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 29892, 4613, 29918, 3126, 13, 13, 1678, 822, 903, 8411, 29918, 1688, 29918, 6915, 2068, 29898, 1311, 29892, 1828, 1125, 13, 13, 4706, 3158, 29918, 2914, 353, 1583, 29889, 1202, 29918, 2467, 29918, 2914, 29898, 4276, 3591, 29898, 8977, 29898, 3207, 4961, 13, 13, 4706, 623, 29918, 3859, 353, 6571, 13, 4706, 1583, 29889, 7620, 29918, 18035, 703, 7211, 1218, 3450, 7670, 1159, 13, 13, 4706, 396, 960, 3450, 1820, 4864, 29892, 14993, 3262, 288, 6444, 10760, 13, 4706, 565, 1583, 3032, 2754, 29918, 1989, 29901, 13, 9651, 3240, 29918, 791, 29892, 2933, 353, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29918, 4746, 29918, 2754, 29918, 1989, 29898, 8851, 29933, 5746, 29918, 7194, 29918, 1672, 29949, 4345, 29918, 1430, 11191, 6992, 29911, 29892, 3158, 29918, 2914, 29892, 8636, 29922, 8516, 29897, 13, 9651, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 18884, 1583, 29889, 7620, 29918, 18035, 29898, 8851, 29933, 5746, 29918, 21662, 29918, 18267, 29918, 6007, 8186, 1783, 5667, 11937, 29897, 13, 18884, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 9651, 1583, 29889, 7620, 29918, 18035, 29898, 8851, 29933, 5746, 29918, 14605, 26925, 29918, 18267, 29918, 6007, 8186, 1783, 5667, 11937, 29897, 13, 9651, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 14605, 26925, 29897, 13, 13, 4706, 396, 3617, 2847, 16759, 3988, 13, 4706, 3240, 29918, 791, 29892, 623, 29918, 5060, 29918, 2271, 353, 1583, 3032, 657, 29918, 932, 29918, 5060, 29918, 2271, 29898, 2467, 29918, 2914, 29897, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 1583, 29889, 7620, 29918, 18035, 703, 15078, 3988, 451, 3625, 29889, 4829, 29901, 426, 2704, 29913, 1642, 4830, 29898, 2704, 29922, 2467, 29918, 2914, 29889, 657, 29918, 4906, 22130, 13, 9651, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 4660, 29918, 4906, 543, 3057, 14971, 2068, 18390, 1159, 13, 13, 4706, 396, 22871, 847, 2914, 304, 1653, 6684, 29918, 5338, 13, 4706, 6684, 29918, 5338, 353, 22372, 29900, 6822, 2914, 4286, 4830, 29898, 932, 29918, 5060, 29918, 2271, 29897, 13, 4706, 623, 29918, 3859, 29961, 8851, 29933, 5746, 29918, 10810, 29918, 1525, 4571, 26282, 29918, 15551, 29962, 353, 6684, 29918, 5338, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 703, 15156, 438, 6444, 3988, 29901, 1159, 13, 4706, 1583, 29889, 7620, 29918, 18035, 29898, 17886, 29918, 5338, 29897, 13, 13, 4706, 396, 13361, 2133, 3988, 1304, 304, 1207, 2009, 363, 2805, 775, 607, 338, 1304, 304, 5706, 2130, 5993, 13, 4706, 28733, 29918, 2271, 353, 26524, 29950, 1955, 26664, 8098, 29918, 4219, 29889, 4830, 29898, 4645, 29918, 333, 29922, 1311, 3032, 4645, 29918, 333, 29892, 13, 462, 462, 462, 268, 6684, 29918, 5338, 29922, 17886, 29918, 5338, 29892, 13, 462, 462, 462, 268, 2933, 29918, 1853, 29922, 8851, 29933, 5746, 29918, 10810, 29918, 16524, 29892, 13, 462, 462, 462, 268, 2106, 29922, 1311, 29889, 657, 29918, 24129, 29918, 333, 3285, 13, 462, 462, 462, 268, 6874, 29922, 29903, 3217, 4162, 29897, 13, 13, 4706, 28733, 29918, 2271, 353, 22372, 1157, 29913, 4286, 4830, 29898, 1311, 3032, 3188, 29918, 2271, 29892, 28733, 29918, 2271, 29897, 13, 4706, 623, 29918, 3859, 1839, 8921, 2133, 29918, 2271, 2033, 353, 28733, 29918, 2271, 13, 13, 4706, 396, 3988, 607, 723, 367, 4318, 304, 278, 1404, 13, 4706, 3142, 29918, 1454, 29918, 8921, 675, 29918, 3827, 353, 22372, 29900, 6822, 2962, 29918, 23106, 29973, 24129, 29918, 333, 3790, 29896, 15704, 4286, 4830, 29898, 932, 29918, 5060, 29918, 2271, 29892, 1583, 29889, 657, 29918, 24129, 29918, 333, 3101, 13, 4706, 903, 7620, 29918, 932, 29918, 3859, 29898, 932, 29918, 3859, 29892, 1583, 29889, 657, 29918, 24129, 29918, 333, 3285, 1583, 29897, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 877, 12148, 4148, 675, 1404, 297, 263, 5004, 4434, 773, 3988, 1495, 13, 4706, 1583, 29889, 7620, 29918, 18035, 29898, 2271, 29918, 1454, 29918, 8921, 675, 29918, 3827, 29897, 13, 13, 4706, 396, 20340, 931, 363, 28733, 13, 4706, 931, 29889, 17059, 29898, 29896, 29945, 29897, 13, 13, 4706, 396, 20340, 363, 777, 1550, 1404, 6464, 304, 315, 275, 1111, 1856, 735, 13, 4706, 4660, 353, 1583, 3032, 10685, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29897, 13, 13, 4706, 396, 2812, 2349, 2643, 304, 5712, 1833, 2643, 310, 10534, 13, 4706, 1583, 29889, 6717, 29918, 18035, 877, 1495, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 4882, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 877, 3399, 24328, 2347, 1495, 13, 4706, 1583, 3032, 3859, 353, 903, 1359, 29918, 932, 29918, 3859, 29898, 1311, 29889, 657, 29918, 24129, 29918, 333, 3285, 1583, 29897, 13, 13, 4706, 396, 565, 775, 338, 451, 3625, 297, 278, 2106, 934, 13, 4706, 565, 451, 1583, 3032, 3859, 470, 451, 1583, 3032, 3859, 29889, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 16524, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 4660, 29918, 4906, 29922, 8851, 29933, 5746, 29918, 21662, 29918, 18267, 29918, 6007, 8186, 1783, 5667, 11937, 29897, 13, 13, 4706, 1857, 29918, 401, 353, 1583, 3032, 3859, 29961, 8851, 29933, 5746, 29918, 10810, 29918, 16524, 29962, 13, 4706, 1583, 29889, 7620, 29918, 3859, 29898, 1311, 3032, 3859, 29897, 13, 4706, 903, 7620, 29918, 932, 29918, 3859, 29898, 1311, 3032, 3859, 29892, 1583, 29889, 657, 29918, 24129, 29918, 333, 3285, 1583, 29897, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 877, 5631, 1218, 2130, 5993, 1495, 13, 13, 4706, 848, 353, 426, 13, 9651, 399, 25752, 5746, 29918, 10810, 29918, 27205, 3919, 29918, 1367, 29901, 1583, 3032, 4645, 29918, 333, 29892, 13, 9651, 399, 25752, 5746, 29918, 10810, 29918, 1660, 22245, 29911, 29901, 1583, 3032, 4645, 29918, 19024, 29892, 13, 9651, 399, 25752, 5746, 29918, 10810, 29918, 14345, 13566, 29918, 11116, 29901, 525, 8921, 2133, 29918, 401, 742, 13, 9651, 399, 25752, 5746, 29918, 10810, 29918, 1525, 4571, 26282, 29918, 15551, 29901, 6684, 29918, 5338, 29892, 13, 9651, 399, 25752, 5746, 29918, 10810, 29918, 16524, 29901, 1857, 29918, 401, 13, 4706, 500, 13, 13, 4706, 396, 1152, 937, 931, 2130, 29892, 716, 2130, 5993, 338, 5759, 13, 4706, 3240, 29918, 791, 353, 1583, 3032, 17158, 29918, 1482, 29918, 5943, 29918, 6979, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29892, 848, 29922, 1272, 29897, 13, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 1583, 29889, 7620, 29918, 18035, 29898, 8851, 29933, 5746, 29918, 21662, 29918, 18267, 29918, 6007, 8186, 1783, 5667, 11937, 29897, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 877, 2577, 1259, 5235, 1048, 278, 19600, 304, 11539, 5993, 1495, 13, 13, 4706, 3142, 353, 22372, 1157, 29913, 4286, 4830, 29898, 1311, 3032, 3188, 29918, 2271, 29892, 399, 25752, 5746, 29918, 7194, 29918, 1672, 29949, 4345, 29918, 1430, 11191, 6992, 29911, 29897, 13, 4706, 3240, 29918, 791, 29892, 2933, 353, 1583, 3032, 5504, 29918, 3827, 29898, 2467, 29918, 2914, 29922, 2467, 29918, 2914, 29892, 16248, 29922, 2271, 29897, 13, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 1583, 29889, 7620, 29918, 18035, 29898, 8851, 29933, 5746, 29918, 21662, 29918, 18267, 29918, 6007, 8186, 1783, 5667, 11937, 29897, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 877, 29954, 327, 5716, 4902, 8472, 1495, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 29898, 8851, 29933, 5746, 29918, 14605, 26925, 29918, 18267, 29918, 6007, 8186, 1783, 5667, 11937, 29897, 13, 4706, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 14605, 26925, 29897, 13, 13, 1678, 822, 903, 5675, 29918, 5060, 29918, 4804, 29918, 4746, 29918, 2754, 29918, 1989, 29898, 1311, 29892, 16248, 29892, 3158, 29918, 2914, 29892, 8636, 29922, 8516, 29892, 848, 29922, 8516, 29892, 1158, 543, 657, 613, 11539, 29922, 8824, 1125, 13, 13, 4706, 396, 6204, 263, 3988, 304, 4511, 304, 13, 4706, 3142, 353, 1583, 3032, 3188, 29918, 2271, 718, 16248, 13, 4706, 4817, 6066, 353, 376, 29933, 799, 261, 376, 718, 1583, 3032, 2754, 29918, 1989, 13, 4706, 9066, 353, 11117, 3916, 29899, 1542, 2396, 525, 6214, 29914, 3126, 742, 525, 25471, 2396, 4817, 6066, 29913, 13, 13, 4706, 736, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29898, 2271, 29892, 3158, 29918, 2914, 29892, 8636, 29922, 7529, 29892, 9066, 29922, 13662, 29892, 848, 29922, 1272, 29892, 1158, 29922, 5696, 29892, 11539, 29922, 27902, 29897, 13, 13, 1678, 822, 903, 8411, 29918, 1761, 29918, 18901, 29898, 1311, 29892, 1828, 1125, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 703, 797, 3158, 7834, 363, 29901, 426, 29900, 29913, 1642, 4830, 29898, 1311, 29889, 657, 29918, 2467, 29918, 25378, 22130, 13, 13, 4706, 3158, 29918, 2914, 353, 1583, 29889, 1202, 29918, 2467, 29918, 2914, 29898, 4276, 3591, 29898, 8977, 29898, 3207, 4961, 13, 13, 4706, 565, 1583, 3032, 2754, 29918, 1989, 29901, 13, 9651, 3240, 29918, 791, 29892, 2933, 353, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29918, 4746, 29918, 2754, 29918, 1989, 29898, 8851, 29933, 5746, 29918, 7194, 29918, 1672, 29949, 4345, 29918, 1430, 11191, 6992, 29911, 29892, 3158, 29918, 2914, 29897, 13, 4706, 1683, 29901, 13, 9651, 3240, 29918, 791, 29892, 2933, 353, 1583, 3032, 5504, 29918, 3827, 29898, 2467, 29918, 2914, 29892, 399, 25752, 5746, 29918, 7194, 29918, 1672, 29949, 4345, 29918, 1430, 11191, 6992, 29911, 29897, 13, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 15837, 353, 3158, 29918, 2914, 29889, 5504, 29918, 7727, 3319, 29915, 7827, 29918, 18901, 2396, 29871, 29900, 1800, 13, 4706, 4613, 29918, 1767, 353, 2933, 29889, 657, 877, 7076, 742, 518, 2314, 13, 4706, 565, 1134, 29898, 13713, 29918, 1767, 29897, 2804, 1051, 29901, 13, 9651, 4613, 29918, 1767, 353, 518, 13713, 29918, 1767, 29962, 13, 13, 4706, 363, 16256, 29918, 667, 297, 4613, 29918, 1767, 29901, 13, 9651, 3158, 29918, 2914, 29889, 1202, 29918, 1272, 29898, 21962, 29918, 667, 29897, 13, 13, 4706, 15837, 1839, 7827, 29918, 18901, 2033, 353, 3158, 29918, 2914, 29889, 657, 29918, 1272, 29918, 2311, 580, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 14605, 26925, 29897, 13, 13, 1678, 822, 903, 8411, 29918, 657, 29918, 1792, 29898, 1311, 29892, 1828, 1125, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 703, 797, 3158, 7834, 363, 29901, 426, 29900, 29913, 1642, 4830, 29898, 1311, 29889, 657, 29918, 2467, 29918, 25378, 22130, 13, 13, 4706, 3158, 29918, 2914, 353, 1583, 29889, 1202, 29918, 2467, 29918, 2914, 29898, 4276, 3591, 29898, 8977, 29898, 3207, 4961, 13, 4706, 21333, 29918, 29734, 353, 399, 25752, 5746, 29918, 7194, 29918, 11889, 29918, 1430, 11191, 6992, 29911, 29889, 4830, 29898, 3207, 1839, 5269, 29918, 7328, 11287, 13, 13, 4706, 565, 1583, 3032, 2754, 29918, 1989, 29901, 13, 9651, 3240, 29918, 791, 29892, 2933, 353, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29918, 4746, 29918, 2754, 29918, 1989, 29898, 5338, 29918, 29734, 29892, 3158, 29918, 2914, 29892, 8636, 29922, 8516, 29897, 13, 4706, 1683, 29901, 13, 9651, 3240, 29918, 791, 29892, 2933, 353, 1583, 3032, 5504, 29918, 3827, 29898, 2467, 29918, 2914, 29892, 21333, 29918, 29734, 29897, 13, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 15837, 353, 3158, 29918, 2914, 29889, 5504, 29918, 7727, 3319, 29915, 11940, 29918, 1792, 2396, 7700, 1800, 13, 4706, 4613, 29918, 1767, 353, 2933, 29889, 657, 877, 7076, 742, 518, 2314, 13, 13, 4706, 363, 4613, 297, 4613, 29918, 1767, 29901, 13, 9651, 3158, 29918, 2914, 29889, 1202, 29918, 1272, 29898, 13713, 29897, 13, 13, 4706, 338, 29918, 1792, 29918, 11940, 353, 5852, 565, 3158, 29918, 2914, 29889, 657, 29918, 1272, 29918, 2311, 580, 1405, 29871, 29900, 1683, 7700, 13, 4706, 15837, 1839, 11940, 29918, 1792, 2033, 353, 338, 29918, 1792, 29918, 11940, 13, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 565, 451, 338, 29918, 1792, 29918, 11940, 29901, 13, 9651, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 399, 25752, 5746, 29918, 21662, 29918, 11889, 29918, 12256, 29918, 5800, 18783, 29897, 13, 13, 4706, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 14605, 26925, 29897, 13, 13, 1678, 822, 903, 8411, 29918, 6717, 29918, 4906, 29898, 1311, 29892, 1828, 1125, 13, 13, 4706, 1583, 29889, 7620, 29918, 18035, 703, 797, 3158, 7834, 363, 29901, 426, 29900, 29913, 1642, 4830, 29898, 1311, 29889, 657, 29918, 2467, 29918, 25378, 22130, 13, 13, 4706, 3158, 29918, 2914, 353, 1583, 29889, 1202, 29918, 2467, 29918, 2914, 29898, 4276, 3591, 29898, 8977, 29898, 3207, 4961, 13, 4706, 1134, 353, 1828, 1839, 23848, 29918, 1853, 2033, 13, 4706, 565, 1134, 1275, 376, 1792, 1115, 13, 9651, 21333, 29918, 29734, 353, 399, 25752, 5746, 29918, 29903, 11794, 29918, 2303, 1799, 10461, 29918, 1430, 11191, 6992, 29911, 13, 9651, 1404, 29918, 333, 353, 1828, 1839, 29734, 29918, 333, 2033, 13, 9651, 2643, 353, 1828, 1839, 4906, 2033, 13, 9651, 848, 353, 11117, 517, 7435, 1204, 2396, 1404, 29918, 333, 29892, 525, 726, 2396, 2643, 29913, 13, 4706, 1683, 29901, 13, 9651, 21333, 29918, 29734, 353, 399, 25752, 5746, 29918, 29903, 11794, 29918, 2303, 1799, 10461, 29918, 1430, 11191, 6992, 29911, 13, 9651, 1404, 29918, 333, 353, 1828, 1839, 29734, 29918, 333, 2033, 13, 9651, 2643, 353, 1828, 1839, 4906, 2033, 13, 9651, 848, 353, 8853, 8345, 1204, 1115, 1404, 29918, 333, 29892, 376, 726, 1115, 2643, 29913, 13, 13, 4706, 565, 1583, 3032, 2754, 29918, 1989, 29901, 13, 9651, 3240, 29918, 791, 29892, 2933, 353, 1583, 3032, 5675, 29918, 5060, 29918, 4804, 29918, 4746, 29918, 2754, 29918, 1989, 29898, 5338, 29918, 29734, 29892, 3158, 29918, 2914, 29892, 848, 29922, 1272, 29892, 1158, 543, 2490, 1159, 13, 4706, 1683, 29901, 13, 9651, 3240, 29918, 791, 29892, 2933, 353, 1583, 3032, 5504, 29918, 3827, 29898, 2467, 29918, 2914, 29892, 21333, 29918, 29734, 29892, 848, 29922, 1272, 29892, 1158, 543, 2490, 1159, 13, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 3158, 29918, 2914, 29889, 1202, 29918, 1272, 29898, 5327, 29897, 13, 13, 4706, 2643, 353, 399, 25752, 5746, 29918, 14605, 26925, 29918, 29903, 11794, 29918, 2303, 1799, 10461, 13, 4706, 15837, 353, 3158, 29918, 2914, 29889, 5504, 29918, 7727, 3319, 1800, 13, 4706, 15837, 1839, 4906, 2033, 353, 2643, 13, 13, 4706, 565, 1374, 15762, 29889, 275, 29918, 14057, 29898, 2267, 29918, 791, 1125, 13, 9651, 736, 3158, 29918, 2914, 29889, 657, 29918, 4882, 580, 13, 13, 4706, 736, 3158, 29918, 2914, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 14605, 26925, 29892, 2643, 29897, 13, 13, 1678, 822, 4386, 29918, 2467, 29898, 1311, 29892, 1828, 1125, 13, 13, 4706, 3240, 29918, 791, 353, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 13, 13, 4706, 3158, 29918, 333, 353, 1583, 29889, 657, 29918, 2467, 29918, 25378, 580, 13, 13, 4706, 565, 3158, 29918, 333, 1275, 525, 1688, 29918, 6915, 2068, 2396, 13, 9651, 3240, 29918, 791, 353, 1583, 3032, 8411, 29918, 1688, 29918, 6915, 2068, 29898, 3207, 29897, 13, 13, 4706, 25342, 3158, 29918, 333, 1275, 525, 1761, 29918, 18901, 2396, 13, 9651, 3240, 29918, 791, 353, 1583, 3032, 8411, 29918, 1761, 29918, 18901, 29898, 3207, 29897, 13, 13, 4706, 25342, 3158, 29918, 333, 1275, 525, 657, 29918, 1792, 2396, 13, 9651, 3240, 29918, 791, 353, 1583, 3032, 8411, 29918, 657, 29918, 1792, 29898, 3207, 29897, 13, 13, 4706, 25342, 3158, 29918, 333, 1275, 525, 6717, 29918, 4906, 2396, 13, 9651, 3240, 29918, 791, 353, 1583, 3032, 8411, 29918, 6717, 29918, 4906, 29898, 3207, 29897, 13, 13, 4706, 736, 3240, 29918, 791, 13, 13, 1678, 822, 11905, 29898, 1311, 1125, 13, 13, 4706, 396, 16012, 278, 2106, 297, 11905, 29892, 671, 372, 304, 3787, 848, 13, 4706, 396, 393, 4225, 304, 367, 20592, 4822, 8820, 13, 4706, 1583, 3032, 3859, 353, 1583, 29889, 1359, 29918, 3859, 580, 13, 4706, 2295, 353, 1583, 29889, 657, 29918, 2917, 580, 13, 4706, 1583, 3032, 3188, 29918, 2271, 353, 350, 8127, 29918, 4219, 13, 4706, 1583, 3032, 2754, 29918, 1989, 353, 2295, 29889, 657, 877, 8921, 2133, 29918, 1989, 742, 6213, 29897, 13, 13, 4706, 1583, 3032, 4645, 29918, 333, 353, 2295, 29889, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 27205, 3919, 29918, 1367, 29892, 6213, 29897, 13, 4706, 1583, 3032, 4645, 29918, 19024, 353, 2295, 29889, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 1660, 22245, 29911, 29892, 6213, 29897, 13, 4706, 1583, 3032, 5943, 29918, 6979, 353, 1583, 3032, 3859, 29889, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 4986, 29968, 1430, 29892, 6571, 467, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 2477, 23524, 29918, 4986, 29968, 1430, 29897, 13, 4706, 1583, 3032, 22379, 29918, 6979, 353, 1583, 3032, 3859, 29889, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 4986, 29968, 1430, 29892, 6571, 467, 657, 29898, 8851, 29933, 5746, 29918, 10810, 29918, 25866, 1525, 7068, 29918, 4986, 29968, 1430, 29897, 13, 13, 4706, 565, 451, 1583, 3032, 2754, 29918, 1989, 322, 313, 1333, 1583, 3032, 4645, 29918, 333, 322, 451, 1583, 3032, 4645, 29918, 19024, 1125, 13, 9651, 736, 1583, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 4660, 29918, 4906, 29922, 8851, 29933, 5746, 29918, 21662, 29918, 1525, 29984, 3120, 19386, 29918, 25903, 29918, 16320, 29909, 4345, 29897, 13, 13, 4706, 565, 451, 1583, 3032, 2754, 29918, 1989, 322, 5135, 1311, 3032, 4645, 29918, 333, 322, 451, 1583, 3032, 4645, 29918, 19024, 29897, 470, 313, 1311, 3032, 4645, 29918, 19024, 322, 451, 1583, 3032, 4645, 29918, 333, 22164, 13, 9651, 736, 1583, 29889, 842, 29918, 4882, 29898, 27473, 29889, 20576, 29918, 11432, 29892, 4660, 29918, 4906, 29922, 8851, 29933, 5746, 29918, 21662, 29918, 1525, 29984, 3120, 19386, 29918, 25903, 29918, 16320, 29909, 4345, 29897, 13, 13, 4706, 736, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 13, 13, 1678, 822, 2186, 675, 29898, 1311, 1125, 13, 13, 4706, 396, 16913, 278, 2106, 29892, 445, 848, 338, 7160, 1035, 2124, 8820, 322, 623, 701, 629, 3076, 13, 4706, 1583, 29889, 7620, 29918, 3859, 29898, 1311, 3032, 3859, 29897, 13, 4706, 736, 1374, 15762, 29889, 20576, 29918, 14605, 26925, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 13, 1678, 1053, 10876, 13, 1678, 1053, 282, 566, 29890, 13, 1678, 1053, 1852, 5510, 13, 13, 1678, 282, 566, 29890, 29889, 842, 29918, 15003, 580, 13, 13, 1678, 1852, 16680, 353, 1852, 5510, 29889, 15730, 11726, 580, 13, 13, 1678, 1852, 16680, 29889, 1202, 29918, 23516, 877, 2080, 29918, 1688, 29918, 3126, 742, 1371, 2433, 4290, 4321, 4663, 934, 1495, 13, 1678, 1852, 16680, 29889, 1202, 29918, 23516, 877, 29899, 29884, 742, 525, 489, 6786, 742, 1371, 2433, 6786, 742, 3734, 29922, 8824, 29897, 13, 1678, 1852, 16680, 29889, 1202, 29918, 23516, 877, 29899, 29886, 742, 525, 489, 5630, 742, 1371, 2433, 5630, 742, 3734, 29922, 8824, 29897, 13, 13, 1678, 6389, 353, 1852, 16680, 29889, 5510, 29918, 5085, 580, 13, 1678, 4867, 29918, 333, 353, 6213, 13, 13, 1678, 8952, 353, 6389, 29889, 6786, 13, 1678, 4800, 353, 529, 25711, 17013, 29958, 13, 13, 1678, 565, 8952, 338, 451, 6213, 322, 4800, 338, 6213, 29901, 13, 4706, 396, 4911, 6790, 263, 8952, 541, 451, 263, 4800, 29892, 577, 2244, 13, 4706, 1053, 679, 3364, 13, 13, 4706, 4800, 353, 679, 3364, 29889, 657, 3364, 703, 10048, 29901, 16521, 13, 13, 1678, 565, 8952, 322, 4800, 29901, 13, 4706, 1018, 29901, 13, 9651, 1596, 703, 6638, 292, 278, 19130, 1813, 1159, 13, 9651, 364, 353, 7274, 29889, 657, 29898, 5160, 20971, 2801, 3032, 657, 29918, 27473, 29918, 3188, 29918, 2271, 580, 718, 376, 7507, 613, 11539, 29922, 8824, 29897, 13, 9651, 5939, 9600, 6979, 353, 364, 29889, 15108, 583, 1839, 2395, 9600, 6979, 2033, 13, 13, 9651, 848, 353, 9657, 580, 13, 9651, 848, 1839, 6786, 2033, 353, 8952, 13, 9651, 848, 1839, 5630, 2033, 353, 4800, 13, 9651, 848, 1839, 2395, 9600, 17662, 2519, 6979, 2033, 353, 5939, 9600, 6979, 13, 13, 9651, 9066, 353, 9657, 580, 13, 9651, 9066, 1839, 24914, 2033, 353, 525, 2395, 9600, 6979, 2433, 718, 5939, 9600, 6979, 13, 9651, 9066, 1839, 1123, 571, 261, 2033, 353, 7399, 20971, 2801, 3032, 657, 29918, 27473, 29918, 3188, 29918, 2271, 580, 13, 13, 9651, 1596, 703, 3403, 3460, 964, 28096, 304, 679, 278, 4867, 1178, 1159, 13, 9651, 364, 29906, 353, 7274, 29889, 2490, 29898, 5160, 20971, 2801, 3032, 657, 29918, 27473, 29918, 3188, 29918, 2271, 3285, 11539, 29922, 8824, 29892, 848, 29922, 1272, 29892, 9066, 29922, 13662, 29897, 13, 9651, 4867, 29918, 333, 353, 364, 29906, 29889, 15108, 583, 1839, 7924, 333, 2033, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1596, 703, 2525, 519, 304, 679, 4867, 1178, 515, 278, 18870, 3166, 29889, 4829, 29901, 376, 718, 851, 29898, 29872, 876, 13, 9651, 6876, 29898, 29896, 29897, 13, 13, 1678, 565, 7431, 29898, 9675, 29889, 19218, 29897, 529, 29871, 29906, 29901, 13, 4706, 1596, 703, 3782, 1243, 4390, 6790, 408, 1881, 1159, 13, 4706, 6876, 29898, 29900, 29897, 13, 13, 1678, 411, 1722, 29898, 5085, 29889, 2080, 29918, 1688, 29918, 3126, 29897, 408, 285, 29901, 13, 4706, 297, 29918, 3126, 353, 285, 29889, 949, 580, 13, 4706, 297, 29918, 3126, 353, 4390, 29889, 18132, 29898, 262, 29918, 3126, 29897, 13, 4706, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 262, 29918, 3126, 29892, 29536, 29922, 29946, 876, 13, 13, 4706, 1826, 2801, 353, 315, 275, 1111, 3609, 735, 20971, 2801, 580, 13, 4706, 1826, 2801, 29889, 2158, 29918, 18035, 29918, 4906, 353, 5852, 13, 13, 4706, 565, 4867, 29918, 333, 338, 451, 6213, 29901, 13, 9651, 297, 29918, 3126, 1839, 1792, 29918, 7924, 29918, 6979, 2033, 353, 4867, 29918, 333, 13, 13, 4706, 3240, 29918, 791, 353, 1826, 2801, 3032, 8411, 29918, 2467, 29898, 3126, 29889, 29881, 17204, 29898, 262, 29918, 3126, 511, 6213, 29897, 13, 4706, 1596, 29898, 3126, 29889, 29881, 17204, 29898, 3126, 29889, 18132, 29898, 2267, 29918, 791, 511, 29536, 29922, 29946, 876, 13, 13, 1678, 6876, 29898, 29900, 29897, 13, 2 ]
3.拓展模块/3.摄像头模块/1.拍摄照片/photo.py
01studio-lab/RaspberryPi_Examples
7
74799
''' 实验名称:摄像头模块 版本:v1.0 日期:2020.3 作者:01Studio 说明:使用摄像头模块拍照并保存 社区:www.01studio.org ''' #导入相关库 from picamera import PiCamera from time import sleep #构建摄像头 camera = PiCamera() #打开摄像头 camera.start_preview() sleep(3) #等待摄像头稳定 #拍摄照片5张并保存到桌面 for i in range(5): camera.capture('/home/pi/Desktop/'+str(i)+'.jpg') #关闭摄像头 camera.stop_preview()
[ 1, 14550, 13, 31195, 236, 173, 143, 30548, 31685, 30383, 233, 148, 135, 31551, 31584, 31382, 232, 160, 154, 13, 30845, 30346, 30383, 29894, 29896, 29889, 29900, 13, 30325, 31117, 30383, 29906, 29900, 29906, 29900, 29889, 29941, 13, 30732, 30767, 30383, 29900, 29896, 28867, 13, 31639, 30592, 30383, 30785, 30406, 233, 148, 135, 31551, 31584, 31382, 232, 160, 154, 233, 142, 144, 234, 136, 170, 31666, 30982, 30946, 13, 30564, 30467, 30383, 1636, 29889, 29900, 29896, 12073, 29889, 990, 13, 12008, 13, 13, 29937, 31943, 30752, 30990, 31057, 31700, 13, 3166, 11942, 314, 1572, 1053, 7362, 20717, 13, 3166, 931, 1053, 8709, 13, 13, 29937, 31901, 30886, 233, 148, 135, 31551, 31584, 13, 26065, 353, 7362, 20717, 580, 13, 13, 29937, 31656, 31026, 233, 148, 135, 31551, 31584, 13, 26065, 29889, 2962, 29918, 25347, 580, 13, 13, 17059, 29898, 29941, 29897, 396, 31184, 232, 193, 136, 233, 148, 135, 31551, 31584, 234, 171, 182, 30495, 13, 13, 29937, 233, 142, 144, 233, 148, 135, 234, 136, 170, 31122, 29945, 31328, 31666, 30982, 30946, 30780, 233, 164, 143, 30806, 13, 1454, 474, 297, 3464, 29898, 29945, 1125, 13, 1678, 10656, 29889, 17885, 545, 11219, 5184, 29914, 1631, 29914, 17600, 29914, 18717, 710, 29898, 29875, 7240, 4286, 6173, 1495, 13, 13, 29937, 31057, 236, 154, 176, 233, 148, 135, 31551, 31584, 13, 26065, 29889, 9847, 29918, 25347, 580, 2 ]
match.py
pammirato/image_vatic
571
92050
<reponame>pammirato/image_vatic<filename>match.py import munkres def match(first, second, method): """ Attempts to match every path in 'first' with a path in 'second'. Returns the association along with its score. Note: if two paths have nothing to do with each other, but there is no other suitable candidate, the two seeminly unrelated paths will be associated. It is up to the caller to handle this situation. The 'validate' method may provide some help. Further, if len(first) != len(second), then some elements will be associated with None. """ if len(first) == len(second) == 0: return [] costs = buildmatrix(first, second, method) response = [] for f, s in munkres.Munkres().compute(costs): response.append((first[f] if f < len(first) else None, second[s] if s < len(second) else None, costs[f][s])) return response def buildmatrix(first, second, method): """ Builds the matrix for the Hungarian algorithm. Pads with the worst to make the matrix square. """ costs = [[method(f,s) for s in second] for f in first] if len(first) and len(second): horrible = [max(max(costs)) + 1] else: horrible = [1e10] if len(first) > len(second): for row in costs: row.extend(horrible * (len(first) - len(second))) elif len(first) < len(second): costs.extend([horrible * len(second)] * (len(second) - len(first))) return costs
[ 1, 529, 276, 1112, 420, 29958, 29886, 4850, 381, 1219, 29914, 3027, 29918, 29894, 2454, 29966, 9507, 29958, 4352, 29889, 2272, 13, 5215, 286, 2960, 690, 13, 13, 1753, 1993, 29898, 4102, 29892, 1473, 29892, 1158, 1125, 13, 1678, 9995, 13, 1678, 6212, 3456, 29879, 304, 1993, 1432, 2224, 297, 525, 4102, 29915, 411, 263, 2224, 297, 525, 7496, 4286, 16969, 29871, 13, 1678, 278, 15477, 3412, 411, 967, 8158, 29889, 29871, 13, 13, 1678, 3940, 29901, 565, 1023, 10898, 505, 3078, 304, 437, 411, 1269, 916, 29892, 541, 727, 338, 694, 13, 1678, 916, 13907, 14020, 29892, 278, 1023, 2833, 262, 368, 443, 12817, 10898, 674, 367, 13, 1678, 6942, 29889, 739, 338, 701, 304, 278, 24959, 304, 4386, 445, 6434, 29889, 450, 525, 15480, 29915, 13, 1678, 1158, 1122, 3867, 777, 1371, 29889, 8725, 29892, 565, 7431, 29898, 4102, 29897, 2804, 7431, 29898, 7496, 511, 769, 13, 1678, 777, 3161, 674, 367, 6942, 411, 6213, 29889, 13, 1678, 9995, 13, 1678, 565, 7431, 29898, 4102, 29897, 1275, 7431, 29898, 7496, 29897, 1275, 29871, 29900, 29901, 13, 4706, 736, 5159, 13, 13, 1678, 21544, 353, 2048, 5344, 29898, 4102, 29892, 1473, 29892, 1158, 29897, 13, 1678, 2933, 353, 5159, 13, 13, 1678, 363, 285, 29892, 269, 297, 286, 2960, 690, 29889, 29924, 2960, 690, 2141, 26017, 29898, 18253, 29879, 1125, 13, 4706, 2933, 29889, 4397, 3552, 4102, 29961, 29888, 29962, 29871, 565, 285, 529, 7431, 29898, 4102, 29897, 29871, 1683, 6213, 29892, 13, 462, 308, 1473, 29961, 29879, 29962, 565, 269, 529, 7431, 29898, 7496, 29897, 1683, 6213, 29892, 13, 462, 308, 21544, 29961, 29888, 3816, 29879, 12622, 13, 1678, 736, 2933, 13, 13, 1753, 2048, 5344, 29898, 4102, 29892, 1473, 29892, 1158, 1125, 13, 1678, 9995, 13, 1678, 8878, 29879, 278, 4636, 363, 278, 14198, 13956, 5687, 29889, 349, 7925, 411, 278, 17322, 304, 1207, 13, 1678, 278, 4636, 6862, 29889, 13, 1678, 9995, 13, 1678, 21544, 353, 5519, 5696, 29898, 29888, 29892, 29879, 29897, 363, 269, 297, 1473, 29962, 363, 285, 297, 937, 29962, 13, 13, 1678, 565, 7431, 29898, 4102, 29897, 322, 7431, 29898, 7496, 1125, 13, 4706, 4029, 11710, 353, 518, 3317, 29898, 3317, 29898, 18253, 29879, 876, 718, 29871, 29896, 29962, 13, 1678, 1683, 29901, 13, 4706, 4029, 11710, 353, 518, 29896, 29872, 29896, 29900, 29962, 13, 13, 1678, 565, 7431, 29898, 4102, 29897, 1405, 7431, 29898, 7496, 1125, 13, 4706, 363, 1948, 297, 21544, 29901, 13, 9651, 1948, 29889, 21843, 29898, 2015, 11710, 334, 313, 2435, 29898, 4102, 29897, 448, 7431, 29898, 7496, 4961, 13, 1678, 25342, 7431, 29898, 4102, 29897, 529, 7431, 29898, 7496, 1125, 13, 4706, 21544, 29889, 21843, 4197, 2015, 11710, 334, 7431, 29898, 7496, 4638, 334, 313, 2435, 29898, 7496, 29897, 448, 7431, 29898, 4102, 4961, 13, 1678, 736, 21544, 13, 2 ]
SC101/SC101_week2/zonegraphics.py
ariel98po/SC101-projects
0
25749
from campy.graphics.gwindow import GWindow from campy.graphics.gobjects import GOval, GRect from campy.gui.events.mouse import onmouseclicked import random WINDOW_WIDTH = 600 WINDOW_HEIGHT = 400 ZONE_WIDTH = 100 ZONE_HEIGHT = 100 BALL_RADIUS = 15 MAX_SPEED = 6 MIN_Y_SPEED = 2 class ZoneGraphics: def __init__(self, window_width=WINDOW_WIDTH, window_height=WINDOW_HEIGHT, zone_width=ZONE_WIDTH, zone_height=ZONE_HEIGHT, ball_radius=BALL_RADIUS): # Create window self.window = GWindow(window_width, window_height, title='Zone Game') # Create zone self.zone = GRect(zone_width, zone_height, x=(window_width - zone_width) / 2, y=(window_height - zone_height) / 2) self.zone.color = 'blue' self.window.add(self.zone) # Create ball and initialize velocity/position self.ball = GOval(2 * ball_radius, 2 * ball_radius) self.ball.filled = True self.ball.fill_color = 'salmon' self.dx = 0 self.dy = 0 self.reset_ball() # Initialize mouse listeners onmouseclicked(self.handle_click) # Set ball position at random inside the window def set_ball_position(self): self.ball.x = random.randint(0, self.window.width - self.ball.width) self.ball.y = random.randint(0, self.window.height - self.ball.height) def set_ball_velocity(self): self.dx = random.randint(0, MAX_SPEED) if random.random() > 0.5: self.dx = -self.dx self.dy = random.randint(MIN_Y_SPEED, MAX_SPEED) if random.random() > 0.5: self.dy = -self.dy def reset_ball(self): self.set_ball_position() while self.ball_in_zone(): self.set_ball_position() self.set_ball_velocity() self.window.add(self.ball) def move_ball(self): self.ball.move(self.dx, self.dy) def handle_wall_collisions(self): if self.ball.x + self.ball.width >= self.window.width or self.ball.x <= 0: self.dx = -self.dx if self.ball.y + self.ball.height >= self.window.height or self.ball.y <= 0: self.dy = -self.dy def ball_in_zone(self): zone_left_side = self.zone.x zone_right_side = self.zone.x + self.zone.width ball_x_in_zone = zone_left_side <= self.ball.x <= zone_right_side - self.ball.width zone_top_side = self.zone.y zone_bottom_side = self.zone.y + self.zone.height ball_y_in_zone = zone_top_side <= self.ball.y <= zone_bottom_side - self.ball.height return ball_x_in_zone and ball_y_in_zone def handle_click(self, event): obj = self.window.get_object_at(event.x, event.y) if self.ball == obj: self.reset_ball()
[ 1, 515, 4242, 29891, 29889, 6420, 29889, 29887, 7165, 1053, 402, 5907, 13, 3166, 4242, 29891, 29889, 6420, 29889, 29887, 12650, 1053, 21947, 791, 29892, 402, 7364, 13, 3166, 4242, 29891, 29889, 23569, 29889, 13604, 29889, 15769, 1053, 373, 15769, 3808, 287, 13, 5215, 4036, 13, 13, 25152, 3970, 29956, 29918, 22574, 353, 29871, 29953, 29900, 29900, 13, 25152, 3970, 29956, 29918, 9606, 22530, 353, 29871, 29946, 29900, 29900, 13, 29999, 12413, 29918, 22574, 353, 29871, 29896, 29900, 29900, 13, 29999, 12413, 29918, 9606, 22530, 353, 29871, 29896, 29900, 29900, 13, 29933, 9818, 29918, 29934, 3035, 29902, 3308, 353, 29871, 29896, 29945, 13, 12648, 29918, 29903, 4162, 3352, 353, 29871, 29953, 13, 16173, 29918, 29979, 29918, 29903, 4162, 3352, 353, 29871, 29906, 13, 13, 13, 1990, 24385, 17290, 29901, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3474, 29918, 2103, 29922, 25152, 3970, 29956, 29918, 22574, 29892, 3474, 29918, 3545, 29922, 25152, 3970, 29956, 29918, 9606, 22530, 29892, 13, 462, 10640, 29918, 2103, 29922, 29999, 12413, 29918, 22574, 29892, 10640, 29918, 3545, 29922, 29999, 12413, 29918, 9606, 22530, 29892, 8287, 29918, 13471, 29922, 29933, 9818, 29918, 29934, 3035, 29902, 3308, 1125, 13, 4706, 396, 6204, 3474, 13, 4706, 1583, 29889, 7165, 353, 402, 5907, 29898, 7165, 29918, 2103, 29892, 3474, 29918, 3545, 29892, 3611, 2433, 18482, 8448, 1495, 13, 13, 4706, 396, 6204, 10640, 13, 4706, 1583, 29889, 8028, 353, 402, 7364, 29898, 8028, 29918, 2103, 29892, 10640, 29918, 3545, 29892, 921, 7607, 7165, 29918, 2103, 448, 10640, 29918, 2103, 29897, 847, 29871, 29906, 29892, 13, 462, 3986, 343, 7607, 7165, 29918, 3545, 448, 10640, 29918, 3545, 29897, 847, 29871, 29906, 29897, 13, 4706, 1583, 29889, 8028, 29889, 2780, 353, 525, 9539, 29915, 13, 4706, 1583, 29889, 7165, 29889, 1202, 29898, 1311, 29889, 8028, 29897, 13, 13, 4706, 396, 6204, 8287, 322, 11905, 12885, 29914, 3283, 13, 4706, 1583, 29889, 2135, 353, 21947, 791, 29898, 29906, 334, 8287, 29918, 13471, 29892, 29871, 29906, 334, 8287, 29918, 13471, 29897, 13, 4706, 1583, 29889, 2135, 29889, 26940, 353, 5852, 13, 4706, 1583, 29889, 2135, 29889, 5589, 29918, 2780, 353, 525, 19585, 3712, 29915, 13, 13, 4706, 1583, 29889, 8235, 353, 29871, 29900, 13, 4706, 1583, 29889, 4518, 353, 29871, 29900, 13, 13, 4706, 1583, 29889, 12071, 29918, 2135, 580, 13, 13, 4706, 396, 25455, 9495, 11621, 414, 13, 4706, 373, 15769, 3808, 287, 29898, 1311, 29889, 8411, 29918, 3808, 29897, 13, 13, 4706, 396, 3789, 8287, 2602, 472, 4036, 2768, 278, 3474, 13, 13, 1678, 822, 731, 29918, 2135, 29918, 3283, 29898, 1311, 1125, 13, 4706, 1583, 29889, 2135, 29889, 29916, 353, 4036, 29889, 9502, 524, 29898, 29900, 29892, 1583, 29889, 7165, 29889, 2103, 448, 1583, 29889, 2135, 29889, 2103, 29897, 13, 4706, 1583, 29889, 2135, 29889, 29891, 353, 4036, 29889, 9502, 524, 29898, 29900, 29892, 1583, 29889, 7165, 29889, 3545, 448, 1583, 29889, 2135, 29889, 3545, 29897, 13, 13, 1678, 822, 731, 29918, 2135, 29918, 955, 25245, 29898, 1311, 1125, 13, 4706, 1583, 29889, 8235, 353, 4036, 29889, 9502, 524, 29898, 29900, 29892, 18134, 29918, 29903, 4162, 3352, 29897, 13, 4706, 565, 4036, 29889, 8172, 580, 1405, 29871, 29900, 29889, 29945, 29901, 13, 9651, 1583, 29889, 8235, 353, 448, 1311, 29889, 8235, 13, 4706, 1583, 29889, 4518, 353, 4036, 29889, 9502, 524, 29898, 16173, 29918, 29979, 29918, 29903, 4162, 3352, 29892, 18134, 29918, 29903, 4162, 3352, 29897, 13, 4706, 565, 4036, 29889, 8172, 580, 1405, 29871, 29900, 29889, 29945, 29901, 13, 9651, 1583, 29889, 4518, 353, 448, 1311, 29889, 4518, 13, 13, 1678, 822, 10092, 29918, 2135, 29898, 1311, 1125, 13, 4706, 1583, 29889, 842, 29918, 2135, 29918, 3283, 580, 13, 4706, 1550, 1583, 29889, 2135, 29918, 262, 29918, 8028, 7295, 13, 9651, 1583, 29889, 842, 29918, 2135, 29918, 3283, 580, 13, 4706, 1583, 29889, 842, 29918, 2135, 29918, 955, 25245, 580, 13, 4706, 1583, 29889, 7165, 29889, 1202, 29898, 1311, 29889, 2135, 29897, 13, 13, 1678, 822, 4337, 29918, 2135, 29898, 1311, 1125, 13, 4706, 1583, 29889, 2135, 29889, 11631, 29898, 1311, 29889, 8235, 29892, 1583, 29889, 4518, 29897, 13, 13, 1678, 822, 4386, 29918, 11358, 29918, 22017, 12112, 29898, 1311, 1125, 13, 4706, 565, 1583, 29889, 2135, 29889, 29916, 718, 1583, 29889, 2135, 29889, 2103, 6736, 1583, 29889, 7165, 29889, 2103, 470, 1583, 29889, 2135, 29889, 29916, 5277, 29871, 29900, 29901, 13, 9651, 1583, 29889, 8235, 353, 448, 1311, 29889, 8235, 13, 4706, 565, 1583, 29889, 2135, 29889, 29891, 718, 1583, 29889, 2135, 29889, 3545, 6736, 1583, 29889, 7165, 29889, 3545, 470, 1583, 29889, 2135, 29889, 29891, 5277, 29871, 29900, 29901, 13, 9651, 1583, 29889, 4518, 353, 448, 1311, 29889, 4518, 13, 13, 1678, 822, 8287, 29918, 262, 29918, 8028, 29898, 1311, 1125, 13, 4706, 10640, 29918, 1563, 29918, 2975, 353, 1583, 29889, 8028, 29889, 29916, 13, 4706, 10640, 29918, 1266, 29918, 2975, 353, 1583, 29889, 8028, 29889, 29916, 718, 1583, 29889, 8028, 29889, 2103, 13, 4706, 8287, 29918, 29916, 29918, 262, 29918, 8028, 353, 10640, 29918, 1563, 29918, 2975, 5277, 1583, 29889, 2135, 29889, 29916, 5277, 10640, 29918, 1266, 29918, 2975, 448, 1583, 29889, 2135, 29889, 2103, 13, 13, 4706, 10640, 29918, 3332, 29918, 2975, 353, 1583, 29889, 8028, 29889, 29891, 13, 4706, 10640, 29918, 8968, 29918, 2975, 353, 1583, 29889, 8028, 29889, 29891, 718, 1583, 29889, 8028, 29889, 3545, 13, 4706, 8287, 29918, 29891, 29918, 262, 29918, 8028, 353, 10640, 29918, 3332, 29918, 2975, 5277, 1583, 29889, 2135, 29889, 29891, 5277, 10640, 29918, 8968, 29918, 2975, 448, 1583, 29889, 2135, 29889, 3545, 13, 13, 4706, 736, 8287, 29918, 29916, 29918, 262, 29918, 8028, 322, 8287, 29918, 29891, 29918, 262, 29918, 8028, 13, 13, 1678, 822, 4386, 29918, 3808, 29898, 1311, 29892, 1741, 1125, 13, 4706, 5446, 353, 1583, 29889, 7165, 29889, 657, 29918, 3318, 29918, 271, 29898, 3696, 29889, 29916, 29892, 1741, 29889, 29891, 29897, 13, 4706, 565, 1583, 29889, 2135, 1275, 5446, 29901, 13, 9651, 1583, 29889, 12071, 29918, 2135, 580, 13, 2 ]
scripts/generate_spec_tfrecords.py
dave6892/single_word_speech
0
102425
import sys sys.path.append('..') import glob from typing import NoReturn from multiprocessing import cpu_count from sklearn.model_selection import train_test_split from src.utilities.tfrecords_save import multi_create_tfrecords_in_shards def main( num_files_to_create: int = 96, num_workeers: int = cpu_count() - 1 ) -> NoReturn: num_files_to_create = 96 num_workers = cpu_count()-1 filenames = { 'train': None, 'test' : None, 'validation' : None } image_files = glob.glob(f'/data/spec/*/*') train_filenames, validation_test_filenames = train_test_split( image_files, train_size = 0.8, test_size = 0.2, random_state = 24601 ) validation_filenames, test_filenames = train_test_split( validation_test_filenames, train_size = 0.5, test_size = 0.5, random_state = 24601 ) num_test_samples, test_tfrecords = multi_create_tfrecords_in_shards( data_filenames = test_filenames, dataset_name = 'test', num_files_to_create = num_files_to_create, num_workers = num_workers ) num_validation_samples, validation_tfrecords = multi_create_tfrecords_in_shards( data_filenames = validation_filenames, dataset_name = 'validation', num_files_to_create = num_files_to_create, num_workers = num_workers ) num_train_samples, train_tfrecords = multi_create_tfrecords_in_shards( data_filenames = train_filenames, dataset_name = 'train', num_files_to_create = num_files_to_create, num_workers = num_workers ) filenames['train'] = train_tfrecords filenames['test'] = test_tfrecords filenames['validation'] = validation_tfrecords return filenames if __name__ == "__main__": main()
[ 1, 1053, 10876, 13, 9675, 29889, 2084, 29889, 4397, 877, 636, 1495, 13, 13, 5215, 13149, 13, 3166, 19229, 1053, 1939, 11609, 13, 3166, 6674, 307, 985, 292, 1053, 26403, 29918, 2798, 13, 3166, 2071, 19668, 29889, 4299, 29918, 21731, 1053, 7945, 29918, 1688, 29918, 5451, 13, 3166, 4765, 29889, 4422, 1907, 29889, 13264, 3757, 4339, 29918, 7620, 1053, 2473, 29918, 3258, 29918, 13264, 3757, 4339, 29918, 262, 29918, 845, 3163, 13, 13, 13, 1753, 1667, 29898, 13, 1678, 954, 29918, 5325, 29918, 517, 29918, 3258, 29901, 938, 353, 29871, 29929, 29953, 29892, 13, 1678, 954, 29918, 13762, 446, 414, 29901, 938, 353, 26403, 29918, 2798, 580, 448, 29871, 29896, 13, 1678, 1723, 1599, 1939, 11609, 29901, 13, 13, 1678, 954, 29918, 5325, 29918, 517, 29918, 3258, 353, 29871, 29929, 29953, 13, 1678, 954, 29918, 1287, 414, 353, 26403, 29918, 2798, 580, 29899, 29896, 13, 13, 268, 13, 1678, 977, 264, 1280, 353, 426, 13, 4706, 525, 14968, 2396, 6213, 29892, 13, 4706, 525, 1688, 29915, 584, 6213, 29892, 13, 4706, 525, 18157, 29915, 584, 6213, 13, 1678, 500, 13, 13, 1678, 1967, 29918, 5325, 353, 13149, 29889, 23705, 29898, 29888, 29915, 29914, 1272, 29914, 6550, 29914, 3877, 29930, 1495, 13, 1678, 7945, 29918, 1777, 264, 1280, 29892, 8845, 29918, 1688, 29918, 1777, 264, 1280, 353, 7945, 29918, 1688, 29918, 5451, 29898, 13, 4706, 1967, 29918, 5325, 29892, 13, 4706, 7945, 29918, 2311, 353, 29871, 29900, 29889, 29947, 29892, 13, 4706, 1243, 29918, 2311, 353, 29871, 29900, 29889, 29906, 29892, 13, 4706, 4036, 29918, 3859, 353, 29871, 29906, 29946, 29953, 29900, 29896, 13, 1678, 1723, 13, 13, 1678, 8845, 29918, 1777, 264, 1280, 29892, 1243, 29918, 1777, 264, 1280, 353, 7945, 29918, 1688, 29918, 5451, 29898, 13, 4706, 8845, 29918, 1688, 29918, 1777, 264, 1280, 29892, 13, 4706, 7945, 29918, 2311, 353, 29871, 29900, 29889, 29945, 29892, 13, 4706, 1243, 29918, 2311, 353, 29871, 29900, 29889, 29945, 29892, 13, 4706, 4036, 29918, 3859, 353, 29871, 29906, 29946, 29953, 29900, 29896, 13, 1678, 1723, 13, 13, 13, 1678, 954, 29918, 1688, 29918, 27736, 29892, 1243, 29918, 13264, 3757, 4339, 353, 2473, 29918, 3258, 29918, 13264, 3757, 4339, 29918, 262, 29918, 845, 3163, 29898, 13, 4706, 848, 29918, 1777, 264, 1280, 353, 1243, 29918, 1777, 264, 1280, 29892, 13, 4706, 8783, 29918, 978, 353, 525, 1688, 742, 13, 4706, 954, 29918, 5325, 29918, 517, 29918, 3258, 353, 954, 29918, 5325, 29918, 517, 29918, 3258, 29892, 13, 4706, 954, 29918, 1287, 414, 353, 954, 29918, 1287, 414, 13, 1678, 1723, 13, 13, 13, 1678, 954, 29918, 18157, 29918, 27736, 29892, 8845, 29918, 13264, 3757, 4339, 353, 2473, 29918, 3258, 29918, 13264, 3757, 4339, 29918, 262, 29918, 845, 3163, 29898, 13, 4706, 848, 29918, 1777, 264, 1280, 353, 8845, 29918, 1777, 264, 1280, 29892, 13, 4706, 8783, 29918, 978, 353, 525, 18157, 742, 13, 4706, 954, 29918, 5325, 29918, 517, 29918, 3258, 353, 954, 29918, 5325, 29918, 517, 29918, 3258, 29892, 13, 4706, 954, 29918, 1287, 414, 353, 954, 29918, 1287, 414, 13, 1678, 1723, 13, 13, 13, 1678, 954, 29918, 14968, 29918, 27736, 29892, 7945, 29918, 13264, 3757, 4339, 353, 2473, 29918, 3258, 29918, 13264, 3757, 4339, 29918, 262, 29918, 845, 3163, 29898, 13, 4706, 848, 29918, 1777, 264, 1280, 353, 7945, 29918, 1777, 264, 1280, 29892, 13, 4706, 8783, 29918, 978, 353, 525, 14968, 742, 13, 4706, 954, 29918, 5325, 29918, 517, 29918, 3258, 353, 954, 29918, 5325, 29918, 517, 29918, 3258, 29892, 13, 4706, 954, 29918, 1287, 414, 353, 954, 29918, 1287, 414, 13, 1678, 1723, 13, 268, 13, 268, 13, 1678, 977, 264, 1280, 1839, 14968, 2033, 353, 7945, 29918, 13264, 3757, 4339, 13, 1678, 977, 264, 1280, 1839, 1688, 2033, 353, 1243, 29918, 13264, 3757, 4339, 13, 1678, 977, 264, 1280, 1839, 18157, 2033, 353, 8845, 29918, 13264, 3757, 4339, 13, 268, 13, 1678, 736, 977, 264, 1280, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1667, 580, 13, 2 ]
tests/kernel/test_task_api_state.py
tmontes/ppytty
1
144712
# ---------------------------------------------------------------------------- # ppytty # ---------------------------------------------------------------------------- # Copyright (c) <NAME>. # See LICENSE for details. # ---------------------------------------------------------------------------- from ppytty.kernel import run, api from ppytty.kernel.exceptions import TrapException from . import helper_io from . import helper_log from . import helper_state class TestNeedingOutput(helper_io.NoOutputTestCase): def setUp(self): self.log_handler = helper_log.create_and_add_handler() def tearDown(self): helper_log.remove_handler(self.log_handler) def test_state_dump_logs_all_state_fields(self): async def task(): await api.state_dump() success, result = run(task) self.assertTrue(success) self.assertIsNone(result) for state_attr in helper_state.STATE_ATTRS: with self.subTest(state_attr=state_attr): expected_pattern = f'state.{state_attr}=' for level, message in self.log_handler.messages: if expected_pattern in message and level=='CRITICAL': break else: raise AssertionError(f'{expected_pattern!r} not found') class Test(helper_io.NoOutputAutoTimeTestCase): def setUp(self): super().setUp() self.log_handler = helper_log.create_and_add_handler() def tearDown(self): helper_log.remove_handler(self.log_handler) super().tearDown() def _assert_state_dump_logs_top_task(self, runnable=False): async def task(): await api.state_dump() user_level_task = task() if runnable else task success, result = run(user_level_task) self.assertTrue(success) self.assertIsNone(result) expected = str(user_level_task) for level, message in self.log_handler.messages: if expected in message and level=='CRITICAL': break if 'DATA STRUCTURES' in message: # if we get to this point, the task hierarchy is gone raise AssertionError(f'{expected!r} not found') else: raise AssertionError(f'{expected!r} not found') def test_state_dump_logs_top_task_gen_function(self): self._assert_state_dump_logs_top_task(runnable=False) def test_state_dump_logs_top_task_gen_object(self): self._assert_state_dump_logs_top_task(runnable=True) def test_state_dump_logs_correct_task_states(self): async def sleeping(): await api.sleep(42) async def wait_child(): await api.task_spawn(sleeping) await api.task_wait() async def wait_inbox(): await api.message_wait() async def wait_key(): await api.key_read() async def completed(): await api.sleep(0) async def runnable(): await api.sleep(0) async def parent(): # Nuance: `runnable` spawned last means it will still be in the # runnable state when the `state-dump` trap is called. all_tasks = (wait_child, wait_inbox, wait_key, completed, runnable) for task in all_tasks: await api.task_spawn(task) await api.state_dump() for task in all_tasks: try: await api.task_destroy(task) except TrapException: # the `completed` task triggers this: it was waited by one # of the previous `task-waits` and it no longer exists. pass finally: await api.task_wait() success, result = run(parent) self.assertTrue(success) self.assertIsNone(result) expected_states = { parent: 'RR', # actually running, having called `state-dump` sleeping: 'WT', # waiting on time via `sleep` wait_child: 'WC', # waiting child via `task-wait` wait_inbox: 'WM', # waiting message via `message-wait` wait_key: 'WK', # waiting keyboard via `read-key` completed: 'CC', # completed, not waited for yet runnable: 'RN', # runnable, no chance to run yet } for task, expected_state in expected_states.items(): with self.subTest(task=task, expected_state=expected_state): expected_parts = (str(task), expected_state) for level, message in self.log_handler.messages: if all(p in message for p in expected_parts) and level=='CRITICAL': break if 'DATA STRUCTURES' in message: # if we get to this point, the task hierarchy is gone raise AssertionError(f'matching task/state not found') else: # Should not be reached because `state-dump` output should # include a 'DATA STRUCTURES' line, after the task state # lines; keeping it here, just in case, with an *explicitly* # different assertion error message. raise AssertionError('no DATA STRUCTURES line in log') # ----------------------------------------------------------------------------
[ 1, 396, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 29937, 282, 2272, 4349, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 29937, 14187, 1266, 313, 29883, 29897, 529, 5813, 15513, 13, 29937, 2823, 365, 2965, 1430, 1660, 363, 4902, 29889, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 13, 3166, 282, 2272, 4349, 29889, 17460, 1053, 1065, 29892, 7882, 13, 3166, 282, 2272, 4349, 29889, 17460, 29889, 11739, 29879, 1053, 323, 2390, 2451, 13, 13, 3166, 869, 1053, 16876, 29918, 601, 13, 3166, 869, 1053, 16876, 29918, 1188, 13, 3166, 869, 1053, 16876, 29918, 3859, 13, 13, 13, 13, 1990, 4321, 8139, 21219, 6466, 29898, 20907, 29918, 601, 29889, 3782, 6466, 3057, 8259, 1125, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 1188, 29918, 13789, 353, 16876, 29918, 1188, 29889, 3258, 29918, 392, 29918, 1202, 29918, 13789, 580, 13, 13, 13, 1678, 822, 734, 279, 6767, 29898, 1311, 1125, 13, 13, 4706, 16876, 29918, 1188, 29889, 5992, 29918, 13789, 29898, 1311, 29889, 1188, 29918, 13789, 29897, 13, 13, 13, 1678, 822, 1243, 29918, 3859, 29918, 15070, 29918, 20756, 29918, 497, 29918, 3859, 29918, 9621, 29898, 1311, 1125, 13, 13, 4706, 7465, 822, 3414, 7295, 13, 9651, 7272, 7882, 29889, 3859, 29918, 15070, 580, 13, 13, 4706, 2551, 29892, 1121, 353, 1065, 29898, 7662, 29897, 13, 13, 4706, 1583, 29889, 9294, 5574, 29898, 8698, 29897, 13, 4706, 1583, 29889, 9294, 3624, 8516, 29898, 2914, 29897, 13, 13, 4706, 363, 2106, 29918, 5552, 297, 16876, 29918, 3859, 29889, 19713, 29918, 1299, 5659, 29903, 29901, 13, 9651, 411, 1583, 29889, 1491, 3057, 29898, 3859, 29918, 5552, 29922, 3859, 29918, 5552, 1125, 13, 18884, 3806, 29918, 11037, 353, 285, 29915, 3859, 29889, 29912, 3859, 29918, 5552, 29913, 2433, 13, 18884, 363, 3233, 29892, 2643, 297, 1583, 29889, 1188, 29918, 13789, 29889, 19158, 29901, 13, 462, 1678, 565, 3806, 29918, 11037, 297, 2643, 322, 3233, 1360, 29915, 11341, 1806, 2965, 1964, 2396, 13, 462, 4706, 2867, 13, 18884, 1683, 29901, 13, 462, 1678, 12020, 16499, 291, 2392, 29898, 29888, 29915, 29912, 9684, 29918, 11037, 29991, 29878, 29913, 451, 1476, 1495, 13, 13, 13, 1990, 4321, 29898, 20907, 29918, 601, 29889, 3782, 6466, 12300, 2481, 3057, 8259, 1125, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 13, 4706, 2428, 2141, 842, 3373, 580, 13, 4706, 1583, 29889, 1188, 29918, 13789, 353, 16876, 29918, 1188, 29889, 3258, 29918, 392, 29918, 1202, 29918, 13789, 580, 13, 13, 13, 1678, 822, 734, 279, 6767, 29898, 1311, 1125, 13, 13, 4706, 16876, 29918, 1188, 29889, 5992, 29918, 13789, 29898, 1311, 29889, 1188, 29918, 13789, 29897, 13, 4706, 2428, 2141, 371, 279, 6767, 580, 13, 13, 13, 1678, 822, 903, 9294, 29918, 3859, 29918, 15070, 29918, 20756, 29918, 3332, 29918, 7662, 29898, 1311, 29892, 1065, 29876, 519, 29922, 8824, 1125, 13, 13, 4706, 7465, 822, 3414, 7295, 13, 9651, 7272, 7882, 29889, 3859, 29918, 15070, 580, 13, 13, 4706, 1404, 29918, 5563, 29918, 7662, 353, 3414, 580, 565, 1065, 29876, 519, 1683, 3414, 13, 4706, 2551, 29892, 1121, 353, 1065, 29898, 1792, 29918, 5563, 29918, 7662, 29897, 13, 13, 4706, 1583, 29889, 9294, 5574, 29898, 8698, 29897, 13, 4706, 1583, 29889, 9294, 3624, 8516, 29898, 2914, 29897, 13, 13, 4706, 3806, 353, 851, 29898, 1792, 29918, 5563, 29918, 7662, 29897, 13, 4706, 363, 3233, 29892, 2643, 297, 1583, 29889, 1188, 29918, 13789, 29889, 19158, 29901, 13, 9651, 565, 3806, 297, 2643, 322, 3233, 1360, 29915, 11341, 1806, 2965, 1964, 2396, 13, 18884, 2867, 13, 9651, 565, 525, 14573, 29486, 29965, 1783, 11499, 29903, 29915, 297, 2643, 29901, 13, 18884, 396, 565, 591, 679, 304, 445, 1298, 29892, 278, 3414, 21277, 338, 7695, 13, 18884, 12020, 16499, 291, 2392, 29898, 29888, 29915, 29912, 9684, 29991, 29878, 29913, 451, 1476, 1495, 13, 4706, 1683, 29901, 13, 9651, 12020, 16499, 291, 2392, 29898, 29888, 29915, 29912, 9684, 29991, 29878, 29913, 451, 1476, 1495, 13, 13, 13, 1678, 822, 1243, 29918, 3859, 29918, 15070, 29918, 20756, 29918, 3332, 29918, 7662, 29918, 1885, 29918, 2220, 29898, 1311, 1125, 13, 13, 4706, 1583, 3032, 9294, 29918, 3859, 29918, 15070, 29918, 20756, 29918, 3332, 29918, 7662, 29898, 3389, 29876, 519, 29922, 8824, 29897, 13, 13, 13, 1678, 822, 1243, 29918, 3859, 29918, 15070, 29918, 20756, 29918, 3332, 29918, 7662, 29918, 1885, 29918, 3318, 29898, 1311, 1125, 13, 13, 4706, 1583, 3032, 9294, 29918, 3859, 29918, 15070, 29918, 20756, 29918, 3332, 29918, 7662, 29898, 3389, 29876, 519, 29922, 5574, 29897, 13, 13, 13, 1678, 822, 1243, 29918, 3859, 29918, 15070, 29918, 20756, 29918, 15728, 29918, 7662, 29918, 28631, 29898, 1311, 1125, 13, 13, 4706, 7465, 822, 8709, 292, 7295, 13, 9651, 7272, 7882, 29889, 17059, 29898, 29946, 29906, 29897, 13, 13, 4706, 7465, 822, 4480, 29918, 5145, 7295, 13, 9651, 7272, 7882, 29889, 7662, 29918, 1028, 18101, 29898, 17059, 292, 29897, 13, 9651, 7272, 7882, 29889, 7662, 29918, 10685, 580, 13, 13, 4706, 7465, 822, 4480, 29918, 262, 1884, 7295, 13, 9651, 7272, 7882, 29889, 4906, 29918, 10685, 580, 13, 13, 4706, 7465, 822, 4480, 29918, 1989, 7295, 13, 9651, 7272, 7882, 29889, 1989, 29918, 949, 580, 13, 13, 4706, 7465, 822, 8676, 7295, 13, 9651, 7272, 7882, 29889, 17059, 29898, 29900, 29897, 13, 13, 4706, 7465, 822, 1065, 29876, 519, 7295, 13, 9651, 7272, 7882, 29889, 17059, 29898, 29900, 29897, 13, 13, 4706, 7465, 822, 3847, 7295, 13, 9651, 396, 12487, 749, 29901, 421, 3389, 29876, 519, 29952, 29178, 287, 1833, 2794, 372, 674, 1603, 367, 297, 278, 13, 9651, 396, 1065, 29876, 519, 2106, 746, 278, 421, 3859, 29899, 15070, 29952, 26505, 338, 2000, 29889, 13, 9651, 599, 29918, 20673, 353, 313, 10685, 29918, 5145, 29892, 4480, 29918, 262, 1884, 29892, 4480, 29918, 1989, 29892, 8676, 29892, 1065, 29876, 519, 29897, 13, 9651, 363, 3414, 297, 599, 29918, 20673, 29901, 13, 18884, 7272, 7882, 29889, 7662, 29918, 1028, 18101, 29898, 7662, 29897, 13, 13, 9651, 7272, 7882, 29889, 3859, 29918, 15070, 580, 13, 13, 9651, 363, 3414, 297, 599, 29918, 20673, 29901, 13, 18884, 1018, 29901, 13, 462, 1678, 7272, 7882, 29889, 7662, 29918, 20524, 29898, 7662, 29897, 13, 18884, 5174, 323, 2390, 2451, 29901, 13, 462, 1678, 396, 278, 421, 5729, 9446, 29952, 3414, 23660, 445, 29901, 372, 471, 25993, 491, 697, 13, 462, 1678, 396, 310, 278, 3517, 421, 7662, 29899, 2766, 1169, 29952, 322, 372, 694, 5520, 4864, 29889, 13, 462, 1678, 1209, 13, 18884, 7146, 29901, 13, 462, 1678, 7272, 7882, 29889, 7662, 29918, 10685, 580, 13, 13, 4706, 2551, 29892, 1121, 353, 1065, 29898, 3560, 29897, 13, 13, 4706, 1583, 29889, 9294, 5574, 29898, 8698, 29897, 13, 4706, 1583, 29889, 9294, 3624, 8516, 29898, 2914, 29897, 13, 13, 4706, 3806, 29918, 28631, 353, 426, 13, 9651, 3847, 29901, 525, 29934, 29934, 742, 539, 396, 2869, 2734, 29892, 2534, 2000, 421, 3859, 29899, 15070, 29952, 13, 9651, 8709, 292, 29901, 525, 17755, 742, 268, 396, 10534, 373, 931, 3025, 421, 17059, 29952, 13, 9651, 4480, 29918, 5145, 29901, 525, 29956, 29907, 742, 259, 396, 10534, 2278, 3025, 421, 7662, 29899, 10685, 29952, 13, 9651, 4480, 29918, 262, 1884, 29901, 525, 26735, 742, 259, 396, 10534, 2643, 3025, 421, 4906, 29899, 10685, 29952, 13, 9651, 4480, 29918, 1989, 29901, 525, 29956, 29968, 742, 268, 396, 10534, 12247, 3025, 421, 949, 29899, 1989, 29952, 13, 9651, 8676, 29901, 525, 4174, 742, 1678, 396, 8676, 29892, 451, 25993, 363, 3447, 13, 9651, 1065, 29876, 519, 29901, 525, 29934, 29940, 742, 268, 396, 1065, 29876, 519, 29892, 694, 8825, 304, 1065, 3447, 13, 4706, 500, 13, 4706, 363, 3414, 29892, 3806, 29918, 3859, 297, 3806, 29918, 28631, 29889, 7076, 7295, 13, 9651, 411, 1583, 29889, 1491, 3057, 29898, 7662, 29922, 7662, 29892, 3806, 29918, 3859, 29922, 9684, 29918, 3859, 1125, 13, 18884, 3806, 29918, 20895, 353, 313, 710, 29898, 7662, 511, 3806, 29918, 3859, 29897, 13, 18884, 363, 3233, 29892, 2643, 297, 1583, 29889, 1188, 29918, 13789, 29889, 19158, 29901, 13, 462, 1678, 565, 599, 29898, 29886, 297, 2643, 363, 282, 297, 3806, 29918, 20895, 29897, 322, 3233, 1360, 29915, 11341, 1806, 2965, 1964, 2396, 13, 462, 4706, 2867, 13, 462, 1678, 565, 525, 14573, 29486, 29965, 1783, 11499, 29903, 29915, 297, 2643, 29901, 13, 462, 4706, 396, 565, 591, 679, 304, 445, 1298, 29892, 278, 3414, 21277, 338, 7695, 13, 462, 4706, 12020, 16499, 291, 2392, 29898, 29888, 29915, 4352, 292, 3414, 29914, 3859, 451, 1476, 1495, 13, 18884, 1683, 29901, 13, 462, 1678, 396, 10575, 451, 367, 7450, 1363, 421, 3859, 29899, 15070, 29952, 1962, 881, 13, 462, 1678, 396, 3160, 263, 525, 14573, 29486, 29965, 1783, 11499, 29903, 29915, 1196, 29892, 1156, 278, 3414, 2106, 13, 462, 1678, 396, 3454, 29936, 12515, 372, 1244, 29892, 925, 297, 1206, 29892, 411, 385, 334, 4548, 4019, 368, 29930, 13, 462, 1678, 396, 1422, 28306, 1059, 2643, 29889, 13, 462, 1678, 12020, 16499, 291, 2392, 877, 1217, 360, 8254, 29486, 29965, 1783, 11499, 29903, 1196, 297, 1480, 1495, 13, 13, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 2 ]
Practic/task_8/swapcase1.py
zevgenia/Python_shultais
0
125921
<filename>Practic/task_8/swapcase1.py<gh_stars>0 import sys str1 = sys.argv[1] str2 = sys.argv[2] print(str1, str2) print(str1.swapcase(), str2.swapcase())
[ 1, 529, 9507, 29958, 29925, 1461, 293, 29914, 7662, 29918, 29947, 29914, 26276, 4878, 29896, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 5215, 10876, 13, 710, 29896, 353, 10876, 29889, 19218, 29961, 29896, 29962, 13, 710, 29906, 353, 10876, 29889, 19218, 29961, 29906, 29962, 13, 2158, 29898, 710, 29896, 29892, 851, 29906, 29897, 13, 2158, 29898, 710, 29896, 29889, 26276, 4878, 3285, 851, 29906, 29889, 26276, 4878, 3101, 13, 2 ]
sccsClientLocalNetworkPythonGear-ReceivingOnlyWIP/sccsClient/sccsClient.py
ninekorn/Python-2-way-local-network-communication-WIP
0
175771
<reponame>ninekorn/Python-2-way-local-network-communication-WIP #https://realpython.com/python-sockets/ #!/usr/bin/env python3 import socket import sys #import time UDP_IP = "127.0.0.1" # set it to destination IP.. RPi in this case #127.0.0.1 #192.168.127.12 UDP_PORT = 5000 #print("UDP target IP:", UDP_IP) #print("UDP target port:", UDP_PORT) sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) #sock.bind((UDP_IP, UDP_PORT)) #print >>sys.stderr, 'starting up on %s port %s' % sock.getsockname() #sock.listen(1) #HOST = '127.0.0.1' # The server's hostname or IP address #PORT = 5000 # The port used by the server #65432 someswtc = True; somecounter = 0; somecountermax =10; somecounterinit = 0; somecounterinitmax = 100; somecounterinitswtc = 0; while someswtc == True: if somecounterinitswtc == 0: if somecounterinit >= somecounterinitmax: somecounterinitswtc = 1 somecounterinit = 0 somecounterinit+=1 else: if somecounter >= somecountermax: with sock as s: s.connect((UDP_IP, UDP_PORT)) s.sendall(b'Hello, world') data = s.recv(1024) #message = bytearray([0,1,2,3,4,5,6,7,8,9]) #s.sendto(message, ('127.0.0.1',5000)) #print('Received', repr(data)) somecounter = 0; somecounter+=1
[ 1, 529, 276, 1112, 420, 29958, 29876, 27868, 1398, 29914, 11980, 29899, 29906, 29899, 1582, 29899, 2997, 29899, 11618, 29899, 27820, 362, 29899, 29956, 5690, 13, 29937, 991, 597, 6370, 4691, 29889, 510, 29914, 4691, 29899, 578, 9737, 29914, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 9909, 13, 5215, 10876, 13, 29937, 5215, 931, 13, 29965, 11191, 29918, 5690, 353, 376, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29908, 396, 731, 372, 304, 12551, 5641, 636, 390, 12197, 297, 445, 1206, 396, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 396, 29896, 29929, 29906, 29889, 29896, 29953, 29947, 29889, 29896, 29906, 29955, 29889, 29896, 29906, 13, 29965, 11191, 29918, 15082, 353, 29871, 29945, 29900, 29900, 29900, 13, 29937, 2158, 703, 29965, 11191, 3646, 5641, 29901, 613, 501, 11191, 29918, 5690, 29897, 13, 29937, 2158, 703, 29965, 11191, 3646, 2011, 29901, 613, 501, 11191, 29918, 15082, 29897, 13, 21852, 353, 9909, 29889, 11514, 29898, 11514, 29889, 5098, 29918, 1177, 2544, 29892, 11514, 29889, 6156, 7077, 29918, 29928, 29954, 25058, 29897, 13, 29937, 21852, 29889, 5355, 3552, 29965, 11191, 29918, 5690, 29892, 501, 11191, 29918, 15082, 876, 13, 29937, 2158, 5099, 9675, 29889, 303, 20405, 29892, 525, 2962, 292, 701, 373, 1273, 29879, 2011, 1273, 29879, 29915, 1273, 577, 384, 29889, 657, 21852, 978, 580, 13, 29937, 21852, 29889, 20631, 29898, 29896, 29897, 13, 13, 29937, 20832, 353, 525, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 29915, 29871, 396, 450, 1923, 29915, 29879, 3495, 978, 470, 5641, 3211, 13, 29937, 15082, 353, 29871, 29945, 29900, 29900, 29900, 4706, 396, 450, 2011, 1304, 491, 278, 1923, 396, 29953, 29945, 29946, 29941, 29906, 13, 13, 22708, 267, 29893, 14246, 353, 5852, 29936, 13, 5372, 11808, 353, 29871, 29900, 29936, 13, 5372, 11808, 3317, 353, 29896, 29900, 29936, 13, 5372, 11808, 2344, 353, 29871, 29900, 29936, 13, 5372, 11808, 2344, 3317, 353, 29871, 29896, 29900, 29900, 29936, 13, 5372, 11808, 262, 1169, 29893, 14246, 353, 29871, 29900, 29936, 13, 13, 8000, 1047, 267, 29893, 14246, 1275, 5852, 29901, 13, 268, 13, 1678, 565, 777, 11808, 262, 1169, 29893, 14246, 1275, 29871, 29900, 29901, 13, 4706, 565, 777, 11808, 2344, 6736, 777, 11808, 2344, 3317, 29901, 13, 9651, 777, 11808, 262, 1169, 29893, 14246, 353, 29871, 29896, 13, 9651, 777, 11808, 2344, 353, 29871, 29900, 13, 4706, 777, 11808, 2344, 23661, 29896, 13, 1678, 1683, 29901, 13, 308, 13, 4706, 565, 777, 11808, 6736, 777, 11808, 3317, 29901, 13, 9651, 411, 577, 384, 408, 269, 29901, 13, 18884, 269, 29889, 6915, 3552, 29965, 11191, 29918, 5690, 29892, 501, 11191, 29918, 15082, 876, 13, 18884, 269, 29889, 6717, 497, 29898, 29890, 29915, 10994, 29892, 3186, 1495, 13, 462, 13, 18884, 848, 353, 269, 29889, 3757, 29894, 29898, 29896, 29900, 29906, 29946, 29897, 13, 18884, 396, 4906, 353, 7023, 2378, 4197, 29900, 29892, 29896, 29892, 29906, 29892, 29941, 29892, 29946, 29892, 29945, 29892, 29953, 29892, 29955, 29892, 29947, 29892, 29929, 2314, 13, 18884, 396, 29879, 29889, 6717, 517, 29898, 4906, 29892, 6702, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 742, 29945, 29900, 29900, 29900, 876, 13, 308, 13, 9651, 396, 2158, 877, 29816, 742, 2062, 29898, 1272, 876, 13, 9651, 777, 11808, 353, 29871, 29900, 29936, 13, 4706, 777, 11808, 23661, 29896, 13, 308, 13, 308, 13, 268, 13, 268, 13, 268, 13, 2 ]
backend/config.py
mrkrause/penn-events-calendar
0
56007
<reponame>mrkrause/penn-events-calendar<gh_stars>0 import os # Module containing scrapers for extracting data from webpages # Every public function (i.e., those not beginning with _) should return a list # of event dictionaries when called with no arguments. import local.upenn.scrapers scrapers = local.upenn.scrapers # Module containing a list of locations (for feature generation) import local.upenn.locations locations = local.upenn.locations.locations # Path to save event data (as json) PATH_DATA = os.path.join('data', 'events.json') # path to save events PATH_FETCH_DATA = os.path.join('data', 'fetch_record.json') PATH_VECTOR = os.path.join('data', 'events_vector.json') # GROBID stuff for parsing PDFs GROBID_URL = 'http://localhost:8070' GROBID_PDF_URL = '{}/api/processFulltextDocument'.format(GROBID_URL) # ElasticSearch configuration ELASTIC_HOST = 'localhost' ELASTIC_PORT = 9200 ELASTIC_INDEX = 'penn-events'
[ 1, 529, 276, 1112, 420, 29958, 29885, 29878, 29895, 336, 1509, 29914, 29886, 2108, 29899, 13604, 29899, 23392, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 13, 13, 29937, 15591, 6943, 885, 2390, 414, 363, 6597, 292, 848, 515, 1856, 12292, 13, 29937, 7569, 970, 740, 313, 29875, 29889, 29872, 1696, 1906, 451, 6763, 411, 24459, 881, 736, 263, 1051, 13, 29937, 310, 1741, 21503, 4314, 746, 2000, 411, 694, 6273, 29889, 13, 5215, 1887, 29889, 786, 2108, 29889, 1557, 2390, 414, 13, 1557, 2390, 414, 353, 1887, 29889, 786, 2108, 29889, 1557, 2390, 414, 13, 13, 29937, 15591, 6943, 263, 1051, 310, 14354, 313, 1454, 4682, 12623, 29897, 13, 5215, 1887, 29889, 786, 2108, 29889, 2029, 800, 13, 2029, 800, 353, 1887, 29889, 786, 2108, 29889, 2029, 800, 29889, 2029, 800, 13, 13, 29937, 10802, 304, 4078, 1741, 848, 313, 294, 4390, 29897, 13, 10145, 29918, 14573, 353, 2897, 29889, 2084, 29889, 7122, 877, 1272, 742, 525, 13604, 29889, 3126, 1495, 29871, 396, 2224, 304, 4078, 4959, 13, 10145, 29918, 29943, 2544, 3210, 29918, 14573, 353, 2897, 29889, 2084, 29889, 7122, 877, 1272, 742, 525, 9155, 29918, 11651, 29889, 3126, 1495, 13, 10145, 29918, 12064, 1783, 1955, 353, 2897, 29889, 2084, 29889, 7122, 877, 1272, 742, 525, 13604, 29918, 8111, 29889, 3126, 1495, 13, 13, 29937, 402, 1672, 29933, 1367, 6433, 363, 13755, 11328, 29879, 13, 29954, 1672, 29933, 1367, 29918, 4219, 353, 525, 1124, 597, 7640, 29901, 29947, 29900, 29955, 29900, 29915, 13, 29954, 1672, 29933, 1367, 29918, 8493, 29918, 4219, 353, 22372, 6822, 2754, 29914, 5014, 13658, 726, 6268, 4286, 4830, 29898, 29954, 1672, 29933, 1367, 29918, 4219, 29897, 13, 13, 29937, 1260, 6288, 7974, 5285, 13, 29923, 4375, 1254, 2965, 29918, 20832, 353, 525, 7640, 29915, 13, 29923, 4375, 1254, 2965, 29918, 15082, 353, 29871, 29929, 29906, 29900, 29900, 13, 29923, 4375, 1254, 2965, 29918, 27992, 353, 525, 29886, 2108, 29899, 13604, 29915, 13, 2 ]
homeassistant/components/plugwise/sensor.py
prwood80/core
5
130602
"""Plugwise Sensor component for Home Assistant.""" import logging from homeassistant.components.sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_ENERGY, DEVICE_CLASS_GAS, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_POWER, DEVICE_CLASS_PRESSURE, DEVICE_CLASS_TEMPERATURE, STATE_CLASS_MEASUREMENT, STATE_CLASS_TOTAL, STATE_CLASS_TOTAL_INCREASING, SensorEntity, ) from homeassistant.const import ( ENERGY_KILO_WATT_HOUR, ENERGY_WATT_HOUR, PERCENTAGE, POWER_WATT, PRESSURE_BAR, TEMP_CELSIUS, VOLUME_CUBIC_METERS, ) from homeassistant.core import callback from .const import ( COOL_ICON, COORDINATOR, DEVICE_STATE, DOMAIN, FLAME_ICON, IDLE_ICON, SENSOR_MAP_DEVICE_CLASS, SENSOR_MAP_MODEL, SENSOR_MAP_STATE_CLASS, SENSOR_MAP_UOM, UNIT_LUMEN, ) from .gateway import SmileGateway _LOGGER = logging.getLogger(__name__) ATTR_TEMPERATURE = [ "Temperature", TEMP_CELSIUS, DEVICE_CLASS_TEMPERATURE, STATE_CLASS_MEASUREMENT, ] ATTR_BATTERY_LEVEL = [ "Charge", PERCENTAGE, DEVICE_CLASS_BATTERY, STATE_CLASS_MEASUREMENT, ] ATTR_ILLUMINANCE = [ "Illuminance", UNIT_LUMEN, DEVICE_CLASS_ILLUMINANCE, STATE_CLASS_MEASUREMENT, ] ATTR_PRESSURE = [ "Pressure", PRESSURE_BAR, DEVICE_CLASS_PRESSURE, STATE_CLASS_MEASUREMENT, ] TEMP_SENSOR_MAP = { "setpoint": ATTR_TEMPERATURE, "temperature": ATTR_TEMPERATURE, "intended_boiler_temperature": ATTR_TEMPERATURE, "temperature_difference": ATTR_TEMPERATURE, "outdoor_temperature": ATTR_TEMPERATURE, "water_temperature": ATTR_TEMPERATURE, "return_temperature": ATTR_TEMPERATURE, } ENERGY_SENSOR_MAP = { "electricity_consumed": [ "Current Consumed Power", POWER_WATT, DEVICE_CLASS_POWER, STATE_CLASS_MEASUREMENT, ], "electricity_produced": [ "Current Produced Power", POWER_WATT, DEVICE_CLASS_POWER, STATE_CLASS_MEASUREMENT, ], "electricity_consumed_interval": [ "Consumed Power Interval", ENERGY_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL, ], "electricity_consumed_peak_interval": [ "Consumed Power Interval", ENERGY_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL, ], "electricity_consumed_off_peak_interval": [ "Consumed Power Interval (off peak)", ENERGY_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL, ], "electricity_produced_interval": [ "Produced Power Interval", ENERGY_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL, ], "electricity_produced_peak_interval": [ "Produced Power Interval", ENERGY_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL, ], "electricity_produced_off_peak_interval": [ "Produced Power Interval (off peak)", ENERGY_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL, ], "electricity_consumed_off_peak_point": [ "Current Consumed Power (off peak)", POWER_WATT, DEVICE_CLASS_POWER, STATE_CLASS_MEASUREMENT, ], "electricity_consumed_peak_point": [ "Current Consumed Power", POWER_WATT, DEVICE_CLASS_POWER, STATE_CLASS_MEASUREMENT, ], "electricity_consumed_off_peak_cumulative": [ "Cumulative Consumed Power (off peak)", ENERGY_KILO_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL_INCREASING, ], "electricity_consumed_peak_cumulative": [ "Cumulative Consumed Power", ENERGY_KILO_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL_INCREASING, ], "electricity_produced_off_peak_point": [ "Current Produced Power (off peak)", POWER_WATT, DEVICE_CLASS_POWER, STATE_CLASS_MEASUREMENT, ], "electricity_produced_peak_point": [ "Current Produced Power", POWER_WATT, DEVICE_CLASS_POWER, STATE_CLASS_MEASUREMENT, ], "electricity_produced_off_peak_cumulative": [ "Cumulative Produced Power (off peak)", ENERGY_KILO_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL_INCREASING, ], "electricity_produced_peak_cumulative": [ "Cumulative Produced Power", ENERGY_KILO_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL_INCREASING, ], "gas_consumed_interval": [ "Current Consumed Gas Interval", VOLUME_CUBIC_METERS, DEVICE_CLASS_GAS, STATE_CLASS_TOTAL, ], "gas_consumed_cumulative": [ "Consumed Gas", VOLUME_CUBIC_METERS, DEVICE_CLASS_GAS, STATE_CLASS_TOTAL_INCREASING, ], "net_electricity_point": [ "Current net Power", POWER_WATT, DEVICE_CLASS_POWER, STATE_CLASS_MEASUREMENT, ], "net_electricity_cumulative": [ "Cumulative net Power", ENERGY_KILO_WATT_HOUR, DEVICE_CLASS_ENERGY, STATE_CLASS_TOTAL, ], } MISC_SENSOR_MAP = { "battery": ATTR_BATTERY_LEVEL, "illuminance": ATTR_ILLUMINANCE, "modulation_level": [ "Heater Modulation Level", PERCENTAGE, None, STATE_CLASS_MEASUREMENT, ], "valve_position": ["Valve Position", PERCENTAGE, None, STATE_CLASS_MEASUREMENT], "water_pressure": ATTR_PRESSURE, } INDICATE_ACTIVE_LOCAL_DEVICE = [ "cooling_state", "flame_state", ] CUSTOM_ICONS = { "gas_consumed_interval": "mdi:fire", "gas_consumed_cumulative": "mdi:fire", "modulation_level": "mdi:percent", "valve_position": "mdi:valve", } async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the Smile sensors from a config entry.""" api = hass.data[DOMAIN][config_entry.entry_id]["api"] coordinator = hass.data[DOMAIN][config_entry.entry_id][COORDINATOR] entities = [] all_devices = api.get_all_devices() single_thermostat = api.single_master_thermostat() for dev_id, device_properties in all_devices.items(): data = api.get_device_data(dev_id) for sensor, sensor_type in { **TEMP_SENSOR_MAP, **ENERGY_SENSOR_MAP, **MISC_SENSOR_MAP, }.items(): if data.get(sensor) is None: continue if "power" in device_properties["types"]: model = None if "plug" in device_properties["types"]: model = "Metered Switch" entities.append( PwPowerSensor( api, coordinator, device_properties["name"], dev_id, sensor, sensor_type, model, ) ) else: entities.append( PwThermostatSensor( api, coordinator, device_properties["name"], dev_id, sensor, sensor_type, ) ) if single_thermostat is False: for state in INDICATE_ACTIVE_LOCAL_DEVICE: if state not in data: continue entities.append( PwAuxDeviceSensor( api, coordinator, device_properties["name"], dev_id, DEVICE_STATE, ) ) break async_add_entities(entities, True) class SmileSensor(SmileGateway, SensorEntity): """Represent Smile Sensors.""" def __init__(self, api, coordinator, name, dev_id, sensor): """Initialise the sensor.""" super().__init__(api, coordinator, name, dev_id) self._sensor = sensor self._dev_class = None self._icon = None self._state = None self._state_class = None self._unit_of_measurement = None if dev_id == self._api.heater_id: self._entity_name = "Auxiliary" sensorname = sensor.replace("_", " ").title() self._name = f"{self._entity_name} {sensorname}" if dev_id == self._api.gateway_id: self._entity_name = f"Smile {self._entity_name}" self._unique_id = f"{dev_id}-{sensor}" @property def device_class(self): """Device class of this entity.""" return self._dev_class @property def icon(self): """Return the icon of this entity.""" return self._icon @property def native_value(self): """Return the state of this entity.""" return self._state @property def native_unit_of_measurement(self): """Return the unit of measurement of this entity, if any.""" return self._unit_of_measurement @property def state_class(self): """Return the state_class of this entity.""" return self._state_class class PwThermostatSensor(SmileSensor): """Thermostat (or generic) sensor devices.""" def __init__(self, api, coordinator, name, dev_id, sensor, sensor_type): """Set up the Plugwise API.""" super().__init__(api, coordinator, name, dev_id, sensor) self._icon = None self._model = sensor_type[SENSOR_MAP_MODEL] self._unit_of_measurement = sensor_type[SENSOR_MAP_UOM] self._dev_class = sensor_type[SENSOR_MAP_DEVICE_CLASS] self._state_class = sensor_type[SENSOR_MAP_STATE_CLASS] @callback def _async_process_data(self): """Update the entity.""" data = self._api.get_device_data(self._dev_id) if not data: _LOGGER.error("Received no data for device %s", self._entity_name) self.async_write_ha_state() return if data.get(self._sensor) is not None: self._state = data[self._sensor] self._icon = CUSTOM_ICONS.get(self._sensor, self._icon) self.async_write_ha_state() class PwAuxDeviceSensor(SmileSensor): """Auxiliary Device Sensors.""" def __init__(self, api, coordinator, name, dev_id, sensor): """Set up the Plugwise API.""" super().__init__(api, coordinator, name, dev_id, sensor) self._cooling_state = False self._heating_state = False @callback def _async_process_data(self): """Update the entity.""" data = self._api.get_device_data(self._dev_id) if not data: _LOGGER.error("Received no data for device %s", self._entity_name) self.async_write_ha_state() return if data.get("heating_state") is not None: self._heating_state = data["heating_state"] if data.get("cooling_state") is not None: self._cooling_state = data["cooling_state"] self._state = "idle" self._icon = IDLE_ICON if self._heating_state: self._state = "heating" self._icon = FLAME_ICON if self._cooling_state: self._state = "cooling" self._icon = COOL_ICON self.async_write_ha_state() class PwPowerSensor(SmileSensor): """Power sensor entities.""" def __init__(self, api, coordinator, name, dev_id, sensor, sensor_type, model): """Set up the Plugwise API.""" super().__init__(api, coordinator, name, dev_id, sensor) self._icon = None self._model = model if model is None: self._model = sensor_type[SENSOR_MAP_MODEL] self._unit_of_measurement = sensor_type[SENSOR_MAP_UOM] self._dev_class = sensor_type[SENSOR_MAP_DEVICE_CLASS] self._state_class = sensor_type[SENSOR_MAP_STATE_CLASS] if dev_id == self._api.gateway_id: self._model = "P1 DSMR" @callback def _async_process_data(self): """Update the entity.""" data = self._api.get_device_data(self._dev_id) if not data: _LOGGER.error("Received no data for device %s", self._entity_name) self.async_write_ha_state() return if data.get(self._sensor) is not None: self._state = data[self._sensor] self._icon = CUSTOM_ICONS.get(self._sensor, self._icon) self.async_write_ha_state()
[ 1, 9995, 3247, 688, 3538, 317, 6073, 4163, 363, 8778, 4007, 22137, 1213, 15945, 13, 13, 5215, 12183, 13, 13, 3166, 3271, 465, 22137, 29889, 14036, 29889, 29879, 6073, 1053, 313, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 29933, 1299, 4945, 29979, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 29954, 3289, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 24071, 5005, 1177, 23219, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 29925, 9806, 1001, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 15094, 1799, 11499, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 13, 1678, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 1678, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29892, 13, 1678, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29918, 1177, 22245, 3289, 4214, 29892, 13, 1678, 317, 6073, 6691, 29892, 13, 29897, 13, 3166, 3271, 465, 22137, 29889, 3075, 1053, 313, 13, 1678, 12524, 1001, 29954, 29979, 29918, 29968, 29902, 3927, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 1678, 12524, 1001, 29954, 29979, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 1678, 349, 1001, 29907, 3919, 10461, 29892, 13, 1678, 349, 9806, 1001, 29918, 29956, 1299, 29911, 29892, 13, 1678, 349, 26785, 11499, 29918, 29933, 1718, 29892, 13, 1678, 17067, 3580, 29918, 4741, 29931, 5425, 3308, 29892, 13, 1678, 478, 5607, 29965, 2303, 29918, 29907, 7466, 2965, 29918, 2303, 4945, 29903, 29892, 13, 29897, 13, 3166, 3271, 465, 22137, 29889, 3221, 1053, 6939, 13, 13, 3166, 869, 3075, 1053, 313, 13, 1678, 4810, 5607, 29918, 2965, 1164, 29892, 13, 1678, 4810, 25593, 1177, 1299, 1955, 29892, 13, 1678, 5012, 19059, 29918, 19713, 29892, 13, 1678, 11662, 29032, 29892, 13, 1678, 383, 4375, 2303, 29918, 2965, 1164, 29892, 13, 1678, 3553, 1307, 29918, 2965, 1164, 29892, 13, 1678, 317, 1430, 29903, 1955, 29918, 23827, 29918, 2287, 19059, 29918, 13875, 1799, 29892, 13, 1678, 317, 1430, 29903, 1955, 29918, 23827, 29918, 20387, 29931, 29892, 13, 1678, 317, 1430, 29903, 1955, 29918, 23827, 29918, 19713, 29918, 13875, 1799, 29892, 13, 1678, 317, 1430, 29903, 1955, 29918, 23827, 29918, 29965, 6488, 29892, 13, 1678, 8291, 1806, 29918, 29931, 5005, 1430, 29892, 13, 29897, 13, 3166, 869, 17062, 1582, 1053, 4116, 488, 29954, 403, 1582, 13, 13, 29918, 14480, 17070, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 1299, 5659, 29918, 4330, 3580, 1001, 1299, 11499, 353, 518, 13, 1678, 376, 5776, 546, 1535, 613, 13, 1678, 17067, 3580, 29918, 4741, 29931, 5425, 3308, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 13, 1678, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 29962, 13, 1299, 5659, 29918, 29933, 1299, 4945, 29979, 29918, 1307, 29963, 6670, 353, 518, 13, 1678, 376, 5914, 479, 613, 13, 1678, 349, 1001, 29907, 3919, 10461, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 29933, 1299, 4945, 29979, 29892, 13, 1678, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 29962, 13, 1299, 5659, 29918, 24071, 5005, 1177, 23219, 353, 518, 13, 1678, 376, 10002, 9735, 749, 613, 13, 1678, 8291, 1806, 29918, 29931, 5005, 1430, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 24071, 5005, 1177, 23219, 29892, 13, 1678, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 29962, 13, 1299, 5659, 29918, 15094, 1799, 11499, 353, 518, 13, 1678, 376, 10923, 545, 613, 13, 1678, 349, 26785, 11499, 29918, 29933, 1718, 29892, 13, 1678, 5012, 19059, 29918, 13875, 1799, 29918, 15094, 1799, 11499, 29892, 13, 1678, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 29962, 13, 13, 4330, 3580, 29918, 29903, 1430, 29903, 1955, 29918, 23827, 353, 426, 13, 1678, 376, 842, 3149, 1115, 15531, 5659, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 13, 1678, 376, 12863, 1535, 1115, 15531, 5659, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 13, 1678, 376, 524, 2760, 29918, 833, 3955, 29918, 12863, 1535, 1115, 15531, 5659, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 13, 1678, 376, 12863, 1535, 29918, 29881, 17678, 1115, 15531, 5659, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 13, 1678, 376, 449, 17433, 29918, 12863, 1535, 1115, 15531, 5659, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 13, 1678, 376, 13405, 29918, 12863, 1535, 1115, 15531, 5659, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 13, 1678, 376, 2457, 29918, 12863, 1535, 1115, 15531, 5659, 29918, 4330, 3580, 1001, 1299, 11499, 29892, 13, 29913, 13, 13, 1430, 1001, 29954, 29979, 29918, 29903, 1430, 29903, 1955, 29918, 23827, 353, 426, 13, 1678, 376, 15436, 2200, 537, 29918, 25978, 287, 1115, 518, 13, 4706, 376, 7583, 2138, 21571, 9206, 613, 13, 4706, 349, 9806, 1001, 29918, 29956, 1299, 29911, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 29925, 9806, 1001, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 5498, 1133, 1115, 518, 13, 4706, 376, 7583, 7138, 1133, 9206, 613, 13, 4706, 349, 9806, 1001, 29918, 29956, 1299, 29911, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 29925, 9806, 1001, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 25978, 287, 29918, 19207, 1115, 518, 13, 4706, 376, 13696, 21571, 9206, 4124, 791, 613, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 25978, 287, 29918, 412, 557, 29918, 19207, 1115, 518, 13, 4706, 376, 13696, 21571, 9206, 4124, 791, 613, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 25978, 287, 29918, 2696, 29918, 412, 557, 29918, 19207, 1115, 518, 13, 4706, 376, 13696, 21571, 9206, 4124, 791, 313, 2696, 19224, 19123, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 5498, 1133, 29918, 19207, 1115, 518, 13, 4706, 376, 23665, 1133, 9206, 4124, 791, 613, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 5498, 1133, 29918, 412, 557, 29918, 19207, 1115, 518, 13, 4706, 376, 23665, 1133, 9206, 4124, 791, 613, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 5498, 1133, 29918, 2696, 29918, 412, 557, 29918, 19207, 1115, 518, 13, 4706, 376, 23665, 1133, 9206, 4124, 791, 313, 2696, 19224, 19123, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 25978, 287, 29918, 2696, 29918, 412, 557, 29918, 3149, 1115, 518, 13, 4706, 376, 7583, 2138, 21571, 9206, 313, 2696, 19224, 19123, 13, 4706, 349, 9806, 1001, 29918, 29956, 1299, 29911, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 29925, 9806, 1001, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 25978, 287, 29918, 412, 557, 29918, 3149, 1115, 518, 13, 4706, 376, 7583, 2138, 21571, 9206, 613, 13, 4706, 349, 9806, 1001, 29918, 29956, 1299, 29911, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 29925, 9806, 1001, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 25978, 287, 29918, 2696, 29918, 412, 557, 29918, 29883, 398, 28524, 1115, 518, 13, 4706, 376, 29907, 398, 28524, 2138, 21571, 9206, 313, 2696, 19224, 19123, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29968, 29902, 3927, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29918, 1177, 22245, 3289, 4214, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 25978, 287, 29918, 412, 557, 29918, 29883, 398, 28524, 1115, 518, 13, 4706, 376, 29907, 398, 28524, 2138, 21571, 9206, 613, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29968, 29902, 3927, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29918, 1177, 22245, 3289, 4214, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 5498, 1133, 29918, 2696, 29918, 412, 557, 29918, 3149, 1115, 518, 13, 4706, 376, 7583, 7138, 1133, 9206, 313, 2696, 19224, 19123, 13, 4706, 349, 9806, 1001, 29918, 29956, 1299, 29911, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 29925, 9806, 1001, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 5498, 1133, 29918, 412, 557, 29918, 3149, 1115, 518, 13, 4706, 376, 7583, 7138, 1133, 9206, 613, 13, 4706, 349, 9806, 1001, 29918, 29956, 1299, 29911, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 29925, 9806, 1001, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 5498, 1133, 29918, 2696, 29918, 412, 557, 29918, 29883, 398, 28524, 1115, 518, 13, 4706, 376, 29907, 398, 28524, 7138, 1133, 9206, 313, 2696, 19224, 19123, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29968, 29902, 3927, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29918, 1177, 22245, 3289, 4214, 29892, 13, 1678, 21251, 13, 1678, 376, 15436, 2200, 537, 29918, 5498, 1133, 29918, 412, 557, 29918, 29883, 398, 28524, 1115, 518, 13, 4706, 376, 29907, 398, 28524, 7138, 1133, 9206, 613, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29968, 29902, 3927, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29918, 1177, 22245, 3289, 4214, 29892, 13, 1678, 21251, 13, 1678, 376, 25496, 29918, 25978, 287, 29918, 19207, 1115, 518, 13, 4706, 376, 7583, 2138, 21571, 19141, 4124, 791, 613, 13, 4706, 478, 5607, 29965, 2303, 29918, 29907, 7466, 2965, 29918, 2303, 4945, 29903, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 29954, 3289, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29892, 13, 1678, 21251, 13, 1678, 376, 25496, 29918, 25978, 287, 29918, 29883, 398, 28524, 1115, 518, 13, 4706, 376, 13696, 21571, 19141, 613, 13, 4706, 478, 5607, 29965, 2303, 29918, 29907, 7466, 2965, 29918, 2303, 4945, 29903, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 29954, 3289, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29918, 1177, 22245, 3289, 4214, 29892, 13, 1678, 21251, 13, 1678, 376, 1212, 29918, 15436, 2200, 537, 29918, 3149, 1115, 518, 13, 4706, 376, 7583, 7787, 9206, 613, 13, 4706, 349, 9806, 1001, 29918, 29956, 1299, 29911, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 29925, 9806, 1001, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 1678, 21251, 13, 1678, 376, 1212, 29918, 15436, 2200, 537, 29918, 29883, 398, 28524, 1115, 518, 13, 4706, 376, 29907, 398, 28524, 7787, 9206, 613, 13, 4706, 12524, 1001, 29954, 29979, 29918, 29968, 29902, 3927, 29918, 29956, 1299, 29911, 29918, 8187, 4574, 29892, 13, 4706, 5012, 19059, 29918, 13875, 1799, 29918, 1430, 1001, 29954, 29979, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 29911, 2891, 1964, 29892, 13, 1678, 21251, 13, 29913, 13, 13, 29924, 3235, 29907, 29918, 29903, 1430, 29903, 1955, 29918, 23827, 353, 426, 13, 1678, 376, 29890, 2620, 29891, 1115, 15531, 5659, 29918, 29933, 1299, 4945, 29979, 29918, 1307, 29963, 6670, 29892, 13, 1678, 376, 453, 9735, 749, 1115, 15531, 5659, 29918, 24071, 5005, 1177, 23219, 29892, 13, 1678, 376, 1545, 2785, 29918, 5563, 1115, 518, 13, 4706, 376, 3868, 1008, 3382, 2785, 21597, 613, 13, 4706, 349, 1001, 29907, 3919, 10461, 29892, 13, 4706, 6213, 29892, 13, 4706, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 29892, 13, 1678, 21251, 13, 1678, 376, 791, 345, 29918, 3283, 1115, 6796, 1440, 345, 20627, 613, 349, 1001, 29907, 3919, 10461, 29892, 6213, 29892, 6850, 3040, 29918, 13875, 1799, 29918, 2303, 3289, 11499, 13780, 1402, 13, 1678, 376, 13405, 29918, 2139, 545, 1115, 15531, 5659, 29918, 15094, 1799, 11499, 29892, 13, 29913, 13, 13, 22255, 2965, 3040, 29918, 17923, 18474, 29918, 16652, 1964, 29918, 2287, 19059, 353, 518, 13, 1678, 376, 1111, 324, 292, 29918, 3859, 613, 13, 1678, 376, 1579, 420, 29918, 3859, 613, 13, 29962, 13, 13, 29907, 17321, 6488, 29918, 2965, 1164, 29903, 353, 426, 13, 1678, 376, 25496, 29918, 25978, 287, 29918, 19207, 1115, 376, 3487, 29875, 29901, 8696, 613, 13, 1678, 376, 25496, 29918, 25978, 287, 29918, 29883, 398, 28524, 1115, 376, 3487, 29875, 29901, 8696, 613, 13, 1678, 376, 1545, 2785, 29918, 5563, 1115, 376, 3487, 29875, 29901, 25376, 613, 13, 1678, 376, 791, 345, 29918, 3283, 1115, 376, 3487, 29875, 29901, 791, 345, 613, 13, 29913, 13, 13, 13, 12674, 822, 7465, 29918, 14669, 29918, 8269, 29898, 29882, 465, 29892, 2295, 29918, 8269, 29892, 7465, 29918, 1202, 29918, 296, 1907, 1125, 13, 1678, 9995, 2697, 701, 278, 4116, 488, 4771, 943, 515, 263, 2295, 6251, 1213, 15945, 13, 1678, 7882, 353, 298, 465, 29889, 1272, 29961, 3970, 29032, 3816, 2917, 29918, 8269, 29889, 8269, 29918, 333, 29962, 3366, 2754, 3108, 13, 1678, 6615, 1061, 353, 298, 465, 29889, 1272, 29961, 3970, 29032, 3816, 2917, 29918, 8269, 29889, 8269, 29918, 333, 3816, 3217, 25593, 1177, 1299, 1955, 29962, 13, 13, 1678, 16212, 353, 5159, 13, 1678, 599, 29918, 3359, 1575, 353, 7882, 29889, 657, 29918, 497, 29918, 3359, 1575, 580, 13, 1678, 2323, 29918, 721, 3242, 271, 353, 7882, 29889, 14369, 29918, 6207, 29918, 721, 3242, 271, 580, 13, 1678, 363, 2906, 29918, 333, 29892, 4742, 29918, 11330, 297, 599, 29918, 3359, 1575, 29889, 7076, 7295, 13, 4706, 848, 353, 7882, 29889, 657, 29918, 10141, 29918, 1272, 29898, 3359, 29918, 333, 29897, 13, 4706, 363, 23530, 29892, 23530, 29918, 1853, 297, 426, 13, 9651, 3579, 4330, 3580, 29918, 29903, 1430, 29903, 1955, 29918, 23827, 29892, 13, 9651, 3579, 1430, 1001, 29954, 29979, 29918, 29903, 1430, 29903, 1955, 29918, 23827, 29892, 13, 9651, 3579, 29924, 3235, 29907, 29918, 29903, 1430, 29903, 1955, 29918, 23827, 29892, 13, 4706, 500, 29889, 7076, 7295, 13, 9651, 565, 848, 29889, 657, 29898, 29879, 6073, 29897, 338, 6213, 29901, 13, 18884, 6773, 13, 13, 9651, 565, 376, 13519, 29908, 297, 4742, 29918, 11330, 3366, 8768, 3108, 29901, 13, 18884, 1904, 353, 6213, 13, 13, 18884, 565, 376, 572, 688, 29908, 297, 4742, 29918, 11330, 3366, 8768, 3108, 29901, 13, 462, 1678, 1904, 353, 376, 29924, 1308, 287, 28176, 29908, 13, 13, 18884, 16212, 29889, 4397, 29898, 13, 462, 1678, 349, 29893, 21472, 29903, 6073, 29898, 13, 462, 4706, 7882, 29892, 13, 462, 4706, 6615, 1061, 29892, 13, 462, 4706, 4742, 29918, 11330, 3366, 978, 12436, 13, 462, 4706, 2906, 29918, 333, 29892, 13, 462, 4706, 23530, 29892, 13, 462, 4706, 23530, 29918, 1853, 29892, 13, 462, 4706, 1904, 29892, 13, 462, 1678, 1723, 13, 18884, 1723, 13, 9651, 1683, 29901, 13, 18884, 16212, 29889, 4397, 29898, 13, 462, 1678, 349, 29893, 1349, 837, 520, 271, 29903, 6073, 29898, 13, 462, 4706, 7882, 29892, 13, 462, 4706, 6615, 1061, 29892, 13, 462, 4706, 4742, 29918, 11330, 3366, 978, 12436, 13, 462, 4706, 2906, 29918, 333, 29892, 13, 462, 4706, 23530, 29892, 13, 462, 4706, 23530, 29918, 1853, 29892, 13, 462, 1678, 1723, 13, 18884, 1723, 13, 13, 4706, 565, 2323, 29918, 721, 3242, 271, 338, 7700, 29901, 13, 9651, 363, 2106, 297, 2672, 29928, 2965, 3040, 29918, 17923, 18474, 29918, 16652, 1964, 29918, 2287, 19059, 29901, 13, 18884, 565, 2106, 451, 297, 848, 29901, 13, 462, 1678, 6773, 13, 13, 18884, 16212, 29889, 4397, 29898, 13, 462, 1678, 349, 29893, 29909, 1314, 11501, 29903, 6073, 29898, 13, 462, 4706, 7882, 29892, 13, 462, 4706, 6615, 1061, 29892, 13, 462, 4706, 4742, 29918, 11330, 3366, 978, 12436, 13, 462, 4706, 2906, 29918, 333, 29892, 13, 462, 4706, 5012, 19059, 29918, 19713, 29892, 13, 462, 1678, 1723, 13, 18884, 1723, 13, 18884, 2867, 13, 13, 1678, 7465, 29918, 1202, 29918, 296, 1907, 29898, 296, 1907, 29892, 5852, 29897, 13, 13, 13, 1990, 4116, 488, 29903, 6073, 29898, 12636, 488, 29954, 403, 1582, 29892, 317, 6073, 6691, 1125, 13, 1678, 9995, 1123, 6338, 4116, 488, 317, 575, 943, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7882, 29892, 6615, 1061, 29892, 1024, 29892, 2906, 29918, 333, 29892, 23530, 1125, 13, 4706, 9995, 15514, 895, 278, 23530, 1213, 15945, 13, 4706, 2428, 2141, 1649, 2344, 12035, 2754, 29892, 6615, 1061, 29892, 1024, 29892, 2906, 29918, 333, 29897, 13, 13, 4706, 1583, 3032, 29879, 6073, 353, 23530, 13, 13, 4706, 1583, 3032, 3359, 29918, 1990, 353, 6213, 13, 4706, 1583, 3032, 4144, 353, 6213, 13, 4706, 1583, 3032, 3859, 353, 6213, 13, 4706, 1583, 3032, 3859, 29918, 1990, 353, 6213, 13, 4706, 1583, 3032, 5441, 29918, 974, 29918, 26658, 358, 353, 6213, 13, 13, 4706, 565, 2906, 29918, 333, 1275, 1583, 3032, 2754, 29889, 354, 1008, 29918, 333, 29901, 13, 9651, 1583, 3032, 10041, 29918, 978, 353, 376, 29909, 1314, 2638, 653, 29908, 13, 13, 4706, 23530, 978, 353, 23530, 29889, 6506, 703, 29918, 613, 376, 376, 467, 3257, 580, 13, 4706, 1583, 3032, 978, 353, 285, 29908, 29912, 1311, 3032, 10041, 29918, 978, 29913, 426, 29879, 6073, 978, 5038, 13, 13, 4706, 565, 2906, 29918, 333, 1275, 1583, 3032, 2754, 29889, 17062, 1582, 29918, 333, 29901, 13, 9651, 1583, 3032, 10041, 29918, 978, 353, 285, 29908, 12636, 488, 426, 1311, 3032, 10041, 29918, 978, 5038, 13, 13, 4706, 1583, 3032, 13092, 29918, 333, 353, 285, 29908, 29912, 3359, 29918, 333, 7402, 29912, 29879, 6073, 5038, 13, 13, 1678, 732, 6799, 13, 1678, 822, 4742, 29918, 1990, 29898, 1311, 1125, 13, 4706, 9995, 11501, 770, 310, 445, 7855, 1213, 15945, 13, 4706, 736, 1583, 3032, 3359, 29918, 1990, 13, 13, 1678, 732, 6799, 13, 1678, 822, 9849, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 9849, 310, 445, 7855, 1213, 15945, 13, 4706, 736, 1583, 3032, 4144, 13, 13, 1678, 732, 6799, 13, 1678, 822, 7531, 29918, 1767, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 2106, 310, 445, 7855, 1213, 15945, 13, 4706, 736, 1583, 3032, 3859, 13, 13, 1678, 732, 6799, 13, 1678, 822, 7531, 29918, 5441, 29918, 974, 29918, 26658, 358, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 5190, 310, 20039, 310, 445, 7855, 29892, 565, 738, 1213, 15945, 13, 4706, 736, 1583, 3032, 5441, 29918, 974, 29918, 26658, 358, 13, 13, 1678, 732, 6799, 13, 1678, 822, 2106, 29918, 1990, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 2106, 29918, 1990, 310, 445, 7855, 1213, 15945, 13, 4706, 736, 1583, 3032, 3859, 29918, 1990, 13, 13, 13, 1990, 349, 29893, 1349, 837, 520, 271, 29903, 6073, 29898, 12636, 488, 29903, 6073, 1125, 13, 1678, 9995, 1349, 837, 520, 271, 313, 272, 10035, 29897, 23530, 9224, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7882, 29892, 6615, 1061, 29892, 1024, 29892, 2906, 29918, 333, 29892, 23530, 29892, 23530, 29918, 1853, 1125, 13, 4706, 9995, 2697, 701, 278, 1858, 688, 3538, 3450, 1213, 15945, 13, 4706, 2428, 2141, 1649, 2344, 12035, 2754, 29892, 6615, 1061, 29892, 1024, 29892, 2906, 29918, 333, 29892, 23530, 29897, 13, 13, 4706, 1583, 3032, 4144, 353, 6213, 13, 4706, 1583, 3032, 4299, 353, 23530, 29918, 1853, 29961, 29903, 1430, 29903, 1955, 29918, 23827, 29918, 20387, 29931, 29962, 13, 4706, 1583, 3032, 5441, 29918, 974, 29918, 26658, 358, 353, 23530, 29918, 1853, 29961, 29903, 1430, 29903, 1955, 29918, 23827, 29918, 29965, 6488, 29962, 13, 4706, 1583, 3032, 3359, 29918, 1990, 353, 23530, 29918, 1853, 29961, 29903, 1430, 29903, 1955, 29918, 23827, 29918, 2287, 19059, 29918, 13875, 1799, 29962, 13, 4706, 1583, 3032, 3859, 29918, 1990, 353, 23530, 29918, 1853, 29961, 29903, 1430, 29903, 1955, 29918, 23827, 29918, 19713, 29918, 13875, 1799, 29962, 13, 13, 1678, 732, 14035, 13, 1678, 822, 903, 12674, 29918, 5014, 29918, 1272, 29898, 1311, 1125, 13, 4706, 9995, 6422, 278, 7855, 1213, 15945, 13, 4706, 848, 353, 1583, 3032, 2754, 29889, 657, 29918, 10141, 29918, 1272, 29898, 1311, 3032, 3359, 29918, 333, 29897, 13, 13, 4706, 565, 451, 848, 29901, 13, 9651, 903, 14480, 17070, 29889, 2704, 703, 29816, 694, 848, 363, 4742, 1273, 29879, 613, 1583, 3032, 10041, 29918, 978, 29897, 13, 9651, 1583, 29889, 12674, 29918, 3539, 29918, 2350, 29918, 3859, 580, 13, 9651, 736, 13, 13, 4706, 565, 848, 29889, 657, 29898, 1311, 3032, 29879, 6073, 29897, 338, 451, 6213, 29901, 13, 9651, 1583, 3032, 3859, 353, 848, 29961, 1311, 3032, 29879, 6073, 29962, 13, 9651, 1583, 3032, 4144, 353, 315, 17321, 6488, 29918, 2965, 1164, 29903, 29889, 657, 29898, 1311, 3032, 29879, 6073, 29892, 1583, 3032, 4144, 29897, 13, 13, 4706, 1583, 29889, 12674, 29918, 3539, 29918, 2350, 29918, 3859, 580, 13, 13, 13, 1990, 349, 29893, 29909, 1314, 11501, 29903, 6073, 29898, 12636, 488, 29903, 6073, 1125, 13, 1678, 9995, 29909, 1314, 2638, 653, 21830, 317, 575, 943, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7882, 29892, 6615, 1061, 29892, 1024, 29892, 2906, 29918, 333, 29892, 23530, 1125, 13, 4706, 9995, 2697, 701, 278, 1858, 688, 3538, 3450, 1213, 15945, 13, 4706, 2428, 2141, 1649, 2344, 12035, 2754, 29892, 6615, 1061, 29892, 1024, 29892, 2906, 29918, 333, 29892, 23530, 29897, 13, 13, 4706, 1583, 3032, 1111, 324, 292, 29918, 3859, 353, 7700, 13, 4706, 1583, 3032, 354, 1218, 29918, 3859, 353, 7700, 13, 13, 1678, 732, 14035, 13, 1678, 822, 903, 12674, 29918, 5014, 29918, 1272, 29898, 1311, 1125, 13, 4706, 9995, 6422, 278, 7855, 1213, 15945, 13, 4706, 848, 353, 1583, 3032, 2754, 29889, 657, 29918, 10141, 29918, 1272, 29898, 1311, 3032, 3359, 29918, 333, 29897, 13, 13, 4706, 565, 451, 848, 29901, 13, 9651, 903, 14480, 17070, 29889, 2704, 703, 29816, 694, 848, 363, 4742, 1273, 29879, 613, 1583, 3032, 10041, 29918, 978, 29897, 13, 9651, 1583, 29889, 12674, 29918, 3539, 29918, 2350, 29918, 3859, 580, 13, 9651, 736, 13, 13, 4706, 565, 848, 29889, 657, 703, 354, 1218, 29918, 3859, 1159, 338, 451, 6213, 29901, 13, 9651, 1583, 3032, 354, 1218, 29918, 3859, 353, 848, 3366, 354, 1218, 29918, 3859, 3108, 13, 4706, 565, 848, 29889, 657, 703, 1111, 324, 292, 29918, 3859, 1159, 338, 451, 6213, 29901, 13, 9651, 1583, 3032, 1111, 324, 292, 29918, 3859, 353, 848, 3366, 1111, 324, 292, 29918, 3859, 3108, 13, 13, 4706, 1583, 3032, 3859, 353, 376, 333, 280, 29908, 13, 4706, 1583, 3032, 4144, 353, 3553, 1307, 29918, 2965, 1164, 13, 4706, 565, 1583, 3032, 354, 1218, 29918, 3859, 29901, 13, 9651, 1583, 3032, 3859, 353, 376, 354, 1218, 29908, 13, 9651, 1583, 3032, 4144, 353, 383, 4375, 2303, 29918, 2965, 1164, 13, 4706, 565, 1583, 3032, 1111, 324, 292, 29918, 3859, 29901, 13, 9651, 1583, 3032, 3859, 353, 376, 1111, 324, 292, 29908, 13, 9651, 1583, 3032, 4144, 353, 4810, 5607, 29918, 2965, 1164, 13, 13, 4706, 1583, 29889, 12674, 29918, 3539, 29918, 2350, 29918, 3859, 580, 13, 13, 13, 1990, 349, 29893, 21472, 29903, 6073, 29898, 12636, 488, 29903, 6073, 1125, 13, 1678, 9995, 21472, 23530, 16212, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 7882, 29892, 6615, 1061, 29892, 1024, 29892, 2906, 29918, 333, 29892, 23530, 29892, 23530, 29918, 1853, 29892, 1904, 1125, 13, 4706, 9995, 2697, 701, 278, 1858, 688, 3538, 3450, 1213, 15945, 13, 4706, 2428, 2141, 1649, 2344, 12035, 2754, 29892, 6615, 1061, 29892, 1024, 29892, 2906, 29918, 333, 29892, 23530, 29897, 13, 13, 4706, 1583, 3032, 4144, 353, 6213, 13, 4706, 1583, 3032, 4299, 353, 1904, 13, 4706, 565, 1904, 338, 6213, 29901, 13, 9651, 1583, 3032, 4299, 353, 23530, 29918, 1853, 29961, 29903, 1430, 29903, 1955, 29918, 23827, 29918, 20387, 29931, 29962, 13, 13, 4706, 1583, 3032, 5441, 29918, 974, 29918, 26658, 358, 353, 23530, 29918, 1853, 29961, 29903, 1430, 29903, 1955, 29918, 23827, 29918, 29965, 6488, 29962, 13, 4706, 1583, 3032, 3359, 29918, 1990, 353, 23530, 29918, 1853, 29961, 29903, 1430, 29903, 1955, 29918, 23827, 29918, 2287, 19059, 29918, 13875, 1799, 29962, 13, 4706, 1583, 3032, 3859, 29918, 1990, 353, 23530, 29918, 1853, 29961, 29903, 1430, 29903, 1955, 29918, 23827, 29918, 19713, 29918, 13875, 1799, 29962, 13, 13, 4706, 565, 2906, 29918, 333, 1275, 1583, 3032, 2754, 29889, 17062, 1582, 29918, 333, 29901, 13, 9651, 1583, 3032, 4299, 353, 376, 29925, 29896, 360, 17061, 29934, 29908, 13, 13, 1678, 732, 14035, 13, 1678, 822, 903, 12674, 29918, 5014, 29918, 1272, 29898, 1311, 1125, 13, 4706, 9995, 6422, 278, 7855, 1213, 15945, 13, 4706, 848, 353, 1583, 3032, 2754, 29889, 657, 29918, 10141, 29918, 1272, 29898, 1311, 3032, 3359, 29918, 333, 29897, 13, 13, 4706, 565, 451, 848, 29901, 13, 9651, 903, 14480, 17070, 29889, 2704, 703, 29816, 694, 848, 363, 4742, 1273, 29879, 613, 1583, 3032, 10041, 29918, 978, 29897, 13, 9651, 1583, 29889, 12674, 29918, 3539, 29918, 2350, 29918, 3859, 580, 13, 9651, 736, 13, 13, 4706, 565, 848, 29889, 657, 29898, 1311, 3032, 29879, 6073, 29897, 338, 451, 6213, 29901, 13, 9651, 1583, 3032, 3859, 353, 848, 29961, 1311, 3032, 29879, 6073, 29962, 13, 9651, 1583, 3032, 4144, 353, 315, 17321, 6488, 29918, 2965, 1164, 29903, 29889, 657, 29898, 1311, 3032, 29879, 6073, 29892, 1583, 3032, 4144, 29897, 13, 13, 4706, 1583, 29889, 12674, 29918, 3539, 29918, 2350, 29918, 3859, 580, 13, 2 ]
DigiroadPreDataAnalysis/digiroad/util/__init__.py
DigitalGeographyLab/Car-Routing
2
119206
<filename>DigiroadPreDataAnalysis/digiroad/util/__init__.py import configparser import csv import datetime import json import logging import logging.config import numpy import os import shutil import time import zipfile from digiroad import carRoutingExceptions as exc from digiroad.entities import Point from pandas.io.json import json_normalize def enum(**enums): return type('Enum', (), enums) carRountingDictionary = { "pituus": "distance", "digiroa_aa": "speed_limit_time", "kokopva_aa": "day_average_delay_time", "keskpva_aa": "midday_delay_time", "ruuhka_aa": "rush_hour_delay_time" } CostAttributes = enum(DISTANCE='pituus', SPEED_LIMIT_TIME='digiroa_aa', DAY_AVG_DELAY_TIME='kokopva_aa', MIDDAY_DELAY_TIME='keskpva_aa', RUSH_HOUR_DELAY='ruuhka_aa', BICYCLE_FAST_TIME='fast_time', BICYCLE_SLOW_TIME='slow_time') TransportModes = enum(PRIVATE_CAR='PRIVATE_CAR', BICYCLE='BICYCLE') GeometryType = enum(POINT="Point", MULTI_POINT='MultiPoint', LINE_STRING='LineString') PostfixAttribute = enum(EUCLIDEAN_DISTANCE="EuclideanDistance", AVG_WALKING_DISTANCE="AVGWalkingDistance", WALKING_TIME="WalkingTime", PARKING_TIME="ParkingTime") GPD_CRS = enum(WGS_84={'init': 'EPSG:4326'}, PSEUDO_MERCATOR={'init': 'EPSG:3857'}) def getEnglishMeaning(cost_attribute=None): if cost_attribute in carRountingDictionary: return carRountingDictionary[cost_attribute] else: return cost_attribute def getFormattedDatetime(timemilis=time.time(), format='%Y-%m-%d %H:%M:%S'): formattedDatetime = datetime.datetime.fromtimestamp(timemilis).strftime(format) return formattedDatetime def timeDifference(startTime, endTime): totalTime = (endTime - startTime) / 60 # min return totalTime def getConfigurationProperties(section="WFS_CONFIG"): config = configparser.ConfigParser() configurationPath = os.getcwd() + "%resources%configuration.properties".replace("%", os.sep) config.read(configurationPath) return config[section] def extractCRS(geojson): epsgCode = geojson["crs"]["properties"]["name"].split(":")[-3] + ":" + \ geojson["crs"]["properties"]["name"].split(":")[-1] return epsgCode def createPointFromPointFeature(newFeaturePoint, epsgCode): if newFeaturePoint["geometry"]["type"] == GeometryType.MULTI_POINT: startNearestVertexCoordinates = newFeaturePoint["geometry"]["coordinates"][0] elif newFeaturePoint["geometry"]["type"] == GeometryType.POINT: startNearestVertexCoordinates = newFeaturePoint["geometry"]["coordinates"] nearestStartPoint = Point(latitute=startNearestVertexCoordinates[1], longitude=startNearestVertexCoordinates[0], epsgCode=epsgCode) return nearestStartPoint def dgl_timer(func): def func_wrapper(*args, **kwargs): timerEnabled = "True".__eq__(getConfigurationProperties(section="WFS_CONFIG")["timerEnabled"]) if timerEnabled: functionName = func.__name__ startTime = time.time() Logger.getInstance().info("%s Start Time: %s" % (functionName, getFormattedDatetime(timemilis=startTime))) ############################### returns = func(*args, **kwargs) ############################### endTime = time.time() Logger.getInstance().info("%s End Time: %s" % (functionName, getFormattedDatetime(timemilis=endTime))) totalTime = timeDifference(startTime, endTime) Logger.getInstance().info("%s Total Time: %s m" % (functionName, totalTime)) return returns else: return func(*args, **kwargs) return func_wrapper def dgl_timer_enabled(func): def func_wrapper(*args, **kwargs): functionName = func.__name__ startTime = time.time() Logger.getInstance().info("%s Start Time: %s" % (functionName, getFormattedDatetime(timemilis=startTime))) ############################### returns = func(*args, **kwargs) ############################### endTime = time.time() Logger.getInstance().info("%s End Time: %s" % (functionName, getFormattedDatetime(timemilis=endTime))) totalTime = timeDifference(startTime, endTime) Logger.getInstance().info("%s Total Time: %s m" % (functionName, totalTime)) return returns return func_wrapper class AbstractLinkedList(object): def __init__(self): self._next = None def hasNext(self): return self._next is not None def next(self): self._next def setNext(self, next): self._next = next class Node: def __init__(self, item): """ A node contains an item and a possible next node. :param item: The referenced item. """ self._item = item self._next = None def getItem(self): return self._item def setItem(self, item): self._item = item def getNext(self): return self._next def setNext(self, next): self._next = next class LinkedList(AbstractLinkedList): def __init__(self): """ Linked List implementation. The _head is the first node in the linked list. _next refers to the possible next node into the linked list. And the _tail is the last node added into the linked list. """ self._head = None self._next = None self._tail = None def hasNext(self): """ Veryfy if there is a possible next node in the queue of the linked list. :return: True if there is a next node. """ if self._next: return True return False def next(self): """ :return: The next available item in the queue of the linked list. """ item = self._next.getItem() self._next = self._next.getNext() return item def add(self, newItem): """ Add new items into the linked list. The _tail is moving forward and create a new node ecah time that a new item is added. :param newItem: Item to be added. """ if self._head is None: self._head = Node(newItem) self._next = self._head self._tail = self._head else: node = Node(newItem) self._tail.setNext(node) self._tail = node def restart(self): """ Move the linked list to its initial node. """ self._next = self._head self._tail = self._head class FileActions: def readJson(self, url): """ Read a json file :param url: URL for the Json file :return: json dictionary data """ with open(url) as f: data = json.load(f) return data def readMultiPointJson(self, url): """ Read a MultiPoint geometry geojson file, in case the file do not be a MultiPoint geometry, then an NotMultiPointGeometryException is thrown. :param url: URL for the Json file :return: json dictionary data """ data = None with open(url) as f: data = json.load(f) self.checkGeometry(data, GeometryType.MULTI_POINT) return data def readPointJson(self, url): """ Read a MultiPoint geometry geojson file, in case the file do not be a MultiPoint geometry, then an NotMultiPointGeometryException is thrown. :param url: URL for the Json file :return: json dictionary data """ data = None with open(url) as f: data = json.load(f) self.checkGeometry(data, GeometryType.POINT) return data def checkGeometry(self, data, geometryType=GeometryType.MULTI_POINT): """ Check the content of the Json to verify if it is a specific geoemtry type. By default is MultiPoint. In case the geojson do not be the given geometry type then an :param data: json dictionary :param geometryType: Geometry type (i.e. MultiPoint, LineString) :return: None """ for feature in data["features"]: if feature["geometry"]["type"] != geometryType: raise exc.IncorrectGeometryTypeException("Expected %s" % geometryType) def convertToGeojson(self, dataframe): jsonResult = dataframe.to_json() newJson = json.loads(jsonResult) newJson["crs"] = { "properties": { "name": "urn:ogc:def:crs:%s" % (GPD_CRS.PSEUDO_MERCATOR["init"].replace(":", "::")) }, "type": "name" } return newJson def writeFile(self, folderPath, filename, data): if not os.path.exists(folderPath): os.makedirs(folderPath) fileURL = folderPath + "%s%s" % (os.sep, filename) with open(fileURL, 'w+') as outfile: json.dump(data, outfile, sort_keys=True) return fileURL def createFile(self, folderPath, filename): if not os.path.exists(folderPath): os.makedirs(folderPath) with open(folderPath + os.sep + filename, 'w+') as outfile: outfile.close() def deleteFile(self, folderPath, filename): Logger.getInstance().info("Deleting FILE %s" % os.path.join(folderPath, filename)) if os.path.exists(folderPath + os.sep + filename): os.remove(folderPath + os.sep + filename) Logger.getInstance().info("The FILE %s was deleted" % os.path.join(folderPath, filename)) def deleteFolder(self, path): Logger.getInstance().info("Deleting FOLDER %s" % path) if os.path.exists(path): shutil.rmtree(path) Logger.getInstance().info("The FOLDER %s was deleted" % path) @dgl_timer def compressOutputFile(self, folderPath, zip_filename, filepath): zipf = zipfile.ZipFile(folderPath + os.sep + zip_filename, "a", zipfile.ZIP_DEFLATED, allowZip64=True) zipf.write(filepath, os.path.basename(filepath)) @dgl_timer def transformGeojsonInDataFrame(self, geojson): if "features" in geojson: df = json_normalize(geojson["features"]) columns = numpy.asarray([column.replace("properties.", "") for column in df.columns.values]) df.columns = columns return df return None def writeInCSV(self, folderPath, filename, valueList): if not os.path.exists(folderPath): os.makedirs(folderPath) file = folderPath + os.sep + filename if not os.path.isfile(file): fieldList = [] attributes = getConfigurationProperties(section="ATTRIBUTES_MAPPING") for attribute_key in attributes: attribute_splitted = attributes[attribute_key].split(",") key = attribute_splitted[0] value = attribute_splitted[1] fieldList.append(value) with open(file, 'w', newline='') as outputFile: writer = csv.writer(outputFile, delimiter=';') writer.writerow(fieldList) writer.writerow(valueList) else: with open(file, 'a', newline='') as outputFile: writer = csv.writer(outputFile, delimiter=';') writer.writerow(valueList) def parallel_job_print(msg, msg_args): """ Display the message on stout or stderr depending on verbosity """ # XXX: Not using the logger framework: need to # learn to use logger better. # if not self.verbose: # return # if self.verbose < 50: # writer = sys.stderr.write # else: # writer = sys.stdout.write msg = msg % msg_args self = "Parallel(n_jobs=%s)" % getConfigurationProperties(section="PARALLELIZATION")["jobs"] # writer('[%s]: %s\n' % (self, msg)) Logger.getInstance().info('[%s]: %s' % (self, msg)) class Logger: __instance = None __handler = None def __init__(self): raise Exception("Instances must be constructed with Logger.getInstance()") @staticmethod def configureLogger(outputFolder, prefix): # Logger.__instance = None log_filename = prefix + "_log - %s.log" % getFormattedDatetime(timemilis=time.time(), format='%Y-%m-%d %H_%M_%S') logs_folder = outputFolder + os.sep + "logs" FileActions().createFile(logs_folder, log_filename) if Logger.__handler is not None: Logger.getInstance().removeHandler(Logger.__handler) fileHandler = logging.FileHandler(logs_folder + os.sep + log_filename, 'w') formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') fileHandler.setFormatter(formatter) Logger.__handler = fileHandler Logger.getInstance().addHandler(fileHandler) @staticmethod def getInstance(): if not Logger.__instance: # configurationPath = os.getcwd() + "%resources%logging.properties".replace("%", os.sep) # logging.config.fileConfig(configurationPath) # create logger Logger.__instance = logging.getLogger("CARDAT") # "application" code # Logger.instance.debug("debug message") # Logger.instance.info("info message") # Logger.instance.warn("warn message") # Logger.instance.error("error message") # Logger.instance.critical("critical message") return Logger.__instance class GeneralLogger: def __init__(self, loggerName, outputFolder, prefix=""): self.logger = self._createLogger(loggerName=loggerName) self.handler = self._createLogFileHandler(outputFolder=outputFolder, prefix=prefix) self.logger.addHandler(self.handler) def _createLogger(self, loggerName): configurationPath = os.getcwd() + "%resources%logging.properties".replace("%", os.sep) logging.config.fileConfig(configurationPath) # create logger logger = logging.getLogger(loggerName) return logger def _createLogFileHandler(self, outputFolder, prefix): log_filename = prefix + "_log - %s.log" % getFormattedDatetime( timemilis=time.time(), format='%Y-%m-%d %H_%M_%S' ) logs_folder = outputFolder + os.sep + "logs" FileActions().createFile(logs_folder, log_filename) fileHandler = logging.FileHandler(logs_folder + os.sep + log_filename, 'w') formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') fileHandler.setFormatter(formatter) return fileHandler def getLogger(self): return self.logger
[ 1, 529, 9507, 29958, 14991, 3350, 328, 6572, 1469, 21067, 4848, 29914, 7501, 3350, 328, 29914, 4422, 29914, 1649, 2344, 26914, 2272, 13, 5215, 2295, 16680, 13, 5215, 11799, 13, 5215, 12865, 13, 5215, 4390, 13, 5215, 12183, 13, 5215, 12183, 29889, 2917, 13, 5215, 12655, 13, 5215, 2897, 13, 5215, 528, 4422, 13, 5215, 931, 13, 5215, 14319, 1445, 13, 13, 3166, 4697, 3350, 328, 1053, 1559, 24254, 292, 2451, 29879, 408, 5566, 13, 3166, 4697, 3350, 328, 29889, 296, 1907, 1053, 8984, 13, 13, 3166, 11701, 29889, 601, 29889, 3126, 1053, 4390, 29918, 8945, 675, 13, 13, 13, 1753, 14115, 29898, 1068, 264, 6762, 1125, 13, 1678, 736, 1134, 877, 16854, 742, 313, 511, 427, 6762, 29897, 13, 13, 13, 4287, 29934, 792, 292, 11513, 353, 426, 13, 1678, 376, 29886, 1981, 375, 1115, 376, 19244, 613, 13, 1678, 376, 7501, 3350, 29874, 29918, 7340, 1115, 376, 19322, 29918, 13400, 29918, 2230, 613, 13, 1678, 376, 29895, 554, 459, 1564, 29918, 7340, 1115, 376, 3250, 29918, 12483, 482, 29918, 18829, 29918, 2230, 613, 13, 1678, 376, 29895, 8488, 29886, 1564, 29918, 7340, 1115, 376, 29885, 2205, 388, 29918, 18829, 29918, 2230, 613, 13, 1678, 376, 582, 16099, 1335, 29918, 7340, 1115, 376, 29878, 1878, 29918, 18721, 29918, 18829, 29918, 2230, 29908, 13, 29913, 13, 13, 25733, 15801, 353, 14115, 29898, 4571, 1254, 23219, 2433, 29886, 1981, 375, 742, 13, 462, 418, 317, 4162, 3352, 29918, 5265, 26349, 29918, 15307, 2433, 7501, 3350, 29874, 29918, 7340, 742, 13, 462, 418, 21330, 29979, 29918, 7520, 29954, 29918, 2287, 18799, 29918, 15307, 2433, 29895, 554, 459, 1564, 29918, 7340, 742, 13, 462, 418, 341, 1367, 28658, 29918, 2287, 18799, 29918, 15307, 2433, 29895, 8488, 29886, 1564, 29918, 7340, 742, 13, 462, 418, 390, 3308, 29950, 29918, 8187, 4574, 29918, 2287, 18799, 2433, 582, 16099, 1335, 29918, 7340, 742, 13, 462, 418, 350, 2965, 29979, 29907, 1307, 29918, 4519, 1254, 29918, 15307, 2433, 11255, 29918, 2230, 742, 13, 462, 418, 350, 2965, 29979, 29907, 1307, 29918, 29903, 27998, 29918, 15307, 2433, 28544, 29918, 2230, 1495, 13, 13, 27395, 2111, 267, 353, 14115, 29898, 29829, 29963, 3040, 29918, 29907, 1718, 2433, 29829, 29963, 3040, 29918, 29907, 1718, 742, 350, 2965, 29979, 29907, 1307, 2433, 29933, 2965, 29979, 29907, 1307, 1495, 13, 13, 7999, 7843, 1542, 353, 14115, 29898, 29925, 6992, 29911, 543, 5228, 613, 341, 8647, 29902, 29918, 29925, 6992, 29911, 2433, 15329, 5228, 742, 365, 8895, 29918, 20785, 2433, 3542, 1231, 1495, 13, 13, 6747, 5878, 6708, 353, 14115, 29898, 29923, 29965, 6154, 22027, 2190, 29918, 4571, 1254, 23219, 543, 29923, 27511, 27469, 613, 16884, 29954, 29918, 29956, 1964, 29968, 4214, 29918, 4571, 1254, 23219, 543, 7520, 29954, 29956, 2235, 292, 27469, 613, 13, 462, 4706, 399, 1964, 29968, 4214, 29918, 15307, 543, 29956, 2235, 292, 2481, 613, 349, 1718, 29968, 4214, 29918, 15307, 543, 29925, 935, 292, 2481, 1159, 13, 13, 19903, 29928, 29918, 11341, 29903, 353, 14115, 29898, 29956, 10749, 29918, 29947, 29946, 3790, 29915, 2344, 2396, 525, 29923, 7024, 29954, 29901, 29946, 29941, 29906, 29953, 16675, 349, 1660, 29965, 3970, 29918, 29924, 1001, 23972, 1955, 3790, 29915, 2344, 2396, 525, 29923, 7024, 29954, 29901, 29941, 29947, 29945, 29955, 29915, 1800, 13, 13, 13, 1753, 679, 24636, 6816, 273, 292, 29898, 18253, 29918, 12715, 29922, 8516, 1125, 13, 1678, 565, 3438, 29918, 12715, 297, 1559, 29934, 792, 292, 11513, 29901, 13, 4706, 736, 1559, 29934, 792, 292, 11513, 29961, 18253, 29918, 12715, 29962, 13, 1678, 1683, 29901, 13, 4706, 736, 3438, 29918, 12715, 13, 13, 13, 1753, 679, 2500, 19667, 16390, 5410, 29898, 9346, 331, 23285, 29922, 2230, 29889, 2230, 3285, 3402, 2433, 29995, 29979, 19222, 29885, 19222, 29881, 1273, 29950, 16664, 29924, 16664, 29903, 29374, 13, 1678, 20917, 16390, 5410, 353, 12865, 29889, 12673, 29889, 3166, 16394, 29898, 9346, 331, 23285, 467, 710, 615, 603, 29898, 4830, 29897, 13, 1678, 736, 20917, 16390, 5410, 13, 13, 13, 1753, 931, 29928, 17678, 29898, 2962, 2481, 29892, 1095, 2481, 1125, 13, 1678, 3001, 2481, 353, 313, 355, 2481, 448, 1369, 2481, 29897, 847, 29871, 29953, 29900, 29871, 396, 1375, 13, 1678, 736, 3001, 2481, 13, 13, 13, 1753, 679, 8614, 11857, 29898, 2042, 543, 29956, 9998, 29918, 25903, 29908, 1125, 13, 1678, 2295, 353, 2295, 16680, 29889, 3991, 11726, 580, 13, 1678, 5285, 2605, 353, 2897, 29889, 657, 29883, 9970, 580, 718, 11860, 13237, 29995, 13305, 29889, 11330, 1642, 6506, 11702, 613, 2897, 29889, 19570, 29897, 13, 1678, 2295, 29889, 949, 29898, 13305, 2605, 29897, 13, 1678, 736, 2295, 29961, 2042, 29962, 13, 13, 13, 1753, 6597, 11341, 29903, 29898, 24756, 3126, 1125, 13, 1678, 321, 567, 29887, 3399, 353, 1737, 29877, 3126, 3366, 29883, 2288, 3108, 3366, 11330, 3108, 3366, 978, 16862, 5451, 703, 29901, 1159, 14352, 29941, 29962, 718, 376, 6160, 718, 320, 13, 1669, 1737, 29877, 3126, 3366, 29883, 2288, 3108, 3366, 11330, 3108, 3366, 978, 16862, 5451, 703, 29901, 1159, 14352, 29896, 29962, 13, 1678, 736, 321, 567, 29887, 3399, 13, 13, 13, 1753, 1653, 5228, 4591, 5228, 19132, 29898, 1482, 19132, 5228, 29892, 321, 567, 29887, 3399, 1125, 13, 1678, 565, 716, 19132, 5228, 3366, 19156, 3108, 3366, 1853, 3108, 1275, 1879, 7843, 1542, 29889, 29924, 8647, 29902, 29918, 29925, 6992, 29911, 29901, 13, 4706, 1369, 29940, 799, 342, 22479, 7967, 24266, 353, 716, 19132, 5228, 3366, 19156, 3108, 3366, 1111, 24266, 3108, 29961, 29900, 29962, 13, 1678, 25342, 716, 19132, 5228, 3366, 19156, 3108, 3366, 1853, 3108, 1275, 1879, 7843, 1542, 29889, 29925, 6992, 29911, 29901, 13, 4706, 1369, 29940, 799, 342, 22479, 7967, 24266, 353, 716, 19132, 5228, 3366, 19156, 3108, 3366, 1111, 24266, 3108, 13, 13, 1678, 20471, 4763, 5228, 353, 8984, 29898, 5066, 12356, 29922, 2962, 29940, 799, 342, 22479, 7967, 24266, 29961, 29896, 1402, 13, 462, 795, 28745, 29922, 2962, 29940, 799, 342, 22479, 7967, 24266, 29961, 29900, 1402, 13, 462, 795, 321, 567, 29887, 3399, 29922, 8961, 29887, 3399, 29897, 13, 1678, 736, 20471, 4763, 5228, 13, 13, 13, 1753, 270, 3820, 29918, 20404, 29898, 9891, 1125, 13, 1678, 822, 3653, 29918, 17699, 10456, 5085, 29892, 3579, 19290, 1125, 13, 4706, 12237, 10861, 353, 376, 5574, 1642, 1649, 1837, 12035, 657, 8614, 11857, 29898, 2042, 543, 29956, 9998, 29918, 25903, 1159, 3366, 20404, 10861, 20068, 13, 4706, 565, 12237, 10861, 29901, 13, 9651, 740, 1170, 353, 3653, 17255, 978, 1649, 13, 9651, 1369, 2481, 353, 931, 29889, 2230, 580, 13, 9651, 28468, 29889, 20958, 2141, 3888, 11702, 29879, 7370, 5974, 29901, 1273, 29879, 29908, 1273, 313, 2220, 1170, 29892, 679, 2500, 19667, 16390, 5410, 29898, 9346, 331, 23285, 29922, 2962, 2481, 4961, 13, 13, 9651, 835, 13383, 7346, 4136, 13, 9651, 3639, 353, 3653, 10456, 5085, 29892, 3579, 19290, 29897, 13, 9651, 835, 13383, 7346, 4136, 13, 13, 9651, 1095, 2481, 353, 931, 29889, 2230, 580, 13, 9651, 28468, 29889, 20958, 2141, 3888, 11702, 29879, 2796, 5974, 29901, 1273, 29879, 29908, 1273, 313, 2220, 1170, 29892, 679, 2500, 19667, 16390, 5410, 29898, 9346, 331, 23285, 29922, 355, 2481, 4961, 13, 13, 9651, 3001, 2481, 353, 931, 29928, 17678, 29898, 2962, 2481, 29892, 1095, 2481, 29897, 13, 9651, 28468, 29889, 20958, 2141, 3888, 11702, 29879, 14990, 5974, 29901, 1273, 29879, 286, 29908, 1273, 313, 2220, 1170, 29892, 3001, 2481, 876, 13, 13, 9651, 736, 3639, 13, 4706, 1683, 29901, 13, 9651, 736, 3653, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 1678, 736, 3653, 29918, 17699, 13, 13, 13, 1753, 270, 3820, 29918, 20404, 29918, 17590, 29898, 9891, 1125, 13, 1678, 822, 3653, 29918, 17699, 10456, 5085, 29892, 3579, 19290, 1125, 13, 4706, 740, 1170, 353, 3653, 17255, 978, 1649, 13, 4706, 1369, 2481, 353, 931, 29889, 2230, 580, 13, 4706, 28468, 29889, 20958, 2141, 3888, 11702, 29879, 7370, 5974, 29901, 1273, 29879, 29908, 1273, 313, 2220, 1170, 29892, 679, 2500, 19667, 16390, 5410, 29898, 9346, 331, 23285, 29922, 2962, 2481, 4961, 13, 13, 4706, 835, 13383, 7346, 4136, 13, 4706, 3639, 353, 3653, 10456, 5085, 29892, 3579, 19290, 29897, 13, 4706, 835, 13383, 7346, 4136, 13, 13, 4706, 1095, 2481, 353, 931, 29889, 2230, 580, 13, 4706, 28468, 29889, 20958, 2141, 3888, 11702, 29879, 2796, 5974, 29901, 1273, 29879, 29908, 1273, 313, 2220, 1170, 29892, 679, 2500, 19667, 16390, 5410, 29898, 9346, 331, 23285, 29922, 355, 2481, 4961, 13, 13, 4706, 3001, 2481, 353, 931, 29928, 17678, 29898, 2962, 2481, 29892, 1095, 2481, 29897, 13, 4706, 28468, 29889, 20958, 2141, 3888, 11702, 29879, 14990, 5974, 29901, 1273, 29879, 286, 29908, 1273, 313, 2220, 1170, 29892, 3001, 2481, 876, 13, 13, 4706, 736, 3639, 13, 13, 1678, 736, 3653, 29918, 17699, 13, 13, 13, 1990, 25513, 6595, 287, 1293, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 3032, 4622, 353, 6213, 13, 13, 1678, 822, 756, 9190, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 4622, 338, 451, 6213, 13, 13, 1678, 822, 2446, 29898, 1311, 1125, 13, 4706, 1583, 3032, 4622, 13, 13, 1678, 822, 731, 9190, 29898, 1311, 29892, 2446, 1125, 13, 4706, 1583, 3032, 4622, 353, 2446, 13, 13, 13, 1990, 9071, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2944, 1125, 13, 4706, 9995, 13, 4706, 319, 2943, 3743, 385, 2944, 322, 263, 1950, 2446, 2943, 29889, 13, 4706, 584, 3207, 2944, 29901, 450, 16180, 2944, 29889, 13, 4706, 9995, 13, 4706, 1583, 3032, 667, 353, 2944, 13, 4706, 1583, 3032, 4622, 353, 6213, 13, 13, 1678, 822, 679, 2001, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 667, 13, 13, 1678, 822, 731, 2001, 29898, 1311, 29892, 2944, 1125, 13, 4706, 1583, 3032, 667, 353, 2944, 13, 13, 1678, 822, 679, 9190, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 4622, 13, 13, 1678, 822, 731, 9190, 29898, 1311, 29892, 2446, 1125, 13, 4706, 1583, 3032, 4622, 353, 2446, 13, 13, 13, 1990, 28547, 1293, 29898, 9118, 6595, 287, 1293, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 9995, 13, 4706, 28547, 2391, 5314, 29889, 13, 13, 4706, 450, 903, 2813, 338, 278, 937, 2943, 297, 278, 9024, 1051, 29889, 13, 4706, 903, 4622, 14637, 304, 278, 1950, 2446, 2943, 964, 278, 9024, 1051, 29889, 13, 4706, 1126, 278, 903, 18237, 338, 278, 1833, 2943, 2715, 964, 278, 9024, 1051, 29889, 13, 4706, 9995, 13, 4706, 1583, 3032, 2813, 353, 6213, 13, 4706, 1583, 3032, 4622, 353, 6213, 13, 4706, 1583, 3032, 18237, 353, 6213, 13, 13, 1678, 822, 756, 9190, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 18064, 29888, 29891, 565, 727, 338, 263, 1950, 2446, 2943, 297, 278, 9521, 310, 278, 9024, 1051, 29889, 13, 13, 4706, 584, 2457, 29901, 5852, 565, 727, 338, 263, 2446, 2943, 29889, 13, 4706, 9995, 13, 4706, 565, 1583, 3032, 4622, 29901, 13, 9651, 736, 5852, 13, 13, 4706, 736, 7700, 13, 13, 1678, 822, 2446, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 584, 2457, 29901, 450, 2446, 3625, 2944, 297, 278, 9521, 310, 278, 9024, 1051, 29889, 13, 4706, 9995, 13, 4706, 2944, 353, 1583, 3032, 4622, 29889, 657, 2001, 580, 13, 4706, 1583, 3032, 4622, 353, 1583, 3032, 4622, 29889, 657, 9190, 580, 13, 4706, 736, 2944, 13, 13, 1678, 822, 788, 29898, 1311, 29892, 716, 2001, 1125, 13, 4706, 9995, 13, 4706, 3462, 716, 4452, 964, 278, 9024, 1051, 29889, 450, 903, 18237, 338, 8401, 6375, 322, 1653, 263, 716, 2943, 21226, 801, 931, 393, 263, 716, 2944, 13, 4706, 338, 2715, 29889, 13, 13, 4706, 584, 3207, 716, 2001, 29901, 10976, 304, 367, 2715, 29889, 13, 4706, 9995, 13, 4706, 565, 1583, 3032, 2813, 338, 6213, 29901, 13, 9651, 1583, 3032, 2813, 353, 9071, 29898, 1482, 2001, 29897, 13, 9651, 1583, 3032, 4622, 353, 1583, 3032, 2813, 13, 9651, 1583, 3032, 18237, 353, 1583, 3032, 2813, 13, 4706, 1683, 29901, 13, 9651, 2943, 353, 9071, 29898, 1482, 2001, 29897, 13, 9651, 1583, 3032, 18237, 29889, 842, 9190, 29898, 3177, 29897, 13, 9651, 1583, 3032, 18237, 353, 2943, 13, 13, 1678, 822, 10715, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 25249, 278, 9024, 1051, 304, 967, 2847, 2943, 29889, 13, 4706, 9995, 13, 4706, 1583, 3032, 4622, 353, 1583, 3032, 2813, 13, 4706, 1583, 3032, 18237, 353, 1583, 3032, 2813, 13, 13, 13, 1990, 3497, 26525, 29901, 13, 1678, 822, 1303, 8148, 29898, 1311, 29892, 3142, 1125, 13, 4706, 9995, 13, 4706, 7523, 263, 4390, 934, 13, 4706, 584, 3207, 3142, 29901, 3988, 363, 278, 14355, 934, 13, 4706, 584, 2457, 29901, 4390, 8600, 848, 13, 4706, 9995, 13, 4706, 411, 1722, 29898, 2271, 29897, 408, 285, 29901, 13, 9651, 848, 353, 4390, 29889, 1359, 29898, 29888, 29897, 13, 4706, 736, 848, 13, 13, 1678, 822, 1303, 15329, 5228, 8148, 29898, 1311, 29892, 3142, 1125, 13, 4706, 9995, 13, 4706, 7523, 263, 14974, 5228, 16303, 1737, 29877, 3126, 934, 29892, 297, 1206, 278, 934, 437, 451, 367, 263, 14974, 5228, 13, 4706, 16303, 29892, 769, 385, 2216, 15329, 5228, 7999, 7843, 2451, 338, 12005, 29889, 13, 13, 4706, 584, 3207, 3142, 29901, 3988, 363, 278, 14355, 934, 13, 4706, 584, 2457, 29901, 4390, 8600, 848, 13, 4706, 9995, 13, 4706, 848, 353, 6213, 13, 4706, 411, 1722, 29898, 2271, 29897, 408, 285, 29901, 13, 9651, 848, 353, 4390, 29889, 1359, 29898, 29888, 29897, 13, 13, 4706, 1583, 29889, 3198, 7999, 7843, 29898, 1272, 29892, 1879, 7843, 1542, 29889, 29924, 8647, 29902, 29918, 29925, 6992, 29911, 29897, 13, 13, 4706, 736, 848, 13, 13, 1678, 822, 1303, 5228, 8148, 29898, 1311, 29892, 3142, 1125, 13, 4706, 9995, 13, 4706, 7523, 263, 14974, 5228, 16303, 1737, 29877, 3126, 934, 29892, 297, 1206, 278, 934, 437, 451, 367, 263, 14974, 5228, 13, 4706, 16303, 29892, 769, 385, 2216, 15329, 5228, 7999, 7843, 2451, 338, 12005, 29889, 13, 13, 4706, 584, 3207, 3142, 29901, 3988, 363, 278, 14355, 934, 13, 4706, 584, 2457, 29901, 4390, 8600, 848, 13, 4706, 9995, 13, 4706, 848, 353, 6213, 13, 4706, 411, 1722, 29898, 2271, 29897, 408, 285, 29901, 13, 9651, 848, 353, 4390, 29889, 1359, 29898, 29888, 29897, 13, 13, 4706, 1583, 29889, 3198, 7999, 7843, 29898, 1272, 29892, 1879, 7843, 1542, 29889, 29925, 6992, 29911, 29897, 13, 13, 4706, 736, 848, 13, 13, 1678, 822, 1423, 7999, 7843, 29898, 1311, 29892, 848, 29892, 16303, 1542, 29922, 7999, 7843, 1542, 29889, 29924, 8647, 29902, 29918, 29925, 6992, 29911, 1125, 13, 4706, 9995, 13, 4706, 5399, 278, 2793, 310, 278, 14355, 304, 11539, 565, 372, 338, 263, 2702, 1737, 21942, 2202, 1134, 29889, 2648, 2322, 338, 14974, 5228, 29889, 13, 4706, 512, 1206, 278, 1737, 29877, 3126, 437, 451, 367, 278, 2183, 16303, 1134, 769, 385, 13, 13, 4706, 584, 3207, 848, 29901, 4390, 8600, 13, 4706, 584, 3207, 16303, 1542, 29901, 1879, 7843, 1134, 313, 29875, 29889, 29872, 29889, 14974, 5228, 29892, 7407, 1231, 29897, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 363, 4682, 297, 848, 3366, 22100, 3108, 29901, 13, 9651, 565, 4682, 3366, 19156, 3108, 3366, 1853, 3108, 2804, 16303, 1542, 29901, 13, 18884, 12020, 5566, 29889, 797, 15728, 7999, 7843, 1542, 2451, 703, 1252, 6021, 1273, 29879, 29908, 1273, 16303, 1542, 29897, 13, 13, 1678, 822, 3588, 1762, 7999, 29877, 3126, 29898, 1311, 29892, 12205, 1125, 13, 4706, 4390, 3591, 353, 12205, 29889, 517, 29918, 3126, 580, 13, 4706, 716, 8148, 353, 4390, 29889, 18132, 29898, 3126, 3591, 29897, 13, 4706, 716, 8148, 3366, 29883, 2288, 3108, 353, 426, 13, 9651, 376, 11330, 1115, 426, 13, 18884, 376, 978, 1115, 376, 595, 29901, 468, 29883, 29901, 1753, 29901, 29883, 2288, 16664, 29879, 29908, 1273, 313, 19903, 29928, 29918, 11341, 29903, 29889, 29925, 1660, 29965, 3970, 29918, 29924, 1001, 23972, 1955, 3366, 2344, 16862, 6506, 703, 29901, 613, 376, 1057, 5783, 13, 9651, 2981, 13, 9651, 376, 1853, 1115, 376, 978, 29908, 13, 4706, 500, 13, 4706, 736, 716, 8148, 13, 13, 1678, 822, 2436, 2283, 29898, 1311, 29892, 4138, 2605, 29892, 10422, 29892, 848, 1125, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 12083, 2605, 1125, 13, 9651, 2897, 29889, 29885, 12535, 12935, 29898, 12083, 2605, 29897, 13, 13, 4706, 934, 4219, 353, 4138, 2605, 718, 11860, 29879, 29995, 29879, 29908, 1273, 313, 359, 29889, 19570, 29892, 10422, 29897, 13, 13, 4706, 411, 1722, 29898, 1445, 4219, 29892, 525, 29893, 29974, 1495, 408, 714, 1445, 29901, 13, 9651, 4390, 29889, 15070, 29898, 1272, 29892, 714, 1445, 29892, 2656, 29918, 8149, 29922, 5574, 29897, 13, 13, 4706, 736, 934, 4219, 13, 13, 1678, 822, 1653, 2283, 29898, 1311, 29892, 4138, 2605, 29892, 10422, 1125, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 12083, 2605, 1125, 13, 9651, 2897, 29889, 29885, 12535, 12935, 29898, 12083, 2605, 29897, 13, 4706, 411, 1722, 29898, 12083, 2605, 718, 2897, 29889, 19570, 718, 10422, 29892, 525, 29893, 29974, 1495, 408, 714, 1445, 29901, 13, 9651, 714, 1445, 29889, 5358, 580, 13, 13, 1678, 822, 5217, 2283, 29898, 1311, 29892, 4138, 2605, 29892, 10422, 1125, 13, 4706, 28468, 29889, 20958, 2141, 3888, 703, 2772, 1026, 292, 24080, 1273, 29879, 29908, 1273, 2897, 29889, 2084, 29889, 7122, 29898, 12083, 2605, 29892, 10422, 876, 13, 4706, 565, 2897, 29889, 2084, 29889, 9933, 29898, 12083, 2605, 718, 2897, 29889, 19570, 718, 10422, 1125, 13, 9651, 2897, 29889, 5992, 29898, 12083, 2605, 718, 2897, 29889, 19570, 718, 10422, 29897, 13, 4706, 28468, 29889, 20958, 2141, 3888, 703, 1576, 24080, 1273, 29879, 471, 11132, 29908, 1273, 2897, 29889, 2084, 29889, 7122, 29898, 12083, 2605, 29892, 10422, 876, 13, 13, 1678, 822, 5217, 12924, 29898, 1311, 29892, 2224, 1125, 13, 4706, 28468, 29889, 20958, 2141, 3888, 703, 2772, 1026, 292, 383, 5607, 8032, 1273, 29879, 29908, 1273, 2224, 29897, 13, 4706, 565, 2897, 29889, 2084, 29889, 9933, 29898, 2084, 1125, 13, 9651, 528, 4422, 29889, 1758, 8336, 29898, 2084, 29897, 13, 4706, 28468, 29889, 20958, 2141, 3888, 703, 1576, 383, 5607, 8032, 1273, 29879, 471, 11132, 29908, 1273, 2224, 29897, 13, 13, 1678, 732, 29881, 3820, 29918, 20404, 13, 1678, 822, 27122, 6466, 2283, 29898, 1311, 29892, 4138, 2605, 29892, 14319, 29918, 9507, 29892, 934, 2084, 1125, 13, 4706, 14319, 29888, 353, 14319, 1445, 29889, 26264, 2283, 29898, 12083, 2605, 718, 2897, 29889, 19570, 718, 14319, 29918, 9507, 29892, 376, 29874, 613, 14319, 1445, 29889, 29999, 5690, 29918, 2287, 10536, 3040, 29928, 29892, 2758, 26264, 29953, 29946, 29922, 5574, 29897, 13, 4706, 14319, 29888, 29889, 3539, 29898, 1445, 2084, 29892, 2897, 29889, 2084, 29889, 6500, 3871, 29898, 1445, 2084, 876, 13, 13, 1678, 732, 29881, 3820, 29918, 20404, 13, 1678, 822, 4327, 7999, 29877, 3126, 797, 17271, 29898, 1311, 29892, 1737, 29877, 3126, 1125, 13, 4706, 565, 376, 22100, 29908, 297, 1737, 29877, 3126, 29901, 13, 9651, 4489, 353, 4390, 29918, 8945, 675, 29898, 24756, 3126, 3366, 22100, 20068, 13, 9651, 4341, 353, 12655, 29889, 294, 2378, 4197, 4914, 29889, 6506, 703, 11330, 19602, 20569, 363, 1897, 297, 4489, 29889, 13099, 29889, 5975, 2314, 13, 9651, 4489, 29889, 13099, 353, 4341, 13, 9651, 736, 4489, 13, 13, 4706, 736, 6213, 13, 13, 1678, 822, 2436, 797, 29907, 7597, 29898, 1311, 29892, 4138, 2605, 29892, 10422, 29892, 995, 1293, 1125, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 12083, 2605, 1125, 13, 9651, 2897, 29889, 29885, 12535, 12935, 29898, 12083, 2605, 29897, 13, 13, 4706, 934, 353, 4138, 2605, 718, 2897, 29889, 19570, 718, 10422, 13, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 275, 1445, 29898, 1445, 1125, 13, 9651, 1746, 1293, 353, 5159, 13, 13, 9651, 8393, 353, 679, 8614, 11857, 29898, 2042, 543, 1299, 29911, 3960, 29933, 2692, 2890, 29918, 1529, 18009, 4214, 1159, 13, 13, 9651, 363, 5352, 29918, 1989, 297, 8393, 29901, 13, 18884, 5352, 29918, 23579, 4430, 353, 8393, 29961, 12715, 29918, 1989, 1822, 5451, 28165, 1159, 13, 18884, 1820, 353, 5352, 29918, 23579, 4430, 29961, 29900, 29962, 13, 18884, 995, 353, 5352, 29918, 23579, 4430, 29961, 29896, 29962, 13, 18884, 1746, 1293, 29889, 4397, 29898, 1767, 29897, 13, 13, 9651, 411, 1722, 29898, 1445, 29892, 525, 29893, 742, 25899, 2433, 1495, 408, 1962, 2283, 29901, 13, 18884, 9227, 353, 11799, 29889, 13236, 29898, 4905, 2283, 29892, 28552, 2433, 29936, 1495, 13, 18884, 9227, 29889, 13236, 340, 29898, 2671, 1293, 29897, 13, 18884, 9227, 29889, 13236, 340, 29898, 1767, 1293, 29897, 13, 4706, 1683, 29901, 13, 9651, 411, 1722, 29898, 1445, 29892, 525, 29874, 742, 25899, 2433, 1495, 408, 1962, 2283, 29901, 13, 18884, 9227, 353, 11799, 29889, 13236, 29898, 4905, 2283, 29892, 28552, 2433, 29936, 1495, 13, 18884, 9227, 29889, 13236, 340, 29898, 1767, 1293, 29897, 13, 13, 13, 1753, 8943, 29918, 9057, 29918, 2158, 29898, 7645, 29892, 10191, 29918, 5085, 1125, 13, 1678, 9995, 17440, 278, 2643, 373, 380, 449, 470, 380, 20405, 8679, 373, 9750, 359, 537, 13, 1678, 9995, 13, 1678, 396, 22615, 29901, 2216, 773, 278, 17927, 6890, 29901, 817, 304, 13, 1678, 396, 5110, 304, 671, 17927, 2253, 29889, 13, 1678, 396, 565, 451, 1583, 29889, 369, 15828, 29901, 13, 1678, 396, 268, 736, 13, 1678, 396, 565, 1583, 29889, 369, 15828, 529, 29871, 29945, 29900, 29901, 13, 1678, 396, 268, 9227, 353, 10876, 29889, 303, 20405, 29889, 3539, 13, 1678, 396, 1683, 29901, 13, 1678, 396, 268, 9227, 353, 10876, 29889, 25393, 29889, 3539, 13, 1678, 10191, 353, 10191, 1273, 10191, 29918, 5085, 13, 1678, 1583, 353, 376, 2177, 6553, 29898, 29876, 29918, 9057, 29879, 16328, 29879, 5513, 1273, 679, 8614, 11857, 29898, 2042, 543, 16320, 1964, 1307, 5265, 29999, 8098, 1159, 3366, 9057, 29879, 3108, 13, 1678, 396, 9227, 877, 29961, 29995, 29879, 5387, 1273, 29879, 29905, 29876, 29915, 1273, 313, 1311, 29892, 10191, 876, 13, 1678, 28468, 29889, 20958, 2141, 3888, 877, 29961, 29995, 29879, 5387, 1273, 29879, 29915, 1273, 313, 1311, 29892, 10191, 876, 13, 13, 13, 1990, 28468, 29901, 13, 1678, 4770, 8758, 353, 6213, 13, 1678, 4770, 13789, 353, 6213, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 12020, 8960, 703, 3379, 2925, 1818, 367, 13319, 411, 28468, 29889, 20958, 580, 1159, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 10822, 16363, 29898, 4905, 12924, 29892, 10944, 1125, 13, 4706, 396, 28468, 17255, 8758, 353, 6213, 13, 13, 4706, 1480, 29918, 9507, 353, 10944, 718, 11119, 1188, 448, 1273, 29879, 29889, 1188, 29908, 1273, 679, 2500, 19667, 16390, 5410, 29898, 9346, 331, 23285, 29922, 2230, 29889, 2230, 3285, 13, 462, 462, 462, 462, 539, 3402, 2433, 29995, 29979, 19222, 29885, 19222, 29881, 1273, 29950, 29918, 29995, 29924, 29918, 29995, 29903, 1495, 13, 4706, 10748, 29918, 12083, 353, 1962, 12924, 718, 2897, 29889, 19570, 718, 376, 20756, 29908, 13, 13, 4706, 3497, 26525, 2141, 3258, 2283, 29898, 20756, 29918, 12083, 29892, 1480, 29918, 9507, 29897, 13, 13, 4706, 565, 28468, 17255, 13789, 338, 451, 6213, 29901, 13, 9651, 28468, 29889, 20958, 2141, 5992, 4598, 29898, 16363, 17255, 13789, 29897, 13, 13, 4706, 934, 4598, 353, 12183, 29889, 2283, 4598, 29898, 20756, 29918, 12083, 718, 2897, 29889, 19570, 718, 1480, 29918, 9507, 29892, 525, 29893, 1495, 13, 4706, 883, 2620, 353, 12183, 29889, 18522, 877, 29995, 29898, 294, 312, 603, 29897, 29879, 448, 1273, 29898, 5563, 978, 29897, 29879, 448, 1273, 29898, 4906, 29897, 29879, 1495, 13, 4706, 934, 4598, 29889, 842, 18522, 29898, 689, 2620, 29897, 13, 13, 4706, 28468, 17255, 13789, 353, 934, 4598, 13, 13, 4706, 28468, 29889, 20958, 2141, 1202, 4598, 29898, 1445, 4598, 29897, 13, 13, 1678, 732, 7959, 5696, 13, 1678, 822, 679, 4998, 7295, 13, 4706, 565, 451, 28468, 17255, 8758, 29901, 13, 9651, 396, 5285, 2605, 353, 2897, 29889, 657, 29883, 9970, 580, 718, 11860, 13237, 29995, 21027, 29889, 11330, 1642, 6506, 11702, 613, 2897, 29889, 19570, 29897, 13, 13, 9651, 396, 12183, 29889, 2917, 29889, 1445, 3991, 29898, 13305, 2605, 29897, 13, 13, 9651, 396, 1653, 17927, 13, 9651, 28468, 17255, 8758, 353, 12183, 29889, 657, 16363, 703, 29907, 17011, 1299, 1159, 13, 4706, 396, 376, 6214, 29908, 775, 13, 4706, 396, 28468, 29889, 8758, 29889, 8382, 703, 8382, 2643, 1159, 13, 4706, 396, 28468, 29889, 8758, 29889, 3888, 703, 3888, 2643, 1159, 13, 4706, 396, 28468, 29889, 8758, 29889, 25442, 703, 25442, 2643, 1159, 13, 4706, 396, 28468, 29889, 8758, 29889, 2704, 703, 2704, 2643, 1159, 13, 4706, 396, 28468, 29889, 8758, 29889, 9695, 936, 703, 9695, 936, 2643, 1159, 13, 4706, 736, 28468, 17255, 8758, 13, 13, 13, 1990, 4593, 16363, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 17927, 1170, 29892, 1962, 12924, 29892, 10944, 13776, 1125, 13, 4706, 1583, 29889, 21707, 353, 1583, 3032, 3258, 16363, 29898, 21707, 1170, 29922, 21707, 1170, 29897, 13, 4706, 1583, 29889, 13789, 353, 1583, 3032, 3258, 3403, 2283, 4598, 29898, 4905, 12924, 29922, 4905, 12924, 29892, 10944, 29922, 13506, 29897, 13, 13, 4706, 1583, 29889, 21707, 29889, 1202, 4598, 29898, 1311, 29889, 13789, 29897, 13, 13, 1678, 822, 903, 3258, 16363, 29898, 1311, 29892, 17927, 1170, 1125, 13, 4706, 5285, 2605, 353, 2897, 29889, 657, 29883, 9970, 580, 718, 11860, 13237, 29995, 21027, 29889, 11330, 1642, 6506, 11702, 613, 2897, 29889, 19570, 29897, 13, 4706, 12183, 29889, 2917, 29889, 1445, 3991, 29898, 13305, 2605, 29897, 13, 4706, 396, 1653, 17927, 13, 4706, 17927, 353, 12183, 29889, 657, 16363, 29898, 21707, 1170, 29897, 13, 4706, 736, 17927, 13, 13, 1678, 822, 903, 3258, 3403, 2283, 4598, 29898, 1311, 29892, 1962, 12924, 29892, 10944, 1125, 13, 4706, 1480, 29918, 9507, 353, 10944, 718, 11119, 1188, 448, 1273, 29879, 29889, 1188, 29908, 1273, 679, 2500, 19667, 16390, 5410, 29898, 13, 9651, 5335, 331, 23285, 29922, 2230, 29889, 2230, 3285, 13, 9651, 3402, 2433, 29995, 29979, 19222, 29885, 19222, 29881, 1273, 29950, 29918, 29995, 29924, 29918, 29995, 29903, 29915, 13, 4706, 1723, 13, 4706, 10748, 29918, 12083, 353, 1962, 12924, 718, 2897, 29889, 19570, 718, 376, 20756, 29908, 13, 4706, 3497, 26525, 2141, 3258, 2283, 29898, 20756, 29918, 12083, 29892, 1480, 29918, 9507, 29897, 13, 13, 4706, 934, 4598, 353, 12183, 29889, 2283, 4598, 29898, 20756, 29918, 12083, 718, 2897, 29889, 19570, 718, 1480, 29918, 9507, 29892, 525, 29893, 1495, 13, 4706, 883, 2620, 353, 12183, 29889, 18522, 877, 29995, 29898, 294, 312, 603, 29897, 29879, 448, 1273, 29898, 5563, 978, 29897, 29879, 448, 1273, 29898, 4906, 29897, 29879, 1495, 13, 4706, 934, 4598, 29889, 842, 18522, 29898, 689, 2620, 29897, 13, 4706, 736, 934, 4598, 13, 13, 1678, 822, 679, 16363, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 21707, 13, 2 ]
diana/toolbox/parse_mesh.py
quimaguirre/diana
3
70315
import networkx def main(): base_dir = "/home/emre/data/ontology/mesh/" rel_file = base_dir + "mtrees2013.bin" m = MESH(rel_file) g = m.get_ontology() #print len(g.nodes()), len(g.edges()) #concept = "Mycoses" concept = "Diabetes Mellitus, Type 2" concept_ids = m.get_concept_ids(concept) for concept_id in concept_ids: print concept_id, g.edges([concept_id]) for u, v in g.edges([concept_id]): print v, m.get_concept(v) return def get_mesh_term_to_tree_ids(rel_file): m = MESH(rel_file) g = m.get_ontology() return m.concept_to_concept_ids class MESH(object): def __init__(self, file_name): self.file_name = file_name self.delim = ";" self.ontology = None self.concept_to_concept_ids = None self.concept_id_to_concept = None self.root_concept_ids = None return def get_concept_ids(self, concept): return self.concept_to_concept_ids[concept] def get_concept(self, concept_id): return self.concept_id_to_concept[concept_id] def get_ontology(self): if self.ontology is not None: return self.ontology self.ontology = networkx.DiGraph() self.concept_to_concept_ids = {} self.concept_id_to_concept = {} self.root_concept_ids = [] f = open(self.file_name) for line in f: words = line.strip("\n").split(self.delim) concept = words[0] concept_id = words[1] self.concept_id_to_concept[concept_id] = concept self.concept_to_concept_ids.setdefault(concept, []).append(concept_id) inner_words = concept_id.split(".") if len(inner_words) == 1: self.root_concept_ids.append(inner_words[0]) else: parent_id = ".".join(inner_words[:-1]) self.ontology.add_edge(parent_id, concept_id) return self.ontology if __name__ == "__main__": main()
[ 1, 1053, 3564, 29916, 13, 13, 1753, 1667, 7295, 13, 1678, 2967, 29918, 3972, 353, 5591, 5184, 29914, 331, 276, 29914, 1272, 29914, 609, 3002, 29914, 4467, 29882, 12975, 13, 1678, 1104, 29918, 1445, 353, 2967, 29918, 3972, 718, 376, 29885, 28737, 29906, 29900, 29896, 29941, 29889, 2109, 29908, 13, 1678, 286, 353, 341, 2890, 29950, 29898, 2674, 29918, 1445, 29897, 13, 1678, 330, 353, 286, 29889, 657, 29918, 609, 3002, 580, 13, 1678, 396, 2158, 7431, 29898, 29887, 29889, 18010, 25739, 7431, 29898, 29887, 29889, 287, 2710, 3101, 13, 1678, 396, 535, 1547, 353, 376, 3421, 3944, 267, 29908, 13, 1678, 6964, 353, 376, 12130, 370, 10778, 341, 514, 277, 375, 29892, 5167, 29871, 29906, 29908, 13, 1678, 6964, 29918, 4841, 353, 286, 29889, 657, 29918, 535, 1547, 29918, 4841, 29898, 535, 1547, 29897, 13, 1678, 363, 6964, 29918, 333, 297, 6964, 29918, 4841, 29901, 13, 12, 2158, 6964, 29918, 333, 29892, 330, 29889, 287, 2710, 4197, 535, 1547, 29918, 333, 2314, 13, 12, 1454, 318, 29892, 325, 297, 330, 29889, 287, 2710, 4197, 535, 1547, 29918, 333, 29962, 1125, 13, 12, 1678, 1596, 325, 29892, 286, 29889, 657, 29918, 535, 1547, 29898, 29894, 29897, 13, 1678, 736, 13, 13, 1753, 679, 29918, 4467, 29882, 29918, 8489, 29918, 517, 29918, 8336, 29918, 4841, 29898, 2674, 29918, 1445, 1125, 13, 1678, 286, 353, 341, 2890, 29950, 29898, 2674, 29918, 1445, 29897, 13, 1678, 330, 353, 286, 29889, 657, 29918, 609, 3002, 580, 13, 1678, 736, 286, 29889, 535, 1547, 29918, 517, 29918, 535, 1547, 29918, 4841, 13, 13, 1990, 341, 2890, 29950, 29898, 3318, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 934, 29918, 978, 1125, 13, 12, 1311, 29889, 1445, 29918, 978, 353, 934, 29918, 978, 13, 12, 1311, 29889, 6144, 326, 353, 12159, 29908, 13, 12, 1311, 29889, 609, 3002, 353, 6213, 29871, 13, 12, 1311, 29889, 535, 1547, 29918, 517, 29918, 535, 1547, 29918, 4841, 353, 6213, 13, 12, 1311, 29889, 535, 1547, 29918, 333, 29918, 517, 29918, 535, 1547, 353, 6213, 13, 12, 1311, 29889, 4632, 29918, 535, 1547, 29918, 4841, 353, 6213, 13, 12, 2457, 13, 13, 1678, 822, 679, 29918, 535, 1547, 29918, 4841, 29898, 1311, 29892, 6964, 1125, 13, 12, 2457, 1583, 29889, 535, 1547, 29918, 517, 29918, 535, 1547, 29918, 4841, 29961, 535, 1547, 29962, 13, 13, 1678, 822, 679, 29918, 535, 1547, 29898, 1311, 29892, 6964, 29918, 333, 1125, 13, 12, 2457, 1583, 29889, 535, 1547, 29918, 333, 29918, 517, 29918, 535, 1547, 29961, 535, 1547, 29918, 333, 29962, 13, 13, 1678, 822, 679, 29918, 609, 3002, 29898, 1311, 1125, 13, 12, 361, 1583, 29889, 609, 3002, 338, 451, 6213, 29901, 13, 12, 1678, 736, 1583, 29889, 609, 3002, 13, 12, 1311, 29889, 609, 3002, 353, 3564, 29916, 29889, 12130, 9527, 580, 13, 12, 1311, 29889, 535, 1547, 29918, 517, 29918, 535, 1547, 29918, 4841, 353, 6571, 13, 12, 1311, 29889, 535, 1547, 29918, 333, 29918, 517, 29918, 535, 1547, 353, 6571, 13, 12, 1311, 29889, 4632, 29918, 535, 1547, 29918, 4841, 353, 5159, 13, 12, 29888, 353, 1722, 29898, 1311, 29889, 1445, 29918, 978, 29897, 13, 12, 1454, 1196, 297, 285, 29901, 13, 12, 1678, 3838, 353, 1196, 29889, 17010, 14182, 29876, 2564, 5451, 29898, 1311, 29889, 6144, 326, 29897, 13, 12, 1678, 6964, 353, 3838, 29961, 29900, 29962, 13, 12, 1678, 6964, 29918, 333, 353, 3838, 29961, 29896, 29962, 13, 12, 1678, 1583, 29889, 535, 1547, 29918, 333, 29918, 517, 29918, 535, 1547, 29961, 535, 1547, 29918, 333, 29962, 353, 6964, 13, 12, 1678, 1583, 29889, 535, 1547, 29918, 517, 29918, 535, 1547, 29918, 4841, 29889, 842, 4381, 29898, 535, 1547, 29892, 5159, 467, 4397, 29898, 535, 1547, 29918, 333, 29897, 13, 12, 1678, 6426, 29918, 9303, 353, 6964, 29918, 333, 29889, 5451, 17350, 1159, 13, 12, 1678, 565, 7431, 29898, 3993, 29918, 9303, 29897, 1275, 29871, 29896, 29901, 13, 12, 12, 1311, 29889, 4632, 29918, 535, 1547, 29918, 4841, 29889, 4397, 29898, 3993, 29918, 9303, 29961, 29900, 2314, 13, 12, 1678, 1683, 29901, 13, 12, 12, 3560, 29918, 333, 353, 376, 1213, 29889, 7122, 29898, 3993, 29918, 9303, 7503, 29899, 29896, 2314, 13, 12, 12, 1311, 29889, 609, 3002, 29889, 1202, 29918, 12864, 29898, 3560, 29918, 333, 29892, 6964, 29918, 333, 29897, 13, 12, 2457, 1583, 29889, 609, 3002, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1667, 580, 13, 13, 2 ]
day_24/day_24.py
GuillaumeGandon/advent-of-code-2015
0
136872
from math import prod from itertools import combinations weights = tuple(map(int, open('input').read().splitlines())) def solve(nb_group): targeted_weight = sum(weights) // nb_group i = 0 valid_combinations = None while not valid_combinations: i += 1 valid_combinations = tuple( comb for comb in combinations(weights, i) if sum(comb) == targeted_weight ) return min(map(prod, valid_combinations)) print(f"Answer part one: {solve(nb_group=3)}") print(f"Answer part two: {solve(nb_group=4)}")
[ 1, 515, 5844, 1053, 11859, 13, 3166, 4256, 8504, 1053, 18240, 13, 13, 705, 5861, 353, 18761, 29898, 1958, 29898, 524, 29892, 1722, 877, 2080, 2824, 949, 2141, 5451, 9012, 22130, 13, 13, 13, 1753, 4505, 29898, 9877, 29918, 2972, 1125, 13, 1678, 3646, 287, 29918, 7915, 353, 2533, 29898, 705, 5861, 29897, 849, 302, 29890, 29918, 2972, 13, 1678, 474, 353, 29871, 29900, 13, 1678, 2854, 29918, 510, 2109, 800, 353, 6213, 13, 1678, 1550, 451, 2854, 29918, 510, 2109, 800, 29901, 13, 4706, 474, 4619, 29871, 29896, 13, 4706, 2854, 29918, 510, 2109, 800, 353, 18761, 29898, 13, 9651, 4145, 13, 9651, 363, 4145, 297, 18240, 29898, 705, 5861, 29892, 474, 29897, 13, 9651, 565, 2533, 29898, 17743, 29897, 1275, 3646, 287, 29918, 7915, 13, 4706, 1723, 13, 13, 1678, 736, 1375, 29898, 1958, 29898, 10633, 29892, 2854, 29918, 510, 2109, 800, 876, 13, 13, 13, 2158, 29898, 29888, 29908, 22550, 760, 697, 29901, 426, 2929, 345, 29898, 9877, 29918, 2972, 29922, 29941, 2915, 1159, 13, 2158, 29898, 29888, 29908, 22550, 760, 1023, 29901, 426, 2929, 345, 29898, 9877, 29918, 2972, 29922, 29946, 2915, 1159, 13, 2 ]
tests/test_overlap.py
opendatacube/odc-geo
5
127666
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2020 ODC Contributors # SPDX-License-Identifier: Apache-2.0 import math from random import uniform import numpy as np import pytest from affine import Affine from odc.geo import CRS, geom, resyx_, wh_, xy_ from odc.geo.geobox import GeoBox, scaled_down_geobox from odc.geo.gridspec import GridSpec from odc.geo.math import affine_from_pts, decompose_rws, is_affine_st, stack_xy from odc.geo.overlap import ( LinearPointTransform, ReprojectInfo, _can_paste, compute_axis_overlap, compute_output_geobox, compute_reproject_roi, get_scale_at_point, native_pix_transform, ) from odc.geo.roi import ( roi_is_empty, roi_normalise, roi_shape, scaled_down_roi, scaled_up_roi, ) from odc.geo.testutils import AlbersGS, epsg3577, epsg3857, epsg4326, mkA def diff_affine(A: Affine, B: Affine) -> float: return math.sqrt(sum((a - b) ** 2 for a, b in zip(A, B))) def test_affine_checks(): assert is_affine_st(mkA(scale=(1, 2), translation=(3, -10))) is True assert is_affine_st(mkA(scale=(1, -2), translation=(-3, -10))) is True assert is_affine_st(mkA(rot=0.1)) is False assert is_affine_st(mkA(shear=0.4)) is False def test_affine_rsw(): def run_test(a, scale, shear=0, translation=(0, 0), tol=1e-8): A = mkA(a, scale=scale, shear=shear, translation=translation) R, W, S = decompose_rws(A) assert diff_affine(A, R * W * S) < tol assert diff_affine(S, mkA(0, scale)) < tol assert diff_affine(R, mkA(a, translation=translation)) < tol for a in (0, 12, 45, 33, 67, 89, 90, 120, 170): run_test(a, (1, 1)) run_test(a, (0.5, 2)) run_test(-a, (0.5, 2)) run_test(a, (1, 2)) run_test(-a, (1, 2)) run_test(a, (2, -1)) run_test(-a, (2, -1)) run_test(0, (3, 4), 10) run_test(-33, (3, -1), 10, translation=(100, -333)) def test_fit(): def run_test(A, n, tol=1e-5): X = [xy_(uniform(0, 1), uniform(0, 1)) for _ in range(n)] Y = [xy_(A * pt.xy) for pt in X] A_ = affine_from_pts(X, Y) assert diff_affine(A, A_) < tol A = mkA(13, scale=(3, 4), shear=3, translation=(100, -3000)) run_test(A, 3) run_test(A, 10) run_test(mkA(), 3) run_test(mkA(), 10) def test_scale_at_point(): def mk_transform(sx, sy): A = mkA(37, scale=(sx, sy), translation=(2127, 93891)) return LinearPointTransform(A) tol = 1e-4 pt = xy_(0, 0) for sx, sy in [(3, 4), (0.4, 0.333)]: tr = mk_transform(sx, sy) sx_, sy_ = get_scale_at_point(pt, tr).xy assert abs(sx - sx_) < tol assert abs(sy - sy_) < tol sx_, sy_ = get_scale_at_point(pt, tr, 0.1).xy assert abs(sx - sx_) < tol assert abs(sy - sy_) < tol def test_pix_transform(): pt = tuple( int(x / 10) * 10 for x in geom.point(145, -35, epsg4326).to_crs(epsg3577).coords[0] ) A = mkA(scale=(20, -20), translation=pt) src = GeoBox((512, 1024), A, epsg3577) dst = GeoBox.from_geopolygon(src.geographic_extent, resyx_(0.0001, -0.0001)) tr = native_pix_transform(src, dst) pts_src = [xy_(0, 0), xy_(10, 20), xy_(300, 200)] pts_dst = tr(pts_src) pts_src_ = tr.back(pts_dst) np.testing.assert_almost_equal(stack_xy(pts_src), stack_xy(pts_src_)) assert tr.linear is None assert repr(tr).startswith("GbxPointTransform(") # check identity transform tr = native_pix_transform(src, src) pts_src = [xy_(0, 0), xy_(10, 20), xy_(300, 200)] pts_dst = tr(pts_src) pts_src_ = tr.back(pts_dst) np.testing.assert_almost_equal(stack_xy(pts_src), stack_xy(pts_src_)) np.testing.assert_almost_equal(stack_xy(pts_src), stack_xy(pts_dst)) assert tr.linear is not None assert tr.back.linear is not None assert tr.back.back is tr assert repr(tr).startswith("LinearPointTransform(") # check scale only change tr = native_pix_transform(src, scaled_down_geobox(src, 2)) pts_dst = tr(pts_src) pts_src_ = tr.back(pts_dst) assert tr.linear is not None assert tr.back.linear is not None assert tr.back.back is tr np.testing.assert_almost_equal( stack_xy(pts_dst), [(pt.x / 2, pt.y / 2) for pt in pts_src] ) np.testing.assert_almost_equal(stack_xy(pts_src), stack_xy(pts_src_)) def test_compute_reproject_roi(): src = AlbersGS.tile_geobox((15, -40)) dst = GeoBox.from_geopolygon( src.extent.to_crs(epsg3857).buffer(10), resolution=src.resolution ) rr = compute_reproject_roi(src, dst) assert rr.roi_src == np.s_[0 : src.height, 0 : src.width] assert 0 < rr.scale < 1 assert rr.transform.linear is None assert rr.transform.back is not None assert rr.transform.back.linear is None # check pure translation case roi_ = np.s_[113:-100, 33:-10] rr = compute_reproject_roi(src, src[roi_]) assert rr.roi_src == roi_normalise(roi_, src.shape) assert rr.scale == 1 rr = compute_reproject_roi(src, src[roi_], padding=0, align=0) assert rr.roi_src == roi_normalise(roi_, src.shape) assert rr.scale == 1 # check pure translation case roi_ = np.s_[113:-100, 33:-10] rr = compute_reproject_roi(src, src[roi_], align=256) assert rr.roi_src == np.s_[0 : src.height, 0 : src.width] assert rr.scale == 1 roi_ = np.s_[113:-100, 33:-10] rr = compute_reproject_roi(src, src[roi_]) assert rr.scale == 1 assert roi_shape(rr.roi_src) == roi_shape(rr.roi_dst) assert roi_shape(rr.roi_dst) == src[roi_].shape # check pasteable zoom_out dst = src.zoom_out(2) rr = compute_reproject_roi(src, dst) assert rr.paste_ok is True assert rr.read_shrink == 2 assert roi_shape(rr.roi_src) == src.shape assert roi_shape(rr.roi_dst) == dst.shape # check non-pasteable zoom_out dst = src[1:, :].zoom_out(2) rr = compute_reproject_roi(src, dst) assert rr.paste_ok is False assert rr.read_shrink == 2 def test_compute_reproject_roi_paste(): src = GeoBox( wh_(1000, 2000), mkA(scale=(10, -10), translation=(10 * 123, -10 * 230)), epsg3857, ) def _check(src: GeoBox, dst: GeoBox, rr: ReprojectInfo): assert rr.read_shrink >= 1 if roi_is_empty(rr.roi_src): assert roi_is_empty(rr.roi_dst) return if rr.paste_ok: if rr.read_shrink == 1: assert roi_shape(rr.roi_src) == roi_shape(rr.roi_dst) assert src[rr.roi_src].shape == dst[rr.roi_dst].shape else: # roi source must align to read scale # => round-triping roi to overview and back should not change roi assert ( scaled_up_roi( scaled_down_roi(rr.roi_src, rr.read_shrink), rr.read_shrink ) == rr.roi_src ) src_ = src[rr.roi_src].zoom_out(rr.read_shrink) assert src_.shape == dst[rr.roi_dst].shape if rr.read_shrink == 1: assert rr.scale <= 1.1 else: assert rr.scale >= rr.read_shrink if src.crs == dst.crs: _src = src[rr.roi_src].extent _dst = dst[rr.roi_dst].extent else: _src = src[rr.roi_src].geographic_extent _dst = dst[rr.roi_dst].geographic_extent assert _src.intersection(_dst).area > 0 def _yes(src: GeoBox, dst: GeoBox, **kw): rr = compute_reproject_roi(src, dst, **kw) assert rr.paste_ok is True _check(src, dst, rr) def _no_(src: GeoBox, dst: GeoBox, **kw): rr = compute_reproject_roi(src, dst, **kw) assert rr.paste_ok is False _check(src, dst, rr) t_ = Affine.translation s_ = Affine.scale # plain pixel aligned translation _yes(src, src) _yes(src, src[10:, 29:]) _yes(src[10:, 29:], src) # subpixel translation below threshhold _no_(src, src * t_(0.3, 0.3)) _yes(src, src * t_(0.3, 0.3), ttol=0.5) _no_(src, src * t_(0.0, 0.1)) _yes(src, src * t_(0.0, 0.1), ttol=0.15) _no_(src, src * t_(-0.1, 0.0)) _yes(src, src * t_(-0.1, 0.0), ttol=0.15) # tiny scale deviations _no_(src, src[20:, :30] * s_(1.003, 1.003)) _yes(src, src[20:, :30] * s_(1.003, 1.003), stol=0.01) # integer shrink _no_(src, src.zoom_out(2.3)) _yes(src, src.zoom_out(2)) _yes(src, src.zoom_out(3)) _yes(src, src.zoom_out(2 + 1e-5)) # rounding issues should not matter _no_(src.zoom_out(3), src) _no_(src.zoom_out(2), src) # integer shrink but with sub-pixel translation after shrinking _yes(src, src[4:, 8:].zoom_out(4)) _no_(src, src[2:, 8:].zoom_out(4)) _no_(src, src[8:, 3:].zoom_out(4)) _yes(src, src[8:, 3:].zoom_out(4), ttol=0.5) def test_compute_reproject_roi_issue647(): """In some scenarios non-overlapping geoboxes will result in non-empty `roi_dst` even though `roi_src` is empty. Test this case separately. """ src = GeoBox( (10980, 10980), Affine(10, 0, 300000, 0, -10, 5900020), CRS("epsg:32756") ) dst = GeoBox((976, 976), Affine(10, 0, 1730240, 0, -10, -4170240), CRS("EPSG:3577")) assert src.extent.overlaps(dst.extent.to_crs(src.crs)) is False rr = compute_reproject_roi(src, dst) assert roi_is_empty(rr.roi_src) assert roi_is_empty(rr.roi_dst) def test_compute_reproject_roi_issue1047(): """`compute_reproject_roi(geobox, geobox[roi])` sometimes returns `src_roi != roi`, when `geobox` has (1) tiny pixels and (2) oddly sized `alignment`. Test this issue is resolved. """ geobox = GeoBox( (3000, 3000), Affine( 0.00027778, 0.0, 148.72673054908861, 0.0, -0.00027778, -34.98825802556622 ), "EPSG:4326", ) src_roi = np.s_[2800:2810, 10:30] rr = compute_reproject_roi(geobox, geobox[src_roi]) assert rr.paste_ok is True assert rr.roi_src == src_roi assert rr.roi_dst == np.s_[0:10, 0:20] def test_compute_reproject_roi_overhang(): """ Images with global coverage in epsg:4326 often have slightly wrong georegistration that causes image boundaries to reach outside of the [-180, -90, 180, 90] bounding box. Reproject roi introduces clipping to deal with that issue. """ tol = 1e-3 src_geobox = GeoBox.from_bbox( (-180 - tol, -90 - tol, 180 + tol, 90 + tol), epsg4326, shape=wh_(2000, 1000), tight=True, ) assert src_geobox.shape.wh == (2000, 1000) assert src_geobox.extent.boundingbox[0] < -180 assert src_geobox.extent.boundingbox[1] < -90 assert src_geobox.extent.boundingbox[2] > +180 assert src_geobox.extent.boundingbox[3] > +90 dst_geobox = GridSpec.web_tiles(0)[0, 0] rr = compute_reproject_roi(src_geobox, dst_geobox) assert rr.paste_ok is False assert dst_geobox[rr.roi_dst] == dst_geobox def test_axis_overlap(): s_ = np.s_ # Source overlaps destination fully # # S: |<--------------->| # D: |<----->| assert compute_axis_overlap(100, 20, 1, 10) == s_[10:30, 0:20] assert compute_axis_overlap(100, 20, 2, 10) == s_[10:50, 0:20] assert compute_axis_overlap(100, 20, 0.25, 10) == s_[10:15, 0:20] assert compute_axis_overlap(100, 20, -1, 80) == s_[60:80, 0:20] assert compute_axis_overlap(100, 20, -0.5, 50) == s_[40:50, 0:20] assert compute_axis_overlap(100, 20, -2, 90) == s_[50:90, 0:20] # Destination overlaps source fully # # S: |<-------->| # D: |<----------------->| assert compute_axis_overlap(10, 100, 1, -10) == s_[0:10, 10:20] assert compute_axis_overlap(10, 100, 2, -10) == s_[0:10, 5:10] assert compute_axis_overlap(10, 100, 0.5, -10) == s_[0:10, 20:40] assert compute_axis_overlap(10, 100, -1, 11) == s_[0:10, 1:11] # Partial overlaps # # S: |<----------->| # D: |<----------->| assert compute_axis_overlap(10, 10, 1, 3) == s_[3:10, 0:7] assert compute_axis_overlap(10, 15, 1, 3) == s_[3:10, 0:7] # S: |<----------->| # D: |<----------->| assert compute_axis_overlap(10, 10, 1, -5) == s_[0:5, 5:10] assert compute_axis_overlap(50, 10, 1, -5) == s_[0:5, 5:10] # No overlaps # S: |<--->| # D: |<--->| assert compute_axis_overlap(10, 10, 1, 11) == s_[10:10, 0:0] assert compute_axis_overlap(10, 40, 1, 11) == s_[10:10, 0:0] # S: |<--->| # D: |<--->| assert compute_axis_overlap(10, 10, 1, -11) == s_[0:0, 10:10] assert compute_axis_overlap(40, 10, 1, -11) == s_[0:0, 10:10] def test_can_paste(): assert _can_paste(mkA(translation=(10, -20))) == (True, None) assert _can_paste(mkA(scale=(10, 10))) == (True, None) assert _can_paste(mkA(scale=(-10, 10), translation=(0, -4 * 10))) == (True, None) assert _can_paste(mkA(shear=0.3)) == (False, "has rotation or shear") assert _can_paste(mkA(rot=30)) == (False, "has rotation or shear") assert _can_paste(mkA(scale=(-11.1, 11.1))) == (False, "non-integer scale") assert _can_paste(mkA(scale=(0.5, 0.5))) == (False, "non-integer scale") assert _can_paste(mkA(scale=(2, 3))) == (False, "sx!=sy, probably") assert _can_paste(mkA(scale=(-10, 10), translation=(0, -4))) == ( False, "sub-pixel translation", ) assert _can_paste(mkA(scale=(-10, 10), translation=(-4, 10))) == ( False, "sub-pixel translation", ) assert _can_paste(mkA(translation=(0, 0.4))) == (False, "sub-pixel translation") assert _can_paste(mkA(translation=(0.4, 0))) == (False, "sub-pixel translation") def test_compute_output_geobox(): # sentinel2 over Gibraltar strait src = GeoBox.from_bbox( [199980, 3890220, 309780, 4000020], "EPSG:32630", resolution=10 ) # just copy resolution since both in meters dst = compute_output_geobox(src, "epsg:6933") assert dst.crs.units == src.crs.units assert dst.crs == "epsg:6933" assert dst.resolution == src.resolution assert dst.geographic_extent.contains(src.geographic_extent) assert compute_output_geobox(src, "epsg:6933") == src.to_crs("epsg:6933") assert compute_output_geobox( src, "epsg:6933", resolution="auto" ) == compute_output_geobox(src, "epsg:6933", resolution="same") # force estimation of new resolution dst = compute_output_geobox(src, "epsg:6933", resolution="fit") assert dst.crs == "epsg:6933" assert dst.resolution != src.resolution assert dst.resolution.x == -dst.resolution.y assert dst.geographic_extent.contains(src.geographic_extent) # check conversion to lon/lat dst = compute_output_geobox(src, "epsg:4326") assert dst.crs == "epsg:4326" assert dst.resolution != src.resolution assert dst.resolution.x == -dst.resolution.y assert dst.geographic_extent.contains(src.geographic_extent) npix_change = (src.shape[0] * src.shape[1]) / (dst.shape[0] * dst.shape[1]) assert 0.8 < npix_change < 1.1 # go back from 4326 _src = dst dst = compute_output_geobox(_src, src.crs) npix_change = (_src.shape[0] * _src.shape[1]) / (dst.shape[0] * dst.shape[1]) assert 0.8 < npix_change < 1.1 assert dst.geographic_extent.contains(_src.geographic_extent) # test bad input with pytest.raises(ValueError): _ = compute_output_geobox(src, "epsg:6933", resolution="bad-one")
[ 1, 396, 910, 934, 338, 760, 310, 278, 4673, 3630, 315, 4003, 29892, 1074, 2045, 597, 459, 355, 532, 29883, 4003, 29889, 990, 363, 901, 2472, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29945, 29899, 29906, 29900, 29906, 29900, 438, 12696, 2866, 1091, 29560, 13, 29937, 10937, 29928, 29990, 29899, 29931, 293, 1947, 29899, 12889, 29901, 13380, 29899, 29906, 29889, 29900, 13, 5215, 5844, 13, 3166, 4036, 1053, 9090, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 11451, 1688, 13, 3166, 2756, 457, 1053, 13737, 457, 13, 13, 3166, 2413, 29883, 29889, 24756, 1053, 315, 12445, 29892, 23216, 29892, 620, 29891, 29916, 3383, 377, 3383, 921, 29891, 29918, 13, 3166, 2413, 29883, 29889, 24756, 29889, 479, 23518, 1053, 1879, 29877, 3313, 29892, 6287, 29881, 29918, 3204, 29918, 479, 23518, 13, 3166, 2413, 29883, 29889, 24756, 29889, 629, 4841, 3135, 1053, 11657, 10299, 13, 3166, 2413, 29883, 29889, 24756, 29889, 755, 1053, 2756, 457, 29918, 3166, 29918, 16485, 29892, 316, 19438, 29918, 29878, 5652, 29892, 338, 29918, 3470, 457, 29918, 303, 29892, 5096, 29918, 3594, 13, 3166, 2413, 29883, 29889, 24756, 29889, 957, 6984, 1053, 313, 13, 1678, 22985, 5228, 13372, 29892, 13, 1678, 830, 4836, 3401, 29892, 13, 1678, 903, 3068, 29918, 16179, 29892, 13, 1678, 10272, 29918, 8990, 29918, 957, 6984, 29892, 13, 1678, 10272, 29918, 4905, 29918, 479, 23518, 29892, 13, 1678, 10272, 29918, 276, 4836, 29918, 307, 29875, 29892, 13, 1678, 679, 29918, 7052, 29918, 271, 29918, 3149, 29892, 13, 1678, 7531, 29918, 29886, 861, 29918, 9067, 29892, 13, 29897, 13, 3166, 2413, 29883, 29889, 24756, 29889, 307, 29875, 1053, 313, 13, 1678, 14100, 29918, 275, 29918, 6310, 29892, 13, 1678, 14100, 29918, 8945, 895, 29892, 13, 1678, 14100, 29918, 12181, 29892, 13, 1678, 6287, 29881, 29918, 3204, 29918, 307, 29875, 29892, 13, 1678, 6287, 29881, 29918, 786, 29918, 307, 29875, 29892, 13, 29897, 13, 3166, 2413, 29883, 29889, 24756, 29889, 1688, 13239, 1053, 838, 2596, 10749, 29892, 321, 567, 29887, 29941, 29945, 29955, 29955, 29892, 321, 567, 29887, 29941, 29947, 29945, 29955, 29892, 321, 567, 29887, 29946, 29941, 29906, 29953, 29892, 14690, 29909, 13, 13, 13, 1753, 2923, 29918, 3470, 457, 29898, 29909, 29901, 13737, 457, 29892, 350, 29901, 13737, 457, 29897, 1599, 5785, 29901, 13, 1678, 736, 5844, 29889, 3676, 29898, 2083, 3552, 29874, 448, 289, 29897, 3579, 29871, 29906, 363, 263, 29892, 289, 297, 14319, 29898, 29909, 29892, 350, 4961, 13, 13, 13, 1753, 1243, 29918, 3470, 457, 29918, 3198, 29879, 7295, 13, 1678, 4974, 338, 29918, 3470, 457, 29918, 303, 29898, 11256, 29909, 29898, 7052, 7607, 29896, 29892, 29871, 29906, 511, 13962, 7607, 29941, 29892, 448, 29896, 29900, 4961, 338, 5852, 13, 1678, 4974, 338, 29918, 3470, 457, 29918, 303, 29898, 11256, 29909, 29898, 7052, 7607, 29896, 29892, 448, 29906, 511, 13962, 29922, 6278, 29941, 29892, 448, 29896, 29900, 4961, 338, 5852, 13, 1678, 4974, 338, 29918, 3470, 457, 29918, 303, 29898, 11256, 29909, 29898, 5450, 29922, 29900, 29889, 29896, 876, 338, 7700, 13, 1678, 4974, 338, 29918, 3470, 457, 29918, 303, 29898, 11256, 29909, 29898, 11360, 279, 29922, 29900, 29889, 29946, 876, 338, 7700, 13, 13, 13, 1753, 1243, 29918, 3470, 457, 29918, 2288, 29893, 7295, 13, 1678, 822, 1065, 29918, 1688, 29898, 29874, 29892, 6287, 29892, 1183, 279, 29922, 29900, 29892, 13962, 7607, 29900, 29892, 29871, 29900, 511, 304, 29880, 29922, 29896, 29872, 29899, 29947, 1125, 13, 4706, 319, 353, 14690, 29909, 29898, 29874, 29892, 6287, 29922, 7052, 29892, 1183, 279, 29922, 11360, 279, 29892, 13962, 29922, 3286, 18411, 29897, 13, 13, 4706, 390, 29892, 399, 29892, 317, 353, 316, 19438, 29918, 29878, 5652, 29898, 29909, 29897, 13, 13, 4706, 4974, 2923, 29918, 3470, 457, 29898, 29909, 29892, 390, 334, 399, 334, 317, 29897, 529, 304, 29880, 13, 4706, 4974, 2923, 29918, 3470, 457, 29898, 29903, 29892, 14690, 29909, 29898, 29900, 29892, 6287, 876, 529, 304, 29880, 13, 4706, 4974, 2923, 29918, 3470, 457, 29898, 29934, 29892, 14690, 29909, 29898, 29874, 29892, 13962, 29922, 3286, 18411, 876, 529, 304, 29880, 13, 13, 1678, 363, 263, 297, 313, 29900, 29892, 29871, 29896, 29906, 29892, 29871, 29946, 29945, 29892, 29871, 29941, 29941, 29892, 29871, 29953, 29955, 29892, 29871, 29947, 29929, 29892, 29871, 29929, 29900, 29892, 29871, 29896, 29906, 29900, 29892, 29871, 29896, 29955, 29900, 1125, 13, 4706, 1065, 29918, 1688, 29898, 29874, 29892, 313, 29896, 29892, 29871, 29896, 876, 13, 4706, 1065, 29918, 1688, 29898, 29874, 29892, 313, 29900, 29889, 29945, 29892, 29871, 29906, 876, 13, 4706, 1065, 29918, 1688, 6278, 29874, 29892, 313, 29900, 29889, 29945, 29892, 29871, 29906, 876, 13, 13, 4706, 1065, 29918, 1688, 29898, 29874, 29892, 313, 29896, 29892, 29871, 29906, 876, 13, 4706, 1065, 29918, 1688, 6278, 29874, 29892, 313, 29896, 29892, 29871, 29906, 876, 13, 13, 4706, 1065, 29918, 1688, 29898, 29874, 29892, 313, 29906, 29892, 448, 29896, 876, 13, 4706, 1065, 29918, 1688, 6278, 29874, 29892, 313, 29906, 29892, 448, 29896, 876, 13, 13, 1678, 1065, 29918, 1688, 29898, 29900, 29892, 313, 29941, 29892, 29871, 29946, 511, 29871, 29896, 29900, 29897, 13, 1678, 1065, 29918, 1688, 6278, 29941, 29941, 29892, 313, 29941, 29892, 448, 29896, 511, 29871, 29896, 29900, 29892, 13962, 7607, 29896, 29900, 29900, 29892, 448, 29941, 29941, 29941, 876, 13, 13, 13, 1753, 1243, 29918, 9202, 7295, 13, 1678, 822, 1065, 29918, 1688, 29898, 29909, 29892, 302, 29892, 304, 29880, 29922, 29896, 29872, 29899, 29945, 1125, 13, 4706, 1060, 353, 518, 3594, 23538, 29590, 29898, 29900, 29892, 29871, 29896, 511, 9090, 29898, 29900, 29892, 29871, 29896, 876, 363, 903, 297, 3464, 29898, 29876, 4638, 13, 4706, 612, 353, 518, 3594, 23538, 29909, 334, 19592, 29889, 3594, 29897, 363, 19592, 297, 1060, 29962, 13, 4706, 319, 29918, 353, 2756, 457, 29918, 3166, 29918, 16485, 29898, 29990, 29892, 612, 29897, 13, 13, 4706, 4974, 2923, 29918, 3470, 457, 29898, 29909, 29892, 319, 19925, 529, 304, 29880, 13, 13, 1678, 319, 353, 14690, 29909, 29898, 29896, 29941, 29892, 6287, 7607, 29941, 29892, 29871, 29946, 511, 1183, 279, 29922, 29941, 29892, 13962, 7607, 29896, 29900, 29900, 29892, 448, 29941, 29900, 29900, 29900, 876, 13, 13, 1678, 1065, 29918, 1688, 29898, 29909, 29892, 29871, 29941, 29897, 13, 1678, 1065, 29918, 1688, 29898, 29909, 29892, 29871, 29896, 29900, 29897, 13, 13, 1678, 1065, 29918, 1688, 29898, 11256, 29909, 3285, 29871, 29941, 29897, 13, 1678, 1065, 29918, 1688, 29898, 11256, 29909, 3285, 29871, 29896, 29900, 29897, 13, 13, 13, 1753, 1243, 29918, 7052, 29918, 271, 29918, 3149, 7295, 13, 1678, 822, 14690, 29918, 9067, 29898, 29879, 29916, 29892, 9878, 1125, 13, 4706, 319, 353, 14690, 29909, 29898, 29941, 29955, 29892, 6287, 7607, 29879, 29916, 29892, 9878, 511, 13962, 7607, 29906, 29896, 29906, 29955, 29892, 29871, 29929, 29941, 29947, 29929, 29896, 876, 13, 4706, 736, 22985, 5228, 13372, 29898, 29909, 29897, 13, 13, 1678, 304, 29880, 353, 29871, 29896, 29872, 29899, 29946, 13, 1678, 19592, 353, 921, 29891, 23538, 29900, 29892, 29871, 29900, 29897, 13, 1678, 363, 269, 29916, 29892, 9878, 297, 17288, 29941, 29892, 29871, 29946, 511, 313, 29900, 29889, 29946, 29892, 29871, 29900, 29889, 29941, 29941, 29941, 4638, 29901, 13, 4706, 534, 353, 14690, 29918, 9067, 29898, 29879, 29916, 29892, 9878, 29897, 13, 4706, 269, 29916, 3383, 9878, 29918, 353, 679, 29918, 7052, 29918, 271, 29918, 3149, 29898, 415, 29892, 534, 467, 3594, 13, 4706, 4974, 6425, 29898, 29879, 29916, 448, 269, 29916, 19925, 529, 304, 29880, 13, 4706, 4974, 6425, 29898, 29879, 29891, 448, 9878, 19925, 529, 304, 29880, 13, 13, 4706, 269, 29916, 3383, 9878, 29918, 353, 679, 29918, 7052, 29918, 271, 29918, 3149, 29898, 415, 29892, 534, 29892, 29871, 29900, 29889, 29896, 467, 3594, 13, 4706, 4974, 6425, 29898, 29879, 29916, 448, 269, 29916, 19925, 529, 304, 29880, 13, 4706, 4974, 6425, 29898, 29879, 29891, 448, 9878, 19925, 529, 304, 29880, 13, 13, 13, 1753, 1243, 29918, 29886, 861, 29918, 9067, 7295, 13, 1678, 19592, 353, 18761, 29898, 13, 4706, 938, 29898, 29916, 847, 29871, 29896, 29900, 29897, 334, 29871, 29896, 29900, 13, 4706, 363, 921, 297, 23216, 29889, 3149, 29898, 29896, 29946, 29945, 29892, 448, 29941, 29945, 29892, 321, 567, 29887, 29946, 29941, 29906, 29953, 467, 517, 29918, 29883, 2288, 29898, 8961, 29887, 29941, 29945, 29955, 29955, 467, 1111, 4339, 29961, 29900, 29962, 13, 1678, 1723, 13, 13, 1678, 319, 353, 14690, 29909, 29898, 7052, 7607, 29906, 29900, 29892, 448, 29906, 29900, 511, 13962, 29922, 415, 29897, 13, 13, 1678, 4765, 353, 1879, 29877, 3313, 3552, 29945, 29896, 29906, 29892, 29871, 29896, 29900, 29906, 29946, 511, 319, 29892, 321, 567, 29887, 29941, 29945, 29955, 29955, 29897, 13, 1678, 29743, 353, 1879, 29877, 3313, 29889, 3166, 29918, 479, 13242, 17125, 29898, 4351, 29889, 479, 12122, 29918, 1062, 296, 29892, 620, 29891, 29916, 23538, 29900, 29889, 29900, 29900, 29900, 29896, 29892, 448, 29900, 29889, 29900, 29900, 29900, 29896, 876, 13, 13, 1678, 534, 353, 7531, 29918, 29886, 861, 29918, 9067, 29898, 4351, 29892, 29743, 29897, 13, 13, 1678, 282, 1372, 29918, 4351, 353, 518, 3594, 23538, 29900, 29892, 29871, 29900, 511, 921, 29891, 23538, 29896, 29900, 29892, 29871, 29906, 29900, 511, 921, 29891, 23538, 29941, 29900, 29900, 29892, 29871, 29906, 29900, 29900, 4638, 13, 1678, 282, 1372, 29918, 22992, 353, 534, 29898, 16485, 29918, 4351, 29897, 13, 1678, 282, 1372, 29918, 4351, 29918, 353, 534, 29889, 1627, 29898, 16485, 29918, 22992, 29897, 13, 13, 1678, 7442, 29889, 13424, 29889, 9294, 29918, 284, 3242, 29918, 11745, 29898, 1429, 29918, 3594, 29898, 16485, 29918, 4351, 511, 5096, 29918, 3594, 29898, 16485, 29918, 4351, 29918, 876, 13, 1678, 4974, 534, 29889, 10660, 338, 6213, 13, 1678, 4974, 2062, 29898, 509, 467, 27382, 2541, 703, 29954, 29890, 29916, 5228, 13372, 703, 29897, 13, 13, 1678, 396, 1423, 10110, 4327, 13, 1678, 534, 353, 7531, 29918, 29886, 861, 29918, 9067, 29898, 4351, 29892, 4765, 29897, 13, 13, 1678, 282, 1372, 29918, 4351, 353, 518, 3594, 23538, 29900, 29892, 29871, 29900, 511, 921, 29891, 23538, 29896, 29900, 29892, 29871, 29906, 29900, 511, 921, 29891, 23538, 29941, 29900, 29900, 29892, 29871, 29906, 29900, 29900, 4638, 13, 1678, 282, 1372, 29918, 22992, 353, 534, 29898, 16485, 29918, 4351, 29897, 13, 1678, 282, 1372, 29918, 4351, 29918, 353, 534, 29889, 1627, 29898, 16485, 29918, 22992, 29897, 13, 13, 1678, 7442, 29889, 13424, 29889, 9294, 29918, 284, 3242, 29918, 11745, 29898, 1429, 29918, 3594, 29898, 16485, 29918, 4351, 511, 5096, 29918, 3594, 29898, 16485, 29918, 4351, 29918, 876, 13, 1678, 7442, 29889, 13424, 29889, 9294, 29918, 284, 3242, 29918, 11745, 29898, 1429, 29918, 3594, 29898, 16485, 29918, 4351, 511, 5096, 29918, 3594, 29898, 16485, 29918, 22992, 876, 13, 1678, 4974, 534, 29889, 10660, 338, 451, 6213, 13, 1678, 4974, 534, 29889, 1627, 29889, 10660, 338, 451, 6213, 13, 1678, 4974, 534, 29889, 1627, 29889, 1627, 338, 534, 13, 1678, 4974, 2062, 29898, 509, 467, 27382, 2541, 703, 12697, 5228, 13372, 703, 29897, 13, 13, 1678, 396, 1423, 6287, 871, 1735, 13, 1678, 534, 353, 7531, 29918, 29886, 861, 29918, 9067, 29898, 4351, 29892, 6287, 29881, 29918, 3204, 29918, 479, 23518, 29898, 4351, 29892, 29871, 29906, 876, 13, 1678, 282, 1372, 29918, 22992, 353, 534, 29898, 16485, 29918, 4351, 29897, 13, 1678, 282, 1372, 29918, 4351, 29918, 353, 534, 29889, 1627, 29898, 16485, 29918, 22992, 29897, 13, 13, 1678, 4974, 534, 29889, 10660, 338, 451, 6213, 13, 1678, 4974, 534, 29889, 1627, 29889, 10660, 338, 451, 6213, 13, 1678, 4974, 534, 29889, 1627, 29889, 1627, 338, 534, 13, 13, 1678, 7442, 29889, 13424, 29889, 9294, 29918, 284, 3242, 29918, 11745, 29898, 13, 4706, 5096, 29918, 3594, 29898, 16485, 29918, 22992, 511, 17288, 415, 29889, 29916, 847, 29871, 29906, 29892, 19592, 29889, 29891, 847, 29871, 29906, 29897, 363, 19592, 297, 282, 1372, 29918, 4351, 29962, 13, 1678, 1723, 13, 13, 1678, 7442, 29889, 13424, 29889, 9294, 29918, 284, 3242, 29918, 11745, 29898, 1429, 29918, 3594, 29898, 16485, 29918, 4351, 511, 5096, 29918, 3594, 29898, 16485, 29918, 4351, 29918, 876, 13, 13, 13, 1753, 1243, 29918, 26017, 29918, 276, 4836, 29918, 307, 29875, 7295, 13, 1678, 4765, 353, 838, 2596, 10749, 29889, 29873, 488, 29918, 479, 23518, 3552, 29896, 29945, 29892, 448, 29946, 29900, 876, 13, 1678, 29743, 353, 1879, 29877, 3313, 29889, 3166, 29918, 479, 13242, 17125, 29898, 13, 4706, 4765, 29889, 1062, 296, 29889, 517, 29918, 29883, 2288, 29898, 8961, 29887, 29941, 29947, 29945, 29955, 467, 9040, 29898, 29896, 29900, 511, 10104, 29922, 4351, 29889, 9778, 918, 13, 1678, 1723, 13, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 29743, 29897, 13, 13, 1678, 4974, 364, 29878, 29889, 307, 29875, 29918, 4351, 1275, 7442, 29889, 29879, 29918, 29961, 29900, 584, 4765, 29889, 3545, 29892, 29871, 29900, 584, 4765, 29889, 2103, 29962, 13, 1678, 4974, 29871, 29900, 529, 364, 29878, 29889, 7052, 529, 29871, 29896, 13, 1678, 4974, 364, 29878, 29889, 9067, 29889, 10660, 338, 6213, 13, 1678, 4974, 364, 29878, 29889, 9067, 29889, 1627, 338, 451, 6213, 13, 1678, 4974, 364, 29878, 29889, 9067, 29889, 1627, 29889, 10660, 338, 6213, 13, 13, 1678, 396, 1423, 8296, 13962, 1206, 13, 1678, 14100, 29918, 353, 7442, 29889, 29879, 29918, 29961, 29896, 29896, 29941, 13018, 29896, 29900, 29900, 29892, 29871, 29941, 29941, 13018, 29896, 29900, 29962, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 4765, 29961, 307, 29875, 29918, 2314, 13, 1678, 4974, 364, 29878, 29889, 307, 29875, 29918, 4351, 1275, 14100, 29918, 8945, 895, 29898, 307, 29875, 3383, 4765, 29889, 12181, 29897, 13, 1678, 4974, 364, 29878, 29889, 7052, 1275, 29871, 29896, 13, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 4765, 29961, 307, 29875, 29918, 1402, 7164, 29922, 29900, 29892, 7595, 29922, 29900, 29897, 13, 1678, 4974, 364, 29878, 29889, 307, 29875, 29918, 4351, 1275, 14100, 29918, 8945, 895, 29898, 307, 29875, 3383, 4765, 29889, 12181, 29897, 13, 1678, 4974, 364, 29878, 29889, 7052, 1275, 29871, 29896, 13, 13, 1678, 396, 1423, 8296, 13962, 1206, 13, 1678, 14100, 29918, 353, 7442, 29889, 29879, 29918, 29961, 29896, 29896, 29941, 13018, 29896, 29900, 29900, 29892, 29871, 29941, 29941, 13018, 29896, 29900, 29962, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 4765, 29961, 307, 29875, 29918, 1402, 7595, 29922, 29906, 29945, 29953, 29897, 13, 13, 1678, 4974, 364, 29878, 29889, 307, 29875, 29918, 4351, 1275, 7442, 29889, 29879, 29918, 29961, 29900, 584, 4765, 29889, 3545, 29892, 29871, 29900, 584, 4765, 29889, 2103, 29962, 13, 1678, 4974, 364, 29878, 29889, 7052, 1275, 29871, 29896, 13, 13, 1678, 14100, 29918, 353, 7442, 29889, 29879, 29918, 29961, 29896, 29896, 29941, 13018, 29896, 29900, 29900, 29892, 29871, 29941, 29941, 13018, 29896, 29900, 29962, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 4765, 29961, 307, 29875, 29918, 2314, 13, 13, 1678, 4974, 364, 29878, 29889, 7052, 1275, 29871, 29896, 13, 1678, 4974, 14100, 29918, 12181, 29898, 21478, 29889, 307, 29875, 29918, 4351, 29897, 1275, 14100, 29918, 12181, 29898, 21478, 29889, 307, 29875, 29918, 22992, 29897, 13, 1678, 4974, 14100, 29918, 12181, 29898, 21478, 29889, 307, 29875, 29918, 22992, 29897, 1275, 4765, 29961, 307, 29875, 29918, 1822, 12181, 13, 13, 1678, 396, 1423, 11417, 519, 19342, 29918, 449, 13, 1678, 29743, 353, 4765, 29889, 2502, 290, 29918, 449, 29898, 29906, 29897, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 29743, 29897, 13, 1678, 4974, 364, 29878, 29889, 16179, 29918, 554, 338, 5852, 13, 1678, 4974, 364, 29878, 29889, 949, 29918, 845, 29878, 682, 1275, 29871, 29906, 13, 1678, 4974, 14100, 29918, 12181, 29898, 21478, 29889, 307, 29875, 29918, 4351, 29897, 1275, 4765, 29889, 12181, 13, 1678, 4974, 14100, 29918, 12181, 29898, 21478, 29889, 307, 29875, 29918, 22992, 29897, 1275, 29743, 29889, 12181, 13, 13, 1678, 396, 1423, 1661, 29899, 16179, 519, 19342, 29918, 449, 13, 1678, 29743, 353, 4765, 29961, 29896, 29901, 29892, 584, 1822, 2502, 290, 29918, 449, 29898, 29906, 29897, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 29743, 29897, 13, 1678, 4974, 364, 29878, 29889, 16179, 29918, 554, 338, 7700, 13, 1678, 4974, 364, 29878, 29889, 949, 29918, 845, 29878, 682, 1275, 29871, 29906, 13, 13, 13, 1753, 1243, 29918, 26017, 29918, 276, 4836, 29918, 307, 29875, 29918, 16179, 7295, 13, 1678, 4765, 353, 1879, 29877, 3313, 29898, 13, 4706, 377, 23538, 29896, 29900, 29900, 29900, 29892, 29871, 29906, 29900, 29900, 29900, 511, 13, 4706, 14690, 29909, 29898, 7052, 7607, 29896, 29900, 29892, 448, 29896, 29900, 511, 13962, 7607, 29896, 29900, 334, 29871, 29896, 29906, 29941, 29892, 448, 29896, 29900, 334, 29871, 29906, 29941, 29900, 8243, 13, 4706, 321, 567, 29887, 29941, 29947, 29945, 29955, 29892, 13, 1678, 1723, 13, 13, 1678, 822, 903, 3198, 29898, 4351, 29901, 1879, 29877, 3313, 29892, 29743, 29901, 1879, 29877, 3313, 29892, 364, 29878, 29901, 830, 4836, 3401, 1125, 13, 4706, 4974, 364, 29878, 29889, 949, 29918, 845, 29878, 682, 6736, 29871, 29896, 13, 13, 4706, 565, 14100, 29918, 275, 29918, 6310, 29898, 21478, 29889, 307, 29875, 29918, 4351, 1125, 13, 9651, 4974, 14100, 29918, 275, 29918, 6310, 29898, 21478, 29889, 307, 29875, 29918, 22992, 29897, 13, 9651, 736, 13, 13, 4706, 565, 364, 29878, 29889, 16179, 29918, 554, 29901, 13, 9651, 565, 364, 29878, 29889, 949, 29918, 845, 29878, 682, 1275, 29871, 29896, 29901, 13, 18884, 4974, 14100, 29918, 12181, 29898, 21478, 29889, 307, 29875, 29918, 4351, 29897, 1275, 14100, 29918, 12181, 29898, 21478, 29889, 307, 29875, 29918, 22992, 29897, 13, 18884, 4974, 4765, 29961, 21478, 29889, 307, 29875, 29918, 4351, 1822, 12181, 1275, 29743, 29961, 21478, 29889, 307, 29875, 29918, 22992, 1822, 12181, 13, 9651, 1683, 29901, 13, 18884, 396, 14100, 2752, 1818, 7595, 304, 1303, 6287, 13, 18884, 396, 1149, 4513, 29899, 3626, 15702, 14100, 304, 975, 1493, 322, 1250, 881, 451, 1735, 14100, 13, 18884, 4974, 313, 13, 462, 1678, 6287, 29881, 29918, 786, 29918, 307, 29875, 29898, 13, 462, 4706, 6287, 29881, 29918, 3204, 29918, 307, 29875, 29898, 21478, 29889, 307, 29875, 29918, 4351, 29892, 364, 29878, 29889, 949, 29918, 845, 29878, 682, 511, 364, 29878, 29889, 949, 29918, 845, 29878, 682, 13, 462, 1678, 1723, 13, 462, 1678, 1275, 364, 29878, 29889, 307, 29875, 29918, 4351, 13, 18884, 1723, 13, 13, 18884, 4765, 29918, 353, 4765, 29961, 21478, 29889, 307, 29875, 29918, 4351, 1822, 2502, 290, 29918, 449, 29898, 21478, 29889, 949, 29918, 845, 29878, 682, 29897, 13, 18884, 4974, 4765, 5396, 12181, 1275, 29743, 29961, 21478, 29889, 307, 29875, 29918, 22992, 1822, 12181, 13, 13, 4706, 565, 364, 29878, 29889, 949, 29918, 845, 29878, 682, 1275, 29871, 29896, 29901, 13, 9651, 4974, 364, 29878, 29889, 7052, 5277, 29871, 29896, 29889, 29896, 13, 4706, 1683, 29901, 13, 9651, 4974, 364, 29878, 29889, 7052, 6736, 364, 29878, 29889, 949, 29918, 845, 29878, 682, 13, 13, 4706, 565, 4765, 29889, 29883, 2288, 1275, 29743, 29889, 29883, 2288, 29901, 13, 9651, 903, 4351, 353, 4765, 29961, 21478, 29889, 307, 29875, 29918, 4351, 1822, 1062, 296, 13, 9651, 903, 22992, 353, 29743, 29961, 21478, 29889, 307, 29875, 29918, 22992, 1822, 1062, 296, 13, 4706, 1683, 29901, 13, 9651, 903, 4351, 353, 4765, 29961, 21478, 29889, 307, 29875, 29918, 4351, 1822, 479, 12122, 29918, 1062, 296, 13, 9651, 903, 22992, 353, 29743, 29961, 21478, 29889, 307, 29875, 29918, 22992, 1822, 479, 12122, 29918, 1062, 296, 13, 13, 4706, 4974, 903, 4351, 29889, 1639, 2042, 7373, 22992, 467, 6203, 1405, 29871, 29900, 13, 13, 1678, 822, 903, 3582, 29898, 4351, 29901, 1879, 29877, 3313, 29892, 29743, 29901, 1879, 29877, 3313, 29892, 3579, 11022, 1125, 13, 4706, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 29743, 29892, 3579, 11022, 29897, 13, 4706, 4974, 364, 29878, 29889, 16179, 29918, 554, 338, 5852, 13, 4706, 903, 3198, 29898, 4351, 29892, 29743, 29892, 364, 29878, 29897, 13, 13, 1678, 822, 903, 1217, 23538, 4351, 29901, 1879, 29877, 3313, 29892, 29743, 29901, 1879, 29877, 3313, 29892, 3579, 11022, 1125, 13, 4706, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 29743, 29892, 3579, 11022, 29897, 13, 4706, 4974, 364, 29878, 29889, 16179, 29918, 554, 338, 7700, 13, 4706, 903, 3198, 29898, 4351, 29892, 29743, 29892, 364, 29878, 29897, 13, 13, 1678, 260, 29918, 353, 13737, 457, 29889, 3286, 18411, 13, 1678, 269, 29918, 353, 13737, 457, 29889, 7052, 13, 13, 1678, 396, 8656, 15526, 26118, 13962, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 29897, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 29961, 29896, 29900, 29901, 29892, 29871, 29906, 29929, 29901, 2314, 13, 1678, 903, 3582, 29898, 4351, 29961, 29896, 29900, 29901, 29892, 29871, 29906, 29929, 29901, 1402, 4765, 29897, 13, 13, 1678, 396, 1014, 29886, 15711, 13962, 2400, 266, 3781, 8948, 13, 1678, 903, 1217, 23538, 4351, 29892, 4765, 334, 260, 23538, 29900, 29889, 29941, 29892, 29871, 29900, 29889, 29941, 876, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 334, 260, 23538, 29900, 29889, 29941, 29892, 29871, 29900, 29889, 29941, 511, 260, 25027, 29922, 29900, 29889, 29945, 29897, 13, 1678, 903, 1217, 23538, 4351, 29892, 4765, 334, 260, 23538, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29896, 876, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 334, 260, 23538, 29900, 29889, 29900, 29892, 29871, 29900, 29889, 29896, 511, 260, 25027, 29922, 29900, 29889, 29896, 29945, 29897, 13, 1678, 903, 1217, 23538, 4351, 29892, 4765, 334, 260, 29918, 6278, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29900, 876, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 334, 260, 29918, 6278, 29900, 29889, 29896, 29892, 29871, 29900, 29889, 29900, 511, 260, 25027, 29922, 29900, 29889, 29896, 29945, 29897, 13, 13, 1678, 396, 21577, 6287, 29668, 800, 13, 1678, 903, 1217, 23538, 4351, 29892, 4765, 29961, 29906, 29900, 29901, 29892, 584, 29941, 29900, 29962, 334, 269, 23538, 29896, 29889, 29900, 29900, 29941, 29892, 29871, 29896, 29889, 29900, 29900, 29941, 876, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 29961, 29906, 29900, 29901, 29892, 584, 29941, 29900, 29962, 334, 269, 23538, 29896, 29889, 29900, 29900, 29941, 29892, 29871, 29896, 29889, 29900, 29900, 29941, 511, 380, 324, 29922, 29900, 29889, 29900, 29896, 29897, 13, 13, 1678, 396, 6043, 14653, 682, 13, 1678, 903, 1217, 23538, 4351, 29892, 4765, 29889, 2502, 290, 29918, 449, 29898, 29906, 29889, 29941, 876, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 29889, 2502, 290, 29918, 449, 29898, 29906, 876, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 29889, 2502, 290, 29918, 449, 29898, 29941, 876, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 29889, 2502, 290, 29918, 449, 29898, 29906, 718, 29871, 29896, 29872, 29899, 29945, 876, 29871, 396, 4513, 292, 5626, 881, 451, 4383, 13, 1678, 903, 1217, 23538, 4351, 29889, 2502, 290, 29918, 449, 29898, 29941, 511, 4765, 29897, 13, 1678, 903, 1217, 23538, 4351, 29889, 2502, 290, 29918, 449, 29898, 29906, 511, 4765, 29897, 13, 13, 1678, 396, 6043, 14653, 682, 541, 411, 1014, 29899, 29886, 15711, 13962, 1156, 14653, 18159, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 29961, 29946, 29901, 29892, 29871, 29947, 29901, 1822, 2502, 290, 29918, 449, 29898, 29946, 876, 13, 1678, 903, 1217, 23538, 4351, 29892, 4765, 29961, 29906, 29901, 29892, 29871, 29947, 29901, 1822, 2502, 290, 29918, 449, 29898, 29946, 876, 13, 1678, 903, 1217, 23538, 4351, 29892, 4765, 29961, 29947, 29901, 29892, 29871, 29941, 29901, 1822, 2502, 290, 29918, 449, 29898, 29946, 876, 13, 1678, 903, 3582, 29898, 4351, 29892, 4765, 29961, 29947, 29901, 29892, 29871, 29941, 29901, 1822, 2502, 290, 29918, 449, 29898, 29946, 511, 260, 25027, 29922, 29900, 29889, 29945, 29897, 13, 13, 13, 1753, 1243, 29918, 26017, 29918, 276, 4836, 29918, 307, 29875, 29918, 15118, 29953, 29946, 29955, 7295, 13, 1678, 9995, 797, 777, 21846, 1661, 29899, 957, 433, 3262, 1737, 23518, 267, 674, 1121, 297, 1661, 29899, 6310, 13, 1678, 421, 307, 29875, 29918, 22992, 29952, 1584, 2466, 421, 307, 29875, 29918, 4351, 29952, 338, 4069, 29889, 13, 13, 1678, 4321, 445, 1206, 16949, 29889, 13, 1678, 9995, 13, 13, 1678, 4765, 353, 1879, 29877, 3313, 29898, 13, 4706, 313, 29896, 29900, 29929, 29947, 29900, 29892, 29871, 29896, 29900, 29929, 29947, 29900, 511, 13737, 457, 29898, 29896, 29900, 29892, 29871, 29900, 29892, 29871, 29941, 29900, 29900, 29900, 29900, 29900, 29892, 29871, 29900, 29892, 448, 29896, 29900, 29892, 29871, 29945, 29929, 29900, 29900, 29900, 29906, 29900, 511, 315, 12445, 703, 8961, 29887, 29901, 29941, 29906, 29955, 29945, 29953, 1159, 13, 1678, 1723, 13, 13, 1678, 29743, 353, 1879, 29877, 3313, 3552, 29929, 29955, 29953, 29892, 29871, 29929, 29955, 29953, 511, 13737, 457, 29898, 29896, 29900, 29892, 29871, 29900, 29892, 29871, 29896, 29955, 29941, 29900, 29906, 29946, 29900, 29892, 29871, 29900, 29892, 448, 29896, 29900, 29892, 448, 29946, 29896, 29955, 29900, 29906, 29946, 29900, 511, 315, 12445, 703, 29923, 7024, 29954, 29901, 29941, 29945, 29955, 29955, 5783, 13, 13, 1678, 4974, 4765, 29889, 1062, 296, 29889, 957, 14128, 29898, 22992, 29889, 1062, 296, 29889, 517, 29918, 29883, 2288, 29898, 4351, 29889, 29883, 2288, 876, 338, 7700, 13, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29892, 29743, 29897, 13, 13, 1678, 4974, 14100, 29918, 275, 29918, 6310, 29898, 21478, 29889, 307, 29875, 29918, 4351, 29897, 13, 1678, 4974, 14100, 29918, 275, 29918, 6310, 29898, 21478, 29889, 307, 29875, 29918, 22992, 29897, 13, 13, 13, 1753, 1243, 29918, 26017, 29918, 276, 4836, 29918, 307, 29875, 29918, 15118, 29896, 29900, 29946, 29955, 7295, 13, 1678, 5124, 6937, 26017, 29918, 276, 4836, 29918, 307, 29875, 29898, 479, 23518, 29892, 1737, 23518, 29961, 307, 29875, 2314, 29952, 6041, 3639, 13, 1678, 421, 4351, 29918, 307, 29875, 2804, 14100, 1673, 746, 421, 479, 23518, 29952, 756, 313, 29896, 29897, 21577, 17036, 322, 313, 29906, 29897, 7736, 368, 13, 1678, 269, 1891, 421, 2520, 358, 1412, 13, 13, 1678, 4321, 445, 2228, 338, 11527, 29889, 13, 1678, 9995, 13, 1678, 1737, 23518, 353, 1879, 29877, 3313, 29898, 13, 4706, 313, 29941, 29900, 29900, 29900, 29892, 29871, 29941, 29900, 29900, 29900, 511, 13, 4706, 13737, 457, 29898, 13, 632, 29900, 29889, 29900, 29900, 29900, 29906, 29955, 29955, 29955, 29947, 29892, 29871, 29900, 29889, 29900, 29892, 29871, 29896, 29946, 29947, 29889, 29955, 29906, 29953, 29955, 29941, 29900, 29945, 29946, 29929, 29900, 29947, 29947, 29953, 29896, 29892, 29871, 29900, 29889, 29900, 29892, 448, 29900, 29889, 29900, 29900, 29900, 29906, 29955, 29955, 29955, 29947, 29892, 448, 29941, 29946, 29889, 29929, 29947, 29947, 29906, 29945, 29947, 29900, 29906, 29945, 29945, 29953, 29953, 29906, 29906, 13, 4706, 10353, 13, 4706, 376, 29923, 7024, 29954, 29901, 29946, 29941, 29906, 29953, 613, 13, 1678, 1723, 13, 1678, 4765, 29918, 307, 29875, 353, 7442, 29889, 29879, 29918, 29961, 29906, 29947, 29900, 29900, 29901, 29906, 29947, 29896, 29900, 29892, 29871, 29896, 29900, 29901, 29941, 29900, 29962, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 479, 23518, 29892, 1737, 23518, 29961, 4351, 29918, 307, 29875, 2314, 13, 13, 1678, 4974, 364, 29878, 29889, 16179, 29918, 554, 338, 5852, 13, 1678, 4974, 364, 29878, 29889, 307, 29875, 29918, 4351, 1275, 4765, 29918, 307, 29875, 13, 1678, 4974, 364, 29878, 29889, 307, 29875, 29918, 22992, 1275, 7442, 29889, 29879, 29918, 29961, 29900, 29901, 29896, 29900, 29892, 29871, 29900, 29901, 29906, 29900, 29962, 13, 13, 13, 1753, 1243, 29918, 26017, 29918, 276, 4836, 29918, 307, 29875, 29918, 957, 11895, 7295, 13, 1678, 9995, 13, 1678, 1954, 1179, 411, 5534, 23746, 297, 321, 567, 29887, 29901, 29946, 29941, 29906, 29953, 4049, 505, 10029, 13, 1678, 2743, 1737, 272, 387, 8306, 393, 9946, 1967, 24371, 304, 6159, 5377, 13, 1678, 310, 278, 21069, 29896, 29947, 29900, 29892, 448, 29929, 29900, 29892, 29871, 29896, 29947, 29900, 29892, 29871, 29929, 29900, 29962, 3216, 292, 3800, 29889, 13, 13, 1678, 830, 4836, 14100, 4547, 778, 9335, 3262, 304, 5376, 411, 393, 2228, 29889, 13, 1678, 9995, 13, 1678, 304, 29880, 353, 29871, 29896, 29872, 29899, 29941, 13, 1678, 4765, 29918, 479, 23518, 353, 1879, 29877, 3313, 29889, 3166, 29918, 29890, 1884, 29898, 13, 4706, 8521, 29896, 29947, 29900, 448, 304, 29880, 29892, 448, 29929, 29900, 448, 304, 29880, 29892, 29871, 29896, 29947, 29900, 718, 304, 29880, 29892, 29871, 29929, 29900, 718, 304, 29880, 511, 13, 4706, 321, 567, 29887, 29946, 29941, 29906, 29953, 29892, 13, 4706, 8267, 29922, 1332, 23538, 29906, 29900, 29900, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 511, 13, 4706, 19932, 29922, 5574, 29892, 13, 1678, 1723, 13, 1678, 4974, 4765, 29918, 479, 23518, 29889, 12181, 29889, 1332, 1275, 313, 29906, 29900, 29900, 29900, 29892, 29871, 29896, 29900, 29900, 29900, 29897, 13, 1678, 4974, 4765, 29918, 479, 23518, 29889, 1062, 296, 29889, 9917, 292, 1884, 29961, 29900, 29962, 529, 448, 29896, 29947, 29900, 13, 1678, 4974, 4765, 29918, 479, 23518, 29889, 1062, 296, 29889, 9917, 292, 1884, 29961, 29896, 29962, 529, 448, 29929, 29900, 13, 1678, 4974, 4765, 29918, 479, 23518, 29889, 1062, 296, 29889, 9917, 292, 1884, 29961, 29906, 29962, 1405, 718, 29896, 29947, 29900, 13, 1678, 4974, 4765, 29918, 479, 23518, 29889, 1062, 296, 29889, 9917, 292, 1884, 29961, 29941, 29962, 1405, 718, 29929, 29900, 13, 13, 1678, 29743, 29918, 479, 23518, 353, 11657, 10299, 29889, 2676, 29918, 1376, 267, 29898, 29900, 9601, 29900, 29892, 29871, 29900, 29962, 13, 13, 1678, 364, 29878, 353, 10272, 29918, 276, 4836, 29918, 307, 29875, 29898, 4351, 29918, 479, 23518, 29892, 29743, 29918, 479, 23518, 29897, 13, 1678, 4974, 364, 29878, 29889, 16179, 29918, 554, 338, 7700, 13, 1678, 4974, 29743, 29918, 479, 23518, 29961, 21478, 29889, 307, 29875, 29918, 22992, 29962, 1275, 29743, 29918, 479, 23518, 13, 13, 13, 1753, 1243, 29918, 8990, 29918, 957, 6984, 7295, 13, 1678, 269, 29918, 353, 7442, 29889, 29879, 29918, 13, 13, 1678, 396, 7562, 975, 14128, 12551, 8072, 13, 1678, 396, 13, 1678, 396, 317, 29901, 891, 29966, 9072, 489, 976, 29989, 13, 1678, 396, 360, 29901, 418, 891, 29966, 807, 976, 29989, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29900, 29892, 29871, 29906, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29900, 29897, 1275, 269, 29918, 29961, 29896, 29900, 29901, 29941, 29900, 29892, 29871, 29900, 29901, 29906, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29900, 29892, 29871, 29906, 29900, 29892, 29871, 29906, 29892, 29871, 29896, 29900, 29897, 1275, 269, 29918, 29961, 29896, 29900, 29901, 29945, 29900, 29892, 29871, 29900, 29901, 29906, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29900, 29892, 29871, 29906, 29900, 29892, 29871, 29900, 29889, 29906, 29945, 29892, 29871, 29896, 29900, 29897, 1275, 269, 29918, 29961, 29896, 29900, 29901, 29896, 29945, 29892, 29871, 29900, 29901, 29906, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29900, 29892, 29871, 29906, 29900, 29892, 448, 29896, 29892, 29871, 29947, 29900, 29897, 1275, 269, 29918, 29961, 29953, 29900, 29901, 29947, 29900, 29892, 29871, 29900, 29901, 29906, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29900, 29892, 29871, 29906, 29900, 29892, 448, 29900, 29889, 29945, 29892, 29871, 29945, 29900, 29897, 1275, 269, 29918, 29961, 29946, 29900, 29901, 29945, 29900, 29892, 29871, 29900, 29901, 29906, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29900, 29892, 29871, 29906, 29900, 29892, 448, 29906, 29892, 29871, 29929, 29900, 29897, 1275, 269, 29918, 29961, 29945, 29900, 29901, 29929, 29900, 29892, 29871, 29900, 29901, 29906, 29900, 29962, 13, 13, 1678, 396, 15435, 3381, 975, 14128, 2752, 8072, 13, 1678, 396, 13, 1678, 396, 317, 29901, 418, 891, 29966, 1378, 29958, 29989, 13, 1678, 396, 360, 29901, 891, 29966, 2683, 976, 29989, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 29892, 29871, 29896, 29892, 448, 29896, 29900, 29897, 1275, 269, 29918, 29961, 29900, 29901, 29896, 29900, 29892, 29871, 29896, 29900, 29901, 29906, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 29892, 29871, 29906, 29892, 448, 29896, 29900, 29897, 1275, 269, 29918, 29961, 29900, 29901, 29896, 29900, 29892, 29871, 29945, 29901, 29896, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 29892, 29871, 29900, 29889, 29945, 29892, 448, 29896, 29900, 29897, 1275, 269, 29918, 29961, 29900, 29901, 29896, 29900, 29892, 29871, 29906, 29900, 29901, 29946, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29896, 29900, 29900, 29892, 448, 29896, 29892, 29871, 29896, 29896, 29897, 1275, 269, 29918, 29961, 29900, 29901, 29896, 29900, 29892, 29871, 29896, 29901, 29896, 29896, 29962, 13, 13, 1678, 396, 3455, 616, 975, 14128, 13, 1678, 396, 13, 1678, 396, 317, 29901, 891, 29966, 28400, 976, 29989, 13, 1678, 396, 360, 29901, 268, 891, 29966, 28400, 976, 29989, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29896, 29900, 29892, 29871, 29896, 29892, 29871, 29941, 29897, 1275, 269, 29918, 29961, 29941, 29901, 29896, 29900, 29892, 29871, 29900, 29901, 29955, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29896, 29945, 29892, 29871, 29896, 29892, 29871, 29941, 29897, 1275, 269, 29918, 29961, 29941, 29901, 29896, 29900, 29892, 29871, 29900, 29901, 29955, 29962, 13, 13, 1678, 396, 317, 29901, 268, 891, 29966, 28400, 976, 29989, 13, 1678, 396, 360, 29901, 891, 29966, 28400, 976, 29989, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29896, 29900, 29892, 29871, 29896, 29892, 448, 29945, 29897, 1275, 269, 29918, 29961, 29900, 29901, 29945, 29892, 29871, 29945, 29901, 29896, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29945, 29900, 29892, 29871, 29896, 29900, 29892, 29871, 29896, 29892, 448, 29945, 29897, 1275, 269, 29918, 29961, 29900, 29901, 29945, 29892, 29871, 29945, 29901, 29896, 29900, 29962, 13, 13, 1678, 396, 1939, 975, 14128, 13, 1678, 396, 317, 29901, 891, 29966, 489, 976, 29989, 13, 1678, 396, 360, 29901, 308, 891, 29966, 489, 976, 29989, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29896, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29896, 29897, 1275, 269, 29918, 29961, 29896, 29900, 29901, 29896, 29900, 29892, 29871, 29900, 29901, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29946, 29900, 29892, 29871, 29896, 29892, 29871, 29896, 29896, 29897, 1275, 269, 29918, 29961, 29896, 29900, 29901, 29896, 29900, 29892, 29871, 29900, 29901, 29900, 29962, 13, 13, 1678, 396, 317, 29901, 308, 891, 29966, 489, 976, 29989, 13, 1678, 396, 360, 29901, 891, 29966, 489, 976, 29989, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29896, 29900, 29892, 29871, 29896, 29900, 29892, 29871, 29896, 29892, 448, 29896, 29896, 29897, 1275, 269, 29918, 29961, 29900, 29901, 29900, 29892, 29871, 29896, 29900, 29901, 29896, 29900, 29962, 13, 1678, 4974, 10272, 29918, 8990, 29918, 957, 6984, 29898, 29946, 29900, 29892, 29871, 29896, 29900, 29892, 29871, 29896, 29892, 448, 29896, 29896, 29897, 1275, 269, 29918, 29961, 29900, 29901, 29900, 29892, 29871, 29896, 29900, 29901, 29896, 29900, 29962, 13, 13, 13, 1753, 1243, 29918, 3068, 29918, 16179, 7295, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 3286, 18411, 7607, 29896, 29900, 29892, 448, 29906, 29900, 4961, 1275, 313, 5574, 29892, 6213, 29897, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 7052, 7607, 29896, 29900, 29892, 29871, 29896, 29900, 4961, 1275, 313, 5574, 29892, 6213, 29897, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 7052, 29922, 6278, 29896, 29900, 29892, 29871, 29896, 29900, 511, 13962, 7607, 29900, 29892, 448, 29946, 334, 29871, 29896, 29900, 4961, 1275, 313, 5574, 29892, 6213, 29897, 13, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 11360, 279, 29922, 29900, 29889, 29941, 876, 1275, 313, 8824, 29892, 376, 5349, 13733, 470, 1183, 279, 1159, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 5450, 29922, 29941, 29900, 876, 1275, 313, 8824, 29892, 376, 5349, 13733, 470, 1183, 279, 1159, 13, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 7052, 29922, 6278, 29896, 29896, 29889, 29896, 29892, 29871, 29896, 29896, 29889, 29896, 4961, 1275, 313, 8824, 29892, 376, 5464, 29899, 16031, 6287, 1159, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 7052, 7607, 29900, 29889, 29945, 29892, 29871, 29900, 29889, 29945, 4961, 1275, 313, 8824, 29892, 376, 5464, 29899, 16031, 6287, 1159, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 7052, 7607, 29906, 29892, 29871, 29941, 4961, 1275, 313, 8824, 29892, 376, 29879, 29916, 19216, 29879, 29891, 29892, 3117, 1159, 13, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 7052, 29922, 6278, 29896, 29900, 29892, 29871, 29896, 29900, 511, 13962, 7607, 29900, 29892, 448, 29946, 4961, 1275, 313, 13, 4706, 7700, 29892, 13, 4706, 376, 1491, 29899, 29886, 15711, 13962, 613, 13, 1678, 1723, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 7052, 29922, 6278, 29896, 29900, 29892, 29871, 29896, 29900, 511, 13962, 29922, 6278, 29946, 29892, 29871, 29896, 29900, 4961, 1275, 313, 13, 4706, 7700, 29892, 13, 4706, 376, 1491, 29899, 29886, 15711, 13962, 613, 13, 1678, 1723, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 3286, 18411, 7607, 29900, 29892, 29871, 29900, 29889, 29946, 4961, 1275, 313, 8824, 29892, 376, 1491, 29899, 29886, 15711, 13962, 1159, 13, 1678, 4974, 903, 3068, 29918, 16179, 29898, 11256, 29909, 29898, 3286, 18411, 7607, 29900, 29889, 29946, 29892, 29871, 29900, 4961, 1275, 313, 8824, 29892, 376, 1491, 29899, 29886, 15711, 13962, 1159, 13, 13, 13, 1753, 1243, 29918, 26017, 29918, 4905, 29918, 479, 23518, 7295, 13, 1678, 396, 2665, 262, 295, 29906, 975, 15347, 1705, 12637, 5312, 277, 13, 1678, 4765, 353, 1879, 29877, 3313, 29889, 3166, 29918, 29890, 1884, 29898, 13, 4706, 518, 29896, 29929, 29929, 29929, 29947, 29900, 29892, 29871, 29941, 29947, 29929, 29900, 29906, 29906, 29900, 29892, 29871, 29941, 29900, 29929, 29955, 29947, 29900, 29892, 29871, 29946, 29900, 29900, 29900, 29900, 29906, 29900, 1402, 376, 29923, 7024, 29954, 29901, 29941, 29906, 29953, 29941, 29900, 613, 10104, 29922, 29896, 29900, 13, 1678, 1723, 13, 13, 1678, 396, 925, 3509, 10104, 1951, 1716, 297, 27881, 13, 1678, 29743, 353, 10272, 29918, 4905, 29918, 479, 23518, 29898, 4351, 29892, 376, 8961, 29887, 29901, 29953, 29929, 29941, 29941, 1159, 13, 1678, 4974, 29743, 29889, 29883, 2288, 29889, 348, 1169, 1275, 4765, 29889, 29883, 2288, 29889, 348, 1169, 13, 1678, 4974, 29743, 29889, 29883, 2288, 1275, 376, 8961, 29887, 29901, 29953, 29929, 29941, 29941, 29908, 13, 1678, 4974, 29743, 29889, 9778, 918, 1275, 4765, 29889, 9778, 918, 13, 1678, 4974, 29743, 29889, 479, 12122, 29918, 1062, 296, 29889, 11516, 29898, 4351, 29889, 479, 12122, 29918, 1062, 296, 29897, 13, 1678, 4974, 10272, 29918, 4905, 29918, 479, 23518, 29898, 4351, 29892, 376, 8961, 29887, 29901, 29953, 29929, 29941, 29941, 1159, 1275, 4765, 29889, 517, 29918, 29883, 2288, 703, 8961, 29887, 29901, 29953, 29929, 29941, 29941, 1159, 13, 13, 1678, 4974, 10272, 29918, 4905, 29918, 479, 23518, 29898, 13, 4706, 4765, 29892, 376, 8961, 29887, 29901, 29953, 29929, 29941, 29941, 613, 10104, 543, 6921, 29908, 13, 1678, 1723, 1275, 10272, 29918, 4905, 29918, 479, 23518, 29898, 4351, 29892, 376, 8961, 29887, 29901, 29953, 29929, 29941, 29941, 613, 10104, 543, 17642, 1159, 13, 13, 1678, 396, 4889, 23248, 310, 716, 10104, 13, 1678, 29743, 353, 10272, 29918, 4905, 29918, 479, 23518, 29898, 4351, 29892, 376, 8961, 29887, 29901, 29953, 29929, 29941, 29941, 613, 10104, 543, 9202, 1159, 13, 1678, 4974, 29743, 29889, 29883, 2288, 1275, 376, 8961, 29887, 29901, 29953, 29929, 29941, 29941, 29908, 13, 1678, 4974, 29743, 29889, 9778, 918, 2804, 4765, 29889, 9778, 918, 13, 1678, 4974, 29743, 29889, 9778, 918, 29889, 29916, 1275, 448, 22992, 29889, 9778, 918, 29889, 29891, 13, 1678, 4974, 29743, 29889, 479, 12122, 29918, 1062, 296, 29889, 11516, 29898, 4351, 29889, 479, 12122, 29918, 1062, 296, 29897, 13, 13, 1678, 396, 1423, 11301, 304, 23123, 29914, 5066, 13, 1678, 29743, 353, 10272, 29918, 4905, 29918, 479, 23518, 29898, 4351, 29892, 376, 8961, 29887, 29901, 29946, 29941, 29906, 29953, 1159, 13, 1678, 4974, 29743, 29889, 29883, 2288, 1275, 376, 8961, 29887, 29901, 29946, 29941, 29906, 29953, 29908, 13, 1678, 4974, 29743, 29889, 9778, 918, 2804, 4765, 29889, 9778, 918, 13, 1678, 4974, 29743, 29889, 9778, 918, 29889, 29916, 1275, 448, 22992, 29889, 9778, 918, 29889, 29891, 13, 1678, 4974, 29743, 29889, 479, 12122, 29918, 1062, 296, 29889, 11516, 29898, 4351, 29889, 479, 12122, 29918, 1062, 296, 29897, 13, 1678, 7442, 861, 29918, 3167, 353, 313, 4351, 29889, 12181, 29961, 29900, 29962, 334, 4765, 29889, 12181, 29961, 29896, 2314, 847, 313, 22992, 29889, 12181, 29961, 29900, 29962, 334, 29743, 29889, 12181, 29961, 29896, 2314, 13, 1678, 4974, 29871, 29900, 29889, 29947, 529, 7442, 861, 29918, 3167, 529, 29871, 29896, 29889, 29896, 13, 13, 1678, 396, 748, 1250, 515, 29871, 29946, 29941, 29906, 29953, 13, 1678, 903, 4351, 353, 29743, 13, 1678, 29743, 353, 10272, 29918, 4905, 29918, 479, 23518, 7373, 4351, 29892, 4765, 29889, 29883, 2288, 29897, 13, 1678, 7442, 861, 29918, 3167, 353, 9423, 4351, 29889, 12181, 29961, 29900, 29962, 334, 903, 4351, 29889, 12181, 29961, 29896, 2314, 847, 313, 22992, 29889, 12181, 29961, 29900, 29962, 334, 29743, 29889, 12181, 29961, 29896, 2314, 13, 1678, 4974, 29871, 29900, 29889, 29947, 529, 7442, 861, 29918, 3167, 529, 29871, 29896, 29889, 29896, 13, 1678, 4974, 29743, 29889, 479, 12122, 29918, 1062, 296, 29889, 11516, 7373, 4351, 29889, 479, 12122, 29918, 1062, 296, 29897, 13, 13, 1678, 396, 1243, 4319, 1881, 13, 1678, 411, 11451, 1688, 29889, 336, 4637, 29898, 1917, 2392, 1125, 13, 4706, 903, 353, 10272, 29918, 4905, 29918, 479, 23518, 29898, 4351, 29892, 376, 8961, 29887, 29901, 29953, 29929, 29941, 29941, 613, 10104, 543, 12313, 29899, 650, 1159, 13, 2 ]
weekly_challenge/week3/solution.py
WooJin1993/coding_test
0
179563
<reponame>WooJin1993/coding_test def get_rotated(matrix): return [list(reversed(m)) for m in zip(*matrix)] def get_expanded(game_board): N = len(game_board) expanded = [[1] * (N+2) for _ in range(N + 2)] for x in range(N): for y in range(N): expanded[1 + x][1 + y] = game_board[x][y] return expanded def can_fill(puzzle, expanded): M, N = len(puzzle), len(expanded) N -= 2 def check(x, y): for i in range(M): for j in range(M): if puzzle[i][j] == 1: if expanded[x + i][y + j] == 0 and expanded[x + i][y + j] == 0 return for x in range(1, N + 1): for y in range(1, N + 1): def extract_puzzle(table): def solution(game_board, table): answer = -1 return answer # --- 모범 답안 --- from collections import Counter from dataclasses import dataclass from itertools import product @dataclass(frozen=True) class Pos: x: int y: int def neighbors(self): return [ Pos(self.x, self.y - 1), Pos(self.x + 1, self.y), Pos(self.x, self.y + 1), Pos(self.x - 1, self.y), ] def get_rotated(matrix): return tuple(tuple(reversed(m)) for m in zip(*matrix)) def make_tile_from_positions(positions): # Smallest possible representation with rotation positions = set(positions) xs = [pos.x for pos in positions] min_x = min(xs) max_x = max(xs) ys = [pos.y for pos in positions] min_y = min(ys) max_y = max(ys) tile_representations = [ tuple( tuple(Pos(i, j) in positions for j in range(min_y, max_y + 1)) for i in range(min_x, max_x + 1) ) ] for __ in range(3): tile_representations.append(get_rotated(tile_representations[-1])) return min(tile_representations) def get_tile_size(tile): return sum(sum(row) for row in tile) def parse_tiles(board, tile_value=1): n = len(board) # Add sentinel boundaries sentinel = 1 - tile_value board = [ [sentinel] * (n + 2), *([sentinel] + row + [sentinel] for row in board), [sentinel] * (n + 2), ] # Detect tiles tile_positions = [] for i, j in product(range(1, n + 1), range(1, n + 1)): if board[i][j] == tile_value: stack = [Pos(i, j)] squares = [] while stack: curr = stack.pop() board[curr.x][curr.y] = sentinel squares.append(curr) for neighbor in curr.neighbors(): if board[neighbor.x][neighbor.y] == tile_value: stack.append(neighbor) tile_positions.append(squares) # Make tiles tiles = [make_tile_from_positions(p) for p in tile_positions] return tiles def solution(game_board, table): tiles = parse_tiles(table, 1) empty_spaces = parse_tiles(game_board, 0) tile_counter = Counter(tiles) empty_space_counter = Counter(empty_spaces) used_tiles = tile_counter & empty_space_counter return sum(get_tile_size(tile) * occ for tile, occ in used_tiles.items()) # --- 모범 답안 2 --- from collections import defaultdict, deque # 아래, 오른쪽, 위, 왼쪽 x_move = [1,0,-1,0] y_move = [0,1,0,-1] dirs = [(0, 1), (1, 0) , (0, -1), (-1, 0)] table_num_dict = defaultdict(list) board_num_dict = defaultdict(list) def bfs(table, table_num, init, x, y): n = len(table) queue = deque() queue.append((x, y)) table[x][y] = table_num tmp_path = [x, y] visited = [[0 for _ in range(n)] for _ in range(n)] if init == False: visited[x][y] = 1 while queue: x, y = queue.popleft() for dx, dy in dirs: nx, ny = x + dx, y + dy if not (0 <= nx < n and 0 <= ny < n): continue if init == True and table[nx][ny] == 1: queue.append((nx, ny)) table[nx][ny] = table_num tmp_path.extend((nx, ny)) if init == False and visited[nx][ny] != 1 and table[nx][ny] == table_num: queue.append((nx, ny)) visited[nx][ny] = 1 tmp_path.extend((nx, ny)) table_num_dict[table_num].append(tmp_path) def board_bfs(board, board_num, x, y): q = deque() q.append([x,y]) board[x][y] = board_num tmp_path = [x,y] while q: now_x, now_y = q.popleft() for i in range(len(x_move)): next_x, next_y = now_x+x_move[i], now_y+y_move[i] if 0 <= next_x < len(board) and 0 <= next_y < len(board): if board[next_x][next_y] == 0: q.append([next_x, next_y]) board[next_x][next_y] = board_num tmp_path.extend([next_x, next_y]) board_num_dict[board_num].append(tmp_path) def table_rotate(table): tmp_table = [[0 for y in range(len(table))] for x in range(len(table))] for x in range(len(tmp_table)): for y in range(len(tmp_table)): tmp_table[y][len(table)-1-x] = table[x][y] return tmp_table def solution(game_board, table): answer = 0 #table num 2부터 table_num = 2 for x in range(len(table)): for y in range(len(table)): if table[x][y] == 1: bfs(table, table_num, True, x, y) table_num += 1 # 3번 돌림 for i in range(3): table = table_rotate(table) table_num_visited = [] for x in range(len(table)): for y in range(len(table)): if table[x][y] >= 2 and table[x][y] not in table_num_visited: table_num = table[x][y] table_num_visited.append(table_num) bfs(table, table_num, False, x, y) #board board_num = 2 for x in range(len(game_board)): for y in range(len(game_board)): if game_board[x][y] == 0: board_bfs(game_board, board_num, x, y) board_num += 1 table_num_visited = [] for i in range(len(board_num_dict)): board_cmp = board_num_dict[i+2][0] find_answer = False for j in range(len(table_num_dict)): if (j+2) in table_num_visited: continue if find_answer == True: break for k in range(4): table_cmp = table_num_dict[j+2][k] if len(board_cmp) != len(table_cmp): break if len(board_cmp) == 1 and len(table_cmp) == 1: answer += 1 find_answer = True table_num_visited.append(j+2) break cmp_right = True cmp_first, cmp_second = board_cmp[0]-table_cmp[0], board_cmp[1]-table_cmp[1] for l in range(2, len(board_cmp)): if l%2 == 0 and board_cmp[l]-table_cmp[l] != cmp_first: cmp_right = False break if l%2 == 1 and board_cmp[l]-table_cmp[l] != cmp_second: cmp_right = False break if cmp_right == True: answer += len(table_cmp)//2 find_answer = True table_num_visited.append(j+2) break return answer
[ 1, 529, 276, 1112, 420, 29958, 29956, 3634, 29967, 262, 29896, 29929, 29929, 29941, 29914, 29883, 3689, 29918, 1688, 13, 1753, 679, 29918, 5450, 630, 29898, 5344, 1125, 13, 13, 1678, 736, 518, 1761, 29898, 276, 874, 287, 29898, 29885, 876, 363, 286, 297, 14319, 10456, 5344, 4638, 13, 13, 1753, 679, 29918, 18837, 287, 29898, 11802, 29918, 3377, 1125, 13, 1678, 405, 353, 7431, 29898, 11802, 29918, 3377, 29897, 13, 1678, 17832, 353, 5519, 29896, 29962, 334, 313, 29940, 29974, 29906, 29897, 363, 903, 297, 3464, 29898, 29940, 718, 29871, 29906, 4638, 13, 268, 13, 1678, 363, 921, 297, 3464, 29898, 29940, 1125, 13, 4706, 363, 343, 297, 3464, 29898, 29940, 1125, 13, 9651, 17832, 29961, 29896, 718, 921, 3816, 29896, 718, 343, 29962, 353, 3748, 29918, 3377, 29961, 29916, 3816, 29891, 29962, 13, 268, 13, 1678, 736, 17832, 13, 13, 1753, 508, 29918, 5589, 29898, 29886, 18813, 280, 29892, 17832, 1125, 13, 1678, 341, 29892, 405, 353, 7431, 29898, 29886, 18813, 280, 511, 7431, 29898, 18837, 287, 29897, 13, 1678, 405, 22361, 29871, 29906, 13, 268, 13, 1678, 822, 1423, 29898, 29916, 29892, 343, 1125, 13, 4706, 363, 474, 297, 3464, 29898, 29924, 1125, 13, 9651, 363, 432, 297, 3464, 29898, 29924, 1125, 13, 18884, 565, 20285, 280, 29961, 29875, 3816, 29926, 29962, 1275, 29871, 29896, 29901, 13, 462, 1678, 565, 17832, 29961, 29916, 718, 474, 3816, 29891, 718, 432, 29962, 1275, 29871, 29900, 322, 17832, 29961, 29916, 718, 474, 3816, 29891, 718, 432, 29962, 1275, 29871, 29900, 13, 462, 13, 462, 13, 462, 13, 4706, 736, 29871, 13, 268, 13, 1678, 363, 921, 297, 3464, 29898, 29896, 29892, 405, 718, 29871, 29896, 1125, 13, 4706, 363, 343, 297, 3464, 29898, 29896, 29892, 405, 718, 29871, 29896, 1125, 13, 632, 13, 268, 13, 632, 13, 268, 13, 13, 1753, 6597, 29918, 29886, 18813, 280, 29898, 2371, 1125, 13, 268, 13, 13, 1753, 1650, 29898, 11802, 29918, 3377, 29892, 1591, 1125, 13, 1678, 1234, 353, 448, 29896, 13, 1678, 736, 1234, 13, 13, 13, 29937, 11474, 29871, 31962, 238, 181, 151, 29871, 238, 142, 184, 31734, 11474, 13, 13, 3166, 16250, 1053, 315, 5336, 13, 3166, 848, 13203, 1053, 848, 1990, 13, 3166, 4256, 8504, 1053, 3234, 13, 13, 29992, 1272, 1990, 29898, 29888, 307, 2256, 29922, 5574, 29897, 13, 1990, 10321, 29901, 13, 1678, 921, 29901, 938, 13, 1678, 343, 29901, 938, 13, 13, 1678, 822, 22092, 943, 29898, 1311, 1125, 13, 308, 13, 4706, 736, 518, 13, 9651, 10321, 29898, 1311, 29889, 29916, 29892, 1583, 29889, 29891, 448, 29871, 29896, 511, 13, 9651, 10321, 29898, 1311, 29889, 29916, 718, 29871, 29896, 29892, 1583, 29889, 29891, 511, 13, 9651, 10321, 29898, 1311, 29889, 29916, 29892, 1583, 29889, 29891, 718, 29871, 29896, 511, 13, 9651, 10321, 29898, 1311, 29889, 29916, 448, 29871, 29896, 29892, 1583, 29889, 29891, 511, 13, 4706, 4514, 13, 13, 1753, 679, 29918, 5450, 630, 29898, 5344, 1125, 13, 13, 1678, 736, 18761, 29898, 23583, 29898, 276, 874, 287, 29898, 29885, 876, 363, 286, 297, 14319, 10456, 5344, 876, 13, 13, 1753, 1207, 29918, 29873, 488, 29918, 3166, 29918, 1066, 2187, 29898, 1066, 2187, 1125, 13, 1678, 396, 18285, 342, 1950, 8954, 411, 13733, 13, 1678, 11909, 353, 731, 29898, 1066, 2187, 29897, 13, 13, 1678, 14492, 353, 518, 1066, 29889, 29916, 363, 926, 297, 11909, 29962, 13, 1678, 1375, 29918, 29916, 353, 1375, 29898, 10351, 29897, 13, 1678, 4236, 29918, 29916, 353, 4236, 29898, 10351, 29897, 13, 13, 1678, 343, 29879, 353, 518, 1066, 29889, 29891, 363, 926, 297, 11909, 29962, 13, 1678, 1375, 29918, 29891, 353, 1375, 29898, 952, 29897, 13, 1678, 4236, 29918, 29891, 353, 4236, 29898, 952, 29897, 13, 13, 1678, 25900, 29918, 276, 6338, 800, 353, 518, 13, 4706, 18761, 29898, 13, 9651, 18761, 29898, 9135, 29898, 29875, 29892, 432, 29897, 297, 11909, 363, 432, 297, 3464, 29898, 1195, 29918, 29891, 29892, 4236, 29918, 29891, 718, 29871, 29896, 876, 363, 474, 297, 3464, 29898, 1195, 29918, 29916, 29892, 4236, 29918, 29916, 718, 29871, 29896, 29897, 13, 4706, 1723, 13, 1678, 4514, 13, 13, 1678, 363, 4770, 297, 3464, 29898, 29941, 1125, 13, 4706, 25900, 29918, 276, 6338, 800, 29889, 4397, 29898, 657, 29918, 5450, 630, 29898, 29873, 488, 29918, 276, 6338, 800, 14352, 29896, 12622, 13, 13, 1678, 736, 1375, 29898, 29873, 488, 29918, 276, 6338, 800, 29897, 13, 13, 1753, 679, 29918, 29873, 488, 29918, 2311, 29898, 29873, 488, 1125, 13, 268, 13, 1678, 736, 2533, 29898, 2083, 29898, 798, 29897, 363, 1948, 297, 25900, 29897, 13, 13, 1753, 6088, 29918, 1376, 267, 29898, 3377, 29892, 25900, 29918, 1767, 29922, 29896, 1125, 13, 1678, 302, 353, 7431, 29898, 3377, 29897, 13, 13, 1678, 396, 3462, 2665, 262, 295, 24371, 13, 1678, 2665, 262, 295, 353, 29871, 29896, 448, 25900, 29918, 1767, 13, 13, 1678, 7613, 353, 518, 13, 4706, 518, 29879, 15440, 295, 29962, 334, 313, 29876, 718, 29871, 29906, 511, 13, 4706, 334, 4197, 29879, 15440, 295, 29962, 718, 1948, 718, 518, 29879, 15440, 295, 29962, 363, 1948, 297, 7613, 511, 13, 4706, 518, 29879, 15440, 295, 29962, 334, 313, 29876, 718, 29871, 29906, 511, 13, 1678, 4514, 13, 13, 1678, 396, 5953, 522, 260, 5475, 13, 1678, 25900, 29918, 1066, 2187, 353, 5159, 13, 268, 13, 1678, 363, 474, 29892, 432, 297, 3234, 29898, 3881, 29898, 29896, 29892, 302, 718, 29871, 29896, 511, 3464, 29898, 29896, 29892, 302, 718, 29871, 29896, 22164, 13, 4706, 565, 7613, 29961, 29875, 3816, 29926, 29962, 1275, 25900, 29918, 1767, 29901, 13, 9651, 5096, 353, 518, 9135, 29898, 29875, 29892, 432, 4638, 13, 9651, 25256, 353, 5159, 13, 632, 13, 9651, 1550, 5096, 29901, 13, 18884, 16256, 353, 5096, 29889, 7323, 580, 13, 18884, 7613, 29961, 21962, 29889, 29916, 3816, 21962, 29889, 29891, 29962, 353, 2665, 262, 295, 13, 18884, 25256, 29889, 4397, 29898, 21962, 29897, 13, 462, 13, 18884, 363, 12307, 297, 16256, 29889, 484, 1141, 29890, 943, 7295, 13, 462, 1678, 565, 7613, 29961, 484, 1141, 4089, 29889, 29916, 3816, 484, 1141, 4089, 29889, 29891, 29962, 1275, 25900, 29918, 1767, 29901, 13, 462, 4706, 5096, 29889, 4397, 29898, 484, 1141, 4089, 29897, 13, 462, 308, 13, 9651, 25900, 29918, 1066, 2187, 29889, 4397, 29898, 26613, 5114, 29897, 13, 13, 1678, 396, 8561, 260, 5475, 13, 1678, 260, 5475, 353, 518, 5675, 29918, 29873, 488, 29918, 3166, 29918, 1066, 2187, 29898, 29886, 29897, 363, 282, 297, 25900, 29918, 1066, 2187, 29962, 13, 13, 1678, 736, 260, 5475, 13, 13, 1753, 1650, 29898, 11802, 29918, 3377, 29892, 1591, 1125, 13, 1678, 260, 5475, 353, 6088, 29918, 1376, 267, 29898, 2371, 29892, 29871, 29896, 29897, 13, 1678, 4069, 29918, 22854, 353, 6088, 29918, 1376, 267, 29898, 11802, 29918, 3377, 29892, 29871, 29900, 29897, 13, 13, 1678, 25900, 29918, 11808, 353, 315, 5336, 29898, 1376, 267, 29897, 13, 1678, 4069, 29918, 3493, 29918, 11808, 353, 315, 5336, 29898, 6310, 29918, 22854, 29897, 13, 13, 1678, 1304, 29918, 1376, 267, 353, 25900, 29918, 11808, 669, 4069, 29918, 3493, 29918, 11808, 13, 13, 1678, 736, 2533, 29898, 657, 29918, 29873, 488, 29918, 2311, 29898, 29873, 488, 29897, 334, 2179, 363, 25900, 29892, 2179, 297, 1304, 29918, 1376, 267, 29889, 7076, 3101, 13, 13, 29937, 11474, 29871, 31962, 238, 181, 151, 29871, 238, 142, 184, 31734, 29871, 29906, 11474, 13, 13, 3166, 16250, 1053, 2322, 8977, 29892, 316, 802, 13, 29937, 29871, 30860, 238, 161, 155, 29892, 29871, 31346, 238, 168, 187, 239, 173, 192, 29892, 29871, 31724, 29892, 29871, 239, 156, 191, 239, 173, 192, 13, 29916, 29918, 11631, 353, 518, 29896, 29892, 29900, 6653, 29896, 29892, 29900, 29962, 13, 29891, 29918, 11631, 353, 518, 29900, 29892, 29896, 29892, 29900, 6653, 29896, 29962, 13, 3972, 29879, 353, 17288, 29900, 29892, 29871, 29896, 511, 313, 29896, 29892, 29871, 29900, 29897, 1919, 313, 29900, 29892, 448, 29896, 511, 8521, 29896, 29892, 29871, 29900, 4638, 13, 2371, 29918, 1949, 29918, 8977, 353, 2322, 8977, 29898, 1761, 29897, 13, 3377, 29918, 1949, 29918, 8977, 353, 2322, 8977, 29898, 1761, 29897, 13, 13, 1753, 289, 5847, 29898, 2371, 29892, 1591, 29918, 1949, 29892, 2069, 29892, 921, 29892, 343, 1125, 13, 1678, 302, 353, 7431, 29898, 2371, 29897, 13, 1678, 9521, 353, 316, 802, 580, 13, 1678, 9521, 29889, 4397, 3552, 29916, 29892, 343, 876, 13, 1678, 1591, 29961, 29916, 3816, 29891, 29962, 353, 1591, 29918, 1949, 13, 1678, 13128, 29918, 2084, 353, 518, 29916, 29892, 343, 29962, 13, 1678, 16669, 353, 5519, 29900, 363, 903, 297, 3464, 29898, 29876, 4638, 363, 903, 297, 3464, 29898, 29876, 4638, 13, 268, 13, 1678, 565, 2069, 1275, 7700, 29901, 13, 4706, 16669, 29961, 29916, 3816, 29891, 29962, 353, 29871, 29896, 13, 268, 13, 1678, 1550, 9521, 29901, 13, 4706, 921, 29892, 343, 353, 9521, 29889, 7323, 1563, 580, 13, 308, 13, 4706, 363, 15414, 29892, 13475, 297, 4516, 29879, 29901, 13, 9651, 302, 29916, 29892, 7098, 353, 921, 718, 15414, 29892, 343, 718, 13475, 13, 632, 13, 9651, 565, 451, 313, 29900, 5277, 302, 29916, 529, 302, 322, 29871, 29900, 5277, 7098, 529, 302, 1125, 13, 18884, 6773, 13, 632, 13, 9651, 565, 2069, 1275, 5852, 322, 1591, 29961, 23818, 3816, 1460, 29962, 1275, 29871, 29896, 29901, 13, 18884, 9521, 29889, 4397, 3552, 23818, 29892, 7098, 876, 13, 18884, 1591, 29961, 23818, 3816, 1460, 29962, 353, 1591, 29918, 1949, 13, 18884, 13128, 29918, 2084, 29889, 21843, 3552, 23818, 29892, 7098, 876, 13, 462, 13, 9651, 565, 2069, 1275, 7700, 322, 16669, 29961, 23818, 3816, 1460, 29962, 2804, 29871, 29896, 322, 1591, 29961, 23818, 3816, 1460, 29962, 1275, 1591, 29918, 1949, 29901, 13, 18884, 9521, 29889, 4397, 3552, 23818, 29892, 7098, 876, 13, 18884, 16669, 29961, 23818, 3816, 1460, 29962, 353, 29871, 29896, 13, 18884, 13128, 29918, 2084, 29889, 21843, 3552, 23818, 29892, 7098, 876, 13, 462, 268, 13, 1678, 1591, 29918, 1949, 29918, 8977, 29961, 2371, 29918, 1949, 1822, 4397, 29898, 7050, 29918, 2084, 29897, 13, 13, 268, 13, 1753, 7613, 29918, 1635, 29879, 29898, 3377, 29892, 7613, 29918, 1949, 29892, 921, 29892, 343, 1125, 13, 1678, 3855, 353, 316, 802, 580, 13, 1678, 3855, 29889, 4397, 4197, 29916, 29892, 29891, 2314, 13, 1678, 7613, 29961, 29916, 3816, 29891, 29962, 353, 7613, 29918, 1949, 13, 1678, 13128, 29918, 2084, 353, 518, 29916, 29892, 29891, 29962, 13, 268, 13, 1678, 1550, 3855, 29901, 13, 4706, 1286, 29918, 29916, 29892, 1286, 29918, 29891, 353, 3855, 29889, 7323, 1563, 580, 13, 308, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 29916, 29918, 11631, 22164, 13, 9651, 2446, 29918, 29916, 29892, 2446, 29918, 29891, 353, 1286, 29918, 29916, 29974, 29916, 29918, 11631, 29961, 29875, 1402, 1286, 29918, 29891, 29974, 29891, 29918, 11631, 29961, 29875, 29962, 13, 9651, 565, 29871, 29900, 5277, 2446, 29918, 29916, 529, 7431, 29898, 3377, 29897, 322, 29871, 29900, 5277, 2446, 29918, 29891, 529, 7431, 29898, 3377, 1125, 13, 18884, 565, 7613, 29961, 4622, 29918, 29916, 3816, 4622, 29918, 29891, 29962, 1275, 29871, 29900, 29901, 13, 462, 1678, 3855, 29889, 4397, 4197, 4622, 29918, 29916, 29892, 2446, 29918, 29891, 2314, 13, 462, 1678, 7613, 29961, 4622, 29918, 29916, 3816, 4622, 29918, 29891, 29962, 353, 7613, 29918, 1949, 13, 462, 1678, 13128, 29918, 2084, 29889, 21843, 4197, 4622, 29918, 29916, 29892, 2446, 29918, 29891, 2314, 13, 462, 268, 13, 1678, 7613, 29918, 1949, 29918, 8977, 29961, 3377, 29918, 1949, 1822, 4397, 29898, 7050, 29918, 2084, 29897, 13, 13, 13, 1753, 1591, 29918, 23361, 29898, 2371, 1125, 13, 1678, 13128, 29918, 2371, 353, 5519, 29900, 363, 343, 297, 3464, 29898, 2435, 29898, 2371, 28166, 363, 921, 297, 3464, 29898, 2435, 29898, 2371, 28166, 13, 1678, 363, 921, 297, 3464, 29898, 2435, 29898, 7050, 29918, 2371, 22164, 13, 9651, 363, 343, 297, 3464, 29898, 2435, 29898, 7050, 29918, 2371, 22164, 13, 18884, 13128, 29918, 2371, 29961, 29891, 3816, 2435, 29898, 2371, 6817, 29896, 29899, 29916, 29962, 353, 1591, 29961, 29916, 3816, 29891, 29962, 13, 1678, 736, 13128, 29918, 2371, 13, 13, 13, 1753, 1650, 29898, 11802, 29918, 3377, 29892, 1591, 1125, 13, 1678, 1234, 353, 29871, 29900, 13, 268, 13, 1678, 396, 2371, 954, 29871, 29906, 31279, 31856, 13, 1678, 1591, 29918, 1949, 353, 29871, 29906, 13, 1678, 363, 921, 297, 3464, 29898, 2435, 29898, 2371, 22164, 13, 4706, 363, 343, 297, 3464, 29898, 2435, 29898, 2371, 22164, 13, 9651, 565, 1591, 29961, 29916, 3816, 29891, 29962, 1275, 29871, 29896, 29901, 13, 18884, 289, 5847, 29898, 2371, 29892, 1591, 29918, 1949, 29892, 5852, 29892, 921, 29892, 343, 29897, 13, 18884, 1591, 29918, 1949, 4619, 29871, 29896, 13, 268, 13, 1678, 396, 29871, 29941, 238, 181, 139, 29871, 238, 146, 143, 238, 169, 191, 13, 1678, 363, 474, 297, 3464, 29898, 29941, 1125, 29871, 13, 4706, 1591, 353, 1591, 29918, 23361, 29898, 2371, 29897, 13, 4706, 1591, 29918, 1949, 29918, 1730, 1573, 353, 5159, 13, 4706, 363, 921, 297, 3464, 29898, 2435, 29898, 2371, 22164, 13, 9651, 363, 343, 297, 3464, 29898, 2435, 29898, 2371, 22164, 13, 18884, 565, 1591, 29961, 29916, 3816, 29891, 29962, 6736, 29871, 29906, 322, 1591, 29961, 29916, 3816, 29891, 29962, 451, 297, 1591, 29918, 1949, 29918, 1730, 1573, 29901, 13, 462, 1678, 1591, 29918, 1949, 353, 1591, 29961, 29916, 3816, 29891, 29962, 13, 462, 1678, 1591, 29918, 1949, 29918, 1730, 1573, 29889, 4397, 29898, 2371, 29918, 1949, 29897, 13, 462, 1678, 289, 5847, 29898, 2371, 29892, 1591, 29918, 1949, 29892, 7700, 29892, 921, 29892, 343, 29897, 13, 462, 268, 13, 1678, 396, 3377, 13, 1678, 7613, 29918, 1949, 353, 29871, 29906, 13, 1678, 363, 921, 297, 3464, 29898, 2435, 29898, 11802, 29918, 3377, 22164, 13, 4706, 363, 343, 297, 3464, 29898, 2435, 29898, 11802, 29918, 3377, 22164, 13, 9651, 565, 3748, 29918, 3377, 29961, 29916, 3816, 29891, 29962, 1275, 29871, 29900, 29901, 13, 18884, 7613, 29918, 1635, 29879, 29898, 11802, 29918, 3377, 29892, 7613, 29918, 1949, 29892, 921, 29892, 343, 29897, 13, 18884, 7613, 29918, 1949, 4619, 29871, 29896, 29871, 13, 268, 13, 1678, 1591, 29918, 1949, 29918, 1730, 1573, 353, 5159, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 3377, 29918, 1949, 29918, 8977, 22164, 13, 4706, 7613, 29918, 21058, 353, 7613, 29918, 1949, 29918, 8977, 29961, 29875, 29974, 29906, 3816, 29900, 29962, 13, 4706, 1284, 29918, 12011, 353, 7700, 13, 4706, 363, 432, 297, 3464, 29898, 2435, 29898, 2371, 29918, 1949, 29918, 8977, 22164, 13, 9651, 565, 313, 29926, 29974, 29906, 29897, 297, 1591, 29918, 1949, 29918, 1730, 1573, 29901, 13, 18884, 6773, 13, 9651, 565, 1284, 29918, 12011, 1275, 5852, 29901, 13, 18884, 2867, 13, 9651, 363, 413, 297, 3464, 29898, 29946, 1125, 13, 18884, 1591, 29918, 21058, 353, 1591, 29918, 1949, 29918, 8977, 29961, 29926, 29974, 29906, 3816, 29895, 29962, 268, 13, 18884, 565, 7431, 29898, 3377, 29918, 21058, 29897, 2804, 7431, 29898, 2371, 29918, 21058, 1125, 13, 462, 1678, 2867, 13, 18884, 565, 7431, 29898, 3377, 29918, 21058, 29897, 1275, 29871, 29896, 322, 7431, 29898, 2371, 29918, 21058, 29897, 1275, 29871, 29896, 29901, 13, 462, 1678, 1234, 4619, 29871, 29896, 13, 462, 1678, 1284, 29918, 12011, 353, 5852, 13, 462, 1678, 1591, 29918, 1949, 29918, 1730, 1573, 29889, 4397, 29898, 29926, 29974, 29906, 29897, 13, 462, 1678, 2867, 13, 462, 13, 18884, 274, 1526, 29918, 1266, 353, 5852, 13, 18884, 274, 1526, 29918, 4102, 29892, 274, 1526, 29918, 7496, 353, 7613, 29918, 21058, 29961, 29900, 29962, 29899, 2371, 29918, 21058, 29961, 29900, 1402, 7613, 29918, 21058, 29961, 29896, 29962, 29899, 2371, 29918, 21058, 29961, 29896, 29962, 13, 18884, 363, 301, 297, 3464, 29898, 29906, 29892, 7431, 29898, 3377, 29918, 21058, 22164, 13, 462, 1678, 565, 301, 29995, 29906, 1275, 29871, 29900, 322, 7613, 29918, 21058, 29961, 29880, 29962, 29899, 2371, 29918, 21058, 29961, 29880, 29962, 2804, 274, 1526, 29918, 4102, 29901, 13, 462, 4706, 274, 1526, 29918, 1266, 353, 7700, 13, 462, 4706, 2867, 13, 462, 1678, 565, 301, 29995, 29906, 1275, 29871, 29896, 322, 7613, 29918, 21058, 29961, 29880, 29962, 29899, 2371, 29918, 21058, 29961, 29880, 29962, 2804, 274, 1526, 29918, 7496, 29901, 13, 462, 4706, 274, 1526, 29918, 1266, 353, 7700, 13, 462, 4706, 2867, 13, 462, 13, 18884, 565, 274, 1526, 29918, 1266, 1275, 5852, 29901, 13, 462, 1678, 1234, 4619, 7431, 29898, 2371, 29918, 21058, 29897, 458, 29906, 13, 462, 1678, 1284, 29918, 12011, 353, 5852, 13, 462, 1678, 1591, 29918, 1949, 29918, 1730, 1573, 29889, 4397, 29898, 29926, 29974, 29906, 29897, 13, 462, 1678, 2867, 13, 632, 13, 1678, 736, 1234, 2 ]
scripts/utils.py
carbonplan/cdr-database
13
1611579
<filename>scripts/utils.py import pathlib import gspread from oauth2client.service_account import ServiceAccountCredentials from pandas import DataFrame, MultiIndex SECRET_FILE = pathlib.Path(__file__).parents[1] / 'secrets/google-sheets-key.json' def ffill(data): """ helper function to forward fill column labels """ last = data[0] new = [] for line in data: if line: new.append(line) last = line else: new.append(last) return new def get_sheet(sheet, doc): """ helper function to open a specific google sheet """ scope = ["https://spreadsheets.google.com/feeds", "https://www.googleapis.com/auth/drive"] credentials = ServiceAccountCredentials.from_json_keyfile_name(SECRET_FILE, scope) gc = gspread.authorize(credentials) wks = gc.open(doc) sheet = wks.worksheet(sheet) data = sheet.get_all_values() h1 = ffill(data[0]) # remove extra whitespace h1 = [k.strip() for k in h1] h2 = [k.strip() for k in data[1]] # create a multiindex columns = MultiIndex.from_tuples(zip(h1, h2)) # populate the dataframe df = DataFrame(data[2:], columns=columns) return df def make_project(id): """ return a template project """ return { "type": "Project", "metrics": [], "tags": [], "id": id, "description": "", "applicant": "", } def make_metric(name): """ return a template metric """ return { "type": "Metric", "name": name, "value": "", "units": "", "rating": "", "notes": "", "comment": "", } def maybe_float(value): new = value.replace("$", "").replace(",", "") try: return float(new) except Exception: return value.strip()
[ 1, 529, 9507, 29958, 16713, 29914, 13239, 29889, 2272, 13, 5215, 2224, 1982, 13, 13, 5215, 330, 1028, 949, 13, 3166, 288, 5150, 29906, 4645, 29889, 5509, 29918, 10149, 1053, 6692, 10601, 28037, 13, 3166, 11701, 1053, 3630, 4308, 29892, 14974, 3220, 13, 13, 1660, 22245, 29911, 29918, 7724, 353, 2224, 1982, 29889, 2605, 22168, 1445, 1649, 467, 862, 1237, 29961, 29896, 29962, 847, 525, 344, 1037, 1372, 29914, 3608, 29899, 19360, 29899, 1989, 29889, 3126, 29915, 13, 13, 13, 1753, 285, 5589, 29898, 1272, 1125, 13, 1678, 9995, 13, 1678, 16876, 740, 304, 6375, 5445, 1897, 11073, 13, 1678, 9995, 13, 1678, 1833, 353, 848, 29961, 29900, 29962, 13, 1678, 716, 353, 5159, 13, 1678, 363, 1196, 297, 848, 29901, 13, 4706, 565, 1196, 29901, 13, 9651, 716, 29889, 4397, 29898, 1220, 29897, 13, 9651, 1833, 353, 1196, 13, 4706, 1683, 29901, 13, 9651, 716, 29889, 4397, 29898, 4230, 29897, 13, 1678, 736, 716, 13, 13, 13, 1753, 679, 29918, 9855, 29898, 9855, 29892, 1574, 1125, 13, 1678, 9995, 13, 1678, 16876, 740, 304, 1722, 263, 2702, 5386, 9869, 13, 1678, 9995, 13, 1678, 6874, 353, 6796, 991, 597, 1028, 949, 19360, 29889, 3608, 29889, 510, 29914, 1725, 5779, 613, 376, 991, 597, 1636, 29889, 15947, 29889, 510, 29914, 5150, 29914, 21594, 3108, 13, 13, 1678, 16140, 353, 6692, 10601, 28037, 29889, 3166, 29918, 3126, 29918, 1989, 1445, 29918, 978, 29898, 1660, 22245, 29911, 29918, 7724, 29892, 6874, 29897, 13, 13, 1678, 330, 29883, 353, 330, 1028, 949, 29889, 8921, 675, 29898, 11944, 9409, 29897, 13, 1678, 281, 2039, 353, 330, 29883, 29889, 3150, 29898, 1514, 29897, 13, 1678, 9869, 353, 281, 2039, 29889, 1287, 9855, 29898, 9855, 29897, 13, 1678, 848, 353, 9869, 29889, 657, 29918, 497, 29918, 5975, 580, 13, 1678, 298, 29896, 353, 285, 5589, 29898, 1272, 29961, 29900, 2314, 13, 13, 1678, 396, 3349, 4805, 24358, 13, 1678, 298, 29896, 353, 518, 29895, 29889, 17010, 580, 363, 413, 297, 298, 29896, 29962, 13, 1678, 298, 29906, 353, 518, 29895, 29889, 17010, 580, 363, 413, 297, 848, 29961, 29896, 5262, 13, 13, 1678, 396, 1653, 263, 2473, 2248, 13, 1678, 4341, 353, 14974, 3220, 29889, 3166, 29918, 9161, 2701, 29898, 7554, 29898, 29882, 29896, 29892, 298, 29906, 876, 13, 13, 1678, 396, 19450, 278, 12205, 13, 1678, 4489, 353, 3630, 4308, 29898, 1272, 29961, 29906, 29901, 1402, 4341, 29922, 13099, 29897, 13, 1678, 736, 4489, 13, 13, 13, 1753, 1207, 29918, 4836, 29898, 333, 1125, 13, 1678, 9995, 13, 1678, 736, 263, 4472, 2060, 13, 1678, 9995, 13, 1678, 736, 426, 13, 4706, 376, 1853, 1115, 376, 7653, 613, 13, 4706, 376, 2527, 10817, 1115, 19997, 13, 4706, 376, 11338, 1115, 19997, 13, 4706, 376, 333, 1115, 1178, 29892, 13, 4706, 376, 8216, 1115, 12633, 13, 4706, 376, 932, 506, 424, 1115, 12633, 13, 1678, 500, 13, 13, 13, 1753, 1207, 29918, 16414, 29898, 978, 1125, 13, 1678, 9995, 13, 1678, 736, 263, 4472, 12714, 13, 1678, 9995, 13, 1678, 736, 426, 13, 4706, 376, 1853, 1115, 376, 10095, 2200, 613, 13, 4706, 376, 978, 1115, 1024, 29892, 13, 4706, 376, 1767, 1115, 12633, 13, 4706, 376, 348, 1169, 1115, 12633, 13, 4706, 376, 29741, 1115, 12633, 13, 4706, 376, 16953, 1115, 12633, 13, 4706, 376, 9342, 1115, 12633, 13, 1678, 500, 13, 13, 13, 1753, 5505, 29918, 7411, 29898, 1767, 1125, 13, 1678, 716, 353, 995, 29889, 6506, 703, 29938, 613, 376, 2564, 6506, 28165, 613, 20569, 13, 1678, 1018, 29901, 13, 4706, 736, 5785, 29898, 1482, 29897, 13, 1678, 5174, 8960, 29901, 13, 4706, 736, 995, 29889, 17010, 580, 13, 2 ]
src/chia_log/log_handler.py
Connor-Knabe/chiadog
503
69749
<gh_stars>100-1000 # std from typing import Optional # project from src.chia_log.handlers.daily_stats.stats_manager import StatsManager from src.chia_log.handlers.harvester_activity_handler import HarvesterActivityHandler from src.chia_log.handlers.partial_handler import PartialHandler from src.chia_log.handlers.block_handler import BlockHandler from src.chia_log.handlers.finished_signage_point_handler import FinishedSignagePointHandler from src.chia_log.handlers.wallet_added_coin_handler import WalletAddedCoinHandler from src.chia_log.log_consumer import LogConsumerSubscriber, LogConsumer from src.notifier.notify_manager import NotifyManager class LogHandler(LogConsumerSubscriber): """This class holds a list of handlers that analyze specific parts of the logs and generate events that are consumed by the notifier (for user notifications). Data flow: LogConsumer -> LogHandler -> Notifier Three easy steps to extend monitoring functionality 1. Create a parser for a new part of the log stream 2. Create a handler for analysing the parsed information 3. Add the new handler to the list of handlers below """ def __init__( self, log_consumer: LogConsumer, notify_manager: NotifyManager, stats_manager: Optional[StatsManager] = None ): self._notify_manager = notify_manager self._stats_manager = stats_manager self._handlers = [ HarvesterActivityHandler(), PartialHandler(), BlockHandler(), FinishedSignagePointHandler(), WalletAddedCoinHandler(), ] log_consumer.subscribe(self) def consume_logs(self, logs: str): for handler in self._handlers: events = handler.handle(logs, self._stats_manager) self._notify_manager.process_events(events)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29899, 29896, 29900, 29900, 29900, 13, 29937, 3659, 13, 3166, 19229, 1053, 28379, 13, 13, 29937, 2060, 13, 3166, 4765, 29889, 20508, 29918, 1188, 29889, 3179, 9306, 29889, 29881, 8683, 29918, 16202, 29889, 16202, 29918, 12847, 1053, 624, 1446, 3260, 13, 3166, 4765, 29889, 20508, 29918, 1188, 29889, 3179, 9306, 29889, 8222, 29894, 4156, 29918, 10072, 29918, 13789, 1053, 3536, 29894, 4156, 3886, 4598, 13, 3166, 4765, 29889, 20508, 29918, 1188, 29889, 3179, 9306, 29889, 3846, 29918, 13789, 1053, 3455, 616, 4598, 13, 3166, 4765, 29889, 20508, 29918, 1188, 29889, 3179, 9306, 29889, 1271, 29918, 13789, 1053, 15658, 4598, 13, 3166, 4765, 29889, 20508, 29918, 1188, 29889, 3179, 9306, 29889, 4951, 3276, 29918, 4530, 482, 29918, 3149, 29918, 13789, 1053, 4231, 3276, 10140, 482, 5228, 4598, 13, 3166, 4765, 29889, 20508, 29918, 1188, 29889, 3179, 9306, 29889, 14625, 1026, 29918, 23959, 29918, 1111, 262, 29918, 13789, 1053, 5260, 1026, 2528, 287, 7967, 262, 4598, 13, 3166, 4765, 29889, 20508, 29918, 1188, 29889, 1188, 29918, 25978, 261, 1053, 4522, 13696, 4680, 4035, 7588, 495, 29892, 4522, 13696, 4680, 13, 3166, 4765, 29889, 1333, 3709, 29889, 25140, 29918, 12847, 1053, 2216, 1598, 3260, 13, 13, 13, 1990, 4522, 4598, 29898, 3403, 13696, 4680, 4035, 7588, 495, 1125, 13, 1678, 9995, 4013, 770, 8640, 263, 1051, 310, 25795, 393, 27599, 13, 1678, 2702, 5633, 310, 278, 10748, 322, 5706, 4959, 393, 13, 1678, 526, 11233, 287, 491, 278, 451, 3709, 313, 1454, 1404, 25913, 467, 13, 13, 1678, 3630, 4972, 29901, 13, 4706, 4522, 13696, 4680, 1599, 4522, 4598, 1599, 2216, 3709, 13, 13, 1678, 12753, 4780, 6576, 304, 10985, 29652, 9863, 13, 268, 29896, 29889, 6204, 263, 13812, 363, 263, 716, 760, 310, 278, 1480, 4840, 13, 268, 29906, 29889, 6204, 263, 7834, 363, 3483, 952, 292, 278, 21213, 2472, 13, 268, 29941, 29889, 3462, 278, 716, 7834, 304, 278, 1051, 310, 25795, 2400, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 13, 4706, 1583, 29892, 1480, 29918, 25978, 261, 29901, 4522, 13696, 4680, 29892, 26051, 29918, 12847, 29901, 2216, 1598, 3260, 29892, 22663, 29918, 12847, 29901, 28379, 29961, 25060, 3260, 29962, 353, 6213, 13, 268, 1125, 13, 4706, 1583, 3032, 25140, 29918, 12847, 353, 26051, 29918, 12847, 13, 4706, 1583, 3032, 16202, 29918, 12847, 353, 22663, 29918, 12847, 13, 4706, 1583, 3032, 3179, 9306, 353, 518, 13, 9651, 3536, 29894, 4156, 3886, 4598, 3285, 13, 9651, 3455, 616, 4598, 3285, 13, 9651, 15658, 4598, 3285, 13, 9651, 4231, 3276, 10140, 482, 5228, 4598, 3285, 13, 9651, 5260, 1026, 2528, 287, 7967, 262, 4598, 3285, 13, 4706, 4514, 13, 4706, 1480, 29918, 25978, 261, 29889, 19496, 29898, 1311, 29897, 13, 13, 1678, 822, 29151, 29918, 20756, 29898, 1311, 29892, 10748, 29901, 851, 1125, 13, 4706, 363, 7834, 297, 1583, 3032, 3179, 9306, 29901, 13, 9651, 4959, 353, 7834, 29889, 8411, 29898, 20756, 29892, 1583, 3032, 16202, 29918, 12847, 29897, 13, 9651, 1583, 3032, 25140, 29918, 12847, 29889, 5014, 29918, 13604, 29898, 13604, 29897, 13, 2 ]
utils/perm_utils.py
IBM/NeuronAlignment
3
36449
<filename>utils/perm_utils.py import torch import numpy as np def train_perm_orth(train_loader, model, optimizer, scheduler, criterion, regularizer=None, rho=1E-4, delta=0.5, nu=1E-2, eps=1E-3, tau=1E-2, lagrange_pen=1E-2, perm_flag=True, t_step=40): if perm_flag: tau_min = 1E-24 tau_max = 1E-1 c = None lam_lm = [] for p in optimizer.param_groups[0]['params']: lam_lm.append(torch.zeros_like(p)) k_iter = 0 ts = torch.empty(len(train_loader), device=model.device).uniform_(0.0, 1.0) with torch.no_grad(): for p in optimizer.param_groups[0]['params']: p.data = torch.rand_like(p.data) p.data, _, _ = torch.svd(p.data) input_cml = [] target_cml = [] t_cml = [] inner_iter = 0 loss = 0.0 loss_obj = 0.0 for iter, (input, target) in enumerate(train_loader): t = ts[iter] input = input.to(model.device, non_blocking=False) target = target.to(model.device, non_blocking=False) output = model(input, perm_train=True, t=t) input_all = input target_all = target new_loss = criterion(output, target_all) loss_obj += new_loss # This part is for the augmented Lagrangian method int_pen = integer_penalty(optimizer.param_groups[0]['params'], lam_lm, lagrange_pen) loss += new_loss + int_pen inner_iter += 1 input_cml.append(input.clone()) target_cml.append(target.clone()) t_cml.append(t.clone()) if inner_iter % t_step == 0: optimizer.zero_grad() loss.backward() grad_norm = 0.0 violator = 0.0 for p in optimizer.param_groups[0]['params']: param_norm = p.grad.data.norm(2) grad_norm += param_norm.item() ** 2 violator += torch.sum((torch.matmul(p.data.t(), p.data) - torch.eye(p.data.shape[0], device=p.device)) ** 2) grad_norm = grad_norm ** (1. / 2) if c is None: c = loss.clone().item() q_opt = 1 loss_inner = loss.clone() print('Iteration: %03d, Loss %.2E, Objective %.2E, Negative Penalty: %.2E,' 'Grad Norm: %.2E, Ortho Violation: %.2E, tau: %.2E' % (k_iter, loss_inner.item(), loss_obj.item(), int_pen.item(), grad_norm, violator.item(), tau)) # Compute F for defining Y function F_list = [] with torch.no_grad(): for p in optimizer.param_groups[0]['params']: f = torch.matmul(p.grad.data, p.t().data) - torch.matmul(p.data, p.grad.t().data) F_list.append(f) # Store old parameters params_old = [None] * len(optimizer.param_groups[0]['params']) for idx, param in enumerate(optimizer.param_groups[0]['params']): params_old[idx] = param.clone() grads_old = [p.grad.data.clone() for p in optimizer.param_groups[0]['params']] # Compute the values of Y(tau) and Y'(tau), store them into the model Y_t, Y_ft_prime = compute_ytau(tau, F_list, optimizer.param_groups[0]['params']) for p, y_t in zip(optimizer.param_groups[0]['params'], Y_t): p.data = y_t.clone() loss_inner = 0.0 for t_2, input_2, target_2 in zip(t_cml, input_cml, target_cml): output = model(input_2, perm_train=True, t=t_2) loss_inner += criterion(output, target_2) int_pen = integer_penalty(optimizer.param_groups[0]['params'], lam_lm, lagrange_pen) loss_inner += int_pen optimizer.zero_grad() loss_inner.backward() grads_new = [p.grad.data.clone() for p in optimizer.param_groups[0]['params']] with torch.no_grad(): dF_dt = 0.0 for g_new, y_ft_p in zip(grads_new, Y_ft_prime): df = g_new * (y_ft_p / torch.norm(y_ft_p.data)) df = torch.sum(df) dF_dt += df.item() threshold_flag = True k_inner = 0 while threshold_flag: with torch.no_grad(): threshold = c + rho * tau * dF_dt if loss_inner.item() >= threshold: # Compute Y for smaller value of tau with torch.no_grad(): tau *= delta Y_t, Y_ft_prime = compute_ytau(tau, F_list, optimizer.param_groups[0]['params']) for p, y_t in zip(optimizer.param_groups[0]['params'], Y_t): p.data = y_t.clone() loss_old = loss_inner.clone() loss_inner = 0.0 for t_2, input_2, target_2 in zip(t_cml, input_cml, target_cml): output = model(input_2, perm_train=True, t=t_2) loss_inner += criterion(output, target_2) int_pen = integer_penalty(optimizer.param_groups[0]['params'], lam_lm, lagrange_pen) loss_inner += int_pen optimizer.zero_grad() loss_inner.backward() grads_new = [p.grad.data.clone() for p in optimizer.param_groups[0]['params']] k_inner += 1 if (loss_inner.item() - loss_old.item()) / (1 + loss_old.item()) < 1E-5: threshold_flag = False else: threshold_flag = False with torch.no_grad(): c = (nu * q_opt * c + loss_inner.item()) q_opt = nu * q_opt + 1 c = c / q_opt bb_num = 0.0 bb_denom = 0.0 yy_sum = 0.0 for p_old, g_old, p_new, g_new in zip(params_old, grads_old, optimizer.param_groups[0]['params'], grads_new): s_bb = p_new - p_old y_bb = g_new - g_old bb_num += torch.sum(s_bb ** 2) bb_denom += torch.sum(s_bb * y_bb) yy_sum += torch.sum(y_bb ** 2) tau_bb = bb_num / torch.abs(bb_denom) tau_bb = tau_bb.item() tau_bb2 = torch.abs(bb_denom) / yy_sum tau_bb2 = tau_bb2.item() tau_bb = np.minimum(tau_bb, tau_bb2) tau = np.minimum(tau_bb, tau_max) tau = np.maximum(tau, tau_min) lam_lm, lagrange_pen = integer_penalty_update(optimizer.param_groups[0]['params'], lam_lm, lagrange_pen) loss_inner = 0.0 for t_2, input_2, target_2 in zip(t_cml, input_cml, target_cml): output = model(input_2, perm_train=True, t=t_2) loss_obj = criterion(output, target_2) int_pen = integer_penalty(optimizer.param_groups[0]['params'], lam_lm, lagrange_pen) loss_inner += loss_obj + int_pen optimizer.zero_grad() loss_inner.backward() grads_new = [p.grad.data.clone() for p in optimizer.param_groups[0]['params']] grad_norm = 0.0 for g_new in grads_new: gn = g_new.norm(2) grad_norm += gn.item() ** 2 grad_norm = grad_norm ** (1. / 2) k_iter += 1 input_cml = [] target_cml = [] t_cml = [] loss = 0.0 loss_obj = 0.0 model.train() loss_sum = 0.0 correct = 0.0 change_P = np.nan params_before = [None] * len(optimizer.param_groups[0]['params']) if nu is not None: for idx, param in enumerate(optimizer.param_groups[0]['params']): params_before[idx] = param.clone().detach() optimizer.step() lr = scheduler.get_lr()[0] with torch.no_grad(): for param, param_o in zip(optimizer.param_groups[0]['params'], params_old): param.data = 1 / (1 + lr / nu) * (param + lr / nu * param_o) output = model(input_all, perm_train=True) loss = criterion(output, target_all) if regularizer is not None: loss += regularizer(model) loss_sum += loss.item() * input.size(0) pred = output.data.argmax(1, keepdim=True) correct += pred.eq(target_all.data.view_as(pred)).sum().item() return { 'loss': loss_sum / len(train_loader.dataset), 'accuracy': correct * 100.0 / len(train_loader.dataset), 'change_perm': change_P } def hard_int_penalty(p_list, pen=1E1): pen_loss = 0.0 for p in p_list: p_mask = p.data * (p.data <= 0) pen_loss += pen * torch.sum(p_mask ** 2) return pen_loss def integer_penalty(p_list, lam_list, mu): pen_loss = 0.0 for p, lam in zip(p_list, lam_list): mask = (p - lam / mu) <= 0 mask_alt = (p - lam / mu) > 0 p_l = torch.sum((- lam * p + 0.5 * mu * (p ** 2)) * mask) p_l += torch.sum((-1/(2 * mu) * lam ** 2) * mask_alt) pen_loss += p_l return pen_loss def integer_penalty_update(p_list, lam_list, mu): new_lam_list = [] with torch.no_grad(): for p, lam in zip(p_list, lam_list): upd = lam - mu * p new_lam_list.append(upd * (upd > 0)) new_mu = mu * 1.01 return new_lam_list, new_mu def compute_ytau(tau, f_list, p_list): y_tau = [] y_tau_prime = [] for p, f in zip(p_list, f_list): eye = torch.eye(f.shape[0], device=f.device) qmat_inv = torch.inverse(eye + tau / 2 * f) y_ft = torch.matmul(qmat_inv, eye - tau / 2 * f) y_ft = torch.matmul(y_ft, p) y_ft_prime = - torch.matmul(qmat_inv, f) y_ft_prime = torch.matmul(y_ft_prime, (p + y_ft) / 2) y_tau.append(y_ft.clone()) y_tau_prime.append(y_ft_prime.clone()) return y_tau, y_tau_prime
[ 1, 529, 9507, 29958, 13239, 29914, 17858, 29918, 13239, 29889, 2272, 13, 5215, 4842, 305, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 7945, 29918, 17858, 29918, 2072, 29898, 14968, 29918, 12657, 29892, 1904, 29892, 5994, 3950, 29892, 1364, 14952, 29892, 28770, 291, 29892, 4943, 3950, 29922, 8516, 29892, 364, 1251, 29922, 29896, 29923, 29899, 29946, 29892, 19471, 29922, 29900, 29889, 29945, 29892, 13, 462, 1678, 4948, 29922, 29896, 29923, 29899, 29906, 29892, 321, 567, 29922, 29896, 29923, 29899, 29941, 29892, 260, 585, 29922, 29896, 29923, 29899, 29906, 29892, 11755, 3881, 29918, 2238, 29922, 29896, 29923, 29899, 29906, 29892, 3635, 29918, 15581, 29922, 5574, 29892, 260, 29918, 10568, 29922, 29946, 29900, 1125, 13, 1678, 565, 3635, 29918, 15581, 29901, 13, 4706, 260, 585, 29918, 1195, 353, 29871, 29896, 29923, 29899, 29906, 29946, 13, 4706, 260, 585, 29918, 3317, 353, 29871, 29896, 29923, 29899, 29896, 13, 4706, 274, 353, 6213, 13, 4706, 301, 314, 29918, 21457, 353, 5159, 13, 4706, 363, 282, 297, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 29901, 13, 9651, 301, 314, 29918, 21457, 29889, 4397, 29898, 7345, 305, 29889, 3298, 359, 29918, 4561, 29898, 29886, 876, 13, 13, 4706, 413, 29918, 1524, 353, 29871, 29900, 13, 4706, 18696, 353, 4842, 305, 29889, 6310, 29898, 2435, 29898, 14968, 29918, 12657, 511, 4742, 29922, 4299, 29889, 10141, 467, 29590, 23538, 29900, 29889, 29900, 29892, 29871, 29896, 29889, 29900, 29897, 13, 4706, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 9651, 363, 282, 297, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 29901, 13, 18884, 282, 29889, 1272, 353, 4842, 305, 29889, 9502, 29918, 4561, 29898, 29886, 29889, 1272, 29897, 13, 18884, 282, 29889, 1272, 29892, 17117, 903, 353, 4842, 305, 29889, 4501, 29881, 29898, 29886, 29889, 1272, 29897, 13, 4706, 1881, 29918, 29883, 828, 353, 5159, 13, 4706, 3646, 29918, 29883, 828, 353, 5159, 13, 4706, 260, 29918, 29883, 828, 353, 5159, 13, 4706, 6426, 29918, 1524, 353, 29871, 29900, 13, 4706, 6410, 353, 29871, 29900, 29889, 29900, 13, 4706, 6410, 29918, 5415, 353, 29871, 29900, 29889, 29900, 13, 4706, 363, 4256, 29892, 313, 2080, 29892, 3646, 29897, 297, 26985, 29898, 14968, 29918, 12657, 1125, 13, 9651, 260, 353, 18696, 29961, 1524, 29962, 13, 9651, 1881, 353, 1881, 29889, 517, 29898, 4299, 29889, 10141, 29892, 1661, 29918, 1271, 292, 29922, 8824, 29897, 13, 9651, 3646, 353, 3646, 29889, 517, 29898, 4299, 29889, 10141, 29892, 1661, 29918, 1271, 292, 29922, 8824, 29897, 13, 9651, 1962, 353, 1904, 29898, 2080, 29892, 3635, 29918, 14968, 29922, 5574, 29892, 260, 29922, 29873, 29897, 13, 9651, 1881, 29918, 497, 353, 1881, 13, 9651, 3646, 29918, 497, 353, 3646, 13, 13, 9651, 716, 29918, 6758, 353, 28770, 291, 29898, 4905, 29892, 3646, 29918, 497, 29897, 13, 9651, 6410, 29918, 5415, 4619, 716, 29918, 6758, 13, 13, 9651, 396, 29871, 910, 760, 338, 363, 278, 18765, 287, 365, 10312, 574, 713, 1158, 13, 9651, 938, 29918, 2238, 353, 6043, 29918, 2238, 18745, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 7464, 301, 314, 29918, 21457, 29892, 11755, 3881, 29918, 2238, 29897, 13, 13, 9651, 6410, 4619, 716, 29918, 6758, 718, 938, 29918, 2238, 13, 13, 9651, 6426, 29918, 1524, 4619, 29871, 29896, 13, 9651, 1881, 29918, 29883, 828, 29889, 4397, 29898, 2080, 29889, 16513, 3101, 13, 9651, 3646, 29918, 29883, 828, 29889, 4397, 29898, 5182, 29889, 16513, 3101, 13, 9651, 260, 29918, 29883, 828, 29889, 4397, 29898, 29873, 29889, 16513, 3101, 13, 9651, 565, 6426, 29918, 1524, 1273, 260, 29918, 10568, 1275, 29871, 29900, 29901, 13, 18884, 5994, 3950, 29889, 9171, 29918, 5105, 580, 13, 18884, 6410, 29889, 1627, 1328, 580, 13, 18884, 4656, 29918, 12324, 353, 29871, 29900, 29889, 29900, 13, 18884, 5537, 1061, 353, 29871, 29900, 29889, 29900, 13, 18884, 363, 282, 297, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 29901, 13, 462, 1678, 1828, 29918, 12324, 353, 282, 29889, 5105, 29889, 1272, 29889, 12324, 29898, 29906, 29897, 13, 462, 1678, 4656, 29918, 12324, 4619, 1828, 29918, 12324, 29889, 667, 580, 3579, 29871, 29906, 13, 462, 1678, 5537, 1061, 4619, 4842, 305, 29889, 2083, 3552, 7345, 305, 29889, 2922, 16109, 29898, 29886, 29889, 1272, 29889, 29873, 3285, 282, 29889, 1272, 29897, 448, 4842, 305, 29889, 1032, 29872, 29898, 29886, 29889, 1272, 29889, 12181, 29961, 29900, 1402, 13, 462, 462, 462, 462, 462, 4706, 4742, 29922, 29886, 29889, 10141, 876, 3579, 29871, 29906, 29897, 13, 18884, 4656, 29918, 12324, 353, 4656, 29918, 12324, 3579, 313, 29896, 29889, 847, 29871, 29906, 29897, 13, 13, 18884, 565, 274, 338, 6213, 29901, 13, 462, 1678, 274, 353, 6410, 29889, 16513, 2141, 667, 580, 13, 462, 1678, 3855, 29918, 3670, 353, 29871, 29896, 13, 18884, 6410, 29918, 3993, 353, 6410, 29889, 16513, 580, 13, 18884, 1596, 877, 13463, 362, 29901, 1273, 29900, 29941, 29881, 29892, 365, 2209, 18695, 29906, 29923, 29892, 4669, 573, 18695, 29906, 29923, 29892, 12610, 1230, 7363, 18745, 29901, 18695, 29906, 29923, 5501, 13, 462, 418, 525, 25584, 5655, 29901, 18695, 29906, 29923, 29892, 23757, 29877, 10630, 22671, 29901, 18695, 29906, 29923, 29892, 260, 585, 29901, 18695, 29906, 29923, 29915, 1273, 13, 462, 418, 313, 29895, 29918, 1524, 29892, 6410, 29918, 3993, 29889, 667, 3285, 6410, 29918, 5415, 29889, 667, 3285, 938, 29918, 2238, 29889, 667, 3285, 4656, 29918, 12324, 29892, 5537, 1061, 29889, 667, 3285, 260, 585, 876, 13, 18884, 396, 29871, 11796, 29872, 383, 363, 16184, 612, 740, 13, 18884, 383, 29918, 1761, 353, 5159, 13, 18884, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 462, 1678, 363, 282, 297, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 29901, 13, 462, 4706, 285, 353, 4842, 305, 29889, 2922, 16109, 29898, 29886, 29889, 5105, 29889, 1272, 29892, 282, 29889, 29873, 2141, 1272, 29897, 448, 4842, 305, 29889, 2922, 16109, 29898, 29886, 29889, 1272, 29892, 282, 29889, 5105, 29889, 29873, 2141, 1272, 29897, 13, 462, 4706, 383, 29918, 1761, 29889, 4397, 29898, 29888, 29897, 13, 462, 1678, 396, 29871, 14491, 2030, 4128, 13, 462, 1678, 8636, 29918, 1025, 353, 518, 8516, 29962, 334, 7431, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 11287, 13, 462, 1678, 363, 22645, 29892, 1828, 297, 26985, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 1125, 13, 462, 4706, 8636, 29918, 1025, 29961, 13140, 29962, 353, 1828, 29889, 16513, 580, 13, 462, 1678, 4656, 29879, 29918, 1025, 353, 518, 29886, 29889, 5105, 29889, 1272, 29889, 16513, 580, 363, 282, 297, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 29962, 13, 13, 462, 1678, 396, 29871, 11796, 29872, 278, 1819, 310, 612, 29898, 4722, 29897, 322, 612, 12215, 4722, 511, 3787, 963, 964, 278, 1904, 13, 462, 1678, 612, 29918, 29873, 29892, 612, 29918, 615, 29918, 10080, 353, 10272, 29918, 3637, 585, 29898, 4722, 29892, 383, 29918, 1761, 29892, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 11287, 13, 462, 1678, 363, 282, 29892, 343, 29918, 29873, 297, 14319, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 7464, 612, 29918, 29873, 1125, 13, 462, 4706, 282, 29889, 1272, 353, 343, 29918, 29873, 29889, 16513, 580, 13, 18884, 6410, 29918, 3993, 353, 29871, 29900, 29889, 29900, 13, 18884, 363, 260, 29918, 29906, 29892, 1881, 29918, 29906, 29892, 3646, 29918, 29906, 297, 14319, 29898, 29873, 29918, 29883, 828, 29892, 1881, 29918, 29883, 828, 29892, 3646, 29918, 29883, 828, 1125, 13, 462, 1678, 1962, 353, 1904, 29898, 2080, 29918, 29906, 29892, 3635, 29918, 14968, 29922, 5574, 29892, 260, 29922, 29873, 29918, 29906, 29897, 13, 13, 462, 1678, 6410, 29918, 3993, 4619, 28770, 291, 29898, 4905, 29892, 3646, 29918, 29906, 29897, 13, 462, 1678, 938, 29918, 2238, 353, 6043, 29918, 2238, 18745, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 7464, 301, 314, 29918, 21457, 29892, 11755, 3881, 29918, 2238, 29897, 13, 462, 1678, 6410, 29918, 3993, 4619, 938, 29918, 2238, 13, 13, 18884, 5994, 3950, 29889, 9171, 29918, 5105, 580, 13, 18884, 6410, 29918, 3993, 29889, 1627, 1328, 580, 13, 18884, 4656, 29879, 29918, 1482, 353, 518, 29886, 29889, 5105, 29889, 1272, 29889, 16513, 580, 363, 282, 297, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 29962, 13, 13, 18884, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 462, 1678, 270, 29943, 29918, 6008, 353, 29871, 29900, 29889, 29900, 13, 462, 1678, 363, 330, 29918, 1482, 29892, 343, 29918, 615, 29918, 29886, 297, 14319, 29898, 5105, 29879, 29918, 1482, 29892, 612, 29918, 615, 29918, 10080, 1125, 13, 462, 4706, 4489, 353, 330, 29918, 1482, 334, 313, 29891, 29918, 615, 29918, 29886, 847, 4842, 305, 29889, 12324, 29898, 29891, 29918, 615, 29918, 29886, 29889, 1272, 876, 13, 462, 4706, 4489, 353, 4842, 305, 29889, 2083, 29898, 2176, 29897, 13, 462, 4706, 270, 29943, 29918, 6008, 4619, 4489, 29889, 667, 580, 13, 13, 18884, 16897, 29918, 15581, 353, 5852, 13, 18884, 413, 29918, 3993, 353, 29871, 29900, 13, 18884, 1550, 16897, 29918, 15581, 29901, 13, 462, 1678, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 462, 4706, 16897, 353, 274, 718, 364, 1251, 334, 260, 585, 334, 270, 29943, 29918, 6008, 13, 462, 1678, 565, 6410, 29918, 3993, 29889, 667, 580, 6736, 16897, 29901, 13, 462, 4706, 396, 11796, 29872, 612, 363, 7968, 995, 310, 260, 585, 13, 462, 4706, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 462, 9651, 260, 585, 334, 29922, 19471, 13, 462, 9651, 612, 29918, 29873, 29892, 612, 29918, 615, 29918, 10080, 353, 10272, 29918, 3637, 585, 29898, 4722, 29892, 383, 29918, 1761, 29892, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 11287, 13, 462, 9651, 363, 282, 29892, 343, 29918, 29873, 297, 14319, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 7464, 612, 29918, 29873, 1125, 13, 462, 18884, 282, 29889, 1272, 353, 343, 29918, 29873, 29889, 16513, 580, 13, 13, 462, 4706, 6410, 29918, 1025, 353, 6410, 29918, 3993, 29889, 16513, 580, 13, 462, 4706, 6410, 29918, 3993, 353, 29871, 29900, 29889, 29900, 13, 462, 4706, 363, 260, 29918, 29906, 29892, 1881, 29918, 29906, 29892, 3646, 29918, 29906, 297, 14319, 29898, 29873, 29918, 29883, 828, 29892, 1881, 29918, 29883, 828, 29892, 3646, 29918, 29883, 828, 1125, 13, 462, 9651, 1962, 353, 1904, 29898, 2080, 29918, 29906, 29892, 3635, 29918, 14968, 29922, 5574, 29892, 260, 29922, 29873, 29918, 29906, 29897, 13, 462, 9651, 6410, 29918, 3993, 4619, 28770, 291, 29898, 4905, 29892, 3646, 29918, 29906, 29897, 13, 462, 9651, 938, 29918, 2238, 353, 6043, 29918, 2238, 18745, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 7464, 301, 314, 29918, 21457, 29892, 11755, 3881, 29918, 2238, 29897, 13, 462, 9651, 6410, 29918, 3993, 4619, 938, 29918, 2238, 13, 13, 462, 4706, 5994, 3950, 29889, 9171, 29918, 5105, 580, 13, 462, 4706, 6410, 29918, 3993, 29889, 1627, 1328, 580, 13, 462, 4706, 4656, 29879, 29918, 1482, 353, 518, 29886, 29889, 5105, 29889, 1272, 29889, 16513, 580, 363, 282, 297, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 29962, 13, 13, 462, 4706, 413, 29918, 3993, 4619, 29871, 29896, 13, 462, 4706, 565, 313, 6758, 29918, 3993, 29889, 667, 580, 448, 6410, 29918, 1025, 29889, 667, 3101, 847, 313, 29896, 718, 6410, 29918, 1025, 29889, 667, 3101, 529, 29871, 29896, 29923, 29899, 29945, 29901, 13, 462, 9651, 16897, 29918, 15581, 353, 7700, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 16897, 29918, 15581, 353, 7700, 13, 13, 18884, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 462, 1678, 274, 353, 313, 3433, 334, 3855, 29918, 3670, 334, 274, 718, 6410, 29918, 3993, 29889, 667, 3101, 13, 462, 1678, 3855, 29918, 3670, 353, 4948, 334, 3855, 29918, 3670, 718, 29871, 29896, 13, 462, 1678, 274, 353, 274, 847, 3855, 29918, 3670, 13, 13, 462, 1678, 289, 29890, 29918, 1949, 353, 29871, 29900, 29889, 29900, 13, 462, 1678, 289, 29890, 29918, 1145, 290, 353, 29871, 29900, 29889, 29900, 13, 462, 1678, 343, 29891, 29918, 2083, 353, 29871, 29900, 29889, 29900, 13, 462, 1678, 363, 282, 29918, 1025, 29892, 330, 29918, 1025, 29892, 282, 29918, 1482, 29892, 330, 29918, 1482, 297, 14319, 29898, 7529, 29918, 1025, 29892, 4656, 29879, 29918, 1025, 29892, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 7464, 13, 462, 462, 462, 3986, 4656, 29879, 29918, 1482, 1125, 13, 462, 4706, 269, 29918, 1327, 353, 282, 29918, 1482, 448, 282, 29918, 1025, 13, 462, 4706, 343, 29918, 1327, 353, 330, 29918, 1482, 448, 330, 29918, 1025, 13, 462, 4706, 289, 29890, 29918, 1949, 4619, 4842, 305, 29889, 2083, 29898, 29879, 29918, 1327, 3579, 29871, 29906, 29897, 13, 462, 4706, 289, 29890, 29918, 1145, 290, 4619, 4842, 305, 29889, 2083, 29898, 29879, 29918, 1327, 334, 343, 29918, 1327, 29897, 13, 462, 4706, 343, 29891, 29918, 2083, 4619, 4842, 305, 29889, 2083, 29898, 29891, 29918, 1327, 3579, 29871, 29906, 29897, 13, 462, 1678, 260, 585, 29918, 1327, 353, 289, 29890, 29918, 1949, 847, 4842, 305, 29889, 6897, 29898, 1327, 29918, 1145, 290, 29897, 13, 462, 1678, 260, 585, 29918, 1327, 353, 260, 585, 29918, 1327, 29889, 667, 580, 13, 462, 1678, 260, 585, 29918, 1327, 29906, 353, 4842, 305, 29889, 6897, 29898, 1327, 29918, 1145, 290, 29897, 847, 343, 29891, 29918, 2083, 13, 462, 1678, 260, 585, 29918, 1327, 29906, 353, 260, 585, 29918, 1327, 29906, 29889, 667, 580, 13, 462, 1678, 260, 585, 29918, 1327, 353, 7442, 29889, 1195, 12539, 29898, 4722, 29918, 1327, 29892, 260, 585, 29918, 1327, 29906, 29897, 13, 462, 1678, 260, 585, 353, 7442, 29889, 1195, 12539, 29898, 4722, 29918, 1327, 29892, 260, 585, 29918, 3317, 29897, 13, 462, 1678, 260, 585, 353, 7442, 29889, 27525, 398, 29898, 4722, 29892, 260, 585, 29918, 1195, 29897, 13, 462, 1678, 301, 314, 29918, 21457, 29892, 11755, 3881, 29918, 2238, 353, 6043, 29918, 2238, 18745, 29918, 5504, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 7464, 301, 314, 29918, 21457, 29892, 13, 462, 462, 462, 462, 29871, 11755, 3881, 29918, 2238, 29897, 13, 13, 18884, 6410, 29918, 3993, 353, 29871, 29900, 29889, 29900, 13, 18884, 363, 260, 29918, 29906, 29892, 1881, 29918, 29906, 29892, 3646, 29918, 29906, 297, 14319, 29898, 29873, 29918, 29883, 828, 29892, 1881, 29918, 29883, 828, 29892, 3646, 29918, 29883, 828, 1125, 13, 462, 1678, 1962, 353, 1904, 29898, 2080, 29918, 29906, 29892, 3635, 29918, 14968, 29922, 5574, 29892, 260, 29922, 29873, 29918, 29906, 29897, 13, 462, 1678, 6410, 29918, 5415, 353, 28770, 291, 29898, 4905, 29892, 3646, 29918, 29906, 29897, 13, 462, 1678, 938, 29918, 2238, 353, 6043, 29918, 2238, 18745, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 7464, 301, 314, 29918, 21457, 29892, 11755, 3881, 29918, 2238, 29897, 13, 462, 1678, 6410, 29918, 3993, 4619, 6410, 29918, 5415, 718, 938, 29918, 2238, 13, 13, 18884, 5994, 3950, 29889, 9171, 29918, 5105, 580, 13, 18884, 6410, 29918, 3993, 29889, 1627, 1328, 580, 13, 18884, 4656, 29879, 29918, 1482, 353, 518, 29886, 29889, 5105, 29889, 1272, 29889, 16513, 580, 363, 282, 297, 5994, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 29962, 13, 13, 18884, 4656, 29918, 12324, 353, 29871, 29900, 29889, 29900, 13, 18884, 363, 330, 29918, 1482, 297, 4656, 29879, 29918, 1482, 29901, 13, 462, 1678, 330, 29876, 353, 330, 29918, 1482, 29889, 12324, 29898, 29906, 29897, 13, 462, 1678, 4656, 29918, 12324, 4619, 330, 29876, 29889, 667, 580, 3579, 29871, 29906, 13, 18884, 4656, 29918, 12324, 353, 4656, 29918, 12324, 3579, 313, 29896, 29889, 847, 29871, 29906, 29897, 13, 13, 18884, 413, 29918, 1524, 4619, 29871, 29896, 13, 18884, 1881, 29918, 29883, 828, 353, 5159, 13, 18884, 3646, 29918, 29883, 828, 353, 5159, 13, 18884, 260, 29918, 29883, 828, 353, 5159, 13, 18884, 6410, 353, 29871, 29900, 29889, 29900, 13, 18884, 6410, 29918, 5415, 353, 29871, 29900, 29889, 29900, 13, 13, 1678, 1904, 29889, 14968, 580, 13, 1678, 6410, 29918, 2083, 353, 29871, 29900, 29889, 29900, 13, 1678, 1959, 353, 29871, 29900, 29889, 29900, 13, 13, 1678, 1735, 29918, 29925, 353, 7442, 29889, 13707, 13, 13, 1678, 8636, 29918, 11083, 353, 518, 8516, 29962, 334, 7431, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 11287, 13, 1678, 565, 4948, 338, 451, 6213, 29901, 13, 4706, 363, 22645, 29892, 1828, 297, 26985, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 2033, 1125, 13, 9651, 8636, 29918, 11083, 29961, 13140, 29962, 353, 1828, 29889, 16513, 2141, 4801, 496, 580, 13, 13, 4706, 5994, 3950, 29889, 10568, 580, 13, 13, 4706, 301, 29878, 353, 1364, 14952, 29889, 657, 29918, 29212, 580, 29961, 29900, 29962, 13, 4706, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 9651, 363, 1828, 29892, 1828, 29918, 29877, 297, 14319, 29898, 20640, 3950, 29889, 3207, 29918, 13155, 29961, 29900, 22322, 7529, 7464, 8636, 29918, 1025, 1125, 13, 18884, 1828, 29889, 1272, 353, 29871, 29896, 847, 313, 29896, 718, 301, 29878, 847, 4948, 29897, 334, 313, 3207, 718, 301, 29878, 847, 4948, 334, 1828, 29918, 29877, 29897, 13, 13, 9651, 1962, 353, 1904, 29898, 2080, 29918, 497, 29892, 3635, 29918, 14968, 29922, 5574, 29897, 13, 9651, 6410, 353, 28770, 291, 29898, 4905, 29892, 3646, 29918, 497, 29897, 13, 9651, 565, 4943, 3950, 338, 451, 6213, 29901, 13, 18884, 6410, 4619, 4943, 3950, 29898, 4299, 29897, 13, 9651, 6410, 29918, 2083, 4619, 6410, 29889, 667, 580, 334, 1881, 29889, 2311, 29898, 29900, 29897, 13, 13, 4706, 4450, 353, 1962, 29889, 1272, 29889, 1191, 3317, 29898, 29896, 29892, 3013, 6229, 29922, 5574, 29897, 13, 4706, 1959, 4619, 4450, 29889, 1837, 29898, 5182, 29918, 497, 29889, 1272, 29889, 1493, 29918, 294, 29898, 11965, 8106, 2083, 2141, 667, 580, 13, 13, 1678, 736, 426, 13, 4706, 525, 6758, 2396, 6410, 29918, 2083, 847, 7431, 29898, 14968, 29918, 12657, 29889, 24713, 511, 13, 4706, 525, 562, 2764, 4135, 2396, 1959, 334, 29871, 29896, 29900, 29900, 29889, 29900, 847, 7431, 29898, 14968, 29918, 12657, 29889, 24713, 511, 13, 4706, 525, 3167, 29918, 17858, 2396, 1735, 29918, 29925, 13, 1678, 500, 13, 13, 13, 1753, 2898, 29918, 524, 29918, 2238, 18745, 29898, 29886, 29918, 1761, 29892, 6584, 29922, 29896, 29923, 29896, 1125, 13, 1678, 6584, 29918, 6758, 353, 29871, 29900, 29889, 29900, 13, 1678, 363, 282, 297, 282, 29918, 1761, 29901, 13, 4706, 282, 29918, 13168, 353, 282, 29889, 1272, 334, 313, 29886, 29889, 1272, 5277, 29871, 29900, 29897, 13, 4706, 6584, 29918, 6758, 4619, 6584, 334, 4842, 305, 29889, 2083, 29898, 29886, 29918, 13168, 3579, 29871, 29906, 29897, 13, 1678, 736, 6584, 29918, 6758, 13, 13, 13, 1753, 6043, 29918, 2238, 18745, 29898, 29886, 29918, 1761, 29892, 301, 314, 29918, 1761, 29892, 3887, 1125, 13, 1678, 6584, 29918, 6758, 353, 29871, 29900, 29889, 29900, 13, 1678, 363, 282, 29892, 301, 314, 297, 14319, 29898, 29886, 29918, 1761, 29892, 301, 314, 29918, 1761, 1125, 13, 4706, 11105, 353, 313, 29886, 448, 301, 314, 847, 3887, 29897, 5277, 29871, 29900, 13, 4706, 11105, 29918, 1997, 353, 313, 29886, 448, 301, 314, 847, 3887, 29897, 1405, 29871, 29900, 13, 4706, 282, 29918, 29880, 353, 4842, 305, 29889, 2083, 3552, 29899, 301, 314, 334, 282, 718, 29871, 29900, 29889, 29945, 334, 3887, 334, 313, 29886, 3579, 29871, 29906, 876, 334, 11105, 29897, 13, 4706, 282, 29918, 29880, 4619, 4842, 305, 29889, 2083, 3552, 29899, 29896, 14571, 29906, 334, 3887, 29897, 334, 301, 314, 3579, 29871, 29906, 29897, 334, 11105, 29918, 1997, 29897, 13, 4706, 6584, 29918, 6758, 4619, 282, 29918, 29880, 13, 1678, 736, 6584, 29918, 6758, 13, 13, 13, 1753, 6043, 29918, 2238, 18745, 29918, 5504, 29898, 29886, 29918, 1761, 29892, 301, 314, 29918, 1761, 29892, 3887, 1125, 13, 1678, 716, 29918, 5288, 29918, 1761, 353, 5159, 13, 1678, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 4706, 363, 282, 29892, 301, 314, 297, 14319, 29898, 29886, 29918, 1761, 29892, 301, 314, 29918, 1761, 1125, 13, 9651, 3329, 353, 301, 314, 448, 3887, 334, 282, 13, 9651, 716, 29918, 5288, 29918, 1761, 29889, 4397, 29898, 786, 29881, 334, 313, 786, 29881, 1405, 29871, 29900, 876, 13, 4706, 716, 29918, 2589, 353, 3887, 334, 29871, 29896, 29889, 29900, 29896, 13, 1678, 736, 716, 29918, 5288, 29918, 1761, 29892, 716, 29918, 2589, 13, 13, 13, 1753, 10272, 29918, 3637, 585, 29898, 4722, 29892, 285, 29918, 1761, 29892, 282, 29918, 1761, 1125, 13, 1678, 343, 29918, 4722, 353, 5159, 13, 1678, 343, 29918, 4722, 29918, 10080, 353, 5159, 13, 1678, 363, 282, 29892, 285, 297, 14319, 29898, 29886, 29918, 1761, 29892, 285, 29918, 1761, 1125, 13, 4706, 10977, 353, 4842, 305, 29889, 1032, 29872, 29898, 29888, 29889, 12181, 29961, 29900, 1402, 4742, 29922, 29888, 29889, 10141, 29897, 13, 4706, 3855, 2922, 29918, 11569, 353, 4842, 305, 29889, 262, 3901, 29898, 1032, 29872, 718, 260, 585, 847, 29871, 29906, 334, 285, 29897, 13, 4706, 343, 29918, 615, 353, 4842, 305, 29889, 2922, 16109, 29898, 29939, 2922, 29918, 11569, 29892, 10977, 448, 260, 585, 847, 29871, 29906, 334, 285, 29897, 13, 4706, 343, 29918, 615, 353, 4842, 305, 29889, 2922, 16109, 29898, 29891, 29918, 615, 29892, 282, 29897, 13, 4706, 343, 29918, 615, 29918, 10080, 353, 448, 4842, 305, 29889, 2922, 16109, 29898, 29939, 2922, 29918, 11569, 29892, 285, 29897, 13, 4706, 343, 29918, 615, 29918, 10080, 353, 4842, 305, 29889, 2922, 16109, 29898, 29891, 29918, 615, 29918, 10080, 29892, 313, 29886, 718, 343, 29918, 615, 29897, 847, 29871, 29906, 29897, 13, 13, 4706, 343, 29918, 4722, 29889, 4397, 29898, 29891, 29918, 615, 29889, 16513, 3101, 13, 4706, 343, 29918, 4722, 29918, 10080, 29889, 4397, 29898, 29891, 29918, 615, 29918, 10080, 29889, 16513, 3101, 13, 1678, 736, 343, 29918, 4722, 29892, 343, 29918, 4722, 29918, 10080, 2 ]
jiant/utils/python/checks.py
yzpang/jiant
1,108
1614389
from typing import Dict def dict_equal(dict1: Dict, dict2: Dict) -> bool: if not len(dict1) == len(dict2): return False for (k1, v1), (k2, v2) in zip(dict1.items(), dict2.items()): if k1 != k2: return False if v1 != v2: return False return True
[ 1, 515, 19229, 1053, 360, 919, 13, 13, 13, 1753, 9657, 29918, 11745, 29898, 8977, 29896, 29901, 360, 919, 29892, 9657, 29906, 29901, 360, 919, 29897, 1599, 6120, 29901, 13, 1678, 565, 451, 7431, 29898, 8977, 29896, 29897, 1275, 7431, 29898, 8977, 29906, 1125, 13, 4706, 736, 7700, 13, 1678, 363, 313, 29895, 29896, 29892, 325, 29896, 511, 313, 29895, 29906, 29892, 325, 29906, 29897, 297, 14319, 29898, 8977, 29896, 29889, 7076, 3285, 9657, 29906, 29889, 7076, 580, 1125, 13, 4706, 565, 413, 29896, 2804, 413, 29906, 29901, 13, 9651, 736, 7700, 13, 4706, 565, 325, 29896, 2804, 325, 29906, 29901, 13, 9651, 736, 7700, 13, 1678, 736, 5852, 13, 2 ]
server/favorite_things/apps/favorite/migrations/0001_initial.py
el-Joft/favorite-things
1
1616323
<reponame>el-Joft/favorite-things # Generated by Django 2.1.4 on 2019-08-05 22:38 import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='AuditLog', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('table_name', models.CharField(blank=True, max_length=132)), ('table_fields', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('action', models.CharField(blank=True, max_length=200)), ('timestamp', models.DateTimeField(auto_now_add=True)), ], options={ 'db_table': 'audit_log', }, ), migrations.CreateModel( name='Category', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('name', models.CharField(max_length=100, unique=True)), ], ), migrations.CreateModel( name='Favorite', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100)), ('description', models.TextField(max_length=7000)), ('ranking', models.IntegerField(default=0)), ('created_at', models.DateTimeField(auto_now_add=True)), ('modified_at', models.DateTimeField(auto_now=True, null=True)), ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='favorite', to='favorite.Category')), ], ), migrations.CreateModel( name='MetaData', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('key', models.CharField(blank=True, max_length=200, null=True)), ('value', models.CharField(blank=True, max_length=200, null=True)), ('favorite', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='favorite.Favorite')), ], ), ]
[ 1, 529, 276, 1112, 420, 29958, 295, 29899, 10844, 615, 29914, 29888, 17118, 568, 29899, 386, 886, 13, 29937, 3251, 630, 491, 15337, 29871, 29906, 29889, 29896, 29889, 29946, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29900, 29947, 29899, 29900, 29945, 29871, 29906, 29906, 29901, 29941, 29947, 13, 13, 5215, 9557, 29889, 21570, 29889, 2490, 7201, 29889, 9621, 29889, 3126, 29890, 13, 3166, 9557, 29889, 2585, 1053, 9725, 800, 29892, 4733, 13, 5215, 9557, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 13, 5215, 318, 5416, 13, 13, 13, 1990, 341, 16783, 29898, 26983, 800, 29889, 29924, 16783, 1125, 13, 13, 1678, 2847, 353, 5852, 13, 13, 1678, 9962, 353, 518, 13, 1678, 4514, 13, 13, 1678, 6931, 353, 518, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 29909, 566, 277, 3403, 742, 13, 9651, 4235, 11759, 13, 18884, 6702, 333, 742, 4733, 29889, 29965, 11150, 3073, 29898, 4381, 29922, 25118, 29889, 25118, 29946, 29892, 3863, 519, 29922, 8824, 29892, 7601, 29918, 1989, 29922, 5574, 29892, 28755, 29922, 8824, 8243, 13, 18884, 6702, 2371, 29918, 978, 742, 4733, 29889, 27890, 29898, 19465, 29922, 5574, 29892, 4236, 29918, 2848, 29922, 29896, 29941, 29906, 8243, 13, 18884, 6702, 2371, 29918, 9621, 742, 9557, 29889, 21570, 29889, 2490, 7201, 29889, 9621, 29889, 3126, 29890, 29889, 7249, 3073, 29898, 4381, 29922, 8977, 8243, 13, 18884, 6702, 2467, 742, 4733, 29889, 27890, 29898, 19465, 29922, 5574, 29892, 4236, 29918, 2848, 29922, 29906, 29900, 29900, 8243, 13, 18884, 6702, 16394, 742, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29918, 1202, 29922, 5574, 8243, 13, 9651, 21251, 13, 9651, 3987, 3790, 13, 18884, 525, 2585, 29918, 2371, 2396, 525, 15052, 277, 29918, 1188, 742, 13, 9651, 2981, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 10900, 742, 13, 9651, 4235, 11759, 13, 18884, 6702, 333, 742, 4733, 29889, 29965, 11150, 3073, 29898, 4381, 29922, 25118, 29889, 25118, 29946, 29892, 3863, 519, 29922, 8824, 29892, 7601, 29918, 1989, 29922, 5574, 29892, 28755, 29922, 8824, 8243, 13, 18884, 6702, 978, 742, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 29922, 29896, 29900, 29900, 29892, 5412, 29922, 5574, 8243, 13, 9651, 21251, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 29943, 17118, 568, 742, 13, 9651, 4235, 11759, 13, 18884, 6702, 333, 742, 4733, 29889, 12300, 3073, 29898, 6921, 29918, 11600, 29922, 5574, 29892, 7601, 29918, 1989, 29922, 5574, 29892, 28755, 29922, 8824, 29892, 26952, 29918, 978, 2433, 1367, 1495, 511, 13, 18884, 6702, 3257, 742, 4733, 29889, 27890, 29898, 3317, 29918, 2848, 29922, 29896, 29900, 29900, 8243, 13, 18884, 6702, 8216, 742, 4733, 29889, 15778, 29898, 3317, 29918, 2848, 29922, 29955, 29900, 29900, 29900, 8243, 13, 18884, 6702, 661, 9292, 742, 4733, 29889, 7798, 3073, 29898, 4381, 29922, 29900, 8243, 13, 18884, 6702, 11600, 29918, 271, 742, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29918, 1202, 29922, 5574, 8243, 13, 18884, 6702, 1545, 2164, 29918, 271, 742, 4733, 29889, 11384, 3073, 29898, 6921, 29918, 3707, 29922, 5574, 29892, 1870, 29922, 5574, 8243, 13, 18884, 6702, 7320, 742, 4733, 29889, 27755, 2558, 29898, 265, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 4475, 29918, 978, 2433, 29888, 17118, 568, 742, 304, 2433, 29888, 17118, 568, 29889, 10900, 1495, 511, 13, 9651, 21251, 13, 4706, 10353, 13, 4706, 9725, 800, 29889, 4391, 3195, 29898, 13, 9651, 1024, 2433, 19346, 1469, 742, 13, 9651, 4235, 11759, 13, 18884, 6702, 333, 742, 4733, 29889, 29965, 11150, 3073, 29898, 4381, 29922, 25118, 29889, 25118, 29946, 29892, 3863, 519, 29922, 8824, 29892, 7601, 29918, 1989, 29922, 5574, 29892, 28755, 29922, 8824, 8243, 13, 18884, 6702, 1989, 742, 4733, 29889, 27890, 29898, 19465, 29922, 5574, 29892, 4236, 29918, 2848, 29922, 29906, 29900, 29900, 29892, 1870, 29922, 5574, 8243, 13, 18884, 6702, 1767, 742, 4733, 29889, 27890, 29898, 19465, 29922, 5574, 29892, 4236, 29918, 2848, 29922, 29906, 29900, 29900, 29892, 1870, 29922, 5574, 8243, 13, 18884, 6702, 29888, 17118, 568, 742, 4733, 29889, 27755, 2558, 29898, 4304, 29922, 5574, 29892, 373, 29918, 8143, 29922, 14095, 29889, 2585, 29889, 9794, 29889, 311, 1026, 291, 29889, 29907, 3289, 5454, 2287, 29892, 304, 2433, 29888, 17118, 568, 29889, 29943, 17118, 568, 1495, 511, 13, 9651, 21251, 13, 4706, 10353, 13, 1678, 4514, 13, 2 ]
Python/easy/0136_single_number.py
CalmScout/LeetCode
0
1609720
<filename>Python/easy/0136_single_number.py """ Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? Example 1: Input: [2,2,1] Output: 1 Example 2: Input: [4,1,2,1,2] Output: 4 """ from typing import List class Solution: def singleNumber(self, nums: List[int]) -> int: result = 0 for num in nums: result ^= num return result if __name__ == "__main__": assert Solution().singleNumber([2, 2, 1]) == 1 assert Solution().singleNumber([4,1,2,1,2]) == 4
[ 1, 529, 9507, 29958, 11980, 29914, 29872, 8995, 29914, 29900, 29896, 29941, 29953, 29918, 14369, 29918, 4537, 29889, 2272, 13, 15945, 29908, 13, 29954, 5428, 263, 1661, 29899, 6310, 1409, 310, 11920, 29892, 1432, 1543, 5692, 8951, 5174, 363, 697, 29889, 10987, 393, 2323, 697, 29889, 13, 9842, 29901, 13, 10858, 5687, 881, 505, 263, 5608, 10073, 13644, 29889, 6527, 366, 2334, 372, 1728, 773, 4805, 3370, 29973, 13, 13, 14023, 29871, 29896, 29901, 13, 4290, 29901, 518, 29906, 29892, 29906, 29892, 29896, 29962, 13, 6466, 29901, 29871, 29896, 13, 13, 14023, 29871, 29906, 29901, 13, 4290, 29901, 518, 29946, 29892, 29896, 29892, 29906, 29892, 29896, 29892, 29906, 29962, 13, 6466, 29901, 29871, 29946, 13, 15945, 29908, 13, 3166, 19229, 1053, 2391, 13, 13, 13, 1990, 24380, 29901, 13, 1678, 822, 2323, 4557, 29898, 1311, 29892, 954, 29879, 29901, 2391, 29961, 524, 2314, 1599, 938, 29901, 13, 4706, 1121, 353, 29871, 29900, 13, 4706, 363, 954, 297, 954, 29879, 29901, 13, 9651, 1121, 6228, 29922, 954, 13, 4706, 736, 1121, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 4974, 24380, 2141, 14369, 4557, 4197, 29906, 29892, 29871, 29906, 29892, 29871, 29896, 2314, 1275, 29871, 29896, 13, 1678, 4974, 24380, 2141, 14369, 4557, 4197, 29946, 29892, 29896, 29892, 29906, 29892, 29896, 29892, 29906, 2314, 1275, 29871, 29946, 13, 2 ]
chapter15/exercises/exercise06/average.py
YordanIH/Intro_to_CS_w_Python
0
1617119
<filename>chapter15/exercises/exercise06/average.py from typing import List def average(values: List[float]) -> float: """Return the average of the numbers in values. Some items in values are None, and they are not counted toward the average. >>> average([20, 30]) 25.0 >>> average([None, 20, 30]) 25.0 """ count = 0 # The number of values seen so far. total = 0 # The sum of the values seen so far. for value in values: if value is not None: total += value count += 1 if count == 0: return None return total / count
[ 1, 529, 9507, 29958, 27349, 29896, 29945, 29914, 735, 261, 3476, 267, 29914, 735, 6269, 895, 29900, 29953, 29914, 12483, 482, 29889, 2272, 13, 3166, 19229, 1053, 2391, 13, 13, 1753, 6588, 29898, 5975, 29901, 2391, 29961, 7411, 2314, 1599, 5785, 29901, 13, 13, 1678, 9995, 11609, 278, 6588, 310, 278, 3694, 297, 1819, 29889, 3834, 4452, 297, 1819, 526, 6213, 29892, 29871, 13, 1678, 322, 896, 526, 451, 29115, 11183, 278, 6588, 29889, 13, 1678, 8653, 6588, 4197, 29906, 29900, 29892, 29871, 29941, 29900, 2314, 13, 268, 29906, 29945, 29889, 29900, 13, 1678, 8653, 6588, 4197, 8516, 29892, 29871, 29906, 29900, 29892, 29871, 29941, 29900, 2314, 29871, 29906, 29945, 29889, 29900, 13, 1678, 9995, 13, 13, 1678, 2302, 353, 29871, 29900, 396, 450, 1353, 310, 1819, 3595, 577, 2215, 29889, 29871, 13, 1678, 3001, 353, 29871, 29900, 396, 450, 2533, 310, 278, 1819, 3595, 577, 2215, 29889, 29871, 13, 1678, 363, 995, 297, 1819, 29901, 13, 4706, 565, 995, 338, 451, 6213, 29901, 29871, 13, 9651, 3001, 4619, 995, 13, 9651, 2302, 4619, 29871, 29896, 13, 13, 1678, 565, 2302, 1275, 29871, 29900, 29901, 13, 4706, 736, 6213, 13, 3986, 13, 1678, 736, 3001, 847, 2302, 2 ]
src/sensor/electricity/__init__.py
Jochen-TPO/internet-of-washingmachines
0
114701
import time import json from math import sqrt from typing import List from multiprocessing import Process, Event, Queue, Lock from src.base import EdgiseBase from grove.adc import ADC from config import cfg import json class ACSensor(Process, EdgiseBase): def __init__(self, stop_event: Event, logging_q: Queue, input_q: Queue, output_q: Queue, config_dict, resource_lock: Lock, **kwargs): self._stop_event = stop_event self._logging_q: Queue = logging_q self._input_q: Queue = input_q self._output_q: Queue = output_q self.RMS_voltage = 230 self.VCC = 5 self._config_dict = config_dict self._name = self._config_dict['name'] self.adc = ADC() self.i2c_lock = resource_lock Process.__init__(self) EdgiseBase.__init__(self, name=self._name, logging_q=logging_q) # config = { # "name":str # "PINNR":int, # "SensorI bD":int, # "Unit":"cm" # "SensorType":"" # } def read_sensor(self): sensor_value = self.adc.read(self._config_dict['pin']) return sensor_value def amplitude_current(self, sensor_value): return float(sensor_value / 1024 * self.VCC / 800 * 2000000) def RMS_current(self, amplitude_current): return amplitude_current / sqrt(2) def avg_power_consumption(self, RMS_current): return self.RMS_voltage * RMS_current def run(self) -> None: self.info("Starting AC sensor") print(self._config_dict['name']) while not self._stop_event.is_set(): self.i2c_lock.acquire() try: raw_val = self.read_sensor() finally: self.i2c_lock.release() self.info("Raw Value: {}".format(raw_val)) amplitude_current = self.amplitude_current(raw_val) self.info("A I Value: {}".format(amplitude_current)) rms_current = self.RMS_current(amplitude_current) self.info("RMS I Value: {}".format(rms_current)) avg_power = self.avg_power_consumption(rms_current) self.info("AVG W Value: {}".format(avg_power)) data = {'electricitySensorData': { 'rawVal': raw_val, 'currentAmp': amplitude_current, 'rmsCurrent': rms_current, 'avgPower': avg_power }} measurement = {'data': data} self._output_q.put_nowait({'event': json.dumps(measurement)}) time.sleep(10)
[ 1, 1053, 931, 13, 5215, 4390, 13, 13, 3166, 5844, 1053, 18074, 2273, 13, 3166, 19229, 1053, 2391, 13, 3166, 6674, 307, 985, 292, 1053, 10554, 29892, 6864, 29892, 5462, 434, 29892, 18199, 13, 3166, 4765, 29889, 3188, 1053, 2155, 29887, 895, 5160, 13, 3166, 4071, 345, 29889, 328, 29883, 1053, 11033, 29907, 13, 3166, 2295, 1053, 274, 16434, 13, 5215, 4390, 13, 13, 13, 1990, 319, 9295, 6073, 29898, 7032, 29892, 2155, 29887, 895, 5160, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 5040, 29918, 3696, 29901, 6864, 29892, 12183, 29918, 29939, 29901, 5462, 434, 29892, 1881, 29918, 29939, 29901, 5462, 434, 29892, 1962, 29918, 29939, 29901, 5462, 434, 29892, 13, 462, 2295, 29918, 8977, 29892, 6503, 29918, 908, 29901, 18199, 29892, 3579, 19290, 1125, 13, 4706, 1583, 3032, 9847, 29918, 3696, 353, 5040, 29918, 3696, 13, 4706, 1583, 3032, 21027, 29918, 29939, 29901, 5462, 434, 353, 12183, 29918, 29939, 13, 4706, 1583, 3032, 2080, 29918, 29939, 29901, 5462, 434, 353, 1881, 29918, 29939, 13, 4706, 1583, 3032, 4905, 29918, 29939, 29901, 5462, 434, 353, 1962, 29918, 29939, 13, 4706, 1583, 29889, 29934, 4345, 29918, 1555, 29873, 482, 353, 29871, 29906, 29941, 29900, 13, 4706, 1583, 29889, 29963, 4174, 353, 29871, 29945, 13, 4706, 1583, 3032, 2917, 29918, 8977, 353, 2295, 29918, 8977, 13, 4706, 1583, 3032, 978, 353, 1583, 3032, 2917, 29918, 8977, 1839, 978, 2033, 13, 4706, 1583, 29889, 328, 29883, 353, 11033, 29907, 580, 13, 4706, 1583, 29889, 29875, 29906, 29883, 29918, 908, 353, 6503, 29918, 908, 13, 13, 4706, 10554, 17255, 2344, 12035, 1311, 29897, 13, 4706, 2155, 29887, 895, 5160, 17255, 2344, 12035, 1311, 29892, 1024, 29922, 1311, 3032, 978, 29892, 12183, 29918, 29939, 29922, 21027, 29918, 29939, 29897, 13, 13, 4706, 396, 2295, 353, 426, 13, 4706, 396, 965, 376, 978, 1115, 710, 13, 4706, 396, 965, 376, 29925, 1177, 16514, 1115, 524, 29892, 13, 4706, 396, 965, 376, 29903, 6073, 29902, 1678, 289, 29928, 1115, 524, 29892, 13, 4706, 396, 965, 376, 8325, 4710, 4912, 29908, 13, 4706, 396, 965, 376, 29903, 6073, 1542, 4710, 29908, 13, 4706, 396, 965, 500, 13, 13, 1678, 822, 1303, 29918, 29879, 6073, 29898, 1311, 1125, 13, 4706, 23530, 29918, 1767, 353, 1583, 29889, 328, 29883, 29889, 949, 29898, 1311, 3032, 2917, 29918, 8977, 1839, 12687, 11287, 13, 4706, 736, 23530, 29918, 1767, 13, 13, 1678, 822, 28347, 29918, 3784, 29898, 1311, 29892, 23530, 29918, 1767, 1125, 13, 4706, 736, 5785, 29898, 29879, 6073, 29918, 1767, 847, 29871, 29896, 29900, 29906, 29946, 334, 1583, 29889, 29963, 4174, 847, 29871, 29947, 29900, 29900, 334, 29871, 29906, 29900, 29900, 29900, 29900, 29900, 29900, 29897, 13, 13, 1678, 822, 390, 4345, 29918, 3784, 29898, 1311, 29892, 28347, 29918, 3784, 1125, 13, 4706, 736, 28347, 29918, 3784, 847, 18074, 2273, 29898, 29906, 29897, 13, 13, 1678, 822, 1029, 29887, 29918, 13519, 29918, 25978, 683, 29898, 1311, 29892, 390, 4345, 29918, 3784, 1125, 13, 4706, 736, 1583, 29889, 29934, 4345, 29918, 1555, 29873, 482, 334, 390, 4345, 29918, 3784, 13, 13, 1678, 822, 1065, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 1583, 29889, 3888, 703, 4763, 292, 14614, 23530, 1159, 13, 4706, 1596, 29898, 1311, 3032, 2917, 29918, 8977, 1839, 978, 11287, 13, 13, 4706, 1550, 451, 1583, 3032, 9847, 29918, 3696, 29889, 275, 29918, 842, 7295, 13, 13, 9651, 1583, 29889, 29875, 29906, 29883, 29918, 908, 29889, 562, 1548, 580, 13, 9651, 1018, 29901, 13, 18884, 10650, 29918, 791, 353, 1583, 29889, 949, 29918, 29879, 6073, 580, 13, 9651, 7146, 29901, 13, 18884, 1583, 29889, 29875, 29906, 29883, 29918, 908, 29889, 14096, 580, 13, 9651, 1583, 29889, 3888, 703, 22131, 7865, 29901, 6571, 1642, 4830, 29898, 1610, 29918, 791, 876, 13, 9651, 28347, 29918, 3784, 353, 1583, 29889, 314, 2830, 1151, 29918, 3784, 29898, 1610, 29918, 791, 29897, 13, 9651, 1583, 29889, 3888, 703, 29909, 306, 7865, 29901, 6571, 1642, 4830, 29898, 314, 2830, 1151, 29918, 3784, 876, 13, 9651, 364, 1516, 29918, 3784, 353, 1583, 29889, 29934, 4345, 29918, 3784, 29898, 314, 2830, 1151, 29918, 3784, 29897, 13, 9651, 1583, 29889, 3888, 703, 29934, 4345, 306, 7865, 29901, 6571, 1642, 4830, 29898, 29878, 1516, 29918, 3784, 876, 13, 9651, 1029, 29887, 29918, 13519, 353, 1583, 29889, 485, 29887, 29918, 13519, 29918, 25978, 683, 29898, 29878, 1516, 29918, 3784, 29897, 13, 9651, 1583, 29889, 3888, 703, 7520, 29954, 399, 7865, 29901, 6571, 1642, 4830, 29898, 485, 29887, 29918, 13519, 876, 13, 13, 9651, 848, 353, 11117, 15436, 2200, 537, 29903, 6073, 1469, 2396, 426, 13, 18884, 525, 1610, 1440, 2396, 10650, 29918, 791, 29892, 13, 18884, 525, 3784, 29909, 1526, 2396, 28347, 29918, 3784, 29892, 13, 18884, 525, 29878, 1516, 7583, 2396, 364, 1516, 29918, 3784, 29892, 13, 18884, 525, 485, 29887, 21472, 2396, 1029, 29887, 29918, 13519, 13, 9651, 9156, 13, 9651, 20039, 353, 11117, 1272, 2396, 848, 29913, 13, 9651, 1583, 3032, 4905, 29918, 29939, 29889, 649, 29918, 3707, 1249, 3319, 29915, 3696, 2396, 4390, 29889, 29881, 17204, 29898, 26658, 358, 26972, 13, 9651, 931, 29889, 17059, 29898, 29896, 29900, 29897, 13, 2 ]
PySide2Wrapper/widget.py
toodef/PySide2Wrapper
0
190896
import math import os from PySide2.QtOpenGL import QGLWidget from PySide2.QtWidgets import QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QPushButton, QCheckBox, QRadioButton, \ QComboBox, QProgressBar, QTableWidget, QHeaderView, QTableWidgetItem, QFileDialog, QToolButton, QTabWidget, \ QWidget, QListWidget, QListWidgetItem, QGroupBox, QStackedLayout, QSplitter, QGraphicsView, QGraphicsScene from PySide2.QtGui import QPixmap, QImage, QDoubleValidator, QIntValidator, QRegExpValidator, QPainterPath from PySide2.QtCore import QObject, Signal, QDir, Qt, QRectF from PySide2 import QtCore from abc import ABCMeta, abstractmethod from .utils import StateSaver class Checkable(metaclass=ABCMeta): @abstractmethod def add_clicked_callback(self, callback: callable): """ Add callback, that will call for every click :param callback: callback :return: Widget object :rtype: Widget """ @abstractmethod def set_value(self, state: bool): """ Set state of Widget: checked or not :return: State :rtype: self instance """ @abstractmethod def get_value(self): """ Get state of Widget: checked or not :return: State :rtype: bool """ class Widget: def __init__(self, instance: QObject = None): self._layout = QVBoxLayout() if instance is not None: self._instance = instance self._enabled_dependencies = [] self._state_saver = None self._layouts = [QVBoxLayout()] self._cur_tab_widget = None self._cur_splitter = None def set_state_saver(self, saver: StateSaver): self._state_saver = saver def get_layout(self): """ Return layout of widget :return: layout, contains Widget instance @:rtype: QLayout """ self._layout.addLayout(self._layouts[-1]) return self._layout def get_instance(self): """ Get Qt instance of widget :return: instance of widget (PySide object) :rtype QWidget """ return self._instance def _may_be_enabled(self, is_enabled): if is_enabled: for depends in self._enabled_dependencies: if not depends.get_value(): return False return is_enabled def set_enabled(self, is_enabled: bool = True): """ Set widget enabled :param is_enabled: state of widget: enabled or not :return: Widget object (self) :rtype: Widget """ self._instance.setEnabled(self._may_be_enabled(is_enabled)) return self def add_enabled_dependency(self, dependency: Checkable): self.set_enabled(dependency.get_value()) self._enabled_dependencies.append(dependency) dependency.add_clicked_callback(self.set_enabled) def add_widget(self, widget: "Widget instance", need_store=False, need_stretch=True): """ Add widget to window layout :param widget: Widget unit :param need_store: is need to store state of specified widget :param need_stretch: is need to insert stretch around widget :return: widget instance """ if need_stretch: self.get_current_layout().addStretch() self.get_current_layout().addLayout(widget.get_layout()) if need_stretch: self.get_current_layout().addStretch() if need_store and self._state_saver is not None: self._state_saver.add_widget(widget) return widget def add_widgets(self, widgets: "list of Widget instances"): """ Add list of widgets to window layout :param widgets: Widget units :return: None """ for widget in widgets: self.get_current_layout().addLayout(widget.get_layout()) def start_horizontal(self): """ Start horizontal components insertion :return: None """ if isinstance(self.get_current_layout(), QHBoxLayout): return layout = QHBoxLayout() self.get_current_layout().addLayout(layout) self._layouts.append(layout) def start_vertical(self): """ Start vertical components insertion :return: None """ if isinstance(self.get_current_layout(), QVBoxLayout): return layout = QVBoxLayout() self.get_current_layout().addLayout(layout) self._layouts.append(layout) def group_horizontal(self, widgets: list): """ Place list of widgets horizontal :param widgets: list of widgets :return: None """ self.start_horizontal() self.add_widgets(widgets) self.cancel() def group_vertical(self, widgets: "list of Widget instances"): """ Place list of widgets vertical :param widgets: list of widgets :return: None """ self.start_vertical() self.add_widgets(widgets) self.cancel() def start_splitter(self, orientation='vertical'): self._cur_splitter = QSplitter() self._cur_splitter.setOrientation(Qt.Orientation.Horizontal if orientation == 'horizontal' else Qt.Orientation.Vertical) self.get_current_layout().addWidget(self._cur_splitter) def add_splitter_space(self): self._layouts.append(QVBoxLayout()) widget = QWidget() widget.setLayout(self.get_current_layout()) self._cur_splitter.addWidget(widget) def get_current_layout(self): """ Return current layout :return: layout of type QLayout """ return self._layouts[-1] def add_to_group_box(self, group_name: str, widgets: "list of Widget instances"): """ Place layout to group box :param group_name: name of group :param widgets: list of widgets, that been placed to group :return: None """ self.start_group_box(group_name) for widget in widgets: self.add_widget(widget) self.cancel() def start_group_box(self, name: str): """ Start group box :return: """ group_box = QGroupBox(name) group_box_layout = QVBoxLayout() group_box.setLayout(group_box_layout) self.get_current_layout().addWidget(group_box) self._layouts.append(group_box_layout) def cancel(self): """ Cnacel last format append :return: None """ del self._layouts[-1] def insert_text_label(self, text, is_link=False): widget = QLabel(text) widget.setOpenExternalLinks(is_link) self.get_current_layout().addWidget(widget) def insert_tab_space(self): self._cur_tab_widget = QTabWidget() self.get_current_layout().addWidget(self._cur_tab_widget) def add_tab(self, name): self._layouts.append(QVBoxLayout()) widget = QWidget() widget.setLayout(self.get_current_layout()) self._cur_tab_widget.addTab(widget, name) class LabeledWidget(Widget, metaclass=ABCMeta): def __init__(self, instance: QObject = None): super().__init__(instance) self.__is_assembled = False def add_label(self, text: str, position: str): """ Add label to widget :param text: label text :param position: position of label ['top', 'left', 'right', 'bottom'] :return: self value """ if not (position in ['top', 'bottom', 'left', 'right']): raise Exception("Wrong position for label: " + text) if position in ['top', 'bottom']: self._layout = QVBoxLayout() elif position in ['left', 'right']: self._layout = QHBoxLayout() if position in ['top', 'left']: if position == 'top': self._layout.addStretch() self._layout.addWidget(QLabel(text)) self._layout.addWidget(self._instance) if position == 'top': self._layout.addStretch() elif position in ['bottom', 'right']: if position == 'bottom': self._layout.addStretch() self._layout.addWidget(self._instance) self._layout.addWidget(QLabel(text)) if position == 'bottom': self._layout.addStretch() self.__is_assembled = True return self def get_layout(self): """ Return layout of widget :return: layout @:rtype: QLayout """ if not self.__is_assembled: self._assembly() return self._layout @abstractmethod def _assembly(self): """ Assembly object :return: object instance """ class ValueContains(metaclass=ABCMeta): @abstractmethod def set_value(self, value): """ Set value to :param value: value to set :return: None """ @abstractmethod def get_value(self): """ Get value :return: current value """ @abstractmethod def set_value_changed_callback(self, callback: callable): """ Set callback? that called when value in widget changed :return: self object """ class LineEdit(LabeledWidget, ValueContains): def __init__(self): super().__init__(QLineEdit()) def set_data_type(self, data_type: str, regexp: str = None): """ Set data type? contains in LineEdit :param data_type: type of data. String with possible values: {'int', 'double', 'regexp'}. If set 'regexp' type, need to define regexp parameter :param regexp: regexp, that filter contain in LineEdit :return: self instance """ if data_type == 'int': self._instance.setValidator(QIntValidator()) elif data_type == 'double': self._instance.setValidator(QDoubleValidator()) elif data_type == 'regexp': if regexp is None: raise Exception("Regexp doesn't specified for LineEdit") self._instance.setValidator(QRegExpValidator(regexp)) else: raise Exception("Incorrect data_type parameter value: '{}' in LineEdit.set_data_type".format(data_type)) return self def set_value(self, value: str): """ Set value to :param value: :return: """ self._instance.setText(value) def get_value(self): """ Get current value :return: current value """ return self._instance.text() def set_value_changed_callback(self, callback: callable): self._instance.textChanged.connect(callback) return self def _assembly(self): self._layout.addWidget(self._instance) class Button(Widget): def __init__(self, title: str, is_tool_button: bool = False): super().__init__(QToolButton() if is_tool_button else QPushButton()) self._layout.addWidget(self._instance) self._instance.setText(title) def set_on_click_callback(self, callback: callable): """ Set callback on click event :param callback: :return: """ self._instance.clicked.connect(callback) return self class ImageLayout(Widget): class QtImageViewer(QGraphicsView): """ PyQt image viewer widget for a QPixmap in a QGraphicsView scene with mouse zooming and panning. Displays a QImage or QPixmap (QImage is internally converted to a QPixmap). To display any other image format, you must first convert it to a QImage or QPixmap. Some useful image format conversion utilities: qimage2ndarray: NumPy ndarray <==> QImage (https://github.com/hmeine/qimage2ndarray) ImageQt: PIL Image <==> QImage (https://github.com/python-pillow/Pillow/blob/master/PIL/ImageQt.py) Mouse interaction: Left mouse button drag: Pan image. Right mouse button drag: Zoom box. Right mouse button doubleclick: Zoom to show entire image. """ # Mouse button signals emit image scene (x, y) coordinates. # !!! For image (row, column) matrix indexing, row = y and column = x. leftMouseButtonPressed = Signal(float, float) rightMouseButtonPressed = Signal(float, float) leftMouseButtonReleased = Signal(float, float) rightMouseButtonReleased = Signal(float, float) leftMouseButtonDoubleClicked = Signal(float, float) rightMouseButtonDoubleClicked = Signal(float, float) def __init__(self): QGraphicsView.__init__(self) # Image is displayed as a QPixmap in a QGraphicsScene attached to this QGraphicsView. self.scene = QGraphicsScene() self.setScene(self.scene) # Store a local handle to the scene's current image pixmap. self._pixmapHandle = None # Image aspect ratio mode. # !!! ONLY applies to full image. Aspect ratio is always ignored when zooming. # Qt.IgnoreAspectRatio: Scale image to fit viewport. # Qt.KeepAspectRatio: Scale image to fit inside viewport, preserving aspect ratio. # Qt.KeepAspectRatioByExpanding: Scale image to fill the viewport, preserving aspect ratio. self.aspectRatioMode = Qt.KeepAspectRatio # Scroll bar behaviour. # Qt.ScrollBarAlwaysOff: Never shows a scroll bar. # Qt.ScrollBarAlwaysOn: Always shows a scroll bar. # Qt.ScrollBarAsNeeded: Shows a scroll bar only when zoomed. self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn) self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) self.setTransformationAnchor(QGraphicsView.AnchorUnderMouse) # Stack of QRectF zoom boxes in scene coordinates. self.zoomStack = [] # Flags for enabling/disabling mouse interaction. self.canZoom = True self.canPan = True def hasImage(self): """ Returns whether or not the scene contains an image pixmap. """ return self._pixmapHandle is not None def clearImage(self): """ Removes the current image pixmap from the scene if it exists. """ if self.hasImage(): self.scene.removeItem(self._pixmapHandle) self._pixmapHandle = None def pixmap(self): """ Returns the scene's current image pixmap as a QPixmap, or else None if no image exists. :rtype: QPixmap | None """ if self.hasImage(): return self._pixmapHandle.pixmap() return None def image(self): """ Returns the scene's current image pixmap as a QImage, or else None if no image exists. :rtype: QImage | None """ if self.hasImage(): return self._pixmapHandle.pixmap().toImage() return None def setImage(self, image): """ Set the scene's current image pixmap to the input QImage or QPixmap. Raises a RuntimeError if the input image has type other than QImage or QPixmap. :type image: QImage | QPixmap """ if type(image) is QPixmap: pixmap = image elif type(image) is QImage: pixmap = QPixmap.fromImage(image) else: raise RuntimeError("ImageViewer.setImage: Argument must be a QImage or QPixmap.") if self.hasImage(): self._pixmapHandle.setPixmap(pixmap) else: self._pixmapHandle = self.scene.addPixmap(pixmap) self.setSceneRect(QRectF(pixmap.rect())) # Set scene size to image size. self.updateViewer() def loadImageFromFile(self, fileName): """ Load an image from file. Without any arguments, loadImageFromFile() will popup a file dialog to choose the image file. With a fileName argument, loadImageFromFile(fileName) will attempt to load the specified image file directly. """ if len(fileName) and os.path.isfile(fileName): image = QImage(fileName) self.setImage(image) def updateViewer(self): """ Show current zoom (if showing entire image, apply current aspect ratio mode). """ if not self.hasImage(): return if len(self.zoomStack) and self.sceneRect().contains(self.zoomStack[-1]): self.fitInView(self.zoomStack[-1], Qt.IgnoreAspectRatio) # Show zoomed rect (ignore aspect ratio). else: self.zoomStack = [] # Clear the zoom stack (in case we got here because of an invalid zoom). self.fitInView(self.sceneRect(), self.aspectRatioMode) # Show entire image (use current aspect ratio mode). def resizeEvent(self, event): """ Maintain current zoom on resize. """ self.updateViewer() def wheelEvent(self, event): scale_factor = 1.1 if event.delta() > 0: self.scale(scale_factor, scale_factor) else: self.scale(1 / scale_factor, 1 / scale_factor) def mousePressEvent(self, event): """ Start mouse pan or zoom mode. """ scenePos = self.mapToScene(event.pos()) if event.button() == Qt.LeftButton: if self.canPan: self.setDragMode(QGraphicsView.ScrollHandDrag) self.leftMouseButtonPressed.emit(scenePos.x(), scenePos.y()) QGraphicsView.mousePressEvent(self, event) def mouseReleaseEvent(self, event): """ Stop mouse pan or zoom mode (apply zoom if valid). """ QGraphicsView.mouseReleaseEvent(self, event) scenePos = self.mapToScene(event.pos()) if event.button() == Qt.LeftButton: self.setDragMode(QGraphicsView.NoDrag) self.leftMouseButtonReleased.emit(scenePos.x(), scenePos.y()) def mouseDoubleClickEvent(self, event): """ Show entire image. """ scenePos = self.mapToScene(event.pos()) if event.button() == Qt.LeftButton: self.leftMouseButtonDoubleClicked.emit(scenePos.x(), scenePos.y()) elif event.button() == Qt.RightButton: if self.canZoom: self.zoomStack = [] # Clear zoom stack. self.updateViewer() self.rightMouseButtonDoubleClicked.emit(scenePos.x(), scenePos.y()) QGraphicsView.mouseDoubleClickEvent(self, event) def __init__(self): super().__init__(self.QtImageViewer()) self._layout.addWidget(self._instance) def set_image_from_data(self, image, width, height, bytes_per_line): img = QImage(image, width, height, bytes_per_line, QImage.Format_RGB888) pixmap = QPixmap.fromImage(img) self._instance.setImage(pixmap) return self def set_image_from_file(self, file_path: str): self._instance.setPixmap(file_path) return self def set_size(self, width, height): # self.__pixmap = self.__pixmap.scaledToWidth(width).scaledToHeight(height) # self._instance.setPixmap(self.__pixmap) return self def get_size(self): return 0, 0 # self.__pixmap.width(), self.__pixmap.height() class CheckBox(Widget, Checkable): def __init__(self, title: str): super().__init__(QCheckBox(title)) self._layout.addWidget(self._instance) def add_clicked_callback(self, callback: callable): self._instance.toggled.connect(callback) return self def set_value(self, state: bool): self._instance.setChecked(state) return self def get_value(self): return self._instance.isChecked() class RadioButton(Widget, Checkable): def __init__(self, title: str): super().__init__(QRadioButton(title)) self._layout.addWidget(self._instance) def set_value(self, state: bool): self._instance.setChecked(state) return self def get_value(self): return self._instance.isChecked() def add_clicked_callback(self, callback: callable): self._instance.toggled.connect(callback) return self class ComboBox(LabeledWidget, ValueContains): def __init__(self): super().__init__(QComboBox()) def _assembly(self): self._layout.addWidget(self._instance) def add_items(self, values: []): """ Add values to combo box @param values: list of values @return: self instance """ for v in values: self._instance.addItem(v) return self def set_value(self, value: int): self._instance.setCurrentIndex(value) def get_value(self): return self._instance.currentIndex() def set_value_changed_callback(self, callback: callable): self._instance.currentIndexChanged.connect(callback) return self class ProgressBar(Widget, ValueContains): class Instance(QObject): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) value_changed = Signal(int, str) def set_value(self, value: int, status: str = ""): self.value_changed.emit(value, status) def __init__(self): super().__init__(QProgressBar()) self._layout.addWidget(self._instance) self.__status = QLabel() self._layout.addWidget(self.__status) self.__InstanceCls = self.Instance() self.__InstanceCls.value_changed.connect(self.__set_value) def set_value(self, value: int, status: str = ""): self.__InstanceCls.value_changed.emit(value, status) def get_value(self): return self._instance.getValue() def set_value_changed_callback(self, callback: callable): self._instance.valueChanged.connect(callback) return self def __set_value(self, value: int, status: str = ""): self._instance.setValue(value) self.__status.setText(status) class Table(Widget): def __init__(self): super().__init__(QTableWidget()) self._instance.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch) self._layout.addWidget(self._instance) def add_row(self, items: []): row_idx = self._instance.rowCount() self._instance.setRowCount(row_idx + 1) for i, item in enumerate(items): self._instance.setItem(row_idx, i, QTableWidgetItem(item)) return self def del_row(self): current_row = self._instance.currentRow() self._instance.removeRow(current_row) return self def set_columns_headers(self, headers: []): self._instance.setColumnCount(len(headers)) self._instance.setHorizontalHeaderLabels(headers) return self class PathDialog(Widget, ValueContains, metaclass=ABCMeta): def __init__(self, label: str, button_label: str): super().__init__(QFileDialog()) self.__label = label self.__button_label = button_label self._default_path = QDir.homePath() self.__value_changed_callbacks = [] self.__line_edit = None self.__button = None def set_default_path(self, default_path: str): self._default_path = default_path return self def get_default_path(self): return self._default_path def get_value(self): res = self.__line_edit.get_value() return None if len(res) < 1 else res def set_value(self, value): if self.__line_edit is not None: self.__line_edit.set_value(value) self.set_default_path(os.path.dirname(value)) for c in self.__value_changed_callbacks: c(value) def set_value_changed_callback(self, callback: callable): self.__value_changed_callbacks.append(callback) return self def _update_value(self) -> None: """ Update path value by dialog """ res = self.call() if res is None or len(res) < 1: return self.set_value(res) @abstractmethod def _call(self) -> str: """ Call dialog window :return: result path """ def call(self) -> str: path = self._call() if path is None or len(path) < 1: return None self.set_value(path) return path def get_layout(self): super().get_layout() self._layout.addWidget(QLabel(self.__label)) self.__line_edit = LineEdit() h_layout = QHBoxLayout() h_layout.addLayout(self.__line_edit.get_layout()) self.__button = Button(self.__button_label, is_tool_button=True).set_on_click_callback(self._update_value) h_layout.addLayout(self.__button.get_layout()) self._layout.addLayout(h_layout) return self._layout def set_enabled(self, is_enabled: bool = True): res = self._may_be_enabled(is_enabled) if self.__line_edit is not None: self.__line_edit.set_enabled(res) if self.__button is not None: self.__button.set_enabled(res) class OpenFile(PathDialog): def __init__(self, label: str): super().__init__(label, "...") self.__files_types = "" def set_files_types(self, types: str): self.__files_types = types return self def _call(self): return self._instance.getOpenFileName(caption="Open File", dir=self._default_path, filter=self.__files_types)[0] class SaveFile(PathDialog): def __init__(self, label: str): super().__init__(label, "...") self.__files_types = "" def set_files_types(self, types: str): self.__files_types = types return self def _call(self): return self._instance.getSaveFileName(caption="Save File", dir=self._default_path, filter=self.__files_types)[0] class OpenDirectory(PathDialog): def __init__(self, label: str): super().__init__(label, "...") def _call(self): return self._instance.getExistingDirectory(caption="Open Directory", dir=self._default_path, options=QFileDialog.ShowDirsOnly | QFileDialog.DontResolveSymlinks) class ListWidget(Widget, ValueContains): def __init__(self): super().__init__(QListWidget()) self._layout.addWidget(self._instance) self.__items = [] def add_item(self, item: str, is_editable=True): self.__items.append(QListWidgetItem(item, self._instance)) if is_editable: self.__items[-1].setFlags(self.__items[-1].flags() | Qt.ItemIsEditable) self._instance.addItem(self.__items[-1]) def add_items(self, items: [str], is_editable=True) -> Widget: for item in items: self.add_item(item, is_editable) return self def remove_item(self, idx: int): self._instance.takeItem(idx) del self.__items[idx] def remove_current(self): self.remove_item(self.get_current_idx()) def get_current_idx(self): return self.__get_item_idx(self._instance.currentItem()) def clear(self): for i in range(len(self.__items)): self.remove_item(i) def set_value(self, value: int): self._instance.setItem(self.__items[value]) def get_value(self): return self.__items.index(self._instance.currentItem()) def set_value_changed_callback(self, callback: callable): self._instance.currentItemChanged.connect(lambda cur, prev: callback(self.__get_item_idx(cur))) return self def set_item_renamed_callback(self, callback: callable): def internal(item: QListWidgetItem): idx = self.__get_item_idx(self._instance.currentItem()) callback(idx, item.text()) self._instance.itemChanged.connect(internal) def __get_item_idx(self, item: QListWidgetItem): for idx, it in enumerate(self.__items): if it is item: return idx return None class DynamicView(Widget): def __init__(self): super().__init__() self.__stacked_layout = QStackedLayout() self._layout.addLayout(self.__stacked_layout) self.__widgets = [] def add_item(self, item: Widget): w = QWidget() w.setLayout(item.get_layout()) self.__stacked_layout.addWidget(w) self.__widgets.append(w) def remove_item(self, idx: int): self.__stacked_layout.takeAt(idx) del self.__widgets[idx] def clear(self): for i in range(len(self.__widgets) - 1): self.remove_item(i) def set_index(self, idx: int): self.__stacked_layout.setCurrentIndex(idx) class OpenGLWidget(Widget): def __init__(self, init_callback: callable, resize_callback: callable, draw_callback: callable): super().__init__(QGLWidget()) self._layout.addWidget(self._instance) self._instance.initializeGL = init_callback self._instance.resizeGL = resize_callback self._instance.paintGL = draw_callback self._instance.setFocusPolicy(Qt.StrongFocus) self._key_buf = [False for _ in range(256)] def set_mouse_move_callback(self, callback: callable): def with_update(event): callback(event.pos().x(), event.pos().y()) self._instance.updateGL() self._instance.mouseMoveEvent = with_update def set_mouse_press_callback(self, callback: callable): self._instance.mousePressEvent = lambda event: callback(event.pos().x(), event.pos().y(), event.buttons() == Qt.LeftButton, True) self._instance.mouseReleaseEvent = lambda event: callback(event.pos().x(), event.pos().y(), event.buttons() == Qt.LeftButton, False) def set_wheel_scroll_event(self, callback: callable): def with_update(event): callback(1 if event.delta() > 0 else -1) self._instance.updateGL() self._instance.wheelEvent = lambda event: with_update(event) def set_keyboard_event(self, callback: callable): def get_code(event): code = event.key() + 32 if code < 0 or code > 255: return None return code def on_press(event): code = get_code(event) if code is None: return self._key_buf[code] = True callback(self._key_buf) self._instance.updateGL() def on_release(event): code = get_code(event) if code is None: return self._key_buf[code] = False self._instance.keyPressEvent = on_press self._instance.keyReleaseEvent = on_release
[ 1, 1053, 5844, 13, 5215, 2897, 13, 13, 3166, 10772, 23908, 29906, 29889, 17303, 6585, 7239, 1053, 660, 7239, 8801, 13, 3166, 10772, 23908, 29906, 29889, 17303, 8801, 29879, 1053, 660, 29963, 3313, 3453, 29892, 660, 29950, 3313, 3453, 29892, 660, 4775, 29892, 660, 3542, 6103, 29892, 660, 27031, 3125, 29892, 660, 28360, 29892, 660, 21818, 3125, 29892, 320, 13, 1678, 660, 26628, 29892, 660, 14470, 4297, 29892, 660, 3562, 8801, 29892, 660, 7850, 1043, 29892, 660, 3562, 8801, 2001, 29892, 660, 2283, 7647, 29892, 660, 12229, 3125, 29892, 660, 8863, 8801, 29892, 320, 13, 1678, 660, 8801, 29892, 660, 1293, 8801, 29892, 660, 1293, 8801, 2001, 29892, 660, 4782, 3313, 29892, 660, 7264, 287, 3453, 29892, 660, 18772, 357, 29892, 660, 17290, 1043, 29892, 660, 17290, 23472, 13, 3166, 10772, 23908, 29906, 29889, 17303, 28707, 1053, 660, 29925, 861, 1958, 29892, 660, 2940, 29892, 660, 11843, 24204, 29892, 660, 2928, 24204, 29892, 660, 4597, 9544, 24204, 29892, 660, 29925, 475, 357, 2605, 13, 3166, 10772, 23908, 29906, 29889, 17303, 9203, 1053, 660, 2061, 29892, 9954, 284, 29892, 660, 9170, 29892, 14705, 29892, 660, 7364, 29943, 13, 3166, 10772, 23908, 29906, 1053, 14705, 9203, 13, 13, 3166, 25638, 1053, 16417, 19346, 29892, 9846, 5696, 13, 13, 3166, 869, 13239, 1053, 4306, 29903, 12483, 13, 13, 13, 1990, 5399, 519, 29898, 2527, 562, 605, 29922, 19658, 19346, 1125, 13, 1678, 732, 16595, 5696, 13, 1678, 822, 788, 29918, 3808, 287, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 9995, 13, 4706, 3462, 6939, 29892, 393, 674, 1246, 363, 1432, 2828, 13, 4706, 584, 3207, 6939, 29901, 6939, 13, 4706, 584, 2457, 29901, 27080, 1203, 13, 4706, 584, 29878, 1853, 29901, 27080, 13, 4706, 9995, 13, 13, 1678, 732, 16595, 5696, 13, 1678, 822, 731, 29918, 1767, 29898, 1311, 29892, 2106, 29901, 6120, 1125, 13, 4706, 9995, 13, 4706, 3789, 2106, 310, 27080, 29901, 7120, 470, 451, 13, 4706, 584, 2457, 29901, 4306, 13, 4706, 584, 29878, 1853, 29901, 1583, 2777, 13, 4706, 9995, 13, 13, 1678, 732, 16595, 5696, 13, 1678, 822, 679, 29918, 1767, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 2106, 310, 27080, 29901, 7120, 470, 451, 13, 4706, 584, 2457, 29901, 4306, 13, 4706, 584, 29878, 1853, 29901, 6120, 13, 4706, 9995, 13, 13, 13, 1990, 27080, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2777, 29901, 660, 2061, 353, 6213, 1125, 13, 4706, 1583, 3032, 2680, 353, 660, 29963, 3313, 3453, 580, 13, 4706, 565, 2777, 338, 451, 6213, 29901, 13, 9651, 1583, 3032, 8758, 353, 2777, 13, 4706, 1583, 3032, 17590, 29918, 22594, 353, 5159, 13, 4706, 1583, 3032, 3859, 29918, 4977, 369, 353, 6213, 13, 4706, 1583, 3032, 2680, 29879, 353, 518, 29984, 29963, 3313, 3453, 580, 29962, 13, 4706, 1583, 3032, 2764, 29918, 3891, 29918, 8030, 353, 6213, 13, 4706, 1583, 3032, 2764, 29918, 5451, 357, 353, 6213, 13, 13, 1678, 822, 731, 29918, 3859, 29918, 4977, 369, 29898, 1311, 29892, 872, 369, 29901, 4306, 29903, 12483, 1125, 13, 4706, 1583, 3032, 3859, 29918, 4977, 369, 353, 872, 369, 13, 13, 1678, 822, 679, 29918, 2680, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 7106, 5912, 310, 11109, 13, 4706, 584, 2457, 29901, 5912, 29892, 3743, 27080, 2777, 13, 4706, 732, 29901, 29878, 1853, 29901, 660, 3453, 13, 4706, 9995, 13, 4706, 1583, 3032, 2680, 29889, 1202, 3453, 29898, 1311, 3032, 2680, 29879, 14352, 29896, 2314, 13, 4706, 736, 1583, 3032, 2680, 13, 13, 1678, 822, 679, 29918, 8758, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 14705, 2777, 310, 11109, 13, 4706, 584, 2457, 29901, 2777, 310, 11109, 313, 19737, 23908, 1203, 29897, 13, 4706, 584, 29878, 1853, 660, 8801, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 8758, 13, 13, 1678, 822, 903, 13029, 29918, 915, 29918, 17590, 29898, 1311, 29892, 338, 29918, 17590, 1125, 13, 4706, 565, 338, 29918, 17590, 29901, 13, 9651, 363, 7111, 297, 1583, 3032, 17590, 29918, 22594, 29901, 13, 18884, 565, 451, 7111, 29889, 657, 29918, 1767, 7295, 13, 462, 1678, 736, 7700, 13, 4706, 736, 338, 29918, 17590, 13, 13, 1678, 822, 731, 29918, 17590, 29898, 1311, 29892, 338, 29918, 17590, 29901, 6120, 353, 5852, 1125, 13, 4706, 9995, 13, 4706, 3789, 11109, 9615, 13, 4706, 584, 3207, 338, 29918, 17590, 29901, 2106, 310, 11109, 29901, 9615, 470, 451, 13, 4706, 584, 2457, 29901, 27080, 1203, 313, 1311, 29897, 13, 4706, 584, 29878, 1853, 29901, 27080, 13, 4706, 9995, 13, 4706, 1583, 3032, 8758, 29889, 842, 10861, 29898, 1311, 3032, 13029, 29918, 915, 29918, 17590, 29898, 275, 29918, 17590, 876, 13, 4706, 736, 1583, 13, 13, 1678, 822, 788, 29918, 17590, 29918, 10836, 29898, 1311, 29892, 10609, 29901, 5399, 519, 1125, 13, 4706, 1583, 29889, 842, 29918, 17590, 29898, 10836, 29889, 657, 29918, 1767, 3101, 13, 4706, 1583, 3032, 17590, 29918, 22594, 29889, 4397, 29898, 10836, 29897, 13, 4706, 10609, 29889, 1202, 29918, 3808, 287, 29918, 14035, 29898, 1311, 29889, 842, 29918, 17590, 29897, 13, 13, 1678, 822, 788, 29918, 8030, 29898, 1311, 29892, 11109, 29901, 376, 8801, 2777, 613, 817, 29918, 8899, 29922, 8824, 29892, 817, 29918, 303, 10301, 29922, 5574, 1125, 13, 4706, 9995, 13, 4706, 3462, 11109, 304, 3474, 5912, 13, 4706, 584, 3207, 11109, 29901, 27080, 5190, 13, 4706, 584, 3207, 817, 29918, 8899, 29901, 338, 817, 304, 3787, 2106, 29871, 310, 6790, 11109, 13, 4706, 584, 3207, 817, 29918, 303, 10301, 29901, 338, 817, 304, 4635, 16116, 2820, 11109, 13, 4706, 584, 2457, 29901, 11109, 2777, 13, 4706, 9995, 13, 4706, 565, 817, 29918, 303, 10301, 29901, 13, 9651, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 855, 10301, 580, 13, 4706, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 3453, 29898, 8030, 29889, 657, 29918, 2680, 3101, 13, 4706, 565, 817, 29918, 303, 10301, 29901, 13, 9651, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 855, 10301, 580, 13, 13, 4706, 565, 817, 29918, 8899, 322, 1583, 3032, 3859, 29918, 4977, 369, 338, 451, 6213, 29901, 13, 9651, 1583, 3032, 3859, 29918, 4977, 369, 29889, 1202, 29918, 8030, 29898, 8030, 29897, 13, 13, 4706, 736, 11109, 13, 13, 1678, 822, 788, 29918, 8030, 29879, 29898, 1311, 29892, 11109, 29879, 29901, 376, 1761, 310, 27080, 8871, 29908, 1125, 13, 4706, 9995, 13, 4706, 3462, 1051, 310, 11109, 29879, 304, 3474, 5912, 13, 4706, 584, 3207, 11109, 29879, 29901, 27080, 10340, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 363, 11109, 297, 11109, 29879, 29901, 13, 9651, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 3453, 29898, 8030, 29889, 657, 29918, 2680, 3101, 13, 13, 1678, 822, 1369, 29918, 22672, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 7370, 14698, 7117, 4635, 291, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 565, 338, 8758, 29898, 1311, 29889, 657, 29918, 3784, 29918, 2680, 3285, 660, 29950, 3313, 3453, 1125, 13, 9651, 736, 13, 4706, 5912, 353, 660, 29950, 3313, 3453, 580, 13, 4706, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 3453, 29898, 2680, 29897, 13, 4706, 1583, 3032, 2680, 29879, 29889, 4397, 29898, 2680, 29897, 13, 13, 1678, 822, 1369, 29918, 18575, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 7370, 11408, 7117, 4635, 291, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 565, 338, 8758, 29898, 1311, 29889, 657, 29918, 3784, 29918, 2680, 3285, 660, 29963, 3313, 3453, 1125, 13, 9651, 736, 13, 4706, 5912, 353, 660, 29963, 3313, 3453, 580, 13, 4706, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 3453, 29898, 2680, 29897, 13, 4706, 1583, 3032, 2680, 29879, 29889, 4397, 29898, 2680, 29897, 13, 13, 1678, 822, 2318, 29918, 22672, 29898, 1311, 29892, 11109, 29879, 29901, 1051, 1125, 13, 4706, 9995, 13, 4706, 15484, 1051, 310, 11109, 29879, 14698, 13, 4706, 584, 3207, 11109, 29879, 29901, 1051, 310, 11109, 29879, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 1583, 29889, 2962, 29918, 22672, 580, 13, 4706, 1583, 29889, 1202, 29918, 8030, 29879, 29898, 8030, 29879, 29897, 13, 4706, 1583, 29889, 20713, 580, 13, 13, 1678, 822, 2318, 29918, 18575, 29898, 1311, 29892, 11109, 29879, 29901, 376, 1761, 310, 27080, 8871, 29908, 1125, 13, 4706, 9995, 13, 4706, 15484, 1051, 310, 11109, 29879, 11408, 13, 4706, 584, 3207, 11109, 29879, 29901, 1051, 310, 11109, 29879, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 1583, 29889, 2962, 29918, 18575, 580, 13, 4706, 1583, 29889, 1202, 29918, 8030, 29879, 29898, 8030, 29879, 29897, 13, 4706, 1583, 29889, 20713, 580, 13, 13, 1678, 822, 1369, 29918, 5451, 357, 29898, 1311, 29892, 19843, 2433, 18575, 29374, 13, 4706, 1583, 3032, 2764, 29918, 5451, 357, 353, 660, 18772, 357, 580, 13, 4706, 1583, 3032, 2764, 29918, 5451, 357, 29889, 842, 25231, 29898, 17303, 29889, 25231, 29889, 24932, 565, 19843, 1275, 525, 22672, 29915, 1683, 14705, 29889, 25231, 29889, 29270, 29897, 13, 4706, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 8801, 29898, 1311, 3032, 2764, 29918, 5451, 357, 29897, 13, 13, 1678, 822, 788, 29918, 5451, 357, 29918, 3493, 29898, 1311, 1125, 13, 4706, 1583, 3032, 2680, 29879, 29889, 4397, 29898, 29984, 29963, 3313, 3453, 3101, 13, 4706, 11109, 353, 660, 8801, 580, 13, 4706, 11109, 29889, 842, 3453, 29898, 1311, 29889, 657, 29918, 3784, 29918, 2680, 3101, 13, 4706, 1583, 3032, 2764, 29918, 5451, 357, 29889, 1202, 8801, 29898, 8030, 29897, 13, 13, 1678, 822, 679, 29918, 3784, 29918, 2680, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 7106, 1857, 5912, 13, 4706, 584, 2457, 29901, 5912, 310, 1134, 660, 3453, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 2680, 29879, 14352, 29896, 29962, 13, 13, 1678, 822, 788, 29918, 517, 29918, 2972, 29918, 1884, 29898, 1311, 29892, 2318, 29918, 978, 29901, 851, 29892, 11109, 29879, 29901, 376, 1761, 310, 27080, 8871, 29908, 1125, 13, 4706, 9995, 13, 4706, 15484, 5912, 304, 2318, 3800, 13, 4706, 584, 3207, 2318, 29918, 978, 29901, 1024, 310, 2318, 13, 4706, 584, 3207, 11109, 29879, 29901, 1051, 310, 11109, 29879, 29892, 393, 1063, 7180, 304, 2318, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 1583, 29889, 2962, 29918, 2972, 29918, 1884, 29898, 2972, 29918, 978, 29897, 13, 4706, 363, 11109, 297, 11109, 29879, 29901, 13, 9651, 1583, 29889, 1202, 29918, 8030, 29898, 8030, 29897, 13, 4706, 1583, 29889, 20713, 580, 13, 13, 1678, 822, 1369, 29918, 2972, 29918, 1884, 29898, 1311, 29892, 1024, 29901, 851, 1125, 13, 4706, 9995, 13, 4706, 7370, 2318, 3800, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 2318, 29918, 1884, 353, 660, 4782, 3313, 29898, 978, 29897, 13, 4706, 2318, 29918, 1884, 29918, 2680, 353, 660, 29963, 3313, 3453, 580, 13, 4706, 2318, 29918, 1884, 29889, 842, 3453, 29898, 2972, 29918, 1884, 29918, 2680, 29897, 13, 4706, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 8801, 29898, 2972, 29918, 1884, 29897, 13, 4706, 1583, 3032, 2680, 29879, 29889, 4397, 29898, 2972, 29918, 1884, 29918, 2680, 29897, 13, 13, 1678, 822, 12611, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 315, 29876, 562, 295, 1833, 3402, 9773, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 4706, 628, 1583, 3032, 2680, 29879, 14352, 29896, 29962, 13, 13, 1678, 822, 4635, 29918, 726, 29918, 1643, 29898, 1311, 29892, 1426, 29892, 338, 29918, 2324, 29922, 8824, 1125, 13, 4706, 11109, 353, 660, 4775, 29898, 726, 29897, 13, 4706, 11109, 29889, 842, 6585, 25865, 6595, 29879, 29898, 275, 29918, 2324, 29897, 13, 4706, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 8801, 29898, 8030, 29897, 13, 13, 1678, 822, 4635, 29918, 3891, 29918, 3493, 29898, 1311, 1125, 13, 4706, 1583, 3032, 2764, 29918, 3891, 29918, 8030, 353, 660, 8863, 8801, 580, 13, 4706, 1583, 29889, 657, 29918, 3784, 29918, 2680, 2141, 1202, 8801, 29898, 1311, 3032, 2764, 29918, 3891, 29918, 8030, 29897, 13, 13, 1678, 822, 788, 29918, 3891, 29898, 1311, 29892, 1024, 1125, 13, 4706, 1583, 3032, 2680, 29879, 29889, 4397, 29898, 29984, 29963, 3313, 3453, 3101, 13, 4706, 11109, 353, 660, 8801, 580, 13, 4706, 11109, 29889, 842, 3453, 29898, 1311, 29889, 657, 29918, 3784, 29918, 2680, 3101, 13, 4706, 1583, 3032, 2764, 29918, 3891, 29918, 8030, 29889, 1202, 8863, 29898, 8030, 29892, 1024, 29897, 13, 13, 13, 1990, 365, 24025, 8801, 29898, 8801, 29892, 1539, 562, 605, 29922, 19658, 19346, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2777, 29901, 660, 2061, 353, 6213, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 8758, 29897, 13, 4706, 1583, 17255, 275, 29918, 465, 6967, 29881, 353, 7700, 13, 13, 1678, 822, 788, 29918, 1643, 29898, 1311, 29892, 1426, 29901, 851, 29892, 2602, 29901, 851, 1125, 13, 4706, 9995, 13, 4706, 3462, 3858, 304, 11109, 13, 4706, 584, 3207, 1426, 29901, 3858, 1426, 13, 4706, 584, 3207, 2602, 29901, 2602, 310, 3858, 6024, 3332, 742, 525, 1563, 742, 525, 1266, 742, 525, 8968, 2033, 13, 4706, 584, 2457, 29901, 1583, 995, 13, 4706, 9995, 13, 4706, 565, 451, 313, 3283, 297, 6024, 3332, 742, 525, 8968, 742, 525, 1563, 742, 525, 1266, 2033, 1125, 13, 9651, 12020, 8960, 703, 29956, 29373, 2602, 363, 3858, 29901, 376, 718, 1426, 29897, 13, 13, 4706, 565, 2602, 297, 6024, 3332, 742, 525, 8968, 2033, 29901, 13, 9651, 1583, 3032, 2680, 353, 660, 29963, 3313, 3453, 580, 13, 4706, 25342, 2602, 297, 6024, 1563, 742, 525, 1266, 2033, 29901, 13, 9651, 1583, 3032, 2680, 353, 660, 29950, 3313, 3453, 580, 13, 13, 4706, 565, 2602, 297, 6024, 3332, 742, 525, 1563, 2033, 29901, 13, 9651, 565, 2602, 1275, 525, 3332, 2396, 13, 18884, 1583, 3032, 2680, 29889, 1202, 855, 10301, 580, 13, 9651, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 2239, 1107, 29898, 726, 876, 13, 9651, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 9651, 565, 2602, 1275, 525, 3332, 2396, 13, 18884, 1583, 3032, 2680, 29889, 1202, 855, 10301, 580, 13, 4706, 25342, 2602, 297, 6024, 8968, 742, 525, 1266, 2033, 29901, 13, 9651, 565, 2602, 1275, 525, 8968, 2396, 13, 18884, 1583, 3032, 2680, 29889, 1202, 855, 10301, 580, 13, 9651, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 9651, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 2239, 1107, 29898, 726, 876, 13, 9651, 565, 2602, 1275, 525, 8968, 2396, 13, 18884, 1583, 3032, 2680, 29889, 1202, 855, 10301, 580, 13, 13, 4706, 1583, 17255, 275, 29918, 465, 6967, 29881, 353, 5852, 13, 4706, 736, 1583, 13, 13, 1678, 822, 679, 29918, 2680, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 7106, 5912, 310, 11109, 13, 4706, 584, 2457, 29901, 5912, 13, 4706, 732, 29901, 29878, 1853, 29901, 660, 3453, 13, 4706, 9995, 13, 4706, 565, 451, 1583, 17255, 275, 29918, 465, 6967, 29881, 29901, 13, 9651, 1583, 3032, 26936, 580, 13, 4706, 736, 1583, 3032, 2680, 13, 13, 1678, 732, 16595, 5696, 13, 1678, 822, 903, 26936, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 13266, 1203, 13, 4706, 584, 2457, 29901, 1203, 2777, 13, 4706, 9995, 13, 13, 13, 1990, 7865, 21409, 29898, 2527, 562, 605, 29922, 19658, 19346, 1125, 13, 1678, 732, 16595, 5696, 13, 1678, 822, 731, 29918, 1767, 29898, 1311, 29892, 995, 1125, 13, 4706, 9995, 13, 4706, 3789, 995, 304, 13, 4706, 584, 3207, 995, 29901, 995, 304, 731, 13, 4706, 584, 2457, 29901, 6213, 13, 4706, 9995, 13, 13, 1678, 732, 16595, 5696, 13, 1678, 822, 679, 29918, 1767, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 995, 13, 4706, 584, 2457, 29901, 1857, 995, 13, 4706, 9995, 13, 13, 1678, 732, 16595, 5696, 13, 1678, 822, 731, 29918, 1767, 29918, 15033, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 9995, 13, 4706, 3789, 6939, 29973, 393, 2000, 746, 995, 297, 11109, 3939, 13, 4706, 584, 2457, 29901, 1583, 1203, 13, 4706, 9995, 13, 13, 13, 1990, 7407, 6103, 29898, 29931, 24025, 8801, 29892, 7865, 21409, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 2239, 457, 6103, 3101, 13, 13, 1678, 822, 731, 29918, 1272, 29918, 1853, 29898, 1311, 29892, 848, 29918, 1853, 29901, 851, 29892, 6528, 29886, 29901, 851, 353, 6213, 1125, 13, 4706, 9995, 13, 4706, 3789, 848, 1134, 29973, 3743, 297, 7407, 6103, 13, 4706, 584, 3207, 848, 29918, 1853, 29901, 1134, 310, 848, 29889, 1714, 411, 1950, 1819, 29901, 11117, 524, 742, 525, 8896, 742, 525, 13087, 29886, 29915, 1836, 960, 731, 525, 13087, 29886, 29915, 1134, 29892, 817, 304, 4529, 6528, 29886, 3443, 13, 4706, 584, 3207, 6528, 29886, 29901, 6528, 29886, 29892, 393, 4175, 1712, 297, 7407, 6103, 13, 4706, 584, 2457, 29901, 1583, 2777, 13, 4706, 9995, 13, 4706, 565, 848, 29918, 1853, 1275, 525, 524, 2396, 13, 9651, 1583, 3032, 8758, 29889, 842, 24204, 29898, 29984, 2928, 24204, 3101, 13, 4706, 25342, 848, 29918, 1853, 1275, 525, 8896, 2396, 13, 9651, 1583, 3032, 8758, 29889, 842, 24204, 29898, 29984, 11843, 24204, 3101, 13, 4706, 25342, 848, 29918, 1853, 1275, 525, 13087, 29886, 2396, 13, 9651, 565, 6528, 29886, 338, 6213, 29901, 13, 18884, 12020, 8960, 703, 4597, 4548, 1838, 29915, 29873, 6790, 363, 7407, 6103, 1159, 13, 9651, 1583, 3032, 8758, 29889, 842, 24204, 29898, 29984, 4597, 9544, 24204, 29898, 13087, 29886, 876, 13, 4706, 1683, 29901, 13, 9651, 12020, 8960, 703, 797, 15728, 848, 29918, 1853, 3443, 995, 29901, 525, 8875, 29915, 297, 7407, 6103, 29889, 842, 29918, 1272, 29918, 1853, 1642, 4830, 29898, 1272, 29918, 1853, 876, 13, 13, 4706, 736, 1583, 13, 13, 1678, 822, 731, 29918, 1767, 29898, 1311, 29892, 995, 29901, 851, 1125, 13, 4706, 9995, 13, 4706, 3789, 995, 304, 13, 4706, 584, 3207, 995, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 1583, 3032, 8758, 29889, 12038, 29898, 1767, 29897, 13, 13, 1678, 822, 679, 29918, 1767, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 1857, 995, 13, 4706, 584, 2457, 29901, 1857, 995, 13, 4706, 9995, 13, 4706, 736, 1583, 3032, 8758, 29889, 726, 580, 13, 13, 1678, 822, 731, 29918, 1767, 29918, 15033, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 1583, 3032, 8758, 29889, 726, 7590, 29889, 6915, 29898, 14035, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 903, 26936, 29898, 1311, 1125, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 13, 13, 1990, 11025, 29898, 8801, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3611, 29901, 851, 29892, 338, 29918, 10154, 29918, 3092, 29901, 6120, 353, 7700, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 29984, 12229, 3125, 580, 565, 338, 29918, 10154, 29918, 3092, 1683, 660, 27031, 3125, 3101, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 4706, 1583, 3032, 8758, 29889, 12038, 29898, 3257, 29897, 13, 13, 1678, 822, 731, 29918, 265, 29918, 3808, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 9995, 13, 4706, 3789, 6939, 373, 2828, 1741, 13, 4706, 584, 3207, 6939, 29901, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 1583, 3032, 8758, 29889, 3808, 287, 29889, 6915, 29898, 14035, 29897, 13, 4706, 736, 1583, 13, 13, 13, 1990, 7084, 3453, 29898, 8801, 1125, 13, 1678, 770, 14705, 2940, 29963, 15580, 29898, 29984, 17290, 1043, 1125, 13, 4706, 9995, 10772, 17303, 1967, 6316, 556, 11109, 363, 263, 660, 29925, 861, 1958, 297, 263, 660, 17290, 1043, 9088, 411, 9495, 19342, 292, 322, 282, 9450, 29889, 13, 4706, 3295, 12922, 263, 660, 2940, 470, 660, 29925, 861, 1958, 313, 29984, 2940, 338, 25106, 11543, 304, 263, 660, 29925, 861, 1958, 467, 13, 4706, 1763, 2479, 738, 916, 1967, 3402, 29892, 366, 1818, 937, 3588, 372, 304, 263, 660, 2940, 470, 660, 29925, 861, 1958, 29889, 13, 4706, 3834, 5407, 1967, 3402, 11301, 3667, 1907, 29901, 13, 9651, 3855, 3027, 29906, 299, 2378, 29901, 11848, 19737, 29871, 299, 2378, 529, 1360, 29958, 660, 2940, 1678, 313, 991, 597, 3292, 29889, 510, 29914, 29882, 1004, 457, 29914, 29939, 3027, 29906, 299, 2378, 29897, 13, 9651, 7084, 17303, 29901, 349, 6227, 7084, 529, 1360, 29958, 660, 2940, 29871, 313, 991, 597, 3292, 29889, 510, 29914, 4691, 29899, 29886, 453, 340, 29914, 29925, 453, 340, 29914, 10054, 29914, 6207, 29914, 2227, 29931, 29914, 2940, 17303, 29889, 2272, 29897, 13, 4706, 25992, 14881, 29901, 13, 9651, 19941, 9495, 2826, 8338, 29901, 6518, 1967, 29889, 13, 9651, 10428, 9495, 2826, 8338, 29901, 17421, 290, 3800, 29889, 13, 9651, 10428, 9495, 2826, 3765, 3808, 29901, 17421, 290, 304, 1510, 4152, 1967, 29889, 13, 4706, 9995, 13, 13, 4706, 396, 25992, 2826, 18470, 20076, 1967, 9088, 313, 29916, 29892, 343, 29897, 10350, 29889, 13, 4706, 396, 1738, 6824, 1152, 1967, 313, 798, 29892, 1897, 29897, 4636, 26190, 29892, 1948, 353, 343, 322, 1897, 353, 921, 29889, 13, 4706, 2175, 14346, 3125, 24104, 353, 9954, 284, 29898, 7411, 29892, 5785, 29897, 13, 4706, 1492, 14346, 3125, 24104, 353, 9954, 284, 29898, 7411, 29892, 5785, 29897, 13, 4706, 2175, 14346, 3125, 1123, 4611, 353, 9954, 284, 29898, 7411, 29892, 5785, 29897, 13, 4706, 1492, 14346, 3125, 1123, 4611, 353, 9954, 284, 29898, 7411, 29892, 5785, 29897, 13, 4706, 2175, 14346, 3125, 11843, 4164, 287, 353, 9954, 284, 29898, 7411, 29892, 5785, 29897, 13, 4706, 1492, 14346, 3125, 11843, 4164, 287, 353, 9954, 284, 29898, 7411, 29892, 5785, 29897, 13, 13, 4706, 822, 4770, 2344, 12035, 1311, 1125, 13, 9651, 660, 17290, 1043, 17255, 2344, 12035, 1311, 29897, 13, 13, 9651, 396, 7084, 338, 8833, 408, 263, 660, 29925, 861, 1958, 297, 263, 660, 17290, 23472, 10959, 304, 445, 660, 17290, 1043, 29889, 13, 9651, 1583, 29889, 24645, 353, 660, 17290, 23472, 580, 13, 9651, 1583, 29889, 842, 23472, 29898, 1311, 29889, 24645, 29897, 13, 13, 9651, 396, 14491, 263, 1887, 4386, 304, 278, 9088, 29915, 29879, 1857, 1967, 9277, 1958, 29889, 13, 9651, 1583, 3032, 29886, 861, 1958, 13554, 353, 6213, 13, 13, 9651, 396, 7084, 9565, 11959, 4464, 29889, 13, 9651, 396, 1738, 6824, 6732, 16786, 16058, 304, 2989, 1967, 29889, 1094, 1103, 11959, 338, 2337, 17262, 746, 19342, 292, 29889, 13, 9651, 396, 259, 14705, 29889, 23805, 2887, 1103, 29934, 20819, 29901, 2522, 744, 1967, 304, 6216, 1776, 637, 29889, 13, 9651, 396, 259, 14705, 29889, 9598, 1022, 2887, 1103, 29934, 20819, 29901, 2522, 744, 1967, 304, 6216, 2768, 1776, 637, 29892, 2225, 29530, 9565, 11959, 29889, 13, 9651, 396, 259, 14705, 29889, 9598, 1022, 2887, 1103, 29934, 20819, 2059, 29777, 292, 29901, 2522, 744, 1967, 304, 5445, 278, 1776, 637, 29892, 2225, 29530, 9565, 11959, 29889, 13, 9651, 1583, 29889, 294, 1103, 29934, 20819, 6818, 353, 14705, 29889, 9598, 1022, 2887, 1103, 29934, 20819, 13, 13, 9651, 396, 28797, 2594, 10468, 29889, 13, 9651, 396, 259, 14705, 29889, 10463, 4297, 2499, 1994, 6880, 29901, 12391, 3697, 263, 6355, 2594, 29889, 13, 9651, 396, 259, 14705, 29889, 10463, 4297, 2499, 1994, 2951, 29901, 29849, 3697, 263, 6355, 2594, 29889, 13, 9651, 396, 259, 14705, 29889, 10463, 4297, 2887, 8139, 19226, 29901, 1383, 1242, 263, 6355, 2594, 871, 746, 19342, 287, 29889, 13, 9651, 1583, 29889, 842, 24932, 10463, 4297, 15644, 29898, 17303, 29889, 10463, 4297, 2499, 1994, 2951, 29897, 13, 9651, 1583, 29889, 842, 29270, 10463, 4297, 15644, 29898, 17303, 29889, 10463, 4297, 2499, 1994, 2951, 29897, 13, 13, 9651, 1583, 29889, 842, 4300, 5404, 24458, 29898, 29984, 17290, 1043, 29889, 24458, 29177, 14346, 29897, 13, 13, 9651, 396, 10292, 310, 660, 7364, 29943, 19342, 16273, 297, 9088, 10350, 29889, 13, 9651, 1583, 29889, 2502, 290, 7264, 353, 5159, 13, 13, 9651, 396, 2379, 810, 363, 427, 17961, 29914, 2218, 17961, 9495, 14881, 29889, 13, 9651, 1583, 29889, 3068, 29999, 29667, 353, 5852, 13, 9651, 1583, 29889, 3068, 23684, 353, 5852, 13, 13, 4706, 822, 756, 2940, 29898, 1311, 1125, 13, 9651, 9995, 16969, 3692, 470, 451, 278, 9088, 3743, 385, 1967, 9277, 1958, 29889, 13, 9651, 9995, 13, 9651, 736, 1583, 3032, 29886, 861, 1958, 13554, 338, 451, 6213, 13, 13, 4706, 822, 2821, 2940, 29898, 1311, 1125, 13, 9651, 9995, 5240, 586, 267, 278, 1857, 1967, 9277, 1958, 515, 278, 9088, 565, 372, 4864, 29889, 13, 9651, 9995, 13, 9651, 565, 1583, 29889, 5349, 2940, 7295, 13, 18884, 1583, 29889, 24645, 29889, 5992, 2001, 29898, 1311, 3032, 29886, 861, 1958, 13554, 29897, 13, 18884, 1583, 3032, 29886, 861, 1958, 13554, 353, 6213, 13, 13, 4706, 822, 9277, 1958, 29898, 1311, 1125, 13, 9651, 9995, 16969, 278, 9088, 29915, 29879, 1857, 1967, 9277, 1958, 408, 263, 660, 29925, 861, 1958, 29892, 470, 1683, 6213, 565, 694, 1967, 4864, 29889, 13, 9651, 584, 29878, 1853, 29901, 660, 29925, 861, 1958, 891, 6213, 13, 9651, 9995, 13, 9651, 565, 1583, 29889, 5349, 2940, 7295, 13, 18884, 736, 1583, 3032, 29886, 861, 1958, 13554, 29889, 29886, 861, 1958, 580, 13, 9651, 736, 6213, 13, 13, 4706, 822, 1967, 29898, 1311, 1125, 13, 9651, 9995, 16969, 278, 9088, 29915, 29879, 1857, 1967, 9277, 1958, 408, 263, 660, 2940, 29892, 470, 1683, 6213, 565, 694, 1967, 4864, 29889, 13, 9651, 584, 29878, 1853, 29901, 660, 2940, 891, 6213, 13, 9651, 9995, 13, 9651, 565, 1583, 29889, 5349, 2940, 7295, 13, 18884, 736, 1583, 3032, 29886, 861, 1958, 13554, 29889, 29886, 861, 1958, 2141, 517, 2940, 580, 13, 9651, 736, 6213, 13, 13, 4706, 822, 731, 2940, 29898, 1311, 29892, 1967, 1125, 13, 9651, 9995, 3789, 278, 9088, 29915, 29879, 1857, 1967, 9277, 1958, 304, 278, 1881, 660, 2940, 470, 660, 29925, 861, 1958, 29889, 13, 9651, 390, 1759, 267, 263, 24875, 2392, 565, 278, 1881, 1967, 756, 1134, 916, 1135, 660, 2940, 470, 660, 29925, 861, 1958, 29889, 13, 9651, 584, 1853, 1967, 29901, 660, 2940, 891, 660, 29925, 861, 1958, 13, 9651, 9995, 13, 9651, 565, 1134, 29898, 3027, 29897, 338, 660, 29925, 861, 1958, 29901, 13, 18884, 9277, 1958, 353, 1967, 13, 9651, 25342, 1134, 29898, 3027, 29897, 338, 660, 2940, 29901, 13, 18884, 9277, 1958, 353, 660, 29925, 861, 1958, 29889, 3166, 2940, 29898, 3027, 29897, 13, 9651, 1683, 29901, 13, 18884, 12020, 24875, 2392, 703, 2940, 29963, 15580, 29889, 842, 2940, 29901, 23125, 1818, 367, 263, 660, 2940, 470, 660, 29925, 861, 1958, 23157, 13, 9651, 565, 1583, 29889, 5349, 2940, 7295, 13, 18884, 1583, 3032, 29886, 861, 1958, 13554, 29889, 842, 29925, 861, 1958, 29898, 29886, 861, 1958, 29897, 13, 9651, 1683, 29901, 13, 18884, 1583, 3032, 29886, 861, 1958, 13554, 353, 1583, 29889, 24645, 29889, 1202, 29925, 861, 1958, 29898, 29886, 861, 1958, 29897, 13, 9651, 1583, 29889, 842, 23472, 7364, 29898, 29984, 7364, 29943, 29898, 29886, 861, 1958, 29889, 1621, 22130, 29871, 396, 3789, 9088, 2159, 304, 1967, 2159, 29889, 13, 9651, 1583, 29889, 5504, 29963, 15580, 580, 13, 13, 4706, 822, 2254, 2940, 4591, 2283, 29898, 1311, 29892, 29729, 1125, 13, 9651, 9995, 16012, 385, 1967, 515, 934, 29889, 13, 9651, 13932, 738, 6273, 29892, 2254, 2940, 4591, 2283, 580, 674, 18218, 263, 934, 7928, 304, 6755, 278, 1967, 934, 29889, 13, 9651, 2973, 263, 29729, 2980, 29892, 2254, 2940, 4591, 2283, 29898, 28926, 29897, 674, 4218, 304, 2254, 278, 6790, 1967, 934, 4153, 29889, 13, 9651, 9995, 13, 9651, 565, 7431, 29898, 28926, 29897, 322, 2897, 29889, 2084, 29889, 275, 1445, 29898, 28926, 1125, 13, 18884, 1967, 353, 660, 2940, 29898, 28926, 29897, 13, 18884, 1583, 29889, 842, 2940, 29898, 3027, 29897, 13, 13, 4706, 822, 2767, 29963, 15580, 29898, 1311, 1125, 13, 9651, 9995, 7704, 1857, 19342, 313, 361, 6445, 4152, 1967, 29892, 3394, 1857, 9565, 11959, 4464, 467, 13, 9651, 9995, 13, 9651, 565, 451, 1583, 29889, 5349, 2940, 7295, 13, 18884, 736, 13, 9651, 565, 7431, 29898, 1311, 29889, 2502, 290, 7264, 29897, 322, 1583, 29889, 24645, 7364, 2141, 11516, 29898, 1311, 29889, 2502, 290, 7264, 14352, 29896, 29962, 1125, 13, 18884, 1583, 29889, 9202, 797, 1043, 29898, 1311, 29889, 2502, 290, 7264, 14352, 29896, 1402, 14705, 29889, 23805, 2887, 1103, 29934, 20819, 29897, 29871, 396, 7704, 19342, 287, 7705, 313, 17281, 9565, 11959, 467, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 2502, 290, 7264, 353, 5159, 29871, 396, 17732, 278, 19342, 5096, 313, 262, 1206, 591, 2355, 1244, 1363, 310, 385, 8340, 19342, 467, 13, 18884, 1583, 29889, 9202, 797, 1043, 29898, 1311, 29889, 24645, 7364, 3285, 1583, 29889, 294, 1103, 29934, 20819, 6818, 29897, 29871, 396, 7704, 4152, 1967, 313, 1509, 1857, 9565, 11959, 4464, 467, 13, 13, 4706, 822, 19490, 2624, 29898, 1311, 29892, 1741, 1125, 13, 9651, 9995, 341, 2365, 475, 1857, 19342, 373, 19490, 29889, 13, 9651, 9995, 13, 9651, 1583, 29889, 5504, 29963, 15580, 580, 13, 13, 4706, 822, 18875, 2624, 29898, 1311, 29892, 1741, 1125, 13, 9651, 6287, 29918, 19790, 353, 29871, 29896, 29889, 29896, 13, 13, 9651, 565, 1741, 29889, 4181, 580, 1405, 29871, 29900, 29901, 13, 18884, 1583, 29889, 7052, 29898, 7052, 29918, 19790, 29892, 6287, 29918, 19790, 29897, 13, 9651, 1683, 29901, 13, 18884, 1583, 29889, 7052, 29898, 29896, 847, 6287, 29918, 19790, 29892, 29871, 29896, 847, 6287, 29918, 19790, 29897, 13, 13, 4706, 822, 9495, 10923, 2624, 29898, 1311, 29892, 1741, 1125, 13, 9651, 9995, 7370, 9495, 7243, 470, 19342, 4464, 29889, 13, 9651, 9995, 13, 9651, 9088, 9135, 353, 1583, 29889, 1958, 1762, 23472, 29898, 3696, 29889, 1066, 3101, 13, 9651, 565, 1741, 29889, 3092, 580, 1275, 14705, 29889, 8091, 3125, 29901, 13, 18884, 565, 1583, 29889, 3068, 23684, 29901, 13, 462, 1678, 1583, 29889, 842, 23978, 6818, 29898, 29984, 17290, 1043, 29889, 10463, 3481, 23978, 29897, 13, 18884, 1583, 29889, 1563, 14346, 3125, 24104, 29889, 21976, 29898, 24645, 9135, 29889, 29916, 3285, 9088, 9135, 29889, 29891, 3101, 13, 9651, 660, 17290, 1043, 29889, 15769, 10923, 2624, 29898, 1311, 29892, 1741, 29897, 13, 13, 4706, 822, 9495, 19729, 2624, 29898, 1311, 29892, 1741, 1125, 13, 9651, 9995, 22303, 9495, 7243, 470, 19342, 4464, 313, 7302, 19342, 565, 2854, 467, 13, 9651, 9995, 13, 9651, 660, 17290, 1043, 29889, 15769, 19729, 2624, 29898, 1311, 29892, 1741, 29897, 13, 9651, 9088, 9135, 353, 1583, 29889, 1958, 1762, 23472, 29898, 3696, 29889, 1066, 3101, 13, 9651, 565, 1741, 29889, 3092, 580, 1275, 14705, 29889, 8091, 3125, 29901, 13, 18884, 1583, 29889, 842, 23978, 6818, 29898, 29984, 17290, 1043, 29889, 3782, 23978, 29897, 13, 18884, 1583, 29889, 1563, 14346, 3125, 1123, 4611, 29889, 21976, 29898, 24645, 9135, 29889, 29916, 3285, 9088, 9135, 29889, 29891, 3101, 13, 13, 4706, 822, 9495, 11843, 4164, 2624, 29898, 1311, 29892, 1741, 1125, 13, 9651, 9995, 7704, 4152, 1967, 29889, 13, 9651, 9995, 13, 9651, 9088, 9135, 353, 1583, 29889, 1958, 1762, 23472, 29898, 3696, 29889, 1066, 3101, 13, 9651, 565, 1741, 29889, 3092, 580, 1275, 14705, 29889, 8091, 3125, 29901, 13, 18884, 1583, 29889, 1563, 14346, 3125, 11843, 4164, 287, 29889, 21976, 29898, 24645, 9135, 29889, 29916, 3285, 9088, 9135, 29889, 29891, 3101, 13, 9651, 25342, 1741, 29889, 3092, 580, 1275, 14705, 29889, 7341, 3125, 29901, 13, 18884, 565, 1583, 29889, 3068, 29999, 29667, 29901, 13, 462, 1678, 1583, 29889, 2502, 290, 7264, 353, 5159, 29871, 396, 17732, 19342, 5096, 29889, 13, 462, 1678, 1583, 29889, 5504, 29963, 15580, 580, 13, 18884, 1583, 29889, 1266, 14346, 3125, 11843, 4164, 287, 29889, 21976, 29898, 24645, 9135, 29889, 29916, 3285, 9088, 9135, 29889, 29891, 3101, 13, 13, 9651, 660, 17290, 1043, 29889, 15769, 11843, 4164, 2624, 29898, 1311, 29892, 1741, 29897, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1311, 29889, 17303, 2940, 29963, 15580, 3101, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 13, 1678, 822, 731, 29918, 3027, 29918, 3166, 29918, 1272, 29898, 1311, 29892, 1967, 29892, 2920, 29892, 3171, 29892, 6262, 29918, 546, 29918, 1220, 1125, 13, 4706, 10153, 353, 660, 2940, 29898, 3027, 29892, 2920, 29892, 3171, 29892, 6262, 29918, 546, 29918, 1220, 29892, 660, 2940, 29889, 5809, 29918, 28212, 29947, 29947, 29947, 29897, 13, 4706, 9277, 1958, 353, 660, 29925, 861, 1958, 29889, 3166, 2940, 29898, 2492, 29897, 13, 4706, 1583, 3032, 8758, 29889, 842, 2940, 29898, 29886, 861, 1958, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 731, 29918, 3027, 29918, 3166, 29918, 1445, 29898, 1311, 29892, 934, 29918, 2084, 29901, 851, 1125, 13, 4706, 1583, 3032, 8758, 29889, 842, 29925, 861, 1958, 29898, 1445, 29918, 2084, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 731, 29918, 2311, 29898, 1311, 29892, 2920, 29892, 3171, 1125, 13, 4706, 396, 1583, 17255, 29886, 861, 1958, 353, 1583, 17255, 29886, 861, 1958, 29889, 7052, 29881, 1762, 6110, 29898, 2103, 467, 7052, 29881, 1762, 7011, 29898, 3545, 29897, 13, 4706, 396, 1583, 3032, 8758, 29889, 842, 29925, 861, 1958, 29898, 1311, 17255, 29886, 861, 1958, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 679, 29918, 2311, 29898, 1311, 1125, 13, 4706, 736, 29871, 29900, 29892, 29871, 29900, 29871, 396, 1583, 17255, 29886, 861, 1958, 29889, 2103, 3285, 1583, 17255, 29886, 861, 1958, 29889, 3545, 580, 13, 13, 13, 1990, 5399, 3313, 29898, 8801, 29892, 5399, 519, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3611, 29901, 851, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 29984, 28360, 29898, 3257, 876, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 13, 1678, 822, 788, 29918, 3808, 287, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 1583, 3032, 8758, 29889, 29873, 468, 29887, 839, 29889, 6915, 29898, 14035, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 731, 29918, 1767, 29898, 1311, 29892, 2106, 29901, 6120, 1125, 13, 4706, 1583, 3032, 8758, 29889, 842, 17817, 29898, 3859, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 679, 29918, 1767, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 8758, 29889, 275, 17817, 580, 13, 13, 13, 1990, 9204, 3125, 29898, 8801, 29892, 5399, 519, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3611, 29901, 851, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 29984, 21818, 3125, 29898, 3257, 876, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 13, 1678, 822, 731, 29918, 1767, 29898, 1311, 29892, 2106, 29901, 6120, 1125, 13, 4706, 1583, 3032, 8758, 29889, 842, 17817, 29898, 3859, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 679, 29918, 1767, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 8758, 29889, 275, 17817, 580, 13, 13, 1678, 822, 788, 29918, 3808, 287, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 1583, 3032, 8758, 29889, 29873, 468, 29887, 839, 29889, 6915, 29898, 14035, 29897, 13, 4706, 736, 1583, 13, 13, 13, 1990, 422, 17801, 29898, 29931, 24025, 8801, 29892, 7865, 21409, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 29984, 26628, 3101, 13, 13, 1678, 822, 903, 26936, 29898, 1311, 1125, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 13, 1678, 822, 788, 29918, 7076, 29898, 1311, 29892, 1819, 29901, 5159, 1125, 13, 4706, 9995, 13, 4706, 3462, 1819, 304, 419, 833, 3800, 13, 4706, 732, 3207, 1819, 29901, 1051, 310, 1819, 13, 4706, 732, 2457, 29901, 1583, 2777, 13, 4706, 9995, 13, 4706, 363, 325, 297, 1819, 29901, 13, 9651, 1583, 3032, 8758, 29889, 1202, 2001, 29898, 29894, 29897, 13, 13, 4706, 736, 1583, 13, 13, 1678, 822, 731, 29918, 1767, 29898, 1311, 29892, 995, 29901, 938, 1125, 13, 4706, 1583, 3032, 8758, 29889, 842, 7583, 3220, 29898, 1767, 29897, 13, 13, 1678, 822, 679, 29918, 1767, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 8758, 29889, 3784, 3220, 580, 13, 13, 1678, 822, 731, 29918, 1767, 29918, 15033, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 1583, 3032, 8758, 29889, 3784, 3220, 7590, 29889, 6915, 29898, 14035, 29897, 13, 4706, 736, 1583, 13, 13, 13, 1990, 20018, 4297, 29898, 8801, 29892, 7865, 21409, 1125, 13, 1678, 770, 2799, 749, 29898, 29984, 2061, 1125, 13, 4706, 822, 4770, 2344, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 9651, 2428, 2141, 1649, 2344, 1649, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 995, 29918, 15033, 353, 9954, 284, 29898, 524, 29892, 851, 29897, 13, 13, 4706, 822, 731, 29918, 1767, 29898, 1311, 29892, 995, 29901, 938, 29892, 4660, 29901, 851, 353, 5124, 1125, 13, 9651, 1583, 29889, 1767, 29918, 15033, 29889, 21976, 29898, 1767, 29892, 4660, 29897, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 29984, 14470, 4297, 3101, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 13, 4706, 1583, 17255, 4882, 353, 660, 4775, 580, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 17255, 4882, 29897, 13, 13, 4706, 1583, 17255, 4998, 29907, 3137, 353, 1583, 29889, 4998, 580, 13, 4706, 1583, 17255, 4998, 29907, 3137, 29889, 1767, 29918, 15033, 29889, 6915, 29898, 1311, 17255, 842, 29918, 1767, 29897, 13, 13, 1678, 822, 731, 29918, 1767, 29898, 1311, 29892, 995, 29901, 938, 29892, 4660, 29901, 851, 353, 5124, 1125, 13, 4706, 1583, 17255, 4998, 29907, 3137, 29889, 1767, 29918, 15033, 29889, 21976, 29898, 1767, 29892, 4660, 29897, 13, 13, 1678, 822, 679, 29918, 1767, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 8758, 29889, 23433, 580, 13, 13, 1678, 822, 731, 29918, 1767, 29918, 15033, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 1583, 3032, 8758, 29889, 1767, 7590, 29889, 6915, 29898, 14035, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 4770, 842, 29918, 1767, 29898, 1311, 29892, 995, 29901, 938, 29892, 4660, 29901, 851, 353, 5124, 1125, 13, 4706, 1583, 3032, 8758, 29889, 842, 1917, 29898, 1767, 29897, 13, 4706, 1583, 17255, 4882, 29889, 12038, 29898, 4882, 29897, 13, 13, 13, 1990, 6137, 29898, 8801, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 29984, 3562, 8801, 3101, 13, 4706, 1583, 3032, 8758, 29889, 22672, 7850, 2141, 842, 13438, 1666, 675, 6818, 29898, 29984, 7850, 1043, 29889, 855, 10301, 29897, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 13, 1678, 822, 788, 29918, 798, 29898, 1311, 29892, 4452, 29901, 5159, 1125, 13, 4706, 1948, 29918, 13140, 353, 1583, 3032, 8758, 29889, 798, 3981, 580, 13, 4706, 1583, 3032, 8758, 29889, 842, 4301, 3981, 29898, 798, 29918, 13140, 718, 29871, 29896, 29897, 13, 4706, 363, 474, 29892, 2944, 297, 26985, 29898, 7076, 1125, 13, 9651, 1583, 3032, 8758, 29889, 842, 2001, 29898, 798, 29918, 13140, 29892, 474, 29892, 660, 3562, 8801, 2001, 29898, 667, 876, 13, 4706, 736, 1583, 13, 13, 1678, 822, 628, 29918, 798, 29898, 1311, 1125, 13, 4706, 1857, 29918, 798, 353, 1583, 3032, 8758, 29889, 3784, 4301, 580, 13, 4706, 1583, 3032, 8758, 29889, 5992, 4301, 29898, 3784, 29918, 798, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 731, 29918, 13099, 29918, 13662, 29898, 1311, 29892, 9066, 29901, 5159, 1125, 13, 4706, 1583, 3032, 8758, 29889, 842, 4409, 3981, 29898, 2435, 29898, 13662, 876, 13, 4706, 1583, 3032, 8758, 29889, 842, 24932, 7850, 4775, 29879, 29898, 13662, 29897, 13, 4706, 736, 1583, 13, 13, 13, 1990, 10802, 7647, 29898, 8801, 29892, 7865, 21409, 29892, 1539, 562, 605, 29922, 19658, 19346, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3858, 29901, 851, 29892, 2826, 29918, 1643, 29901, 851, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 29984, 2283, 7647, 3101, 13, 4706, 1583, 17255, 1643, 353, 3858, 13, 4706, 1583, 17255, 3092, 29918, 1643, 353, 2826, 29918, 1643, 13, 4706, 1583, 3032, 4381, 29918, 2084, 353, 660, 9170, 29889, 5184, 2605, 580, 13, 13, 4706, 1583, 17255, 1767, 29918, 15033, 29918, 14035, 29879, 353, 5159, 13, 13, 4706, 1583, 17255, 1220, 29918, 5628, 353, 6213, 13, 4706, 1583, 17255, 3092, 353, 6213, 13, 13, 1678, 822, 731, 29918, 4381, 29918, 2084, 29898, 1311, 29892, 2322, 29918, 2084, 29901, 851, 1125, 13, 4706, 1583, 3032, 4381, 29918, 2084, 353, 2322, 29918, 2084, 13, 4706, 736, 1583, 13, 13, 1678, 822, 679, 29918, 4381, 29918, 2084, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 4381, 29918, 2084, 13, 13, 1678, 822, 679, 29918, 1767, 29898, 1311, 1125, 13, 4706, 620, 353, 1583, 17255, 1220, 29918, 5628, 29889, 657, 29918, 1767, 580, 13, 4706, 736, 6213, 565, 7431, 29898, 690, 29897, 529, 29871, 29896, 1683, 620, 13, 13, 1678, 822, 731, 29918, 1767, 29898, 1311, 29892, 995, 1125, 13, 4706, 565, 1583, 17255, 1220, 29918, 5628, 338, 451, 6213, 29901, 13, 9651, 1583, 17255, 1220, 29918, 5628, 29889, 842, 29918, 1767, 29898, 1767, 29897, 13, 4706, 1583, 29889, 842, 29918, 4381, 29918, 2084, 29898, 359, 29889, 2084, 29889, 25721, 29898, 1767, 876, 13, 13, 4706, 363, 274, 297, 1583, 17255, 1767, 29918, 15033, 29918, 14035, 29879, 29901, 13, 9651, 274, 29898, 1767, 29897, 13, 13, 1678, 822, 731, 29918, 1767, 29918, 15033, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 1583, 17255, 1767, 29918, 15033, 29918, 14035, 29879, 29889, 4397, 29898, 14035, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 903, 5504, 29918, 1767, 29898, 1311, 29897, 1599, 6213, 29901, 13, 4706, 9995, 13, 4706, 10318, 2224, 995, 491, 7928, 13, 4706, 9995, 13, 4706, 620, 353, 1583, 29889, 4804, 580, 13, 4706, 565, 620, 338, 6213, 470, 7431, 29898, 690, 29897, 529, 29871, 29896, 29901, 13, 9651, 736, 13, 4706, 1583, 29889, 842, 29918, 1767, 29898, 690, 29897, 13, 13, 1678, 732, 16595, 5696, 13, 1678, 822, 903, 4804, 29898, 1311, 29897, 1599, 851, 29901, 13, 4706, 9995, 13, 4706, 8251, 7928, 3474, 13, 4706, 584, 2457, 29901, 1121, 2224, 13, 4706, 9995, 13, 13, 1678, 822, 1246, 29898, 1311, 29897, 1599, 851, 29901, 13, 4706, 2224, 353, 1583, 3032, 4804, 580, 13, 4706, 565, 2224, 338, 6213, 470, 7431, 29898, 2084, 29897, 529, 29871, 29896, 29901, 13, 9651, 736, 6213, 13, 4706, 1583, 29889, 842, 29918, 1767, 29898, 2084, 29897, 13, 4706, 736, 2224, 13, 13, 1678, 822, 679, 29918, 2680, 29898, 1311, 1125, 13, 4706, 2428, 2141, 657, 29918, 2680, 580, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 2239, 1107, 29898, 1311, 17255, 1643, 876, 13, 13, 4706, 1583, 17255, 1220, 29918, 5628, 353, 7407, 6103, 580, 13, 4706, 298, 29918, 2680, 353, 660, 29950, 3313, 3453, 580, 13, 4706, 298, 29918, 2680, 29889, 1202, 3453, 29898, 1311, 17255, 1220, 29918, 5628, 29889, 657, 29918, 2680, 3101, 13, 4706, 1583, 17255, 3092, 353, 11025, 29898, 1311, 17255, 3092, 29918, 1643, 29892, 338, 29918, 10154, 29918, 3092, 29922, 5574, 467, 842, 29918, 265, 29918, 3808, 29918, 14035, 29898, 1311, 3032, 5504, 29918, 1767, 29897, 13, 4706, 298, 29918, 2680, 29889, 1202, 3453, 29898, 1311, 17255, 3092, 29889, 657, 29918, 2680, 3101, 13, 4706, 1583, 3032, 2680, 29889, 1202, 3453, 29898, 29882, 29918, 2680, 29897, 13, 4706, 736, 1583, 3032, 2680, 13, 13, 1678, 822, 731, 29918, 17590, 29898, 1311, 29892, 338, 29918, 17590, 29901, 6120, 353, 5852, 1125, 13, 4706, 620, 353, 1583, 3032, 13029, 29918, 915, 29918, 17590, 29898, 275, 29918, 17590, 29897, 13, 4706, 565, 1583, 17255, 1220, 29918, 5628, 338, 451, 6213, 29901, 13, 9651, 1583, 17255, 1220, 29918, 5628, 29889, 842, 29918, 17590, 29898, 690, 29897, 13, 4706, 565, 1583, 17255, 3092, 338, 451, 6213, 29901, 13, 9651, 1583, 17255, 3092, 29889, 842, 29918, 17590, 29898, 690, 29897, 13, 13, 13, 1990, 4673, 2283, 29898, 2605, 7647, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3858, 29901, 851, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1643, 29892, 29804, 1159, 13, 4706, 1583, 17255, 5325, 29918, 8768, 353, 5124, 13, 13, 1678, 822, 731, 29918, 5325, 29918, 8768, 29898, 1311, 29892, 4072, 29901, 851, 1125, 13, 4706, 1583, 17255, 5325, 29918, 8768, 353, 4072, 13, 4706, 736, 1583, 13, 13, 1678, 822, 903, 4804, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 8758, 29889, 657, 6585, 17020, 29898, 6671, 543, 6585, 3497, 613, 4516, 29922, 1311, 3032, 4381, 29918, 2084, 29892, 4175, 29922, 1311, 17255, 5325, 29918, 8768, 9601, 29900, 29962, 13, 13, 13, 1990, 16913, 2283, 29898, 2605, 7647, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3858, 29901, 851, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1643, 29892, 29804, 1159, 13, 4706, 1583, 17255, 5325, 29918, 8768, 353, 5124, 13, 13, 1678, 822, 731, 29918, 5325, 29918, 8768, 29898, 1311, 29892, 4072, 29901, 851, 1125, 13, 4706, 1583, 17255, 5325, 29918, 8768, 353, 4072, 13, 4706, 736, 1583, 13, 13, 1678, 822, 903, 4804, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 8758, 29889, 657, 11371, 17020, 29898, 6671, 543, 11371, 3497, 613, 4516, 29922, 1311, 3032, 4381, 29918, 2084, 29892, 4175, 29922, 1311, 17255, 5325, 29918, 8768, 9601, 29900, 29962, 13, 13, 13, 1990, 4673, 9882, 29898, 2605, 7647, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3858, 29901, 851, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 1643, 29892, 29804, 1159, 13, 13, 1678, 822, 903, 4804, 29898, 1311, 1125, 13, 4706, 736, 1583, 3032, 8758, 29889, 657, 1252, 15423, 9882, 29898, 6671, 543, 6585, 18862, 613, 4516, 29922, 1311, 3032, 4381, 29918, 2084, 29892, 13, 462, 462, 462, 259, 3987, 29922, 29984, 2283, 7647, 29889, 8964, 9170, 29879, 11730, 891, 660, 2283, 7647, 29889, 29928, 609, 12375, 345, 29903, 21053, 19363, 29897, 13, 13, 13, 1990, 2391, 8801, 29898, 8801, 29892, 7865, 21409, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 29984, 1293, 8801, 3101, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 4706, 1583, 17255, 7076, 353, 5159, 13, 13, 1678, 822, 788, 29918, 667, 29898, 1311, 29892, 2944, 29901, 851, 29892, 338, 29918, 5628, 519, 29922, 5574, 1125, 13, 4706, 1583, 17255, 7076, 29889, 4397, 29898, 29984, 1293, 8801, 2001, 29898, 667, 29892, 1583, 3032, 8758, 876, 13, 4706, 565, 338, 29918, 5628, 519, 29901, 13, 9651, 1583, 17255, 7076, 14352, 29896, 1822, 842, 15675, 29898, 1311, 17255, 7076, 14352, 29896, 1822, 15764, 580, 891, 14705, 29889, 2001, 3624, 6103, 519, 29897, 13, 4706, 1583, 3032, 8758, 29889, 1202, 2001, 29898, 1311, 17255, 7076, 14352, 29896, 2314, 13, 13, 1678, 822, 788, 29918, 7076, 29898, 1311, 29892, 4452, 29901, 518, 710, 1402, 338, 29918, 5628, 519, 29922, 5574, 29897, 1599, 27080, 29901, 13, 4706, 363, 2944, 297, 4452, 29901, 13, 9651, 1583, 29889, 1202, 29918, 667, 29898, 667, 29892, 338, 29918, 5628, 519, 29897, 13, 4706, 736, 1583, 13, 13, 1678, 822, 3349, 29918, 667, 29898, 1311, 29892, 22645, 29901, 938, 1125, 13, 4706, 1583, 3032, 8758, 29889, 19730, 2001, 29898, 13140, 29897, 13, 4706, 628, 1583, 17255, 7076, 29961, 13140, 29962, 13, 13, 1678, 822, 3349, 29918, 3784, 29898, 1311, 1125, 13, 4706, 1583, 29889, 5992, 29918, 667, 29898, 1311, 29889, 657, 29918, 3784, 29918, 13140, 3101, 13, 13, 1678, 822, 679, 29918, 3784, 29918, 13140, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 657, 29918, 667, 29918, 13140, 29898, 1311, 3032, 8758, 29889, 3784, 2001, 3101, 13, 13, 1678, 822, 2821, 29898, 1311, 1125, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 1311, 17255, 7076, 22164, 13, 9651, 1583, 29889, 5992, 29918, 667, 29898, 29875, 29897, 13, 13, 1678, 822, 731, 29918, 1767, 29898, 1311, 29892, 995, 29901, 938, 1125, 13, 4706, 1583, 3032, 8758, 29889, 842, 2001, 29898, 1311, 17255, 7076, 29961, 1767, 2314, 13, 13, 1678, 822, 679, 29918, 1767, 29898, 1311, 1125, 13, 4706, 736, 1583, 17255, 7076, 29889, 2248, 29898, 1311, 3032, 8758, 29889, 3784, 2001, 3101, 13, 13, 1678, 822, 731, 29918, 1767, 29918, 15033, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 1583, 3032, 8758, 29889, 3784, 2001, 7590, 29889, 6915, 29898, 2892, 3151, 29892, 12379, 29901, 6939, 29898, 1311, 17255, 657, 29918, 667, 29918, 13140, 29898, 2764, 4961, 13, 4706, 736, 1583, 13, 13, 1678, 822, 731, 29918, 667, 29918, 1267, 2795, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 822, 7463, 29898, 667, 29901, 660, 1293, 8801, 2001, 1125, 13, 9651, 22645, 353, 1583, 17255, 657, 29918, 667, 29918, 13140, 29898, 1311, 3032, 8758, 29889, 3784, 2001, 3101, 13, 9651, 6939, 29898, 13140, 29892, 2944, 29889, 726, 3101, 13, 13, 4706, 1583, 3032, 8758, 29889, 667, 7590, 29889, 6915, 29898, 7564, 29897, 13, 13, 1678, 822, 4770, 657, 29918, 667, 29918, 13140, 29898, 1311, 29892, 2944, 29901, 660, 1293, 8801, 2001, 1125, 13, 4706, 363, 22645, 29892, 372, 297, 26985, 29898, 1311, 17255, 7076, 1125, 13, 9651, 565, 372, 338, 2944, 29901, 13, 18884, 736, 22645, 13, 4706, 736, 6213, 13, 13, 13, 1990, 27747, 1043, 29898, 8801, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 2141, 1649, 2344, 1649, 580, 13, 4706, 1583, 17255, 1429, 287, 29918, 2680, 353, 660, 7264, 287, 3453, 580, 13, 4706, 1583, 3032, 2680, 29889, 1202, 3453, 29898, 1311, 17255, 1429, 287, 29918, 2680, 29897, 13, 13, 4706, 1583, 17255, 8030, 29879, 353, 5159, 13, 13, 1678, 822, 788, 29918, 667, 29898, 1311, 29892, 2944, 29901, 27080, 1125, 13, 4706, 281, 353, 660, 8801, 580, 13, 4706, 281, 29889, 842, 3453, 29898, 667, 29889, 657, 29918, 2680, 3101, 13, 4706, 1583, 17255, 1429, 287, 29918, 2680, 29889, 1202, 8801, 29898, 29893, 29897, 13, 4706, 1583, 17255, 8030, 29879, 29889, 4397, 29898, 29893, 29897, 13, 13, 1678, 822, 3349, 29918, 667, 29898, 1311, 29892, 22645, 29901, 938, 1125, 13, 4706, 1583, 17255, 1429, 287, 29918, 2680, 29889, 19730, 4178, 29898, 13140, 29897, 13, 4706, 628, 1583, 17255, 8030, 29879, 29961, 13140, 29962, 13, 13, 1678, 822, 2821, 29898, 1311, 1125, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 1311, 17255, 8030, 29879, 29897, 448, 29871, 29896, 1125, 13, 9651, 1583, 29889, 5992, 29918, 667, 29898, 29875, 29897, 13, 13, 1678, 822, 731, 29918, 2248, 29898, 1311, 29892, 22645, 29901, 938, 1125, 13, 4706, 1583, 17255, 1429, 287, 29918, 2680, 29889, 842, 7583, 3220, 29898, 13140, 29897, 13, 13, 13, 1990, 29508, 8801, 29898, 8801, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2069, 29918, 14035, 29901, 1246, 519, 29892, 19490, 29918, 14035, 29901, 1246, 519, 29892, 4216, 29918, 14035, 29901, 1246, 519, 1125, 13, 4706, 2428, 2141, 1649, 2344, 12035, 29984, 7239, 8801, 3101, 13, 4706, 1583, 3032, 2680, 29889, 1202, 8801, 29898, 1311, 3032, 8758, 29897, 13, 13, 4706, 1583, 3032, 8758, 29889, 24926, 7239, 353, 2069, 29918, 14035, 13, 4706, 1583, 3032, 8758, 29889, 21476, 7239, 353, 19490, 29918, 14035, 13, 4706, 1583, 3032, 8758, 29889, 29886, 2365, 7239, 353, 4216, 29918, 14035, 13, 4706, 1583, 3032, 8758, 29889, 842, 20560, 15644, 29898, 17303, 29889, 5015, 549, 20560, 29897, 13, 4706, 1583, 3032, 1989, 29918, 9721, 353, 518, 8824, 363, 903, 297, 3464, 29898, 29906, 29945, 29953, 4638, 13, 13, 1678, 822, 731, 29918, 15769, 29918, 11631, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 822, 411, 29918, 5504, 29898, 3696, 1125, 13, 9651, 6939, 29898, 3696, 29889, 1066, 2141, 29916, 3285, 1741, 29889, 1066, 2141, 29891, 3101, 13, 9651, 1583, 3032, 8758, 29889, 5504, 7239, 580, 13, 4706, 1583, 3032, 8758, 29889, 15769, 16619, 2624, 353, 411, 29918, 5504, 13, 13, 1678, 822, 731, 29918, 15769, 29918, 2139, 29918, 14035, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 1583, 3032, 8758, 29889, 15769, 10923, 2624, 353, 14013, 1741, 29901, 6939, 29898, 3696, 29889, 1066, 2141, 29916, 3285, 1741, 29889, 1066, 2141, 29891, 3285, 1741, 29889, 4187, 7453, 580, 1275, 14705, 29889, 8091, 3125, 29892, 5852, 29897, 13, 4706, 1583, 3032, 8758, 29889, 15769, 19729, 2624, 353, 14013, 1741, 29901, 6939, 29898, 3696, 29889, 1066, 2141, 29916, 3285, 1741, 29889, 1066, 2141, 29891, 3285, 1741, 29889, 4187, 7453, 580, 1275, 14705, 29889, 8091, 3125, 29892, 7700, 29897, 13, 13, 1678, 822, 731, 29918, 29893, 10552, 29918, 10510, 29918, 3696, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 822, 411, 29918, 5504, 29898, 3696, 1125, 13, 9651, 6939, 29898, 29896, 565, 1741, 29889, 4181, 580, 1405, 29871, 29900, 1683, 448, 29896, 29897, 13, 9651, 1583, 3032, 8758, 29889, 5504, 7239, 580, 13, 4706, 1583, 3032, 8758, 29889, 29893, 10552, 2624, 353, 14013, 1741, 29901, 411, 29918, 5504, 29898, 3696, 29897, 13, 13, 1678, 822, 731, 29918, 1989, 3377, 29918, 3696, 29898, 1311, 29892, 6939, 29901, 1246, 519, 1125, 13, 4706, 822, 679, 29918, 401, 29898, 3696, 1125, 13, 9651, 775, 353, 1741, 29889, 1989, 580, 718, 29871, 29941, 29906, 13, 13, 9651, 565, 775, 529, 29871, 29900, 470, 775, 1405, 29871, 29906, 29945, 29945, 29901, 13, 18884, 736, 6213, 13, 9651, 736, 775, 13, 13, 4706, 822, 373, 29918, 2139, 29898, 3696, 1125, 13, 9651, 775, 353, 679, 29918, 401, 29898, 3696, 29897, 13, 9651, 565, 775, 338, 6213, 29901, 13, 18884, 736, 13, 9651, 1583, 3032, 1989, 29918, 9721, 29961, 401, 29962, 353, 5852, 13, 9651, 6939, 29898, 1311, 3032, 1989, 29918, 9721, 29897, 13, 9651, 1583, 3032, 8758, 29889, 5504, 7239, 580, 13, 13, 4706, 822, 373, 29918, 14096, 29898, 3696, 1125, 13, 9651, 775, 353, 679, 29918, 401, 29898, 3696, 29897, 13, 9651, 565, 775, 338, 6213, 29901, 13, 18884, 736, 13, 9651, 1583, 3032, 1989, 29918, 9721, 29961, 401, 29962, 353, 7700, 13, 13, 4706, 1583, 3032, 8758, 29889, 1989, 10923, 2624, 353, 373, 29918, 2139, 13, 4706, 1583, 3032, 8758, 29889, 1989, 19729, 2624, 353, 373, 29918, 14096, 13, 2 ]
bot/logic/spending/build_order/standard_zvp_hl.py
Scottdecat/HiveMind
0
137943
from typing import List, Dict from sc2 import UnitTypeId, Race from sc2.ids.upgrade_id import UpgradeId from bot.logic.spending.build_order.build_order import BOStep, BOAction from bot.services.state_service import StateService def get_build(state : StateService): return [ BOStep( 13, lambda: state.get_unit_count(UnitTypeId.OVERLORD) >= 2, lambda: state.get_unit_count(UnitTypeId.OVERLORD) < 2, UnitTypeId.OVERLORD ), BOStep( 17, lambda: state.pending_townhalls() >= 2, lambda: state.pending_townhalls() < 2, UnitTypeId.HATCHERY ), BOStep( 18, lambda: state.get_unit_count(UnitTypeId.EXTRACTOR) > 1, lambda: state.get_unit_count(UnitTypeId.EXTRACTOR) < 1, UnitTypeId.EXTRACTOR ), BOStep( 17, lambda: state.get_unit_count(UnitTypeId.SPAWNINGPOOL) > 1, lambda: (state.get_unit_count(UnitTypeId.SPAWNINGPOOL) < 1 and state.get_unit_count(UnitTypeId.EXTRACTOR) >= 1), UnitTypeId.SPAWNINGPOOL ), BOStep( 17, lambda: state.get_unit_count(UnitTypeId.ZERGLING) > 1, lambda: state.own_structures(UnitTypeId.SPAWNINGPOOL).ready.exists, UnitTypeId.ZERGLING ), BOStep( 17, lambda: (state.already_pending_upgrade(UpgradeId.ZERGLINGMOVEMENTSPEED) > 0 or UpgradeId.ZERGLINGMOVEMENTSPEED in state.upgrades), lambda: (state.own_units(UnitTypeId.SPAWNINGPOOL).ready.exists and state.get_unit_count(UnitTypeId.EXTRACTOR) > 0), UpgradeId.ZERGLINGMOVEMENTSPEED ), BOStep( 19, lambda: state.get_unit_count(UnitTypeId.OVERLORD) >= 3, lambda: state.get_unit_count(UnitTypeId.OVERLORD) < 3, UnitTypeId.OVERLORD ), BOStep( 0, lambda: False, lambda: state.get_unit_count(UnitTypeId.OVERLORD) >= 3, BOAction.BUILD_OVERLORDS, True ), BOStep( 0, lambda: False, lambda: state.own_structures(UnitTypeId.SPAWNINGPOOL).ready.exists, BOAction.BUILD_QUEENS, True ), BOStep( 30, lambda: state.pending_townhalls() >= 3, lambda: (state.pending_townhalls() < 3 and state.get_unit_count(UnitTypeId.DRONE) >= 24), UnitTypeId.HATCHERY ), BOStep( 30, lambda: False, lambda: state.pending_townhalls() > 2, BOAction.BUILD_HATCHERIES, True ), BOStep( 38, lambda: state.get_unit_count(UnitTypeId.EXTRACTOR) >= 3, lambda: (state.get_unit_count(UnitTypeId.EXTRACTOR) < 3 and state.get_unit_count(UnitTypeId.DRONE) >= 38), UnitTypeId.EXTRACTOR ), BOStep( 40, lambda: (state.get_unit_count(UnitTypeId.LAIR) >= 1 or state.get_unit_count(UnitTypeId.HIVE) >= 1), lambda: state.get_unit_count(UnitTypeId.DRONE) >= 32, UnitTypeId.LAIR ), BOStep( 40, lambda: state.get_unit_count(UnitTypeId.OVERSEER) >= 1, lambda: state.own_structures(UnitTypeId.LAIR).exists, UnitTypeId.OVERSEER ), BOStep( 44, lambda: state.get_unit_count(UnitTypeId.HYDRALISKDEN) >= 1, lambda: (state.get_unit_count(UnitTypeId.HYDRALISKDEN) < 1 and state.get_unit_count(UnitTypeId.LAIR) > 0 and state.get_unit_count(UnitTypeId.DRONE) >= 44), UnitTypeId.HYDRALISKDEN ), BOStep( 0, lambda: (state.already_pending_upgrade(UpgradeId.EVOLVEGROOVEDSPINES) > 0 or UpgradeId.EVOLVEGROOVEDSPINES in state.upgrades), lambda: state.own_structures(UnitTypeId.HYDRALISKDEN).ready.exists, UpgradeId.EVOLVEGROOVEDSPINES ), BOStep( 0, lambda: (state.already_pending_upgrade(UpgradeId.EVOLVEMUSCULARAUGMENTS) > 0 or UpgradeId.EVOLVEMUSCULARAUGMENTS in state.upgrades), lambda: (state.own_structures(UnitTypeId.HYDRALISKDEN).ready.exists and UpgradeId.EVOLVEGROOVEDSPINES in state.upgrades), UpgradeId.EVOLVEMUSCULARAUGMENTS ), #BOStep( # 52, # lambda: state.get_unit_count(UnitTypeId.EXTRACTOR) >= 5, # lambda: (state.get_unit_count(UnitTypeId.EXTRACTOR) < 5 # and state.get_unit_count(UnitTypeId.DRONE) >= 52), # UnitTypeId.EXTRACTOR #), BOStep( 56, lambda: state.get_unit_count(UnitTypeId.EVOLUTIONCHAMBER) >= 2, lambda: (state.get_unit_count(UnitTypeId.EVOLUTIONCHAMBER) < 2 and state.get_unit_count(UnitTypeId.DRONE) >= 56), UnitTypeId.EVOLUTIONCHAMBER ), BOStep( 0, lambda: (state.already_pending_upgrade(UpgradeId.ZERGMISSILEWEAPONSLEVEL1) > 0 or UpgradeId.ZERGMISSILEWEAPONSLEVEL1 in state.upgrades), lambda: state.own_structures(UnitTypeId.EVOLUTIONCHAMBER).ready.exists, UpgradeId.ZERGMISSILEWEAPONSLEVEL1 ), BOStep( 0, lambda: (state.already_pending_upgrade(UpgradeId.ZERGMISSILEWEAPONSLEVEL2) > 0 or UpgradeId.ZERGMISSILEWEAPONSLEVEL2 in state.upgrades), lambda: (state.own_structures(UnitTypeId.EVOLUTIONCHAMBER).ready.exists and UpgradeId.ZERGMISSILEWEAPONSLEVEL1 in state.upgrades), UpgradeId.ZERGMISSILEWEAPONSLEVEL2 ), BOStep( 0, lambda: (state.already_pending_upgrade(UpgradeId.ZERGMISSILEWEAPONSLEVEL3) > 0 or UpgradeId.ZERGMISSILEWEAPONSLEVEL3 in state.upgrades), lambda: (state.own_structures(UnitTypeId.EVOLUTIONCHAMBER).ready.exists and state.own_structures(UnitTypeId.HIVE).ready.exists and UpgradeId.ZERGMISSILEWEAPONSLEVEL2 in state.upgrades), UpgradeId.ZERGMISSILEWEAPONSLEVEL3 ), BOStep( 0, lambda: (state.already_pending_upgrade(UpgradeId.ZERGMELEEWEAPONSLEVEL1) > 0 or UpgradeId.ZERGMELEEWEAPONSLEVEL1 in state.upgrades), lambda: state.own_structures(UnitTypeId.EVOLUTIONCHAMBER).ready.exists, UpgradeId.ZERGMELEEWEAPONSLEVEL1 ), BOStep( 0, lambda: (state.already_pending_upgrade(UpgradeId.ZERGMELEEWEAPONSLEVEL2) > 0 or UpgradeId.ZERGGROUNDARMORSLEVEL2 in state.upgrades), lambda: (state.own_structures(UnitTypeId.EVOLUTIONCHAMBER).ready.exists and UpgradeId.ZERGMELEEWEAPONSLEVEL1 in state.upgrades), UpgradeId.ZERGMELEEWEAPONSLEVEL2 ), BOStep( 0, lambda: (state.already_pending_upgrade(UpgradeId.ZERGMELEEWEAPONSLEVEL3) > 0 or UpgradeId.ZERGGROUNDARMORSLEVEL3 in state.upgrades), lambda: (state.own_structures(UnitTypeId.EVOLUTIONCHAMBER).ready.exists and state.own_structures(UnitTypeId.HIVE).ready.exists and UpgradeId.ZERGMELEEWEAPONSLEVEL2 in state.upgrades), UpgradeId.ZERGMELEEWEAPONSLEVEL3 ), BOStep( 58, lambda: (state.already_pending_upgrade(UpgradeId.OVERLORDSPEED) > 0 or UpgradeId.OVERLORDSPEED in state.upgrades), lambda: (state.own_structures(UnitTypeId.LAIR).exists and state.get_unit_count(UnitTypeId.DRONE) > 58), UpgradeId.OVERLORDSPEED ), BOStep( 180, lambda: state.get_unit_count(UnitTypeId.INFESTATIONPIT) >= 1, lambda: (state.get_unit_count(UnitTypeId.INFESTATIONPIT) < 1 and state.get_unit_count(UnitTypeId.DRONE) >= 70), UnitTypeId.INFESTATIONPIT ), BOStep( 180, lambda: (state.get_unit_count(UnitTypeId.SPIRE) >= 1 or state.get_unit_count(UnitTypeId.GREATERSPIRE) >= 1), lambda: (state.get_unit_count(UnitTypeId.SPIRE) < 1 and state.get_unit_count(UnitTypeId.DRONE) >= 75), UnitTypeId.SPIRE ), BOStep( 180, lambda: state.get_unit_count(UnitTypeId.HIVE) >= 1, lambda: (state.get_unit_count(UnitTypeId.HIVE) < 1 and state.get_unit_count(UnitTypeId.DRONE) >= 75), UnitTypeId.HIVE ), #BOStep( # 75, # lambda: state.get_unit_count(UnitTypeId.EXTRACTOR) >= 7, # lambda: (state.get_unit_count(UnitTypeId.EXTRACTOR) < 7 # and state.get_unit_count(UnitTypeId.DRONE) >= 75), # UnitTypeId.EXTRACTOR #), BOStep( 160, lambda: state.get_unit_count(UnitTypeId.GREATERSPIRE) >= 1, lambda: (state.get_unit_count(UnitTypeId.GREATERSPIRE) < 1 and state.get_unit_count(UnitTypeId.SPIRE) >= 1 and state.get_unit_count(UnitTypeId.HIVE) >= 1 and state.get_unit_count(UnitTypeId.DRONE) >= 75), UnitTypeId.GREATERSPIRE ), #BOStep( # 75, # lambda: state.get_unit_count(UnitTypeId.EXTRACTOR) >= 8, # lambda: (state.get_unit_count(UnitTypeId.EXTRACTOR) < 8 # and state.get_unit_count(UnitTypeId.DRONE) >= 75), # UnitTypeId.EXTRACTOR #), ] def get_army_comp(state : StateService): goal_army_composition: Dict[UnitTypeId, int] = {} fallback_units: List[UnitTypeId] = [] # ORDER IS PRIORITY if state.own_structures(UnitTypeId.GREATERSPIRE).ready: goal_army_composition[UnitTypeId.BROODLORD] = 0 if state.own_structures({UnitTypeId.SPIRE, UnitTypeId.GREATERSPIRE}).ready: goal_army_composition[UnitTypeId.CORRUPTOR] = 0 if state.own_structures(UnitTypeId.HYDRALISKDEN).ready: goal_army_composition[UnitTypeId.HYDRALISK] = 0 if state.own_structures(UnitTypeId.BANELINGNEST).ready: goal_army_composition[UnitTypeId.BANELING] = 0 if state.own_structures(UnitTypeId.SPAWNINGPOOL).ready: goal_army_composition[UnitTypeId.ZERGLING] = 0 fallback_units.append(UnitTypeId.ZERGLING) goal_army_composition[UnitTypeId.QUEEN] = 0 if UnitTypeId.BROODLORD in goal_army_composition: goal_army_composition[UnitTypeId.CORRUPTOR] = 12 - (state.get_unit_count(UnitTypeId.CORRUPTOR) + state.get_unit_count(UnitTypeId.BROODLORD)) own_corruptors = state.own_army_units(UnitTypeId.CORRUPTOR) if own_corruptors.exists and UnitTypeId.BROODLORD in goal_army_composition: goal_army_composition[UnitTypeId.BROODLORD] += own_corruptors.amount # ----# # ZvP # (only matchup implemented) # ----# zealots = state.enemy_army_units(UnitTypeId.ZEALOT) if zealots.exists: if UnitTypeId.HYDRALISK in goal_army_composition: goal_army_composition[UnitTypeId.HYDRALISK] += zealots.amount elif UnitTypeId.ZERGLING in goal_army_composition: goal_army_composition[UnitTypeId.ZERGLING] += 4 * zealots.amount adepts = state.enemy_army_units(UnitTypeId.ADEPT) if adepts.exists: if UnitTypeId.HYDRALISK in goal_army_composition: goal_army_composition[UnitTypeId.HYDRALISK] += adepts.amount elif UnitTypeId.ZERGLING in goal_army_composition: goal_army_composition[UnitTypeId.ZERGLING] += 4 * adepts.amount sentries = state.enemy_army_units(UnitTypeId.SENTRY) if sentries.exists: if UnitTypeId.HYDRALISK in goal_army_composition: goal_army_composition[UnitTypeId.HYDRALISK] += sentries.amount elif UnitTypeId.ZERGLING in goal_army_composition: goal_army_composition[UnitTypeId.ZERGLING] += 4 * sentries.amount stalkers = state.enemy_army_units(UnitTypeId.STALKER) if stalkers.exists: if UnitTypeId.HYDRALISK in goal_army_composition: if 2 * state.get_unit_count(UnitTypeId.ZERGLING) < stalkers.amount: goal_army_composition[UnitTypeId.ZERGLING] += 4 * stalkers.amount else: goal_army_composition[UnitTypeId.HYDRALISK] += stalkers.amount elif UnitTypeId.ZERGLING in goal_army_composition: goal_army_composition[UnitTypeId.ZERGLING] += 4 * stalkers.amount immortals = state.enemy_army_units(UnitTypeId.IMMORTAL) if immortals.exists: if UnitTypeId.ZERGLING in goal_army_composition: if state.enemy_army_units(UnitTypeId.COLOSSUS).exists: goal_army_composition[UnitTypeId.ZERGLING] += 8 * immortals.amount else: goal_army_composition[UnitTypeId.ZERGLING] += 16 * immortals.amount voidrays = state.enemy_army_units(UnitTypeId.VOIDRAY) if voidrays.exists and UnitTypeId.HYDRALISK in goal_army_composition: goal_army_composition[UnitTypeId.HYDRALISK] += 3 * voidrays.amount if voidrays.exists and not UnitTypeId.HYDRALISK in goal_army_composition: goal_army_composition[UnitTypeId.QUEEN] += 2 + 2 * voidrays.amount prisms = state.enemy_army_units(UnitTypeId.WARPPRISM) if prisms.exists and UnitTypeId.HYDRALISK in goal_army_composition: goal_army_composition[UnitTypeId.HYDRALISK] += 2 * prisms.amount colossi = state.enemy_army_units(UnitTypeId.COLOSSUS) if colossi.exists and UnitTypeId.CORRUPTOR in goal_army_composition: goal_army_composition[UnitTypeId.CORRUPTOR] += 3 * colossi.amount goal_army_composition[UnitTypeId.ZERGLING] += 4 * colossi.amount return goal_army_composition, fallback_units, []
[ 1, 515, 19229, 1053, 2391, 29892, 360, 919, 13, 13, 3166, 885, 29906, 1053, 13223, 1542, 1204, 29892, 23613, 13, 3166, 885, 29906, 29889, 4841, 29889, 786, 8228, 29918, 333, 1053, 5020, 8228, 1204, 13, 13, 3166, 9225, 29889, 19227, 29889, 1028, 2548, 29889, 4282, 29918, 2098, 29889, 4282, 29918, 2098, 1053, 350, 3267, 371, 29886, 29892, 16437, 4276, 13, 3166, 9225, 29889, 9916, 29889, 3859, 29918, 5509, 1053, 4306, 3170, 13, 13, 1753, 679, 29918, 4282, 29898, 3859, 584, 4306, 3170, 1125, 13, 1678, 736, 518, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29941, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29949, 5348, 29931, 25593, 29897, 6736, 29871, 29906, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29949, 5348, 29931, 25593, 29897, 529, 29871, 29906, 29892, 13, 18884, 13223, 1542, 1204, 29889, 29949, 5348, 29931, 25593, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29955, 29892, 13, 18884, 14013, 29901, 2106, 29889, 29886, 2548, 29918, 27734, 29882, 4293, 580, 6736, 29871, 29906, 29892, 13, 18884, 14013, 29901, 2106, 29889, 29886, 2548, 29918, 27734, 29882, 4293, 580, 529, 29871, 29906, 29892, 13, 18884, 13223, 1542, 1204, 29889, 29950, 14789, 24422, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29947, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 1405, 29871, 29896, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 529, 29871, 29896, 29892, 13, 18884, 13223, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29955, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 5550, 29909, 16048, 4214, 13152, 5607, 29897, 1405, 29871, 29896, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 5550, 29909, 16048, 4214, 13152, 5607, 29897, 529, 29871, 29896, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 6736, 29871, 29896, 511, 13, 18884, 13223, 1542, 1204, 29889, 5550, 29909, 16048, 4214, 13152, 5607, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29955, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29897, 1405, 29871, 29896, 29892, 13, 18884, 14013, 29901, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 5550, 29909, 16048, 4214, 13152, 5607, 467, 2040, 29889, 9933, 29892, 13, 18884, 13223, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29955, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 29999, 1001, 7239, 4214, 6720, 12064, 13780, 29903, 4162, 3352, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 29999, 1001, 7239, 4214, 6720, 12064, 13780, 29903, 4162, 3352, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 313, 3859, 29889, 776, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 5550, 29909, 16048, 4214, 13152, 5607, 467, 2040, 29889, 9933, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 1405, 29871, 29900, 511, 13, 18884, 5020, 8228, 1204, 29889, 29999, 1001, 7239, 4214, 6720, 12064, 13780, 29903, 4162, 3352, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29929, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29949, 5348, 29931, 25593, 29897, 6736, 29871, 29941, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29949, 5348, 29931, 25593, 29897, 529, 29871, 29941, 29892, 13, 18884, 13223, 1542, 1204, 29889, 29949, 5348, 29931, 25593, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 7700, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29949, 5348, 29931, 25593, 29897, 6736, 29871, 29941, 29892, 13, 18884, 16437, 4276, 29889, 29933, 25282, 29918, 29949, 5348, 29931, 1955, 8452, 29892, 5852, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 7700, 29892, 13, 18884, 14013, 29901, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 5550, 29909, 16048, 4214, 13152, 5607, 467, 2040, 29889, 9933, 29892, 13, 18884, 16437, 4276, 29889, 29933, 25282, 29918, 11144, 1430, 29903, 29892, 5852, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29941, 29900, 29892, 13, 18884, 14013, 29901, 2106, 29889, 29886, 2548, 29918, 27734, 29882, 4293, 580, 6736, 29871, 29941, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 29886, 2548, 29918, 27734, 29882, 4293, 580, 529, 29871, 29941, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29906, 29946, 511, 13, 18884, 13223, 1542, 1204, 29889, 29950, 14789, 24422, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29941, 29900, 29892, 13, 18884, 14013, 29901, 7700, 29892, 13, 18884, 14013, 29901, 2106, 29889, 29886, 2548, 29918, 27734, 29882, 4293, 580, 1405, 29871, 29906, 29892, 13, 18884, 16437, 4276, 29889, 29933, 25282, 29918, 29950, 14789, 1001, 29059, 29892, 5852, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29941, 29947, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 6736, 29871, 29941, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 529, 29871, 29941, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29941, 29947, 511, 13, 18884, 13223, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29946, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 4375, 8193, 29897, 6736, 29871, 29896, 13, 462, 4706, 470, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29950, 18474, 29897, 6736, 29871, 29896, 511, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29941, 29906, 29892, 13, 18884, 13223, 1542, 1204, 29889, 4375, 8193, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29946, 29900, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29949, 5348, 1660, 1001, 29897, 6736, 29871, 29896, 29892, 13, 18884, 14013, 29901, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 4375, 8193, 467, 9933, 29892, 13, 18884, 13223, 1542, 1204, 29889, 29949, 5348, 1660, 1001, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29946, 29946, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29928, 1430, 29897, 6736, 29871, 29896, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29928, 1430, 29897, 529, 29871, 29896, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 4375, 8193, 29897, 1405, 29871, 29900, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29946, 29946, 511, 13, 18884, 13223, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29928, 1430, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 22240, 5607, 29963, 11787, 1672, 29949, 29963, 3352, 5550, 1177, 2890, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 22240, 5607, 29963, 11787, 1672, 29949, 29963, 3352, 5550, 1177, 2890, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29928, 1430, 467, 2040, 29889, 9933, 29892, 13, 18884, 5020, 8228, 1204, 29889, 22240, 5607, 29963, 11787, 1672, 29949, 29963, 3352, 5550, 1177, 2890, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 22240, 5607, 12064, 29924, 3308, 29907, 13309, 1718, 29909, 23338, 13780, 29903, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 22240, 5607, 12064, 29924, 3308, 29907, 13309, 1718, 29909, 23338, 13780, 29903, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 313, 3859, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29928, 1430, 467, 2040, 29889, 9933, 13, 462, 4706, 322, 5020, 8228, 1204, 29889, 22240, 5607, 29963, 11787, 1672, 29949, 29963, 3352, 5550, 1177, 2890, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 5020, 8228, 1204, 29889, 22240, 5607, 12064, 29924, 3308, 29907, 13309, 1718, 29909, 23338, 13780, 29903, 13, 9651, 10353, 13, 9651, 396, 29933, 3267, 371, 29886, 29898, 13, 9651, 396, 268, 29945, 29906, 29892, 13, 9651, 396, 1678, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 6736, 29871, 29945, 29892, 13, 9651, 396, 1678, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 529, 29871, 29945, 13, 9651, 396, 9651, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29945, 29906, 511, 13, 9651, 396, 1678, 13223, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 13, 9651, 396, 511, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29945, 29953, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 22240, 5607, 2692, 2725, 3210, 5194, 13635, 29897, 6736, 29871, 29906, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 22240, 5607, 2692, 2725, 3210, 5194, 13635, 29897, 529, 29871, 29906, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29945, 29953, 511, 13, 18884, 13223, 1542, 1204, 29889, 22240, 5607, 2692, 2725, 3210, 5194, 13635, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29896, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29896, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 22240, 5607, 2692, 2725, 3210, 5194, 13635, 467, 2040, 29889, 9933, 29892, 13, 18884, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29896, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29906, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29906, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 313, 3859, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 22240, 5607, 2692, 2725, 3210, 5194, 13635, 467, 2040, 29889, 9933, 13, 462, 4706, 322, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29896, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29906, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29941, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29941, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 313, 3859, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 22240, 5607, 2692, 2725, 3210, 5194, 13635, 467, 2040, 29889, 9933, 13, 462, 4706, 322, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 29950, 18474, 467, 2040, 29889, 9933, 13, 462, 4706, 322, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29906, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 10403, 1799, 29902, 1307, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29941, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 29999, 1001, 29954, 2303, 1307, 29923, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29896, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 2303, 1307, 29923, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29896, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 22240, 5607, 2692, 2725, 3210, 5194, 13635, 467, 2040, 29889, 9933, 29892, 13, 18884, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 2303, 1307, 29923, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29896, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 29999, 1001, 29954, 2303, 1307, 29923, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29906, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 29999, 1001, 26788, 1672, 18783, 1718, 29924, 24125, 1307, 29963, 6670, 29906, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 313, 3859, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 22240, 5607, 2692, 2725, 3210, 5194, 13635, 467, 2040, 29889, 9933, 13, 462, 4706, 322, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 2303, 1307, 29923, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29896, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 2303, 1307, 29923, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29906, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 29999, 1001, 29954, 2303, 1307, 29923, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29941, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 29999, 1001, 26788, 1672, 18783, 1718, 29924, 24125, 1307, 29963, 6670, 29941, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 313, 3859, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 22240, 5607, 2692, 2725, 3210, 5194, 13635, 467, 2040, 29889, 9933, 13, 462, 4706, 322, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 29950, 18474, 467, 2040, 29889, 9933, 13, 462, 4706, 322, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 2303, 1307, 29923, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29906, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 5020, 8228, 1204, 29889, 29999, 1001, 29954, 2303, 1307, 29923, 8851, 3301, 1164, 29903, 1307, 29963, 6670, 29941, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29945, 29947, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 284, 2040, 29918, 29886, 2548, 29918, 786, 8228, 29898, 3373, 8228, 1204, 29889, 29949, 5348, 29931, 1955, 8452, 4162, 3352, 29897, 1405, 29871, 29900, 13, 462, 4706, 470, 5020, 8228, 1204, 29889, 29949, 5348, 29931, 1955, 8452, 4162, 3352, 297, 2106, 29889, 786, 629, 3076, 511, 13, 18884, 14013, 29901, 313, 3859, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 4375, 8193, 467, 9933, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 1405, 29871, 29945, 29947, 511, 13, 18884, 5020, 8228, 1204, 29889, 29949, 5348, 29931, 1955, 8452, 4162, 3352, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29947, 29900, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 1177, 16359, 1254, 8098, 29925, 1806, 29897, 6736, 29871, 29896, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 1177, 16359, 1254, 8098, 29925, 1806, 29897, 529, 29871, 29896, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29955, 29900, 511, 13, 18884, 13223, 1542, 1204, 29889, 1177, 16359, 1254, 8098, 29925, 1806, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29947, 29900, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29903, 2227, 1525, 29897, 6736, 29871, 29896, 13, 462, 4706, 470, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29954, 1525, 1299, 23598, 2227, 1525, 29897, 6736, 29871, 29896, 511, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29903, 2227, 1525, 29897, 529, 29871, 29896, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29955, 29945, 511, 13, 18884, 13223, 1542, 1204, 29889, 29903, 2227, 1525, 13, 9651, 10353, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29947, 29900, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29950, 18474, 29897, 6736, 29871, 29896, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29950, 18474, 29897, 529, 29871, 29896, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29955, 29945, 511, 13, 18884, 13223, 1542, 1204, 29889, 29950, 18474, 13, 9651, 10353, 13, 9651, 396, 29933, 3267, 371, 29886, 29898, 13, 9651, 396, 268, 29955, 29945, 29892, 13, 9651, 396, 1678, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 6736, 29871, 29955, 29892, 13, 9651, 396, 1678, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 529, 29871, 29955, 13, 9651, 396, 9651, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29955, 29945, 511, 13, 9651, 396, 1678, 13223, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 13, 9651, 396, 511, 13, 9651, 350, 3267, 371, 29886, 29898, 13, 462, 29896, 29953, 29900, 29892, 13, 18884, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29954, 1525, 1299, 23598, 2227, 1525, 29897, 6736, 29871, 29896, 29892, 13, 18884, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29954, 1525, 1299, 23598, 2227, 1525, 29897, 529, 29871, 29896, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29903, 2227, 1525, 29897, 6736, 29871, 29896, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29950, 18474, 29897, 6736, 29871, 29896, 13, 462, 4706, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29955, 29945, 511, 13, 18884, 13223, 1542, 1204, 29889, 29954, 1525, 1299, 23598, 2227, 1525, 13, 9651, 10353, 13, 9651, 396, 29933, 3267, 371, 29886, 29898, 13, 9651, 396, 268, 29955, 29945, 29892, 13, 9651, 396, 1678, 14013, 29901, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 6736, 29871, 29947, 29892, 13, 9651, 396, 1678, 14013, 29901, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 29897, 529, 29871, 29947, 13, 9651, 396, 9651, 322, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 8353, 12413, 29897, 6736, 29871, 29955, 29945, 511, 13, 9651, 396, 1678, 13223, 1542, 1204, 29889, 12194, 4717, 1783, 1955, 13, 9651, 396, 511, 13, 4706, 4514, 13, 13, 1753, 679, 29918, 279, 1357, 29918, 2388, 29898, 3859, 584, 4306, 3170, 1125, 13, 1678, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 360, 919, 29961, 8325, 1542, 1204, 29892, 938, 29962, 353, 6571, 13, 1678, 6416, 1627, 29918, 348, 1169, 29901, 2391, 29961, 8325, 1542, 1204, 29962, 353, 5159, 29871, 13, 13, 1678, 396, 15606, 8519, 349, 3960, 1955, 11937, 13, 1678, 565, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 29954, 1525, 1299, 23598, 2227, 1525, 467, 2040, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29933, 1672, 13668, 29931, 25593, 29962, 353, 29871, 29900, 13, 1678, 565, 2106, 29889, 776, 29918, 4984, 1973, 3319, 8325, 1542, 1204, 29889, 29903, 2227, 1525, 29892, 13223, 1542, 1204, 29889, 29954, 1525, 1299, 23598, 2227, 1525, 7690, 2040, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29907, 1955, 29934, 4897, 29911, 1955, 29962, 353, 29871, 29900, 13, 1678, 565, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29928, 1430, 467, 2040, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29962, 353, 29871, 29900, 13, 1678, 565, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 29933, 2190, 6670, 4214, 8186, 1254, 467, 2040, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29933, 2190, 6670, 4214, 29962, 353, 29871, 29900, 13, 1678, 565, 2106, 29889, 776, 29918, 4984, 1973, 29898, 8325, 1542, 1204, 29889, 5550, 29909, 16048, 4214, 13152, 5607, 467, 2040, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29962, 353, 29871, 29900, 13, 4706, 6416, 1627, 29918, 348, 1169, 29889, 4397, 29898, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29897, 13, 1678, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 11144, 1430, 29962, 353, 29871, 29900, 13, 13, 1678, 565, 13223, 1542, 1204, 29889, 29933, 1672, 13668, 29931, 25593, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29907, 1955, 29934, 4897, 29911, 1955, 29962, 353, 29871, 29896, 29906, 448, 313, 3859, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29907, 1955, 29934, 4897, 29911, 1955, 29897, 718, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29933, 1672, 13668, 29931, 25593, 876, 13, 13, 1678, 1914, 29918, 2616, 6685, 943, 353, 2106, 29889, 776, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 29907, 1955, 29934, 4897, 29911, 1955, 29897, 13, 1678, 565, 1914, 29918, 2616, 6685, 943, 29889, 9933, 322, 13223, 1542, 1204, 29889, 29933, 1672, 13668, 29931, 25593, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29933, 1672, 13668, 29931, 25593, 29962, 4619, 1914, 29918, 2616, 6685, 943, 29889, 14506, 13, 13, 4706, 396, 23250, 29937, 13, 4706, 396, 796, 29894, 29925, 396, 313, 6194, 1993, 786, 8762, 29897, 13, 4706, 396, 23250, 29937, 13, 13, 1678, 3777, 284, 1862, 353, 2106, 29889, 264, 6764, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 10721, 1964, 2891, 29897, 13, 1678, 565, 3777, 284, 1862, 29889, 9933, 29901, 13, 4706, 565, 13223, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 9651, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29962, 4619, 3777, 284, 1862, 29889, 14506, 13, 4706, 25342, 13223, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 9651, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29962, 4619, 29871, 29946, 334, 3777, 284, 1862, 29889, 14506, 13, 268, 13, 1678, 19967, 16485, 353, 2106, 29889, 264, 6764, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 29909, 2287, 7982, 29897, 13, 1678, 565, 19967, 16485, 29889, 9933, 29901, 13, 4706, 565, 13223, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 9651, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29962, 4619, 19967, 16485, 29889, 14506, 13, 4706, 25342, 13223, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 9651, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29962, 4619, 29871, 29946, 334, 19967, 16485, 29889, 14506, 13, 13, 1678, 2665, 2722, 353, 2106, 29889, 264, 6764, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 29903, 3919, 13207, 29897, 13, 1678, 565, 2665, 2722, 29889, 9933, 29901, 13, 4706, 565, 13223, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 9651, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29962, 4619, 2665, 2722, 29889, 14506, 13, 4706, 25342, 13223, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 9651, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29962, 4619, 29871, 29946, 334, 2665, 2722, 29889, 14506, 13, 13, 1678, 380, 2235, 414, 353, 2106, 29889, 264, 6764, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 1254, 1964, 29968, 1001, 29897, 13, 1678, 565, 380, 2235, 414, 29889, 9933, 29901, 13, 4706, 565, 13223, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 9651, 565, 29871, 29906, 334, 2106, 29889, 657, 29918, 5441, 29918, 2798, 29898, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29897, 529, 380, 2235, 414, 29889, 14506, 29901, 13, 18884, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29962, 4619, 29871, 29946, 334, 380, 2235, 414, 29889, 14506, 13, 9651, 1683, 29901, 13, 18884, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29962, 4619, 380, 2235, 414, 29889, 14506, 13, 4706, 25342, 13223, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 9651, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29962, 4619, 29871, 29946, 334, 380, 2235, 414, 29889, 14506, 13, 13, 1678, 5198, 441, 1338, 353, 2106, 29889, 264, 6764, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 29902, 7428, 8476, 1964, 29897, 13, 1678, 565, 5198, 441, 1338, 29889, 9933, 29901, 13, 4706, 565, 13223, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 9651, 565, 2106, 29889, 264, 6764, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 3217, 3927, 1799, 3308, 467, 9933, 29901, 13, 18884, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29962, 4619, 29871, 29947, 334, 5198, 441, 1338, 29889, 14506, 13, 9651, 1683, 29901, 13, 18884, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29962, 4619, 29871, 29896, 29953, 334, 5198, 441, 1338, 29889, 14506, 13, 13, 1678, 1780, 764, 29879, 353, 2106, 29889, 264, 6764, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 24898, 1367, 22800, 29897, 13, 1678, 565, 1780, 764, 29879, 29889, 9933, 322, 13223, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29962, 4619, 29871, 29941, 334, 1780, 764, 29879, 29889, 14506, 13, 1678, 565, 1780, 764, 29879, 29889, 9933, 322, 451, 13223, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 11144, 1430, 29962, 4619, 29871, 29906, 718, 29871, 29906, 334, 1780, 764, 29879, 29889, 14506, 13, 13, 1678, 544, 12903, 353, 2106, 29889, 264, 6764, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 29956, 1718, 29925, 10593, 3235, 29924, 29897, 13, 1678, 565, 544, 12903, 29889, 9933, 322, 13223, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29950, 29979, 8353, 1964, 3235, 29968, 29962, 4619, 29871, 29906, 334, 544, 12903, 29889, 14506, 13, 13, 1678, 784, 359, 1039, 353, 2106, 29889, 264, 6764, 29918, 279, 1357, 29918, 348, 1169, 29898, 8325, 1542, 1204, 29889, 3217, 3927, 1799, 3308, 29897, 13, 1678, 565, 784, 359, 1039, 29889, 9933, 322, 13223, 1542, 1204, 29889, 29907, 1955, 29934, 4897, 29911, 1955, 297, 7306, 29918, 279, 1357, 29918, 510, 3283, 29901, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29907, 1955, 29934, 4897, 29911, 1955, 29962, 4619, 29871, 29941, 334, 784, 359, 1039, 29889, 14506, 13, 4706, 7306, 29918, 279, 1357, 29918, 510, 3283, 29961, 8325, 1542, 1204, 29889, 29999, 1001, 7239, 4214, 29962, 4619, 29871, 29946, 334, 784, 359, 1039, 29889, 14506, 13, 268, 13, 1678, 736, 7306, 29918, 279, 1357, 29918, 510, 3283, 29892, 6416, 1627, 29918, 348, 1169, 29892, 5159, 2 ]
autogluon/utils/tabular/utils/decorators.py
zhanghang1989/autogluon
6
160871
import time, logging logger = logging.getLogger(__name__) # decorator to calculate duration taken by any function. Logs times at debug level (logging level 10). def calculate_time(func): # added arguments inside the inner1, # if function takes any arguments, # can be added like this. def inner1(*args, **kwargs): # storing time before function execution begin = time.time() output = func(*args, **kwargs) # storing time after function execution end = time.time() logger.debug("Total time taken in " + str(func.__name__)+": "+str(end - begin)) return output return inner1
[ 1, 1053, 931, 29892, 12183, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 29937, 10200, 1061, 304, 8147, 14385, 4586, 491, 738, 740, 29889, 4522, 29879, 3064, 472, 4744, 3233, 313, 21027, 3233, 29871, 29896, 29900, 467, 13, 1753, 8147, 29918, 2230, 29898, 9891, 1125, 13, 1678, 396, 2715, 6273, 2768, 278, 6426, 29896, 29892, 13, 1678, 396, 565, 740, 4893, 738, 6273, 29892, 13, 1678, 396, 508, 367, 2715, 763, 445, 29889, 13, 1678, 822, 6426, 29896, 10456, 5085, 29892, 3579, 19290, 1125, 13, 4706, 396, 15446, 931, 1434, 740, 8225, 13, 4706, 3380, 353, 931, 29889, 2230, 580, 13, 13, 4706, 1962, 353, 3653, 10456, 5085, 29892, 3579, 19290, 29897, 13, 13, 4706, 396, 15446, 931, 1156, 740, 8225, 13, 4706, 1095, 353, 931, 29889, 2230, 580, 13, 4706, 17927, 29889, 8382, 703, 11536, 931, 4586, 297, 376, 718, 851, 29898, 9891, 17255, 978, 1649, 7240, 1115, 15691, 710, 29898, 355, 448, 3380, 876, 13, 13, 4706, 736, 1962, 13, 13, 1678, 736, 6426, 29896, 13, 2 ]
IMPACTA/Unid02_Sem4.py/exe02A.py
FR7/Meus-Projetos
0
136048
#Faça um programa que leia três números inteiros e colocá-los em ordem crescente. #Sugestão: Sejam 3 números A, B e C. A ideia principal é: # – armazenar em A o menor valor # – armazenar em B o valor intermediário # – armazenar em C o maior valor a = int(input("Digite um número para a: ")) b = int(input("Digite um número para b: ")) c = int(input("Digite um número para c: ")) #a é o menor: if a < b and a < c: if b < c: print("{}, {}, {}".format(a, b, c)) else: print("{},{},{}".format(a, c, b)) #b é menor: elif b < a and b < c: if a < c: print("{}, {}, {}".format(b, a, c)) else: print("{}, {}, {}".format(b, c, a)) else: if a > b: print("{}, {}, {}".format(c, b, a)) else: print("{}, {}, {}".format(c, a, b))
[ 1, 396, 14206, 4277, 1922, 16914, 712, 454, 423, 26299, 12158, 359, 2293, 17177, 321, 28853, 29976, 29899, 5409, 953, 470, 2310, 24185, 21450, 29889, 13, 29937, 29903, 688, 342, 1368, 29901, 922, 29926, 314, 29871, 29941, 12158, 359, 319, 29892, 350, 321, 315, 29889, 319, 1957, 423, 5882, 904, 29901, 13, 29937, 785, 564, 655, 2256, 279, 953, 319, 288, 26764, 16497, 13, 29937, 785, 564, 655, 2256, 279, 953, 350, 288, 16497, 1006, 4210, 12288, 13, 29937, 785, 564, 655, 2256, 279, 953, 315, 288, 17136, 16497, 13, 13, 29874, 353, 938, 29898, 2080, 703, 14991, 568, 1922, 13831, 1702, 263, 29901, 376, 876, 13, 29890, 353, 938, 29898, 2080, 703, 14991, 568, 1922, 13831, 1702, 289, 29901, 376, 876, 13, 29883, 353, 938, 29898, 2080, 703, 14991, 568, 1922, 13831, 1702, 274, 29901, 376, 876, 13, 29937, 29874, 904, 288, 26764, 29901, 13, 361, 263, 529, 289, 322, 263, 529, 274, 29901, 13, 1678, 565, 289, 529, 274, 29901, 13, 4706, 1596, 703, 29912, 1118, 24335, 6571, 1642, 4830, 29898, 29874, 29892, 289, 29892, 274, 876, 13, 1678, 1683, 29901, 13, 4706, 1596, 703, 29912, 29087, 1118, 8875, 1642, 4830, 29898, 29874, 29892, 274, 29892, 289, 876, 13, 29937, 29890, 904, 26764, 29901, 13, 23681, 289, 529, 263, 322, 289, 529, 274, 29901, 13, 1678, 565, 263, 529, 274, 29901, 13, 4706, 1596, 703, 29912, 1118, 24335, 6571, 1642, 4830, 29898, 29890, 29892, 263, 29892, 274, 876, 13, 1678, 1683, 29901, 13, 4706, 1596, 703, 29912, 1118, 24335, 6571, 1642, 4830, 29898, 29890, 29892, 274, 29892, 263, 876, 13, 2870, 29901, 13, 1678, 565, 263, 1405, 289, 29901, 13, 4706, 1596, 703, 29912, 1118, 24335, 6571, 1642, 4830, 29898, 29883, 29892, 289, 29892, 263, 876, 13, 1678, 1683, 29901, 13, 4706, 1596, 703, 29912, 1118, 24335, 6571, 1642, 4830, 29898, 29883, 29892, 263, 29892, 289, 876, 13, 13, 13, 13, 13, 13, 13, 2 ]
model.py
linsamtw/finmind-analysis
0
111124
<filename>model.py import datetime from collections import Counter from random import seed from tqdm import tqdm import numpy as np import pandas as pd import xgboost as xgb from loguru import logger from sklearn.metrics import confusion_matrix from sklearn.model_selection import train_test_split def load_taiwan_stock_price_data(): df = pd.read_csv("taiwan_stock_price.csv") df["stock_id"] = df["stock_id"].astype(str) return df def clean_df(df): df = df[df["Trading_Volume"] > 0] df = df.sort_values("date") df["stock_id"] = df["stock_id"].astype(str) logger.info(df["Trading_Volume"].describe()["mean"]) df = df[df["Trading_Volume"] > df["Trading_Volume"].describe()["mean"]] df = df.reset_index(drop=True) return df def create_target(spread_per): if spread_per > 0.03: return 1 elif spread_per < -0.03: return -1 else: return 0 def feature_engineer(df: pd.DataFrame, last_days: int = 7): # create target logger.info("feature_engineer") df["spread_per"] = df["spread"] / df["open"] df["target"] = df["spread_per"].apply(create_target) logger.info(f'target: {Counter(df["target"])}') # create feature for day in range(1, last_days + 1): df[f"open_minus_{day}"] = df.groupby("stock_id")["open"].shift(day) df[f"max_minus_{day}"] = df.groupby("stock_id")["max"].shift(day) df[f"min_minus_{day}"] = df.groupby("stock_id")["min"].shift(day) df[f"close_minus_{day}"] = df.groupby("stock_id")["close"].shift(day) df[f"Trading_Volume_minus_{day}"] = df.groupby("stock_id")[ "Trading_Volume" ].shift(day) df[f"Trading_turnover_minus_{day}"] = df.groupby("stock_id")[ "Trading_turnover" ].shift(day) df[f"spread_per_{day}"] = df.groupby("stock_id")["spread_per"].shift( day ) df = df.dropna() return df def split_train_test(df): logger.info("split_train_test") train_test_split_index = int(len(df) * 0.7) train_df = df[:train_test_split_index] test_df = df[train_test_split_index:] return train_df, test_df def create_feature_variable(df, last_days: int = 7): logger.info("create_feature_variable") colname_list = [ [ f"open_minus_{day}", f"max_minus_{day}", f"min_minus_{day}", f"close_minus_{day}", f"Trading_Volume_minus_{day}", f"Trading_turnover_minus_{day}", # f"spread_per_{day}", ] for day in range(1, last_days + 1) ] feature_list = [] [feature_list.extend(col) for col in colname_list] feature_list = [ feature for feature in feature_list if feature in list(df.columns) ] return feature_list def create_model(train_df, test_df, feature_list): logger.info("create_model") logger.info(f"feature: {feature_list}") x_train = train_df[feature_list] x_test = test_df[feature_list] y_train = train_df["target"].values y_test = test_df["target"].values watchlist = [(x_train, y_train), (x_test, y_test)] seed(100) clf = xgb.XGBClassifier( eta=0.1, max_depth=5, eval_metric="merror", n_estimators=100, verbose=True, num_classes=3, # min_child_weight=0.5, # subsample =0.5, # alpha=1, ) clf.fit(x_train, y_train, eval_set=watchlist, early_stopping_rounds=5) train_pred = clf.predict(x_train) train_df["pred"] = train_pred train_array = confusion_matrix(train_df["target"], train_df["pred"]) train_confusion_matrix = pd.DataFrame( train_array, range(-1, 2), range(-1, 2) ) logger.info(f"train_confusion_matrix \n {train_confusion_matrix}") test_pred = clf.predict(x_test) test_df["pred"] = test_pred test_array = confusion_matrix(test_df["target"], test_df["pred"]) test_confusion_matrix = pd.DataFrame(test_array, range(-1, 2), range(-1, 2)) logger.info(f"test_confusion_matrix \n {test_confusion_matrix}") return train_df, test_df def calculate_return_profit(pred_df): pred_1 = pred_df[pred_df["pred"] == 1] pred_1["profit"] = pred_1["close"] - pred_1["open"] pred_1 = pred_1[["open", "date", "profit"]] pred_minut_1 = pred_df[pred_df["pred"] == -1] pred_minut_1["profit"] = pred_minut_1["open"] - pred_minut_1["close"] pred_minut_1 = pred_minut_1[["open", "date", "profit"]] pred_df = pd.concat([pred_1, pred_minut_1], axis=0) mean_df = pred_df.groupby("date")["profit"].mean() mean_df = mean_df.reset_index() open_df = pred_df.groupby("date")["open"].sum() open_df = open_df.reset_index() count_df = pred_df.groupby("date")["open"].count() count_df = count_df.reset_index() count_df.columns = ["date", "deal_times"] pred_df = mean_df.merge(open_df, on=["date"]).merge(count_df, on=["date"]) pred_df["date"] = pd.to_datetime(pred_df["date"]) pred_df["year"] = pred_df["date"].dt.year pred_df["fee"] = pred_df["open"] * 0.001425 * 2 * 0.5 pred_df["tax"] = pred_df["open"] * 0.003 * 0.5 pred_df["profit_fee_tax"] = ( pred_df["profit"] - pred_df["fee"] - pred_df["tax"] ) pred_df["total_profit_fee_tax"] = ( pred_df["profit_fee_tax"].cumsum() ).round(2) pred_df["total_profit"] = (pred_df["profit_fee_tax"].cumsum()).round(2) for col in [ "fee", "tax", "profit_fee_tax", "total_profit_fee_tax", "total_profit", ]: pred_df[col] = pred_df[col].round(2) return pred_df def create_win_rate(profit_df, profit_col): win_rate = ( round( len(profit_df[profit_df[profit_col] > 0]) / len(profit_df), 2, ) * 100 ) return win_rate def show_profit(profit_df, text: str): train_win_rate = round(create_win_rate(profit_df, "profit"), 2) train_win_rate_with_fee_tax = round( create_win_rate(profit_df, "profit_fee_tax"), 2 ) profit_df["return"] = [ 0 if x > 0 else x for x in list(profit_df["profit_fee_tax"]) ] max_return = 0 max_ret = 0 for ret in list(profit_df["return"]): if ret == 0: max_ret = 0 max_ret += ret if max_ret < max_return: max_return = max_ret logger.info( f""" {text} --------------------------------------------------------------------------- 平均資金: {round(profit_df["open"].mean(),2)*1000} 平均每天交易資金: {round(profit_df['open'].mean() ,2)*1000} 最大交易資金: {round(profit_df['open'].max() ,2)*1000} 平均每天交易次數: {round(profit_df['deal_times'].mean() ,2)} 最大每天交易次數: {round(profit_df['deal_times'].max() ,2)} 最小每天交易次數: {round(profit_df['deal_times'].min() ,2)} --------------------------------------------------------------------------- 平均報酬: {round(profit_df["profit"].mean(),2)*1000} 平均年報酬: {profit_df.groupby('year')['profit'].sum().mean().round(2)*1000} 勝率: {train_win_rate}% --------------------------------------------------------------------------- 含手續費 0.001425、交易稅 0.003*0.5 平均報酬: {round(profit_df["profit_fee_tax"].mean(),2)*1000} 最大單次損失: {round(profit_df["profit_fee_tax"].min(),2)*1000} 最大累積損失: {round(max_return,2)*1000} 平均年報酬: {profit_df.groupby('year')['profit_fee_tax'].sum().mean().round(2)*1000} 勝率: {train_win_rate_with_fee_tax}% """ ) def main(): stock_price_df = load_taiwan_stock_price_data() stock_price_df = clean_df(stock_price_df) last_days = 5 df = feature_engineer(stock_price_df, last_days=last_days) train_df, test_df = split_train_test(df) feature_list = create_feature_variable(df, last_days=last_days) train_df, test_df = create_model(train_df, test_df, feature_list) train_profit_df = calculate_return_profit(train_df) test_profit_df = calculate_return_profit(test_df) show_profit(train_profit_df, "train") show_profit(test_profit_df, "test") test_profit_df.to_csv('test_profit_df.csv', index=False)
[ 1, 529, 9507, 29958, 4299, 29889, 2272, 13, 5215, 12865, 13, 3166, 16250, 1053, 315, 5336, 13, 3166, 4036, 1053, 16717, 13, 13, 3166, 260, 29939, 18933, 1053, 260, 29939, 18933, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 5215, 921, 29887, 17079, 408, 921, 26300, 13, 3166, 1480, 20144, 1053, 17927, 13, 3166, 2071, 19668, 29889, 2527, 10817, 1053, 14679, 29918, 5344, 13, 3166, 2071, 19668, 29889, 4299, 29918, 21731, 1053, 7945, 29918, 1688, 29918, 5451, 13, 13, 13, 1753, 2254, 29918, 941, 9429, 273, 29918, 17712, 29918, 9175, 29918, 1272, 7295, 13, 1678, 4489, 353, 10518, 29889, 949, 29918, 7638, 703, 941, 9429, 273, 29918, 17712, 29918, 9175, 29889, 7638, 1159, 13, 1678, 4489, 3366, 17712, 29918, 333, 3108, 353, 4489, 3366, 17712, 29918, 333, 16862, 579, 668, 29898, 710, 29897, 13, 1678, 736, 4489, 13, 13, 13, 1753, 5941, 29918, 2176, 29898, 2176, 1125, 13, 1678, 4489, 353, 4489, 29961, 2176, 3366, 2308, 9382, 29918, 24679, 3108, 1405, 29871, 29900, 29962, 13, 1678, 4489, 353, 4489, 29889, 6605, 29918, 5975, 703, 1256, 1159, 13, 1678, 4489, 3366, 17712, 29918, 333, 3108, 353, 4489, 3366, 17712, 29918, 333, 16862, 579, 668, 29898, 710, 29897, 13, 1678, 17927, 29889, 3888, 29898, 2176, 3366, 2308, 9382, 29918, 24679, 16862, 2783, 29581, 580, 3366, 12676, 20068, 13, 1678, 4489, 353, 4489, 29961, 2176, 3366, 2308, 9382, 29918, 24679, 3108, 1405, 4489, 3366, 2308, 9382, 29918, 24679, 16862, 2783, 29581, 580, 3366, 12676, 3108, 29962, 13, 1678, 4489, 353, 4489, 29889, 12071, 29918, 2248, 29898, 8865, 29922, 5574, 29897, 13, 1678, 736, 4489, 13, 13, 13, 1753, 1653, 29918, 5182, 29898, 1028, 949, 29918, 546, 1125, 13, 1678, 565, 9677, 29918, 546, 1405, 29871, 29900, 29889, 29900, 29941, 29901, 13, 4706, 736, 29871, 29896, 13, 1678, 25342, 9677, 29918, 546, 529, 448, 29900, 29889, 29900, 29941, 29901, 13, 4706, 736, 448, 29896, 13, 1678, 1683, 29901, 13, 4706, 736, 29871, 29900, 13, 13, 13, 1753, 4682, 29918, 10599, 261, 29898, 2176, 29901, 10518, 29889, 17271, 29892, 1833, 29918, 16700, 29901, 938, 353, 29871, 29955, 1125, 13, 1678, 396, 1653, 3646, 13, 1678, 17927, 29889, 3888, 703, 14394, 29918, 10599, 261, 1159, 13, 1678, 4489, 3366, 1028, 949, 29918, 546, 3108, 353, 4489, 3366, 1028, 949, 3108, 847, 4489, 3366, 3150, 3108, 13, 1678, 4489, 3366, 5182, 3108, 353, 4489, 3366, 1028, 949, 29918, 546, 16862, 7302, 29898, 3258, 29918, 5182, 29897, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29915, 5182, 29901, 426, 17779, 29898, 2176, 3366, 5182, 20068, 29913, 1495, 13, 13, 1678, 396, 1653, 4682, 13, 1678, 363, 2462, 297, 3464, 29898, 29896, 29892, 1833, 29918, 16700, 718, 29871, 29896, 1125, 13, 4706, 4489, 29961, 29888, 29908, 3150, 29918, 12254, 648, 3250, 29913, 3108, 353, 4489, 29889, 27789, 703, 17712, 29918, 333, 1159, 3366, 3150, 16862, 10889, 29898, 3250, 29897, 13, 4706, 4489, 29961, 29888, 29908, 3317, 29918, 12254, 648, 3250, 29913, 3108, 353, 4489, 29889, 27789, 703, 17712, 29918, 333, 1159, 3366, 3317, 16862, 10889, 29898, 3250, 29897, 13, 4706, 4489, 29961, 29888, 29908, 1195, 29918, 12254, 648, 3250, 29913, 3108, 353, 4489, 29889, 27789, 703, 17712, 29918, 333, 1159, 3366, 1195, 16862, 10889, 29898, 3250, 29897, 13, 4706, 4489, 29961, 29888, 29908, 5358, 29918, 12254, 648, 3250, 29913, 3108, 353, 4489, 29889, 27789, 703, 17712, 29918, 333, 1159, 3366, 5358, 16862, 10889, 29898, 3250, 29897, 13, 4706, 4489, 29961, 29888, 29908, 2308, 9382, 29918, 24679, 29918, 12254, 648, 3250, 29913, 3108, 353, 4489, 29889, 27789, 703, 17712, 29918, 333, 1159, 29961, 13, 9651, 376, 2308, 9382, 29918, 24679, 29908, 13, 308, 1822, 10889, 29898, 3250, 29897, 13, 4706, 4489, 29961, 29888, 29908, 2308, 9382, 29918, 685, 957, 29918, 12254, 648, 3250, 29913, 3108, 353, 4489, 29889, 27789, 703, 17712, 29918, 333, 1159, 29961, 13, 9651, 376, 2308, 9382, 29918, 685, 957, 29908, 13, 308, 1822, 10889, 29898, 3250, 29897, 13, 4706, 4489, 29961, 29888, 29908, 1028, 949, 29918, 546, 648, 3250, 29913, 3108, 353, 4489, 29889, 27789, 703, 17712, 29918, 333, 1159, 3366, 1028, 949, 29918, 546, 16862, 10889, 29898, 13, 9651, 2462, 13, 4706, 1723, 13, 13, 1678, 4489, 353, 4489, 29889, 8865, 1056, 580, 13, 1678, 736, 4489, 13, 13, 13, 1753, 6219, 29918, 14968, 29918, 1688, 29898, 2176, 1125, 13, 1678, 17927, 29889, 3888, 703, 5451, 29918, 14968, 29918, 1688, 1159, 13, 1678, 7945, 29918, 1688, 29918, 5451, 29918, 2248, 353, 938, 29898, 2435, 29898, 2176, 29897, 334, 29871, 29900, 29889, 29955, 29897, 13, 1678, 7945, 29918, 2176, 353, 4489, 7503, 14968, 29918, 1688, 29918, 5451, 29918, 2248, 29962, 13, 1678, 1243, 29918, 2176, 353, 4489, 29961, 14968, 29918, 1688, 29918, 5451, 29918, 2248, 17531, 13, 1678, 736, 7945, 29918, 2176, 29892, 1243, 29918, 2176, 13, 13, 13, 1753, 1653, 29918, 14394, 29918, 11918, 29898, 2176, 29892, 1833, 29918, 16700, 29901, 938, 353, 29871, 29955, 1125, 13, 1678, 17927, 29889, 3888, 703, 3258, 29918, 14394, 29918, 11918, 1159, 13, 1678, 784, 978, 29918, 1761, 353, 518, 13, 4706, 518, 13, 9651, 285, 29908, 3150, 29918, 12254, 648, 3250, 17671, 13, 9651, 285, 29908, 3317, 29918, 12254, 648, 3250, 17671, 13, 9651, 285, 29908, 1195, 29918, 12254, 648, 3250, 17671, 13, 9651, 285, 29908, 5358, 29918, 12254, 648, 3250, 17671, 13, 9651, 285, 29908, 2308, 9382, 29918, 24679, 29918, 12254, 648, 3250, 17671, 13, 9651, 285, 29908, 2308, 9382, 29918, 685, 957, 29918, 12254, 648, 3250, 17671, 13, 9651, 396, 285, 29908, 1028, 949, 29918, 546, 648, 3250, 17671, 13, 4706, 4514, 13, 4706, 363, 2462, 297, 3464, 29898, 29896, 29892, 1833, 29918, 16700, 718, 29871, 29896, 29897, 13, 1678, 4514, 13, 1678, 4682, 29918, 1761, 353, 5159, 13, 1678, 518, 14394, 29918, 1761, 29889, 21843, 29898, 1054, 29897, 363, 784, 297, 784, 978, 29918, 1761, 29962, 13, 1678, 4682, 29918, 1761, 353, 518, 13, 4706, 4682, 363, 4682, 297, 4682, 29918, 1761, 565, 4682, 297, 1051, 29898, 2176, 29889, 13099, 29897, 13, 1678, 4514, 13, 1678, 736, 4682, 29918, 1761, 13, 13, 13, 1753, 1653, 29918, 4299, 29898, 14968, 29918, 2176, 29892, 1243, 29918, 2176, 29892, 4682, 29918, 1761, 1125, 13, 1678, 17927, 29889, 3888, 703, 3258, 29918, 4299, 1159, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29908, 14394, 29901, 426, 14394, 29918, 1761, 27195, 13, 1678, 921, 29918, 14968, 353, 7945, 29918, 2176, 29961, 14394, 29918, 1761, 29962, 13, 1678, 921, 29918, 1688, 353, 1243, 29918, 2176, 29961, 14394, 29918, 1761, 29962, 13, 1678, 343, 29918, 14968, 353, 7945, 29918, 2176, 3366, 5182, 16862, 5975, 13, 1678, 343, 29918, 1688, 353, 1243, 29918, 2176, 3366, 5182, 16862, 5975, 13, 1678, 6505, 1761, 353, 17288, 29916, 29918, 14968, 29892, 343, 29918, 14968, 511, 313, 29916, 29918, 1688, 29892, 343, 29918, 1688, 4638, 13, 1678, 16717, 29898, 29896, 29900, 29900, 29897, 13, 1678, 1067, 29888, 353, 921, 26300, 29889, 29990, 7210, 2385, 3709, 29898, 13, 4706, 634, 29874, 29922, 29900, 29889, 29896, 29892, 13, 4706, 4236, 29918, 19488, 29922, 29945, 29892, 13, 4706, 19745, 29918, 16414, 543, 1050, 729, 613, 13, 4706, 302, 29918, 342, 326, 4097, 29922, 29896, 29900, 29900, 29892, 13, 4706, 26952, 29922, 5574, 29892, 13, 4706, 954, 29918, 13203, 29922, 29941, 29892, 13, 4706, 396, 1375, 29918, 5145, 29918, 7915, 29922, 29900, 29889, 29945, 29892, 13, 4706, 396, 1014, 11249, 353, 29900, 29889, 29945, 29892, 13, 4706, 396, 15595, 29922, 29896, 29892, 13, 1678, 1723, 13, 1678, 1067, 29888, 29889, 9202, 29898, 29916, 29918, 14968, 29892, 343, 29918, 14968, 29892, 19745, 29918, 842, 29922, 12344, 1761, 29892, 4688, 29918, 7864, 3262, 29918, 29878, 3885, 29922, 29945, 29897, 13, 13, 1678, 7945, 29918, 11965, 353, 1067, 29888, 29889, 27711, 29898, 29916, 29918, 14968, 29897, 13, 1678, 7945, 29918, 2176, 3366, 11965, 3108, 353, 7945, 29918, 11965, 13, 1678, 7945, 29918, 2378, 353, 14679, 29918, 5344, 29898, 14968, 29918, 2176, 3366, 5182, 12436, 7945, 29918, 2176, 3366, 11965, 20068, 13, 1678, 7945, 29918, 5527, 3958, 29918, 5344, 353, 10518, 29889, 17271, 29898, 13, 4706, 7945, 29918, 2378, 29892, 3464, 6278, 29896, 29892, 29871, 29906, 511, 3464, 6278, 29896, 29892, 29871, 29906, 29897, 13, 1678, 1723, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29908, 14968, 29918, 5527, 3958, 29918, 5344, 320, 29876, 426, 14968, 29918, 5527, 3958, 29918, 5344, 27195, 13, 13, 1678, 1243, 29918, 11965, 353, 1067, 29888, 29889, 27711, 29898, 29916, 29918, 1688, 29897, 13, 1678, 1243, 29918, 2176, 3366, 11965, 3108, 353, 1243, 29918, 11965, 13, 1678, 1243, 29918, 2378, 353, 14679, 29918, 5344, 29898, 1688, 29918, 2176, 3366, 5182, 12436, 1243, 29918, 2176, 3366, 11965, 20068, 13, 1678, 1243, 29918, 5527, 3958, 29918, 5344, 353, 10518, 29889, 17271, 29898, 1688, 29918, 2378, 29892, 3464, 6278, 29896, 29892, 29871, 29906, 511, 3464, 6278, 29896, 29892, 29871, 29906, 876, 13, 1678, 17927, 29889, 3888, 29898, 29888, 29908, 1688, 29918, 5527, 3958, 29918, 5344, 320, 29876, 426, 1688, 29918, 5527, 3958, 29918, 5344, 27195, 13, 1678, 736, 7945, 29918, 2176, 29892, 1243, 29918, 2176, 13, 13, 13, 1753, 8147, 29918, 2457, 29918, 771, 9202, 29898, 11965, 29918, 2176, 1125, 13, 1678, 4450, 29918, 29896, 353, 4450, 29918, 2176, 29961, 11965, 29918, 2176, 3366, 11965, 3108, 1275, 29871, 29896, 29962, 13, 1678, 4450, 29918, 29896, 3366, 771, 9202, 3108, 353, 4450, 29918, 29896, 3366, 5358, 3108, 448, 4450, 29918, 29896, 3366, 3150, 3108, 13, 1678, 4450, 29918, 29896, 353, 4450, 29918, 29896, 29961, 3366, 3150, 613, 376, 1256, 613, 376, 771, 9202, 3108, 29962, 13, 13, 1678, 4450, 29918, 1195, 329, 29918, 29896, 353, 4450, 29918, 2176, 29961, 11965, 29918, 2176, 3366, 11965, 3108, 1275, 448, 29896, 29962, 13, 1678, 4450, 29918, 1195, 329, 29918, 29896, 3366, 771, 9202, 3108, 353, 4450, 29918, 1195, 329, 29918, 29896, 3366, 3150, 3108, 448, 4450, 29918, 1195, 329, 29918, 29896, 3366, 5358, 3108, 13, 1678, 4450, 29918, 1195, 329, 29918, 29896, 353, 4450, 29918, 1195, 329, 29918, 29896, 29961, 3366, 3150, 613, 376, 1256, 613, 376, 771, 9202, 3108, 29962, 13, 13, 1678, 4450, 29918, 2176, 353, 10518, 29889, 17685, 4197, 11965, 29918, 29896, 29892, 4450, 29918, 1195, 329, 29918, 29896, 1402, 9685, 29922, 29900, 29897, 13, 13, 1678, 2099, 29918, 2176, 353, 4450, 29918, 2176, 29889, 27789, 703, 1256, 1159, 3366, 771, 9202, 16862, 12676, 580, 13, 1678, 2099, 29918, 2176, 353, 2099, 29918, 2176, 29889, 12071, 29918, 2248, 580, 13, 13, 1678, 1722, 29918, 2176, 353, 4450, 29918, 2176, 29889, 27789, 703, 1256, 1159, 3366, 3150, 16862, 2083, 580, 13, 1678, 1722, 29918, 2176, 353, 1722, 29918, 2176, 29889, 12071, 29918, 2248, 580, 13, 13, 1678, 2302, 29918, 2176, 353, 4450, 29918, 2176, 29889, 27789, 703, 1256, 1159, 3366, 3150, 16862, 2798, 580, 13, 1678, 2302, 29918, 2176, 353, 2302, 29918, 2176, 29889, 12071, 29918, 2248, 580, 13, 1678, 2302, 29918, 2176, 29889, 13099, 353, 6796, 1256, 613, 376, 311, 284, 29918, 3706, 3108, 13, 13, 1678, 4450, 29918, 2176, 353, 2099, 29918, 2176, 29889, 14634, 29898, 3150, 29918, 2176, 29892, 373, 29922, 3366, 1256, 3108, 467, 14634, 29898, 2798, 29918, 2176, 29892, 373, 29922, 3366, 1256, 20068, 13, 1678, 4450, 29918, 2176, 3366, 1256, 3108, 353, 10518, 29889, 517, 29918, 12673, 29898, 11965, 29918, 2176, 3366, 1256, 20068, 13, 1678, 4450, 29918, 2176, 3366, 6360, 3108, 353, 4450, 29918, 2176, 3366, 1256, 16862, 6008, 29889, 6360, 13, 1678, 4450, 29918, 2176, 3366, 1725, 29872, 3108, 353, 4450, 29918, 2176, 3366, 3150, 3108, 334, 29871, 29900, 29889, 29900, 29900, 29896, 29946, 29906, 29945, 334, 29871, 29906, 334, 29871, 29900, 29889, 29945, 13, 1678, 4450, 29918, 2176, 3366, 20725, 3108, 353, 4450, 29918, 2176, 3366, 3150, 3108, 334, 29871, 29900, 29889, 29900, 29900, 29941, 334, 29871, 29900, 29889, 29945, 13, 1678, 4450, 29918, 2176, 3366, 771, 9202, 29918, 1725, 29872, 29918, 20725, 3108, 353, 313, 13, 4706, 4450, 29918, 2176, 3366, 771, 9202, 3108, 448, 4450, 29918, 2176, 3366, 1725, 29872, 3108, 448, 4450, 29918, 2176, 3366, 20725, 3108, 13, 1678, 1723, 13, 1678, 4450, 29918, 2176, 3366, 7827, 29918, 771, 9202, 29918, 1725, 29872, 29918, 20725, 3108, 353, 313, 13, 4706, 4450, 29918, 2176, 3366, 771, 9202, 29918, 1725, 29872, 29918, 20725, 16862, 29883, 398, 2083, 580, 13, 1678, 13742, 14486, 29898, 29906, 29897, 13, 1678, 4450, 29918, 2176, 3366, 7827, 29918, 771, 9202, 3108, 353, 313, 11965, 29918, 2176, 3366, 771, 9202, 29918, 1725, 29872, 29918, 20725, 16862, 29883, 398, 2083, 16655, 14486, 29898, 29906, 29897, 13, 1678, 363, 784, 297, 518, 13, 4706, 376, 1725, 29872, 613, 13, 4706, 376, 20725, 613, 13, 4706, 376, 771, 9202, 29918, 1725, 29872, 29918, 20725, 613, 13, 4706, 376, 7827, 29918, 771, 9202, 29918, 1725, 29872, 29918, 20725, 613, 13, 4706, 376, 7827, 29918, 771, 9202, 613, 13, 1678, 4514, 29901, 13, 4706, 4450, 29918, 2176, 29961, 1054, 29962, 353, 4450, 29918, 2176, 29961, 1054, 1822, 14486, 29898, 29906, 29897, 13, 1678, 736, 4450, 29918, 2176, 13, 13, 13, 1753, 1653, 29918, 5080, 29918, 10492, 29898, 771, 9202, 29918, 2176, 29892, 21665, 29918, 1054, 1125, 13, 1678, 5401, 29918, 10492, 353, 313, 13, 4706, 4513, 29898, 13, 9651, 7431, 29898, 771, 9202, 29918, 2176, 29961, 771, 9202, 29918, 2176, 29961, 771, 9202, 29918, 1054, 29962, 1405, 29871, 29900, 2314, 847, 7431, 29898, 771, 9202, 29918, 2176, 511, 13, 632, 29906, 29892, 13, 4706, 1723, 13, 4706, 334, 29871, 29896, 29900, 29900, 13, 1678, 1723, 13, 1678, 736, 5401, 29918, 10492, 13, 13, 13, 1753, 1510, 29918, 771, 9202, 29898, 771, 9202, 29918, 2176, 29892, 1426, 29901, 851, 1125, 13, 1678, 7945, 29918, 5080, 29918, 10492, 353, 4513, 29898, 3258, 29918, 5080, 29918, 10492, 29898, 771, 9202, 29918, 2176, 29892, 376, 771, 9202, 4968, 29871, 29906, 29897, 13, 1678, 7945, 29918, 5080, 29918, 10492, 29918, 2541, 29918, 1725, 29872, 29918, 20725, 353, 4513, 29898, 13, 4706, 1653, 29918, 5080, 29918, 10492, 29898, 771, 9202, 29918, 2176, 29892, 376, 771, 9202, 29918, 1725, 29872, 29918, 20725, 4968, 29871, 29906, 13, 1678, 1723, 13, 1678, 21665, 29918, 2176, 3366, 2457, 3108, 353, 518, 13, 308, 29900, 565, 921, 1405, 29871, 29900, 1683, 921, 363, 921, 297, 1051, 29898, 771, 9202, 29918, 2176, 3366, 771, 9202, 29918, 1725, 29872, 29918, 20725, 20068, 13, 1678, 4514, 13, 1678, 4236, 29918, 2457, 353, 29871, 29900, 13, 1678, 4236, 29918, 2267, 353, 29871, 29900, 13, 1678, 363, 3240, 297, 1051, 29898, 771, 9202, 29918, 2176, 3366, 2457, 3108, 1125, 13, 4706, 565, 3240, 1275, 29871, 29900, 29901, 13, 9651, 4236, 29918, 2267, 353, 29871, 29900, 13, 4706, 4236, 29918, 2267, 4619, 3240, 13, 4706, 565, 4236, 29918, 2267, 529, 4236, 29918, 2457, 29901, 13, 9651, 4236, 29918, 2457, 353, 4236, 29918, 2267, 13, 1678, 17927, 29889, 3888, 29898, 13, 4706, 285, 15945, 29908, 13, 1678, 426, 726, 29913, 13, 1678, 448, 2683, 2683, 2683, 2683, 28400, 13, 268, 30606, 232, 160, 138, 235, 182, 138, 30659, 29901, 426, 14486, 29898, 771, 9202, 29918, 2176, 3366, 3150, 16862, 12676, 3285, 29906, 11877, 29896, 29900, 29900, 29900, 29913, 13, 268, 30606, 232, 160, 138, 31951, 30408, 31398, 233, 155, 150, 235, 182, 138, 30659, 29901, 426, 14486, 29898, 771, 9202, 29918, 2176, 1839, 3150, 13359, 12676, 580, 1919, 29906, 11877, 29896, 29900, 29900, 29900, 29913, 13, 268, 30878, 30257, 31398, 233, 155, 150, 235, 182, 138, 30659, 29901, 426, 14486, 29898, 771, 9202, 29918, 2176, 1839, 3150, 13359, 3317, 580, 1919, 29906, 11877, 29896, 29900, 29900, 29900, 29913, 13, 268, 30606, 232, 160, 138, 31951, 30408, 31398, 233, 155, 150, 30936, 233, 152, 187, 29901, 426, 14486, 29898, 771, 9202, 29918, 2176, 1839, 311, 284, 29918, 3706, 13359, 12676, 580, 1919, 29906, 2915, 13, 268, 30878, 30257, 31951, 30408, 31398, 233, 155, 150, 30936, 233, 152, 187, 29901, 426, 14486, 29898, 771, 9202, 29918, 2176, 1839, 311, 284, 29918, 3706, 13359, 3317, 580, 1919, 29906, 2915, 13, 268, 30878, 30446, 31951, 30408, 31398, 233, 155, 150, 30936, 233, 152, 187, 29901, 426, 14486, 29898, 771, 9202, 29918, 2176, 1839, 311, 284, 29918, 3706, 13359, 1195, 580, 1919, 29906, 2915, 13, 1678, 448, 2683, 2683, 2683, 2683, 28400, 13, 268, 30606, 232, 160, 138, 31519, 236, 136, 175, 29901, 426, 14486, 29898, 771, 9202, 29918, 2176, 3366, 771, 9202, 16862, 12676, 3285, 29906, 11877, 29896, 29900, 29900, 29900, 29913, 13, 268, 30606, 232, 160, 138, 30470, 31519, 236, 136, 175, 29901, 426, 771, 9202, 29918, 2176, 29889, 27789, 877, 6360, 1495, 1839, 771, 9202, 13359, 2083, 2141, 12676, 2141, 14486, 29898, 29906, 11877, 29896, 29900, 29900, 29900, 29913, 13, 268, 31721, 234, 145, 138, 29901, 426, 14968, 29918, 5080, 29918, 10492, 10560, 13, 1678, 448, 2683, 2683, 2683, 2683, 28400, 13, 268, 232, 147, 174, 30880, 234, 189, 143, 235, 181, 190, 29871, 29900, 29889, 29900, 29900, 29896, 29946, 29906, 29945, 30330, 31398, 233, 155, 150, 234, 171, 136, 29871, 29900, 29889, 29900, 29900, 29941, 29930, 29900, 29889, 29945, 13, 268, 30606, 232, 160, 138, 31519, 236, 136, 175, 29901, 426, 14486, 29898, 771, 9202, 29918, 2176, 3366, 771, 9202, 29918, 1725, 29872, 29918, 20725, 16862, 12676, 3285, 29906, 11877, 29896, 29900, 29900, 29900, 29913, 13, 268, 30878, 30257, 232, 153, 177, 30936, 233, 147, 144, 31369, 29901, 426, 14486, 29898, 771, 9202, 29918, 2176, 3366, 771, 9202, 29918, 1725, 29872, 29918, 20725, 16862, 1195, 3285, 29906, 11877, 29896, 29900, 29900, 29900, 29913, 13, 268, 30878, 30257, 234, 183, 178, 234, 172, 144, 233, 147, 144, 31369, 29901, 426, 14486, 29898, 3317, 29918, 2457, 29892, 29906, 11877, 29896, 29900, 29900, 29900, 29913, 13, 268, 30606, 232, 160, 138, 30470, 31519, 236, 136, 175, 29901, 426, 771, 9202, 29918, 2176, 29889, 27789, 877, 6360, 1495, 1839, 771, 9202, 29918, 1725, 29872, 29918, 20725, 13359, 2083, 2141, 12676, 2141, 14486, 29898, 29906, 11877, 29896, 29900, 29900, 29900, 29913, 13, 268, 31721, 234, 145, 138, 29901, 426, 14968, 29918, 5080, 29918, 10492, 29918, 2541, 29918, 1725, 29872, 29918, 20725, 10560, 13, 1678, 9995, 13, 1678, 1723, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 10961, 29918, 9175, 29918, 2176, 353, 2254, 29918, 941, 9429, 273, 29918, 17712, 29918, 9175, 29918, 1272, 580, 13, 1678, 10961, 29918, 9175, 29918, 2176, 353, 5941, 29918, 2176, 29898, 17712, 29918, 9175, 29918, 2176, 29897, 13, 1678, 1833, 29918, 16700, 353, 29871, 29945, 13, 1678, 4489, 353, 4682, 29918, 10599, 261, 29898, 17712, 29918, 9175, 29918, 2176, 29892, 1833, 29918, 16700, 29922, 4230, 29918, 16700, 29897, 13, 1678, 7945, 29918, 2176, 29892, 1243, 29918, 2176, 353, 6219, 29918, 14968, 29918, 1688, 29898, 2176, 29897, 13, 1678, 4682, 29918, 1761, 353, 1653, 29918, 14394, 29918, 11918, 29898, 2176, 29892, 1833, 29918, 16700, 29922, 4230, 29918, 16700, 29897, 13, 1678, 7945, 29918, 2176, 29892, 1243, 29918, 2176, 353, 1653, 29918, 4299, 29898, 14968, 29918, 2176, 29892, 1243, 29918, 2176, 29892, 4682, 29918, 1761, 29897, 13, 1678, 7945, 29918, 771, 9202, 29918, 2176, 353, 8147, 29918, 2457, 29918, 771, 9202, 29898, 14968, 29918, 2176, 29897, 13, 1678, 1243, 29918, 771, 9202, 29918, 2176, 353, 8147, 29918, 2457, 29918, 771, 9202, 29898, 1688, 29918, 2176, 29897, 13, 13, 1678, 1510, 29918, 771, 9202, 29898, 14968, 29918, 771, 9202, 29918, 2176, 29892, 376, 14968, 1159, 13, 1678, 1510, 29918, 771, 9202, 29898, 1688, 29918, 771, 9202, 29918, 2176, 29892, 376, 1688, 1159, 13, 13, 1678, 1243, 29918, 771, 9202, 29918, 2176, 29889, 517, 29918, 7638, 877, 1688, 29918, 771, 9202, 29918, 2176, 29889, 7638, 742, 2380, 29922, 8824, 29897, 13, 2 ]
pipeline/fast_gbdt.py
LasTAD/FATE_FL_IoT_Intrusions
0
95252
<gh_stars>0 import argparse from pipeline.backend.pipeline import PipeLine from pipeline.component import DataTransform from pipeline.component.hetero_fast_secureboost import HeteroFastSecureBoost from pipeline.component.intersection import Intersection from pipeline.component.reader import Reader from pipeline.interface.data import Data from pipeline.component.evaluation import Evaluation from pipeline.interface.model import Model from pipeline.utils.tools import load_job_config from pipeline.runtime.entity import JobParameters import datasets def main(config="config.yaml", namespace="", num_host=4): # obtain config if isinstance(config, str): config = load_job_config(config) backend = config.backend work_mode = config.work_mode parties = config.parties guest = parties.guest[0] hosts = config.parties.host[:num_host] # data sets data = datasets.dataset.swat_ait_hetero label = data['label'] guest_train_data = data['train']["guest"] host_train_data = data['train']["host"][:num_host] for d in [guest_train_data, *host_train_data]: d["namespace"] = f"{d['namespace']}{namespace}" guest_test_data = data['test']["guest"] host_test_data = data['test']["host"][:num_host] for d in [guest_test_data, *host_test_data]: d["namespace"] = f"{d['namespace']}{namespace}" # init pipeline pipeline = PipeLine().set_initiator(role="guest", party_id=guest).set_roles(guest=guest, host=hosts, ) # set data reader and data-io reader_0, reader_1 = Reader(name="reader_0"), Reader(name="reader_1") reader_0.get_party_instance(role='guest', party_id=guest).component_param(table=guest_train_data) for i in range(num_host): reader_0.get_party_instance(role='host', party_id=hosts[i]) \ .component_param(table=host_train_data[i]) reader_1.get_party_instance(role='guest', party_id=guest).component_param(table=guest_test_data) for i in range(num_host): reader_1.get_party_instance(role='host', party_id=hosts[i]) \ .component_param(table=host_test_data[i]) datatr_0, datatr_1 = DataTransform(name="datatr_0"), DataTransform(name="datatr_1") datatr_0.get_party_instance(role="guest", party_id=guest).component_param(with_label=True, output_format="dense", label_name=label, label_type='int') datatr_0.get_party_instance(role="host", party_id=hosts).component_param(with_label=False) datatr_1.get_party_instance(role="guest", party_id=guest).component_param(with_label=True, output_format="dense", label_name=label) datatr_1.get_party_instance(role="host", party_id=hosts).component_param(with_label=False) # data intersect component intersect_0 = Intersection(name="intersection_0") intersect_1 = Intersection(name="intersection_1") # secure boost component hetero_fast_secure_boost_0 = HeteroFastSecureBoost(name="hetero_fast_secure_boost_0", num_trees=15, tree_num_per_party=1, task_type="classification", objective_param={"objective": "cross_entropy"}, encrypt_param={"method": "iterativeAffine"}, tree_param={"max_depth": 3}, validation_freqs=1) # evaluation component evaluation_0 = Evaluation(name="evaluation_0", eval_type="binary") pipeline.add_component(reader_0) pipeline.add_component(reader_1) pipeline.add_component(datatr_0, data=Data(data=reader_0.output.data)) pipeline.add_component(datatr_1, data=Data(data=reader_1.output.data), model=Model(datatr_0.output.model)) pipeline.add_component(intersect_0, data=Data(data=datatr_0.output.data)) pipeline.add_component(intersect_1, data=Data(data=datatr_1.output.data)) pipeline.add_component(hetero_fast_secure_boost_0, data=Data(train_data=intersect_0.output.data, validate_data=intersect_1.output.data)) pipeline.add_component(evaluation_0, data=Data(data=hetero_fast_secure_boost_0.output.data)) pipeline.compile() job_parameters = JobParameters(backend=backend, work_mode=work_mode, adaptation_parameters={'task_cores_per_node': 2, 'request_task_cores': 2}) pipeline.fit(job_parameters) pipeline.dump("fast_gbdt_model.pkl") print("fitting hetero secureboost done, result:") print(pipeline.get_component("hetero_secure_boost_0").get_summary()) # pipeline = PipeLine.load_model_from_file('pipeline_saved.pkl') print('start to predict') # predict # deploy required components pipeline.deploy_component([datatr_0, intersect_0, hetero_fast_secure_boost_0, evaluation_0]) predict_pipeline = PipeLine() # add data reader onto predict pipeline predict_pipeline.add_component(reader_0) # add selected components from train pipeline onto predict pipeline # specify data source predict_pipeline.add_component(pipeline, data=Data(predict_input={pipeline.datatr_0.input.data: reader_0.output.data})) # run predict model predict_pipeline.predict(job_parameters) if __name__ == "__main__": parser = argparse.ArgumentParser("PIPELINE DEMO") parser.add_argument("-config", type=str, help="config file") args = parser.parse_args() if args.config is not None: main(args.config) else: main()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 1852, 5510, 13, 13, 3166, 16439, 29889, 27852, 29889, 13096, 5570, 1053, 7362, 412, 3542, 13, 3166, 16439, 29889, 9700, 1053, 3630, 13372, 13, 3166, 16439, 29889, 9700, 29889, 29882, 1308, 29877, 29918, 11255, 29918, 24216, 17079, 1053, 379, 1308, 29877, 29943, 579, 7898, 545, 8431, 520, 13, 3166, 16439, 29889, 9700, 29889, 1639, 2042, 1053, 4124, 2042, 13, 3166, 16439, 29889, 9700, 29889, 16950, 1053, 830, 1664, 13, 3166, 16439, 29889, 13248, 29889, 1272, 1053, 3630, 13, 3166, 16439, 29889, 9700, 29889, 24219, 362, 1053, 382, 4387, 362, 13, 3166, 16439, 29889, 13248, 29889, 4299, 1053, 8125, 13, 13, 3166, 16439, 29889, 13239, 29889, 8504, 1053, 2254, 29918, 9057, 29918, 2917, 13, 3166, 16439, 29889, 15634, 29889, 10041, 1053, 17163, 11507, 13, 5215, 20035, 13, 13, 13, 1753, 1667, 29898, 2917, 543, 2917, 29889, 25162, 613, 7397, 543, 613, 954, 29918, 3069, 29922, 29946, 1125, 13, 1678, 396, 4017, 2295, 13, 1678, 565, 338, 8758, 29898, 2917, 29892, 851, 1125, 13, 4706, 2295, 353, 2254, 29918, 9057, 29918, 2917, 29898, 2917, 29897, 13, 13, 1678, 14998, 353, 2295, 29889, 27852, 13, 1678, 664, 29918, 8513, 353, 2295, 29889, 1287, 29918, 8513, 13, 13, 1678, 13973, 353, 2295, 29889, 1595, 583, 13, 1678, 17838, 353, 13973, 29889, 2543, 342, 29961, 29900, 29962, 13, 1678, 18982, 353, 2295, 29889, 1595, 583, 29889, 3069, 7503, 1949, 29918, 3069, 29962, 13, 13, 1678, 396, 848, 6166, 13, 1678, 848, 353, 20035, 29889, 24713, 29889, 2774, 271, 29918, 1249, 29918, 29882, 1308, 29877, 13, 1678, 3858, 353, 848, 1839, 1643, 2033, 13, 1678, 17838, 29918, 14968, 29918, 1272, 353, 848, 1839, 14968, 2033, 3366, 2543, 342, 3108, 13, 1678, 3495, 29918, 14968, 29918, 1272, 353, 848, 1839, 14968, 2033, 3366, 3069, 3108, 7503, 1949, 29918, 3069, 29962, 13, 1678, 363, 270, 297, 518, 2543, 342, 29918, 14968, 29918, 1272, 29892, 334, 3069, 29918, 14968, 29918, 1272, 5387, 13, 4706, 270, 3366, 22377, 3108, 353, 285, 29908, 29912, 29881, 1839, 22377, 2033, 1157, 22377, 5038, 13, 13, 1678, 17838, 29918, 1688, 29918, 1272, 353, 848, 1839, 1688, 2033, 3366, 2543, 342, 3108, 13, 1678, 3495, 29918, 1688, 29918, 1272, 353, 848, 1839, 1688, 2033, 3366, 3069, 3108, 7503, 1949, 29918, 3069, 29962, 13, 1678, 363, 270, 297, 518, 2543, 342, 29918, 1688, 29918, 1272, 29892, 334, 3069, 29918, 1688, 29918, 1272, 5387, 13, 4706, 270, 3366, 22377, 3108, 353, 285, 29908, 29912, 29881, 1839, 22377, 2033, 1157, 22377, 5038, 13, 13, 1678, 396, 2069, 16439, 13, 1678, 16439, 353, 7362, 412, 3542, 2141, 842, 29918, 2344, 29875, 1061, 29898, 12154, 543, 2543, 342, 613, 6263, 29918, 333, 29922, 2543, 342, 467, 842, 29918, 307, 793, 29898, 2543, 342, 29922, 2543, 342, 29892, 3495, 29922, 23525, 29892, 1723, 13, 13, 1678, 396, 731, 848, 9591, 322, 848, 29899, 601, 13, 13, 1678, 9591, 29918, 29900, 29892, 9591, 29918, 29896, 353, 830, 1664, 29898, 978, 543, 16950, 29918, 29900, 4968, 830, 1664, 29898, 978, 543, 16950, 29918, 29896, 1159, 13, 1678, 9591, 29918, 29900, 29889, 657, 29918, 22633, 29918, 8758, 29898, 12154, 2433, 2543, 342, 742, 6263, 29918, 333, 29922, 2543, 342, 467, 9700, 29918, 3207, 29898, 2371, 29922, 2543, 342, 29918, 14968, 29918, 1272, 29897, 13, 1678, 363, 474, 297, 3464, 29898, 1949, 29918, 3069, 1125, 13, 4706, 9591, 29918, 29900, 29889, 657, 29918, 22633, 29918, 8758, 29898, 12154, 2433, 3069, 742, 6263, 29918, 333, 29922, 23525, 29961, 29875, 2314, 320, 13, 9651, 869, 9700, 29918, 3207, 29898, 2371, 29922, 3069, 29918, 14968, 29918, 1272, 29961, 29875, 2314, 13, 1678, 9591, 29918, 29896, 29889, 657, 29918, 22633, 29918, 8758, 29898, 12154, 2433, 2543, 342, 742, 6263, 29918, 333, 29922, 2543, 342, 467, 9700, 29918, 3207, 29898, 2371, 29922, 2543, 342, 29918, 1688, 29918, 1272, 29897, 13, 1678, 363, 474, 297, 3464, 29898, 1949, 29918, 3069, 1125, 13, 4706, 9591, 29918, 29896, 29889, 657, 29918, 22633, 29918, 8758, 29898, 12154, 2433, 3069, 742, 6263, 29918, 333, 29922, 23525, 29961, 29875, 2314, 320, 13, 9651, 869, 9700, 29918, 3207, 29898, 2371, 29922, 3069, 29918, 1688, 29918, 1272, 29961, 29875, 2314, 13, 13, 1678, 1418, 8141, 29918, 29900, 29892, 1418, 8141, 29918, 29896, 353, 3630, 13372, 29898, 978, 543, 4130, 8141, 29918, 29900, 4968, 3630, 13372, 29898, 978, 543, 4130, 8141, 29918, 29896, 1159, 13, 1678, 1418, 8141, 29918, 29900, 29889, 657, 29918, 22633, 29918, 8758, 29898, 12154, 543, 2543, 342, 613, 6263, 29918, 333, 29922, 2543, 342, 467, 9700, 29918, 3207, 29898, 2541, 29918, 1643, 29922, 5574, 29892, 1962, 29918, 4830, 543, 1145, 344, 613, 13, 462, 462, 462, 462, 795, 3858, 29918, 978, 29922, 1643, 29892, 3858, 29918, 1853, 2433, 524, 1495, 13, 1678, 1418, 8141, 29918, 29900, 29889, 657, 29918, 22633, 29918, 8758, 29898, 12154, 543, 3069, 613, 6263, 29918, 333, 29922, 23525, 467, 9700, 29918, 3207, 29898, 2541, 29918, 1643, 29922, 8824, 29897, 13, 1678, 1418, 8141, 29918, 29896, 29889, 657, 29918, 22633, 29918, 8758, 29898, 12154, 543, 2543, 342, 613, 6263, 29918, 333, 29922, 2543, 342, 467, 9700, 29918, 3207, 29898, 2541, 29918, 1643, 29922, 5574, 29892, 1962, 29918, 4830, 543, 1145, 344, 613, 13, 462, 462, 462, 462, 795, 3858, 29918, 978, 29922, 1643, 29897, 13, 1678, 1418, 8141, 29918, 29896, 29889, 657, 29918, 22633, 29918, 8758, 29898, 12154, 543, 3069, 613, 6263, 29918, 333, 29922, 23525, 467, 9700, 29918, 3207, 29898, 2541, 29918, 1643, 29922, 8824, 29897, 13, 13, 1678, 396, 848, 25869, 4163, 13, 1678, 25869, 29918, 29900, 353, 4124, 2042, 29898, 978, 543, 1639, 2042, 29918, 29900, 1159, 13, 1678, 25869, 29918, 29896, 353, 4124, 2042, 29898, 978, 543, 1639, 2042, 29918, 29896, 1159, 13, 13, 1678, 396, 11592, 14505, 4163, 13, 1678, 25745, 29877, 29918, 11255, 29918, 24216, 29918, 17079, 29918, 29900, 353, 379, 1308, 29877, 29943, 579, 7898, 545, 8431, 520, 29898, 978, 543, 29882, 1308, 29877, 29918, 11255, 29918, 24216, 29918, 17079, 29918, 29900, 613, 13, 462, 462, 462, 539, 954, 29918, 28737, 29922, 29896, 29945, 29892, 13, 462, 462, 462, 539, 5447, 29918, 1949, 29918, 546, 29918, 22633, 29922, 29896, 29892, 13, 462, 462, 462, 539, 3414, 29918, 1853, 543, 1990, 2450, 613, 13, 462, 462, 462, 539, 12091, 29918, 3207, 3790, 29908, 3318, 573, 1115, 376, 19128, 29918, 296, 14441, 10758, 13, 462, 462, 462, 539, 27924, 29918, 3207, 3790, 29908, 5696, 1115, 376, 1524, 1230, 27867, 457, 10758, 13, 462, 462, 462, 539, 5447, 29918, 3207, 3790, 29908, 3317, 29918, 19488, 1115, 29871, 29941, 1118, 13, 462, 462, 462, 539, 8845, 29918, 29888, 7971, 29879, 29922, 29896, 29897, 13, 13, 1678, 396, 17983, 4163, 13, 1678, 17983, 29918, 29900, 353, 382, 4387, 362, 29898, 978, 543, 24219, 362, 29918, 29900, 613, 19745, 29918, 1853, 543, 19541, 1159, 13, 13, 1678, 16439, 29889, 1202, 29918, 9700, 29898, 16950, 29918, 29900, 29897, 13, 1678, 16439, 29889, 1202, 29918, 9700, 29898, 16950, 29918, 29896, 29897, 13, 1678, 16439, 29889, 1202, 29918, 9700, 29898, 4130, 8141, 29918, 29900, 29892, 848, 29922, 1469, 29898, 1272, 29922, 16950, 29918, 29900, 29889, 4905, 29889, 1272, 876, 13, 1678, 16439, 29889, 1202, 29918, 9700, 29898, 4130, 8141, 29918, 29896, 29892, 848, 29922, 1469, 29898, 1272, 29922, 16950, 29918, 29896, 29889, 4905, 29889, 1272, 511, 1904, 29922, 3195, 29898, 4130, 8141, 29918, 29900, 29889, 4905, 29889, 4299, 876, 13, 1678, 16439, 29889, 1202, 29918, 9700, 29898, 1639, 8803, 29918, 29900, 29892, 848, 29922, 1469, 29898, 1272, 29922, 4130, 8141, 29918, 29900, 29889, 4905, 29889, 1272, 876, 13, 1678, 16439, 29889, 1202, 29918, 9700, 29898, 1639, 8803, 29918, 29896, 29892, 848, 29922, 1469, 29898, 1272, 29922, 4130, 8141, 29918, 29896, 29889, 4905, 29889, 1272, 876, 13, 1678, 16439, 29889, 1202, 29918, 9700, 29898, 29882, 1308, 29877, 29918, 11255, 29918, 24216, 29918, 17079, 29918, 29900, 29892, 13, 462, 965, 848, 29922, 1469, 29898, 14968, 29918, 1272, 29922, 1639, 8803, 29918, 29900, 29889, 4905, 29889, 1272, 29892, 12725, 29918, 1272, 29922, 1639, 8803, 29918, 29896, 29889, 4905, 29889, 1272, 876, 13, 1678, 16439, 29889, 1202, 29918, 9700, 29898, 24219, 362, 29918, 29900, 29892, 848, 29922, 1469, 29898, 1272, 29922, 29882, 1308, 29877, 29918, 11255, 29918, 24216, 29918, 17079, 29918, 29900, 29889, 4905, 29889, 1272, 876, 13, 13, 1678, 16439, 29889, 12198, 580, 13, 1678, 4982, 29918, 16744, 353, 17163, 11507, 29898, 27852, 29922, 27852, 29892, 664, 29918, 8513, 29922, 1287, 29918, 8513, 29892, 13, 462, 462, 259, 28206, 29918, 16744, 3790, 29915, 7662, 29918, 29883, 2361, 29918, 546, 29918, 3177, 2396, 29871, 29906, 29892, 525, 3827, 29918, 7662, 29918, 29883, 2361, 2396, 29871, 29906, 1800, 13, 1678, 16439, 29889, 9202, 29898, 9057, 29918, 16744, 29897, 13, 1678, 16439, 29889, 15070, 703, 11255, 29918, 26300, 6008, 29918, 4299, 29889, 29886, 6321, 1159, 13, 13, 1678, 1596, 703, 29888, 5367, 25745, 29877, 11592, 17079, 2309, 29892, 1121, 29901, 1159, 13, 1678, 1596, 29898, 13096, 5570, 29889, 657, 29918, 9700, 703, 29882, 1308, 29877, 29918, 24216, 29918, 17079, 29918, 29900, 2564, 657, 29918, 7727, 3101, 13, 1678, 396, 16439, 353, 7362, 412, 3542, 29889, 1359, 29918, 4299, 29918, 3166, 29918, 1445, 877, 13096, 5570, 29918, 17314, 29889, 29886, 6321, 1495, 13, 1678, 1596, 877, 2962, 304, 8500, 1495, 13, 13, 13, 1678, 396, 8500, 13, 1678, 396, 7246, 3734, 7117, 13, 1678, 16439, 29889, 16519, 29918, 9700, 4197, 4130, 8141, 29918, 29900, 29892, 25869, 29918, 29900, 29892, 25745, 29877, 29918, 11255, 29918, 24216, 29918, 17079, 29918, 29900, 29892, 17983, 29918, 29900, 2314, 13, 13, 1678, 8500, 29918, 13096, 5570, 353, 7362, 412, 3542, 580, 13, 1678, 396, 788, 848, 9591, 11480, 8500, 16439, 13, 1678, 8500, 29918, 13096, 5570, 29889, 1202, 29918, 9700, 29898, 16950, 29918, 29900, 29897, 13, 1678, 396, 788, 4629, 7117, 515, 7945, 16439, 11480, 8500, 16439, 13, 1678, 396, 6084, 848, 2752, 13, 1678, 8500, 29918, 13096, 5570, 29889, 1202, 29918, 9700, 29898, 13096, 5570, 29892, 13, 462, 462, 259, 848, 29922, 1469, 29898, 27711, 29918, 2080, 3790, 13096, 5570, 29889, 4130, 8141, 29918, 29900, 29889, 2080, 29889, 1272, 29901, 9591, 29918, 29900, 29889, 4905, 29889, 1272, 20073, 13, 13, 1678, 396, 1065, 8500, 1904, 13, 1678, 8500, 29918, 13096, 5570, 29889, 27711, 29898, 9057, 29918, 16744, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 703, 2227, 4162, 18521, 5012, 6720, 1159, 13, 1678, 13812, 29889, 1202, 29918, 23516, 703, 29899, 2917, 613, 1134, 29922, 710, 29892, 13, 462, 4706, 1371, 543, 2917, 934, 1159, 13, 1678, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 1678, 565, 6389, 29889, 2917, 338, 451, 6213, 29901, 13, 4706, 1667, 29898, 5085, 29889, 2917, 29897, 13, 1678, 1683, 29901, 13, 4706, 1667, 580, 13, 2 ]
runserver.py
chintal/tendril-monitor-vendor
0
23006
<filename>runserver.py #!/usr/bin/env python # encoding: utf-8 # Copyright (C) 2015 <NAME> # Released under the MIT license. """ Simple Deployment Example ------------------------- """ from vendor_monitor import worker from twisted.internet import reactor import logging logging.basicConfig(level=logging.INFO) if __name__ == '__main__': worker.start() reactor.run()
[ 1, 529, 9507, 29958, 3389, 2974, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 8025, 29901, 23616, 29899, 29947, 13, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29945, 529, 5813, 29958, 13, 29937, 830, 4611, 1090, 278, 341, 1806, 19405, 29889, 13, 13, 15945, 29908, 13, 13, 15427, 10034, 22812, 8741, 13, 2683, 1378, 29899, 13, 13, 15945, 29908, 13, 13, 3166, 27042, 29918, 3712, 2105, 1053, 15645, 13, 3166, 3252, 12652, 29889, 14168, 300, 1053, 337, 7168, 13, 13, 5215, 12183, 13, 21027, 29889, 16121, 3991, 29898, 5563, 29922, 21027, 29889, 11690, 29897, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 15645, 29889, 2962, 580, 13, 1678, 337, 7168, 29889, 3389, 580, 13, 2 ]
test/api/test_histories.py
mmiladi/galaxy
1
2740
<filename>test/api/test_histories.py # -*- coding: utf-8 -*- from requests import ( get, post, put ) from base import api # noqa: I100 from base.populators import ( # noqa: I100 DatasetCollectionPopulator, DatasetPopulator, wait_on ) class HistoriesApiTestCase(api.ApiTestCase): def setUp(self): super(HistoriesApiTestCase, self).setUp() self.dataset_populator = DatasetPopulator(self.galaxy_interactor) self.dataset_collection_populator = DatasetCollectionPopulator(self.galaxy_interactor) def test_create_history(self): # Create a history. create_response = self._create_history("TestHistory1") created_id = create_response["id"] # Make sure new history appears in index of user's histories. index_response = self._get("histories").json() indexed_history = [h for h in index_response if h["id"] == created_id][0] self.assertEquals(indexed_history["name"], "TestHistory1") def test_show_history(self): history_id = self._create_history("TestHistoryForShow")["id"] show_response = self._show(history_id) self._assert_has_key( show_response, 'id', 'name', 'annotation', 'size', 'contents_url', 'state', 'state_details', 'state_ids' ) state_details = show_response["state_details"] state_ids = show_response["state_ids"] states = [ 'discarded', 'empty', 'error', 'failed_metadata', 'new', 'ok', 'paused', 'queued', 'running', 'setting_metadata', 'upload' ] assert isinstance(state_details, dict) assert isinstance(state_ids, dict) self._assert_has_keys(state_details, *states) self._assert_has_keys(state_ids, *states) def test_show_most_recently_used(self): history_id = self._create_history("TestHistoryRecent")["id"] show_response = self._get("histories/most_recently_used").json() assert show_response["id"] == history_id def test_index_order(self): slightly_older_history_id = self._create_history("TestHistorySlightlyOlder")["id"] newer_history_id = self._create_history("TestHistoryNewer")["id"] index_response = self._get("histories").json() assert index_response[0]["id"] == newer_history_id assert index_response[1]["id"] == slightly_older_history_id def test_delete(self): # Setup a history and ensure it is in the index history_id = self._create_history("TestHistoryForDelete")["id"] index_response = self._get("histories").json() assert index_response[0]["id"] == history_id show_response = self._show(history_id) assert not show_response["deleted"] # Delete the history self._delete("histories/%s" % history_id) # Check can view it - but it is deleted show_response = self._show(history_id) assert show_response["deleted"] # Verify it is dropped from history index index_response = self._get("histories").json() assert len(index_response) == 0 or index_response[0]["id"] != history_id # Add deleted filter to index to view it index_response = self._get("histories", {"deleted": "true"}).json() assert index_response[0]["id"] == history_id def test_purge(self): history_id = self._create_history("TestHistoryForPurge")["id"] data = {'purge': True} self._delete("histories/%s" % history_id, data=data) show_response = self._show(history_id) assert show_response["deleted"] assert show_response["purged"] def test_undelete(self): history_id = self._create_history("TestHistoryForDeleteAndUndelete")["id"] self._delete("histories/%s" % history_id) self._post("histories/deleted/%s/undelete" % history_id) show_response = self._show(history_id) assert not show_response["deleted"] def test_update(self): history_id = self._create_history("TestHistoryForUpdating")["id"] self._update(history_id, {"name": "New Name"}) show_response = self._show(history_id) assert show_response["name"] == "New Name" unicode_name = u'桜ゲノム' self._update(history_id, {"name": unicode_name}) show_response = self._show(history_id) assert show_response["name"] == unicode_name, show_response quoted_name = "'MooCow'" self._update(history_id, {"name": quoted_name}) show_response = self._show(history_id) assert show_response["name"] == quoted_name self._update(history_id, {"deleted": True}) show_response = self._show(history_id) assert show_response["deleted"], show_response self._update(history_id, {"deleted": False}) show_response = self._show(history_id) assert not show_response["deleted"] self._update(history_id, {"published": True}) show_response = self._show(history_id) assert show_response["published"] self._update(history_id, {"genome_build": "hg18"}) show_response = self._show(history_id) assert show_response["genome_build"] == "hg18" self._update(history_id, {"annotation": "The annotation is cool"}) show_response = self._show(history_id) assert show_response["annotation"] == "The annotation is cool" self._update(history_id, {"annotation": unicode_name}) show_response = self._show(history_id) assert show_response["annotation"] == unicode_name, show_response self._update(history_id, {"annotation": quoted_name}) show_response = self._show(history_id) assert show_response["annotation"] == quoted_name def test_update_invalid_attribute(self): history_id = self._create_history("TestHistoryForInvalidUpdating")["id"] put_response = self._update(history_id, {"invalidkey": "moo"}) assert "invalidkey" not in put_response.json() def test_update_invalid_types(self): history_id = self._create_history("TestHistoryForUpdatingInvalidTypes")["id"] for str_key in ["name", "annotation"]: assert self._update(history_id, {str_key: False}).status_code == 400 for bool_key in ['deleted', 'importable', 'published']: assert self._update(history_id, {bool_key: "a string"}).status_code == 400 assert self._update(history_id, {"tags": "a simple string"}).status_code == 400 assert self._update(history_id, {"tags": [True]}).status_code == 400 def test_invalid_keys(self): invalid_history_id = "1234123412341234" assert self._get("histories/%s" % invalid_history_id).status_code == 400 assert self._update(invalid_history_id, {"name": "new name"}).status_code == 400 assert self._delete("histories/%s" % invalid_history_id).status_code == 400 assert self._post("histories/deleted/%s/undelete" % invalid_history_id).status_code == 400 def test_create_anonymous_fails(self): post_data = dict(name="CannotCreate") # Using lower-level _api_url will cause key to not be injected. histories_url = self._api_url("histories") create_response = post(url=histories_url, data=post_data) self._assert_status_code_is(create_response, 403) def test_import_export(self): history_name = "for_export" history_id = self.dataset_populator.new_history(name=history_name) self.dataset_populator.new_dataset(history_id, content="1 2 3") imported_history_id = self._reimport_history(history_id, history_name) contents_response = self._get("histories/%s/contents" % imported_history_id) self._assert_status_code_is(contents_response, 200) contents = contents_response.json() assert len(contents) == 1 imported_content = self.dataset_populator.get_history_dataset_content( history_id=imported_history_id, dataset_id=contents[0]["id"] ) assert imported_content == "1 2 3\n" def test_import_export_collection(self): from nose.plugins.skip import SkipTest raise SkipTest("Collection import/export not yet implemented") history_name = "for_export_with_collections" history_id = self.dataset_populator.new_history(name=history_name) self.dataset_collection_populator.create_list_in_history(history_id, contents=["Hello", "World"]) imported_history_id = self._reimport_history(history_id, history_name) contents_response = self._get("histories/%s/contents" % imported_history_id) self._assert_status_code_is(contents_response, 200) contents = contents_response.json() assert len(contents) == 3 def _reimport_history(self, history_id, history_name): # Ensure the history is ready to go... self.dataset_populator.wait_for_history(history_id, assert_ok=True) # Export the history. download_path = self._export(history_id) # Create download for history full_download_url = "%s%s?key=%s" % (self.url, download_path, self.galaxy_interactor.api_key) download_response = get(full_download_url) self._assert_status_code_is(download_response, 200) def history_names(): history_index = self._get("histories") return dict((h["name"], h) for h in history_index.json()) import_name = "imported from archive: %s" % history_name assert import_name not in history_names() import_data = dict(archive_source=full_download_url, archive_type="url") import_response = self._post("histories", data=import_data) self._assert_status_code_is(import_response, 200) def has_history_with_name(): histories = history_names() return histories.get(import_name, None) imported_history = wait_on(has_history_with_name, desc="import history") imported_history_id = imported_history["id"] self.dataset_populator.wait_for_history(imported_history_id) return imported_history_id def test_create_tag(self): post_data = dict(name="TestHistoryForTag") history_id = self._post("histories", data=post_data).json()["id"] tag_data = dict(value="awesometagvalue") tag_url = "histories/%s/tags/awesometagname" % history_id tag_create_response = self._post(tag_url, data=tag_data) self._assert_status_code_is(tag_create_response, 200) def _export(self, history_id): export_url = self._api_url("histories/%s/exports" % history_id, use_key=True) put_response = put(export_url) self._assert_status_code_is(put_response, 202) def export_ready_response(): put_response = put(export_url) if put_response.status_code == 202: return None return put_response put_response = wait_on(export_ready_response, desc="export ready") self._assert_status_code_is(put_response, 200) response = put_response.json() self._assert_has_keys(response, "download_url") download_path = response["download_url"] return download_path def _show(self, history_id): return self._get("histories/%s" % history_id).json() def _update(self, history_id, data): update_url = self._api_url("histories/%s" % history_id, use_key=True) put_response = put(update_url, json=data) return put_response def _create_history(self, name): post_data = dict(name=name) create_response = self._post("histories", data=post_data).json() self._assert_has_keys(create_response, "name", "id") self.assertEquals(create_response["name"], name) return create_response # TODO: (CE) test_create_from_copy
[ 1, 529, 9507, 29958, 1688, 29914, 2754, 29914, 1688, 29918, 16211, 583, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 7274, 1053, 313, 13, 1678, 679, 29892, 13, 1678, 1400, 29892, 13, 1678, 1925, 13, 29897, 13, 13, 3166, 2967, 1053, 7882, 29871, 396, 694, 25621, 29901, 306, 29896, 29900, 29900, 13, 3166, 2967, 29889, 7323, 352, 4097, 1053, 313, 29871, 396, 694, 25621, 29901, 306, 29896, 29900, 29900, 13, 1678, 13373, 24541, 7196, 12310, 9183, 29892, 13, 1678, 13373, 24541, 12310, 9183, 29892, 13, 1678, 4480, 29918, 265, 13, 29897, 13, 13, 13, 1990, 4731, 583, 11713, 3057, 8259, 29898, 2754, 29889, 11713, 3057, 8259, 1125, 13, 13, 1678, 822, 731, 3373, 29898, 1311, 1125, 13, 4706, 2428, 29898, 29950, 2118, 583, 11713, 3057, 8259, 29892, 1583, 467, 842, 3373, 580, 13, 4706, 1583, 29889, 24713, 29918, 7323, 9183, 353, 13373, 24541, 12310, 9183, 29898, 1311, 29889, 23014, 26825, 29918, 1639, 7168, 29897, 13, 4706, 1583, 29889, 24713, 29918, 10855, 29918, 7323, 9183, 353, 13373, 24541, 7196, 12310, 9183, 29898, 1311, 29889, 23014, 26825, 29918, 1639, 7168, 29897, 13, 13, 1678, 822, 1243, 29918, 3258, 29918, 18434, 29898, 1311, 1125, 13, 4706, 396, 6204, 263, 4955, 29889, 13, 4706, 1653, 29918, 5327, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 29896, 1159, 13, 4706, 2825, 29918, 333, 353, 1653, 29918, 5327, 3366, 333, 3108, 13, 13, 4706, 396, 8561, 1854, 716, 4955, 5692, 297, 2380, 310, 1404, 29915, 29879, 3603, 583, 29889, 13, 4706, 2380, 29918, 5327, 353, 1583, 3032, 657, 703, 16211, 583, 2564, 3126, 580, 13, 4706, 27541, 29918, 18434, 353, 518, 29882, 363, 298, 297, 2380, 29918, 5327, 565, 298, 3366, 333, 3108, 1275, 2825, 29918, 333, 3816, 29900, 29962, 13, 4706, 1583, 29889, 9294, 14776, 29898, 2248, 287, 29918, 18434, 3366, 978, 12436, 376, 3057, 20570, 29896, 1159, 13, 13, 1678, 822, 1243, 29918, 4294, 29918, 18434, 29898, 1311, 1125, 13, 4706, 4955, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 2831, 8964, 1159, 3366, 333, 3108, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 1583, 3032, 9294, 29918, 5349, 29918, 1989, 29898, 13, 9651, 1510, 29918, 5327, 29892, 13, 9651, 525, 333, 742, 525, 978, 742, 525, 18317, 742, 525, 2311, 742, 525, 10853, 29918, 2271, 742, 13, 9651, 525, 3859, 742, 525, 3859, 29918, 14144, 742, 525, 3859, 29918, 4841, 29915, 13, 4706, 1723, 13, 13, 4706, 2106, 29918, 14144, 353, 1510, 29918, 5327, 3366, 3859, 29918, 14144, 3108, 13, 4706, 2106, 29918, 4841, 353, 1510, 29918, 5327, 3366, 3859, 29918, 4841, 3108, 13, 4706, 5922, 353, 518, 13, 9651, 525, 2218, 7543, 287, 742, 525, 6310, 742, 525, 2704, 742, 525, 26061, 29918, 19635, 742, 525, 1482, 742, 13, 9651, 525, 554, 742, 525, 29886, 15244, 742, 525, 802, 6742, 742, 525, 21094, 742, 525, 26740, 29918, 19635, 742, 525, 9009, 29915, 13, 4706, 4514, 13, 4706, 4974, 338, 8758, 29898, 3859, 29918, 14144, 29892, 9657, 29897, 13, 4706, 4974, 338, 8758, 29898, 3859, 29918, 4841, 29892, 9657, 29897, 13, 4706, 1583, 3032, 9294, 29918, 5349, 29918, 8149, 29898, 3859, 29918, 14144, 29892, 334, 28631, 29897, 13, 4706, 1583, 3032, 9294, 29918, 5349, 29918, 8149, 29898, 3859, 29918, 4841, 29892, 334, 28631, 29897, 13, 13, 1678, 822, 1243, 29918, 4294, 29918, 3242, 29918, 276, 1760, 368, 29918, 3880, 29898, 1311, 1125, 13, 4706, 4955, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 4789, 296, 1159, 3366, 333, 3108, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 657, 703, 16211, 583, 29914, 3242, 29918, 276, 1760, 368, 29918, 3880, 2564, 3126, 580, 13, 4706, 4974, 1510, 29918, 5327, 3366, 333, 3108, 1275, 4955, 29918, 333, 13, 13, 1678, 822, 1243, 29918, 2248, 29918, 2098, 29898, 1311, 1125, 13, 4706, 10029, 29918, 3194, 29918, 18434, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 29903, 4366, 368, 21648, 261, 1159, 3366, 333, 3108, 13, 4706, 20687, 29918, 18434, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 8139, 556, 1159, 3366, 333, 3108, 13, 4706, 2380, 29918, 5327, 353, 1583, 3032, 657, 703, 16211, 583, 2564, 3126, 580, 13, 4706, 4974, 2380, 29918, 5327, 29961, 29900, 29962, 3366, 333, 3108, 1275, 20687, 29918, 18434, 29918, 333, 13, 4706, 4974, 2380, 29918, 5327, 29961, 29896, 29962, 3366, 333, 3108, 1275, 10029, 29918, 3194, 29918, 18434, 29918, 333, 13, 13, 1678, 822, 1243, 29918, 8143, 29898, 1311, 1125, 13, 4706, 396, 3789, 786, 263, 4955, 322, 9801, 372, 338, 297, 278, 2380, 13, 4706, 4955, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 2831, 12498, 1159, 3366, 333, 3108, 13, 4706, 2380, 29918, 5327, 353, 1583, 3032, 657, 703, 16211, 583, 2564, 3126, 580, 13, 4706, 4974, 2380, 29918, 5327, 29961, 29900, 29962, 3366, 333, 3108, 1275, 4955, 29918, 333, 13, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 451, 1510, 29918, 5327, 3366, 311, 22742, 3108, 13, 13, 4706, 396, 21267, 278, 4955, 13, 4706, 1583, 3032, 8143, 703, 16211, 583, 22584, 29879, 29908, 1273, 4955, 29918, 333, 29897, 13, 13, 4706, 396, 5399, 508, 1776, 372, 448, 541, 372, 338, 11132, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 311, 22742, 3108, 13, 13, 4706, 396, 1798, 1598, 372, 338, 13700, 515, 4955, 2380, 13, 4706, 2380, 29918, 5327, 353, 1583, 3032, 657, 703, 16211, 583, 2564, 3126, 580, 13, 4706, 4974, 7431, 29898, 2248, 29918, 5327, 29897, 1275, 29871, 29900, 470, 2380, 29918, 5327, 29961, 29900, 29962, 3366, 333, 3108, 2804, 4955, 29918, 333, 13, 13, 4706, 396, 3462, 11132, 4175, 304, 2380, 304, 1776, 372, 13, 4706, 2380, 29918, 5327, 353, 1583, 3032, 657, 703, 16211, 583, 613, 8853, 311, 22742, 1115, 376, 3009, 29908, 7690, 3126, 580, 13, 4706, 4974, 2380, 29918, 5327, 29961, 29900, 29962, 3366, 333, 3108, 1275, 4955, 29918, 333, 13, 13, 1678, 822, 1243, 29918, 15503, 479, 29898, 1311, 1125, 13, 4706, 4955, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 2831, 29925, 332, 479, 1159, 3366, 333, 3108, 13, 4706, 848, 353, 11117, 15503, 479, 2396, 5852, 29913, 13, 4706, 1583, 3032, 8143, 703, 16211, 583, 22584, 29879, 29908, 1273, 4955, 29918, 333, 29892, 848, 29922, 1272, 29897, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 311, 22742, 3108, 13, 4706, 4974, 1510, 29918, 5327, 3366, 29886, 2007, 287, 3108, 13, 13, 1678, 822, 1243, 29918, 9140, 2810, 29898, 1311, 1125, 13, 4706, 4955, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 2831, 12498, 2855, 29965, 17720, 2810, 1159, 3366, 333, 3108, 13, 4706, 1583, 3032, 8143, 703, 16211, 583, 22584, 29879, 29908, 1273, 4955, 29918, 333, 29897, 13, 4706, 1583, 3032, 2490, 703, 16211, 583, 29914, 311, 22742, 22584, 29879, 29914, 9140, 2810, 29908, 1273, 4955, 29918, 333, 29897, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 451, 1510, 29918, 5327, 3366, 311, 22742, 3108, 13, 13, 1678, 822, 1243, 29918, 5504, 29898, 1311, 1125, 13, 4706, 4955, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 2831, 3373, 26747, 1159, 3366, 333, 3108, 13, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 978, 1115, 376, 4373, 4408, 29908, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 978, 3108, 1275, 376, 4373, 4408, 29908, 13, 13, 4706, 29104, 29918, 978, 353, 318, 29915, 233, 164, 159, 31335, 30901, 30579, 29915, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 978, 1115, 29104, 29918, 978, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 978, 3108, 1275, 29104, 29918, 978, 29892, 1510, 29918, 5327, 13, 13, 4706, 23153, 29918, 978, 353, 13577, 29924, 3634, 29907, 340, 11838, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 978, 1115, 23153, 29918, 978, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 978, 3108, 1275, 23153, 29918, 978, 13, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 311, 22742, 1115, 5852, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 311, 22742, 12436, 1510, 29918, 5327, 13, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 311, 22742, 1115, 7700, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 451, 1510, 29918, 5327, 3366, 311, 22742, 3108, 13, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 5467, 3726, 1115, 5852, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 5467, 3726, 3108, 13, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 1885, 608, 29918, 4282, 1115, 376, 29882, 29887, 29896, 29947, 29908, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 1885, 608, 29918, 4282, 3108, 1275, 376, 29882, 29887, 29896, 29947, 29908, 13, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 18317, 1115, 376, 1576, 17195, 338, 12528, 29908, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 18317, 3108, 1275, 376, 1576, 17195, 338, 12528, 29908, 13, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 18317, 1115, 29104, 29918, 978, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 18317, 3108, 1275, 29104, 29918, 978, 29892, 1510, 29918, 5327, 13, 13, 4706, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 18317, 1115, 23153, 29918, 978, 1800, 13, 4706, 1510, 29918, 5327, 353, 1583, 3032, 4294, 29898, 18434, 29918, 333, 29897, 13, 4706, 4974, 1510, 29918, 5327, 3366, 18317, 3108, 1275, 23153, 29918, 978, 13, 13, 1678, 822, 1243, 29918, 5504, 29918, 20965, 29918, 12715, 29898, 1311, 1125, 13, 4706, 4955, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 2831, 13919, 3373, 26747, 1159, 3366, 333, 3108, 13, 4706, 1925, 29918, 5327, 353, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 20965, 1989, 1115, 376, 29885, 3634, 29908, 1800, 13, 4706, 4974, 376, 20965, 1989, 29908, 451, 297, 1925, 29918, 5327, 29889, 3126, 580, 13, 13, 1678, 822, 1243, 29918, 5504, 29918, 20965, 29918, 8768, 29898, 1311, 1125, 13, 4706, 4955, 29918, 333, 353, 1583, 3032, 3258, 29918, 18434, 703, 3057, 20570, 2831, 3373, 26747, 13919, 10562, 1159, 3366, 333, 3108, 13, 4706, 363, 851, 29918, 1989, 297, 6796, 978, 613, 376, 18317, 3108, 29901, 13, 9651, 4974, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 426, 710, 29918, 1989, 29901, 7700, 7690, 4882, 29918, 401, 1275, 29871, 29946, 29900, 29900, 13, 13, 4706, 363, 6120, 29918, 1989, 297, 6024, 311, 22742, 742, 525, 5215, 519, 742, 525, 5467, 3726, 2033, 29901, 13, 9651, 4974, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 426, 11227, 29918, 1989, 29901, 376, 29874, 1347, 29908, 7690, 4882, 29918, 401, 1275, 29871, 29946, 29900, 29900, 13, 13, 4706, 4974, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 11338, 1115, 376, 29874, 2560, 1347, 29908, 7690, 4882, 29918, 401, 1275, 29871, 29946, 29900, 29900, 13, 4706, 4974, 1583, 3032, 5504, 29898, 18434, 29918, 333, 29892, 8853, 11338, 1115, 518, 5574, 29962, 7690, 4882, 29918, 401, 1275, 29871, 29946, 29900, 29900, 13, 13, 1678, 822, 1243, 29918, 20965, 29918, 8149, 29898, 1311, 1125, 13, 4706, 8340, 29918, 18434, 29918, 333, 353, 376, 29896, 29906, 29941, 29946, 29896, 29906, 29941, 29946, 29896, 29906, 29941, 29946, 29896, 29906, 29941, 29946, 29908, 13, 13, 4706, 4974, 1583, 3032, 657, 703, 16211, 583, 22584, 29879, 29908, 1273, 8340, 29918, 18434, 29918, 333, 467, 4882, 29918, 401, 1275, 29871, 29946, 29900, 29900, 13, 4706, 4974, 1583, 3032, 5504, 29898, 20965, 29918, 18434, 29918, 333, 29892, 8853, 978, 1115, 376, 1482, 1024, 29908, 7690, 4882, 29918, 401, 1275, 29871, 29946, 29900, 29900, 13, 4706, 4974, 1583, 3032, 8143, 703, 16211, 583, 22584, 29879, 29908, 1273, 8340, 29918, 18434, 29918, 333, 467, 4882, 29918, 401, 1275, 29871, 29946, 29900, 29900, 13, 4706, 4974, 1583, 3032, 2490, 703, 16211, 583, 29914, 311, 22742, 22584, 29879, 29914, 9140, 2810, 29908, 1273, 8340, 29918, 18434, 29918, 333, 467, 4882, 29918, 401, 1275, 29871, 29946, 29900, 29900, 13, 13, 1678, 822, 1243, 29918, 3258, 29918, 25772, 29918, 29888, 2234, 29898, 1311, 1125, 13, 4706, 1400, 29918, 1272, 353, 9657, 29898, 978, 543, 29089, 4391, 1159, 13, 4706, 396, 5293, 5224, 29899, 5563, 903, 2754, 29918, 2271, 674, 4556, 1820, 304, 451, 367, 11658, 287, 29889, 13, 4706, 3603, 583, 29918, 2271, 353, 1583, 3032, 2754, 29918, 2271, 703, 16211, 583, 1159, 13, 4706, 1653, 29918, 5327, 353, 1400, 29898, 2271, 29922, 16211, 583, 29918, 2271, 29892, 848, 29922, 2490, 29918, 1272, 29897, 13, 4706, 1583, 3032, 9294, 29918, 4882, 29918, 401, 29918, 275, 29898, 3258, 29918, 5327, 29892, 29871, 29946, 29900, 29941, 29897, 13, 13, 1678, 822, 1243, 29918, 5215, 29918, 15843, 29898, 1311, 1125, 13, 4706, 4955, 29918, 978, 353, 376, 1454, 29918, 15843, 29908, 13, 4706, 4955, 29918, 333, 353, 1583, 29889, 24713, 29918, 7323, 9183, 29889, 1482, 29918, 18434, 29898, 978, 29922, 18434, 29918, 978, 29897, 13, 4706, 1583, 29889, 24713, 29918, 7323, 9183, 29889, 1482, 29918, 24713, 29898, 18434, 29918, 333, 29892, 2793, 543, 29896, 29871, 29906, 29871, 29941, 1159, 13, 4706, 19673, 29918, 18434, 29918, 333, 353, 1583, 3032, 276, 5215, 29918, 18434, 29898, 18434, 29918, 333, 29892, 4955, 29918, 978, 29897, 13, 13, 4706, 8118, 29918, 5327, 353, 1583, 3032, 657, 703, 16211, 583, 22584, 29879, 29914, 10853, 29908, 1273, 19673, 29918, 18434, 29918, 333, 29897, 13, 4706, 1583, 3032, 9294, 29918, 4882, 29918, 401, 29918, 275, 29898, 10853, 29918, 5327, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 8118, 353, 8118, 29918, 5327, 29889, 3126, 580, 13, 4706, 4974, 7431, 29898, 10853, 29897, 1275, 29871, 29896, 13, 4706, 19673, 29918, 3051, 353, 1583, 29889, 24713, 29918, 7323, 9183, 29889, 657, 29918, 18434, 29918, 24713, 29918, 3051, 29898, 13, 9651, 4955, 29918, 333, 29922, 5215, 287, 29918, 18434, 29918, 333, 29892, 13, 9651, 8783, 29918, 333, 29922, 10853, 29961, 29900, 29962, 3366, 333, 3108, 13, 4706, 1723, 13, 4706, 4974, 19673, 29918, 3051, 1275, 376, 29896, 29871, 29906, 29871, 29941, 29905, 29876, 29908, 13, 13, 1678, 822, 1243, 29918, 5215, 29918, 15843, 29918, 10855, 29898, 1311, 1125, 13, 4706, 515, 26414, 29889, 12800, 29889, 11014, 1053, 4971, 666, 3057, 13, 4706, 12020, 4971, 666, 3057, 703, 7196, 1053, 29914, 15843, 451, 3447, 8762, 1159, 13, 13, 4706, 4955, 29918, 978, 353, 376, 1454, 29918, 15843, 29918, 2541, 29918, 29027, 29908, 13, 4706, 4955, 29918, 333, 353, 1583, 29889, 24713, 29918, 7323, 9183, 29889, 1482, 29918, 18434, 29898, 978, 29922, 18434, 29918, 978, 29897, 13, 4706, 1583, 29889, 24713, 29918, 10855, 29918, 7323, 9183, 29889, 3258, 29918, 1761, 29918, 262, 29918, 18434, 29898, 18434, 29918, 333, 29892, 8118, 29922, 3366, 10994, 613, 376, 14058, 20068, 13, 13, 4706, 19673, 29918, 18434, 29918, 333, 353, 1583, 3032, 276, 5215, 29918, 18434, 29898, 18434, 29918, 333, 29892, 4955, 29918, 978, 29897, 13, 13, 4706, 8118, 29918, 5327, 353, 1583, 3032, 657, 703, 16211, 583, 22584, 29879, 29914, 10853, 29908, 1273, 19673, 29918, 18434, 29918, 333, 29897, 13, 4706, 1583, 3032, 9294, 29918, 4882, 29918, 401, 29918, 275, 29898, 10853, 29918, 5327, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 8118, 353, 8118, 29918, 5327, 29889, 3126, 580, 13, 4706, 4974, 7431, 29898, 10853, 29897, 1275, 29871, 29941, 13, 13, 1678, 822, 903, 276, 5215, 29918, 18434, 29898, 1311, 29892, 4955, 29918, 333, 29892, 4955, 29918, 978, 1125, 13, 4706, 396, 22521, 545, 278, 4955, 338, 7960, 304, 748, 856, 13, 4706, 1583, 29889, 24713, 29918, 7323, 9183, 29889, 10685, 29918, 1454, 29918, 18434, 29898, 18434, 29918, 333, 29892, 4974, 29918, 554, 29922, 5574, 29897, 13, 13, 4706, 396, 1222, 637, 278, 4955, 29889, 13, 4706, 5142, 29918, 2084, 353, 1583, 3032, 15843, 29898, 18434, 29918, 333, 29897, 13, 13, 4706, 396, 6204, 5142, 363, 4955, 13, 4706, 2989, 29918, 10382, 29918, 2271, 353, 11860, 29879, 29995, 29879, 29973, 1989, 16328, 29879, 29908, 1273, 313, 1311, 29889, 2271, 29892, 5142, 29918, 2084, 29892, 1583, 29889, 23014, 26825, 29918, 1639, 7168, 29889, 2754, 29918, 1989, 29897, 13, 4706, 5142, 29918, 5327, 353, 679, 29898, 8159, 29918, 10382, 29918, 2271, 29897, 13, 4706, 1583, 3032, 9294, 29918, 4882, 29918, 401, 29918, 275, 29898, 10382, 29918, 5327, 29892, 29871, 29906, 29900, 29900, 29897, 13, 13, 4706, 822, 4955, 29918, 7039, 7295, 13, 9651, 4955, 29918, 2248, 353, 1583, 3032, 657, 703, 16211, 583, 1159, 13, 9651, 736, 9657, 3552, 29882, 3366, 978, 12436, 298, 29897, 363, 298, 297, 4955, 29918, 2248, 29889, 3126, 3101, 13, 13, 4706, 1053, 29918, 978, 353, 376, 5215, 287, 515, 18871, 29901, 1273, 29879, 29908, 1273, 4955, 29918, 978, 13, 4706, 4974, 1053, 29918, 978, 451, 297, 4955, 29918, 7039, 580, 13, 13, 4706, 1053, 29918, 1272, 353, 9657, 29898, 10867, 29918, 4993, 29922, 8159, 29918, 10382, 29918, 2271, 29892, 18871, 29918, 1853, 543, 2271, 1159, 13, 4706, 1053, 29918, 5327, 353, 1583, 3032, 2490, 703, 16211, 583, 613, 848, 29922, 5215, 29918, 1272, 29897, 13, 13, 4706, 1583, 3032, 9294, 29918, 4882, 29918, 401, 29918, 275, 29898, 5215, 29918, 5327, 29892, 29871, 29906, 29900, 29900, 29897, 13, 13, 4706, 822, 756, 29918, 18434, 29918, 2541, 29918, 978, 7295, 13, 9651, 3603, 583, 353, 4955, 29918, 7039, 580, 13, 9651, 736, 3603, 583, 29889, 657, 29898, 5215, 29918, 978, 29892, 6213, 29897, 13, 13, 4706, 19673, 29918, 18434, 353, 4480, 29918, 265, 29898, 5349, 29918, 18434, 29918, 2541, 29918, 978, 29892, 5153, 543, 5215, 4955, 1159, 13, 4706, 19673, 29918, 18434, 29918, 333, 353, 19673, 29918, 18434, 3366, 333, 3108, 13, 4706, 1583, 29889, 24713, 29918, 7323, 9183, 29889, 10685, 29918, 1454, 29918, 18434, 29898, 5215, 287, 29918, 18434, 29918, 333, 29897, 13, 13, 4706, 736, 19673, 29918, 18434, 29918, 333, 13, 13, 1678, 822, 1243, 29918, 3258, 29918, 4039, 29898, 1311, 1125, 13, 4706, 1400, 29918, 1272, 353, 9657, 29898, 978, 543, 3057, 20570, 2831, 8176, 1159, 13, 4706, 4955, 29918, 333, 353, 1583, 3032, 2490, 703, 16211, 583, 613, 848, 29922, 2490, 29918, 1272, 467, 3126, 580, 3366, 333, 3108, 13, 4706, 4055, 29918, 1272, 353, 9657, 29898, 1767, 543, 1450, 267, 3297, 351, 1767, 1159, 13, 4706, 4055, 29918, 2271, 353, 376, 16211, 583, 22584, 29879, 29914, 11338, 29914, 1450, 267, 3297, 351, 978, 29908, 1273, 4955, 29918, 333, 13, 4706, 4055, 29918, 3258, 29918, 5327, 353, 1583, 3032, 2490, 29898, 4039, 29918, 2271, 29892, 848, 29922, 4039, 29918, 1272, 29897, 13, 4706, 1583, 3032, 9294, 29918, 4882, 29918, 401, 29918, 275, 29898, 4039, 29918, 3258, 29918, 5327, 29892, 29871, 29906, 29900, 29900, 29897, 13, 13, 1678, 822, 903, 15843, 29898, 1311, 29892, 4955, 29918, 333, 1125, 13, 4706, 5609, 29918, 2271, 353, 1583, 3032, 2754, 29918, 2271, 703, 16211, 583, 22584, 29879, 29914, 26500, 29908, 1273, 4955, 29918, 333, 29892, 671, 29918, 1989, 29922, 5574, 29897, 13, 4706, 1925, 29918, 5327, 353, 1925, 29898, 15843, 29918, 2271, 29897, 13, 4706, 1583, 3032, 9294, 29918, 4882, 29918, 401, 29918, 275, 29898, 649, 29918, 5327, 29892, 29871, 29906, 29900, 29906, 29897, 13, 13, 4706, 822, 5609, 29918, 2040, 29918, 5327, 7295, 13, 9651, 1925, 29918, 5327, 353, 1925, 29898, 15843, 29918, 2271, 29897, 13, 9651, 565, 1925, 29918, 5327, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29906, 29901, 13, 18884, 736, 6213, 13, 9651, 736, 1925, 29918, 5327, 13, 13, 4706, 1925, 29918, 5327, 353, 4480, 29918, 265, 29898, 15843, 29918, 2040, 29918, 5327, 29892, 5153, 543, 15843, 7960, 1159, 13, 4706, 1583, 3032, 9294, 29918, 4882, 29918, 401, 29918, 275, 29898, 649, 29918, 5327, 29892, 29871, 29906, 29900, 29900, 29897, 13, 4706, 2933, 353, 1925, 29918, 5327, 29889, 3126, 580, 13, 4706, 1583, 3032, 9294, 29918, 5349, 29918, 8149, 29898, 5327, 29892, 376, 10382, 29918, 2271, 1159, 13, 4706, 5142, 29918, 2084, 353, 2933, 3366, 10382, 29918, 2271, 3108, 13, 4706, 736, 5142, 29918, 2084, 13, 13, 1678, 822, 903, 4294, 29898, 1311, 29892, 4955, 29918, 333, 1125, 13, 4706, 736, 1583, 3032, 657, 703, 16211, 583, 22584, 29879, 29908, 1273, 4955, 29918, 333, 467, 3126, 580, 13, 13, 1678, 822, 903, 5504, 29898, 1311, 29892, 4955, 29918, 333, 29892, 848, 1125, 13, 4706, 2767, 29918, 2271, 353, 1583, 3032, 2754, 29918, 2271, 703, 16211, 583, 22584, 29879, 29908, 1273, 4955, 29918, 333, 29892, 671, 29918, 1989, 29922, 5574, 29897, 13, 4706, 1925, 29918, 5327, 353, 1925, 29898, 5504, 29918, 2271, 29892, 4390, 29922, 1272, 29897, 13, 4706, 736, 1925, 29918, 5327, 13, 13, 1678, 822, 903, 3258, 29918, 18434, 29898, 1311, 29892, 1024, 1125, 13, 4706, 1400, 29918, 1272, 353, 9657, 29898, 978, 29922, 978, 29897, 13, 4706, 1653, 29918, 5327, 353, 1583, 3032, 2490, 703, 16211, 583, 613, 848, 29922, 2490, 29918, 1272, 467, 3126, 580, 13, 4706, 1583, 3032, 9294, 29918, 5349, 29918, 8149, 29898, 3258, 29918, 5327, 29892, 376, 978, 613, 376, 333, 1159, 13, 4706, 1583, 29889, 9294, 14776, 29898, 3258, 29918, 5327, 3366, 978, 12436, 1024, 29897, 13, 4706, 736, 1653, 29918, 5327, 13, 13, 1678, 396, 14402, 29901, 313, 4741, 29897, 1243, 29918, 3258, 29918, 3166, 29918, 8552, 13, 2 ]
tests/integration/mci/test_happy_path.py
qateam123/eq
0
2393
from tests.integration.create_token import create_token from tests.integration.integration_test_case import IntegrationTestCase class TestHappyPath(IntegrationTestCase): def test_happy_path_203(self): self.happy_path('0203', '1') def test_happy_path_205(self): self.happy_path('0205', '1') def happy_path(self, form_type_id, eq_id): # Get a token token = create_token(form_type_id, eq_id) resp = self.client.get('/session?token=' + token.decode(), follow_redirects=True) self.assertEqual(resp.status_code, 200) # We are on the landing page content = resp.get_data(True) self.assertRegex(content, '<title>Introduction</title>') self.assertRegex(content, '>Start survey<') self.assertRegex(content, 'Monthly Business Survey - Retail Sales Index') # We proceed to the questionnaire post_data = { 'action[start_questionnaire]': 'Start Questionnaire' } resp = self.client.post('/questionnaire/' + eq_id + '/' + form_type_id + '/789/introduction', data=post_data, follow_redirects=False) self.assertEqual(resp.status_code, 302) block_one_url = resp.location resp = self.client.get(block_one_url, follow_redirects=False) self.assertEqual(resp.status_code, 200) # We are in the Questionnaire content = resp.get_data(True) self.assertRegex(content, '<title>Survey</title>') self.assertRegex(content, '>Monthly Business Survey - Retail Sales Index</') self.assertRegex(content, "What are the dates of the sales period you are reporting for?") self.assertRegex(content, ">Save and continue<") # check with have some guidance self.assertRegex(content, "alcoholic drink") # We fill in our answers form_data = { # Start Date "period-from-day": "01", "period-from-month": "4", "period-from-year": "2016", # End Date "period-to-day": "30", "period-to-month": "04", "period-to-year": "2016", # Total Turnover "total-retail-turnover": "100000", # User Action "action[save_continue]": "Save &amp; Continue" } # We submit the form resp = self.client.post(block_one_url, data=form_data, follow_redirects=False) self.assertEqual(resp.status_code, 302) # There are no validation errors self.assertRegex(resp.location, r'\/questionnaire\/1\/' + form_type_id + r'\/789\/summary$') summary_url = resp.location resp = self.client.get(summary_url, follow_redirects=False) self.assertEqual(resp.status_code, 200) # We are on the review answers page content = resp.get_data(True) self.assertRegex(content, '<title>Summary</title>') self.assertRegex(content, '>Monthly Business Survey - Retail Sales Index</') self.assertRegex(content, '>Your responses<') self.assertRegex(content, 'Please check carefully before submission.') self.assertRegex(content, '>Submit answers<') # We submit our answers post_data = { "action[submit_answers]": "Submit answers" } resp = self.client.post(summary_url, data=post_data, follow_redirects=False) self.assertEqual(resp.status_code, 302) self.assertRegex(resp.location, r'\/questionnaire\/1\/' + form_type_id + r'\/789\/thank-you$') resp = self.client.get(resp.location, follow_redirects=True) self.assertEqual(resp.status_code, 200) # We are on the thank you page content = resp.get_data(True) self.assertRegex(content, '<title>Submission Successful</title>') self.assertRegex(content, '(?s)Monthly Business Survey - Retail Sales Index.*?Monthly Business Survey - Retail Sales Index')
[ 1, 515, 6987, 29889, 27925, 29889, 3258, 29918, 6979, 1053, 1653, 29918, 6979, 13, 3166, 6987, 29889, 27925, 29889, 27925, 29918, 1688, 29918, 4878, 1053, 17100, 362, 3057, 8259, 13, 13, 13, 1990, 4321, 29950, 14862, 2605, 29898, 23573, 362, 3057, 8259, 1125, 13, 13, 1678, 822, 1243, 29918, 29882, 14862, 29918, 2084, 29918, 29906, 29900, 29941, 29898, 1311, 1125, 13, 4706, 1583, 29889, 29882, 14862, 29918, 2084, 877, 29900, 29906, 29900, 29941, 742, 525, 29896, 1495, 13, 13, 1678, 822, 1243, 29918, 29882, 14862, 29918, 2084, 29918, 29906, 29900, 29945, 29898, 1311, 1125, 13, 4706, 1583, 29889, 29882, 14862, 29918, 2084, 877, 29900, 29906, 29900, 29945, 742, 525, 29896, 1495, 13, 13, 1678, 822, 9796, 29918, 2084, 29898, 1311, 29892, 883, 29918, 1853, 29918, 333, 29892, 11594, 29918, 333, 1125, 13, 4706, 396, 3617, 263, 5993, 13, 4706, 5993, 353, 1653, 29918, 6979, 29898, 689, 29918, 1853, 29918, 333, 29892, 11594, 29918, 333, 29897, 13, 4706, 4613, 353, 1583, 29889, 4645, 29889, 657, 11219, 7924, 29973, 6979, 2433, 718, 5993, 29889, 13808, 3285, 1101, 29918, 17886, 29879, 29922, 5574, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13713, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 13, 4706, 396, 1334, 526, 373, 278, 25325, 1813, 13, 4706, 2793, 353, 4613, 29889, 657, 29918, 1272, 29898, 5574, 29897, 13, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 12801, 3257, 29958, 25898, 829, 3257, 29958, 1495, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 525, 29958, 4763, 18994, 29966, 1495, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 525, 13953, 368, 15197, 23218, 448, 4649, 737, 28389, 11374, 1495, 13, 13, 4706, 396, 1334, 8469, 304, 278, 1139, 15421, 13, 4706, 1400, 29918, 1272, 353, 426, 13, 9651, 525, 2467, 29961, 2962, 29918, 12470, 15421, 29962, 2396, 525, 4763, 894, 15421, 29915, 13, 4706, 500, 13, 4706, 4613, 353, 1583, 29889, 4645, 29889, 2490, 11219, 12470, 15421, 22208, 718, 11594, 29918, 333, 718, 8207, 29915, 718, 883, 29918, 1853, 29918, 333, 718, 8207, 29955, 29947, 29929, 29914, 524, 13210, 742, 848, 29922, 2490, 29918, 1272, 29892, 1101, 29918, 17886, 29879, 29922, 8824, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13713, 29889, 4882, 29918, 401, 29892, 29871, 29941, 29900, 29906, 29897, 13, 13, 4706, 2908, 29918, 650, 29918, 2271, 353, 4613, 29889, 5479, 13, 13, 4706, 4613, 353, 1583, 29889, 4645, 29889, 657, 29898, 1271, 29918, 650, 29918, 2271, 29892, 1101, 29918, 17886, 29879, 29922, 8824, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13713, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 13, 4706, 396, 1334, 526, 297, 278, 894, 15421, 13, 4706, 2793, 353, 4613, 29889, 657, 29918, 1272, 29898, 5574, 29897, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 12801, 3257, 29958, 18498, 6950, 829, 3257, 29958, 1495, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 525, 29958, 13953, 368, 15197, 23218, 448, 4649, 737, 28389, 11374, 829, 1495, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 376, 5618, 526, 278, 10116, 310, 278, 16538, 3785, 366, 526, 23415, 363, 29973, 1159, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 376, 29958, 11371, 322, 6773, 29966, 1159, 13, 4706, 396, 1423, 411, 505, 777, 27323, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 376, 284, 1111, 5391, 293, 13748, 1159, 13, 13, 4706, 396, 1334, 5445, 297, 1749, 6089, 13, 4706, 883, 29918, 1272, 353, 426, 13, 9651, 396, 7370, 4712, 13, 9651, 376, 19145, 29899, 3166, 29899, 3250, 1115, 376, 29900, 29896, 613, 13, 9651, 376, 19145, 29899, 3166, 29899, 10874, 1115, 376, 29946, 613, 13, 9651, 376, 19145, 29899, 3166, 29899, 6360, 1115, 376, 29906, 29900, 29896, 29953, 613, 13, 9651, 396, 2796, 4712, 13, 9651, 376, 19145, 29899, 517, 29899, 3250, 1115, 376, 29941, 29900, 613, 13, 9651, 376, 19145, 29899, 517, 29899, 10874, 1115, 376, 29900, 29946, 613, 13, 9651, 376, 19145, 29899, 517, 29899, 6360, 1115, 376, 29906, 29900, 29896, 29953, 613, 13, 9651, 396, 14990, 9603, 957, 13, 9651, 376, 7827, 29899, 2267, 737, 29899, 685, 957, 1115, 376, 29896, 29900, 29900, 29900, 29900, 29900, 613, 13, 9651, 396, 4911, 9123, 13, 9651, 376, 2467, 29961, 7620, 29918, 19878, 29962, 1115, 376, 11371, 669, 1160, 29936, 2866, 14150, 29908, 13, 4706, 500, 13, 13, 4706, 396, 1334, 9752, 278, 883, 13, 13, 4706, 4613, 353, 1583, 29889, 4645, 29889, 2490, 29898, 1271, 29918, 650, 29918, 2271, 29892, 848, 29922, 689, 29918, 1272, 29892, 1101, 29918, 17886, 29879, 29922, 8824, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13713, 29889, 4882, 29918, 401, 29892, 29871, 29941, 29900, 29906, 29897, 13, 13, 4706, 396, 1670, 526, 694, 8845, 4436, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 13713, 29889, 5479, 29892, 364, 12764, 29914, 12470, 15421, 25558, 29896, 29905, 22208, 718, 883, 29918, 1853, 29918, 333, 718, 364, 12764, 29914, 29955, 29947, 29929, 25558, 7727, 29938, 1495, 13, 13, 4706, 15837, 29918, 2271, 353, 4613, 29889, 5479, 13, 13, 4706, 4613, 353, 1583, 29889, 4645, 29889, 657, 29898, 7727, 29918, 2271, 29892, 1101, 29918, 17886, 29879, 29922, 8824, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13713, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 13, 4706, 396, 1334, 526, 373, 278, 9076, 6089, 1813, 13, 4706, 2793, 353, 4613, 29889, 657, 29918, 1272, 29898, 5574, 29897, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 12801, 3257, 29958, 26289, 829, 3257, 29958, 1495, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 525, 29958, 13953, 368, 15197, 23218, 448, 4649, 737, 28389, 11374, 829, 1495, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 525, 29958, 10858, 20890, 29966, 1495, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 525, 12148, 1423, 16112, 1434, 29240, 29889, 1495, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 525, 29958, 16228, 6089, 29966, 1495, 13, 13, 4706, 396, 1334, 9752, 1749, 6089, 13, 4706, 1400, 29918, 1272, 353, 426, 13, 9651, 376, 2467, 29961, 7892, 29918, 550, 17538, 29962, 1115, 376, 16228, 6089, 29908, 13, 4706, 500, 13, 4706, 4613, 353, 1583, 29889, 4645, 29889, 2490, 29898, 7727, 29918, 2271, 29892, 848, 29922, 2490, 29918, 1272, 29892, 1101, 29918, 17886, 29879, 29922, 8824, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13713, 29889, 4882, 29918, 401, 29892, 29871, 29941, 29900, 29906, 29897, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 13713, 29889, 5479, 29892, 364, 12764, 29914, 12470, 15421, 25558, 29896, 29905, 22208, 718, 883, 29918, 1853, 29918, 333, 718, 364, 12764, 29914, 29955, 29947, 29929, 25558, 386, 804, 29899, 6293, 29938, 1495, 13, 4706, 4613, 353, 1583, 29889, 4645, 29889, 657, 29898, 13713, 29889, 5479, 29892, 1101, 29918, 17886, 29879, 29922, 5574, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 13713, 29889, 4882, 29918, 401, 29892, 29871, 29906, 29900, 29900, 29897, 13, 13, 4706, 396, 1334, 526, 373, 278, 6452, 366, 1813, 13, 4706, 2793, 353, 4613, 29889, 657, 29918, 1272, 29898, 5574, 29897, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 12801, 3257, 29958, 4035, 6737, 21397, 1319, 829, 3257, 29958, 1495, 13, 4706, 1583, 29889, 9294, 4597, 735, 29898, 3051, 29892, 525, 10780, 29879, 29897, 13953, 368, 15197, 23218, 448, 4649, 737, 28389, 11374, 5575, 29973, 13953, 368, 15197, 23218, 448, 4649, 737, 28389, 11374, 1495, 13, 2 ]
genkey/migrations/0007_auto_20190328_1149.py
MoreNiceJay/CAmanager_web
0
41217
<filename>genkey/migrations/0007_auto_20190328_1149.py # Generated by Django 2.0.4 on 2019-03-28 02:49 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('genkey', '0006_auto_20190327_1004'), ] operations = [ migrations.RenameModel( old_name='CA', new_name='Company', ), ]
[ 1, 529, 9507, 29958, 1885, 1989, 29914, 26983, 800, 29914, 29900, 29900, 29900, 29955, 29918, 6921, 29918, 29906, 29900, 29896, 29929, 29900, 29941, 29906, 29947, 29918, 29896, 29896, 29946, 29929, 29889, 2272, 13, 29937, 3251, 630, 491, 15337, 29871, 29906, 29889, 29900, 29889, 29946, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29900, 29941, 29899, 29906, 29947, 29871, 29900, 29906, 29901, 29946, 29929, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, 800, 13, 13, 13, 1990, 341, 16783, 29898, 26983, 800, 29889, 29924, 16783, 1125, 13, 13, 1678, 9962, 353, 518, 13, 4706, 6702, 1885, 1989, 742, 525, 29900, 29900, 29900, 29953, 29918, 6921, 29918, 29906, 29900, 29896, 29929, 29900, 29941, 29906, 29955, 29918, 29896, 29900, 29900, 29946, 5477, 13, 1678, 4514, 13, 13, 1678, 6931, 353, 518, 13, 4706, 9725, 800, 29889, 29934, 3871, 3195, 29898, 13, 9651, 2030, 29918, 978, 2433, 5454, 742, 13, 9651, 716, 29918, 978, 2433, 21410, 742, 13, 4706, 10353, 13, 1678, 4514, 13, 2 ]
jmetex/main.py
innovocloud/jmetex
2
21811
<reponame>innovocloud/jmetex import sys import time import argparse from prometheus_client import start_http_server, Metric, REGISTRY, Summary from .interfacecollector import InterfaceCollector from .opticalcollector import OpticalCollector def main(): parser = argparse.ArgumentParser(description='JunOS API to Prometheus exporter') parser.add_argument('--port', type=int, required=True, help='listen port') parser.add_argument('--instance', type=str, required=True, help='instance name') parser.add_argument('--rpc_url', type=str, required=True, help='URL of the junos RPC endpoint') parser.add_argument('--user', type=str, required=True, help='junos user name') parser.add_argument('--password', type=str, required=True, help='junos password') args = parser.parse_args() start_http_server(args.port) REGISTRY.register(InterfaceCollector(args.instance, args.rpc_url, args.user, args.password)) REGISTRY.register(OpticalCollector(args.instance, args.rpc_url, args.user, args.password)) while True: time.sleep(1)
[ 1, 529, 276, 1112, 420, 29958, 2559, 586, 542, 29880, 2736, 29914, 29926, 2527, 735, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 1852, 5510, 13, 3166, 2504, 23043, 375, 29918, 4645, 1053, 1369, 29918, 1124, 29918, 2974, 29892, 4737, 2200, 29892, 5195, 29954, 9047, 13207, 29892, 6991, 5219, 13, 3166, 869, 13248, 15914, 272, 1053, 25796, 28916, 272, 13, 3166, 869, 3670, 936, 15914, 272, 1053, 20693, 936, 28916, 272, 13, 13, 1753, 1667, 7295, 13, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 29898, 8216, 2433, 29967, 348, 3267, 3450, 304, 9705, 23043, 375, 1518, 9555, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 637, 742, 1134, 29922, 524, 29892, 3734, 29922, 5574, 29892, 13, 462, 4706, 1371, 2433, 20631, 2011, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 8758, 742, 1134, 29922, 710, 29892, 3734, 29922, 5574, 29892, 13, 462, 4706, 1371, 2433, 8758, 1024, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 29878, 6739, 29918, 2271, 742, 1134, 29922, 710, 29892, 3734, 29922, 5574, 29892, 13, 462, 4706, 1371, 2433, 4219, 310, 278, 4707, 359, 390, 9026, 16248, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 1792, 742, 1134, 29922, 710, 29892, 3734, 29922, 5574, 29892, 13, 462, 4706, 1371, 2433, 29926, 12609, 1404, 1024, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 5630, 742, 1134, 29922, 710, 29892, 3734, 29922, 5574, 29892, 13, 462, 4706, 1371, 2433, 29926, 12609, 4800, 1495, 13, 1678, 6389, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 1678, 1369, 29918, 1124, 29918, 2974, 29898, 5085, 29889, 637, 29897, 13, 13, 1678, 5195, 29954, 9047, 13207, 29889, 9573, 29898, 10448, 28916, 272, 29898, 5085, 29889, 8758, 29892, 6389, 29889, 29878, 6739, 29918, 2271, 29892, 6389, 29889, 1792, 29892, 6389, 29889, 5630, 876, 13, 1678, 5195, 29954, 9047, 13207, 29889, 9573, 29898, 20624, 936, 28916, 272, 29898, 5085, 29889, 8758, 29892, 6389, 29889, 29878, 6739, 29918, 2271, 29892, 6389, 29889, 1792, 29892, 6389, 29889, 5630, 876, 13, 13, 1678, 1550, 5852, 29901, 13, 4706, 931, 29889, 17059, 29898, 29896, 29897, 13, 2 ]
test_thermal/test_CompanyAdmin/test_RoleManagement/RoleManageBase.py
pyamour/Selenium_Python
0
115878
from seleniumbase import BaseCase from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from parameterized import parameterized import pytest from utilities import utilities from utilities import gmail from utilities.Authority import Authority from utilities.Role import Role from config.constants import * from test_thermal.ThermalBase import ThermalBase from test_thermal.test_CompanyAdmin.test_RoleManagement.RoleManageBaseComponent import RoleManageBaseComponent import math import datetime import time import json class RoleManageBase(RoleManageBaseComponent): def check_authority_info(self, company, role, email_list, expectation="pass"): self.start_test(locals()) self.login_company_admin() self.choose_company(companyname=company) self.role_manage_enter() self.verify_role_authority(rolename=role, email_list=email_list) self.logout(COMPANYADMIN_ACCOUNT) self.end_test(self._testMethodName) def role_create(self, companyname, rolename, service_list, user_list, expectation): self.start_test(locals()) companyname, rolename, service_list, user_list, expectation = self.process_create_input(companyname=companyname, rolename=rolename, service_list=service_list, user_list=user_list, expectation=expectation) self.login_company_admin() self.choose_company(companyname=companyname) self.role_manage_enter() self.role_create_start() self.role_create_update_set_rolename(rolename, expectation) self.role_create_update_set_service_list(service_list, expectation) self.role_create_update_set_user_list(user_list, expectation) self.role_create_update_submit(expectation) if expectation == "pass": time.sleep(10) # Too slowly to refresh record in page self.verify_role_info(rolename, service_list, user_list) self.add_role_record(company=companyname, custome_role=[rolename], service={rolename: service_list}) self.add_authority_record(email_list=user_list, company=[companyname], role={companyname: [rolename]}) self.logout(COMPANYADMIN_ACCOUNT) self.end_test(self._testMethodName) def role_update(self, companyname, rolename, valuedict, expectation="pass"): self.start_test(locals()) companyname, rolename, key, value, expectation = self.process_update_input(companyname=companyname, rolename=rolename, valuedict=valuedict, expectation=expectation) self.login_company_admin() self.choose_company(companyname=companyname) self.role_manage_enter() found_role = self.role_search(rolename=rolename) if found_role == {}: self.assertTrue(False, "Cannot find role: " + rolename) found_correct = found_role["rolename"] == rolename print("Found info: \n" + str(found_role)) self.assert_true(found_correct, "Found info doesn't match \n" + "Try to find: " + rolename + "\n But find " + str( found_role)) edit_selector = str(found_role["edit_selector"]) self.role_update_start(edit_selector) role_entity = Role() role = rolename service_list = None user_list = None if "rolename" in key: role = str(value["rolename"]) self.role_create_update_set_rolename(role) if "service" in key: service_list = str(value["service"]) service_list = utilities.str_to_list(service_list) fail_msg = None self.role_create_update_set_service_list(service_list=service_list, fail_msg=fail_msg, expectation=expectation) if "user" in key: user_list = str(value["user"]) user_list = utilities.str_to_list(user_list) fail_msg = None self.role_create_update_set_user_list(user_list=user_list, fail_msg=fail_msg, expectation=expectation) self.role_create_update_submit(expectation) if expectation == "pass": time.sleep(10) # Too slowly to refresh record in page self.verify_role_info(role, service_list, user_list) self.logout(COMPANYADMIN_ACCOUNT) self.end_test(self._testMethodName) def role_read(self, companyname, rolename, expectation): self.start_test(locals()) self.login_company_admin() self.choose_company(companyname=companyname) self.role_manage_enter() found_role = self.role_search(rolename) if rolename == "": self.assert_true(found_role == {}, "Should not locate individual role") if rolename != "" and expectation == 'fail': self.assert_true(found_role == {}, "Should not found role: " + rolename) if rolename != "" and expectation == "pass": print("Try to find role: " + rolename) print("Find: " + str(found_role)) self.assert_true(found_role != {} and found_role["rolename"] == rolename, "Try to find: " + rolename + "\n But find " + str(found_role)) print("Try to find: " + rolename + "\n and find " + str(found_role)) self.logout(COMPANYADMIN_ACCOUNT) self.end_test(self._testMethodName) def role_delete(self, companyname, rolename, expectation): self.start_test(locals()) self.login_company_admin() self.choose_company(companyname=companyname) self.role_manage_enter() found_role = self.role_search(rolename) if expectation != "pass": self.assert_true(found_role == {}, "Should not find role: " + rolename) else: self.assertTrue(found_role != {}, "Can not find role: " + rolename) all_deleted = False authority = Authority() while not all_deleted: delete_selector = found_role["delete_selector"] self.role_delete_action(delete_selector) self.remove_authority_record( email_list=authority.get_email_list(bycolumn="role", value=rolename, company=companyname), role={companyname: [rolename]}) # self.remove_role_record(company=companyname, custome_role=[rolename]) time.sleep(6) # wait for refresh found_role = self.role_search(rolename) if found_role == {}: all_deleted = True self.logout(COMPANYADMIN_ACCOUNT) self.end_test(self._testMethodName)
[ 1, 515, 18866, 3188, 1053, 7399, 8259, 13, 3166, 18866, 29889, 29813, 29889, 9435, 29889, 1609, 1053, 2648, 13, 3166, 18866, 29889, 29813, 29889, 9435, 29889, 8149, 1053, 4813, 952, 13, 3166, 3443, 1891, 1053, 3443, 1891, 13, 5215, 11451, 1688, 13, 3166, 3667, 1907, 1053, 3667, 1907, 13, 3166, 3667, 1907, 1053, 330, 2549, 13, 3166, 3667, 1907, 29889, 13720, 537, 1053, 13361, 537, 13, 3166, 3667, 1907, 29889, 16727, 1053, 1528, 280, 13, 3166, 2295, 29889, 3075, 1934, 1053, 334, 13, 3166, 1243, 29918, 721, 5156, 29889, 1349, 837, 284, 5160, 1053, 498, 837, 284, 5160, 13, 3166, 1243, 29918, 721, 5156, 29889, 1688, 29918, 21410, 12754, 29889, 1688, 29918, 16727, 27107, 29889, 16727, 2517, 482, 5160, 5308, 1053, 1528, 280, 2517, 482, 5160, 5308, 13, 5215, 5844, 13, 5215, 12865, 13, 5215, 931, 13, 5215, 4390, 13, 13, 13, 1990, 1528, 280, 2517, 482, 5160, 29898, 16727, 2517, 482, 5160, 5308, 1125, 13, 13, 1678, 822, 1423, 29918, 8921, 537, 29918, 3888, 29898, 1311, 29892, 5001, 29892, 6297, 29892, 4876, 29918, 1761, 29892, 23227, 543, 3364, 29908, 1125, 13, 4706, 1583, 29889, 2962, 29918, 1688, 29898, 2997, 29879, 3101, 13, 13, 4706, 1583, 29889, 7507, 29918, 14518, 29918, 6406, 580, 13, 13, 4706, 1583, 29889, 21803, 29918, 14518, 29898, 2388, 273, 948, 420, 29922, 14518, 29897, 13, 13, 4706, 1583, 29889, 12154, 29918, 1171, 482, 29918, 5893, 580, 13, 13, 4706, 1583, 29889, 27902, 29918, 12154, 29918, 8921, 537, 29898, 1467, 3871, 29922, 12154, 29892, 4876, 29918, 1761, 29922, 5269, 29918, 1761, 29897, 13, 13, 4706, 1583, 29889, 1188, 449, 29898, 21514, 2190, 29979, 3035, 16173, 29918, 2477, 18736, 29897, 13, 13, 4706, 1583, 29889, 355, 29918, 1688, 29898, 1311, 3032, 1688, 4062, 1170, 29897, 13, 13, 1678, 822, 6297, 29918, 3258, 29898, 1311, 29892, 8119, 948, 420, 29892, 696, 2435, 420, 29892, 2669, 29918, 1761, 29892, 1404, 29918, 1761, 29892, 23227, 1125, 13, 13, 4706, 1583, 29889, 2962, 29918, 1688, 29898, 2997, 29879, 3101, 13, 13, 4706, 8119, 948, 420, 29892, 696, 2435, 420, 29892, 2669, 29918, 1761, 29892, 1404, 29918, 1761, 29892, 23227, 353, 1583, 29889, 5014, 29918, 3258, 29918, 2080, 29898, 2388, 273, 948, 420, 29922, 2388, 273, 948, 420, 29892, 696, 2435, 420, 29922, 1467, 3871, 29892, 2669, 29918, 1761, 29922, 5509, 29918, 1761, 29892, 1404, 29918, 1761, 29922, 1792, 29918, 1761, 29892, 23227, 29922, 17854, 362, 29897, 13, 4706, 1583, 29889, 7507, 29918, 14518, 29918, 6406, 580, 13, 13, 4706, 1583, 29889, 21803, 29918, 14518, 29898, 2388, 273, 948, 420, 29922, 2388, 273, 948, 420, 29897, 13, 13, 4706, 1583, 29889, 12154, 29918, 1171, 482, 29918, 5893, 580, 13, 13, 4706, 1583, 29889, 12154, 29918, 3258, 29918, 2962, 580, 13, 13, 4706, 1583, 29889, 12154, 29918, 3258, 29918, 5504, 29918, 842, 29918, 1467, 3871, 29898, 1467, 3871, 29892, 23227, 29897, 13, 13, 4706, 1583, 29889, 12154, 29918, 3258, 29918, 5504, 29918, 842, 29918, 5509, 29918, 1761, 29898, 5509, 29918, 1761, 29892, 23227, 29897, 13, 13, 4706, 1583, 29889, 12154, 29918, 3258, 29918, 5504, 29918, 842, 29918, 1792, 29918, 1761, 29898, 1792, 29918, 1761, 29892, 23227, 29897, 13, 13, 4706, 1583, 29889, 12154, 29918, 3258, 29918, 5504, 29918, 7892, 29898, 17854, 362, 29897, 13, 13, 4706, 565, 23227, 1275, 376, 3364, 1115, 13, 9651, 931, 29889, 17059, 29898, 29896, 29900, 29897, 29871, 396, 1763, 29877, 14205, 304, 11086, 2407, 297, 1813, 13, 9651, 1583, 29889, 27902, 29918, 12154, 29918, 3888, 29898, 1467, 3871, 29892, 2669, 29918, 1761, 29892, 1404, 29918, 1761, 29897, 13, 9651, 1583, 29889, 1202, 29918, 12154, 29918, 11651, 29898, 14518, 29922, 2388, 273, 948, 420, 29892, 25387, 608, 29918, 12154, 11759, 1467, 3871, 1402, 2669, 3790, 1467, 3871, 29901, 2669, 29918, 1761, 1800, 13, 9651, 1583, 29889, 1202, 29918, 8921, 537, 29918, 11651, 29898, 5269, 29918, 1761, 29922, 1792, 29918, 1761, 29892, 5001, 11759, 2388, 273, 948, 420, 1402, 6297, 3790, 2388, 273, 948, 420, 29901, 518, 1467, 3871, 29962, 1800, 13, 13, 4706, 1583, 29889, 1188, 449, 29898, 21514, 2190, 29979, 3035, 16173, 29918, 2477, 18736, 29897, 13, 13, 4706, 1583, 29889, 355, 29918, 1688, 29898, 1311, 3032, 1688, 4062, 1170, 29897, 13, 13, 1678, 822, 6297, 29918, 5504, 29898, 1311, 29892, 8119, 948, 420, 29892, 696, 2435, 420, 29892, 659, 6742, 919, 29892, 23227, 543, 3364, 29908, 1125, 13, 13, 4706, 1583, 29889, 2962, 29918, 1688, 29898, 2997, 29879, 3101, 13, 13, 4706, 8119, 948, 420, 29892, 696, 2435, 420, 29892, 1820, 29892, 995, 29892, 23227, 353, 1583, 29889, 5014, 29918, 5504, 29918, 2080, 29898, 2388, 273, 948, 420, 29922, 2388, 273, 948, 420, 29892, 13, 462, 462, 462, 462, 462, 18884, 696, 2435, 420, 29922, 1467, 3871, 29892, 13, 462, 462, 462, 462, 462, 18884, 659, 6742, 919, 29922, 4387, 287, 919, 29892, 13, 462, 462, 462, 462, 462, 18884, 23227, 29922, 17854, 362, 29897, 13, 4706, 1583, 29889, 7507, 29918, 14518, 29918, 6406, 580, 13, 13, 4706, 1583, 29889, 21803, 29918, 14518, 29898, 2388, 273, 948, 420, 29922, 2388, 273, 948, 420, 29897, 13, 13, 4706, 1583, 29889, 12154, 29918, 1171, 482, 29918, 5893, 580, 13, 13, 4706, 1476, 29918, 12154, 353, 1583, 29889, 12154, 29918, 4478, 29898, 1467, 3871, 29922, 1467, 3871, 29897, 13, 4706, 565, 1476, 29918, 12154, 1275, 426, 6177, 13, 9651, 1583, 29889, 9294, 5574, 29898, 8824, 29892, 376, 29089, 1284, 6297, 29901, 376, 718, 696, 2435, 420, 29897, 13, 13, 4706, 1476, 29918, 15728, 353, 1476, 29918, 12154, 3366, 1467, 3871, 3108, 1275, 696, 2435, 420, 13, 4706, 1596, 703, 9692, 5235, 29901, 320, 29876, 29908, 718, 851, 29898, 11940, 29918, 12154, 876, 13, 4706, 1583, 29889, 9294, 29918, 3009, 29898, 11940, 29918, 15728, 29892, 13, 462, 308, 376, 9692, 5235, 1838, 29915, 29873, 1993, 320, 29876, 29908, 718, 376, 15870, 304, 1284, 29901, 376, 718, 696, 2435, 420, 718, 6634, 29876, 1205, 1284, 376, 718, 851, 29898, 13, 462, 632, 1476, 29918, 12154, 876, 13, 13, 4706, 3863, 29918, 14357, 353, 851, 29898, 11940, 29918, 12154, 3366, 5628, 29918, 14357, 20068, 13, 4706, 1583, 29889, 12154, 29918, 5504, 29918, 2962, 29898, 5628, 29918, 14357, 29897, 13, 13, 4706, 6297, 29918, 10041, 353, 1528, 280, 580, 13, 4706, 6297, 353, 696, 2435, 420, 13, 4706, 2669, 29918, 1761, 353, 6213, 13, 4706, 1404, 29918, 1761, 353, 6213, 13, 4706, 565, 376, 1467, 3871, 29908, 297, 1820, 29901, 13, 9651, 6297, 353, 851, 29898, 1767, 3366, 1467, 3871, 20068, 13, 9651, 1583, 29889, 12154, 29918, 3258, 29918, 5504, 29918, 842, 29918, 1467, 3871, 29898, 12154, 29897, 13, 13, 4706, 565, 376, 5509, 29908, 297, 1820, 29901, 13, 9651, 2669, 29918, 1761, 353, 851, 29898, 1767, 3366, 5509, 20068, 13, 9651, 2669, 29918, 1761, 353, 3667, 1907, 29889, 710, 29918, 517, 29918, 1761, 29898, 5509, 29918, 1761, 29897, 13, 9651, 4418, 29918, 7645, 353, 6213, 13, 9651, 1583, 29889, 12154, 29918, 3258, 29918, 5504, 29918, 842, 29918, 5509, 29918, 1761, 29898, 5509, 29918, 1761, 29922, 5509, 29918, 1761, 29892, 4418, 29918, 7645, 29922, 14057, 29918, 7645, 29892, 23227, 29922, 17854, 362, 29897, 13, 13, 4706, 565, 376, 1792, 29908, 297, 1820, 29901, 13, 9651, 1404, 29918, 1761, 353, 851, 29898, 1767, 3366, 1792, 20068, 13, 9651, 1404, 29918, 1761, 353, 3667, 1907, 29889, 710, 29918, 517, 29918, 1761, 29898, 1792, 29918, 1761, 29897, 13, 9651, 4418, 29918, 7645, 353, 6213, 13, 9651, 1583, 29889, 12154, 29918, 3258, 29918, 5504, 29918, 842, 29918, 1792, 29918, 1761, 29898, 1792, 29918, 1761, 29922, 1792, 29918, 1761, 29892, 4418, 29918, 7645, 29922, 14057, 29918, 7645, 29892, 23227, 29922, 17854, 362, 29897, 13, 13, 4706, 1583, 29889, 12154, 29918, 3258, 29918, 5504, 29918, 7892, 29898, 17854, 362, 29897, 13, 13, 4706, 565, 23227, 1275, 376, 3364, 1115, 13, 9651, 931, 29889, 17059, 29898, 29896, 29900, 29897, 29871, 396, 1763, 29877, 14205, 304, 11086, 2407, 297, 1813, 13, 9651, 1583, 29889, 27902, 29918, 12154, 29918, 3888, 29898, 12154, 29892, 2669, 29918, 1761, 29892, 1404, 29918, 1761, 29897, 13, 13, 4706, 1583, 29889, 1188, 449, 29898, 21514, 2190, 29979, 3035, 16173, 29918, 2477, 18736, 29897, 13, 13, 4706, 1583, 29889, 355, 29918, 1688, 29898, 1311, 3032, 1688, 4062, 1170, 29897, 13, 13, 1678, 822, 6297, 29918, 949, 29898, 1311, 29892, 8119, 948, 420, 29892, 696, 2435, 420, 29892, 23227, 1125, 13, 4706, 1583, 29889, 2962, 29918, 1688, 29898, 2997, 29879, 3101, 13, 13, 4706, 1583, 29889, 7507, 29918, 14518, 29918, 6406, 580, 13, 13, 4706, 1583, 29889, 21803, 29918, 14518, 29898, 2388, 273, 948, 420, 29922, 2388, 273, 948, 420, 29897, 13, 13, 4706, 1583, 29889, 12154, 29918, 1171, 482, 29918, 5893, 580, 13, 13, 4706, 1476, 29918, 12154, 353, 1583, 29889, 12154, 29918, 4478, 29898, 1467, 3871, 29897, 13, 4706, 565, 696, 2435, 420, 1275, 376, 1115, 13, 9651, 1583, 29889, 9294, 29918, 3009, 29898, 11940, 29918, 12154, 1275, 24335, 376, 26857, 451, 26694, 5375, 6297, 1159, 13, 4706, 565, 696, 2435, 420, 2804, 5124, 322, 23227, 1275, 525, 14057, 2396, 13, 9651, 1583, 29889, 9294, 29918, 3009, 29898, 11940, 29918, 12154, 1275, 24335, 376, 26857, 451, 1476, 6297, 29901, 376, 718, 696, 2435, 420, 29897, 13, 4706, 565, 696, 2435, 420, 2804, 5124, 322, 23227, 1275, 376, 3364, 1115, 13, 9651, 1596, 703, 15870, 304, 1284, 6297, 29901, 376, 718, 696, 2435, 420, 29897, 13, 9651, 1596, 703, 12542, 29901, 376, 718, 851, 29898, 11940, 29918, 12154, 876, 13, 9651, 1583, 29889, 9294, 29918, 3009, 29898, 11940, 29918, 12154, 2804, 6571, 322, 1476, 29918, 12154, 3366, 1467, 3871, 3108, 1275, 696, 2435, 420, 29892, 13, 462, 632, 376, 15870, 304, 1284, 29901, 376, 718, 696, 2435, 420, 718, 6634, 29876, 1205, 1284, 376, 718, 851, 29898, 11940, 29918, 12154, 876, 13, 4706, 1596, 703, 15870, 304, 1284, 29901, 376, 718, 696, 2435, 420, 718, 6634, 29876, 322, 1284, 376, 718, 851, 29898, 11940, 29918, 12154, 876, 13, 13, 4706, 1583, 29889, 1188, 449, 29898, 21514, 2190, 29979, 3035, 16173, 29918, 2477, 18736, 29897, 13, 13, 4706, 1583, 29889, 355, 29918, 1688, 29898, 1311, 3032, 1688, 4062, 1170, 29897, 13, 13, 1678, 822, 6297, 29918, 8143, 29898, 1311, 29892, 8119, 948, 420, 29892, 696, 2435, 420, 29892, 23227, 1125, 13, 13, 4706, 1583, 29889, 2962, 29918, 1688, 29898, 2997, 29879, 3101, 13, 13, 4706, 1583, 29889, 7507, 29918, 14518, 29918, 6406, 580, 13, 13, 4706, 1583, 29889, 21803, 29918, 14518, 29898, 2388, 273, 948, 420, 29922, 2388, 273, 948, 420, 29897, 13, 13, 4706, 1583, 29889, 12154, 29918, 1171, 482, 29918, 5893, 580, 13, 13, 4706, 1476, 29918, 12154, 353, 1583, 29889, 12154, 29918, 4478, 29898, 1467, 3871, 29897, 13, 13, 4706, 565, 23227, 2804, 376, 3364, 1115, 13, 9651, 1583, 29889, 9294, 29918, 3009, 29898, 11940, 29918, 12154, 1275, 24335, 376, 26857, 451, 1284, 6297, 29901, 376, 718, 696, 2435, 420, 29897, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 9294, 5574, 29898, 11940, 29918, 12154, 2804, 24335, 376, 6028, 451, 1284, 6297, 29901, 376, 718, 696, 2435, 420, 29897, 13, 13, 9651, 599, 29918, 311, 22742, 353, 7700, 13, 9651, 14329, 353, 13361, 537, 580, 13, 9651, 1550, 451, 599, 29918, 311, 22742, 29901, 13, 18884, 5217, 29918, 14357, 353, 1476, 29918, 12154, 3366, 8143, 29918, 14357, 3108, 13, 18884, 1583, 29889, 12154, 29918, 8143, 29918, 2467, 29898, 8143, 29918, 14357, 29897, 13, 18884, 1583, 29889, 5992, 29918, 8921, 537, 29918, 11651, 29898, 13, 462, 1678, 4876, 29918, 1761, 29922, 8921, 537, 29889, 657, 29918, 5269, 29918, 1761, 29898, 1609, 4914, 543, 12154, 613, 995, 29922, 1467, 3871, 29892, 5001, 29922, 2388, 273, 948, 420, 511, 13, 462, 1678, 6297, 3790, 2388, 273, 948, 420, 29901, 518, 1467, 3871, 29962, 1800, 13, 18884, 396, 1583, 29889, 5992, 29918, 12154, 29918, 11651, 29898, 14518, 29922, 2388, 273, 948, 420, 29892, 25387, 608, 29918, 12154, 11759, 1467, 3871, 2314, 13, 13, 18884, 931, 29889, 17059, 29898, 29953, 29897, 29871, 396, 4480, 363, 11086, 13, 18884, 1476, 29918, 12154, 353, 1583, 29889, 12154, 29918, 4478, 29898, 1467, 3871, 29897, 13, 18884, 565, 1476, 29918, 12154, 1275, 426, 6177, 13, 462, 1678, 599, 29918, 311, 22742, 353, 5852, 13, 13, 4706, 1583, 29889, 1188, 449, 29898, 21514, 2190, 29979, 3035, 16173, 29918, 2477, 18736, 29897, 13, 13, 4706, 1583, 29889, 355, 29918, 1688, 29898, 1311, 3032, 1688, 4062, 1170, 29897, 13, 2 ]
handedness/c2_ukb_analysisPheno.py
Conxz/brainskew
0
68534
# import pandas as pd import numpy as np import os import statsmodels.api as sm from scipy.stats import pearsonr, bartlett, levene data_file = './ukb_pheno_T1pos.csv' dat = pd.read_csv(data_file) print 'Handedness: 1=right, 2=left' print dat[dat['Handedness']==1]['Handedness'].count() print dat[dat['Handedness']==2]['Handedness'].count() print dat[dat['Handedness']==3]['Handedness'].count() #conf_str = 'plusPCs' # SexAge or plusPCs or plusPos conf_str = 'plusPos'#'plusPCs' # SexAge or plusPCs or plusPos #conf_str = 'plusPosScales'#'plusPCs' # SexAge or plusPCs or plusPos if conf_str == 'SexAge': col_covars = ['Sex', 'Age', 'ZAge2'#, 'BrainV' ] elif conf_str == 'plusPCs': col_covars = ['Sex', 'Age','ZAge2', #'BrainV', 'PC1', 'PC2', 'PC3', 'PC4', 'PC5', 'PC6', 'PC7', 'PC8', 'PC9', 'PC10'] elif conf_str == 'plusPos': col_covars = ['Sex', 'Age','ZAge2', #'BrainV', 'PC1', 'PC2', 'PC3', 'PC4', 'PC5', 'PC6', 'PC7', 'PC8', 'PC9', 'PC10', 'PosX','PosY','PosZ', 'T1SNR', 'T1CNR', 'Center']#+ ['SkewsXY'] else: # plusPosScales col_covars = ['Sex', 'Age','ZAge2', 'BrainV', 'PC1', 'PC2', 'PC3', 'PC4', 'PC5', 'PC6', 'PC7', 'PC8', 'PC9', 'PC10', 'PosX','PosY','PosZ', 'T1SNR', 'T1CNR', 'Center', 'ScalesAvg','ScalesX','ScalesY', 'ScalesZ'] skew_data_file = '../out_2/skewsAll.out' skew_dat = pd.read_csv(skew_data_file) #col_skews = ['SkewsXY', 'SkewsXZ'] # 'SkewsYZ' col_skews = ['ScalesAvg', 'ScalesX', 'ScalesY', 'ScalesZ'] # Do not use plusPosScales for using this line # Deal with outliers, 4SD #TagOutliers = False#True TagOutliers = True if TagOutliers: thr_xy = skew_dat['SkewsXY'].mean()+4.0*skew_dat['SkewsXY'].std() skew_dat.mask(skew_dat['SkewsXY']>thr_xy, inplace=True) # Edit skew_dat.mask(skew_dat['SkewsXY']<-thr_xy, inplace=True) # Edit thr_xz = skew_dat['SkewsXZ'].mean()+4.0*skew_dat['SkewsXZ'].std() skew_dat.mask(skew_dat['SkewsXZ']>thr_xz, inplace=True) # Edit skew_dat.mask(skew_dat['SkewsXZ']<-thr_xz, inplace=True) # Edit ## For Handedness ---------------------------------------------------------- hand_dat = pd.merge(left=skew_dat, right=dat, left_on='SID', right_on='SID') hand_dat.mask(hand_dat['Handedness']==-3, inplace=True) hand_dat = hand_dat.dropna() #hand_dat.to_csv('./hand_skew_pheno_T1pos.csv', index=False) hand_dat['Hand'] = np.nan hand_dat['Hand'][hand_dat['Handedness']==1] = 1 hand_dat['Hand'][hand_dat['Handedness']==2] = -1 hand_dat['Hand'][hand_dat['Handedness']==3] = 0 #hand_dat.mask(hand_dat['Hand']==0, inplace=True) # Edit #hand_dat.mask(hand_dat['Hand']==-1, inplace=True) #Edit #hand_dat.mask(hand_dat['Hand']==1, inplace=True) #Edit hand_dat = hand_dat.dropna() hand_dat.to_csv('./hand_skew_pheno_T1pos_clean.csv', index=False) col_vars = ['Hand'] for col_skew in col_skews: print col_skew y = hand_dat[col_skew] for col_var in col_vars: print '-', col_var #print pearsonr(hand_dat[col_skew], hand_dat[col_var]) X = hand_dat[[col_var]+col_covars] X = sm.add_constant(X) model = sm.OLS(y,X).fit() predictions = model.predict(X) #print model.summary() print 't=', model.tvalues[1], ',p =',model.pvalues[1] print 'Handedness: 1=right, 2=left, 3=both' print hand_dat[hand_dat['Handedness']==1]['Handedness'].count() print hand_dat[hand_dat['Handedness']==2]['Handedness'].count() print hand_dat[hand_dat['Handedness']==3]['Handedness'].count() print bartlett(hand_dat[hand_dat['Hand']==-1]['SkewsXY'], hand_dat[hand_dat['Hand']==1]['SkewsXY']) print bartlett(hand_dat[hand_dat['Hand']==-1]['SkewsXZ'], hand_dat[hand_dat['Hand']==1]['SkewsXZ']) print levene(hand_dat[hand_dat['Hand']==-1]['SkewsXY'], hand_dat[hand_dat['Hand']==1]['SkewsXY']) print levene(hand_dat[hand_dat['Hand']==-1]['SkewsXZ'], hand_dat[hand_dat['Hand']==1]['SkewsXZ']) print hand_dat.groupby('Hand').apply(np.std) ## For Grip Asymmetry -------------------------------------------- dat['Grip'] = dat[['GripL','GripR']].max(axis=1) z1 = [] z2 = [] z3 = [] z4 = [] for index, row in dat.iterrows(): if row.Handedness==1: z1.append(row.GripR) z2.append(row.GripL) z3.append(2.0*(row.GripR-row.GripL)/(row.GripR+row.GripL)) z4.append(2.0*(row.GripR-row.GripL)/(row.GripR+row.GripL)) elif row.Handedness==2: z1.append(row.GripL) z2.append(row.GripR) z3.append(2.0*(row.GripL-row.GripR)/(row.GripR+row.GripL)) z4.append(2.0*(row.GripR-row.GripL)/(row.GripR+row.GripL)) else: z1.append(np.nan) z2.append(np.nan) z3.append(np.nan) z4.append(np.nan) dat['yGrip'] = z1 # dominance hand dat['nGrip'] = z2 dat['GripAsyAbs'] = z3 dat['GripAsy'] = z4 # for the main analysis, grip strength asymmetry !!! print dat.shape col_vars = ['GripAsy'] print 'GripAsy #: ', dat['GripAsy'].count() grip_dat = pd.merge(left=skew_dat, right=dat, left_on='SID', right_on='SID') grip_dat = grip_dat.dropna() grip_dat.to_csv('./grip_skew_pheno_T1pos.csv', index=False) col_vars = ['GripAsy'] for col_skew in col_skews: print col_skew y = grip_dat[col_skew] for col_var in col_vars: print '-', col_var #print pearsonr(grip_dat[col_skew], grip_dat[col_var]) X = grip_dat[[col_var]+col_covars] X = sm.add_constant(X) model = sm.OLS(y,X).fit() predictions = model.predict(X) #print model.summary() print 't=', model.tvalues[1], ',p =',model.pvalues[1] """ # for subject info of interest info_fields = {'SID': 'eid', 'Sex': '31-0.0', 'Age': '21003-2.0', 'Handedness': '1707-2.0', 'GripL':'46-2.0', 'GripR':'47-2.0', 'Height':'12144-2.0', 'Weight':'12143-2.0'} # N = 9932 for subcortical volume, overall white/gray matter # N = 9931 for cortical volume # N = 8839 for DTI measures !!!!!!!!!!!! # N = 9306 for rfMRI matrix # # N = 11671 for handedness # N = 12551 for age for imaging # N = 502629 for sex for all # here we focus on subject info with DTI meaures, take collumn 25062-2.0, ... # ... Mean FA in corticospinal tract on FA skeleton (right), as the selection rule # here we focus on subject info with T1 data, take collumn 25006-2.0, ... my_index = dat['25006-2.0'].notnull() col_names = ['SID', 'Sex', 'Age', 'Handedness', 'GripL', 'GripR', 'Height', 'Weight'] col_list = [info_fields['SID'], info_fields['Sex'], info_fields['Age'], info_fields['Handedness'], info_fields['GripL'], info_fields['GripR'], info_fields['Height'], info_fields['Weight']] info_dat = dat[col_list][my_index] info_dat.columns = col_names info_dat.to_csv('../UKB_Dat/ukb_pheno.csv', index=False) """
[ 1, 396, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 2897, 13, 5215, 22663, 9794, 29889, 2754, 408, 1560, 13, 3166, 4560, 2272, 29889, 16202, 1053, 282, 799, 1100, 29878, 29892, 289, 442, 13650, 29892, 454, 854, 29872, 13, 13, 1272, 29918, 1445, 353, 19283, 2679, 29890, 29918, 561, 8154, 29918, 29911, 29896, 1066, 29889, 7638, 29915, 13, 4130, 353, 10518, 29889, 949, 29918, 7638, 29898, 1272, 29918, 1445, 29897, 13, 2158, 525, 3481, 287, 2264, 29901, 29871, 29896, 29922, 1266, 29892, 29871, 29906, 29922, 1563, 29915, 13, 2158, 1418, 29961, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29896, 22322, 3481, 287, 2264, 13359, 2798, 580, 13, 2158, 1418, 29961, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29906, 22322, 3481, 287, 2264, 13359, 2798, 580, 13, 2158, 1418, 29961, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29941, 22322, 3481, 287, 2264, 13359, 2798, 580, 13, 13, 29937, 5527, 29918, 710, 353, 525, 11242, 9026, 29879, 29915, 396, 21703, 22406, 470, 2298, 9026, 29879, 470, 2298, 9135, 13, 5527, 29918, 710, 353, 525, 11242, 9135, 29915, 29937, 29915, 11242, 9026, 29879, 29915, 396, 21703, 22406, 470, 2298, 9026, 29879, 470, 2298, 9135, 13, 29937, 5527, 29918, 710, 353, 525, 11242, 9135, 29636, 267, 29915, 29937, 29915, 11242, 9026, 29879, 29915, 396, 21703, 22406, 470, 2298, 9026, 29879, 470, 2298, 9135, 13, 361, 1970, 29918, 710, 1275, 525, 29903, 735, 22406, 2396, 13, 1678, 784, 29918, 24542, 1503, 353, 6024, 29903, 735, 742, 525, 22406, 742, 525, 29999, 22406, 29906, 29915, 6552, 525, 22097, 29963, 29915, 13, 462, 4514, 13, 23681, 1970, 29918, 710, 1275, 525, 11242, 9026, 29879, 2396, 13, 1678, 784, 29918, 24542, 1503, 353, 6024, 29903, 735, 742, 525, 22406, 3788, 29999, 22406, 29906, 742, 396, 29915, 22097, 29963, 742, 13, 462, 29871, 525, 9026, 29896, 742, 525, 9026, 29906, 742, 525, 9026, 29941, 742, 525, 9026, 29946, 742, 525, 9026, 29945, 742, 525, 9026, 29953, 742, 525, 9026, 29955, 742, 13, 462, 29871, 525, 9026, 29947, 742, 525, 9026, 29929, 742, 525, 9026, 29896, 29900, 2033, 13, 23681, 1970, 29918, 710, 1275, 525, 11242, 9135, 2396, 13, 1678, 784, 29918, 24542, 1503, 353, 6024, 29903, 735, 742, 525, 22406, 3788, 29999, 22406, 29906, 742, 396, 29915, 22097, 29963, 742, 13, 462, 29871, 525, 9026, 29896, 742, 525, 9026, 29906, 742, 525, 9026, 29941, 742, 525, 9026, 29946, 742, 525, 9026, 29945, 742, 525, 9026, 29953, 742, 525, 9026, 29955, 742, 13, 462, 29871, 525, 9026, 29947, 742, 525, 9026, 29929, 742, 525, 9026, 29896, 29900, 742, 13, 462, 29871, 525, 9135, 29990, 3788, 9135, 29979, 3788, 9135, 29999, 742, 525, 29911, 29896, 29903, 16514, 742, 525, 29911, 29896, 13778, 29934, 742, 525, 13409, 2033, 29937, 29974, 6024, 29903, 446, 5652, 18454, 2033, 13, 2870, 29901, 396, 2298, 9135, 29636, 267, 13, 1678, 784, 29918, 24542, 1503, 353, 6024, 29903, 735, 742, 525, 22406, 3788, 29999, 22406, 29906, 742, 525, 22097, 29963, 742, 13, 462, 29871, 525, 9026, 29896, 742, 525, 9026, 29906, 742, 525, 9026, 29941, 742, 525, 9026, 29946, 742, 525, 9026, 29945, 742, 525, 9026, 29953, 742, 525, 9026, 29955, 742, 13, 462, 29871, 525, 9026, 29947, 742, 525, 9026, 29929, 742, 525, 9026, 29896, 29900, 742, 13, 462, 29871, 525, 9135, 29990, 3788, 9135, 29979, 3788, 9135, 29999, 742, 525, 29911, 29896, 29903, 16514, 742, 525, 29911, 29896, 13778, 29934, 742, 525, 13409, 742, 13, 462, 29871, 525, 29636, 267, 12810, 29887, 3788, 29636, 267, 29990, 3788, 29636, 267, 29979, 742, 525, 29636, 267, 29999, 2033, 13, 13, 26050, 29893, 29918, 1272, 29918, 1445, 353, 525, 6995, 449, 29918, 29906, 29914, 26050, 5652, 3596, 29889, 449, 29915, 13, 26050, 29893, 29918, 4130, 353, 10518, 29889, 949, 29918, 7638, 29898, 26050, 29893, 29918, 1272, 29918, 1445, 29897, 13, 29937, 1054, 29918, 26050, 5652, 353, 6024, 29903, 446, 5652, 18454, 742, 525, 29903, 446, 5652, 29990, 29999, 2033, 396, 525, 29903, 446, 5652, 29979, 29999, 29915, 13, 1054, 29918, 26050, 5652, 353, 6024, 29636, 267, 12810, 29887, 742, 525, 29636, 267, 29990, 742, 525, 29636, 267, 29979, 742, 525, 29636, 267, 29999, 2033, 259, 396, 1938, 451, 671, 2298, 9135, 29636, 267, 363, 773, 29871, 445, 1196, 13, 13, 29937, 897, 284, 411, 714, 27801, 29892, 29871, 29946, 7230, 13, 29937, 8176, 3744, 27801, 353, 7700, 29937, 5574, 13, 8176, 3744, 27801, 353, 5852, 13, 361, 10522, 3744, 27801, 29901, 13, 1678, 1468, 29918, 3594, 353, 18109, 29893, 29918, 4130, 1839, 29903, 446, 5652, 18454, 13359, 12676, 580, 29974, 29946, 29889, 29900, 29930, 26050, 29893, 29918, 4130, 1839, 29903, 446, 5652, 18454, 13359, 4172, 580, 13, 1678, 18109, 29893, 29918, 4130, 29889, 13168, 29898, 26050, 29893, 29918, 4130, 1839, 29903, 446, 5652, 18454, 2033, 29958, 386, 29878, 29918, 3594, 29892, 297, 6689, 29922, 5574, 29897, 396, 7641, 13, 1678, 18109, 29893, 29918, 4130, 29889, 13168, 29898, 26050, 29893, 29918, 4130, 1839, 29903, 446, 5652, 18454, 2033, 16406, 386, 29878, 29918, 3594, 29892, 297, 6689, 29922, 5574, 29897, 396, 7641, 13, 1678, 1468, 29918, 29916, 29920, 353, 18109, 29893, 29918, 4130, 1839, 29903, 446, 5652, 29990, 29999, 13359, 12676, 580, 29974, 29946, 29889, 29900, 29930, 26050, 29893, 29918, 4130, 1839, 29903, 446, 5652, 29990, 29999, 13359, 4172, 580, 13, 1678, 18109, 29893, 29918, 4130, 29889, 13168, 29898, 26050, 29893, 29918, 4130, 1839, 29903, 446, 5652, 29990, 29999, 2033, 29958, 386, 29878, 29918, 29916, 29920, 29892, 297, 6689, 29922, 5574, 29897, 396, 7641, 13, 1678, 18109, 29893, 29918, 4130, 29889, 13168, 29898, 26050, 29893, 29918, 4130, 1839, 29903, 446, 5652, 29990, 29999, 2033, 16406, 386, 29878, 29918, 29916, 29920, 29892, 297, 6689, 29922, 5574, 29897, 396, 7641, 13, 13, 13, 2277, 1152, 5166, 287, 2264, 448, 2683, 2683, 2683, 1378, 29899, 13, 3179, 29918, 4130, 353, 10518, 29889, 14634, 29898, 1563, 29922, 26050, 29893, 29918, 4130, 29892, 1492, 29922, 4130, 29892, 2175, 29918, 265, 2433, 29903, 1367, 742, 1492, 29918, 265, 2433, 29903, 1367, 1495, 13, 3179, 29918, 4130, 29889, 13168, 29898, 3179, 29918, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29899, 29941, 29892, 297, 6689, 29922, 5574, 29897, 13, 3179, 29918, 4130, 353, 1361, 29918, 4130, 29889, 8865, 1056, 580, 13, 29937, 3179, 29918, 4130, 29889, 517, 29918, 7638, 877, 6904, 3179, 29918, 26050, 29893, 29918, 561, 8154, 29918, 29911, 29896, 1066, 29889, 7638, 742, 2380, 29922, 8824, 29897, 13, 13, 3179, 29918, 4130, 1839, 3481, 2033, 353, 7442, 29889, 13707, 13, 3179, 29918, 4130, 1839, 3481, 2033, 29961, 3179, 29918, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29896, 29962, 353, 29871, 29896, 13, 3179, 29918, 4130, 1839, 3481, 2033, 29961, 3179, 29918, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29906, 29962, 353, 448, 29896, 13, 3179, 29918, 4130, 1839, 3481, 2033, 29961, 3179, 29918, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29941, 29962, 353, 29871, 29900, 13, 29937, 3179, 29918, 4130, 29889, 13168, 29898, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29900, 29892, 297, 6689, 29922, 5574, 29897, 396, 7641, 13, 29937, 3179, 29918, 4130, 29889, 13168, 29898, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29899, 29896, 29892, 297, 6689, 29922, 5574, 29897, 396, 6103, 13, 29937, 3179, 29918, 4130, 29889, 13168, 29898, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29896, 29892, 297, 6689, 29922, 5574, 29897, 396, 6103, 13, 3179, 29918, 4130, 353, 1361, 29918, 4130, 29889, 8865, 1056, 580, 13, 3179, 29918, 4130, 29889, 517, 29918, 7638, 877, 6904, 3179, 29918, 26050, 29893, 29918, 561, 8154, 29918, 29911, 29896, 1066, 29918, 14941, 29889, 7638, 742, 2380, 29922, 8824, 29897, 13, 13, 1054, 29918, 16908, 353, 6024, 3481, 2033, 13, 1454, 784, 29918, 26050, 29893, 297, 784, 29918, 26050, 5652, 29901, 13, 1678, 1596, 784, 29918, 26050, 29893, 13, 1678, 343, 353, 1361, 29918, 4130, 29961, 1054, 29918, 26050, 29893, 29962, 13, 1678, 363, 784, 29918, 1707, 297, 784, 29918, 16908, 29901, 13, 4706, 1596, 17411, 742, 784, 29918, 1707, 13, 4706, 396, 2158, 282, 799, 1100, 29878, 29898, 3179, 29918, 4130, 29961, 1054, 29918, 26050, 29893, 1402, 1361, 29918, 4130, 29961, 1054, 29918, 1707, 2314, 13, 4706, 1060, 353, 1361, 29918, 4130, 8999, 1054, 29918, 1707, 10062, 1054, 29918, 24542, 1503, 29962, 13, 4706, 1060, 353, 1560, 29889, 1202, 29918, 23362, 29898, 29990, 29897, 13, 4706, 1904, 353, 1560, 29889, 5607, 29903, 29898, 29891, 29892, 29990, 467, 9202, 580, 13, 4706, 27303, 353, 1904, 29889, 27711, 29898, 29990, 29897, 13, 4706, 396, 2158, 1904, 29889, 7727, 580, 13, 4706, 1596, 525, 29873, 29922, 742, 1904, 29889, 29873, 5975, 29961, 29896, 1402, 13420, 29886, 353, 742, 4299, 29889, 29886, 5975, 29961, 29896, 29962, 13, 13, 2158, 525, 3481, 287, 2264, 29901, 29871, 29896, 29922, 1266, 29892, 29871, 29906, 29922, 1563, 29892, 29871, 29941, 29922, 20313, 29915, 13, 2158, 1361, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29896, 22322, 3481, 287, 2264, 13359, 2798, 580, 13, 2158, 1361, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29906, 22322, 3481, 287, 2264, 13359, 2798, 580, 13, 2158, 1361, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 287, 2264, 2033, 1360, 29941, 22322, 3481, 287, 2264, 13359, 2798, 580, 13, 13, 2158, 289, 442, 13650, 29898, 3179, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29899, 29896, 22322, 29903, 446, 5652, 18454, 7464, 1361, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29896, 22322, 29903, 446, 5652, 18454, 11287, 13, 2158, 289, 442, 13650, 29898, 3179, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29899, 29896, 22322, 29903, 446, 5652, 29990, 29999, 7464, 1361, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29896, 22322, 29903, 446, 5652, 29990, 29999, 11287, 13, 13, 2158, 454, 854, 29872, 29898, 3179, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29899, 29896, 22322, 29903, 446, 5652, 18454, 7464, 1361, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29896, 22322, 29903, 446, 5652, 18454, 11287, 13, 2158, 454, 854, 29872, 29898, 3179, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29899, 29896, 22322, 29903, 446, 5652, 29990, 29999, 7464, 1361, 29918, 4130, 29961, 3179, 29918, 4130, 1839, 3481, 2033, 1360, 29896, 22322, 29903, 446, 5652, 29990, 29999, 11287, 13, 13, 2158, 1361, 29918, 4130, 29889, 27789, 877, 3481, 2824, 7302, 29898, 9302, 29889, 4172, 29897, 13, 13, 2277, 1152, 402, 6472, 1094, 962, 2527, 719, 448, 2683, 2683, 1378, 5634, 13, 4130, 1839, 29954, 6472, 2033, 353, 1418, 29961, 1839, 29954, 6472, 29931, 3788, 29954, 6472, 29934, 2033, 1822, 3317, 29898, 8990, 29922, 29896, 29897, 13, 13, 29920, 29896, 353, 5159, 13, 29920, 29906, 353, 5159, 13, 29920, 29941, 353, 5159, 13, 29920, 29946, 353, 5159, 13, 1454, 2380, 29892, 1948, 297, 1418, 29889, 1524, 5727, 7295, 13, 1678, 565, 1948, 29889, 3481, 287, 2264, 1360, 29896, 29901, 13, 4706, 503, 29896, 29889, 4397, 29898, 798, 29889, 29954, 6472, 29934, 29897, 13, 4706, 503, 29906, 29889, 4397, 29898, 798, 29889, 29954, 6472, 29931, 29897, 13, 4706, 503, 29941, 29889, 4397, 29898, 29906, 29889, 29900, 16395, 798, 29889, 29954, 6472, 29934, 29899, 798, 29889, 29954, 6472, 29931, 6802, 29898, 798, 29889, 29954, 6472, 29934, 29974, 798, 29889, 29954, 6472, 29931, 876, 13, 4706, 503, 29946, 29889, 4397, 29898, 29906, 29889, 29900, 16395, 798, 29889, 29954, 6472, 29934, 29899, 798, 29889, 29954, 6472, 29931, 6802, 29898, 798, 29889, 29954, 6472, 29934, 29974, 798, 29889, 29954, 6472, 29931, 876, 13, 1678, 25342, 1948, 29889, 3481, 287, 2264, 1360, 29906, 29901, 13, 4706, 503, 29896, 29889, 4397, 29898, 798, 29889, 29954, 6472, 29931, 29897, 13, 4706, 503, 29906, 29889, 4397, 29898, 798, 29889, 29954, 6472, 29934, 29897, 13, 4706, 503, 29941, 29889, 4397, 29898, 29906, 29889, 29900, 16395, 798, 29889, 29954, 6472, 29931, 29899, 798, 29889, 29954, 6472, 29934, 6802, 29898, 798, 29889, 29954, 6472, 29934, 29974, 798, 29889, 29954, 6472, 29931, 876, 13, 4706, 503, 29946, 29889, 4397, 29898, 29906, 29889, 29900, 16395, 798, 29889, 29954, 6472, 29934, 29899, 798, 29889, 29954, 6472, 29931, 6802, 29898, 798, 29889, 29954, 6472, 29934, 29974, 798, 29889, 29954, 6472, 29931, 876, 13, 1678, 1683, 29901, 13, 4706, 503, 29896, 29889, 4397, 29898, 9302, 29889, 13707, 29897, 13, 4706, 503, 29906, 29889, 4397, 29898, 9302, 29889, 13707, 29897, 13, 4706, 503, 29941, 29889, 4397, 29898, 9302, 29889, 13707, 29897, 13, 4706, 503, 29946, 29889, 4397, 29898, 9302, 29889, 13707, 29897, 13, 4130, 1839, 29891, 29954, 6472, 2033, 353, 503, 29896, 396, 8022, 749, 1361, 13, 4130, 1839, 29876, 29954, 6472, 2033, 353, 503, 29906, 13, 4130, 1839, 29954, 6472, 2887, 29891, 4920, 29879, 2033, 353, 503, 29941, 13, 4130, 1839, 29954, 6472, 2887, 29891, 2033, 353, 503, 29946, 396, 363, 278, 1667, 7418, 29892, 330, 6472, 9324, 16936, 2527, 719, 1738, 6824, 13, 13, 2158, 1418, 29889, 12181, 13, 13, 1054, 29918, 16908, 353, 6024, 29954, 6472, 2887, 29891, 2033, 13, 2158, 525, 29954, 6472, 2887, 29891, 396, 29901, 13420, 1418, 1839, 29954, 6472, 2887, 29891, 13359, 2798, 580, 13, 13, 29887, 6472, 29918, 4130, 353, 10518, 29889, 14634, 29898, 1563, 29922, 26050, 29893, 29918, 4130, 29892, 1492, 29922, 4130, 29892, 2175, 29918, 265, 2433, 29903, 1367, 742, 1492, 29918, 265, 2433, 29903, 1367, 1495, 13, 29887, 6472, 29918, 4130, 353, 330, 6472, 29918, 4130, 29889, 8865, 1056, 580, 13, 29887, 6472, 29918, 4130, 29889, 517, 29918, 7638, 877, 6904, 29887, 6472, 29918, 26050, 29893, 29918, 561, 8154, 29918, 29911, 29896, 1066, 29889, 7638, 742, 2380, 29922, 8824, 29897, 13, 13, 1054, 29918, 16908, 353, 6024, 29954, 6472, 2887, 29891, 2033, 13, 1454, 784, 29918, 26050, 29893, 297, 784, 29918, 26050, 5652, 29901, 13, 1678, 1596, 784, 29918, 26050, 29893, 13, 1678, 343, 353, 330, 6472, 29918, 4130, 29961, 1054, 29918, 26050, 29893, 29962, 13, 1678, 363, 784, 29918, 1707, 297, 784, 29918, 16908, 29901, 13, 4706, 1596, 17411, 742, 784, 29918, 1707, 13, 4706, 396, 2158, 282, 799, 1100, 29878, 29898, 29887, 6472, 29918, 4130, 29961, 1054, 29918, 26050, 29893, 1402, 330, 6472, 29918, 4130, 29961, 1054, 29918, 1707, 2314, 13, 4706, 1060, 353, 330, 6472, 29918, 4130, 8999, 1054, 29918, 1707, 10062, 1054, 29918, 24542, 1503, 29962, 13, 4706, 1060, 353, 1560, 29889, 1202, 29918, 23362, 29898, 29990, 29897, 13, 4706, 1904, 353, 1560, 29889, 5607, 29903, 29898, 29891, 29892, 29990, 467, 9202, 580, 13, 4706, 27303, 353, 1904, 29889, 27711, 29898, 29990, 29897, 13, 4706, 396, 2158, 1904, 29889, 7727, 580, 13, 4706, 1596, 525, 29873, 29922, 742, 1904, 29889, 29873, 5975, 29961, 29896, 1402, 13420, 29886, 353, 742, 4299, 29889, 29886, 5975, 29961, 29896, 29962, 13, 13, 13, 13, 15945, 29908, 13, 29937, 363, 4967, 5235, 310, 4066, 13, 3888, 29918, 9621, 353, 11117, 29903, 1367, 2396, 525, 29872, 333, 742, 29871, 13, 12, 12, 29915, 29903, 735, 2396, 525, 29941, 29896, 29899, 29900, 29889, 29900, 742, 29871, 13, 12, 12, 29915, 22406, 2396, 525, 29906, 29896, 29900, 29900, 29941, 29899, 29906, 29889, 29900, 742, 29871, 13, 12, 12, 29915, 3481, 287, 2264, 2396, 525, 29896, 29955, 29900, 29955, 29899, 29906, 29889, 29900, 742, 29871, 13, 12, 12, 29915, 29954, 6472, 29931, 22099, 29946, 29953, 29899, 29906, 29889, 29900, 742, 13, 12, 12, 29915, 29954, 6472, 29934, 22099, 29946, 29955, 29899, 29906, 29889, 29900, 742, 13, 12, 12, 29915, 7011, 22099, 29896, 29906, 29896, 29946, 29946, 29899, 29906, 29889, 29900, 742, 13, 12, 12, 29915, 22676, 22099, 29896, 29906, 29896, 29946, 29941, 29899, 29906, 29889, 29900, 10827, 13, 29937, 405, 353, 29871, 29929, 29929, 29941, 29906, 363, 1014, 29883, 441, 936, 7977, 29892, 12463, 4796, 29914, 21012, 4383, 13, 29937, 405, 353, 29871, 29929, 29929, 29941, 29896, 363, 13979, 936, 7977, 13, 29937, 405, 353, 29871, 29947, 29947, 29941, 29929, 363, 360, 24301, 15366, 29871, 1738, 6824, 6824, 6824, 6824, 21004, 13, 29937, 405, 353, 29871, 29929, 29941, 29900, 29953, 363, 364, 29888, 29924, 3960, 4636, 13, 29937, 13, 29937, 405, 353, 29871, 29896, 29896, 29953, 29955, 29896, 363, 29692, 2264, 13, 29937, 405, 353, 29871, 29896, 29906, 29945, 29945, 29896, 363, 5046, 363, 6382, 292, 13, 29937, 405, 353, 29871, 29945, 29900, 29906, 29953, 29906, 29929, 363, 7916, 363, 599, 13, 29937, 1244, 591, 8569, 373, 4967, 5235, 411, 360, 24301, 592, 29874, 1973, 29892, 2125, 5321, 1227, 29871, 29906, 29945, 29900, 29953, 29906, 29899, 29906, 29889, 29900, 29892, 2023, 13, 29937, 2023, 16316, 13515, 297, 13979, 293, 4705, 979, 22330, 373, 13515, 18109, 11285, 313, 1266, 511, 408, 278, 9262, 5751, 13, 29937, 1244, 591, 8569, 373, 4967, 5235, 411, 323, 29896, 848, 29892, 2125, 5321, 1227, 29871, 29906, 29945, 29900, 29900, 29953, 29899, 29906, 29889, 29900, 29892, 2023, 13, 1357, 29918, 2248, 353, 1418, 1839, 29906, 29945, 29900, 29900, 29953, 29899, 29906, 29889, 29900, 13359, 1333, 4304, 580, 13, 1054, 29918, 7039, 353, 6024, 29903, 1367, 742, 525, 29903, 735, 742, 525, 22406, 742, 525, 3481, 287, 2264, 742, 525, 29954, 6472, 29931, 742, 525, 29954, 6472, 29934, 742, 525, 7011, 742, 525, 22676, 2033, 13, 1054, 29918, 1761, 353, 518, 3888, 29918, 9621, 1839, 29903, 1367, 7464, 5235, 29918, 9621, 1839, 29903, 735, 7464, 5235, 29918, 9621, 1839, 22406, 7464, 29871, 13, 12, 12, 3888, 29918, 9621, 1839, 3481, 287, 2264, 7464, 13, 12, 12, 3888, 29918, 9621, 1839, 29954, 6472, 29931, 7464, 5235, 29918, 9621, 1839, 29954, 6472, 29934, 7464, 13, 12, 12, 3888, 29918, 9621, 1839, 7011, 7464, 5235, 29918, 9621, 1839, 22676, 2033, 29962, 13, 3888, 29918, 4130, 353, 1418, 29961, 1054, 29918, 1761, 3816, 1357, 29918, 2248, 29962, 13, 3888, 29918, 4130, 29889, 13099, 353, 784, 29918, 7039, 13, 3888, 29918, 4130, 29889, 517, 29918, 7638, 877, 6995, 19960, 29933, 29918, 16390, 29914, 2679, 29890, 29918, 561, 8154, 29889, 7638, 742, 2380, 29922, 8824, 29897, 13, 15945, 29908, 13, 2 ]
src/craft_ml/data/split.py
OptimizationGuys/CraftML
15
100535
import numpy as np from sklearn import model_selection import typing as t from copy import copy from ..mltypes import RandomState from ..data.dataset import Dataset class DataSplit: def get_splits(self, dataset: Dataset) -> t.Generator[t.Tuple[Dataset, Dataset], None, None]: raise NotImplementedError class TrainTestSplit(DataSplit): def __init__(self, train_size: t.Union[float, int] = 0.7, random_state: RandomState = None, shuffle: bool = True ): self.train_size = train_size self.random_state = random_state self.shuffle = shuffle def get_splits(self, dataset: Dataset) -> t.Generator[t.Tuple[Dataset, Dataset], None, None]: all_rows = dataset.ids train_rows, test_rows = model_selection.train_test_split(all_rows, train_size=self.train_size, random_state=self.random_state, shuffle=self.shuffle) train_dataset = copy(dataset) train_dataset.ids = train_rows test_dataset = copy(dataset) test_dataset.ids = test_rows yield train_dataset, test_dataset
[ 1, 1053, 12655, 408, 7442, 13, 3166, 2071, 19668, 1053, 1904, 29918, 21731, 13, 5215, 19229, 408, 260, 13, 3166, 3509, 1053, 3509, 13, 3166, 6317, 828, 8768, 1053, 16968, 2792, 13, 3166, 6317, 1272, 29889, 24713, 1053, 13373, 24541, 13, 13, 13, 1990, 3630, 18772, 29901, 13, 13, 1678, 822, 679, 29918, 23579, 1169, 29898, 1311, 29892, 8783, 29901, 13373, 24541, 29897, 1599, 260, 29889, 21575, 29961, 29873, 29889, 23215, 552, 29961, 16390, 24541, 29892, 13373, 24541, 1402, 6213, 29892, 6213, 5387, 13, 4706, 12020, 2216, 1888, 2037, 287, 2392, 13, 13, 13, 1990, 28186, 3057, 18772, 29898, 1469, 18772, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 13, 462, 7945, 29918, 2311, 29901, 260, 29889, 19986, 29961, 7411, 29892, 938, 29962, 353, 29871, 29900, 29889, 29955, 29892, 13, 462, 4036, 29918, 3859, 29901, 16968, 2792, 353, 6213, 29892, 13, 462, 528, 21897, 29901, 6120, 353, 5852, 13, 462, 29871, 1125, 13, 4706, 1583, 29889, 14968, 29918, 2311, 353, 7945, 29918, 2311, 13, 4706, 1583, 29889, 8172, 29918, 3859, 353, 4036, 29918, 3859, 13, 4706, 1583, 29889, 845, 21897, 353, 528, 21897, 13, 13, 1678, 822, 679, 29918, 23579, 1169, 29898, 1311, 29892, 8783, 29901, 13373, 24541, 29897, 1599, 260, 29889, 21575, 29961, 29873, 29889, 23215, 552, 29961, 16390, 24541, 29892, 13373, 24541, 1402, 6213, 29892, 6213, 5387, 13, 4706, 599, 29918, 5727, 353, 8783, 29889, 4841, 13, 4706, 7945, 29918, 5727, 29892, 1243, 29918, 5727, 353, 1904, 29918, 21731, 29889, 14968, 29918, 1688, 29918, 5451, 29898, 497, 29918, 5727, 29892, 13, 462, 462, 462, 462, 7945, 29918, 2311, 29922, 1311, 29889, 14968, 29918, 2311, 29892, 13, 462, 462, 462, 462, 4036, 29918, 3859, 29922, 1311, 29889, 8172, 29918, 3859, 29892, 13, 462, 462, 462, 462, 528, 21897, 29922, 1311, 29889, 845, 21897, 29897, 13, 4706, 7945, 29918, 24713, 353, 3509, 29898, 24713, 29897, 13, 4706, 7945, 29918, 24713, 29889, 4841, 353, 7945, 29918, 5727, 13, 4706, 1243, 29918, 24713, 353, 3509, 29898, 24713, 29897, 13, 4706, 1243, 29918, 24713, 29889, 4841, 353, 1243, 29918, 5727, 13, 4706, 7709, 7945, 29918, 24713, 29892, 1243, 29918, 24713, 13, 2 ]
nlt_gol2_3-autorun.py
kooi/nlt-robotica-snippets
0
1615901
<reponame>kooi/nlt-robotica-snippets import pygame import random # grid = [ # [0, 1, 0, 1, 0, 1], # [1, 1, 1, 1, 1, 1], # ] # cell = grid[y vanaf boven][x vanaf links] # cell = grid[0][1] # print(grid[0][1]) PALETTE = [ (255, 255, 255), # dood ( 0, 0, 0), # levend (255, 255, 0), # 2 ( 0, 255, 255), # 3 (255, 0, 255), # 4 (128, 128, 0), # 5 ( 0, 128, 128), # 6 (128, 0, 128), # 7 (128, 128, 128), # 8 (255, 255, 255), # achtergrond ] PIXEL_SIZE = 10 PIXEL_MARGIN = 2 GRID_SIZE_X = 64 GRID_SIZE_Y = 48 petridish = [[random.randint(0,1) for x in range(GRID_SIZE_X)] for y in range(GRID_SIZE_Y)] #petridish = [[0 for x in range(GRID_SIZE_X)] for y in range(GRID_SIZE_Y)] def count_neighbours(x, y, p): sum = 0 sum = sum + p[(y-1)%GRID_SIZE_Y][(x-1)%GRID_SIZE_X] sum = sum + p[(y-1)%GRID_SIZE_Y][(x )%GRID_SIZE_X] sum = sum + p[(y-1)%GRID_SIZE_Y][(x+1)%GRID_SIZE_X] sum = sum + p[(y )%GRID_SIZE_Y][(x+1)%GRID_SIZE_X] sum = sum + p[(y+1)%GRID_SIZE_Y][(x+1)%GRID_SIZE_X] sum = sum + p[(y+1)%GRID_SIZE_Y][(x )%GRID_SIZE_X] sum = sum + p[(y+1)%GRID_SIZE_Y][(x-1)%GRID_SIZE_X] sum = sum + p[(y )%GRID_SIZE_Y][(x-1)%GRID_SIZE_X] return sum def life_or_death(state, neighbours): """ 1. Any live cell with two or three live neighbors survives. 2. Any dead cell with three live neighbors becomes a live cell. 3. All other live cells die in the next generation. Similarly, all other dead cells stay dead. """ if state == 1: if neighbours == 2 or neighbours == 3: return 1 else: return 0 else: # state = 0 if neighbours == 3: return 1 else: return 0 def update_petridish(old): new = [[0 for x in range(GRID_SIZE_X)] for y in range(GRID_SIZE_Y)] for j in range(GRID_SIZE_Y): for i in range(GRID_SIZE_X): new[j][i] = life_or_death( old[j][i], count_neighbours(i, j, old) ) return new pygame.init() screen = pygame.display.set_mode([ GRID_SIZE_X*(PIXEL_SIZE+PIXEL_MARGIN)+PIXEL_MARGIN, GRID_SIZE_Y*(PIXEL_SIZE+PIXEL_MARGIN)+PIXEL_MARGIN, ]) done = False clock = pygame.time.Clock() autorun = False while not done: for event in pygame.event.get(): if event.type == pygame.QUIT: done = True elif event.type == pygame.MOUSEBUTTONDOWN: pos = pygame.mouse.get_pos() col = pos[0] // (PIXEL_SIZE+PIXEL_MARGIN) row = pos[1] // (PIXEL_SIZE+PIXEL_MARGIN) if event.button == 1: petridish[row][col] = 1 elif event.button == 3: petridish[row][col] = 0 print("mouseclick(", pos, ") -> (", row,",", col, ")") elif event.type == pygame.KEYDOWN: if event.key == pygame.K_SPACE: petridish = update_petridish(petridish) elif event.key == pygame.K_a: autorun = True elif event.key == pygame.K_s: autorun = False if autorun == True: petridish = update_petridish(petridish) # teken petrischaal naar scherm screen.fill( PALETTE[9] ) for j in range(GRID_SIZE_Y): for i in range(GRID_SIZE_X): pygame.draw.rect( screen, PALETTE[petridish[j][i]], [(PIXEL_SIZE + PIXEL_MARGIN)*i + PIXEL_MARGIN, (PIXEL_SIZE + PIXEL_MARGIN)*j + PIXEL_MARGIN, PIXEL_SIZE, PIXEL_SIZE] ) clock.tick(60) pygame.display.flip() pygame.quit()
[ 1, 529, 276, 1112, 420, 29958, 2901, 7768, 29914, 29876, 1896, 29899, 307, 7451, 983, 29899, 29879, 1240, 27421, 13, 5215, 22028, 30004, 13, 5215, 4036, 30004, 13, 30004, 13, 29937, 6856, 353, 518, 30004, 13, 29937, 3986, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29896, 1402, 30004, 13, 29937, 3986, 518, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 29892, 29871, 29896, 1402, 30004, 13, 29937, 4706, 4514, 30004, 13, 29937, 3038, 353, 6856, 29961, 29891, 1109, 2142, 289, 9813, 3816, 29916, 1109, 2142, 2988, 29962, 30004, 13, 29937, 3038, 353, 6856, 29961, 29900, 3816, 29896, 29962, 30004, 13, 29937, 1596, 29898, 7720, 29961, 29900, 3816, 29896, 2314, 30004, 13, 30004, 13, 7228, 1307, 29911, 4330, 353, 518, 30004, 13, 9651, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 396, 437, 397, 30004, 13, 9651, 313, 259, 29900, 29892, 1678, 29900, 29892, 1678, 29900, 511, 396, 14453, 355, 30004, 13, 9651, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 1678, 29900, 511, 396, 29871, 29906, 30004, 13, 9651, 313, 259, 29900, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 396, 29871, 29941, 30004, 13, 9651, 313, 29906, 29945, 29945, 29892, 1678, 29900, 29892, 29871, 29906, 29945, 29945, 511, 396, 29871, 29946, 30004, 13, 9651, 313, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 29892, 1678, 29900, 511, 396, 29871, 29945, 30004, 13, 9651, 313, 259, 29900, 29892, 29871, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 511, 396, 29871, 29953, 30004, 13, 9651, 313, 29896, 29906, 29947, 29892, 1678, 29900, 29892, 29871, 29896, 29906, 29947, 511, 396, 29871, 29955, 30004, 13, 9651, 313, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 29892, 29871, 29896, 29906, 29947, 511, 396, 29871, 29947, 30004, 13, 9651, 313, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 29892, 29871, 29906, 29945, 29945, 511, 396, 26096, 629, 898, 30004, 13, 3986, 4514, 30004, 13, 30004, 13, 2227, 29990, 6670, 29918, 14226, 353, 29871, 29896, 29900, 30004, 13, 2227, 29990, 6670, 29918, 1529, 29934, 29954, 1177, 353, 29871, 29906, 30004, 13, 14345, 1367, 29918, 14226, 29918, 29990, 353, 29871, 29953, 29946, 30004, 13, 14345, 1367, 29918, 14226, 29918, 29979, 353, 29871, 29946, 29947, 30004, 13, 30004, 13, 10963, 2429, 728, 353, 5519, 8172, 29889, 9502, 524, 29898, 29900, 29892, 29896, 29897, 363, 921, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29990, 4638, 30004, 13, 462, 29871, 363, 343, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29979, 4638, 30004, 13, 30004, 13, 29937, 10963, 2429, 728, 353, 5519, 29900, 363, 921, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29990, 4638, 363, 343, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29979, 4638, 30004, 13, 30004, 13, 1753, 2302, 29918, 484, 1141, 29890, 2470, 29898, 29916, 29892, 343, 29892, 282, 1125, 30004, 13, 1678, 2533, 353, 29871, 29900, 30004, 13, 1678, 2533, 353, 2533, 718, 282, 15625, 29891, 29899, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29979, 3816, 29898, 29916, 29899, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29990, 29962, 30004, 13, 1678, 2533, 353, 2533, 718, 282, 15625, 29891, 29899, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29979, 3816, 29898, 29916, 29871, 1723, 29995, 14345, 1367, 29918, 14226, 29918, 29990, 29962, 30004, 13, 1678, 2533, 353, 2533, 718, 282, 15625, 29891, 29899, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29979, 3816, 29898, 29916, 29974, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29990, 29962, 30004, 13, 1678, 2533, 353, 2533, 718, 282, 15625, 29891, 29871, 1723, 29995, 14345, 1367, 29918, 14226, 29918, 29979, 3816, 29898, 29916, 29974, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29990, 29962, 30004, 13, 1678, 2533, 353, 2533, 718, 282, 15625, 29891, 29974, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29979, 3816, 29898, 29916, 29974, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29990, 29962, 30004, 13, 1678, 2533, 353, 2533, 718, 282, 15625, 29891, 29974, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29979, 3816, 29898, 29916, 29871, 1723, 29995, 14345, 1367, 29918, 14226, 29918, 29990, 29962, 30004, 13, 1678, 2533, 353, 2533, 718, 282, 15625, 29891, 29974, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29979, 3816, 29898, 29916, 29899, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29990, 29962, 30004, 13, 1678, 2533, 353, 2533, 718, 282, 15625, 29891, 29871, 1723, 29995, 14345, 1367, 29918, 14226, 29918, 29979, 3816, 29898, 29916, 29899, 29896, 29897, 29995, 14345, 1367, 29918, 14226, 29918, 29990, 29962, 30004, 13, 1678, 736, 2533, 30004, 13, 30004, 13, 1753, 2834, 29918, 272, 29918, 311, 493, 29898, 3859, 29892, 22092, 2470, 1125, 30004, 13, 1678, 9995, 30004, 13, 268, 29896, 29889, 3139, 5735, 3038, 411, 1023, 470, 2211, 5735, 22092, 943, 10503, 3145, 22993, 13, 268, 29906, 29889, 3139, 7123, 3038, 411, 2211, 5735, 22092, 943, 7415, 263, 5735, 3038, 22993, 13, 268, 29941, 29889, 2178, 916, 5735, 9101, 762, 297, 278, 2446, 12623, 22993, 13, 539, 20175, 29892, 599, 916, 7123, 9101, 7952, 7123, 22993, 13, 1678, 9995, 30004, 13, 1678, 565, 2106, 1275, 29871, 29896, 29901, 30004, 13, 4706, 565, 22092, 2470, 1275, 29871, 29906, 470, 22092, 2470, 1275, 29871, 29941, 29901, 30004, 13, 9651, 736, 29871, 29896, 30004, 13, 4706, 1683, 29901, 30004, 13, 9651, 736, 29871, 29900, 30004, 13, 1678, 1683, 29901, 396, 2106, 353, 29871, 29900, 30004, 13, 4706, 565, 22092, 2470, 1275, 29871, 29941, 29901, 30004, 13, 9651, 736, 29871, 29896, 30004, 13, 4706, 1683, 29901, 30004, 13, 9651, 736, 29871, 29900, 30004, 13, 30004, 13, 1753, 2767, 29918, 10963, 2429, 728, 29898, 1025, 1125, 30004, 13, 1678, 716, 353, 5519, 29900, 363, 921, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29990, 4638, 363, 343, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29979, 4638, 30004, 13, 1678, 363, 432, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29979, 1125, 30004, 13, 4706, 363, 474, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29990, 1125, 30004, 13, 9651, 716, 29961, 29926, 3816, 29875, 29962, 353, 2834, 29918, 272, 29918, 311, 493, 29898, 2030, 29961, 29926, 3816, 29875, 1402, 2302, 29918, 484, 1141, 29890, 2470, 29898, 29875, 29892, 432, 29892, 2030, 29897, 1723, 30004, 13, 1678, 736, 716, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 2272, 11802, 29889, 2344, 26471, 13, 10525, 353, 22028, 29889, 4990, 29889, 842, 29918, 8513, 4197, 30004, 13, 1678, 18016, 1367, 29918, 14226, 29918, 29990, 16395, 2227, 29990, 6670, 29918, 14226, 29974, 2227, 29990, 6670, 29918, 1529, 29934, 29954, 1177, 7240, 2227, 29990, 6670, 29918, 1529, 29934, 29954, 1177, 11167, 13, 1678, 18016, 1367, 29918, 14226, 29918, 29979, 16395, 2227, 29990, 6670, 29918, 14226, 29974, 2227, 29990, 6670, 29918, 1529, 29934, 29954, 1177, 7240, 2227, 29990, 6670, 29918, 1529, 29934, 29954, 1177, 11167, 13, 268, 2314, 30004, 13, 15091, 353, 7700, 30004, 13, 13058, 353, 22028, 29889, 2230, 29889, 29907, 908, 26471, 13, 8309, 348, 353, 7700, 30004, 13, 30004, 13, 8000, 451, 2309, 29901, 30004, 13, 1678, 363, 1741, 297, 22028, 29889, 3696, 29889, 657, 7295, 30004, 13, 4706, 565, 1741, 29889, 1853, 1275, 22028, 29889, 13356, 1806, 29901, 30004, 13, 9651, 2309, 353, 5852, 30004, 13, 4706, 25342, 1741, 29889, 1853, 1275, 22028, 29889, 6720, 17171, 29933, 2692, 29911, 1164, 3970, 16048, 29901, 30004, 13, 9651, 926, 353, 22028, 29889, 15769, 29889, 657, 29918, 1066, 26471, 13, 9651, 784, 353, 926, 29961, 29900, 29962, 849, 313, 2227, 29990, 6670, 29918, 14226, 29974, 2227, 29990, 6670, 29918, 1529, 29934, 29954, 1177, 8443, 13, 9651, 1948, 353, 926, 29961, 29896, 29962, 849, 313, 2227, 29990, 6670, 29918, 14226, 29974, 2227, 29990, 6670, 29918, 1529, 29934, 29954, 1177, 8443, 13, 9651, 565, 1741, 29889, 3092, 1275, 29871, 29896, 29901, 30004, 13, 18884, 5697, 2429, 728, 29961, 798, 3816, 1054, 29962, 353, 29871, 29896, 30004, 13, 9651, 25342, 1741, 29889, 3092, 1275, 29871, 29941, 29901, 30004, 13, 18884, 5697, 2429, 728, 29961, 798, 3816, 1054, 29962, 353, 29871, 29900, 30004, 13, 9651, 1596, 703, 15769, 3808, 28165, 926, 29892, 16521, 1599, 313, 613, 1948, 29892, 613, 613, 784, 29892, 16521, 1159, 30004, 13, 4706, 25342, 1741, 29889, 1853, 1275, 22028, 29889, 10818, 3970, 16048, 29901, 30004, 13, 9651, 565, 1741, 29889, 1989, 1275, 22028, 29889, 29968, 29918, 5550, 11538, 29901, 30004, 13, 18884, 5697, 2429, 728, 353, 2767, 29918, 10963, 2429, 728, 29898, 10963, 2429, 728, 8443, 13, 9651, 25342, 1741, 29889, 1989, 1275, 22028, 29889, 29968, 29918, 29874, 29901, 30004, 13, 18884, 8478, 348, 353, 5852, 30004, 13, 9651, 25342, 1741, 29889, 1989, 1275, 22028, 29889, 29968, 29918, 29879, 29901, 30004, 13, 18884, 8478, 348, 353, 7700, 30004, 13, 1678, 6756, 13, 1678, 565, 8478, 348, 1275, 5852, 29901, 30004, 13, 4706, 5697, 2429, 728, 353, 2767, 29918, 10963, 2429, 728, 29898, 10963, 2429, 728, 8443, 13, 9651, 6756, 13, 1678, 396, 734, 1717, 5697, 29878, 783, 16113, 7553, 1364, 837, 30004, 13, 1678, 4315, 29889, 5589, 29898, 17687, 1307, 29911, 4330, 29961, 29929, 29962, 1723, 30004, 13, 1678, 363, 432, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29979, 1125, 30004, 13, 4706, 363, 474, 297, 3464, 29898, 14345, 1367, 29918, 14226, 29918, 29990, 1125, 30004, 13, 9651, 22028, 29889, 4012, 29889, 1621, 29898, 4315, 29892, 17687, 1307, 29911, 4330, 29961, 10963, 2429, 728, 29961, 29926, 3816, 29875, 20526, 30004, 13, 18884, 17288, 2227, 29990, 6670, 29918, 14226, 718, 349, 6415, 6670, 29918, 1529, 29934, 29954, 1177, 11877, 29875, 718, 349, 6415, 6670, 29918, 1529, 29934, 29954, 1177, 11167, 13, 462, 313, 2227, 29990, 6670, 29918, 14226, 718, 349, 6415, 6670, 29918, 1529, 29934, 29954, 1177, 11877, 29926, 718, 349, 6415, 6670, 29918, 1529, 29934, 29954, 1177, 11167, 13, 462, 349, 6415, 6670, 29918, 14226, 29892, 349, 6415, 6670, 29918, 14226, 29962, 1723, 30004, 13, 1678, 6756, 13, 1678, 12006, 29889, 24667, 29898, 29953, 29900, 8443, 13, 1678, 22028, 29889, 4990, 29889, 29888, 3466, 26471, 13, 30004, 13, 2272, 11802, 29889, 28358, 26471, 13, 2 ]
BioKlustering-Website/mlmodel/KMtests/websiteScripts.py
solislemuslab/mycovirus-website
1
170425
import pandas as pd from Bio import SeqIO from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.cluster import KMeans from sklearn.decomposition import PCA from sklearn.manifold import TSNE from sklearn.cluster import MeanShift from sklearn import preprocessing import matplotlib.pyplot as plt import matplotlib.patches as mpatches from mpl_toolkits.mplot3d import Axes3D import numpy as np def parseFasta(data): d = {fasta.id : str(fasta.seq) for fasta in SeqIO.parse(data, "fasta")} pd.DataFrame([d]) s = pd.Series(d, name='Sequence') s.index.name = 'ID' s.reset_index() return pd.DataFrame(s) def kmerXTable(s, a, b): tfid_vector = TfidfVectorizer(analyzer='char', ngram_range=(a,b)) s_hat = tfid_vector.fit_transform(s.Sequence) kmerNames = tfid_vector.get_feature_names() kmers = s_hat.toarray() return pd.DataFrame(kmers,columns=kmerNames, index = s.index) def kmeans(fasta, cNum, klength_min = 6, klength_max = 6, rNum = 50): inputData = parseFasta(fasta) # temp = virus01.append(inputData) # temp = temp.drop_duplicates(keep="last") inputData["Sequence"] = inputData["Sequence"].apply(lambda x: x.replace("-", "")) kmerXTableInput = kmerXTable(inputData, klength_min, klength_max) km = KMeans(random_state = rNum, n_clusters = cNum) km.fit(kmerXTableInput) y_hat = km.predict(kmerXTableInput) return y_hat, kmerXTableInput def kmeans_semiSupervised(fasta, y_hat, klength_min = 6, klength_max = 6, rNum = 50): inputData = parseFasta(fasta) inputData["Sequence"] = inputData["Sequence"].apply(lambda x: x.replace("-", "")) kmerXTableInput = kmerXTable(inputData, klength_min, klength_max) PCAembedding = PCA(n_components=10) NkmerXTableInput = preprocessing.normalize(kmerXTableInput) PCAembedding_low = PCAembedding.fit_transform(NkmerXTableInput) ms = MeanShift() ms.fit(PCAembedding_low) cluster_centers = ms.cluster_centers_ import warnings with warnings.catch_warnings(): warnings.simplefilter("ignore") kmms = KMeans(init = cluster_centers, n_clusters = len(cluster_centers)) kmms_labels = kmms.fit_predict(PCAembedding_low) # convert all clusters into two clusters kmerXTableInput["pLabels"] = kmms_labels kmerXTableInput["aLabels"] = y_hat newLabels_clusters_1 = kmerXTableInput[kmerXTableInput["aLabels"] == 1]["pLabels"].tolist() newLabels_clusters_0 = kmerXTableInput[kmerXTableInput["aLabels"] == 0]["pLabels"].tolist() newLabels = [] for label in kmms_labels: if (newLabels_clusters_1.count(label) > newLabels_clusters_0.count(label)): newLabels.append(1) else: newLabels.append(0) return newLabels, kmerXTableInput.drop(columns=["pLabels", "aLabels"]) def PCA2d(kTable, y_hat, filename): embedding = PCA(n_components= 2) nkTable = preprocessing.normalize(kTable) embedding.fit(nkTable) show = pd.DataFrame(embedding.transform(nkTable)) # show kmeans clustering show["labels"] = y_hat ax = show[show["labels"]==1].plot.scatter(x=0, y=1, style="o", color="red", s=2) show[show["labels"]==0].plot.scatter(x=0, y=1, style="o", color="blue", s=2, ax=ax) show[(show["labels"]!= 0) & (show["labels"]!= 1) ].plot.scatter(x=0, y=1, style="o", color="gray", s=2, ax=ax) red = mpatches.Patch(color='red', label='Label 1') blue = mpatches.Patch(color='blue', label='Label 0') grey = mpatches.Patch(color='grey', label='Label -1') plt.legend(handles=[red, blue, grey]) plt.title('PCA Visualization') plt.xlabel('First Principal Component') plt.ylabel('Second Principal Component') plt.savefig('nonNotebookFiles/' + filename + '.png', bbox_inches='tight') plt.close() def tSNE2d(kTable, y_hat, filename): tSNEembedding = TSNE(n_components= 2, random_state = 0) tSNEembedding_low = tSNEembedding.fit_transform(kTable) show = pd.DataFrame(tSNEembedding_low) # show kmeans clustering show["labels"] = y_hat ax = show[show["labels"]==1].plot.scatter(x=0, y=1, style="o", color="red", s=2) show[show["labels"]==0].plot.scatter(x=0, y=1, style="o", color="blue", s=2, ax=ax) show[(show["labels"]!= 0) & (show["labels"]!= 1) ].plot.scatter(x=0, y=1, style="o", color="gray", s=2, ax=ax) red = mpatches.Patch(color='red', label='Label 1') blue = mpatches.Patch(color='blue', label='Label 0') grey = mpatches.Patch(color='grey', label='Label -1') plt.legend(handles=[red, blue, grey]) plt.title('tSNE Visualization\n') plt.xlabel('First Component') plt.ylabel('Second Component') plt.savefig('nonNotebookFiles/' + filename + '.png', bbox_inches='tight') plt.close()
[ 1, 1053, 11701, 408, 10518, 13, 3166, 21184, 1053, 25981, 5971, 13, 3166, 2071, 19668, 29889, 14394, 29918, 1062, 13857, 29889, 726, 1053, 323, 29888, 333, 29888, 12877, 3950, 13, 3166, 2071, 19668, 29889, 19594, 1053, 476, 6816, 550, 13, 3166, 2071, 19668, 29889, 311, 510, 3283, 1053, 349, 5454, 13, 3166, 2071, 19668, 29889, 1171, 361, 1025, 1053, 323, 29903, 8186, 13, 3166, 2071, 19668, 29889, 19594, 1053, 16316, 29657, 13, 3166, 2071, 19668, 1053, 758, 19170, 29871, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 22889, 29889, 5041, 267, 408, 286, 5041, 267, 13, 3166, 286, 572, 29918, 10154, 29895, 1169, 29889, 29885, 5317, 29941, 29881, 1053, 319, 9100, 29941, 29928, 13, 5215, 12655, 408, 7442, 13, 13, 1753, 6088, 29943, 5427, 29898, 1272, 1125, 13, 1678, 270, 353, 426, 29888, 5427, 29889, 333, 584, 851, 29898, 29888, 5427, 29889, 11762, 29897, 363, 5172, 29874, 297, 25981, 5971, 29889, 5510, 29898, 1272, 29892, 376, 29888, 5427, 1159, 29913, 13, 1678, 10518, 29889, 17271, 4197, 29881, 2314, 13, 13, 1678, 269, 353, 10518, 29889, 19204, 29898, 29881, 29892, 1024, 2433, 20529, 1495, 13, 1678, 269, 29889, 2248, 29889, 978, 353, 525, 1367, 29915, 13, 1678, 269, 29889, 12071, 29918, 2248, 580, 13, 1678, 736, 10518, 29889, 17271, 29898, 29879, 29897, 13, 13, 1753, 413, 1050, 29990, 3562, 29898, 29879, 29892, 263, 29892, 289, 1125, 13, 1678, 15886, 333, 29918, 8111, 353, 323, 29888, 333, 29888, 12877, 3950, 29898, 24209, 3298, 2433, 3090, 742, 302, 1393, 29918, 3881, 7607, 29874, 29892, 29890, 876, 13, 1678, 269, 29918, 2455, 353, 15886, 333, 29918, 8111, 29889, 9202, 29918, 9067, 29898, 29879, 29889, 20529, 29897, 13, 1678, 413, 1050, 8659, 353, 15886, 333, 29918, 8111, 29889, 657, 29918, 14394, 29918, 7039, 580, 13, 1678, 2383, 414, 353, 269, 29918, 2455, 29889, 517, 2378, 580, 13, 1678, 736, 10518, 29889, 17271, 29898, 8848, 414, 29892, 13099, 29922, 29895, 1050, 8659, 29892, 2380, 353, 269, 29889, 2248, 29897, 13, 268, 13, 1753, 413, 1004, 550, 29898, 29888, 5427, 29892, 274, 8009, 29892, 413, 2848, 29918, 1195, 353, 29871, 29953, 29892, 413, 2848, 29918, 3317, 353, 29871, 29953, 29892, 364, 8009, 353, 29871, 29945, 29900, 1125, 13, 1678, 1881, 1469, 353, 6088, 29943, 5427, 29898, 29888, 5427, 29897, 13, 29937, 268, 5694, 353, 24424, 29900, 29896, 29889, 4397, 29898, 2080, 1469, 29897, 13, 29937, 268, 5694, 353, 5694, 29889, 8865, 29918, 20908, 15815, 29898, 17462, 543, 4230, 1159, 13, 308, 13, 1678, 1881, 1469, 3366, 20529, 3108, 353, 1881, 1469, 3366, 20529, 16862, 7302, 29898, 2892, 921, 29901, 921, 29889, 6506, 703, 29899, 613, 5124, 876, 13, 1678, 413, 1050, 29990, 3562, 4290, 353, 413, 1050, 29990, 3562, 29898, 2080, 1469, 29892, 413, 2848, 29918, 1195, 29892, 413, 2848, 29918, 3317, 29897, 13, 308, 13, 308, 13, 1678, 2383, 353, 476, 6816, 550, 29898, 8172, 29918, 3859, 353, 364, 8009, 29892, 302, 29918, 695, 504, 414, 353, 274, 8009, 29897, 13, 1678, 2383, 29889, 9202, 29898, 29895, 1050, 29990, 3562, 4290, 29897, 29871, 13, 1678, 343, 29918, 2455, 353, 2383, 29889, 27711, 29898, 29895, 1050, 29990, 3562, 4290, 29897, 13, 308, 13, 1678, 736, 343, 29918, 2455, 29892, 413, 1050, 29990, 3562, 4290, 13, 308, 13, 1753, 413, 1004, 550, 29918, 12846, 29875, 19111, 11292, 29898, 29888, 5427, 29892, 343, 29918, 2455, 29892, 413, 2848, 29918, 1195, 353, 29871, 29953, 29892, 413, 2848, 29918, 3317, 353, 29871, 29953, 29892, 364, 8009, 353, 29871, 29945, 29900, 1125, 13, 1678, 1881, 1469, 353, 6088, 29943, 5427, 29898, 29888, 5427, 29897, 13, 1678, 1881, 1469, 3366, 20529, 3108, 353, 1881, 1469, 3366, 20529, 16862, 7302, 29898, 2892, 921, 29901, 921, 29889, 6506, 703, 29899, 613, 5124, 876, 13, 1678, 413, 1050, 29990, 3562, 4290, 353, 413, 1050, 29990, 3562, 29898, 2080, 1469, 29892, 413, 2848, 29918, 1195, 29892, 413, 2848, 29918, 3317, 29897, 13, 268, 13, 1678, 349, 5454, 17987, 8497, 353, 349, 5454, 29898, 29876, 29918, 14036, 29922, 29896, 29900, 29897, 13, 1678, 405, 29895, 1050, 29990, 3562, 4290, 353, 758, 19170, 29889, 8945, 675, 29898, 29895, 1050, 29990, 3562, 4290, 29897, 13, 1678, 349, 5454, 17987, 8497, 29918, 677, 353, 349, 5454, 17987, 8497, 29889, 9202, 29918, 9067, 29898, 29940, 29895, 1050, 29990, 3562, 4290, 29897, 13, 268, 13, 1678, 10887, 353, 16316, 29657, 580, 13, 1678, 10887, 29889, 9202, 29898, 29925, 5454, 17987, 8497, 29918, 677, 29897, 13, 1678, 9867, 29918, 1760, 414, 353, 10887, 29889, 19594, 29918, 1760, 414, 29918, 13, 13, 1678, 1053, 18116, 13, 1678, 411, 18116, 29889, 12510, 29918, 25442, 886, 7295, 13, 4706, 18116, 29889, 12857, 4572, 703, 17281, 1159, 13, 4706, 2383, 1516, 353, 476, 6816, 550, 29898, 2344, 353, 9867, 29918, 1760, 414, 29892, 302, 29918, 695, 504, 414, 353, 7431, 29898, 19594, 29918, 1760, 414, 876, 13, 4706, 2383, 1516, 29918, 21134, 353, 2383, 1516, 29889, 9202, 29918, 27711, 29898, 29925, 5454, 17987, 8497, 29918, 677, 29897, 13, 13, 1678, 396, 3588, 599, 24554, 964, 1023, 24554, 13, 1678, 413, 1050, 29990, 3562, 4290, 3366, 29886, 4775, 29879, 3108, 353, 2383, 1516, 29918, 21134, 13, 1678, 413, 1050, 29990, 3562, 4290, 3366, 29874, 4775, 29879, 3108, 353, 343, 29918, 2455, 13, 1678, 716, 4775, 29879, 29918, 695, 504, 414, 29918, 29896, 353, 413, 1050, 29990, 3562, 4290, 29961, 29895, 1050, 29990, 3562, 4290, 3366, 29874, 4775, 29879, 3108, 1275, 29871, 29896, 29962, 3366, 29886, 4775, 29879, 16862, 25027, 391, 580, 13, 1678, 716, 4775, 29879, 29918, 695, 504, 414, 29918, 29900, 353, 413, 1050, 29990, 3562, 4290, 29961, 29895, 1050, 29990, 3562, 4290, 3366, 29874, 4775, 29879, 3108, 1275, 29871, 29900, 29962, 3366, 29886, 4775, 29879, 16862, 25027, 391, 580, 13, 1678, 716, 4775, 29879, 353, 5159, 13, 13, 1678, 363, 3858, 297, 2383, 1516, 29918, 21134, 29901, 13, 4706, 565, 313, 1482, 4775, 29879, 29918, 695, 504, 414, 29918, 29896, 29889, 2798, 29898, 1643, 29897, 1405, 716, 4775, 29879, 29918, 695, 504, 414, 29918, 29900, 29889, 2798, 29898, 1643, 22164, 13, 9651, 716, 4775, 29879, 29889, 4397, 29898, 29896, 29897, 13, 4706, 1683, 29901, 13, 9651, 716, 4775, 29879, 29889, 4397, 29898, 29900, 29897, 13, 632, 13, 1678, 736, 716, 4775, 29879, 29892, 413, 1050, 29990, 3562, 4290, 29889, 8865, 29898, 13099, 29922, 3366, 29886, 4775, 29879, 613, 376, 29874, 4775, 29879, 20068, 13, 268, 13, 1753, 349, 5454, 29906, 29881, 29898, 29895, 3562, 29892, 343, 29918, 2455, 29892, 10422, 1125, 13, 1678, 23655, 353, 349, 5454, 29898, 29876, 29918, 14036, 29922, 29871, 29906, 29897, 13, 1678, 302, 29895, 3562, 353, 758, 19170, 29889, 8945, 675, 29898, 29895, 3562, 29897, 13, 1678, 23655, 29889, 9202, 29898, 29876, 29895, 3562, 29897, 13, 1678, 1510, 353, 10518, 29889, 17271, 29898, 17987, 8497, 29889, 9067, 29898, 29876, 29895, 3562, 876, 13, 1678, 396, 1510, 413, 1004, 550, 16993, 3241, 13, 1678, 1510, 3366, 21134, 3108, 353, 343, 29918, 2455, 13, 1678, 4853, 353, 1510, 29961, 4294, 3366, 21134, 3108, 1360, 29896, 1822, 5317, 29889, 1557, 2620, 29898, 29916, 29922, 29900, 29892, 343, 29922, 29896, 29892, 3114, 543, 29877, 613, 2927, 543, 1127, 613, 269, 29922, 29906, 29897, 13, 1678, 1510, 29961, 4294, 3366, 21134, 3108, 1360, 29900, 1822, 5317, 29889, 1557, 2620, 29898, 29916, 29922, 29900, 29892, 343, 29922, 29896, 29892, 3114, 543, 29877, 613, 2927, 543, 9539, 613, 269, 29922, 29906, 29892, 4853, 29922, 1165, 29897, 13, 1678, 1510, 15625, 4294, 3366, 21134, 3108, 19216, 29871, 29900, 29897, 669, 313, 4294, 3366, 21134, 3108, 19216, 29871, 29896, 29897, 29871, 1822, 5317, 29889, 1557, 2620, 29898, 29916, 29922, 29900, 29892, 343, 29922, 29896, 29892, 3114, 543, 29877, 613, 2927, 543, 21012, 613, 269, 29922, 29906, 29892, 4853, 29922, 1165, 29897, 13, 1678, 2654, 353, 286, 5041, 267, 29889, 29925, 905, 29898, 2780, 2433, 1127, 742, 3858, 2433, 4775, 29871, 29896, 1495, 13, 1678, 7254, 353, 286, 5041, 267, 29889, 29925, 905, 29898, 2780, 2433, 9539, 742, 3858, 2433, 4775, 29871, 29900, 1495, 13, 1678, 18345, 353, 286, 5041, 267, 29889, 29925, 905, 29898, 2780, 2433, 7979, 29891, 742, 3858, 2433, 4775, 448, 29896, 1495, 13, 1678, 14770, 29889, 26172, 29898, 3179, 793, 11759, 1127, 29892, 7254, 29892, 18345, 2314, 13, 1678, 14770, 29889, 3257, 877, 29925, 5454, 9249, 2133, 1495, 13, 1678, 14770, 29889, 29916, 1643, 877, 6730, 14771, 7830, 15924, 1495, 13, 1678, 14770, 29889, 29891, 1643, 877, 11863, 14771, 7830, 15924, 1495, 13, 1678, 14770, 29889, 7620, 1003, 877, 5464, 3664, 19273, 10547, 22208, 718, 10422, 718, 15300, 2732, 742, 289, 1884, 29918, 262, 6609, 2433, 29873, 523, 1495, 13, 1678, 14770, 29889, 5358, 580, 13, 632, 13, 1753, 260, 29903, 8186, 29906, 29881, 29898, 29895, 3562, 29892, 343, 29918, 2455, 29892, 10422, 1125, 13, 1678, 260, 29903, 8186, 17987, 8497, 353, 323, 29903, 8186, 29898, 29876, 29918, 14036, 29922, 29871, 29906, 29892, 4036, 29918, 3859, 353, 29871, 29900, 29897, 13, 1678, 260, 29903, 8186, 17987, 8497, 29918, 677, 353, 260, 29903, 8186, 17987, 8497, 29889, 9202, 29918, 9067, 29898, 29895, 3562, 29897, 13, 1678, 1510, 353, 10518, 29889, 17271, 29898, 29873, 29903, 8186, 17987, 8497, 29918, 677, 29897, 13, 1678, 396, 1510, 413, 1004, 550, 16993, 3241, 13, 1678, 1510, 3366, 21134, 3108, 353, 343, 29918, 2455, 13, 1678, 4853, 353, 1510, 29961, 4294, 3366, 21134, 3108, 1360, 29896, 1822, 5317, 29889, 1557, 2620, 29898, 29916, 29922, 29900, 29892, 343, 29922, 29896, 29892, 3114, 543, 29877, 613, 2927, 543, 1127, 613, 269, 29922, 29906, 29897, 13, 1678, 1510, 29961, 4294, 3366, 21134, 3108, 1360, 29900, 1822, 5317, 29889, 1557, 2620, 29898, 29916, 29922, 29900, 29892, 343, 29922, 29896, 29892, 3114, 543, 29877, 613, 2927, 543, 9539, 613, 269, 29922, 29906, 29892, 4853, 29922, 1165, 29897, 13, 1678, 1510, 15625, 4294, 3366, 21134, 3108, 19216, 29871, 29900, 29897, 669, 313, 4294, 3366, 21134, 3108, 19216, 29871, 29896, 29897, 29871, 1822, 5317, 29889, 1557, 2620, 29898, 29916, 29922, 29900, 29892, 343, 29922, 29896, 29892, 3114, 543, 29877, 613, 2927, 543, 21012, 613, 269, 29922, 29906, 29892, 4853, 29922, 1165, 29897, 13, 1678, 2654, 353, 286, 5041, 267, 29889, 29925, 905, 29898, 2780, 2433, 1127, 742, 3858, 2433, 4775, 29871, 29896, 1495, 13, 1678, 7254, 353, 286, 5041, 267, 29889, 29925, 905, 29898, 2780, 2433, 9539, 742, 3858, 2433, 4775, 29871, 29900, 1495, 13, 1678, 18345, 353, 286, 5041, 267, 29889, 29925, 905, 29898, 2780, 2433, 7979, 29891, 742, 3858, 2433, 4775, 448, 29896, 1495, 13, 1678, 14770, 29889, 26172, 29898, 3179, 793, 11759, 1127, 29892, 7254, 29892, 18345, 2314, 13, 1678, 14770, 29889, 3257, 877, 29873, 29903, 8186, 9249, 2133, 29905, 29876, 1495, 13, 1678, 14770, 29889, 29916, 1643, 877, 6730, 15924, 1495, 13, 1678, 14770, 29889, 29891, 1643, 877, 11863, 15924, 1495, 13, 1678, 14770, 29889, 7620, 1003, 877, 5464, 3664, 19273, 10547, 22208, 718, 10422, 718, 15300, 2732, 742, 289, 1884, 29918, 262, 6609, 2433, 29873, 523, 1495, 13, 1678, 14770, 29889, 5358, 580, 2 ]
data/geometry.py
hash451722/FlowPredictionWithDeepNeuralNetwork
0
70839
<gh_stars>0 import pathlib import numpy as np import matplotlib.pyplot as plt class AirfoilStl(): def __init__(self, case_path) -> None: self.case_path = case_path self.database_path = None self.airfoil_list = None self.init_path_list() def init_path_list(self) -> None: dir_path = pathlib.Path(__file__).parent self.database_path = dir_path.joinpath("airfoil_database") self.airfoil_list = list(self.database_path.glob("*.dat")) def create_airfoil_stl(self, airfoil_name="random"): p = self.select_airfoil(airfoil_name) dat = self.format_dat(p) s = create_stl_solid(dat, "airfoil") stl_file_path = self.case_path.joinpath("constant", "geometry", "airfoil.stl") stl_file_path.write_text(s) return p.stem def select_airfoil(self, airfoil_name="random"): ''' ファイルの絶対パスを返す ''' if airfoil_name == "random": i = np.random.randint(0, len(self.airfoil_list)) return self.airfoil_list[i] else: al = list( map(lambda x: x.stem, self.airfoil_list) ) if airfoil_name in al: k = al.index(airfoil_name) return self.airfoil_list[k] else: raise RuntimeError('[{}] does not exist.'.format(airfoil_name)) def format_dat(self, airfoil_path): airfoil_dat = np.loadtxt(airfoil_path, skiprows=1) # <class 'numpy.ndarray'> # 閉じた形状にする clearance = np.sqrt( np.sum( np.square(airfoil_dat[0]-airfoil_dat[-1]) ) ) if clearance > 1e-6: airfoil_dat = np.vstack([ airfoil_dat, airfoil_dat[0]] ) return airfoil_dat def draw_airfoil(self, airfoil_name="random"): path = self.select_airfoil(airfoil_name) dat = self.format_dat(path) fig, ax = plt.subplots() ax.plot(dat[:, 0], dat[:,1]) ax.grid() ax.axis('equal') ax.set_title(path.stem, fontsize=10) plt.show() def create_stl_solid(dat, solid_name="walls") -> str: ''' 2次元座標からSTLの文字列を作成 ''' if dat.shape[1] != 2: return False z = 1 s = "solid {}\n".format(solid_name) for i in range(dat.shape[0]-1): v0 = np.hstack( (dat[i], 0) ) v1 = np.hstack( (dat[i+1], 0) ) v2 = np.hstack( (dat[i], z) ) s += facet( v0, v1, v2) v0 = np.hstack( (dat[i], z) ) v1 = np.hstack( (dat[i+1], z) ) v2 = np.hstack( (dat[i+1], 0) ) s += facet( v0, v1, v2) s += "endsolid {}".format(solid_name) return s def facet(v0, v1, v2) -> str: nx, ny, nz = normal_vector(v0, v1, v2) s0 = "facet normal {} {} {}\n".format(nx, ny, nz) s1 = " outer loop\n" s2 = " vertex {} {} {}\n".format(v0[0], v0[1], v0[2]) s3 = " vertex {} {} {}\n".format(v1[0], v1[1], v1[2]) s4 = " vertex {} {} {}\n".format(v2[0], v2[1], v2[2]) s5 = " endloop\n" s6 = "endfacet\n" return s0 + s1 +s2 + s3 +s4 + s5 + s6 def normal_vector(v0, v1, v2): ''' 法線ベクトル ''' vec01 = v1 - v0 vec02 = v2 - v0 x = vec01[1]*vec02[2] - vec01[2]*vec02[1] y = vec01[2]*vec02[0] - vec01[0]*vec02[2] z = vec01[0]*vec02[1] - vec01[1]*vec02[0] return x, y, z if __name__ == '__main__': stl = AirfoilStl(None) print( len(stl.airfoil_list) ) fig, ax = plt.subplots() for airfoil_path in stl.airfoil_list: dat = stl.format_dat(airfoil_path) ax.plot(dat[:, 0], dat[:,1]) ax.grid() ax.axis('equal') # ax.set_title(path.stem, fontsize=10) plt.show() # stl.draw_airfoil()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2224, 1982, 30004, 13, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 30004, 13, 30004, 13, 30004, 13, 1990, 5593, 1181, 309, 855, 29880, 7295, 30004, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1206, 29918, 2084, 29897, 1599, 6213, 29901, 30004, 13, 4706, 1583, 29889, 4878, 29918, 2084, 353, 1206, 29918, 2084, 30004, 13, 4706, 1583, 29889, 9803, 29918, 2084, 353, 6213, 30004, 13, 4706, 1583, 29889, 1466, 1181, 309, 29918, 1761, 353, 6213, 30004, 13, 4706, 1583, 29889, 2344, 29918, 2084, 29918, 1761, 26471, 13, 30004, 13, 1678, 822, 2069, 29918, 2084, 29918, 1761, 29898, 1311, 29897, 1599, 6213, 29901, 30004, 13, 4706, 4516, 29918, 2084, 353, 2224, 1982, 29889, 2605, 22168, 1445, 1649, 467, 3560, 30004, 13, 4706, 1583, 29889, 9803, 29918, 2084, 353, 4516, 29918, 2084, 29889, 7122, 2084, 703, 1466, 1181, 309, 29918, 9803, 1159, 30004, 13, 4706, 1583, 29889, 1466, 1181, 309, 29918, 1761, 353, 1051, 29898, 1311, 29889, 9803, 29918, 2084, 29889, 23705, 703, 10521, 4130, 5783, 30004, 13, 30004, 13, 30004, 13, 1678, 822, 1653, 29918, 1466, 1181, 309, 29918, 303, 29880, 29898, 1311, 29892, 4799, 1181, 309, 29918, 978, 543, 8172, 29908, 1125, 30004, 13, 4706, 282, 353, 1583, 29889, 2622, 29918, 1466, 1181, 309, 29898, 1466, 1181, 309, 29918, 978, 8443, 13, 4706, 1418, 353, 1583, 29889, 4830, 29918, 4130, 29898, 29886, 8443, 13, 4706, 269, 353, 1653, 29918, 303, 29880, 29918, 2929, 333, 29898, 4130, 29892, 376, 1466, 1181, 309, 1159, 30004, 13, 30004, 13, 4706, 380, 29880, 29918, 1445, 29918, 2084, 353, 1583, 29889, 4878, 29918, 2084, 29889, 7122, 2084, 703, 23362, 613, 376, 19156, 613, 376, 1466, 1181, 309, 29889, 303, 29880, 1159, 30004, 13, 4706, 380, 29880, 29918, 1445, 29918, 2084, 29889, 3539, 29918, 726, 29898, 29879, 8443, 13, 30004, 13, 4706, 736, 282, 29889, 303, 331, 30004, 13, 30004, 13, 30004, 13, 1678, 822, 1831, 29918, 1466, 1181, 309, 29898, 1311, 29892, 4799, 1181, 309, 29918, 978, 543, 8172, 29908, 1125, 30004, 13, 4706, 14550, 29871, 30423, 30897, 30260, 30258, 30199, 234, 184, 185, 232, 178, 193, 30715, 30255, 30396, 31086, 30427, 14550, 30004, 13, 4706, 565, 4799, 1181, 309, 29918, 978, 1275, 376, 8172, 1115, 30004, 13, 9651, 474, 353, 7442, 29889, 8172, 29889, 9502, 524, 29898, 29900, 29892, 7431, 29898, 1311, 29889, 1466, 1181, 309, 29918, 1761, 876, 30004, 13, 9651, 736, 1583, 29889, 1466, 1181, 309, 29918, 1761, 29961, 29875, 29962, 30004, 13, 4706, 1683, 29901, 30004, 13, 9651, 394, 353, 1051, 29898, 2910, 29898, 2892, 921, 29901, 921, 29889, 303, 331, 29892, 1583, 29889, 1466, 1181, 309, 29918, 1761, 29897, 1723, 30004, 13, 9651, 565, 4799, 1181, 309, 29918, 978, 297, 394, 29901, 30004, 13, 18884, 413, 353, 394, 29889, 2248, 29898, 1466, 1181, 309, 29918, 978, 8443, 13, 18884, 736, 1583, 29889, 1466, 1181, 309, 29918, 1761, 29961, 29895, 29962, 30004, 13, 9651, 1683, 29901, 30004, 13, 18884, 12020, 24875, 2392, 877, 19660, 6525, 947, 451, 1863, 29889, 4286, 4830, 29898, 1466, 1181, 309, 29918, 978, 876, 30004, 13, 18884, 6756, 13, 30004, 13, 4706, 6756, 13, 1678, 822, 3402, 29918, 4130, 29898, 1311, 29892, 4799, 1181, 309, 29918, 2084, 1125, 30004, 13, 4706, 4799, 1181, 309, 29918, 4130, 353, 7442, 29889, 1359, 3945, 29898, 1466, 1181, 309, 29918, 2084, 29892, 14383, 5727, 29922, 29896, 29897, 29871, 396, 529, 1990, 525, 23749, 29889, 299, 2378, 29915, 3238, 13, 30004, 13, 4706, 396, 29871, 236, 153, 140, 31115, 30366, 31305, 31531, 30353, 30427, 30332, 30004, 13, 4706, 2821, 749, 353, 7442, 29889, 3676, 29898, 7442, 29889, 2083, 29898, 7442, 29889, 17619, 29898, 1466, 1181, 309, 29918, 4130, 29961, 29900, 29962, 29899, 1466, 1181, 309, 29918, 4130, 14352, 29896, 2314, 1723, 1723, 30004, 13, 4706, 565, 2821, 749, 1405, 29871, 29896, 29872, 29899, 29953, 29901, 30004, 13, 9651, 4799, 1181, 309, 29918, 4130, 353, 7442, 29889, 29894, 1429, 4197, 4799, 1181, 309, 29918, 4130, 29892, 4799, 1181, 309, 29918, 4130, 29961, 29900, 5262, 1723, 30004, 13, 30004, 13, 4706, 736, 4799, 1181, 309, 29918, 4130, 30004, 13, 1678, 6756, 13, 30004, 13, 1678, 822, 4216, 29918, 1466, 1181, 309, 29898, 1311, 29892, 4799, 1181, 309, 29918, 978, 543, 8172, 29908, 1125, 30004, 13, 4706, 2224, 353, 1583, 29889, 2622, 29918, 1466, 1181, 309, 29898, 1466, 1181, 309, 29918, 978, 8443, 13, 4706, 1418, 353, 1583, 29889, 4830, 29918, 4130, 29898, 2084, 8443, 13, 30004, 13, 4706, 2537, 29892, 4853, 353, 14770, 29889, 1491, 26762, 26471, 13, 4706, 4853, 29889, 5317, 29898, 4130, 7503, 29892, 29871, 29900, 1402, 1418, 7503, 29892, 29896, 2314, 30004, 13, 4706, 4853, 29889, 7720, 26471, 13, 4706, 4853, 29889, 8990, 877, 11745, 1495, 30004, 13, 4706, 4853, 29889, 842, 29918, 3257, 29898, 2084, 29889, 303, 331, 29892, 4079, 2311, 29922, 29896, 29900, 8443, 13, 4706, 14770, 29889, 4294, 26471, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 1753, 1653, 29918, 303, 29880, 29918, 2929, 333, 29898, 4130, 29892, 7773, 29918, 978, 543, 29893, 4293, 1159, 1599, 851, 29901, 30004, 13, 1678, 14550, 29871, 29906, 30936, 30824, 31780, 233, 171, 156, 30412, 30513, 1254, 29931, 30199, 30333, 30578, 31025, 30396, 30732, 30494, 14550, 30004, 13, 1678, 565, 1418, 29889, 12181, 29961, 29896, 29962, 29871, 2804, 29871, 29906, 29901, 30004, 13, 4706, 736, 7700, 30004, 13, 30004, 13, 1678, 503, 353, 29871, 29896, 30004, 13, 1678, 269, 353, 376, 2929, 333, 426, 1012, 29876, 1642, 4830, 29898, 2929, 333, 29918, 978, 8443, 13, 1678, 363, 474, 297, 3464, 29898, 4130, 29889, 12181, 29961, 29900, 29962, 29899, 29896, 1125, 30004, 13, 4706, 325, 29900, 353, 7442, 29889, 29882, 1429, 29898, 313, 4130, 29961, 29875, 1402, 1678, 29900, 29897, 1723, 30004, 13, 4706, 325, 29896, 353, 7442, 29889, 29882, 1429, 29898, 313, 4130, 29961, 29875, 29974, 29896, 1402, 29871, 29900, 29897, 1723, 30004, 13, 4706, 325, 29906, 353, 7442, 29889, 29882, 1429, 29898, 313, 4130, 29961, 29875, 1402, 259, 503, 29897, 1723, 30004, 13, 4706, 269, 4619, 4024, 300, 29898, 325, 29900, 29892, 325, 29896, 29892, 325, 29906, 8443, 13, 30004, 13, 4706, 325, 29900, 353, 7442, 29889, 29882, 1429, 29898, 313, 4130, 29961, 29875, 1402, 259, 503, 29897, 1723, 30004, 13, 4706, 325, 29896, 353, 7442, 29889, 29882, 1429, 29898, 313, 4130, 29961, 29875, 29974, 29896, 1402, 503, 29897, 1723, 30004, 13, 4706, 325, 29906, 353, 7442, 29889, 29882, 1429, 29898, 313, 4130, 29961, 29875, 29974, 29896, 1402, 29871, 29900, 29897, 1723, 30004, 13, 4706, 269, 4619, 4024, 300, 29898, 325, 29900, 29892, 325, 29896, 29892, 325, 29906, 8443, 13, 30004, 13, 1678, 269, 4619, 376, 1975, 17211, 6571, 1642, 4830, 29898, 2929, 333, 29918, 978, 8443, 13, 1678, 736, 269, 30004, 13, 30004, 13, 30004, 13, 1753, 4024, 300, 29898, 29894, 29900, 29892, 325, 29896, 29892, 325, 29906, 29897, 1599, 851, 29901, 30004, 13, 30004, 13, 1678, 302, 29916, 29892, 7098, 29892, 302, 29920, 353, 4226, 29918, 8111, 29898, 29894, 29900, 29892, 325, 29896, 29892, 325, 29906, 8443, 13, 1678, 269, 29900, 353, 376, 17470, 300, 4226, 6571, 6571, 426, 1012, 29876, 1642, 4830, 29898, 23818, 29892, 7098, 29892, 302, 29920, 29897, 1678, 6756, 13, 1678, 269, 29896, 353, 376, 29871, 11420, 2425, 29905, 29876, 19451, 13, 1678, 269, 29906, 353, 376, 1678, 12688, 6571, 6571, 426, 1012, 29876, 1642, 4830, 29898, 29894, 29900, 29961, 29900, 1402, 325, 29900, 29961, 29896, 1402, 325, 29900, 29961, 29906, 2314, 30004, 13, 1678, 269, 29941, 353, 376, 1678, 12688, 6571, 6571, 426, 1012, 29876, 1642, 4830, 29898, 29894, 29896, 29961, 29900, 1402, 325, 29896, 29961, 29896, 1402, 325, 29896, 29961, 29906, 2314, 30004, 13, 1678, 269, 29946, 353, 376, 1678, 12688, 6571, 6571, 426, 1012, 29876, 1642, 4830, 29898, 29894, 29906, 29961, 29900, 1402, 325, 29906, 29961, 29896, 1402, 325, 29906, 29961, 29906, 2314, 30004, 13, 1678, 269, 29945, 353, 376, 29871, 1095, 7888, 29905, 29876, 19451, 13, 1678, 269, 29953, 353, 376, 355, 17470, 300, 29905, 29876, 19451, 13, 1678, 736, 269, 29900, 718, 269, 29896, 718, 29879, 29906, 718, 269, 29941, 718, 29879, 29946, 718, 269, 29945, 718, 269, 29953, 30004, 13, 30004, 13, 30004, 13, 1753, 4226, 29918, 8111, 29898, 29894, 29900, 29892, 325, 29896, 29892, 325, 29906, 1125, 30004, 13, 1678, 14550, 29871, 30545, 31357, 31061, 30305, 30279, 30258, 14550, 30004, 13, 1678, 9649, 29900, 29896, 353, 325, 29896, 448, 325, 29900, 30004, 13, 1678, 9649, 29900, 29906, 353, 325, 29906, 448, 325, 29900, 30004, 13, 1678, 921, 353, 9649, 29900, 29896, 29961, 29896, 14178, 2003, 29900, 29906, 29961, 29906, 29962, 448, 9649, 29900, 29896, 29961, 29906, 14178, 2003, 29900, 29906, 29961, 29896, 29962, 30004, 13, 1678, 343, 353, 9649, 29900, 29896, 29961, 29906, 14178, 2003, 29900, 29906, 29961, 29900, 29962, 448, 9649, 29900, 29896, 29961, 29900, 14178, 2003, 29900, 29906, 29961, 29906, 29962, 30004, 13, 1678, 503, 353, 9649, 29900, 29896, 29961, 29900, 14178, 2003, 29900, 29906, 29961, 29896, 29962, 448, 9649, 29900, 29896, 29961, 29896, 14178, 2003, 29900, 29906, 29961, 29900, 29962, 30004, 13, 1678, 736, 921, 29892, 343, 29892, 503, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 30004, 13, 1678, 380, 29880, 353, 5593, 1181, 309, 855, 29880, 29898, 8516, 8443, 13, 30004, 13, 1678, 1596, 29898, 7431, 29898, 303, 29880, 29889, 1466, 1181, 309, 29918, 1761, 29897, 1723, 30004, 13, 30004, 13, 1678, 2537, 29892, 4853, 353, 14770, 29889, 1491, 26762, 26471, 13, 1678, 363, 4799, 1181, 309, 29918, 2084, 297, 380, 29880, 29889, 1466, 1181, 309, 29918, 1761, 29901, 30004, 13, 30004, 13, 4706, 1418, 353, 380, 29880, 29889, 4830, 29918, 4130, 29898, 1466, 1181, 309, 29918, 2084, 8443, 13, 30004, 13, 4706, 4853, 29889, 5317, 29898, 4130, 7503, 29892, 29871, 29900, 1402, 1418, 7503, 29892, 29896, 2314, 30004, 13, 4706, 4853, 29889, 7720, 26471, 13, 4706, 4853, 29889, 8990, 877, 11745, 1495, 30004, 13, 4706, 396, 4853, 29889, 842, 29918, 3257, 29898, 2084, 29889, 303, 331, 29892, 4079, 2311, 29922, 29896, 29900, 8443, 13, 1678, 14770, 29889, 4294, 26471, 13, 30004, 13, 1678, 396, 380, 29880, 29889, 4012, 29918, 1466, 1181, 309, 26471, 13, 2 ]
management/commands/imageload.py
NikDark/ManagementCommands
0
50047
import os import re import shutil from django.core.management.base import BaseCommand, CommandError from wagtail.images.models import Image class Command(BaseCommand): help = 'Add Image from folder that you indicate' IMAGE_FORMAT = ( 'jpg', 'jpeg', 'webp', 'png', 'gif', ) def add_arguments(self,parser): parser.add_argument( '-f', '--folder', nargs=1, required=True, help='Path to the folder with different images', ) def handle(self, *args, **options): path_folder = options['folder'][0] if not os.path.exists(r'media'): os.mkdir(r'media') if os.path.exists(path_folder) and os.path.isdir(path_folder): files_dir = os.listdir(path_folder) images = [] image_names = [] for file in files_dir: try: format = re.search(r'\.(.*)$', file).group(1) except: continue if format in self.IMAGE_FORMAT: images.append(path_folder+'/'+file) image_names.append(file) for image in images: shutil.copy2(image,r'media') for name in image_names: self.stdout.write(name + ' --- ' + self.style.SUCCESS('OK')) Image.objects.create(file=name,title=name.split('.')[0]) else: self.stdout.write(self.style.ERROR('Not dir or not exists'))
[ 1, 1053, 2897, 13, 5215, 337, 13, 5215, 528, 4422, 13, 13, 3166, 9557, 29889, 3221, 29889, 21895, 29889, 3188, 1053, 7399, 6255, 29892, 10516, 2392, 13, 3166, 281, 351, 18237, 29889, 8346, 29889, 9794, 1053, 7084, 13, 13, 13, 1990, 10516, 29898, 5160, 6255, 1125, 13, 1678, 1371, 353, 525, 2528, 7084, 515, 4138, 393, 366, 12266, 29915, 13, 13, 1678, 306, 1529, 1692, 29918, 19094, 1299, 353, 313, 13, 4706, 525, 6173, 742, 13, 4706, 525, 26568, 742, 13, 4706, 525, 2676, 29886, 742, 13, 4706, 525, 2732, 742, 13, 4706, 525, 18660, 742, 13, 1678, 1723, 13, 13, 1678, 822, 788, 29918, 25699, 29898, 1311, 29892, 16680, 1125, 13, 4706, 13812, 29889, 1202, 29918, 23516, 29898, 13, 9651, 17411, 29888, 742, 13, 9651, 525, 489, 12083, 742, 13, 9651, 302, 5085, 29922, 29896, 29892, 13, 9651, 3734, 29922, 5574, 29892, 13, 9651, 1371, 2433, 2605, 304, 278, 4138, 411, 1422, 4558, 742, 13, 4706, 1723, 13, 13, 1678, 822, 4386, 29898, 1311, 29892, 334, 5085, 29892, 3579, 6768, 1125, 13, 4706, 2224, 29918, 12083, 353, 3987, 1839, 12083, 2033, 29961, 29900, 29962, 13, 4706, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 29878, 29915, 9799, 29374, 13, 9651, 2897, 29889, 11256, 3972, 29898, 29878, 29915, 9799, 1495, 13, 4706, 565, 2897, 29889, 2084, 29889, 9933, 29898, 2084, 29918, 12083, 29897, 322, 2897, 29889, 2084, 29889, 275, 3972, 29898, 2084, 29918, 12083, 1125, 13, 9651, 2066, 29918, 3972, 353, 2897, 29889, 1761, 3972, 29898, 2084, 29918, 12083, 29897, 13, 9651, 4558, 353, 5159, 13, 9651, 1967, 29918, 7039, 353, 5159, 13, 9651, 363, 934, 297, 2066, 29918, 3972, 29901, 13, 18884, 1018, 29901, 13, 462, 1678, 3402, 353, 337, 29889, 4478, 29898, 29878, 12764, 14030, 5575, 1262, 742, 934, 467, 2972, 29898, 29896, 29897, 13, 18884, 5174, 29901, 13, 462, 1678, 6773, 13, 18884, 565, 3402, 297, 1583, 29889, 2382, 29918, 19094, 1299, 29901, 13, 462, 1678, 4558, 29889, 4397, 29898, 2084, 29918, 12083, 23097, 29914, 18717, 1445, 29897, 13, 462, 1678, 1967, 29918, 7039, 29889, 4397, 29898, 1445, 29897, 13, 9651, 363, 1967, 297, 4558, 29901, 13, 18884, 528, 4422, 29889, 8552, 29906, 29898, 3027, 29892, 29878, 29915, 9799, 1495, 13, 9651, 363, 1024, 297, 1967, 29918, 7039, 29901, 13, 18884, 1583, 29889, 25393, 29889, 3539, 29898, 978, 718, 525, 29871, 11474, 29871, 525, 718, 1583, 29889, 3293, 29889, 14605, 26925, 877, 8949, 8785, 13, 18884, 7084, 29889, 12650, 29889, 3258, 29898, 1445, 29922, 978, 29892, 3257, 29922, 978, 29889, 5451, 12839, 29861, 29900, 2314, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 25393, 29889, 3539, 29898, 1311, 29889, 3293, 29889, 11432, 877, 3664, 4516, 470, 451, 4864, 8785, 13, 2 ]
webapp/app/__init__.py
siddharthsudheer/Alysida
0
68115
<filename>webapp/app/__init__.py #!/usr/bin/env python3 from flask import Flask from flask_socketio import SocketIO app = Flask(__name__, static_url_path='') app.url_map.strict_slashes = False socketio = SocketIO(app) from app.routes import index
[ 1, 529, 9507, 29958, 2676, 932, 29914, 932, 29914, 1649, 2344, 26914, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 3166, 29784, 1053, 2379, 1278, 13, 3166, 29784, 29918, 11514, 601, 1053, 29141, 5971, 13, 13, 932, 353, 2379, 1278, 22168, 978, 1649, 29892, 2294, 29918, 2271, 29918, 2084, 2433, 1495, 13, 13, 932, 29889, 2271, 29918, 1958, 29889, 710, 919, 29918, 17057, 267, 353, 7700, 13, 13, 11514, 601, 353, 29141, 5971, 29898, 932, 29897, 13, 13, 3166, 623, 29889, 27894, 1053, 2380, 13, 2 ]
src/safe_diet_project/safe_ingredient.py
hiwett18/Safe-Diet
0
92513
<reponame>hiwett18/Safe-Diet from patients import PatientType from menu import EntireMenu from ingredient import Food from restrictor import Restriction p1 = PatientType() patient = p1.select_patient() print(patient) f1 = Food() food = f1.food_ingredeients() food1 = food[:] r1 = Restriction(patient, food1) safe_ingredients = r1.food_restriction() ommited_ingredient = '' for unwanted_ingrid in food: if unwanted_ingrid not in safe_ingredients: ommited_ingredient = unwanted_ingrid if len(ommited_ingredient) == 0: ommited_ingredient = "nothing is ommited from your food. Your ingriedients are safe to eat" print("--------------------------------------------------------------------------------------------") print(f'Since you are {patient}, please avoid adding: {ommited_ingredient}') print("--------------------------------------------------------------------------------------------") print(f'Your safe ingriedient list is: {safe_ingredients}') print("--------------------------------------------------------------------------------------------") print(f'Omitted ingredient: {ommited_ingredient}') print("--------------------------------------------------------------------------------------------") print(f'(Original ingredient list: {food})') print("--------------------------------------------------------------------------------------------") if len(ommited_ingredient) > 1: if ommited_ingredient == 'white pasta': safe_ingredients.append('whole-grain pasta') print('Suggestion:\n White pasta is high in carb.\n Substitute white pasta with whole-grain pasta. \n Your updated ingredient list is: ', safe_ingredients) if len(ommited_ingredient) > 1: if ommited_ingredient == 'maple syrup': safe_ingredients.append('Raw honey') print('Suggestion:\n Maple syrup is high in carb.\n Substitute maple syrup with Raw honey. \n Your updated ingredient list is: ', safe_ingredients) if len(ommited_ingredient) > 1: if ommited_ingredient == 'dressing': safe_ingredients.append('olive oil and vinegar dressing') print('Suggestion:\n Dressing is high in carb.\n Substitute dressing with olive oil and vinegar dressing. \n Your updated ingredient list is: ', safe_ingredients) if len(ommited_ingredient) > 1: if ommited_ingredient == 'salt': safe_ingredients.append('Mrs Dash') print('Suggestion:\n Salt will increase your blood presssure.\n Substitute salt with Mrs Dash.\n Your updated ingredient list is: ', safe_ingredients) if len(ommited_ingredient) > 1: if ommited_ingredient == 'spinach': safe_ingredients.append('Arugula') print('Suggestion:\n Spinach is high in potassium.\n Substitute spinach with arugula.\n Your updated ingredient list is: ', safe_ingredients) if len(ommited_ingredient) > 1: if ommited_ingredient == 'tomato': safe_ingredients.append('broccoli') print('Suggestion:\n Tomato is high in potassium.\n Substitute tomato with broccoli.\n Your updated ingredient list is: ', safe_ingredients) print("---------- ---------- ---------- // ---------- ---------- ---------- ") print("--------------------------------------------------------------------------------------------") print("--------------------------------------------------------------------------------------------")
[ 1, 529, 276, 1112, 420, 29958, 2918, 29893, 1803, 29896, 29947, 29914, 17618, 1725, 29899, 29928, 2035, 13, 3166, 22069, 1053, 4121, 993, 1542, 13, 3166, 6143, 1053, 4284, 533, 6823, 13, 3166, 2348, 1127, 993, 1053, 25453, 29871, 13, 3166, 9250, 272, 1053, 11654, 19902, 13, 13, 13, 13, 29886, 29896, 353, 4121, 993, 1542, 580, 13, 5031, 993, 353, 282, 29896, 29889, 2622, 29918, 5031, 993, 580, 13, 2158, 29898, 5031, 993, 29897, 13, 13, 13, 29888, 29896, 353, 25453, 580, 13, 1181, 397, 353, 285, 29896, 29889, 1181, 397, 29918, 292, 276, 311, 10070, 580, 13, 1181, 397, 29896, 353, 9687, 7503, 29962, 13, 13, 13, 29878, 29896, 353, 11654, 19902, 29898, 5031, 993, 29892, 9687, 29896, 29897, 13, 11177, 29918, 292, 1127, 10070, 353, 364, 29896, 29889, 1181, 397, 29918, 5060, 19902, 580, 13, 13, 13, 3011, 1573, 29918, 292, 1127, 993, 353, 6629, 29871, 13, 1454, 18500, 9714, 29918, 292, 2429, 297, 9687, 29901, 13, 1678, 565, 18500, 9714, 29918, 292, 2429, 451, 297, 9109, 29918, 292, 1127, 10070, 29901, 13, 4706, 2703, 29885, 1573, 29918, 292, 1127, 993, 353, 18500, 9714, 29918, 292, 2429, 13, 3986, 13, 4706, 13, 308, 13, 361, 7431, 29898, 3011, 1573, 29918, 292, 1127, 993, 29897, 1275, 29871, 29900, 29901, 13, 1678, 2703, 29885, 1573, 29918, 292, 1127, 993, 353, 376, 28450, 338, 2703, 29885, 1573, 515, 596, 9687, 29889, 3575, 2348, 1255, 10070, 526, 9109, 304, 17545, 29908, 13, 13, 13, 13, 2158, 703, 2683, 2683, 2683, 2683, 2683, 9072, 1159, 13, 2158, 29898, 29888, 29915, 23036, 366, 526, 426, 5031, 993, 1118, 3113, 4772, 4417, 29901, 426, 3011, 1573, 29918, 292, 1127, 993, 29913, 1495, 29871, 13, 2158, 703, 2683, 2683, 2683, 2683, 2683, 9072, 1159, 13, 2158, 29898, 29888, 29915, 10858, 9109, 2348, 1255, 993, 1051, 338, 29901, 426, 11177, 29918, 292, 1127, 10070, 29913, 1495, 13, 2158, 703, 2683, 2683, 2683, 2683, 2683, 9072, 1159, 13, 2158, 29898, 29888, 29915, 5673, 4430, 2348, 1127, 993, 29901, 426, 3011, 1573, 29918, 292, 1127, 993, 29913, 1495, 13, 2158, 703, 2683, 2683, 2683, 2683, 2683, 9072, 1159, 13, 2158, 29898, 29888, 12215, 26036, 2348, 1127, 993, 1051, 29901, 426, 1181, 397, 1800, 1495, 13, 2158, 703, 2683, 2683, 2683, 2683, 2683, 9072, 1159, 13, 13, 361, 7431, 29898, 3011, 1573, 29918, 292, 1127, 993, 29897, 1405, 29871, 29896, 29901, 29871, 13, 1678, 565, 2703, 29885, 1573, 29918, 292, 1127, 993, 1275, 525, 10921, 4940, 29874, 2396, 13, 4706, 9109, 29918, 292, 1127, 10070, 29889, 4397, 877, 15970, 280, 29899, 3874, 262, 4940, 29874, 1495, 13, 4706, 1596, 877, 29903, 12981, 602, 3583, 29876, 8037, 4940, 29874, 338, 1880, 297, 1559, 29890, 7790, 29876, 3323, 303, 12356, 4796, 4940, 29874, 411, 3353, 29899, 3874, 262, 4940, 29874, 29889, 320, 29876, 3575, 4784, 2348, 1127, 993, 1051, 338, 29901, 13420, 9109, 29918, 292, 1127, 10070, 29897, 13, 13, 361, 7431, 29898, 3011, 1573, 29918, 292, 1127, 993, 29897, 1405, 29871, 29896, 29901, 29871, 13, 1678, 565, 2703, 29885, 1573, 29918, 292, 1127, 993, 1275, 525, 1958, 280, 9878, 17827, 2396, 13, 4706, 9109, 29918, 292, 1127, 10070, 29889, 4397, 877, 22131, 298, 4992, 1495, 13, 4706, 1596, 877, 29903, 12981, 602, 3583, 29876, 7315, 280, 9878, 17827, 338, 1880, 297, 1559, 29890, 7790, 29876, 3323, 303, 12356, 2910, 280, 9878, 17827, 411, 22038, 298, 4992, 29889, 320, 29876, 3575, 4784, 2348, 1127, 993, 1051, 338, 29901, 13420, 9109, 29918, 292, 1127, 10070, 29897, 13, 13, 361, 7431, 29898, 3011, 1573, 29918, 292, 1127, 993, 29897, 1405, 29871, 29896, 29901, 29871, 13, 1678, 565, 2703, 29885, 1573, 29918, 292, 1127, 993, 1275, 525, 29881, 1253, 292, 2396, 13, 4706, 9109, 29918, 292, 1127, 10070, 29889, 4397, 877, 324, 573, 17182, 322, 13848, 387, 279, 10714, 292, 1495, 13, 4706, 1596, 877, 29903, 12981, 602, 3583, 29876, 360, 1253, 292, 338, 1880, 297, 1559, 29890, 7790, 29876, 3323, 303, 12356, 10714, 292, 411, 288, 9258, 17182, 322, 13848, 387, 279, 10714, 292, 29889, 320, 29876, 3575, 4784, 2348, 1127, 993, 1051, 338, 29901, 13420, 9109, 29918, 292, 1127, 10070, 29897, 13, 13, 361, 7431, 29898, 3011, 1573, 29918, 292, 1127, 993, 29897, 1405, 29871, 29896, 29901, 29871, 13, 1678, 565, 2703, 29885, 1573, 29918, 292, 1127, 993, 1275, 525, 29879, 1997, 2396, 13, 4706, 9109, 29918, 292, 1127, 10070, 29889, 4397, 877, 29924, 2288, 360, 1161, 1495, 13, 4706, 1596, 877, 29903, 12981, 602, 3583, 29876, 27903, 674, 7910, 596, 10416, 3965, 29879, 545, 7790, 29876, 3323, 303, 12356, 15795, 411, 6285, 360, 1161, 7790, 29876, 3575, 4784, 2348, 1127, 993, 1051, 338, 29901, 13420, 9109, 29918, 292, 1127, 10070, 29897, 13, 13, 361, 7431, 29898, 3011, 1573, 29918, 292, 1127, 993, 29897, 1405, 29871, 29896, 29901, 29871, 13, 1678, 565, 2703, 29885, 1573, 29918, 292, 1127, 993, 1275, 525, 1028, 262, 496, 2396, 13, 4706, 9109, 29918, 292, 1127, 10070, 29889, 4397, 877, 29909, 11124, 2497, 1495, 13, 4706, 1596, 877, 29903, 12981, 602, 3583, 29876, 1706, 262, 496, 338, 1880, 297, 3104, 465, 1974, 7790, 29876, 3323, 303, 12356, 10917, 496, 411, 564, 688, 2497, 7790, 29876, 3575, 4784, 2348, 1127, 993, 1051, 338, 29901, 13420, 9109, 29918, 292, 1127, 10070, 29897, 13, 13, 361, 7431, 29898, 3011, 1573, 29918, 292, 1127, 993, 29897, 1405, 29871, 29896, 29901, 29871, 13, 1678, 565, 2703, 29885, 1573, 29918, 292, 1127, 993, 1275, 525, 15135, 1219, 2396, 13, 4706, 9109, 29918, 292, 1127, 10070, 29889, 4397, 877, 6729, 617, 5079, 1495, 13, 4706, 1596, 877, 29903, 12981, 602, 3583, 29876, 4335, 1219, 338, 1880, 297, 3104, 465, 1974, 7790, 29876, 3323, 303, 12356, 6454, 1219, 411, 2545, 617, 5079, 7790, 29876, 3575, 4784, 2348, 1127, 993, 1051, 338, 29901, 13420, 9109, 29918, 292, 1127, 10070, 29897, 13, 13, 2158, 703, 28400, 1678, 448, 1378, 29899, 1678, 448, 1378, 29899, 418, 849, 418, 448, 1378, 29899, 1678, 448, 1378, 29899, 268, 448, 1378, 29899, 16521, 13, 2158, 703, 2683, 2683, 2683, 2683, 2683, 9072, 1159, 13, 2158, 703, 2683, 2683, 2683, 2683, 2683, 9072, 1159, 13, 2 ]
ArcGIS Code/CutFillStatistics.py
uob-hydrology/OptimizedPitRemoval
4
1600502
<gh_stars>1-10 # Script Name: CutFillStatistics 1.0 # # Created By: <NAME> # Date: 01/16/2013 # Import ArcPy site-package and os modules # import arcpy import os import sys import time import string import subprocess #set executable program location executablepath = os.path.dirname(os.path.abspath(__file__)) arcpy.AddMessage(executablepath) executablename = '\CutFillStatistics.exe' executablestr = '"' + executablepath + executablename + '"' arcpy.AddMessage(executablestr) # Get Original DEM (ASCII) # inLyr = arcpy.GetParameterAsText(0) desc = arcpy.Describe(inLyr) OrigDEM=str(desc.catalogPath) arcpy.AddMessage("\nOriginal Elevation file: "+OrigDEM) OriginalDEMstr = ' -orig "' + OrigDEM + '"' arcpy.AddMessage(OriginalDEMstr) # Get Modified DEM (ASCII) ModDEM = arcpy.GetParameterAsText(1) arcpy.AddMessage("\Modified Elevation file: "+ModDEM) ModDEMstr = ' -mod "' + ModDEM + '"' # Get Output Statistics File (ASCII) StatFile = arcpy.GetParameterAsText(2) arcpy.AddMessage("\nOutput Statistics file: "+StatFile) StatFilestr = ' -stat "' + StatFile + '"' # Construct the command line. Put quotes around file names in case there are spaces cmd = executablestr + OriginalDEMstr + ModDEMstr + StatFilestr arcpy.AddMessage(cmd) os.system(cmd) pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # print the output lines as they happen while True: line = pipe.stdout.readline() if not line: break arcpy.AddMessage(line)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14415, 4408, 29901, 315, 329, 20876, 9513, 6765, 29871, 29896, 29889, 29900, 13, 29937, 29871, 13, 29937, 6760, 630, 2648, 29901, 29871, 529, 5813, 29958, 13, 29937, 4712, 29901, 308, 29900, 29896, 29914, 29896, 29953, 29914, 29906, 29900, 29896, 29941, 13, 13, 29937, 16032, 22711, 19737, 3268, 29899, 5113, 322, 2897, 10585, 13, 29937, 13, 5215, 15232, 2272, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 931, 13, 5215, 1347, 13, 5215, 1014, 5014, 13, 13, 29937, 842, 16813, 1824, 4423, 13, 4258, 9246, 2084, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 370, 1028, 493, 22168, 1445, 1649, 876, 13, 5666, 2272, 29889, 2528, 3728, 29898, 4258, 9246, 2084, 29897, 13, 4258, 329, 370, 2435, 420, 353, 11297, 29907, 329, 20876, 9513, 6765, 29889, 8097, 29915, 13, 4258, 329, 12478, 16444, 353, 18793, 29915, 718, 16813, 2084, 718, 6704, 370, 2435, 420, 718, 18793, 29915, 13, 5666, 2272, 29889, 2528, 3728, 29898, 4258, 329, 12478, 16444, 29897, 13, 13, 29937, 3617, 8533, 5012, 29924, 313, 28599, 2687, 29897, 13, 29937, 13, 262, 29931, 4316, 353, 15232, 2272, 29889, 2577, 9329, 2887, 1626, 29898, 29900, 29897, 13, 14273, 353, 15232, 2272, 29889, 4002, 29581, 29898, 262, 29931, 4316, 29897, 13, 2816, 335, 2287, 29924, 29922, 710, 29898, 14273, 29889, 28045, 2605, 29897, 13, 5666, 2272, 29889, 2528, 3728, 14182, 29876, 26036, 382, 2608, 362, 934, 29901, 15691, 2816, 335, 2287, 29924, 29897, 13, 26036, 2287, 29924, 710, 353, 525, 448, 12683, 13577, 718, 29766, 2287, 29924, 718, 18793, 29915, 13, 5666, 2272, 29889, 2528, 3728, 29898, 26036, 2287, 29924, 710, 29897, 13, 13, 29937, 3617, 3382, 2164, 5012, 29924, 313, 28599, 2687, 29897, 13, 2111, 2287, 29924, 353, 15232, 2272, 29889, 2577, 9329, 2887, 1626, 29898, 29896, 29897, 13, 5666, 2272, 29889, 2528, 3728, 14182, 2111, 2164, 382, 2608, 362, 934, 29901, 15691, 2111, 2287, 29924, 29897, 13, 2111, 2287, 29924, 710, 353, 525, 448, 1545, 13577, 718, 3382, 2287, 29924, 718, 18793, 29915, 13, 13, 29937, 3617, 10604, 27098, 3497, 313, 28599, 2687, 29897, 13, 9513, 2283, 353, 15232, 2272, 29889, 2577, 9329, 2887, 1626, 29898, 29906, 29897, 13, 5666, 2272, 29889, 2528, 3728, 14182, 29876, 6466, 27098, 934, 29901, 15691, 9513, 2283, 29897, 13, 9513, 3434, 16444, 353, 525, 448, 6112, 13577, 718, 6666, 2283, 718, 18793, 29915, 13, 13, 13, 29937, 1281, 4984, 278, 1899, 1196, 29889, 29871, 12065, 11839, 2820, 934, 2983, 297, 1206, 727, 526, 8162, 13, 9006, 353, 6704, 12478, 16444, 718, 8533, 2287, 29924, 710, 718, 3382, 2287, 29924, 710, 718, 6666, 3434, 16444, 13, 5666, 2272, 29889, 2528, 3728, 29898, 9006, 29897, 13, 359, 29889, 5205, 29898, 9006, 29897, 13, 17760, 353, 1014, 5014, 29889, 29925, 3150, 29898, 9006, 29892, 27591, 29922, 1491, 5014, 29889, 2227, 4162, 29892, 380, 20405, 29922, 1491, 5014, 29889, 2227, 4162, 29897, 13, 13, 29937, 1596, 278, 1962, 3454, 408, 896, 3799, 13, 8000, 5852, 29901, 13, 1678, 1196, 353, 14282, 29889, 25393, 29889, 949, 1220, 580, 13, 1678, 565, 451, 1196, 29901, 13, 4706, 2867, 13, 1678, 15232, 2272, 29889, 2528, 3728, 29898, 1220, 29897, 13, 2 ]
drams/vagrant-settings.py
FAIRDataPipeline/data-registry
0
89090
<reponame>FAIRDataPipeline/data-registry from .base_settings import * ALLOWED_HOSTS = ['192.168.20.10', '127.0.0.1', 'localhost']
[ 1, 529, 276, 1112, 420, 29958, 4519, 8193, 1469, 29925, 23828, 29914, 1272, 29899, 1727, 6020, 13, 3166, 869, 3188, 29918, 11027, 1053, 334, 13, 13, 1964, 27998, 3352, 29918, 20832, 29903, 353, 6024, 29896, 29929, 29906, 29889, 29896, 29953, 29947, 29889, 29906, 29900, 29889, 29896, 29900, 742, 525, 29896, 29906, 29955, 29889, 29900, 29889, 29900, 29889, 29896, 742, 525, 7640, 2033, 13, 2 ]
src/narmax/utils.py
DavidContrerasFranco/Data-driven-Dynamics-Understanding
0
142244
import time import copy import numpy as np from functools import reduce from operator import indexOf, iconcat from sysidentpy.utils.display_results import results from sysidentpy.model_structure_selection import FROLS def narmax_state_space(nx_model:FROLS, X_train, X_test, states_names): xlag = nx_model.xlag if type(nx_model.xlag) == int else max(reduce(iconcat, nx_model.xlag, [])) max_lag = max(xlag, nx_model.ylag) narmax_model = {} narmax_time = 0 coeffs = [] regs = [] sim = [] for s_id, state in enumerate(states_names): model = copy.deepcopy(nx_model) x_train = np.delete(X_train, s_id, axis=1)[:-1] y_train = X_train[1:, s_id].reshape(-1, 1) x_test = np.delete(X_test, s_id, axis=1) y_test = X_test[0:nx_model.ylag, s_id].reshape(-1, 1) # Train model for one state and get time tic = time.time() model.fit(X=x_train, y=y_train) toc = time.time() narmax_time += toc - tic # Print resulting model param = results(model.final_model, model.theta, model.err, model.n_terms, dtype='sci') param_names = np.delete(states_names, s_id, axis=0).tolist() display_nx_model(param, model.theta, state, param_names, max_lag) # Simulate model for the state Z coeffs += [np.pad(model.theta.flatten(), (0, model.basis_function.__sizeof__() - len(model.theta)))] regs += [[list(eq) for eq in model.final_model]] sim += [model.predict(X=x_test, y=y_test)] # Stack results for models and predictions narmax_model['features'] = states_names narmax_model['coeffs'] = np.vstack(coeffs) narmax_model['regs'] = regs narmax_sim = np.hstack(sim) return narmax_model, narmax_sim, narmax_time def display_nx_model(results, theta, output:str, input_vars, max_lag=1): regressors = '' for idx, regressor in enumerate(results): if idx > 0: regressors += ' +' for lag in range(0, max_lag): regressor[0] = regressor[0].replace('(k-' + str(lag + 1) + ')', '[k-' + str(lag) + ']') regressors += ' ' + f'{theta[idx][0]:.3E}' + ' ' + regressor[0].replace('-0', '') regressors = regressors.replace('y', output).replace('+ -', '- ') for idx, var in enumerate(input_vars): regressors = regressors.replace('x' + str(idx+1), var) print(output + '[k+1] =' + regressors) def solution_to_regressors(sol_terms, feature_names, order): '''Convert an standard list of terms describing the solution into the NARMAX regressors format''' # TODO: Division with powers in conversion regressors = [] for idx_eq, eq in enumerate(sol_terms): eq_regs = [] eq_features = [feature_names[idx_eq]] + np.delete(feature_names, idx_eq).tolist() for term in eq: n = 0 reg = np.zeros(order, dtype='int') split_terms = term.split() # Replace powers by repetitions new_split_terms = [] for factor in split_terms: new_factor = [factor] if '^' in factor: pos_power = indexOf(factor, '^') new_factor = [factor[pos_power - 1]] * int(factor[pos_power + 1]) elif '/' in factor: pos_div = indexOf(factor, '/') new_factor = [factor[pos_div - 1], factor[pos_div + 1]] new_split_terms += new_factor # Convert terms into regressors for factor in new_split_terms: if factor.isalpha(): reg[n] = 1000*indexOf(eq_features, factor) + 1001 n += 1 elif '_k-' in factor: pos_k = indexOf(factor, 'k') base = factor[:pos_k - 1] delay =int(factor[pos_k + 2]) reg[n] = 1000*indexOf(eq_features, base) + 1000 + delay n += 1 eq_regs += [list(np.sort(reg))[::-1]] regressors += [eq_regs] return regressors
[ 1, 29871, 13, 5215, 931, 13, 5215, 3509, 13, 5215, 12655, 408, 7442, 13, 13, 3166, 2090, 312, 8789, 1053, 10032, 13, 3166, 5455, 1053, 2380, 2776, 29892, 9849, 4117, 13, 3166, 10876, 1693, 2272, 29889, 13239, 29889, 4990, 29918, 9902, 1053, 2582, 13, 3166, 10876, 1693, 2272, 29889, 4299, 29918, 23905, 29918, 21731, 1053, 383, 1672, 8547, 13, 13, 1753, 17655, 3317, 29918, 3859, 29918, 3493, 29898, 23818, 29918, 4299, 29901, 29943, 1672, 8547, 29892, 1060, 29918, 14968, 29892, 1060, 29918, 1688, 29892, 5922, 29918, 7039, 1125, 13, 1678, 921, 3110, 353, 302, 29916, 29918, 4299, 29889, 29916, 3110, 565, 1134, 29898, 23818, 29918, 4299, 29889, 29916, 3110, 29897, 1275, 938, 1683, 4236, 29898, 17469, 29898, 4144, 4117, 29892, 302, 29916, 29918, 4299, 29889, 29916, 3110, 29892, 5159, 876, 13, 1678, 4236, 29918, 3110, 353, 4236, 29898, 29916, 3110, 29892, 302, 29916, 29918, 4299, 29889, 2904, 351, 29897, 13, 1678, 17655, 3317, 29918, 4299, 353, 6571, 13, 1678, 17655, 3317, 29918, 2230, 353, 29871, 29900, 13, 1678, 1302, 12352, 29879, 353, 5159, 13, 1678, 1072, 29879, 353, 5159, 13, 1678, 1027, 353, 5159, 13, 13, 1678, 363, 269, 29918, 333, 29892, 2106, 297, 26985, 29898, 28631, 29918, 7039, 1125, 13, 4706, 1904, 353, 3509, 29889, 24535, 8552, 29898, 23818, 29918, 4299, 29897, 13, 13, 4706, 921, 29918, 14968, 353, 7442, 29889, 8143, 29898, 29990, 29918, 14968, 29892, 269, 29918, 333, 29892, 9685, 29922, 29896, 29897, 7503, 29899, 29896, 29962, 13, 4706, 343, 29918, 14968, 353, 1060, 29918, 14968, 29961, 29896, 29901, 29892, 269, 29918, 333, 1822, 690, 14443, 6278, 29896, 29892, 29871, 29896, 29897, 13, 13, 4706, 921, 29918, 1688, 353, 7442, 29889, 8143, 29898, 29990, 29918, 1688, 29892, 269, 29918, 333, 29892, 9685, 29922, 29896, 29897, 13, 4706, 343, 29918, 1688, 353, 1060, 29918, 1688, 29961, 29900, 29901, 23818, 29918, 4299, 29889, 2904, 351, 29892, 269, 29918, 333, 1822, 690, 14443, 6278, 29896, 29892, 29871, 29896, 29897, 13, 13, 4706, 396, 28186, 1904, 363, 697, 2106, 322, 679, 931, 13, 4706, 260, 293, 353, 931, 29889, 2230, 580, 13, 4706, 1904, 29889, 9202, 29898, 29990, 29922, 29916, 29918, 14968, 29892, 343, 29922, 29891, 29918, 14968, 29897, 13, 4706, 304, 29883, 353, 931, 29889, 2230, 580, 13, 4706, 17655, 3317, 29918, 2230, 4619, 304, 29883, 448, 260, 293, 13, 13, 4706, 396, 13905, 9819, 1904, 13, 4706, 1828, 353, 2582, 29898, 4299, 29889, 8394, 29918, 4299, 29892, 1904, 29889, 3416, 29892, 1904, 29889, 3127, 29892, 1904, 29889, 29876, 29918, 357, 1516, 29892, 26688, 2433, 26167, 1495, 13, 4706, 1828, 29918, 7039, 353, 7442, 29889, 8143, 29898, 28631, 29918, 7039, 29892, 269, 29918, 333, 29892, 9685, 29922, 29900, 467, 25027, 391, 580, 13, 4706, 2479, 29918, 23818, 29918, 4299, 29898, 3207, 29892, 1904, 29889, 3416, 29892, 2106, 29892, 1828, 29918, 7039, 29892, 4236, 29918, 3110, 29897, 13, 13, 4706, 396, 3439, 5987, 1904, 363, 278, 2106, 796, 13, 4706, 1302, 12352, 29879, 4619, 518, 9302, 29889, 8305, 29898, 4299, 29889, 3416, 29889, 1579, 8606, 3285, 313, 29900, 29892, 1904, 29889, 6500, 275, 29918, 2220, 17255, 17921, 1649, 580, 448, 7431, 29898, 4299, 29889, 3416, 876, 4638, 13, 4706, 1072, 29879, 4619, 5519, 1761, 29898, 1837, 29897, 363, 11594, 297, 1904, 29889, 8394, 29918, 4299, 5262, 13, 4706, 1027, 4619, 518, 4299, 29889, 27711, 29898, 29990, 29922, 29916, 29918, 1688, 29892, 343, 29922, 29891, 29918, 1688, 4638, 13, 13, 1678, 396, 10292, 2582, 363, 4733, 322, 27303, 13, 1678, 17655, 3317, 29918, 4299, 1839, 22100, 2033, 353, 5922, 29918, 7039, 13, 1678, 17655, 3317, 29918, 4299, 1839, 1111, 12352, 29879, 2033, 353, 7442, 29889, 29894, 1429, 29898, 1111, 12352, 29879, 29897, 13, 1678, 17655, 3317, 29918, 4299, 1839, 1727, 29879, 2033, 353, 1072, 29879, 13, 1678, 17655, 3317, 29918, 3601, 353, 7442, 29889, 29882, 1429, 29898, 3601, 29897, 13, 13, 1678, 736, 17655, 3317, 29918, 4299, 29892, 17655, 3317, 29918, 3601, 29892, 17655, 3317, 29918, 2230, 13, 13, 13, 1753, 2479, 29918, 23818, 29918, 4299, 29898, 9902, 29892, 278, 941, 29892, 1962, 29901, 710, 29892, 1881, 29918, 16908, 29892, 4236, 29918, 3110, 29922, 29896, 1125, 13, 1678, 337, 3663, 943, 353, 6629, 13, 1678, 363, 22645, 29892, 337, 3663, 272, 297, 26985, 29898, 9902, 1125, 13, 4706, 565, 22645, 1405, 29871, 29900, 29901, 13, 9651, 337, 3663, 943, 4619, 525, 718, 29915, 13, 4706, 363, 11755, 297, 3464, 29898, 29900, 29892, 4236, 29918, 3110, 1125, 13, 9651, 337, 3663, 272, 29961, 29900, 29962, 353, 337, 3663, 272, 29961, 29900, 1822, 6506, 877, 29898, 29895, 29899, 29915, 718, 851, 29898, 3110, 718, 29871, 29896, 29897, 718, 25710, 742, 525, 29961, 29895, 29899, 29915, 718, 851, 29898, 3110, 29897, 718, 525, 29962, 1495, 13, 4706, 337, 3663, 943, 4619, 525, 525, 718, 285, 29915, 29912, 3416, 29961, 13140, 3816, 29900, 5387, 29889, 29941, 29923, 10162, 718, 525, 525, 718, 337, 3663, 272, 29961, 29900, 1822, 6506, 877, 29899, 29900, 742, 27255, 13, 13, 1678, 337, 3663, 943, 353, 337, 3663, 943, 29889, 6506, 877, 29891, 742, 1962, 467, 6506, 877, 29974, 448, 742, 17411, 25710, 13, 1678, 363, 22645, 29892, 722, 297, 26985, 29898, 2080, 29918, 16908, 1125, 13, 4706, 337, 3663, 943, 353, 337, 3663, 943, 29889, 6506, 877, 29916, 29915, 718, 851, 29898, 13140, 29974, 29896, 511, 722, 29897, 13, 13, 1678, 1596, 29898, 4905, 718, 525, 29961, 29895, 29974, 29896, 29962, 353, 29915, 718, 337, 3663, 943, 29897, 13, 13, 13, 1753, 1650, 29918, 517, 29918, 276, 3663, 943, 29898, 2929, 29918, 357, 1516, 29892, 4682, 29918, 7039, 29892, 1797, 1125, 13, 1678, 14550, 18455, 385, 3918, 1051, 310, 4958, 20766, 278, 1650, 964, 278, 405, 1718, 12648, 337, 3663, 943, 3402, 12008, 13, 1678, 396, 14402, 29901, 7946, 411, 10801, 297, 11301, 13, 13, 1678, 337, 3663, 943, 353, 5159, 13, 1678, 363, 22645, 29918, 1837, 29892, 11594, 297, 26985, 29898, 2929, 29918, 357, 1516, 1125, 13, 4706, 11594, 29918, 1727, 29879, 353, 5159, 13, 4706, 11594, 29918, 22100, 353, 518, 14394, 29918, 7039, 29961, 13140, 29918, 1837, 5262, 718, 7442, 29889, 8143, 29898, 14394, 29918, 7039, 29892, 22645, 29918, 1837, 467, 25027, 391, 580, 13, 4706, 363, 1840, 297, 11594, 29901, 13, 9651, 302, 353, 29871, 29900, 13, 9651, 1072, 353, 7442, 29889, 3298, 359, 29898, 2098, 29892, 26688, 2433, 524, 1495, 13, 9651, 6219, 29918, 357, 1516, 353, 1840, 29889, 5451, 580, 13, 13, 9651, 396, 22108, 10801, 491, 21159, 2187, 13, 9651, 716, 29918, 5451, 29918, 357, 1516, 353, 5159, 13, 9651, 363, 7329, 297, 6219, 29918, 357, 1516, 29901, 13, 18884, 716, 29918, 19790, 353, 518, 19790, 29962, 13, 18884, 565, 525, 29985, 29915, 297, 7329, 29901, 13, 462, 1678, 926, 29918, 13519, 353, 2380, 2776, 29898, 19790, 29892, 525, 29985, 1495, 13, 462, 1678, 716, 29918, 19790, 353, 518, 19790, 29961, 1066, 29918, 13519, 448, 29871, 29896, 5262, 334, 938, 29898, 19790, 29961, 1066, 29918, 13519, 718, 29871, 29896, 2314, 13, 18884, 25342, 8207, 29915, 297, 7329, 29901, 13, 462, 1678, 926, 29918, 4563, 353, 2380, 2776, 29898, 19790, 29892, 8207, 1495, 13, 462, 1678, 716, 29918, 19790, 353, 518, 19790, 29961, 1066, 29918, 4563, 448, 29871, 29896, 1402, 7329, 29961, 1066, 29918, 4563, 718, 29871, 29896, 5262, 13, 18884, 716, 29918, 5451, 29918, 357, 1516, 4619, 716, 29918, 19790, 13, 462, 268, 13, 9651, 396, 14806, 4958, 964, 337, 3663, 943, 13, 9651, 363, 7329, 297, 716, 29918, 5451, 29918, 357, 1516, 29901, 13, 18884, 565, 7329, 29889, 275, 2312, 7295, 13, 462, 1678, 1072, 29961, 29876, 29962, 353, 29871, 29896, 29900, 29900, 29900, 29930, 19402, 29898, 1837, 29918, 22100, 29892, 7329, 29897, 718, 29871, 29896, 29900, 29900, 29896, 13, 462, 1678, 302, 4619, 29871, 29896, 13, 18884, 25342, 22868, 29895, 29899, 29915, 297, 7329, 29901, 13, 462, 1678, 926, 29918, 29895, 353, 2380, 2776, 29898, 19790, 29892, 525, 29895, 1495, 13, 462, 1678, 2967, 353, 7329, 7503, 1066, 29918, 29895, 448, 29871, 29896, 29962, 13, 462, 1678, 9055, 353, 524, 29898, 19790, 29961, 1066, 29918, 29895, 718, 29871, 29906, 2314, 13, 462, 1678, 1072, 29961, 29876, 29962, 353, 29871, 29896, 29900, 29900, 29900, 29930, 19402, 29898, 1837, 29918, 22100, 29892, 2967, 29897, 718, 29871, 29896, 29900, 29900, 29900, 718, 9055, 13, 462, 1678, 302, 4619, 29871, 29896, 13, 13, 9651, 11594, 29918, 1727, 29879, 4619, 518, 1761, 29898, 9302, 29889, 6605, 29898, 1727, 876, 29961, 1057, 29899, 29896, 5262, 13, 4706, 337, 3663, 943, 4619, 518, 1837, 29918, 1727, 29879, 29962, 13, 1678, 736, 337, 3663, 943, 2 ]
JumpscaleCore/servers/graphql/GraphqlBottle.py
gneumann333/jumpscaleX_core
1
151261
import json from collections import namedtuple from bottle import request, response from graphql import GraphQLError, format_error as format_graphql_error def format_error(error): if isinstance(error, GraphQLError): return format_graphql_error(error) return {"message": str(error)} def handle_graphql_response(func, graphene_schema): def wrapper(): response.content_type = "application/json" try: result = func(graphene_schema) output = {"data": result.data} if result.errors is not None: output["errors"] = [format_error(e) for e in result.errors] if result.invalid: response.status = 400 return json.dumps(output) except Exception as e: return json.dumps({"data": None, "errors": [e]}) return wrapper def execute_get(graphene_schema): graphql_query = request.query["query"] graphql_variables = json.loads(request.query.get("variables", "{}")) graphql_operation_name = request.query.get("operationName", None) return graphene_schema.execute( graphql_query, variable_values=graphql_variables, operation_name=graphql_operation_name ) def execute_post(graphene_schema): graphql_data = request.json graphql_query = graphql_data["query"] return graphene_schema.execute(graphql_query) def execute_introspection(graphene_schema): DataItem = namedtuple("DataItem", ["data", "errors"]) return DataItem(data=graphene_schema.introspect(), errors=None) def graphql_middleware(bottle_app, endpoint_name, graphene_schema): bottle_app.route(endpoint_name, "OPTIONS", handle_graphql_response(execute_introspection, graphene_schema)) bottle_app.route(endpoint_name, "POST", handle_graphql_response(execute_post, graphene_schema)) bottle_app.route(endpoint_name, "GET", handle_graphql_response(execute_get, graphene_schema))
[ 1, 1053, 4390, 13, 3166, 16250, 1053, 4257, 23583, 13, 13, 3166, 18046, 280, 1053, 2009, 29892, 2933, 13, 13, 3166, 3983, 1519, 1053, 12367, 29984, 1307, 24616, 29892, 3402, 29918, 2704, 408, 3402, 29918, 4262, 1519, 29918, 2704, 13, 13, 13, 1753, 3402, 29918, 2704, 29898, 2704, 1125, 13, 1678, 565, 338, 8758, 29898, 2704, 29892, 12367, 29984, 1307, 24616, 1125, 13, 4706, 736, 3402, 29918, 4262, 1519, 29918, 2704, 29898, 2704, 29897, 13, 13, 1678, 736, 8853, 4906, 1115, 851, 29898, 2704, 2915, 13, 13, 13, 1753, 4386, 29918, 4262, 1519, 29918, 5327, 29898, 9891, 29892, 3983, 1600, 29918, 11010, 1125, 13, 1678, 822, 14476, 7295, 13, 4706, 2933, 29889, 3051, 29918, 1853, 353, 376, 6214, 29914, 3126, 29908, 13, 13, 4706, 1018, 29901, 13, 9651, 1121, 353, 3653, 29898, 4262, 1600, 29918, 11010, 29897, 13, 9651, 1962, 353, 8853, 1272, 1115, 1121, 29889, 1272, 29913, 13, 13, 9651, 565, 1121, 29889, 12523, 338, 451, 6213, 29901, 13, 18884, 1962, 3366, 12523, 3108, 353, 518, 4830, 29918, 2704, 29898, 29872, 29897, 363, 321, 297, 1121, 29889, 12523, 29962, 13, 13, 9651, 565, 1121, 29889, 20965, 29901, 13, 18884, 2933, 29889, 4882, 353, 29871, 29946, 29900, 29900, 13, 13, 9651, 736, 4390, 29889, 29881, 17204, 29898, 4905, 29897, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 736, 4390, 29889, 29881, 17204, 3319, 29908, 1272, 1115, 6213, 29892, 376, 12523, 1115, 518, 29872, 29962, 1800, 13, 13, 1678, 736, 14476, 13, 13, 13, 1753, 6222, 29918, 657, 29898, 4262, 1600, 29918, 11010, 1125, 13, 1678, 3983, 1519, 29918, 1972, 353, 2009, 29889, 1972, 3366, 1972, 3108, 13, 1678, 3983, 1519, 29918, 20897, 353, 4390, 29889, 18132, 29898, 3827, 29889, 1972, 29889, 657, 703, 20897, 613, 29850, 5038, 876, 13, 1678, 3983, 1519, 29918, 16453, 29918, 978, 353, 2009, 29889, 1972, 29889, 657, 703, 16453, 1170, 613, 6213, 29897, 13, 13, 1678, 736, 3983, 1600, 29918, 11010, 29889, 7978, 29898, 13, 4706, 3983, 1519, 29918, 1972, 29892, 2286, 29918, 5975, 29922, 4262, 1519, 29918, 20897, 29892, 5858, 29918, 978, 29922, 4262, 1519, 29918, 16453, 29918, 978, 13, 1678, 1723, 13, 13, 13, 1753, 6222, 29918, 2490, 29898, 4262, 1600, 29918, 11010, 1125, 13, 1678, 3983, 1519, 29918, 1272, 353, 2009, 29889, 3126, 13, 1678, 3983, 1519, 29918, 1972, 353, 3983, 1519, 29918, 1272, 3366, 1972, 3108, 13, 13, 1678, 736, 3983, 1600, 29918, 11010, 29889, 7978, 29898, 4262, 1519, 29918, 1972, 29897, 13, 13, 13, 1753, 6222, 29918, 524, 1883, 27988, 29898, 4262, 1600, 29918, 11010, 1125, 13, 1678, 3630, 2001, 353, 4257, 23583, 703, 1469, 2001, 613, 6796, 1272, 613, 376, 12523, 20068, 13, 1678, 736, 3630, 2001, 29898, 1272, 29922, 4262, 1600, 29918, 11010, 29889, 524, 1883, 1103, 3285, 4436, 29922, 8516, 29897, 13, 13, 13, 1753, 3983, 1519, 29918, 17662, 2519, 29898, 29890, 1501, 280, 29918, 932, 29892, 16248, 29918, 978, 29892, 3983, 1600, 29918, 11010, 1125, 13, 1678, 18046, 280, 29918, 932, 29889, 13134, 29898, 29734, 29918, 978, 29892, 376, 14094, 27946, 613, 4386, 29918, 4262, 1519, 29918, 5327, 29898, 7978, 29918, 524, 1883, 27988, 29892, 3983, 1600, 29918, 11010, 876, 13, 1678, 18046, 280, 29918, 932, 29889, 13134, 29898, 29734, 29918, 978, 29892, 376, 5438, 613, 4386, 29918, 4262, 1519, 29918, 5327, 29898, 7978, 29918, 2490, 29892, 3983, 1600, 29918, 11010, 876, 13, 1678, 18046, 280, 29918, 932, 29889, 13134, 29898, 29734, 29918, 978, 29892, 376, 7194, 613, 4386, 29918, 4262, 1519, 29918, 5327, 29898, 7978, 29918, 657, 29892, 3983, 1600, 29918, 11010, 876, 13, 2 ]
iconary/models/t5_decoding.py
allenai/iconary
6
103633
<reponame>allenai/iconary<gh_stars>1-10 """Logic to use T5 in allennlp's BeamSearch This allows us to use T5 to create the initial_state, starting predictions, and `StepFunctionType` functions needed to run `BeamSearch` from allennlp. It also includes the constraint logic we use to ensure Drawers produce valid drawings and Guesser produce valid guesses. We use allennlp because it BeamSearch is easy to use and add constraints to, and hugging faces version is much more difficult to modify. """ import torch from transformers import T5Tokenizer from transformers.modeling_outputs import Seq2SeqLMOutput from iconary.data.datasets import GamePhraseConstraints from iconary.utils import utils from torch.nn import functional as F _t5_tokens_with_spaces = None def get_tokens_with_space(tokenizer): assert isinstance(tokenizer, T5Tokenizer) global _t5_tokens_with_spaces if _t5_tokens_with_spaces is None: start_of_word_tokens_ix = [] for k, ix in tokenizer.get_vocab().items(): if k.startswith("▁"): start_of_word_tokens_ix.append(ix) start_of_word_tokens_ix = torch.tensor(start_of_word_tokens_ix, dtype=torch.long) _t5_tokens_with_spaces = start_of_word_tokens_ix return _t5_tokens_with_spaces def get_starts_word(tokenizer, voc_size=None): if voc_size is None: voc_size = len(tokenizer) start_of_word_tokens_ix = get_tokens_with_space(tokenizer) starts_new_word = torch.zeros(voc_size, dtype=torch.bool) starts_new_word[start_of_word_tokens_ix] = 1 return starts_new_word def build_allowed_word_matrix( constraints: GamePhraseConstraints, starts_new_word, continues_word, tokenizer): """ :param constraints: from `ImsituGame.get_constraints()` :param starts_new_word: [vocab_size] tensor with 1 indicating word pieces that add a space :param tokenizer: T5 Tokenizer to use :return: A matrix of (number of spaces so far -> allowed token pieces) this matrix constrains generation in a way that model produces the right number of words, and so that the model (more or less) has to produce the words that are known to be correct. """ # allowed_words[i] is words that are allowed after the ith space has been added allowed_words = [] for i, const in enumerate(constraints): if isinstance(const, list): if i == 0: # Must start a new word at step 1 allowed = starts_new_word.clone() elif isinstance(constraints[i - 1], str): # Either start any new word allowed = starts_new_word.clone() # Or continue the previous correct word allowed[tokenizer.encode(constraints[i - 1], add_special_tokens=False)[1:]] = 1 else: # Anything goes, except special tokens allowed = torch.ones_like(starts_new_word, dtype=torch.float) allowed[tokenizer.all_special_ids] = 0 allowed_words.append(allowed) else: input_id = tokenizer.encode(const, add_special_tokens=False) correct_word = input_id[0] if i == 0: # After the PAD token, can only start the new, correct word allowed = torch.zeros_like(starts_new_word) allowed[correct_word] = 1 elif isinstance(constraints[i-1], str): allowed = torch.zeros_like(starts_new_word) # Anything that could continue the previous correct word allowed[tokenizer.encode_with_cache(constraints[i-1])[1:]] = 1 allowed[correct_word] = 1 # And the start of the correct word else: allowed = continues_word.clone() # Anything that does NOT start a new word allowed[correct_word] = 1 # And the start of the correct word allowed_words.append(allowed) allowed = continues_word.clone() # Anything that does NOT start a new word allowed[tokenizer.eos_token_id] = 1 # And the EOS token allowed_words.append(allowed) return torch.stack(allowed_words, dim=0) def t5_initialize_decoding( tokenizer, decoder, encoder_out, encoder_mask, constraints, constraints_before_softmax=False, post_process=None, prevent_known_incorrect_words=False ): batch_size = encoder_out.size(0) device = encoder_out.device starts_new_word = get_starts_word(tokenizer, decoder.config.vocab_size).to(device) continues_word = torch.logical_not(starts_new_word) continues_word[tokenizer.all_special_ids] = 0 mat_size = max(len(x) for x in constraints) + 1 allowed_word_mat = [] for const in constraints: mat = build_allowed_word_matrix(const, starts_new_word, continues_word, tokenizer) mat = F.pad(mat, [0, 0, 0, mat_size - mat.size(0)]) allowed_word_mat.append(mat) allowed_word_mat = torch.stack(allowed_word_mat, 0) allowed_word_mat = allowed_word_mat.to(torch.bool) initial_state = dict( encoder_mask=encoder_mask, batch_id=torch.arange(0, batch_size, device=device, dtype=torch.long), num_spaces=torch.zeros(batch_size, device=device, dtype=torch.long), encoder_outputs=encoder_out ) banned_tensor = None if prevent_known_incorrect_words: banned_lists = [x for x in utils.flatten_list(constraints) if isinstance(x, list)] n_words = 0 if len(banned_lists) == 0 else max(len(x) for x in banned_lists) if n_words > 0: n_word_peices = max(len(tokenizer.encode(x, add_special_tokens=False)) for x in utils.flatten_list(banned_lists)) banned_tensor = torch.full((len(constraints), mat_size, n_words, n_word_peices+1), -1, dtype=torch.long) banned_lens = torch.full((len(constraints), mat_size, n_words), -1, dtype=torch.long) for game_ix, const in enumerate(constraints): for word_ix, c in enumerate(const, start=1): if isinstance(c, list): for banned_ix, word in enumerate(c): word_pieces = tokenizer.encode(word, add_special_tokens=False) banned_lens[game_ix, word_ix, banned_ix] = len(word_pieces) for word_piece_ix, wp in enumerate(word_pieces): banned_tensor[game_ix, word_ix, banned_ix, word_piece_ix] = wp banned_tensor = banned_tensor.to(device=device).transpose(2, 3) banned_lens = banned_lens.to(device=device) banned_tensor = (banned_tensor, banned_lens) initial_state["num_word_pieces"] = torch.zeros(batch_size, device=device, dtype=torch.long) initial_state["on_banned"] = torch.zeros(batch_size, n_words, device=device, dtype=torch.bool) # extra tokens count as generating a space starts_new_word[32000:] = 1.0 def _decode_step(predictions, prev_state): return decoding_step(decoder, predictions, prev_state, starts_new_word, continues_word, allowed_word_mat, constraints_before_softmax, post_process, banned_tensor) initial_out = torch.full( (batch_size,), tokenizer.pad_token_id, dtype=torch.long, device=device) return initial_out, initial_state, _decode_step def decoding_step(decoder, predictions, prev_state, starts_new_word, continues_word, allowed_words_mat, constraints_before_softmax, post_process=None, banned_tensor=None): num_spaces = prev_state["num_spaces"] batch_ids = prev_state["batch_id"] generated_space = starts_new_word[predictions] num_spaces = num_spaces + generated_space.to(torch.long) past = utils.flat_to_nested_struct({k: v.contiguous() for k, v in prev_state.items() if isinstance(k, tuple)}) model_inputs = decoder.prepare_inputs_for_generation( predictions.unsqueeze(1), past=past, attention_mask=prev_state["encoder_mask"], encoder_outputs=(prev_state["encoder_outputs"],), use_cache=True) out: Seq2SeqLMOutput = decoder(**model_inputs, return_dict=True) next_state = dict( encoder_mask=prev_state["encoder_mask"], num_spaces=num_spaces, batch_id=batch_ids, encoder_outputs=prev_state["encoder_outputs"], ) if post_process is not None: logits = post_process(out, model_inputs) else: logits = out.logits logits = logits.squeeze(1) cur_const = allowed_words_mat[batch_ids, num_spaces] if banned_tensor is not None: # Remove word pieces that would result in generating a banned (aka already-guessed) word # The high-level idea if we track what word number we are generating and what # word peice in that word we are on, then use that to figure out if we generating a # banned word for that word slot. If we are have completely generated a banned word, # we prevent the model from generating any word piece that would result in a space # so that generation complete that banned word. banned_tensor, banned_lens = banned_tensor on_piece = prev_state["num_word_pieces"] on_piece = torch.logical_not(generated_space).to(torch.long)*(1 + on_piece) next_state["num_word_pieces"] = on_piece on_banned = prev_state["on_banned"] # [batch, n_words] on_banned[generated_space] = True batch, _, n_pieces, n_word = banned_tensor.size() on_piece = torch.min(on_piece, torch.as_tensor(n_pieces-1).to(on_piece)) # [batch, n_words] continued_banned = banned_tensor[prev_state["batch_id"], num_spaces, on_piece] # [batch, n_words] continue_banned_lens = banned_lens[prev_state["batch_id"], num_spaces] on_banned = torch.logical_and(continued_banned == predictions.unsqueeze(1), on_banned) next_state["on_banned"] = on_banned is_banned_word = torch.any(torch.logical_and(on_banned, continue_banned_lens == (on_piece+1).unsqueeze(1)), 1) cur_const = cur_const.to(torch.bool) cur_const = torch.logical_and(cur_const, torch.logical_not(torch.logical_and(is_banned_word.unsqueeze(1), torch.logical_not(continues_word).unsqueeze(0)))) cur_const = torch.logical_not(cur_const).float() if constraints_before_softmax: logits -= cur_const * 100000 logits = F.log_softmax(logits, -1) if not constraints_before_softmax: logits -= cur_const * 100000 utils.nested_struct_to_flat(out.past_key_values, (), cur_dict=next_state) return logits, next_state def t5_decoding_token_constraints(tokenizer, decoder, encoder_out, encoder_mask, constraints, constraints_before_softmax=False): """ Decode with per-token constraints, used for the drawer """ batch_size = encoder_out.size(0) device = encoder_out.device initial_state = dict( encoder_mask=encoder_mask, encoder_outputs=encoder_out, time=torch.zeros(batch_size, device=encoder_out.device, dtype=torch.long) ) def _decode_step(predictions, prev_state): return decoding_step_token_constraints( decoder, predictions, prev_state, constraints, constraints_before_softmax) initial_out = torch.full( (batch_size,), tokenizer.pad_token_id, dtype=torch.long, device=device) return initial_out, initial_state, _decode_step def decoding_step_token_constraints( decoder, predictions, prev_state, constraints, constraints_before_softmax): time = prev_state["time"] past = utils.flat_to_nested_struct({k: v.contiguous() for k, v in prev_state.items() if isinstance(k, tuple)}) model_inputs = decoder.prepare_inputs_for_generation( predictions.unsqueeze(1), past=past, attention_mask=prev_state["encoder_mask"], encoder_outputs=(prev_state["encoder_outputs"],), use_cache=True) out = decoder(**model_inputs, return_dict=True) next_state = dict( encoder_mask=prev_state["encoder_mask"], time=(time+1) % constraints.size(0), encoder_outputs=prev_state["encoder_outputs"] ) logits = out.logits.squeeze(1) constraint = constraints[time[0]] if len(constraint.size()) == 2: constraint = constraint.unsqueeze(1) if constraints_before_softmax: logits -= (1 - constraint.float()) * 100000 logits = F.log_softmax(logits, -1) if not constraints_before_softmax: logits -= (1 - constraint.float()) * 100000 utils.nested_struct_to_flat(out.past_key_values, (), cur_dict=next_state) return logits, next_state
[ 1, 529, 276, 1112, 420, 29958, 5442, 1794, 29914, 4144, 653, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 3403, 293, 304, 671, 323, 29945, 297, 599, 2108, 22833, 29915, 29879, 1522, 314, 7974, 13, 13, 4013, 6511, 502, 304, 671, 323, 29945, 304, 1653, 278, 2847, 29918, 3859, 29892, 6257, 27303, 29892, 322, 421, 14448, 6678, 1542, 29952, 13, 12171, 4312, 304, 1065, 421, 3629, 314, 7974, 29952, 515, 599, 2108, 22833, 29889, 739, 884, 7805, 278, 7276, 5900, 591, 671, 304, 13, 7469, 18492, 414, 7738, 2854, 4216, 886, 322, 2088, 16136, 7738, 2854, 4140, 267, 29889, 13, 13, 4806, 671, 599, 2108, 22833, 1363, 372, 1522, 314, 7974, 338, 4780, 304, 671, 322, 788, 11938, 304, 29892, 322, 298, 688, 3460, 17240, 13, 3259, 338, 1568, 901, 5189, 304, 6623, 29889, 13, 15945, 29908, 13, 13, 5215, 4842, 305, 13, 3166, 4327, 414, 1053, 323, 29945, 6066, 3950, 13, 3166, 4327, 414, 29889, 4299, 292, 29918, 4905, 29879, 1053, 25981, 29906, 23718, 26369, 6466, 13, 13, 3166, 9849, 653, 29889, 1272, 29889, 14538, 1691, 1053, 8448, 29925, 1092, 559, 27427, 13, 3166, 9849, 653, 29889, 13239, 1053, 3667, 29879, 13, 3166, 4842, 305, 29889, 15755, 1053, 13303, 408, 383, 13, 13, 13, 29918, 29873, 29945, 29918, 517, 12360, 29918, 2541, 29918, 22854, 353, 6213, 13, 13, 13, 1753, 679, 29918, 517, 12360, 29918, 2541, 29918, 3493, 29898, 6979, 3950, 1125, 13, 29871, 4974, 338, 8758, 29898, 6979, 3950, 29892, 323, 29945, 6066, 3950, 29897, 13, 29871, 5534, 903, 29873, 29945, 29918, 517, 12360, 29918, 2541, 29918, 22854, 13, 29871, 565, 903, 29873, 29945, 29918, 517, 12360, 29918, 2541, 29918, 22854, 338, 6213, 29901, 13, 1678, 1369, 29918, 974, 29918, 1742, 29918, 517, 12360, 29918, 861, 353, 5159, 13, 1678, 363, 413, 29892, 474, 29916, 297, 5993, 3950, 29889, 657, 29918, 29894, 542, 370, 2141, 7076, 7295, 13, 418, 565, 413, 29889, 27382, 2541, 703, 376, 1125, 13, 4706, 1369, 29918, 974, 29918, 1742, 29918, 517, 12360, 29918, 861, 29889, 4397, 29898, 861, 29897, 13, 1678, 1369, 29918, 974, 29918, 1742, 29918, 517, 12360, 29918, 861, 353, 4842, 305, 29889, 20158, 29898, 2962, 29918, 974, 29918, 1742, 29918, 517, 12360, 29918, 861, 29892, 26688, 29922, 7345, 305, 29889, 5426, 29897, 13, 1678, 903, 29873, 29945, 29918, 517, 12360, 29918, 2541, 29918, 22854, 353, 1369, 29918, 974, 29918, 1742, 29918, 517, 12360, 29918, 861, 13, 29871, 736, 903, 29873, 29945, 29918, 517, 12360, 29918, 2541, 29918, 22854, 13, 13, 13, 1753, 679, 29918, 27382, 29918, 1742, 29898, 6979, 3950, 29892, 7931, 29918, 2311, 29922, 8516, 1125, 13, 29871, 565, 7931, 29918, 2311, 338, 6213, 29901, 13, 1678, 7931, 29918, 2311, 353, 7431, 29898, 6979, 3950, 29897, 13, 29871, 1369, 29918, 974, 29918, 1742, 29918, 517, 12360, 29918, 861, 353, 679, 29918, 517, 12360, 29918, 2541, 29918, 3493, 29898, 6979, 3950, 29897, 13, 29871, 8665, 29918, 1482, 29918, 1742, 353, 4842, 305, 29889, 3298, 359, 29898, 29894, 542, 29918, 2311, 29892, 26688, 29922, 7345, 305, 29889, 11227, 29897, 13, 29871, 8665, 29918, 1482, 29918, 1742, 29961, 2962, 29918, 974, 29918, 1742, 29918, 517, 12360, 29918, 861, 29962, 353, 29871, 29896, 13, 29871, 736, 8665, 29918, 1482, 29918, 1742, 13, 13, 13, 1753, 2048, 29918, 24622, 29918, 1742, 29918, 5344, 29898, 13, 1678, 11938, 29901, 8448, 29925, 1092, 559, 27427, 29892, 8665, 29918, 1482, 29918, 1742, 29892, 18172, 29918, 1742, 29892, 5993, 3950, 1125, 13, 29871, 9995, 13, 29871, 584, 3207, 11938, 29901, 515, 421, 29902, 1516, 1981, 14199, 29889, 657, 29918, 13646, 29879, 2555, 13, 29871, 584, 3207, 8665, 29918, 1482, 29918, 1742, 29901, 518, 29894, 542, 370, 29918, 2311, 29962, 12489, 411, 29871, 29896, 23941, 1734, 12785, 393, 788, 263, 2913, 13, 29871, 584, 3207, 5993, 3950, 29901, 323, 29945, 25159, 3950, 304, 671, 13, 29871, 584, 2457, 29901, 319, 4636, 310, 313, 4537, 310, 8162, 577, 2215, 1599, 6068, 5993, 12785, 29897, 445, 4636, 1040, 336, 1144, 13, 965, 12623, 297, 263, 982, 393, 1904, 13880, 278, 1492, 1353, 310, 3838, 29892, 322, 577, 393, 278, 13, 965, 1904, 313, 5514, 470, 3109, 29897, 756, 304, 7738, 278, 3838, 393, 526, 2998, 304, 367, 1959, 29889, 13, 29871, 9995, 13, 29871, 396, 6068, 29918, 9303, 29961, 29875, 29962, 338, 3838, 393, 526, 6068, 1156, 278, 372, 29882, 2913, 756, 1063, 2715, 13, 29871, 6068, 29918, 9303, 353, 5159, 13, 13, 29871, 363, 474, 29892, 1040, 297, 26985, 29898, 13646, 29879, 1125, 13, 13, 1678, 565, 338, 8758, 29898, 3075, 29892, 1051, 1125, 13, 418, 565, 474, 1275, 29871, 29900, 29901, 13, 4706, 396, 19928, 1369, 263, 716, 1734, 472, 4331, 29871, 29896, 13, 4706, 6068, 353, 8665, 29918, 1482, 29918, 1742, 29889, 16513, 580, 13, 418, 25342, 338, 8758, 29898, 13646, 29879, 29961, 29875, 448, 29871, 29896, 1402, 851, 1125, 13, 4706, 396, 20370, 1369, 738, 716, 1734, 13, 4706, 6068, 353, 8665, 29918, 1482, 29918, 1742, 29889, 16513, 580, 13, 4706, 396, 1394, 6773, 278, 3517, 1959, 1734, 13, 4706, 6068, 29961, 6979, 3950, 29889, 12508, 29898, 13646, 29879, 29961, 29875, 448, 29871, 29896, 1402, 788, 29918, 18732, 29918, 517, 12360, 29922, 8824, 9601, 29896, 29901, 5262, 353, 29871, 29896, 13, 418, 1683, 29901, 13, 4706, 396, 530, 1541, 292, 5771, 29892, 5174, 4266, 18897, 13, 4706, 6068, 353, 4842, 305, 29889, 2873, 29918, 4561, 29898, 27382, 29918, 1482, 29918, 1742, 29892, 26688, 29922, 7345, 305, 29889, 7411, 29897, 13, 4706, 6068, 29961, 6979, 3950, 29889, 497, 29918, 18732, 29918, 4841, 29962, 353, 29871, 29900, 13, 418, 6068, 29918, 9303, 29889, 4397, 29898, 24622, 29897, 13, 13, 1678, 1683, 29901, 13, 418, 1881, 29918, 333, 353, 5993, 3950, 29889, 12508, 29898, 3075, 29892, 788, 29918, 18732, 29918, 517, 12360, 29922, 8824, 29897, 13, 418, 1959, 29918, 1742, 353, 1881, 29918, 333, 29961, 29900, 29962, 13, 418, 565, 474, 1275, 29871, 29900, 29901, 13, 4706, 396, 2860, 278, 349, 3035, 5993, 29892, 508, 871, 1369, 278, 716, 29892, 1959, 1734, 13, 4706, 6068, 353, 4842, 305, 29889, 3298, 359, 29918, 4561, 29898, 27382, 29918, 1482, 29918, 1742, 29897, 13, 4706, 6068, 29961, 15728, 29918, 1742, 29962, 353, 29871, 29896, 13, 418, 25342, 338, 8758, 29898, 13646, 29879, 29961, 29875, 29899, 29896, 1402, 851, 1125, 13, 4706, 6068, 353, 4842, 305, 29889, 3298, 359, 29918, 4561, 29898, 27382, 29918, 1482, 29918, 1742, 29897, 13, 4706, 396, 530, 1541, 292, 393, 1033, 6773, 278, 3517, 1959, 1734, 13, 4706, 6068, 29961, 6979, 3950, 29889, 12508, 29918, 2541, 29918, 8173, 29898, 13646, 29879, 29961, 29875, 29899, 29896, 2314, 29961, 29896, 29901, 5262, 353, 29871, 29896, 13, 4706, 6068, 29961, 15728, 29918, 1742, 29962, 353, 29871, 29896, 29871, 396, 1126, 278, 1369, 310, 278, 1959, 1734, 13, 418, 1683, 29901, 13, 4706, 6068, 353, 18172, 29918, 1742, 29889, 16513, 580, 29871, 396, 530, 1541, 292, 393, 947, 6058, 1369, 263, 716, 1734, 13, 4706, 6068, 29961, 15728, 29918, 1742, 29962, 353, 29871, 29896, 29871, 396, 1126, 278, 1369, 310, 278, 1959, 1734, 13, 418, 6068, 29918, 9303, 29889, 4397, 29898, 24622, 29897, 13, 13, 29871, 6068, 353, 18172, 29918, 1742, 29889, 16513, 580, 29871, 396, 530, 1541, 292, 393, 947, 6058, 1369, 263, 716, 1734, 13, 29871, 6068, 29961, 6979, 3950, 29889, 29872, 359, 29918, 6979, 29918, 333, 29962, 353, 29871, 29896, 396, 1126, 278, 382, 3267, 5993, 13, 29871, 6068, 29918, 9303, 29889, 4397, 29898, 24622, 29897, 13, 29871, 736, 4842, 305, 29889, 1429, 29898, 24622, 29918, 9303, 29892, 3964, 29922, 29900, 29897, 13, 13, 13, 1753, 260, 29945, 29918, 24926, 29918, 7099, 3689, 29898, 13, 1678, 5993, 3950, 29892, 1602, 6119, 29892, 2094, 6119, 29918, 449, 29892, 2094, 6119, 29918, 13168, 29892, 11938, 29892, 13, 1678, 11938, 29918, 11083, 29918, 2695, 3317, 29922, 8824, 29892, 1400, 29918, 5014, 29922, 8516, 29892, 13, 1678, 5557, 29918, 5203, 29918, 262, 15728, 29918, 9303, 29922, 8824, 13, 1125, 13, 29871, 9853, 29918, 2311, 353, 2094, 6119, 29918, 449, 29889, 2311, 29898, 29900, 29897, 13, 29871, 4742, 353, 2094, 6119, 29918, 449, 29889, 10141, 13, 29871, 8665, 29918, 1482, 29918, 1742, 353, 679, 29918, 27382, 29918, 1742, 29898, 6979, 3950, 29892, 1602, 6119, 29889, 2917, 29889, 29894, 542, 370, 29918, 2311, 467, 517, 29898, 10141, 29897, 13, 13, 29871, 18172, 29918, 1742, 353, 4842, 305, 29889, 1188, 936, 29918, 1333, 29898, 27382, 29918, 1482, 29918, 1742, 29897, 13, 29871, 18172, 29918, 1742, 29961, 6979, 3950, 29889, 497, 29918, 18732, 29918, 4841, 29962, 353, 29871, 29900, 13, 13, 29871, 1775, 29918, 2311, 353, 4236, 29898, 2435, 29898, 29916, 29897, 363, 921, 297, 11938, 29897, 718, 29871, 29896, 13, 29871, 6068, 29918, 1742, 29918, 2922, 353, 5159, 13, 29871, 363, 1040, 297, 11938, 29901, 13, 1678, 1775, 353, 2048, 29918, 24622, 29918, 1742, 29918, 5344, 29898, 3075, 29892, 8665, 29918, 1482, 29918, 1742, 29892, 18172, 29918, 1742, 29892, 5993, 3950, 29897, 13, 1678, 1775, 353, 383, 29889, 8305, 29898, 2922, 29892, 518, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 1775, 29918, 2311, 448, 1775, 29889, 2311, 29898, 29900, 29897, 2314, 13, 1678, 6068, 29918, 1742, 29918, 2922, 29889, 4397, 29898, 2922, 29897, 13, 29871, 6068, 29918, 1742, 29918, 2922, 353, 4842, 305, 29889, 1429, 29898, 24622, 29918, 1742, 29918, 2922, 29892, 29871, 29900, 29897, 13, 29871, 6068, 29918, 1742, 29918, 2922, 353, 6068, 29918, 1742, 29918, 2922, 29889, 517, 29898, 7345, 305, 29889, 11227, 29897, 13, 13, 29871, 2847, 29918, 3859, 353, 9657, 29898, 13, 1678, 2094, 6119, 29918, 13168, 29922, 3977, 6119, 29918, 13168, 29892, 13, 1678, 9853, 29918, 333, 29922, 7345, 305, 29889, 279, 927, 29898, 29900, 29892, 9853, 29918, 2311, 29892, 4742, 29922, 10141, 29892, 26688, 29922, 7345, 305, 29889, 5426, 511, 13, 1678, 954, 29918, 22854, 29922, 7345, 305, 29889, 3298, 359, 29898, 16175, 29918, 2311, 29892, 4742, 29922, 10141, 29892, 26688, 29922, 7345, 305, 29889, 5426, 511, 13, 1678, 2094, 6119, 29918, 4905, 29879, 29922, 3977, 6119, 29918, 449, 13, 29871, 1723, 13, 13, 29871, 289, 11310, 29918, 20158, 353, 6213, 13, 29871, 565, 5557, 29918, 5203, 29918, 262, 15728, 29918, 9303, 29901, 13, 1678, 289, 11310, 29918, 21513, 353, 518, 29916, 363, 921, 297, 3667, 29879, 29889, 1579, 8606, 29918, 1761, 29898, 13646, 29879, 29897, 565, 338, 8758, 29898, 29916, 29892, 1051, 4638, 13, 1678, 302, 29918, 9303, 353, 29871, 29900, 565, 7431, 29898, 29890, 11310, 29918, 21513, 29897, 1275, 29871, 29900, 1683, 4236, 29898, 2435, 29898, 29916, 29897, 363, 921, 297, 289, 11310, 29918, 21513, 29897, 13, 1678, 565, 302, 29918, 9303, 1405, 29871, 29900, 29901, 13, 418, 302, 29918, 1742, 29918, 412, 1575, 353, 4236, 29898, 2435, 29898, 6979, 3950, 29889, 12508, 29898, 29916, 29892, 788, 29918, 18732, 29918, 517, 12360, 29922, 8824, 876, 363, 921, 297, 3667, 29879, 29889, 1579, 8606, 29918, 1761, 29898, 29890, 11310, 29918, 21513, 876, 13, 418, 289, 11310, 29918, 20158, 353, 4842, 305, 29889, 8159, 3552, 2435, 29898, 13646, 29879, 511, 1775, 29918, 2311, 29892, 302, 29918, 9303, 29892, 302, 29918, 1742, 29918, 412, 1575, 29974, 29896, 511, 448, 29896, 29892, 26688, 29922, 7345, 305, 29889, 5426, 29897, 13, 418, 289, 11310, 29918, 29880, 575, 353, 4842, 305, 29889, 8159, 3552, 2435, 29898, 13646, 29879, 511, 1775, 29918, 2311, 29892, 302, 29918, 9303, 511, 448, 29896, 29892, 26688, 29922, 7345, 305, 29889, 5426, 29897, 13, 418, 363, 3748, 29918, 861, 29892, 1040, 297, 26985, 29898, 13646, 29879, 1125, 13, 4706, 363, 1734, 29918, 861, 29892, 274, 297, 26985, 29898, 3075, 29892, 1369, 29922, 29896, 1125, 13, 3986, 565, 338, 8758, 29898, 29883, 29892, 1051, 1125, 13, 9651, 363, 289, 11310, 29918, 861, 29892, 1734, 297, 26985, 29898, 29883, 1125, 13, 795, 1734, 29918, 12343, 778, 353, 5993, 3950, 29889, 12508, 29898, 1742, 29892, 788, 29918, 18732, 29918, 517, 12360, 29922, 8824, 29897, 13, 795, 289, 11310, 29918, 29880, 575, 29961, 11802, 29918, 861, 29892, 1734, 29918, 861, 29892, 289, 11310, 29918, 861, 29962, 353, 7431, 29898, 1742, 29918, 12343, 778, 29897, 13, 795, 363, 1734, 29918, 12343, 346, 29918, 861, 29892, 19247, 297, 26985, 29898, 1742, 29918, 12343, 778, 1125, 13, 18884, 289, 11310, 29918, 20158, 29961, 11802, 29918, 861, 29892, 1734, 29918, 861, 29892, 289, 11310, 29918, 861, 29892, 1734, 29918, 12343, 346, 29918, 861, 29962, 353, 19247, 13, 418, 289, 11310, 29918, 20158, 353, 289, 11310, 29918, 20158, 29889, 517, 29898, 10141, 29922, 10141, 467, 3286, 4220, 29898, 29906, 29892, 29871, 29941, 29897, 13, 418, 289, 11310, 29918, 29880, 575, 353, 289, 11310, 29918, 29880, 575, 29889, 517, 29898, 10141, 29922, 10141, 29897, 13, 418, 289, 11310, 29918, 20158, 353, 313, 29890, 11310, 29918, 20158, 29892, 289, 11310, 29918, 29880, 575, 29897, 13, 418, 2847, 29918, 3859, 3366, 1949, 29918, 1742, 29918, 12343, 778, 3108, 353, 4842, 305, 29889, 3298, 359, 29898, 16175, 29918, 2311, 29892, 4742, 29922, 10141, 29892, 26688, 29922, 7345, 305, 29889, 5426, 29897, 13, 418, 2847, 29918, 3859, 3366, 265, 29918, 29890, 11310, 3108, 353, 4842, 305, 29889, 3298, 359, 29898, 16175, 29918, 2311, 29892, 302, 29918, 9303, 29892, 4742, 29922, 10141, 29892, 26688, 29922, 7345, 305, 29889, 11227, 29897, 13, 13, 29871, 396, 4805, 18897, 2302, 408, 14655, 263, 2913, 13, 29871, 8665, 29918, 1482, 29918, 1742, 29961, 29941, 29906, 29900, 29900, 29900, 17531, 353, 29871, 29896, 29889, 29900, 13, 13, 29871, 822, 903, 13808, 29918, 10568, 29898, 27711, 1080, 29892, 12379, 29918, 3859, 1125, 13, 1678, 736, 1602, 3689, 29918, 10568, 29898, 7099, 6119, 29892, 27303, 29892, 12379, 29918, 3859, 29892, 8665, 29918, 1482, 29918, 1742, 29892, 18172, 29918, 1742, 29892, 13, 462, 308, 6068, 29918, 1742, 29918, 2922, 29892, 11938, 29918, 11083, 29918, 2695, 3317, 29892, 1400, 29918, 5014, 29892, 289, 11310, 29918, 20158, 29897, 13, 13, 29871, 2847, 29918, 449, 353, 4842, 305, 29889, 8159, 29898, 13, 1678, 313, 16175, 29918, 2311, 29892, 511, 5993, 3950, 29889, 8305, 29918, 6979, 29918, 333, 29892, 26688, 29922, 7345, 305, 29889, 5426, 29892, 4742, 29922, 10141, 29897, 13, 13, 29871, 736, 2847, 29918, 449, 29892, 2847, 29918, 3859, 29892, 903, 13808, 29918, 10568, 13, 13, 13, 1753, 1602, 3689, 29918, 10568, 29898, 7099, 6119, 29892, 27303, 29892, 12379, 29918, 3859, 29892, 8665, 29918, 1482, 29918, 1742, 29892, 18172, 29918, 1742, 29892, 13, 462, 29871, 6068, 29918, 9303, 29918, 2922, 29892, 11938, 29918, 11083, 29918, 2695, 3317, 29892, 13, 462, 29871, 1400, 29918, 5014, 29922, 8516, 29892, 289, 11310, 29918, 20158, 29922, 8516, 1125, 13, 29871, 954, 29918, 22854, 353, 12379, 29918, 3859, 3366, 1949, 29918, 22854, 3108, 13, 29871, 9853, 29918, 4841, 353, 12379, 29918, 3859, 3366, 16175, 29918, 333, 3108, 13, 29871, 5759, 29918, 3493, 353, 8665, 29918, 1482, 29918, 1742, 29961, 27711, 1080, 29962, 13, 29871, 954, 29918, 22854, 353, 954, 29918, 22854, 718, 5759, 29918, 3493, 29889, 517, 29898, 7345, 305, 29889, 5426, 29897, 13, 13, 29871, 4940, 353, 3667, 29879, 29889, 20620, 29918, 517, 29918, 27420, 29918, 4984, 3319, 29895, 29901, 325, 29889, 1285, 5526, 681, 580, 363, 413, 29892, 325, 297, 12379, 29918, 3859, 29889, 7076, 580, 13, 462, 462, 418, 565, 338, 8758, 29898, 29895, 29892, 18761, 26972, 13, 29871, 1904, 29918, 2080, 29879, 353, 1602, 6119, 29889, 19125, 29918, 2080, 29879, 29918, 1454, 29918, 4738, 362, 29898, 13, 1678, 27303, 29889, 6948, 802, 29872, 911, 29898, 29896, 511, 4940, 29922, 29886, 579, 29892, 8570, 29918, 13168, 29922, 16304, 29918, 3859, 3366, 3977, 6119, 29918, 13168, 12436, 13, 1678, 2094, 6119, 29918, 4905, 29879, 7607, 16304, 29918, 3859, 3366, 3977, 6119, 29918, 4905, 29879, 12436, 511, 13, 1678, 671, 29918, 8173, 29922, 5574, 29897, 13, 29871, 714, 29901, 25981, 29906, 23718, 26369, 6466, 353, 1602, 6119, 29898, 1068, 4299, 29918, 2080, 29879, 29892, 736, 29918, 8977, 29922, 5574, 29897, 13, 13, 29871, 2446, 29918, 3859, 353, 9657, 29898, 13, 1678, 2094, 6119, 29918, 13168, 29922, 16304, 29918, 3859, 3366, 3977, 6119, 29918, 13168, 12436, 13, 1678, 954, 29918, 22854, 29922, 1949, 29918, 22854, 29892, 13, 1678, 9853, 29918, 333, 29922, 16175, 29918, 4841, 29892, 13, 1678, 2094, 6119, 29918, 4905, 29879, 29922, 16304, 29918, 3859, 3366, 3977, 6119, 29918, 4905, 29879, 12436, 13, 29871, 1723, 13, 13, 29871, 565, 1400, 29918, 5014, 338, 451, 6213, 29901, 13, 1678, 1480, 1169, 353, 1400, 29918, 5014, 29898, 449, 29892, 1904, 29918, 2080, 29879, 29897, 13, 29871, 1683, 29901, 13, 1678, 1480, 1169, 353, 714, 29889, 1188, 1169, 13, 29871, 1480, 1169, 353, 1480, 1169, 29889, 29879, 802, 29872, 911, 29898, 29896, 29897, 13, 29871, 3151, 29918, 3075, 353, 6068, 29918, 9303, 29918, 2922, 29961, 16175, 29918, 4841, 29892, 954, 29918, 22854, 29962, 13, 13, 29871, 565, 289, 11310, 29918, 20158, 338, 451, 6213, 29901, 13, 1678, 396, 15154, 1734, 12785, 393, 723, 1121, 297, 14655, 263, 289, 11310, 313, 8245, 2307, 29899, 2543, 11517, 29897, 1734, 13, 1678, 396, 450, 1880, 29899, 5563, 2969, 565, 591, 5702, 825, 1734, 1353, 591, 526, 14655, 322, 825, 13, 1678, 396, 1734, 1236, 625, 297, 393, 1734, 591, 526, 373, 29892, 769, 671, 393, 304, 4377, 714, 565, 591, 14655, 263, 13, 1678, 396, 289, 11310, 1734, 363, 393, 1734, 21497, 29889, 960, 591, 526, 505, 6446, 5759, 263, 289, 11310, 1734, 29892, 13, 1678, 396, 591, 5557, 278, 1904, 515, 14655, 738, 1734, 8424, 393, 723, 1121, 297, 263, 2913, 13, 1678, 396, 577, 393, 12623, 4866, 393, 289, 11310, 1734, 29889, 13, 1678, 289, 11310, 29918, 20158, 29892, 289, 11310, 29918, 29880, 575, 353, 289, 11310, 29918, 20158, 13, 1678, 373, 29918, 12343, 346, 353, 12379, 29918, 3859, 3366, 1949, 29918, 1742, 29918, 12343, 778, 3108, 13, 1678, 373, 29918, 12343, 346, 353, 4842, 305, 29889, 1188, 936, 29918, 1333, 29898, 13525, 29918, 3493, 467, 517, 29898, 7345, 305, 29889, 5426, 11877, 29898, 29896, 718, 373, 29918, 12343, 346, 29897, 13, 1678, 2446, 29918, 3859, 3366, 1949, 29918, 1742, 29918, 12343, 778, 3108, 353, 373, 29918, 12343, 346, 13, 13, 1678, 373, 29918, 29890, 11310, 353, 12379, 29918, 3859, 3366, 265, 29918, 29890, 11310, 3108, 259, 396, 518, 16175, 29892, 302, 29918, 9303, 29962, 13, 1678, 373, 29918, 29890, 11310, 29961, 13525, 29918, 3493, 29962, 353, 5852, 13, 1678, 9853, 29892, 17117, 302, 29918, 12343, 778, 29892, 302, 29918, 1742, 353, 289, 11310, 29918, 20158, 29889, 2311, 580, 13, 1678, 373, 29918, 12343, 346, 353, 4842, 305, 29889, 1195, 29898, 265, 29918, 12343, 346, 29892, 4842, 305, 29889, 294, 29918, 20158, 29898, 29876, 29918, 12343, 778, 29899, 29896, 467, 517, 29898, 265, 29918, 12343, 346, 876, 13, 13, 1678, 396, 518, 16175, 29892, 302, 29918, 9303, 29962, 13, 1678, 7572, 29918, 29890, 11310, 353, 289, 11310, 29918, 20158, 29961, 16304, 29918, 3859, 3366, 16175, 29918, 333, 12436, 954, 29918, 22854, 29892, 373, 29918, 12343, 346, 29962, 13, 13, 1678, 396, 518, 16175, 29892, 302, 29918, 9303, 29962, 13, 1678, 6773, 29918, 29890, 11310, 29918, 29880, 575, 353, 289, 11310, 29918, 29880, 575, 29961, 16304, 29918, 3859, 3366, 16175, 29918, 333, 12436, 954, 29918, 22854, 29962, 13, 13, 1678, 373, 29918, 29890, 11310, 353, 4842, 305, 29889, 1188, 936, 29918, 392, 29898, 1285, 262, 6742, 29918, 29890, 11310, 1275, 27303, 29889, 6948, 802, 29872, 911, 29898, 29896, 511, 373, 29918, 29890, 11310, 29897, 13, 1678, 2446, 29918, 3859, 3366, 265, 29918, 29890, 11310, 3108, 353, 373, 29918, 29890, 11310, 13, 1678, 338, 29918, 29890, 11310, 29918, 1742, 353, 4842, 305, 29889, 1384, 29898, 7345, 305, 29889, 1188, 936, 29918, 392, 29898, 265, 29918, 29890, 11310, 29892, 6773, 29918, 29890, 11310, 29918, 29880, 575, 1275, 313, 265, 29918, 12343, 346, 29974, 29896, 467, 6948, 802, 29872, 911, 29898, 29896, 8243, 29871, 29896, 29897, 13, 1678, 3151, 29918, 3075, 353, 3151, 29918, 3075, 29889, 517, 29898, 7345, 305, 29889, 11227, 29897, 13, 1678, 3151, 29918, 3075, 353, 4842, 305, 29889, 1188, 936, 29918, 392, 29898, 2764, 29918, 3075, 29892, 4842, 305, 29889, 1188, 936, 29918, 1333, 29898, 7345, 305, 29889, 1188, 936, 29918, 392, 29898, 275, 29918, 29890, 11310, 29918, 1742, 29889, 6948, 802, 29872, 911, 29898, 29896, 511, 4842, 305, 29889, 1188, 936, 29918, 1333, 29898, 1285, 262, 1041, 29918, 1742, 467, 6948, 802, 29872, 911, 29898, 29900, 13697, 13, 13, 29871, 3151, 29918, 3075, 353, 4842, 305, 29889, 1188, 936, 29918, 1333, 29898, 2764, 29918, 3075, 467, 7411, 580, 13, 13, 29871, 565, 11938, 29918, 11083, 29918, 2695, 3317, 29901, 13, 1678, 1480, 1169, 22361, 3151, 29918, 3075, 334, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 13, 13, 29871, 1480, 1169, 353, 383, 29889, 1188, 29918, 2695, 3317, 29898, 1188, 1169, 29892, 448, 29896, 29897, 13, 13, 29871, 565, 451, 11938, 29918, 11083, 29918, 2695, 3317, 29901, 13, 1678, 1480, 1169, 22361, 3151, 29918, 3075, 334, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 13, 13, 29871, 3667, 29879, 29889, 27420, 29918, 4984, 29918, 517, 29918, 20620, 29898, 449, 29889, 29886, 579, 29918, 1989, 29918, 5975, 29892, 313, 511, 3151, 29918, 8977, 29922, 4622, 29918, 3859, 29897, 13, 29871, 736, 1480, 1169, 29892, 2446, 29918, 3859, 13, 13, 13, 1753, 260, 29945, 29918, 7099, 3689, 29918, 6979, 29918, 13646, 29879, 29898, 6979, 3950, 29892, 1602, 6119, 29892, 2094, 6119, 29918, 449, 29892, 2094, 6119, 29918, 13168, 29892, 13, 462, 462, 29871, 11938, 29892, 11938, 29918, 11083, 29918, 2695, 3317, 29922, 8824, 1125, 13, 29871, 9995, 13, 29871, 897, 401, 411, 639, 29899, 6979, 11938, 29892, 1304, 363, 278, 7482, 556, 13, 29871, 9995, 13, 29871, 9853, 29918, 2311, 353, 2094, 6119, 29918, 449, 29889, 2311, 29898, 29900, 29897, 13, 29871, 4742, 353, 2094, 6119, 29918, 449, 29889, 10141, 13, 13, 29871, 2847, 29918, 3859, 353, 9657, 29898, 13, 1678, 2094, 6119, 29918, 13168, 29922, 3977, 6119, 29918, 13168, 29892, 13, 1678, 2094, 6119, 29918, 4905, 29879, 29922, 3977, 6119, 29918, 449, 29892, 13, 1678, 931, 29922, 7345, 305, 29889, 3298, 359, 29898, 16175, 29918, 2311, 29892, 4742, 29922, 3977, 6119, 29918, 449, 29889, 10141, 29892, 26688, 29922, 7345, 305, 29889, 5426, 29897, 13, 29871, 1723, 13, 13, 29871, 822, 903, 13808, 29918, 10568, 29898, 27711, 1080, 29892, 12379, 29918, 3859, 1125, 13, 1678, 736, 1602, 3689, 29918, 10568, 29918, 6979, 29918, 13646, 29879, 29898, 13, 418, 1602, 6119, 29892, 27303, 29892, 12379, 29918, 3859, 29892, 11938, 29892, 11938, 29918, 11083, 29918, 2695, 3317, 29897, 13, 13, 29871, 2847, 29918, 449, 353, 4842, 305, 29889, 8159, 29898, 13, 1678, 313, 16175, 29918, 2311, 29892, 511, 5993, 3950, 29889, 8305, 29918, 6979, 29918, 333, 29892, 26688, 29922, 7345, 305, 29889, 5426, 29892, 4742, 29922, 10141, 29897, 13, 13, 29871, 736, 2847, 29918, 449, 29892, 2847, 29918, 3859, 29892, 903, 13808, 29918, 10568, 13, 13, 13, 1753, 1602, 3689, 29918, 10568, 29918, 6979, 29918, 13646, 29879, 29898, 13, 1678, 1602, 6119, 29892, 27303, 29892, 12379, 29918, 3859, 29892, 11938, 29892, 11938, 29918, 11083, 29918, 2695, 3317, 1125, 13, 29871, 931, 353, 12379, 29918, 3859, 3366, 2230, 3108, 13, 13, 29871, 4940, 353, 3667, 29879, 29889, 20620, 29918, 517, 29918, 27420, 29918, 4984, 3319, 29895, 29901, 325, 29889, 1285, 5526, 681, 580, 363, 413, 29892, 325, 297, 12379, 29918, 3859, 29889, 7076, 580, 13, 462, 462, 418, 565, 338, 8758, 29898, 29895, 29892, 18761, 26972, 13, 29871, 1904, 29918, 2080, 29879, 353, 1602, 6119, 29889, 19125, 29918, 2080, 29879, 29918, 1454, 29918, 4738, 362, 29898, 13, 1678, 27303, 29889, 6948, 802, 29872, 911, 29898, 29896, 511, 4940, 29922, 29886, 579, 29892, 8570, 29918, 13168, 29922, 16304, 29918, 3859, 3366, 3977, 6119, 29918, 13168, 12436, 13, 1678, 2094, 6119, 29918, 4905, 29879, 7607, 16304, 29918, 3859, 3366, 3977, 6119, 29918, 4905, 29879, 12436, 511, 13, 1678, 671, 29918, 8173, 29922, 5574, 29897, 13, 29871, 714, 353, 1602, 6119, 29898, 1068, 4299, 29918, 2080, 29879, 29892, 736, 29918, 8977, 29922, 5574, 29897, 13, 29871, 2446, 29918, 3859, 353, 9657, 29898, 13, 1678, 2094, 6119, 29918, 13168, 29922, 16304, 29918, 3859, 3366, 3977, 6119, 29918, 13168, 12436, 13, 1678, 931, 7607, 2230, 29974, 29896, 29897, 1273, 11938, 29889, 2311, 29898, 29900, 511, 13, 1678, 2094, 6119, 29918, 4905, 29879, 29922, 16304, 29918, 3859, 3366, 3977, 6119, 29918, 4905, 29879, 3108, 13, 29871, 1723, 13, 29871, 1480, 1169, 353, 714, 29889, 1188, 1169, 29889, 29879, 802, 29872, 911, 29898, 29896, 29897, 13, 13, 29871, 7276, 353, 11938, 29961, 2230, 29961, 29900, 5262, 13, 29871, 565, 7431, 29898, 13646, 29889, 2311, 3101, 1275, 29871, 29906, 29901, 13, 1678, 7276, 353, 7276, 29889, 6948, 802, 29872, 911, 29898, 29896, 29897, 13, 13, 29871, 565, 11938, 29918, 11083, 29918, 2695, 3317, 29901, 13, 1678, 1480, 1169, 22361, 313, 29896, 448, 7276, 29889, 7411, 3101, 334, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 13, 13, 29871, 1480, 1169, 353, 383, 29889, 1188, 29918, 2695, 3317, 29898, 1188, 1169, 29892, 448, 29896, 29897, 13, 13, 29871, 565, 451, 11938, 29918, 11083, 29918, 2695, 3317, 29901, 13, 1678, 1480, 1169, 22361, 313, 29896, 448, 7276, 29889, 7411, 3101, 334, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 13, 13, 29871, 3667, 29879, 29889, 27420, 29918, 4984, 29918, 517, 29918, 20620, 29898, 449, 29889, 29886, 579, 29918, 1989, 29918, 5975, 29892, 313, 511, 3151, 29918, 8977, 29922, 4622, 29918, 3859, 29897, 13, 29871, 736, 1480, 1169, 29892, 2446, 29918, 3859, 13, 13, 2 ]
tests/test_doctest.py
nlaurance/sourceparse
0
75649
import doctest def test_doctests(): doctest.testfile("../README.rst") if __name__ == "__main__": test_doctests()
[ 1, 1053, 437, 312, 342, 13, 13, 13, 1753, 1243, 29918, 1867, 312, 9197, 7295, 13, 1678, 437, 312, 342, 29889, 1688, 1445, 703, 6995, 16310, 2303, 29889, 29878, 303, 1159, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1243, 29918, 1867, 312, 9197, 580, 13, 2 ]
src/a05obiekty/Knife.py
tborzyszkowski/PSPI_Wstep_do_programowania
2
129977
from .Tool import * class Knife(Tool): def __init__(self) -> None: super().__init__() def can_drill(self): return False def can_cut(self): return True def can_sweep(self): return False
[ 1, 515, 869, 12229, 1053, 334, 13, 13, 13, 1990, 8360, 1607, 29898, 12229, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29897, 1599, 6213, 29901, 13, 4706, 2428, 2141, 1649, 2344, 1649, 580, 13, 13, 1678, 822, 508, 29918, 7707, 453, 29898, 1311, 1125, 13, 4706, 736, 7700, 13, 13, 1678, 822, 508, 29918, 7582, 29898, 1311, 1125, 13, 4706, 736, 5852, 13, 13, 1678, 822, 508, 29918, 29879, 705, 1022, 29898, 1311, 1125, 13, 4706, 736, 7700, 13, 2 ]
docs/assets/greeting.py
pablodevs/StarwarsBlog
0
149424
<reponame>pablodevs/StarwarsBlog def blue(_str): return f"\033[0;33m{_str}\033[0m" print(f""" Hello 😁 ! Use the terminal to code! 1. Start the dev server by running {blue("$ npm run start")} 2. You can find a video tutorial and explanation on the README.md file. 3. Always read the terminal output, it's your best tool for debugging! """)
[ 1, 529, 276, 1112, 420, 29958, 29886, 12478, 356, 4270, 29914, 16213, 29893, 1503, 29933, 1188, 13, 1753, 7254, 7373, 710, 1125, 13, 1678, 736, 285, 26732, 29900, 29941, 29941, 29961, 29900, 29936, 29941, 29941, 29885, 29912, 29918, 710, 1012, 29900, 29941, 29941, 29961, 29900, 29885, 29908, 13, 13, 2158, 29898, 29888, 15945, 29908, 13, 10994, 29871, 243, 162, 155, 132, 1738, 4803, 278, 8638, 304, 775, 29991, 13, 13, 29896, 29889, 7370, 278, 2906, 1923, 491, 2734, 29871, 426, 9539, 703, 29938, 12480, 1065, 1369, 1159, 29913, 13, 29906, 29889, 887, 508, 1284, 263, 4863, 9673, 322, 8252, 373, 278, 5195, 3035, 2303, 29889, 3487, 934, 29889, 13, 29941, 29889, 29849, 1303, 278, 8638, 1962, 29892, 372, 29915, 29879, 596, 1900, 5780, 363, 13490, 29991, 13, 15945, 1159, 2 ]
network.py
QiaoZhongzheng/EWC-sample-PMNIST
0
2718
# -*- coding: UTF-8 -*- '''================================================= @Project -> File :EWC -> network @IDE :PyCharm @Author :<NAME> @Date :2021/6/23 20:28 @Desc : ==================================================''' from tensorflow.keras import Model from tensorflow.keras.layers import Dense, Conv2D,LeakyReLU,MaxPool2D,Flatten,Input def fcnn(): input = Input(shape=784,dtype='float32',name='input') # x = Dense(128,activation='relu')(input) # x = Dense(64,activation='relu')(x) # x = Dense(32,activation='relu')(x) x = Dense(256,activation='relu')(input) x = Dense(256,activation='relu')(x) output = Dense(10,activation='softmax')(x) return Model(input, output)
[ 1, 396, 448, 29930, 29899, 14137, 29901, 18351, 29899, 29947, 448, 29930, 29899, 13, 12008, 9166, 9166, 9166, 29922, 13, 29992, 7653, 1599, 3497, 1678, 30383, 29923, 29956, 29907, 1599, 3564, 13, 29992, 22027, 268, 30383, 19737, 1451, 2817, 13, 29992, 13720, 29871, 30383, 29966, 5813, 29958, 13, 29992, 2539, 1678, 30383, 29906, 29900, 29906, 29896, 29914, 29953, 29914, 29906, 29941, 29871, 29906, 29900, 29901, 29906, 29947, 13, 29992, 19617, 1678, 30383, 13, 9166, 9166, 9166, 1360, 12008, 13, 3166, 26110, 29889, 3946, 294, 1053, 8125, 13, 3166, 26110, 29889, 3946, 294, 29889, 29277, 1053, 360, 1947, 29892, 1281, 29894, 29906, 29928, 29892, 3226, 557, 29891, 1123, 29931, 29965, 29892, 7976, 11426, 29906, 29928, 29892, 29943, 5066, 841, 29892, 4290, 13, 13, 1753, 285, 29883, 15755, 7295, 13, 1678, 1881, 353, 10567, 29898, 12181, 29922, 29955, 29947, 29946, 29892, 29881, 1853, 2433, 7411, 29941, 29906, 742, 978, 2433, 2080, 1495, 13, 1678, 396, 921, 353, 360, 1947, 29898, 29896, 29906, 29947, 29892, 11236, 362, 2433, 2674, 29884, 1495, 29898, 2080, 29897, 13, 1678, 396, 921, 353, 360, 1947, 29898, 29953, 29946, 29892, 11236, 362, 2433, 2674, 29884, 1495, 29898, 29916, 29897, 13, 1678, 396, 921, 353, 360, 1947, 29898, 29941, 29906, 29892, 11236, 362, 2433, 2674, 29884, 1495, 29898, 29916, 29897, 13, 1678, 921, 353, 360, 1947, 29898, 29906, 29945, 29953, 29892, 11236, 362, 2433, 2674, 29884, 1495, 29898, 2080, 29897, 13, 1678, 921, 353, 360, 1947, 29898, 29906, 29945, 29953, 29892, 11236, 362, 2433, 2674, 29884, 1495, 29898, 29916, 29897, 13, 1678, 1962, 353, 360, 1947, 29898, 29896, 29900, 29892, 11236, 362, 2433, 2695, 3317, 1495, 29898, 29916, 29897, 13, 1678, 736, 8125, 29898, 2080, 29892, 1962, 29897, 2 ]
setup.py
aychedee/sniffer
0
199927
<reponame>aychedee/sniffer<gh_stars>0 from setuptools import setup, find_packages # will fail to install via pip/easy_install #from sniffer.metadata import __version__, __author__, __author_email__ __version__, __author__, __author_email__ = "0.3.4", "<NAME>", "<EMAIL>" setup( name='sniffer', version=__version__, description='An automatic test runner. Supports nose out of the box.', long_description=open('README.rst').read(), author=__author__, author_email=__author_email__, url='http://github.com/jeffh/sniffer/', install_requires=[ 'colorama', 'python-termstyle', 'nose', ], extras_require = { 'Growl': ['gntp==0.7'], 'LibNotify': ['py-notify==0.3.1'], 'OSX': ['MacFSEvents==0.2.8'], #'Windows': ['pywin'], # not part of PYPI 'Linux': ['pyinotify==0.9.0'], }, entry_points = { 'console_scripts': ['sniffer = sniffer:main'], }, packages=find_packages(), license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Testing', 'Topic :: Software Development :: Libraries', ], )
[ 1, 529, 276, 1112, 420, 29958, 388, 305, 2742, 29872, 29914, 16586, 8349, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 13, 29937, 674, 4418, 304, 2601, 3025, 8450, 29914, 29872, 8995, 29918, 6252, 13, 29937, 3166, 5807, 8349, 29889, 19635, 1053, 4770, 3259, 1649, 29892, 4770, 8921, 1649, 29892, 4770, 8921, 29918, 5269, 1649, 13, 13, 1649, 3259, 1649, 29892, 4770, 8921, 1649, 29892, 4770, 8921, 29918, 5269, 1649, 353, 376, 29900, 29889, 29941, 29889, 29946, 613, 9872, 5813, 28341, 9872, 26862, 6227, 11903, 13, 13, 14669, 29898, 13, 1678, 1024, 2433, 16586, 8349, 742, 13, 1678, 1873, 29922, 1649, 3259, 1649, 29892, 13, 1678, 6139, 2433, 2744, 18428, 1243, 28877, 29889, 18601, 29879, 26414, 714, 310, 278, 3800, 29889, 742, 13, 1678, 1472, 29918, 8216, 29922, 3150, 877, 16310, 2303, 29889, 29878, 303, 2824, 949, 3285, 13, 1678, 4148, 29922, 1649, 8921, 1649, 29892, 13, 1678, 4148, 29918, 5269, 29922, 1649, 8921, 29918, 5269, 1649, 29892, 13, 1678, 3142, 2433, 1124, 597, 3292, 29889, 510, 29914, 1324, 600, 29882, 29914, 16586, 8349, 29914, 742, 13, 1678, 2601, 29918, 276, 339, 2658, 11759, 13, 4706, 525, 2780, 3304, 742, 13, 4706, 525, 4691, 29899, 8489, 3293, 742, 13, 4706, 525, 29876, 852, 742, 13, 1678, 21251, 13, 1678, 429, 10678, 29918, 12277, 353, 426, 13, 4706, 525, 29954, 798, 29880, 2396, 6024, 29887, 593, 29886, 1360, 29900, 29889, 29955, 7464, 13, 4706, 525, 14868, 3664, 1598, 2396, 6024, 2272, 29899, 25140, 1360, 29900, 29889, 29941, 29889, 29896, 7464, 13, 4706, 525, 3267, 29990, 2396, 6024, 15735, 29943, 1660, 794, 29879, 1360, 29900, 29889, 29906, 29889, 29947, 7464, 13, 4706, 396, 29915, 7685, 2396, 6024, 2272, 5080, 7464, 396, 451, 760, 310, 349, 29979, 2227, 13, 4706, 525, 24085, 2396, 6024, 2272, 262, 327, 1598, 1360, 29900, 29889, 29929, 29889, 29900, 7464, 13, 1678, 2981, 13, 1678, 6251, 29918, 9748, 353, 426, 13, 4706, 525, 11058, 29918, 16713, 2396, 6024, 16586, 8349, 353, 5807, 8349, 29901, 3396, 7464, 13, 1678, 2981, 13, 1678, 9741, 29922, 2886, 29918, 8318, 3285, 13, 1678, 19405, 2433, 26349, 742, 13, 1678, 770, 14903, 11759, 13, 4706, 525, 21956, 358, 16034, 4761, 29871, 29941, 448, 838, 2026, 742, 13, 4706, 525, 18649, 4761, 9405, 742, 13, 4706, 525, 2928, 2760, 319, 4749, 663, 4761, 10682, 414, 742, 13, 4706, 525, 29931, 293, 1947, 4761, 438, 5425, 28268, 1490, 4761, 341, 1806, 19245, 742, 13, 4706, 525, 7094, 1218, 2184, 4761, 6570, 25266, 742, 13, 4706, 525, 9283, 4056, 17088, 4761, 5132, 742, 13, 4706, 525, 9283, 4056, 17088, 4761, 5132, 4761, 29871, 29941, 742, 13, 4706, 525, 7031, 293, 4761, 18540, 14650, 4761, 4321, 292, 742, 13, 4706, 525, 7031, 293, 4761, 18540, 14650, 4761, 365, 4626, 4314, 742, 13, 1678, 21251, 13, 29897, 13, 2 ]
py/543. Diameter of Binary Tree.py
longwangjhu/LeetCode
3
105417
<gh_stars>1-10 # https://leetcode.com/problems/diameter-of-binary-tree/ # Given the root of a binary tree, return the length of the diameter of the tree. # The diameter of a binary tree is the length of the longest path between any two # nodes in a tree. This path may or may not pass through the root. # The length of a path between two nodes is represented by the number of edges # between them. ################################################################################ # longest path must be leaf-to-leaf # -> sum of longest left and right branches # -> divide and conquer # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def diameterOfBinaryTree(self, root: TreeNode) -> int: self.ans = 0 self.longest_path(root) return self.ans def longest_path(self, node): if not node: return 0 left_longest = self.longest_path(node.left) right_longest = self.longest_path(node.right) self.ans = max(self.ans, left_longest + right_longest) return max(left_longest, right_longest) + 1
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 2045, 597, 280, 300, 401, 29889, 510, 29914, 17199, 29879, 29914, 29881, 2829, 1308, 29899, 974, 29899, 19541, 29899, 8336, 29914, 13, 13, 29937, 11221, 278, 3876, 310, 263, 7581, 5447, 29892, 736, 278, 3309, 310, 278, 24235, 310, 278, 5447, 29889, 13, 13, 29937, 450, 24235, 310, 263, 7581, 5447, 338, 278, 3309, 310, 278, 27217, 2224, 1546, 738, 1023, 13, 29937, 7573, 297, 263, 5447, 29889, 910, 2224, 1122, 470, 1122, 451, 1209, 1549, 278, 3876, 29889, 13, 13, 29937, 450, 3309, 310, 263, 2224, 1546, 1023, 7573, 338, 9875, 491, 278, 1353, 310, 12770, 13, 29937, 1546, 963, 29889, 13, 13, 13383, 13383, 13383, 13383, 13383, 13, 13, 29937, 27217, 2224, 1818, 367, 20447, 29899, 517, 29899, 29500, 13, 29937, 1599, 2533, 310, 27217, 2175, 322, 1492, 14202, 13, 29937, 1599, 16429, 322, 26474, 13, 13, 29937, 21940, 363, 263, 7581, 5447, 2943, 29889, 13, 29937, 770, 15472, 4247, 29901, 13, 29937, 268, 822, 4770, 2344, 12035, 1311, 29892, 659, 29922, 29900, 29892, 2175, 29922, 8516, 29892, 1492, 29922, 8516, 1125, 13, 29937, 308, 1583, 29889, 791, 353, 659, 13, 29937, 308, 1583, 29889, 1563, 353, 2175, 13, 29937, 308, 1583, 29889, 1266, 353, 1492, 13, 1990, 24380, 29901, 13, 1678, 822, 24235, 2776, 25196, 9643, 29898, 1311, 29892, 3876, 29901, 15472, 4247, 29897, 1599, 938, 29901, 13, 4706, 1583, 29889, 550, 353, 29871, 29900, 13, 4706, 1583, 29889, 5426, 342, 29918, 2084, 29898, 4632, 29897, 13, 4706, 736, 1583, 29889, 550, 13, 268, 13, 1678, 822, 27217, 29918, 2084, 29898, 1311, 29892, 2943, 1125, 13, 4706, 565, 451, 2943, 29901, 736, 29871, 29900, 13, 308, 13, 4706, 2175, 29918, 5426, 342, 353, 1583, 29889, 5426, 342, 29918, 2084, 29898, 3177, 29889, 1563, 29897, 13, 4706, 1492, 29918, 5426, 342, 353, 1583, 29889, 5426, 342, 29918, 2084, 29898, 3177, 29889, 1266, 29897, 539, 13, 4706, 1583, 29889, 550, 353, 4236, 29898, 1311, 29889, 550, 29892, 2175, 29918, 5426, 342, 718, 1492, 29918, 5426, 342, 29897, 13, 308, 13, 4706, 736, 4236, 29898, 1563, 29918, 5426, 342, 29892, 1492, 29918, 5426, 342, 29897, 718, 29871, 29896, 13, 2 ]
src/cstar-cli/cstar/cli/bpd/awardperiod.py
pagopa/cstar-cli
1
182488
<reponame>pagopa/cstar-cli import psycopg2 import psycopg2.extras import pandas as pd import pandas.io.sql as psql import random from datetime import timedelta, datetime, date import string from .constants import CITIZEN_RANKING_EXT_SCHEMA class Awardperiod() : def __init__(self, args): self.args = args self.db_connection = psycopg2.connect(args.connection_string) def set_grace_period(self): table = "bpd_award_period.bpd_award_period" set_values = "aw_grace_period_n = (%s)" conditions = "award_period_id_n = (%s)" update_q = "UPDATE {} SET {} WHERE {};".format( table, set_values, conditions) cursor = self.db_connection.cursor() cursor.execute(update_q, [self.args.grace_period, self.args.id]) self.db_connection.commit() cursor.close() def set_properties(self): award_period_df = self._read_award_period() award_period_start = award_period_df.at[0,'aw_period_start_d'] delta = date.today() - award_period_start insert_datetime = ( datetime.combine( award_period_start, datetime.min.time()) + timedelta(seconds=random.random() * delta.total_seconds()) ) award_period_ext_df = pd.DataFrame(columns=CITIZEN_RANKING_EXT_SCHEMA) award_period_ext_df = award_period_ext_df.append({ 'award_period_id_n' : self.args.id, 'max_transaction_n' : 2000, 'min_transaction_n' : 0, 'total_participants' : 10000000, 'ranking_min_n': 0, 'period_cashback_max_n' : f'{150:.2f}', 'insert_date_t': insert_datetime.isoformat(), 'insert_user_s': 'PAGOPATEST', 'update_date_t' : None, 'update_user_s' : None }, True) if len(award_period_ext_df) > 0: columns = list(award_period_ext_df) # create VALUES('%s', '%s",...) one '%s' per column set_values = ",".join(["{} = (%s)".format(_) for _ in columns]) #create INSERT INTO table (columns) VALUES('%s',...) update = "UPDATE {} SET {} WHERE award_period_id_n = {};".format( "bpd_citizen.bpd_ranking_ext", set_values, self.args.id) cursor = self.db_connection.cursor() psycopg2.extras.execute_batch(cursor, update, award_period_ext_df.values) self.db_connection.commit() cursor.close() def _read_award_period(self) : self.db_cursor = self.db_connection.cursor() award_period_q = self.db_cursor.mogrify( "SELECT * " "FROM bpd_award_period.bpd_award_period " "WHERE award_period_id_n = %(id)s;", {"id": self.args.id}) return pd.read_sql(award_period_q, self.db_connection) def read_all(self) : self.db_cursor = self.db_connection.cursor() award_period_q = self.db_cursor.mogrify( "SELECT award_period_id_n, aw_period_start_d, aw_period_end_d " "FROM bpd_award_period.bpd_award_period ") print(pd.read_sql(award_period_q, self.db_connection))
[ 1, 529, 276, 1112, 420, 29958, 13573, 459, 29874, 29914, 29883, 8508, 29899, 11303, 13, 5215, 6529, 29891, 9708, 29887, 29906, 13, 5215, 6529, 29891, 9708, 29887, 29906, 29889, 1062, 3417, 13, 13, 5215, 11701, 408, 10518, 13, 5215, 11701, 29889, 601, 29889, 2850, 408, 282, 2850, 13, 5215, 4036, 13, 3166, 12865, 1053, 5335, 287, 2554, 29892, 12865, 29892, 2635, 13, 5215, 1347, 13, 3166, 869, 3075, 1934, 1053, 29871, 315, 1806, 26664, 1430, 29918, 29934, 2190, 29968, 4214, 29918, 12194, 29918, 29903, 3210, 26862, 13, 13, 13, 1990, 7526, 19145, 580, 584, 13, 29871, 822, 4770, 2344, 12035, 1311, 29892, 6389, 1125, 29871, 13, 1678, 1583, 29889, 5085, 353, 6389, 13, 1678, 1583, 29889, 2585, 29918, 9965, 353, 6529, 29891, 9708, 29887, 29906, 29889, 6915, 29898, 5085, 29889, 9965, 29918, 1807, 29897, 13, 259, 13, 29871, 822, 731, 29918, 3874, 346, 29918, 19145, 29898, 1311, 1125, 13, 1678, 1591, 353, 376, 29890, 15926, 29918, 29874, 1328, 29918, 19145, 29889, 29890, 15926, 29918, 29874, 1328, 29918, 19145, 29908, 13, 1678, 731, 29918, 5975, 353, 376, 1450, 29918, 3874, 346, 29918, 19145, 29918, 29876, 353, 313, 29995, 29879, 5513, 13, 1678, 5855, 353, 376, 29874, 1328, 29918, 19145, 29918, 333, 29918, 29876, 353, 313, 29995, 29879, 5513, 13, 1678, 2767, 29918, 29939, 353, 376, 14474, 6571, 11368, 6571, 5754, 15739, 1642, 4830, 29898, 13, 308, 1591, 29892, 731, 29918, 5975, 29892, 5855, 29897, 13, 13, 1678, 10677, 353, 1583, 29889, 2585, 29918, 9965, 29889, 18127, 580, 13, 1678, 10677, 29889, 7978, 29898, 5504, 29918, 29939, 29892, 518, 1311, 29889, 5085, 29889, 3874, 346, 29918, 19145, 29892, 1583, 29889, 5085, 29889, 333, 2314, 13, 1678, 1583, 29889, 2585, 29918, 9965, 29889, 15060, 580, 13, 1678, 10677, 29889, 5358, 580, 13, 259, 13, 29871, 822, 731, 29918, 11330, 29898, 1311, 1125, 13, 268, 13, 1678, 9862, 29918, 19145, 29918, 2176, 353, 1583, 3032, 949, 29918, 29874, 1328, 29918, 19145, 580, 13, 1678, 9862, 29918, 19145, 29918, 2962, 353, 9862, 29918, 19145, 29918, 2176, 29889, 271, 29961, 29900, 5501, 1450, 29918, 19145, 29918, 2962, 29918, 29881, 2033, 13, 1678, 19471, 353, 2635, 29889, 27765, 580, 448, 9862, 29918, 19145, 29918, 2962, 13, 1678, 4635, 29918, 12673, 353, 313, 12865, 29889, 17743, 457, 29898, 9862, 29918, 19145, 29918, 2962, 29892, 12865, 29889, 1195, 29889, 2230, 3101, 29871, 13, 418, 718, 5335, 287, 2554, 29898, 23128, 29922, 8172, 29889, 8172, 580, 334, 19471, 29889, 7827, 29918, 23128, 3101, 1723, 13, 308, 13, 1678, 9862, 29918, 19145, 29918, 1062, 29918, 2176, 353, 10518, 29889, 17271, 29898, 13099, 29922, 29907, 1806, 26664, 1430, 29918, 29934, 2190, 29968, 4214, 29918, 12194, 29918, 29903, 3210, 26862, 29897, 13, 1678, 9862, 29918, 19145, 29918, 1062, 29918, 2176, 353, 9862, 29918, 19145, 29918, 1062, 29918, 2176, 29889, 4397, 3319, 13, 4706, 525, 29874, 1328, 29918, 19145, 29918, 333, 29918, 29876, 29915, 584, 1583, 29889, 5085, 29889, 333, 29892, 29871, 13, 4706, 525, 3317, 29918, 20736, 29918, 29876, 29915, 584, 29871, 29906, 29900, 29900, 29900, 29892, 29871, 13, 4706, 525, 1195, 29918, 20736, 29918, 29876, 29915, 584, 29871, 29900, 29892, 13, 4706, 525, 7827, 29918, 1595, 12654, 1934, 29915, 584, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29892, 13, 4706, 525, 661, 9292, 29918, 1195, 29918, 29876, 2396, 29871, 29900, 29892, 13, 4706, 525, 19145, 29918, 29883, 1161, 1627, 29918, 3317, 29918, 29876, 29915, 584, 285, 29915, 29912, 29896, 29945, 29900, 29901, 29889, 29906, 29888, 29913, 742, 13, 4706, 525, 7851, 29918, 1256, 29918, 29873, 2396, 4635, 29918, 12673, 29889, 10718, 4830, 3285, 13, 4706, 525, 7851, 29918, 1792, 29918, 29879, 2396, 525, 7228, 29954, 4590, 3040, 1254, 742, 13, 4706, 525, 5504, 29918, 1256, 29918, 29873, 29915, 584, 6213, 29892, 13, 4706, 525, 5504, 29918, 1792, 29918, 29879, 29915, 584, 6213, 13, 1678, 2981, 5852, 29897, 13, 13, 13, 1678, 565, 7431, 29898, 29874, 1328, 29918, 19145, 29918, 1062, 29918, 2176, 29897, 1405, 29871, 29900, 29901, 13, 13, 418, 4341, 353, 1051, 29898, 29874, 1328, 29918, 19145, 29918, 1062, 29918, 2176, 29897, 13, 13, 418, 396, 1653, 15673, 877, 29995, 29879, 742, 14210, 29879, 613, 11410, 697, 14210, 29879, 29915, 639, 1897, 13, 418, 731, 29918, 5975, 353, 9162, 1642, 7122, 29898, 3366, 8875, 353, 313, 29995, 29879, 29897, 1642, 4830, 7373, 29897, 363, 903, 297, 4341, 2314, 13, 13, 418, 396, 3258, 14482, 11646, 1591, 313, 13099, 29897, 15673, 877, 29995, 29879, 742, 11410, 13, 418, 2767, 353, 376, 14474, 6571, 11368, 6571, 5754, 9862, 29918, 19145, 29918, 333, 29918, 29876, 353, 15739, 1642, 4830, 29898, 13, 4706, 376, 29890, 15926, 29918, 20752, 19642, 29889, 29890, 15926, 29918, 661, 9292, 29918, 1062, 613, 731, 29918, 5975, 29892, 1583, 29889, 5085, 29889, 333, 29897, 13, 13, 418, 10677, 353, 1583, 29889, 2585, 29918, 9965, 29889, 18127, 580, 13, 418, 6529, 29891, 9708, 29887, 29906, 29889, 1062, 3417, 29889, 7978, 29918, 16175, 29898, 18127, 29892, 2767, 29892, 9862, 29918, 19145, 29918, 1062, 29918, 2176, 29889, 5975, 29897, 13, 418, 1583, 29889, 2585, 29918, 9965, 29889, 15060, 580, 13, 418, 10677, 29889, 5358, 580, 13, 13, 29871, 822, 903, 949, 29918, 29874, 1328, 29918, 19145, 29898, 1311, 29897, 584, 13, 1678, 1583, 29889, 2585, 29918, 18127, 353, 1583, 29889, 2585, 29918, 9965, 29889, 18127, 580, 13, 13, 1678, 9862, 29918, 19145, 29918, 29939, 353, 1583, 29889, 2585, 29918, 18127, 29889, 29885, 468, 29878, 1598, 29898, 13, 418, 376, 6404, 334, 376, 13, 418, 376, 21482, 289, 15926, 29918, 29874, 1328, 29918, 19145, 29889, 29890, 15926, 29918, 29874, 1328, 29918, 19145, 376, 29871, 13, 418, 376, 22043, 9862, 29918, 19145, 29918, 333, 29918, 29876, 353, 1273, 29898, 333, 29897, 29879, 29936, 613, 8853, 333, 1115, 1583, 29889, 5085, 29889, 333, 1800, 13, 308, 13, 1678, 736, 10518, 29889, 949, 29918, 2850, 29898, 29874, 1328, 29918, 19145, 29918, 29939, 29892, 1583, 29889, 2585, 29918, 9965, 29897, 13, 259, 13, 29871, 822, 1303, 29918, 497, 29898, 1311, 29897, 584, 13, 1678, 1583, 29889, 2585, 29918, 18127, 353, 1583, 29889, 2585, 29918, 9965, 29889, 18127, 580, 13, 13, 1678, 9862, 29918, 19145, 29918, 29939, 353, 1583, 29889, 2585, 29918, 18127, 29889, 29885, 468, 29878, 1598, 29898, 13, 418, 376, 6404, 9862, 29918, 19145, 29918, 333, 29918, 29876, 29892, 3773, 29918, 19145, 29918, 2962, 29918, 29881, 29892, 3773, 29918, 19145, 29918, 355, 29918, 29881, 376, 13, 418, 376, 21482, 289, 15926, 29918, 29874, 1328, 29918, 19145, 29889, 29890, 15926, 29918, 29874, 1328, 29918, 19145, 16521, 308, 13, 1678, 1596, 29898, 15926, 29889, 949, 29918, 2850, 29898, 29874, 1328, 29918, 19145, 29918, 29939, 29892, 1583, 29889, 2585, 29918, 9965, 876, 13, 2 ]
quests/forms.py
czambuk/dnd
0
97570
<filename>quests/forms.py from django import forms from .models import ( Quest, QuestStage ) class QuestForm(forms.ModelForm): class Meta: model = Quest fields = ( 'name', 'description', 'which_campaign', 'characters', ) widgets = { 'name': forms.TextInput, 'description': forms.Textarea, 'which_campaign': forms.Select, 'characters': forms.SelectMultiple, } labels = { 'name': 'Nazwa zadania', 'description': 'Opis zadania', 'which_campaign': 'Kampania', 'characters': 'Bohaterowie', } # class CampaignEntryForm(forms.ModelForm): # class Meta: # model = CampaignEntry # fields = ( # 'entry_name', # 'entry_content', # ) # widgets = { # 'entry_name': forms.TextInput, # 'entry_content': forms.Textarea, # } # labels = { # 'entry_name': 'Tytuł wpisu', # 'entry_content': 'Treść', # }
[ 1, 529, 9507, 29958, 1119, 29879, 29914, 9514, 29889, 2272, 13, 3166, 9557, 1053, 7190, 13, 13, 3166, 869, 9794, 1053, 313, 13, 1678, 751, 342, 29892, 13, 1678, 751, 342, 27276, 13, 29897, 13, 13, 13, 1990, 751, 342, 2500, 29898, 9514, 29889, 3195, 2500, 1125, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 751, 342, 13, 4706, 4235, 353, 313, 13, 9651, 525, 978, 742, 13, 9651, 525, 8216, 742, 13, 9651, 525, 4716, 29918, 24821, 8729, 742, 13, 9651, 525, 3090, 21706, 742, 13, 4706, 1723, 13, 4706, 11109, 29879, 353, 426, 13, 9651, 525, 978, 2396, 7190, 29889, 1626, 4290, 29892, 13, 9651, 525, 8216, 2396, 7190, 29889, 1626, 6203, 29892, 13, 9651, 525, 4716, 29918, 24821, 8729, 2396, 7190, 29889, 3549, 29892, 13, 9651, 525, 3090, 21706, 2396, 7190, 29889, 3549, 15329, 552, 29892, 13, 4706, 500, 13, 4706, 11073, 353, 426, 13, 9651, 525, 978, 2396, 525, 29940, 834, 2766, 503, 328, 4807, 742, 13, 9651, 525, 8216, 2396, 525, 29949, 3334, 503, 328, 4807, 742, 13, 9651, 525, 4716, 29918, 24821, 8729, 2396, 525, 29968, 1160, 4807, 742, 13, 9651, 525, 3090, 21706, 2396, 525, 29933, 1148, 1008, 4238, 742, 13, 4706, 500, 13, 13, 13, 29937, 770, 7259, 8729, 9634, 2500, 29898, 9514, 29889, 3195, 2500, 1125, 13, 29937, 268, 770, 20553, 29901, 13, 29937, 308, 1904, 353, 7259, 8729, 9634, 13, 29937, 308, 4235, 353, 313, 13, 29937, 632, 525, 8269, 29918, 978, 742, 13, 29937, 632, 525, 8269, 29918, 3051, 742, 13, 29937, 308, 1723, 13, 29937, 308, 11109, 29879, 353, 426, 13, 29937, 632, 525, 8269, 29918, 978, 2396, 7190, 29889, 1626, 4290, 29892, 13, 29937, 632, 525, 8269, 29918, 3051, 2396, 7190, 29889, 1626, 6203, 29892, 13, 29937, 308, 500, 13, 29937, 308, 11073, 353, 426, 13, 29937, 632, 525, 8269, 29918, 978, 2396, 525, 29911, 20588, 30006, 281, 3334, 29884, 742, 13, 29937, 632, 525, 8269, 29918, 3051, 2396, 525, 29911, 276, 6598, 742, 13, 29937, 308, 500, 13, 2 ]
src/pycropml/render_fortran.py
sielenk-yara/PyCrop2ML
0
139776
<filename>src/pycropml/render_fortran.py """Add License, Header. Use pkglts Problems: - name of a model unit? """ from __future__ import print_function from __future__ import absolute_import from path import Path from pycropml.formater_f90 import formater import six import os from pycropml.composition import model_parser class Model2Package(object): """ TODO """ DATATYPE = {} DATATYPE['FLOAT'] = 'REAL' DATATYPE['INT'] = 'INTEGER' DATATYPE['STRING'] = 'CHARACTER(65)' DATATYPE['DATE'] = 'CHARACTER(65)' DATATYPE['DOUBLE'] = 'REAL' DATATYPE['DOUBLELIST'] = 'REAL, ALLOCATABLE, DIMENSION(:)' DATATYPE['INTLIST'] = 'INTEGER, ALLOCATABLE, DIMENSION(:)' DATATYPE['STRINGLIST'] = 'CHARACTER(65), ALLOCATABLE, DIMENSION(:)' DATATYPE['INTARRAY'] = 'INTEGER, ALLOCATABLE, DIMENSION' DATATYPE['DOUBLEARRAY'] = 'REAL, ALLOCATABLE, DIMENSION' DATATYPE['STRINGARRAY'] = 'CHARACTER(65), ALLOCATABLE, DIMENSION' DATATYPE['BOOLEAN'] = 'LOGICAL' DATATYPE['DATELIST'] = 'CHARACTER(65), ALLOCATABLE, DIMENSION(:)' num = 0 def __init__(self, models, directory=None, pkg_name=None): """TODO.""" self.models = models self.directory = directory self.with_import = True if pkg_name is None: self.pkg_name = "CropModel" else: self.pkg_name = pkg_name def my_input(self,_input): name = _input.name _type = _input.datatype if _type=="DOUBLEARRAY" or _type=="INTARRAY" or _type =="STRINGARRAY": size = _input.len return ("%s(%s) :: %s \n"%(self.DATATYPE[_type],size, name)) else: return ("%s:: %s\n"%(self.DATATYPE[_type], name)) def generate_test(self, model_unit): tab = ' '*4 m = model_unit model_name = signature(m) psets = m.parametersets list_var=[] list_inouts=[] for inp in m.inputs: list_var.append(inp.name) list_inouts.append(inp) for out in m.outputs: if out.name not in list_var: list_var.append(out.name) list_inouts.append(out) self.codetest = "PROGRAM test\n" self.codetest += tab+ "USE" + " %smod\n"%model_unit.name.capitalize() test_codes = [] decl_ins= [ tab + self.my_input(var) for var in list_inouts] test_codes.append(''.join(decl_ins)) for v_tests in m.testsets: test_runs = v_tests.test # different run in the thest test_paramsets = v_tests.parameterset # name of paramsets # map the paramsets params = {} if test_paramsets.strip()!="" and test_paramsets not in list(psets.keys()): print(' Unknow parameter %s'%test_paramsets) else: if test_paramsets.strip()!="" : params.update(psets[test_paramsets].params) for each_run in test_runs : # make a function that transforms a title into a function name tname = list(each_run.keys())[0].replace(' ', '_') tname = tname.replace('-', '_') (run, inouts) = list(each_run.items())[0] ins = inouts['inputs'] outs = inouts['outputs'] #code = "PROGRAM test_%s_%s \n"%(tname,m.name) #code += tab+ "USE" + " %smod"%model_unit.name.capitalize() #test_codes.append(code) #test_codes.append('\n'.join(decl_ins)) code = tab +'print *, "--------test_%s_%s-------" \n'%(tname,m.name) run_param = params.copy() run_param.update(ins) for testinp in m.inputs: if testinp.name not in list(run_param.keys()): run_param[testinp.name]=testinp.default for k, v in six.iteritems(run_param): typ = [inp.datatype for inp in list_inouts if inp.name == k][0] if typ == "STRING" or typ == "DATE": code += ' %s = "%s"\n'%(k,v.replace('"', '')) elif typ != "BOOLEAN" and typ != "STRINGLIST" and typ!= "DATELIST": code += " %s = %s\n"%(k,v) elif typ == "BOOLEAN": code +=" %s = .%s.\n"%(k, v.capitalize()) else: value = "" for val in eval(v): value += ' CALL Add(%s, "%s")\n'%(k,val) code += value test_codes.append(code) code=" call model_{0}({1})\n".format(model_name, ', '.join(list_var)) for k, v in six.iteritems(outs): type_o = [out.datatype for out in m.outputs if out.name==k][0] code += tab + "!%s: %s\n"%(k, v[0]) code += tab + 'print *, "%s estimated :" \n'%(k) if type_o.find("LIST")!=-1: code += tab +"Do i_cyml = %s, %s\n"%(1, len(eval(v[0]))) code += 2*tab + "print *, %s(i_cyml);\n"%(k) code += tab + "END DO\n" else: code += tab + "print *, %s\n"%(k) test_codes.append(code) code = ''.join(test_codes) self.codetest += code+'\nEND PROGRAM\n\n' return formater(self.codetest) def write_tests(self): """ TODO: Manage several models rather than just one. """ files = [] count = 0 for model in self.models: codetest = self.generate_test(model) filename = Path(self.directory/"test_%s.f90"%signature(model)) codetest = "!Test generation\n\n"+codetest with open(filename, "wb") as f90_file: f90_file.write(codetest.encode('utf-8')) files.append(filename) count +=1 return files def signature(model): name = model.name name = name.strip() name = name.replace(' ', '_').lower() return name def generate_doc(model): desc = model.description _doc = """ %s Author: %s Reference: %s Institution: %s Abstract: %s """ %(desc.Title, desc.Authors, desc.Reference, desc.Institution, desc.Abstract) code = '\n' code += _doc return code
[ 1, 529, 9507, 29958, 4351, 29914, 2272, 29883, 1336, 828, 29914, 9482, 29918, 3921, 661, 29889, 2272, 13, 15945, 29908, 2528, 19245, 29892, 19345, 29889, 13, 13, 11403, 282, 29895, 3820, 1372, 13, 13, 26604, 29879, 29901, 13, 29899, 1024, 310, 263, 1904, 5190, 29973, 13, 13, 15945, 29908, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 2224, 1053, 10802, 29871, 13, 3166, 282, 11078, 1336, 828, 29889, 689, 1008, 29918, 29888, 29929, 29900, 1053, 883, 1008, 259, 13, 5215, 4832, 13, 5215, 2897, 13, 3166, 282, 11078, 1336, 828, 29889, 510, 3283, 1053, 1904, 29918, 16680, 13, 13, 1990, 8125, 29906, 14459, 29898, 3318, 1125, 13, 1678, 9995, 14402, 13, 13, 1678, 9995, 13, 13, 1678, 27640, 1299, 6959, 353, 6571, 13, 1678, 27640, 1299, 6959, 1839, 29943, 3927, 1299, 2033, 353, 525, 1525, 1964, 29915, 13, 1678, 27640, 1299, 6959, 1839, 10192, 2033, 353, 525, 1177, 4330, 17070, 29915, 13, 1678, 27640, 1299, 6959, 1839, 20785, 2033, 353, 525, 11282, 17923, 1001, 29898, 29953, 29945, 16029, 13, 1678, 27640, 1299, 6959, 1839, 6248, 2033, 353, 525, 11282, 17923, 1001, 29898, 29953, 29945, 16029, 13, 1678, 27640, 1299, 6959, 1839, 3970, 7466, 1307, 2033, 353, 525, 1525, 1964, 29915, 13, 1678, 27640, 1299, 6959, 1839, 3970, 7466, 1307, 24360, 2033, 353, 525, 1525, 1964, 29892, 15149, 20166, 1299, 6181, 29892, 360, 7833, 1430, 13381, 8137, 16029, 13, 1678, 27640, 1299, 6959, 1839, 10192, 24360, 2033, 353, 525, 1177, 4330, 17070, 29892, 15149, 20166, 1299, 6181, 29892, 360, 7833, 1430, 13381, 8137, 16029, 13, 1678, 27640, 1299, 6959, 1839, 20785, 24360, 2033, 353, 525, 11282, 17923, 1001, 29898, 29953, 29945, 511, 15149, 20166, 1299, 6181, 29892, 360, 7833, 1430, 13381, 8137, 16029, 13, 1678, 27640, 1299, 6959, 1839, 10192, 1718, 22800, 2033, 353, 525, 1177, 4330, 17070, 29892, 15149, 20166, 1299, 6181, 29892, 360, 7833, 1430, 13381, 29915, 13, 1678, 27640, 1299, 6959, 1839, 3970, 7466, 1307, 1718, 22800, 2033, 353, 525, 1525, 1964, 29892, 15149, 20166, 1299, 6181, 29892, 360, 7833, 1430, 13381, 29915, 13, 1678, 27640, 1299, 6959, 1839, 20785, 1718, 22800, 2033, 353, 525, 11282, 17923, 1001, 29898, 29953, 29945, 511, 15149, 20166, 1299, 6181, 29892, 360, 7833, 1430, 13381, 29915, 13, 1678, 27640, 1299, 6959, 1839, 8456, 29949, 1307, 2190, 2033, 353, 525, 14480, 2965, 1964, 29915, 13, 1678, 27640, 1299, 6959, 1839, 6248, 24360, 2033, 353, 525, 11282, 17923, 1001, 29898, 29953, 29945, 511, 15149, 20166, 1299, 6181, 29892, 360, 7833, 1430, 13381, 8137, 16029, 13, 29871, 13, 268, 13, 13, 1678, 954, 353, 29871, 29900, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4733, 29892, 3884, 29922, 8516, 29892, 282, 9415, 29918, 978, 29922, 8516, 1125, 13, 4706, 9995, 4986, 3970, 1213, 15945, 13, 4706, 1583, 29889, 9794, 353, 4733, 13, 4706, 1583, 29889, 12322, 353, 3884, 13, 13, 4706, 1583, 29889, 2541, 29918, 5215, 353, 5852, 13, 4706, 565, 282, 9415, 29918, 978, 338, 6213, 29901, 13, 9651, 1583, 29889, 15865, 29918, 978, 353, 376, 29907, 1336, 3195, 29908, 13, 4706, 1683, 29901, 1583, 29889, 15865, 29918, 978, 353, 282, 9415, 29918, 978, 13, 13, 1678, 822, 590, 29918, 2080, 29898, 1311, 29892, 29918, 2080, 1125, 13, 4706, 1024, 353, 903, 2080, 29889, 978, 13, 4706, 903, 1853, 353, 903, 2080, 29889, 4130, 23179, 13, 4706, 565, 903, 1853, 26359, 3970, 7466, 1307, 1718, 22800, 29908, 470, 903, 1853, 26359, 10192, 1718, 22800, 29908, 470, 903, 1853, 353, 543, 20785, 1718, 22800, 1115, 29871, 13, 9651, 2159, 353, 903, 2080, 29889, 2435, 13, 9651, 736, 4852, 29995, 29879, 29414, 29879, 29897, 4761, 1273, 29879, 320, 29876, 29908, 29995, 29898, 1311, 29889, 25832, 1299, 6959, 28513, 1853, 1402, 2311, 29892, 1024, 876, 29871, 13, 4706, 1683, 29901, 13, 9651, 736, 4852, 29995, 29879, 1057, 1273, 29879, 29905, 29876, 29908, 29995, 29898, 1311, 29889, 25832, 1299, 6959, 28513, 1853, 1402, 1024, 876, 632, 13, 13, 1678, 822, 5706, 29918, 1688, 29898, 1311, 29892, 1904, 29918, 5441, 1125, 13, 13, 4706, 4434, 353, 525, 525, 29930, 29946, 13, 4706, 286, 353, 1904, 29918, 5441, 13, 4706, 1904, 29918, 978, 353, 12608, 29898, 29885, 29897, 29871, 13, 4706, 282, 7224, 353, 286, 29889, 16744, 1691, 13, 4706, 1051, 29918, 1707, 29922, 2636, 13, 4706, 1051, 29918, 262, 17718, 29922, 2636, 13, 4706, 363, 297, 29886, 297, 286, 29889, 2080, 29879, 29901, 13, 9651, 1051, 29918, 1707, 29889, 4397, 29898, 262, 29886, 29889, 978, 29897, 13, 9651, 1051, 29918, 262, 17718, 29889, 4397, 29898, 262, 29886, 29897, 13, 4706, 363, 714, 297, 286, 29889, 4905, 29879, 29901, 13, 9651, 565, 714, 29889, 978, 451, 297, 1051, 29918, 1707, 29901, 13, 18884, 1051, 29918, 1707, 29889, 4397, 29898, 449, 29889, 978, 29897, 13, 18884, 1051, 29918, 262, 17718, 29889, 4397, 29898, 449, 29897, 13, 4706, 1583, 29889, 19284, 300, 342, 353, 376, 8618, 29954, 25058, 1243, 29905, 29876, 29908, 13, 4706, 1583, 29889, 19284, 300, 342, 4619, 4434, 29974, 376, 17171, 29908, 718, 376, 1273, 29879, 1545, 29905, 29876, 29908, 29995, 4299, 29918, 5441, 29889, 978, 29889, 5030, 2410, 675, 580, 13, 4706, 1243, 29918, 18137, 353, 5159, 13, 4706, 4845, 29918, 1144, 29922, 518, 4434, 718, 1583, 29889, 1357, 29918, 2080, 29898, 1707, 29897, 363, 722, 297, 1051, 29918, 262, 17718, 29962, 13, 4706, 1243, 29918, 18137, 29889, 4397, 877, 4286, 7122, 29898, 27787, 29918, 1144, 876, 29871, 13, 4706, 363, 325, 29918, 21150, 297, 286, 29889, 1688, 7224, 29901, 13, 9651, 1243, 29918, 3389, 29879, 353, 325, 29918, 21150, 29889, 1688, 29871, 396, 1422, 1065, 297, 278, 266, 342, 13, 9651, 1243, 29918, 3207, 7224, 353, 325, 29918, 21150, 29889, 16744, 300, 29871, 396, 1024, 310, 1828, 7224, 13, 4706, 396, 2910, 278, 1828, 7224, 13, 9651, 8636, 353, 6571, 632, 13, 9651, 565, 259, 1243, 29918, 3207, 7224, 29889, 17010, 580, 29991, 13776, 322, 1243, 29918, 3207, 7224, 451, 297, 1051, 29898, 567, 1691, 29889, 8149, 580, 1125, 13, 18884, 1596, 877, 853, 28385, 3443, 1273, 29879, 29915, 29995, 1688, 29918, 3207, 7224, 29897, 13, 9651, 1683, 29901, 13, 18884, 565, 259, 1243, 29918, 3207, 7224, 29889, 17010, 580, 29991, 13776, 584, 29871, 8636, 29889, 5504, 29898, 567, 1691, 29961, 1688, 29918, 3207, 7224, 1822, 7529, 29897, 462, 418, 13, 18884, 363, 1269, 29918, 3389, 297, 1243, 29918, 3389, 29879, 584, 13, 462, 1678, 396, 1207, 263, 740, 393, 4327, 29879, 263, 3611, 964, 263, 740, 1024, 13, 462, 1678, 260, 978, 353, 1051, 29898, 4204, 29918, 3389, 29889, 8149, 3101, 29961, 29900, 1822, 6506, 877, 13420, 22868, 1495, 13, 462, 1678, 260, 978, 353, 260, 978, 29889, 6506, 877, 29899, 742, 22868, 1495, 13, 462, 1678, 313, 3389, 29892, 297, 17718, 29897, 353, 1051, 29898, 4204, 29918, 3389, 29889, 7076, 3101, 29961, 29900, 29962, 13, 462, 1678, 1663, 353, 297, 17718, 1839, 2080, 29879, 2033, 13, 462, 1678, 714, 29879, 353, 297, 17718, 1839, 4905, 29879, 2033, 13, 462, 1678, 396, 401, 353, 376, 8618, 29954, 25058, 1243, 29918, 29995, 29879, 29918, 29995, 29879, 320, 29876, 29908, 29995, 29898, 29873, 978, 29892, 29885, 29889, 978, 29897, 13, 462, 1678, 396, 401, 4619, 4434, 29974, 376, 17171, 29908, 718, 376, 1273, 29879, 1545, 29908, 29995, 4299, 29918, 5441, 29889, 978, 29889, 5030, 2410, 675, 580, 462, 268, 13, 462, 1678, 396, 1688, 29918, 18137, 29889, 4397, 29898, 401, 29897, 13, 462, 1678, 396, 1688, 29918, 18137, 29889, 4397, 28909, 29876, 4286, 7122, 29898, 27787, 29918, 1144, 876, 13, 462, 1678, 775, 353, 4434, 718, 29915, 2158, 334, 29892, 376, 1378, 1688, 29918, 29995, 29879, 29918, 29995, 29879, 26589, 29908, 320, 29876, 29915, 29995, 29898, 29873, 978, 29892, 29885, 29889, 978, 29897, 462, 462, 3986, 13, 462, 1678, 1065, 29918, 3207, 353, 8636, 29889, 8552, 580, 13, 462, 1678, 1065, 29918, 3207, 29889, 5504, 29898, 1144, 29897, 13, 462, 1678, 363, 1243, 262, 29886, 297, 286, 29889, 2080, 29879, 29901, 13, 462, 4706, 565, 1243, 262, 29886, 29889, 978, 451, 297, 1051, 29898, 3389, 29918, 3207, 29889, 8149, 580, 1125, 13, 462, 9651, 1065, 29918, 3207, 29961, 1688, 262, 29886, 29889, 978, 13192, 1688, 262, 29886, 29889, 4381, 462, 462, 539, 13, 462, 1678, 363, 413, 29892, 325, 297, 4832, 29889, 1524, 7076, 29898, 3389, 29918, 3207, 1125, 13, 462, 4706, 2393, 353, 518, 262, 29886, 29889, 4130, 23179, 363, 297, 29886, 297, 1051, 29918, 262, 17718, 565, 297, 29886, 29889, 978, 1275, 413, 3816, 29900, 29962, 13, 462, 4706, 565, 2393, 1275, 376, 20785, 29908, 470, 2393, 1275, 376, 6248, 1115, 775, 4619, 525, 1678, 1273, 29879, 353, 11860, 29879, 26732, 29876, 29915, 29995, 29898, 29895, 29892, 29894, 29889, 6506, 877, 29908, 742, 6629, 876, 13, 462, 4706, 25342, 2393, 2804, 376, 8456, 29949, 1307, 2190, 29908, 322, 2393, 2804, 376, 20785, 24360, 29908, 322, 2393, 19216, 376, 6248, 24360, 1115, 775, 4619, 376, 1678, 1273, 29879, 353, 1273, 29879, 29905, 29876, 29908, 29995, 29898, 29895, 29892, 29894, 29897, 13, 462, 4706, 25342, 2393, 1275, 376, 8456, 29949, 1307, 2190, 1115, 775, 718, 543, 1678, 1273, 29879, 353, 869, 29995, 29879, 7790, 29876, 29908, 29995, 29898, 29895, 29892, 325, 29889, 5030, 2410, 675, 3101, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 995, 353, 5124, 13, 462, 9651, 363, 659, 297, 19745, 29898, 29894, 1125, 13, 462, 18884, 995, 4619, 525, 1678, 315, 9818, 3462, 29414, 29879, 29892, 11860, 29879, 1159, 29905, 29876, 29915, 29995, 29898, 29895, 29892, 791, 29897, 13, 462, 9651, 775, 4619, 995, 13, 462, 1678, 1243, 29918, 18137, 29889, 4397, 29898, 401, 29897, 462, 308, 13, 462, 1678, 775, 543, 1678, 1246, 1904, 648, 29900, 2119, 29912, 29896, 11606, 29876, 1642, 4830, 29898, 4299, 29918, 978, 29892, 13420, 15300, 7122, 29898, 1761, 29918, 1707, 876, 13, 462, 1678, 363, 413, 29892, 325, 297, 4832, 29889, 1524, 7076, 29898, 17718, 1125, 13, 462, 4706, 1134, 29918, 29877, 353, 518, 449, 29889, 4130, 23179, 363, 714, 297, 286, 29889, 4905, 29879, 565, 714, 29889, 978, 1360, 29895, 3816, 29900, 29962, 418, 13, 462, 4706, 775, 4619, 4434, 718, 376, 29991, 29995, 29879, 29901, 1273, 29879, 29905, 29876, 29908, 29995, 29898, 29895, 29892, 325, 29961, 29900, 2314, 29871, 13, 462, 4706, 775, 4619, 4434, 718, 525, 2158, 334, 29892, 11860, 29879, 15899, 584, 29908, 320, 29876, 29915, 29995, 29898, 29895, 29897, 13, 462, 4706, 565, 1134, 29918, 29877, 29889, 2886, 703, 24360, 1159, 29991, 10457, 29896, 29901, 13, 462, 9651, 775, 4619, 4434, 718, 29908, 6132, 474, 29918, 1270, 828, 353, 1273, 29879, 29892, 1273, 29879, 29905, 29876, 29908, 29995, 29898, 29896, 29892, 7431, 29898, 14513, 29898, 29894, 29961, 29900, 29962, 4961, 13, 462, 9651, 775, 4619, 29871, 29906, 29930, 3891, 718, 376, 2158, 334, 29892, 1273, 29879, 29898, 29875, 29918, 1270, 828, 416, 29905, 29876, 29908, 29995, 29898, 29895, 29897, 13, 462, 9651, 775, 4619, 4434, 718, 376, 11794, 11662, 29905, 29876, 29908, 29871, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 775, 4619, 4434, 718, 376, 2158, 334, 29892, 1273, 29879, 29905, 29876, 29908, 29995, 29898, 29895, 29897, 29871, 13, 462, 1678, 1243, 29918, 18137, 29889, 4397, 29898, 401, 29897, 462, 29871, 13, 462, 1678, 775, 353, 525, 4286, 7122, 29898, 1688, 29918, 18137, 29897, 13, 18884, 1583, 29889, 19284, 300, 342, 4619, 775, 29974, 12764, 29876, 11794, 13756, 29954, 25058, 29905, 29876, 29905, 29876, 29915, 13, 4706, 736, 883, 1008, 29898, 1311, 29889, 19284, 300, 342, 29897, 13, 268, 13, 1678, 822, 2436, 29918, 21150, 29898, 1311, 1125, 13, 4706, 9995, 14402, 29901, 2315, 482, 3196, 4733, 3265, 1135, 925, 697, 29889, 13, 4706, 9995, 13, 4706, 2066, 353, 5159, 13, 4706, 2302, 353, 29871, 29900, 13, 4706, 363, 1904, 297, 1583, 29889, 9794, 29901, 13, 9651, 15234, 300, 342, 353, 1583, 29889, 17158, 29918, 1688, 29898, 4299, 29897, 13, 9651, 10422, 353, 10802, 29898, 1311, 29889, 12322, 12975, 1688, 29918, 29995, 29879, 29889, 29888, 29929, 29900, 29908, 29995, 4530, 1535, 29898, 4299, 876, 13, 9651, 15234, 300, 342, 353, 376, 29991, 3057, 12623, 29905, 29876, 29905, 29876, 17969, 19284, 300, 342, 13, 9651, 411, 1722, 29898, 9507, 29892, 376, 29893, 29890, 1159, 408, 285, 29929, 29900, 29918, 1445, 29901, 13, 18884, 285, 29929, 29900, 29918, 1445, 29889, 3539, 29898, 19284, 300, 342, 29889, 12508, 877, 9420, 29899, 29947, 8785, 13, 18884, 2066, 29889, 4397, 29898, 9507, 29897, 13, 9651, 2302, 4619, 29896, 13, 4706, 736, 2066, 13, 13, 13, 1753, 12608, 29898, 4299, 1125, 13, 1678, 1024, 353, 1904, 29889, 978, 13, 1678, 1024, 353, 1024, 29889, 17010, 580, 13, 1678, 1024, 353, 1024, 29889, 6506, 877, 13420, 22868, 2824, 13609, 580, 13, 1678, 736, 1024, 13, 13, 1753, 5706, 29918, 1514, 29898, 4299, 1125, 13, 1678, 5153, 353, 1904, 29889, 8216, 4706, 13, 1678, 903, 1514, 353, 9995, 13, 1678, 1273, 29879, 13, 1678, 13361, 29901, 1273, 29879, 13, 1678, 12105, 29901, 1273, 29879, 13, 1678, 28218, 29901, 1273, 29879, 13, 1678, 25513, 29901, 1273, 29879, 13, 15945, 29908, 1273, 29898, 14273, 29889, 7030, 29892, 5153, 29889, 6444, 943, 29892, 5153, 29889, 7422, 29892, 5153, 29889, 3379, 5008, 29892, 5153, 29889, 9118, 29897, 13, 1678, 775, 353, 11297, 29876, 29915, 13, 1678, 775, 4619, 903, 1514, 13, 1678, 736, 775, 13, 13, 13, 2 ]
connect/reports/renderers/j2.py
effrenus/connect-reports-core
0
86607
# Copyright © 2021 CloudBlue. All rights reserved. import os from jinja2 import ( Environment, FileSystemLoader, select_autoescape, ) from connect.reports.renderers.base import BaseRenderer from connect.reports.renderers.registry import register @register('jinja2') class Jinja2Renderer(BaseRenderer): """ Jinja2 Renderer class. Inherits from BaseRenderer class and implements the generation report function, exporting the data to a j2 file. """ def generate_report(self, data, output_file): path, name = self.template.rsplit('/', 1) loader = FileSystemLoader(os.path.join(self.root_dir, path)) env = Environment( loader=loader, autoescape=select_autoescape(['html', 'xml']), ) template = env.get_template(name) _, ext, _ = name.rsplit('.', 2) report_file = f'{output_file}.{ext}' template.stream(self.get_context(data)).dump(open(report_file, 'w')) return report_file @classmethod def validate(cls, definition): errors = [] if definition.template is None: errors.append('`template` is required for jinja2 renderer.') else: if not os.path.isfile( os.path.join(definition.root_path, definition.template), ): errors.append(f'template `{definition.template}` not found.') tokens = definition.template.rsplit('.', 2) if len(tokens) < 3 or tokens[-1] != 'j2': errors.append( f'invalid template name: `{definition.template}` ' '(must be in the form <name>.<ext>.j2).', ) return errors
[ 1, 396, 29871, 14187, 1266, 29871, 30211, 29871, 29906, 29900, 29906, 29896, 14293, 21319, 29889, 2178, 10462, 21676, 29889, 13, 13, 5215, 2897, 13, 13, 3166, 432, 262, 1764, 29906, 1053, 313, 13, 1678, 16738, 29892, 13, 1678, 3497, 3924, 10036, 29892, 13, 1678, 1831, 29918, 6921, 21587, 29892, 13, 29897, 13, 13, 3166, 4511, 29889, 276, 4011, 29889, 9482, 414, 29889, 3188, 1053, 7399, 21323, 13, 3166, 4511, 29889, 276, 4011, 29889, 9482, 414, 29889, 1727, 6020, 1053, 6036, 13, 13, 13, 29992, 9573, 877, 28789, 1764, 29906, 1495, 13, 1990, 29779, 1764, 29906, 21323, 29898, 5160, 21323, 1125, 13, 1678, 9995, 13, 1678, 29779, 1764, 29906, 26000, 261, 770, 29889, 13, 1678, 512, 2276, 1169, 515, 7399, 21323, 770, 322, 10703, 13, 1678, 278, 12623, 3461, 740, 29892, 5609, 292, 278, 848, 13, 1678, 304, 263, 432, 29906, 934, 29889, 13, 1678, 9995, 13, 1678, 822, 5706, 29918, 12276, 29898, 1311, 29892, 848, 29892, 1962, 29918, 1445, 1125, 13, 4706, 2224, 29892, 1024, 353, 1583, 29889, 6886, 29889, 2288, 2830, 11219, 742, 29871, 29896, 29897, 13, 4706, 23466, 353, 3497, 3924, 10036, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 4632, 29918, 3972, 29892, 2224, 876, 13, 4706, 8829, 353, 16738, 29898, 13, 9651, 23466, 29922, 12657, 29892, 13, 9651, 4469, 21587, 29922, 2622, 29918, 6921, 21587, 18959, 1420, 742, 525, 3134, 2033, 511, 13, 4706, 1723, 13, 4706, 4472, 353, 8829, 29889, 657, 29918, 6886, 29898, 978, 29897, 13, 4706, 17117, 1294, 29892, 903, 353, 1024, 29889, 2288, 2830, 12839, 742, 29871, 29906, 29897, 13, 13, 4706, 3461, 29918, 1445, 353, 285, 29915, 29912, 4905, 29918, 1445, 1836, 29912, 1062, 10162, 13, 4706, 4472, 29889, 5461, 29898, 1311, 29889, 657, 29918, 4703, 29898, 1272, 8106, 15070, 29898, 3150, 29898, 12276, 29918, 1445, 29892, 525, 29893, 8785, 13, 4706, 736, 3461, 29918, 1445, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 12725, 29898, 25932, 29892, 5023, 1125, 13, 4706, 4436, 353, 5159, 13, 4706, 565, 5023, 29889, 6886, 338, 6213, 29901, 13, 9651, 4436, 29889, 4397, 877, 29952, 6886, 29952, 338, 3734, 363, 432, 262, 1764, 29906, 4050, 261, 29889, 1495, 13, 4706, 1683, 29901, 13, 9651, 565, 451, 2897, 29889, 2084, 29889, 275, 1445, 29898, 13, 18884, 2897, 29889, 2084, 29889, 7122, 29898, 16553, 29889, 4632, 29918, 2084, 29892, 5023, 29889, 6886, 511, 13, 632, 1125, 13, 18884, 4436, 29889, 4397, 29898, 29888, 29915, 6886, 23230, 16553, 29889, 6886, 10114, 451, 1476, 29889, 1495, 13, 13, 9651, 18897, 353, 5023, 29889, 6886, 29889, 2288, 2830, 12839, 742, 29871, 29906, 29897, 13, 9651, 565, 7431, 29898, 517, 12360, 29897, 529, 29871, 29941, 470, 18897, 14352, 29896, 29962, 2804, 525, 29926, 29906, 2396, 13, 18884, 4436, 29889, 4397, 29898, 13, 462, 1678, 285, 29915, 20965, 4472, 1024, 29901, 23230, 16553, 29889, 6886, 10114, 525, 13, 462, 1678, 525, 29898, 21969, 367, 297, 278, 883, 529, 978, 15513, 29966, 1062, 15513, 29926, 29906, 467, 742, 13, 18884, 1723, 13, 13, 4706, 736, 4436, 13, 2 ]
Inference_Model.py
CODEJIN/WaveRNN
1
29485
<reponame>CODEJIN/WaveRNN from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import functools import itertools import threading import numpy as np from six.moves import zip # pylint: disable=redefined-builtin from google.protobuf import json_format from tensorflow.core.framework import node_def_pb2 from tensorflow.python.autograph.core import ag_ctx from tensorflow.python.autograph.impl import api as autograph from tensorflow.python.distribute import distribution_strategy_context as ds_context from tensorflow.python.eager import context from tensorflow.python.eager import execute from tensorflow.python.eager import function from tensorflow.python.eager import monitoring from tensorflow.python.framework import auto_control_deps from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import errors from tensorflow.python.framework import func_graph from tensorflow.python.framework import ops from tensorflow.python.framework import sparse_tensor from tensorflow.python.framework import tensor_spec from tensorflow.python.framework import tensor_util from tensorflow.python.keras import backend from tensorflow.python.keras import constraints from tensorflow.python.keras import initializers from tensorflow.python.keras import regularizers from tensorflow.python.keras.engine import base_layer_utils from tensorflow.python.keras.engine import input_spec from tensorflow.python.keras.engine import node as node_module from tensorflow.python.keras.mixed_precision.experimental import autocast_variable from tensorflow.python.keras.mixed_precision.experimental import policy from tensorflow.python.keras.saving.saved_model import layer_serialization from tensorflow.python.keras.utils import generic_utils from tensorflow.python.keras.utils import tf_utils # A module that only depends on `keras.layers` import these from here. from tensorflow.python.keras.utils.generic_utils import to_snake_case # pylint: disable=unused-import from tensorflow.python.keras.utils.tf_utils import is_tensor_or_tensor_list # pylint: disable=unused-import from tensorflow.python.module import module from tensorflow.python.ops import array_ops from tensorflow.python.ops import math_ops from tensorflow.python.ops import resource_variable_ops from tensorflow.python.ops import variables as tf_variables from tensorflow.python.ops.ragged import ragged_tensor from tensorflow.python.platform import tf_logging from tensorflow.python.training.tracking import base as trackable from tensorflow.python.training.tracking import data_structures from tensorflow.python.training.tracking import layer_utils as trackable_layer_utils from tensorflow.python.training.tracking import tracking from tensorflow.python.util import compat from tensorflow.python.util import deprecation from tensorflow.python.util import nest from tensorflow.python.util import object_identity from tensorflow.python.util import tf_inspect from tensorflow.python.util.tf_export import keras_export from tensorflow.tools.docs import doc_controls import tensorflow as tf class Keras_Model_for_Inference(tf.keras.Model): ''' This class is created to solve an issue that 'tf.Tensor' cannot be used in 'tf.cond' or 'tf.while_loop' while inference due to an autograph problem. The inference function is a clone of __call__ of 'tf.kreas.layers.Layer'. Inference is implemented at '_inference'. ''' def __init__(self, *args, **kwargs): # pylint: disable=super-init-not-called super() def inference(self, inputs, *args, **kwargs): call_context = base_layer_utils.call_context() input_list = nest.flatten(inputs) # We will attempt to build a TF graph if & only if all inputs are symbolic. # This is always the case in graph mode. It can also be the case in eager # mode when all inputs can be traced back to `keras.Input()` (when building # models using the functional API). build_graph = tf_utils.are_all_symbolic_tensors(input_list) # Accept NumPy and scalar inputs by converting to Tensors. if any(isinstance(x, (np.ndarray, float, int)) for x in input_list): def _convert_non_tensor(x): # Don't call `ops.convert_to_tensor` on all `inputs` because # `SparseTensors` can't be converted to `Tensor`. if isinstance(x, (np.ndarray, float, int)): return ops.convert_to_tensor(x) return x inputs = nest.map_structure(_convert_non_tensor, inputs) input_list = nest.flatten(inputs) # Handle `mask` propagation from previous layer to current layer. Masks can # be propagated explicitly via the `mask` argument, or implicitly via # setting the `_keras_mask` attribute on the inputs to a Layer. Masks passed # explicitly take priority. mask_arg_passed_by_framework = False input_masks = self._collect_input_masks(inputs, args, kwargs) if (self._expects_mask_arg and input_masks is not None and not self._call_arg_was_passed('mask', args, kwargs)): mask_arg_passed_by_framework = True kwargs['mask'] = input_masks # If `training` argument was not explicitly passed, propagate `training` # value from this layer's calling layer. training_arg_passed_by_framework = False # Priority 1: `training` was explicitly passed. if self._call_arg_was_passed('training', args, kwargs): training_value = self._get_call_arg_value('training', args, kwargs) if not self._expects_training_arg: kwargs.pop('training') else: training_value = None # Priority 2: `training` was passed to a parent layer. if call_context.training is not None: training_value = call_context.training # Priority 3a: `learning_phase()` has been set. elif backend.global_learning_phase_is_set(): training_value = backend.learning_phase() # Priority 3b: Pass the `learning_phase()` if in the Keras FuncGraph. elif build_graph: with backend.get_graph().as_default(): if base_layer_utils.is_in_keras_graph(): training_value = backend.learning_phase() if self._expects_training_arg and training_value is not None: # Force the training_value to be bool type which matches to the contract # for layer/model call args. if tensor_util.is_tensor(training_value): training_value = math_ops.cast(training_value, dtypes.bool) else: training_value = bool(training_value) kwargs['training'] = training_value training_arg_passed_by_framework = True # Only create Keras history if at least one tensor originates from a # `keras.Input`. Otherwise this Layer may be being used outside the Keras # framework. if build_graph and base_layer_utils.needs_keras_history(inputs): base_layer_utils.create_keras_history(inputs) # Clear eager losses on top level model call. # We are clearing the losses only on the top level model call and not on # every layer/model call because layer/model may be reused. if (base_layer_utils.is_in_eager_or_tf_function() and not call_context.in_call): self._clear_losses() with call_context.enter(self, inputs, build_graph, training_value): # Check input assumptions set after layer building, e.g. input shape. if build_graph: # Symbolic execution on symbolic tensors. We will attempt to build # the corresponding TF subgraph inside `backend.get_graph()` # TODO(reedwm): We should assert input compatibility after the inputs # are casted, not before. input_spec.assert_input_compatibility(self.input_spec, inputs, self.name) if (any(isinstance(x, ragged_tensor.RaggedTensor) for x in input_list) and self._supports_ragged_inputs is False): # pylint: disable=g-bool-id-comparison raise ValueError('Layer %s does not support RaggedTensors as input. ' 'Inputs received: %s. You can try converting your ' 'input to an uniform tensor.' % (self.name, inputs)) graph = backend.get_graph() with graph.as_default(), backend.name_scope(self._name_scope()): # Build layer if applicable (if the `build` method has been # overridden). self._maybe_build(inputs) cast_inputs = self._maybe_cast_inputs(inputs) # Wrapping `call` function in autograph to allow for dynamic control # flow and control dependencies in call. We are limiting this to # subclassed layers as autograph is strictly needed only for # subclassed layers and models. # tf_convert will respect the value of autograph setting in the # enclosing tf.function, if any. if (base_layer_utils.is_subclassed(self) and not base_layer_utils.from_saved_model(self)): call_fn = autograph.tf_convert( self._inference, ag_ctx.control_status_ctx()) else: call_fn = self._inference if not self.dynamic: try: with base_layer_utils.autocast_context_manager( self._compute_dtype): # Add auto_control_deps in V2 when they are not already added by # a `tf.function`. if (ops.executing_eagerly_outside_functions() and not base_layer_utils.is_in_eager_or_tf_function()): with auto_control_deps.AutomaticControlDependencies() as acd: outputs = call_fn(cast_inputs, *args, **kwargs) # Wrap Tensors in `outputs` in `tf.identity` to avoid # circular dependencies. outputs = base_layer_utils.mark_as_return(outputs, acd) else: outputs = call_fn(cast_inputs, *args, **kwargs) except errors.OperatorNotAllowedInGraphError as e: raise TypeError('You are attempting to use Python control ' 'flow in a layer that was not declared to be ' 'dynamic. Pass `dynamic=True` to the class ' 'constructor.\nEncountered error:\n"""\n' + str(e) + '\n"""') else: # We will use static shape inference to return symbolic tensors # matching the specifications of the layer outputs. # Since `self.dynamic` is True, we will never attempt to # run the underlying TF graph (which is disconnected). # TODO(fchollet): consider py_func as an alternative, which # would enable us to run the underlying graph if needed. outputs = self._symbolic_call(inputs) if outputs is None: raise ValueError('A layer\'s `call` method should return a ' 'Tensor or a list of Tensors, not None ' '(layer: ' + self.name + ').') if base_layer_utils.have_all_keras_metadata(inputs): if training_arg_passed_by_framework: kwargs.pop('training') if mask_arg_passed_by_framework: kwargs.pop('mask') inputs, outputs = self._set_connectivity_metadata_( inputs, outputs, args, kwargs) self._handle_activity_regularization(inputs, outputs) self._set_mask_metadata(inputs, outputs, input_masks) if hasattr(self, '_set_inputs') and not self.inputs: # Subclassed network: explicitly set metadata normally set by # a call to self._set_inputs(). # TODO(b/120997007): This should be done in Eager as well, but # causes garbage collection issues because of the placeholders # created on the default Keras graph. self._set_inputs(inputs, outputs) else: # Eager execution on data tensors. with backend.name_scope(self._name_scope()): self._maybe_build(inputs) cast_inputs = self._maybe_cast_inputs(inputs) with base_layer_utils.autocast_context_manager( self._compute_dtype): outputs = self._inference(cast_inputs, *args, **kwargs) self._handle_activity_regularization(inputs, outputs) self._set_mask_metadata(inputs, outputs, input_masks) return outputs def _inference(self, inputs, *args, **kwargs): raise NotImplementedError @trackable.no_automatic_dependency_tracking def _init_graph_network(self, inputs, outputs, name=None, **kwargs): generic_utils.validate_kwargs( kwargs, {'trainable'}, 'Functional models may only specify `name` and `trainable` keyword ' 'arguments during initialization. Got an unexpected argument:') # Normalize and set self.inputs, self.outputs. if isinstance(inputs, list) and len(nest.flatten(inputs)) == 1: inputs = inputs[0] if isinstance(outputs, list) and len(nest.flatten(outputs)) == 1: outputs = outputs[0] self._nested_outputs = outputs self._nested_inputs = inputs self.inputs = nest.flatten(inputs) self.outputs = nest.flatten(outputs) if any(not hasattr(tensor, '_keras_history') for tensor in self.outputs): base_layer_utils.create_keras_history(self._nested_outputs) self._base_init(name=name, **kwargs) self._validate_graph_inputs_and_outputs() # A Network does not create weights of its own, thus it is already # built. self.built = True self._compute_output_and_mask_jointly = True self._is_graph_network = True # `_expects_training_arg` is True since the `training` argument is always # present in the signature of the `call` method of a graph network. self._expects_training_arg = True self._expects_mask_arg = True # A graph network does not autocast inputs, as its layers will cast them # instead. self._autocast = False self._input_layers = [] self._output_layers = [] self._input_coordinates = [] self._output_coordinates = [] self._supports_ragged_inputs = None # This is for performance optimization when calling the Network on new # inputs. Every time the Network is called on a set on input tensors, # we compute the output tensors, output masks and output shapes in one pass, # then cache them here. When any of these outputs is queried later, we # retrieve it from there instead of recomputing it. self._output_mask_cache = {} self._output_tensor_cache = {} self._output_shape_cache = {} # Build self._output_layers: for x in self.outputs: layer, node_index, tensor_index = x._keras_history # pylint: disable=protected-access self._output_layers.append(layer) self._output_coordinates.append((layer, node_index, tensor_index)) # Build self._input_layers: for x in self.inputs: layer, node_index, tensor_index = x._keras_history # pylint: disable=protected-access # It's supposed to be an input layer, so only one node # and one tensor output. assert node_index == 0 assert tensor_index == 0 self._input_layers.append(layer) self._input_coordinates.append((layer, node_index, tensor_index)) # Keep track of the network's nodes and layers. nodes, nodes_by_depth, layers, _ = _map_graph_network( self.inputs, self.outputs) self._network_nodes = nodes self._nodes_by_depth = nodes_by_depth self._layers = layers self._layer_call_argspecs = {} for layer in self._layers: self._layer_call_argspecs[layer] = tf_inspect.getfullargspec(layer.call) layer._attribute_sentinel.add_parent(self._attribute_sentinel) self._track_layers(layers) # Create the node linking internal inputs to internal outputs. node_module.Node( outbound_layer=self, inbound_layers=[], node_indices=[], tensor_indices=[], input_tensors=self._nested_inputs, output_tensors=self._nested_outputs) # Build self.input_names and self.output_names. self._set_output_names() self.input_names = [] self._feed_input_names = [] self._feed_inputs = [] self._feed_input_shapes = [] for layer in self._input_layers: self.input_names.append(layer.name) if layer.is_placeholder: self._feed_input_names.append(layer.name) # Use batch_input_shape here because non-eager composite tensors may not # have a shape attribute that's meaningful (sparse, for instance, has # a tensor that's non-constant and needs to be fed). This means that # input layers that create placeholders will need to have the # batch_input_shape attr to allow for input shape validation. self._feed_input_shapes.append(layer._batch_input_shape) self._feed_inputs.append(layer.input)
[ 1, 529, 276, 1112, 420, 29958, 16524, 29967, 1177, 29914, 29956, 1351, 29934, 10262, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 16250, 13, 5215, 2090, 312, 8789, 13, 5215, 4256, 8504, 13, 5215, 3244, 292, 13, 13, 5215, 12655, 408, 7442, 13, 3166, 4832, 29889, 13529, 267, 1053, 14319, 29871, 396, 282, 2904, 524, 29901, 11262, 29922, 276, 12119, 29899, 16145, 262, 13, 13, 3166, 5386, 29889, 17529, 9721, 1053, 4390, 29918, 4830, 13, 3166, 26110, 29889, 3221, 29889, 4468, 1053, 2943, 29918, 1753, 29918, 24381, 29906, 13, 3166, 26110, 29889, 4691, 29889, 1300, 1946, 29889, 3221, 1053, 946, 29918, 13073, 13, 3166, 26110, 29889, 4691, 29889, 1300, 1946, 29889, 13699, 1053, 7882, 408, 1120, 1946, 13, 3166, 26110, 29889, 4691, 29889, 5721, 2666, 1053, 4978, 29918, 710, 8963, 29918, 4703, 408, 18031, 29918, 4703, 13, 3166, 26110, 29889, 4691, 29889, 29872, 1875, 1053, 3030, 13, 3166, 26110, 29889, 4691, 29889, 29872, 1875, 1053, 6222, 13, 3166, 26110, 29889, 4691, 29889, 29872, 1875, 1053, 740, 13, 3166, 26110, 29889, 4691, 29889, 29872, 1875, 1053, 29652, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 4469, 29918, 6451, 29918, 311, 567, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 4868, 29918, 459, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 270, 8768, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 4436, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 3653, 29918, 4262, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 288, 567, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 29234, 29918, 20158, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 12489, 29918, 6550, 13, 3166, 26110, 29889, 4691, 29889, 4468, 1053, 12489, 29918, 4422, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 1053, 14998, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 1053, 11938, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 1053, 2847, 19427, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 1053, 4943, 19427, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 10599, 1053, 2967, 29918, 13148, 29918, 13239, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 10599, 1053, 1881, 29918, 6550, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 10599, 1053, 2943, 408, 2943, 29918, 5453, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 29885, 11925, 29918, 17990, 2459, 29889, 735, 27910, 1053, 1120, 542, 579, 29918, 11918, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 29885, 11925, 29918, 17990, 2459, 29889, 735, 27910, 1053, 8898, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 29879, 5555, 29889, 17314, 29918, 4299, 1053, 7546, 29918, 15550, 2133, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 13239, 1053, 10035, 29918, 13239, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 13239, 1053, 15886, 29918, 13239, 13, 29937, 319, 3883, 393, 871, 7111, 373, 421, 3946, 294, 29889, 29277, 29952, 1053, 1438, 515, 1244, 29889, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 13239, 29889, 19206, 29918, 13239, 1053, 304, 29918, 29879, 21040, 29918, 4878, 29871, 396, 282, 2904, 524, 29901, 11262, 29922, 348, 3880, 29899, 5215, 13, 3166, 26110, 29889, 4691, 29889, 3946, 294, 29889, 13239, 29889, 13264, 29918, 13239, 1053, 338, 29918, 20158, 29918, 272, 29918, 20158, 29918, 1761, 29871, 396, 282, 2904, 524, 29901, 11262, 29922, 348, 3880, 29899, 5215, 13, 3166, 26110, 29889, 4691, 29889, 5453, 1053, 3883, 13, 3166, 26110, 29889, 4691, 29889, 3554, 1053, 1409, 29918, 3554, 13, 3166, 26110, 29889, 4691, 29889, 3554, 1053, 5844, 29918, 3554, 13, 3166, 26110, 29889, 4691, 29889, 3554, 1053, 6503, 29918, 11918, 29918, 3554, 13, 3166, 26110, 29889, 4691, 29889, 3554, 1053, 3651, 408, 15886, 29918, 20897, 13, 3166, 26110, 29889, 4691, 29889, 3554, 29889, 1431, 3192, 1053, 1153, 1505, 287, 29918, 20158, 13, 3166, 26110, 29889, 4691, 29889, 12120, 1053, 15886, 29918, 21027, 13, 3166, 26110, 29889, 4691, 29889, 26495, 29889, 11294, 292, 1053, 2967, 408, 5702, 519, 13, 3166, 26110, 29889, 4691, 29889, 26495, 29889, 11294, 292, 1053, 848, 29918, 4984, 1973, 13, 3166, 26110, 29889, 4691, 29889, 26495, 29889, 11294, 292, 1053, 7546, 29918, 13239, 408, 5702, 519, 29918, 13148, 29918, 13239, 13, 3166, 26110, 29889, 4691, 29889, 26495, 29889, 11294, 292, 1053, 23110, 13, 3166, 26110, 29889, 4691, 29889, 4422, 1053, 10007, 13, 3166, 26110, 29889, 4691, 29889, 4422, 1053, 16460, 362, 13, 3166, 26110, 29889, 4691, 29889, 4422, 1053, 17763, 13, 3166, 26110, 29889, 4691, 29889, 4422, 1053, 1203, 29918, 22350, 13, 3166, 26110, 29889, 4691, 29889, 4422, 1053, 15886, 29918, 1144, 1103, 13, 3166, 26110, 29889, 4691, 29889, 4422, 29889, 13264, 29918, 15843, 1053, 13023, 294, 29918, 15843, 13, 3166, 26110, 29889, 8504, 29889, 2640, 1053, 1574, 29918, 26255, 13, 5215, 26110, 408, 15886, 13, 13, 1990, 12693, 294, 29918, 3195, 29918, 1454, 29918, 797, 1659, 29898, 13264, 29889, 3946, 294, 29889, 3195, 1125, 13, 1678, 14550, 13, 1678, 910, 770, 338, 2825, 304, 4505, 385, 2228, 393, 525, 13264, 29889, 29911, 6073, 29915, 13, 1678, 2609, 367, 1304, 297, 525, 13264, 29889, 1116, 29915, 470, 525, 13264, 29889, 8000, 29918, 7888, 29915, 1550, 27262, 13, 1678, 2861, 304, 385, 1120, 1946, 1108, 29889, 450, 27262, 740, 338, 263, 13, 1678, 17432, 310, 4770, 4804, 1649, 310, 525, 13264, 29889, 4109, 294, 29889, 29277, 29889, 14420, 4286, 512, 1659, 13, 1678, 338, 8762, 472, 22868, 262, 1659, 4286, 13, 1678, 14550, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 334, 5085, 29892, 3579, 19290, 1125, 29871, 396, 282, 2904, 524, 29901, 11262, 29922, 9136, 29899, 2344, 29899, 1333, 29899, 13998, 13, 4706, 2428, 580, 13, 13, 1678, 822, 27262, 29898, 1311, 29892, 10970, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 13, 4706, 1246, 29918, 4703, 353, 2967, 29918, 13148, 29918, 13239, 29889, 4804, 29918, 4703, 580, 13, 4706, 1881, 29918, 1761, 353, 17763, 29889, 1579, 8606, 29898, 2080, 29879, 29897, 13, 13, 4706, 396, 1334, 674, 4218, 304, 2048, 263, 323, 29943, 3983, 565, 669, 871, 565, 599, 10970, 526, 5829, 293, 29889, 13, 4706, 396, 910, 338, 2337, 278, 1206, 297, 3983, 4464, 29889, 739, 508, 884, 367, 278, 1206, 297, 19888, 13, 4706, 396, 4464, 746, 599, 10970, 508, 367, 16703, 287, 1250, 304, 421, 3946, 294, 29889, 4290, 2555, 313, 8256, 5214, 13, 4706, 396, 4733, 773, 278, 13303, 3450, 467, 13, 4706, 2048, 29918, 4262, 353, 15886, 29918, 13239, 29889, 598, 29918, 497, 29918, 18098, 293, 29918, 29873, 575, 943, 29898, 2080, 29918, 1761, 29897, 13, 13, 4706, 396, 29848, 11848, 19737, 322, 17336, 10970, 491, 17415, 304, 323, 575, 943, 29889, 13, 4706, 565, 738, 29898, 275, 8758, 29898, 29916, 29892, 313, 9302, 29889, 299, 2378, 29892, 5785, 29892, 938, 876, 363, 921, 297, 1881, 29918, 1761, 1125, 13, 9651, 822, 903, 13441, 29918, 5464, 29918, 20158, 29898, 29916, 1125, 13, 18884, 396, 3872, 29915, 29873, 1246, 421, 3554, 29889, 13441, 29918, 517, 29918, 20158, 29952, 373, 599, 421, 2080, 29879, 29952, 1363, 13, 18884, 396, 421, 29903, 5510, 29911, 575, 943, 29952, 508, 29915, 29873, 367, 11543, 304, 421, 29911, 6073, 1412, 13, 18884, 565, 338, 8758, 29898, 29916, 29892, 313, 9302, 29889, 299, 2378, 29892, 5785, 29892, 938, 22164, 13, 462, 1678, 736, 288, 567, 29889, 13441, 29918, 517, 29918, 20158, 29898, 29916, 29897, 13, 18884, 736, 921, 13, 9651, 10970, 353, 17763, 29889, 1958, 29918, 23905, 7373, 13441, 29918, 5464, 29918, 20158, 29892, 10970, 29897, 13, 9651, 1881, 29918, 1761, 353, 17763, 29889, 1579, 8606, 29898, 2080, 29879, 29897, 13, 13, 4706, 396, 29273, 421, 13168, 29952, 13089, 362, 515, 3517, 7546, 304, 1857, 7546, 29889, 341, 1278, 29879, 508, 13, 4706, 396, 367, 13089, 630, 9479, 3025, 278, 421, 13168, 29952, 2980, 29892, 470, 27063, 3025, 13, 4706, 396, 4444, 278, 19392, 3946, 294, 29918, 13168, 29952, 5352, 373, 278, 10970, 304, 263, 365, 2747, 29889, 341, 1278, 29879, 4502, 13, 4706, 396, 9479, 2125, 20136, 29889, 13, 4706, 11105, 29918, 1191, 29918, 3364, 287, 29918, 1609, 29918, 4468, 353, 7700, 13, 4706, 1881, 29918, 13168, 29879, 353, 1583, 3032, 15914, 29918, 2080, 29918, 13168, 29879, 29898, 2080, 29879, 29892, 6389, 29892, 9049, 5085, 29897, 13, 4706, 565, 313, 1311, 3032, 17854, 29879, 29918, 13168, 29918, 1191, 322, 1881, 29918, 13168, 29879, 338, 451, 6213, 322, 13, 18884, 451, 1583, 3032, 4804, 29918, 1191, 29918, 11102, 29918, 3364, 287, 877, 13168, 742, 6389, 29892, 9049, 5085, 22164, 13, 9651, 11105, 29918, 1191, 29918, 3364, 287, 29918, 1609, 29918, 4468, 353, 5852, 13, 9651, 9049, 5085, 1839, 13168, 2033, 353, 1881, 29918, 13168, 29879, 13, 13, 4706, 396, 960, 421, 26495, 29952, 2980, 471, 451, 9479, 4502, 29892, 13089, 403, 421, 26495, 29952, 13, 4706, 396, 995, 515, 445, 7546, 29915, 29879, 5432, 7546, 29889, 13, 4706, 6694, 29918, 1191, 29918, 3364, 287, 29918, 1609, 29918, 4468, 353, 7700, 13, 4706, 396, 22096, 537, 29871, 29896, 29901, 421, 26495, 29952, 471, 9479, 4502, 29889, 13, 4706, 565, 1583, 3032, 4804, 29918, 1191, 29918, 11102, 29918, 3364, 287, 877, 26495, 742, 6389, 29892, 9049, 5085, 1125, 13, 9651, 6694, 29918, 1767, 353, 1583, 3032, 657, 29918, 4804, 29918, 1191, 29918, 1767, 877, 26495, 742, 6389, 29892, 9049, 5085, 29897, 13, 9651, 565, 451, 1583, 3032, 17854, 29879, 29918, 26495, 29918, 1191, 29901, 13, 18884, 9049, 5085, 29889, 7323, 877, 26495, 1495, 13, 4706, 1683, 29901, 13, 9651, 6694, 29918, 1767, 353, 6213, 13, 9651, 396, 22096, 537, 29871, 29906, 29901, 421, 26495, 29952, 471, 4502, 304, 263, 3847, 7546, 29889, 13, 9651, 565, 1246, 29918, 4703, 29889, 26495, 338, 451, 6213, 29901, 13, 18884, 6694, 29918, 1767, 353, 1246, 29918, 4703, 29889, 26495, 13, 9651, 396, 22096, 537, 29871, 29941, 29874, 29901, 421, 21891, 29918, 21646, 2555, 756, 1063, 731, 29889, 13, 9651, 25342, 14998, 29889, 10945, 29918, 21891, 29918, 21646, 29918, 275, 29918, 842, 7295, 13, 18884, 6694, 29918, 1767, 353, 14998, 29889, 21891, 29918, 21646, 580, 13, 9651, 396, 22096, 537, 29871, 29941, 29890, 29901, 6978, 278, 421, 21891, 29918, 21646, 2555, 565, 297, 278, 12693, 294, 383, 4661, 9527, 29889, 13, 9651, 25342, 2048, 29918, 4262, 29901, 13, 18884, 411, 14998, 29889, 657, 29918, 4262, 2141, 294, 29918, 4381, 7295, 13, 462, 1678, 565, 2967, 29918, 13148, 29918, 13239, 29889, 275, 29918, 262, 29918, 3946, 294, 29918, 4262, 7295, 13, 462, 4706, 6694, 29918, 1767, 353, 14998, 29889, 21891, 29918, 21646, 580, 13, 13, 9651, 565, 1583, 3032, 17854, 29879, 29918, 26495, 29918, 1191, 322, 6694, 29918, 1767, 338, 451, 6213, 29901, 13, 18884, 396, 11004, 278, 6694, 29918, 1767, 304, 367, 6120, 1134, 607, 7087, 304, 278, 8078, 13, 18884, 396, 363, 7546, 29914, 4299, 1246, 6389, 29889, 13, 18884, 565, 12489, 29918, 4422, 29889, 275, 29918, 20158, 29898, 26495, 29918, 1767, 1125, 13, 462, 1678, 6694, 29918, 1767, 353, 5844, 29918, 3554, 29889, 4384, 29898, 26495, 29918, 1767, 29892, 270, 8768, 29889, 11227, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 6694, 29918, 1767, 353, 6120, 29898, 26495, 29918, 1767, 29897, 13, 18884, 9049, 5085, 1839, 26495, 2033, 353, 6694, 29918, 1767, 13, 18884, 6694, 29918, 1191, 29918, 3364, 287, 29918, 1609, 29918, 4468, 353, 5852, 13, 13, 4706, 396, 9333, 1653, 12693, 294, 4955, 565, 472, 3203, 697, 12489, 3978, 1078, 515, 263, 13, 4706, 396, 421, 3946, 294, 29889, 4290, 1412, 13466, 445, 365, 2747, 1122, 367, 1641, 1304, 5377, 278, 12693, 294, 13, 4706, 396, 6890, 29889, 13, 4706, 565, 2048, 29918, 4262, 322, 2967, 29918, 13148, 29918, 13239, 29889, 484, 5779, 29918, 3946, 294, 29918, 18434, 29898, 2080, 29879, 1125, 13, 9651, 2967, 29918, 13148, 29918, 13239, 29889, 3258, 29918, 3946, 294, 29918, 18434, 29898, 2080, 29879, 29897, 13, 13, 4706, 396, 17732, 19888, 28495, 373, 2246, 3233, 1904, 1246, 29889, 13, 4706, 396, 1334, 526, 2821, 292, 278, 28495, 871, 373, 278, 2246, 3233, 1904, 1246, 322, 451, 373, 13, 4706, 396, 1432, 7546, 29914, 4299, 1246, 1363, 7546, 29914, 4299, 1122, 367, 337, 3880, 29889, 13, 4706, 565, 313, 3188, 29918, 13148, 29918, 13239, 29889, 275, 29918, 262, 29918, 29872, 1875, 29918, 272, 29918, 13264, 29918, 2220, 580, 322, 13, 18884, 451, 1246, 29918, 4703, 29889, 262, 29918, 4804, 1125, 13, 9651, 1583, 3032, 8551, 29918, 6758, 267, 580, 13, 13, 4706, 411, 1246, 29918, 4703, 29889, 5893, 29898, 1311, 29892, 10970, 29892, 2048, 29918, 4262, 29892, 6694, 29918, 1767, 1125, 13, 9651, 396, 5399, 1881, 20813, 731, 1156, 7546, 5214, 29892, 321, 29889, 29887, 29889, 1881, 8267, 29889, 13, 9651, 565, 2048, 29918, 4262, 29901, 13, 18884, 396, 23858, 293, 8225, 373, 5829, 293, 25187, 943, 29889, 1334, 674, 4218, 304, 2048, 13, 18884, 396, 278, 6590, 323, 29943, 1014, 4262, 2768, 421, 27852, 29889, 657, 29918, 4262, 2555, 13, 18884, 396, 14402, 29898, 276, 287, 29893, 29885, 1125, 1334, 881, 4974, 1881, 24521, 1156, 278, 10970, 13, 18884, 396, 526, 4320, 287, 29892, 451, 1434, 29889, 13, 18884, 1881, 29918, 6550, 29889, 9294, 29918, 2080, 29918, 12667, 4127, 29898, 1311, 29889, 2080, 29918, 6550, 29892, 10970, 29892, 13, 462, 462, 462, 462, 462, 9651, 1583, 29889, 978, 29897, 13, 18884, 565, 313, 1384, 29898, 275, 8758, 29898, 29916, 29892, 1153, 1505, 287, 29918, 20158, 29889, 29934, 351, 3192, 29911, 6073, 29897, 363, 921, 297, 1881, 29918, 1761, 29897, 13, 462, 4706, 322, 1583, 3032, 5924, 29879, 29918, 1431, 3192, 29918, 2080, 29879, 338, 7700, 1125, 1678, 396, 282, 2904, 524, 29901, 11262, 29922, 29887, 29899, 11227, 29899, 333, 29899, 510, 20941, 13, 462, 1678, 12020, 7865, 2392, 877, 14420, 1273, 29879, 947, 451, 2304, 390, 351, 3192, 29911, 575, 943, 408, 1881, 29889, 525, 13, 462, 462, 462, 268, 525, 4290, 29879, 4520, 29901, 1273, 29879, 29889, 887, 508, 1018, 17415, 596, 525, 13, 462, 462, 462, 268, 525, 2080, 304, 385, 9090, 12489, 6169, 1273, 313, 1311, 29889, 978, 29892, 10970, 876, 13, 13, 18884, 3983, 353, 14998, 29889, 657, 29918, 4262, 580, 13, 18884, 411, 3983, 29889, 294, 29918, 4381, 3285, 14998, 29889, 978, 29918, 6078, 29898, 1311, 3032, 978, 29918, 6078, 580, 1125, 13, 462, 1678, 396, 8878, 7546, 565, 22903, 313, 361, 278, 421, 4282, 29952, 1158, 756, 1063, 13, 462, 1678, 396, 20831, 1145, 467, 13, 462, 1678, 1583, 3032, 26026, 29918, 4282, 29898, 2080, 29879, 29897, 13, 462, 1678, 4320, 29918, 2080, 29879, 353, 1583, 3032, 26026, 29918, 4384, 29918, 2080, 29879, 29898, 2080, 29879, 29897, 13, 13, 462, 1678, 396, 399, 336, 3262, 421, 4804, 29952, 740, 297, 1120, 1946, 304, 2758, 363, 7343, 2761, 13, 462, 1678, 396, 4972, 322, 2761, 9962, 297, 1246, 29889, 1334, 526, 4046, 292, 445, 304, 13, 462, 1678, 396, 19481, 287, 15359, 408, 1120, 1946, 338, 18719, 4312, 871, 363, 13, 462, 1678, 396, 19481, 287, 15359, 322, 4733, 29889, 13, 462, 1678, 396, 15886, 29918, 13441, 674, 3390, 278, 995, 310, 1120, 1946, 4444, 297, 278, 13, 462, 1678, 396, 427, 11291, 292, 15886, 29889, 2220, 29892, 565, 738, 29889, 13, 462, 1678, 565, 313, 3188, 29918, 13148, 29918, 13239, 29889, 275, 29918, 1491, 1990, 287, 29898, 1311, 29897, 322, 13, 462, 9651, 451, 2967, 29918, 13148, 29918, 13239, 29889, 3166, 29918, 17314, 29918, 4299, 29898, 1311, 22164, 13, 462, 4706, 1246, 29918, 9144, 353, 1120, 1946, 29889, 13264, 29918, 13441, 29898, 13, 462, 18884, 1583, 3032, 262, 1659, 29892, 946, 29918, 13073, 29889, 6451, 29918, 4882, 29918, 13073, 3101, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 1246, 29918, 9144, 353, 1583, 3032, 262, 1659, 13, 13, 462, 1678, 565, 451, 1583, 29889, 16626, 29901, 13, 462, 4706, 1018, 29901, 13, 462, 9651, 411, 2967, 29918, 13148, 29918, 13239, 29889, 1300, 542, 579, 29918, 4703, 29918, 12847, 29898, 13, 462, 462, 1678, 1583, 3032, 26017, 29918, 29881, 1853, 1125, 13, 462, 18884, 396, 3462, 4469, 29918, 6451, 29918, 311, 567, 297, 478, 29906, 746, 896, 526, 451, 2307, 2715, 491, 13, 462, 18884, 396, 263, 421, 13264, 29889, 2220, 1412, 13, 462, 18884, 565, 313, 3554, 29889, 4258, 17068, 29918, 29872, 1875, 368, 29918, 449, 2975, 29918, 12171, 580, 322, 13, 462, 462, 4706, 451, 2967, 29918, 13148, 29918, 13239, 29889, 275, 29918, 262, 29918, 29872, 1875, 29918, 272, 29918, 13264, 29918, 2220, 580, 1125, 13, 462, 462, 1678, 411, 4469, 29918, 6451, 29918, 311, 567, 29889, 28451, 2454, 4809, 8498, 7158, 580, 408, 1274, 29881, 29901, 13, 462, 462, 4706, 14391, 353, 1246, 29918, 9144, 29898, 4384, 29918, 2080, 29879, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 462, 462, 4706, 396, 399, 2390, 323, 575, 943, 297, 421, 4905, 29879, 29952, 297, 421, 13264, 29889, 22350, 29952, 304, 4772, 13, 462, 462, 4706, 396, 19308, 9962, 29889, 13, 462, 462, 4706, 14391, 353, 2967, 29918, 13148, 29918, 13239, 29889, 3502, 29918, 294, 29918, 2457, 29898, 4905, 29879, 29892, 1274, 29881, 29897, 13, 462, 18884, 1683, 29901, 13, 462, 462, 1678, 14391, 353, 1246, 29918, 9144, 29898, 4384, 29918, 2080, 29879, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 13, 462, 4706, 5174, 4436, 29889, 26486, 3664, 15930, 287, 797, 9527, 2392, 408, 321, 29901, 13, 462, 9651, 12020, 20948, 877, 3492, 526, 15661, 304, 671, 5132, 2761, 525, 13, 462, 462, 462, 9651, 525, 1731, 297, 263, 7546, 393, 471, 451, 8052, 304, 367, 525, 13, 462, 462, 462, 9651, 525, 16626, 29889, 6978, 421, 16626, 29922, 5574, 29952, 304, 278, 770, 525, 13, 462, 462, 462, 9651, 525, 27821, 7790, 29876, 8566, 5336, 287, 1059, 3583, 29876, 15945, 26732, 29876, 29915, 718, 13, 462, 462, 462, 9651, 851, 29898, 29872, 29897, 718, 11297, 29876, 15945, 29908, 1495, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 396, 1334, 674, 671, 2294, 8267, 27262, 304, 736, 5829, 293, 25187, 943, 13, 462, 4706, 396, 9686, 278, 2702, 800, 310, 278, 7546, 14391, 29889, 13, 462, 4706, 396, 4001, 421, 1311, 29889, 16626, 29952, 338, 5852, 29892, 591, 674, 2360, 4218, 304, 13, 462, 4706, 396, 1065, 278, 14407, 323, 29943, 3983, 313, 4716, 338, 766, 18045, 467, 13, 462, 4706, 396, 14402, 29898, 29888, 305, 324, 1026, 1125, 2050, 11451, 29918, 9891, 408, 385, 8671, 29892, 607, 13, 462, 4706, 396, 723, 9025, 502, 304, 1065, 278, 14407, 3983, 565, 4312, 29889, 13, 462, 4706, 14391, 353, 1583, 3032, 18098, 293, 29918, 4804, 29898, 2080, 29879, 29897, 13, 13, 462, 1678, 565, 14391, 338, 6213, 29901, 13, 462, 4706, 12020, 7865, 2392, 877, 29909, 7546, 20333, 29879, 421, 4804, 29952, 1158, 881, 736, 263, 525, 13, 462, 462, 462, 308, 525, 29911, 6073, 470, 263, 1051, 310, 323, 575, 943, 29892, 451, 6213, 525, 13, 462, 462, 462, 308, 525, 29898, 13148, 29901, 525, 718, 1583, 29889, 978, 718, 525, 467, 1495, 13, 462, 1678, 565, 2967, 29918, 13148, 29918, 13239, 29889, 17532, 29918, 497, 29918, 3946, 294, 29918, 19635, 29898, 2080, 29879, 1125, 13, 462, 4706, 565, 6694, 29918, 1191, 29918, 3364, 287, 29918, 1609, 29918, 4468, 29901, 13, 462, 9651, 9049, 5085, 29889, 7323, 877, 26495, 1495, 13, 462, 4706, 565, 11105, 29918, 1191, 29918, 3364, 287, 29918, 1609, 29918, 4468, 29901, 13, 462, 9651, 9049, 5085, 29889, 7323, 877, 13168, 1495, 13, 462, 4706, 10970, 29892, 14391, 353, 1583, 3032, 842, 29918, 6915, 2068, 29918, 19635, 23538, 13, 462, 18884, 10970, 29892, 14391, 29892, 6389, 29892, 9049, 5085, 29897, 13, 462, 1678, 1583, 3032, 8411, 29918, 10072, 29918, 15227, 2133, 29898, 2080, 29879, 29892, 14391, 29897, 13, 462, 1678, 1583, 3032, 842, 29918, 13168, 29918, 19635, 29898, 2080, 29879, 29892, 14391, 29892, 1881, 29918, 13168, 29879, 29897, 13, 462, 1678, 565, 756, 5552, 29898, 1311, 29892, 22868, 842, 29918, 2080, 29879, 1495, 322, 451, 1583, 29889, 2080, 29879, 29901, 13, 462, 4706, 396, 3323, 1990, 287, 3564, 29901, 9479, 731, 15562, 12891, 731, 491, 13, 462, 4706, 396, 263, 1246, 304, 1583, 3032, 842, 29918, 2080, 29879, 2141, 13, 462, 4706, 396, 14402, 29898, 29890, 29914, 29896, 29906, 29900, 29929, 29929, 29955, 29900, 29900, 29955, 1125, 910, 881, 367, 2309, 297, 382, 1875, 408, 1532, 29892, 541, 13, 462, 4706, 396, 9946, 25861, 4333, 5626, 1363, 310, 278, 2058, 8948, 414, 13, 462, 4706, 396, 2825, 373, 278, 2322, 12693, 294, 3983, 29889, 13, 462, 4706, 1583, 3032, 842, 29918, 2080, 29879, 29898, 2080, 29879, 29892, 14391, 29897, 13, 9651, 1683, 29901, 13, 18884, 396, 382, 1875, 8225, 373, 848, 25187, 943, 29889, 13, 18884, 411, 14998, 29889, 978, 29918, 6078, 29898, 1311, 3032, 978, 29918, 6078, 580, 1125, 13, 462, 1678, 1583, 3032, 26026, 29918, 4282, 29898, 2080, 29879, 29897, 13, 462, 1678, 4320, 29918, 2080, 29879, 353, 1583, 3032, 26026, 29918, 4384, 29918, 2080, 29879, 29898, 2080, 29879, 29897, 13, 462, 1678, 411, 2967, 29918, 13148, 29918, 13239, 29889, 1300, 542, 579, 29918, 4703, 29918, 12847, 29898, 13, 462, 9651, 1583, 3032, 26017, 29918, 29881, 1853, 1125, 13, 462, 4706, 14391, 353, 1583, 3032, 262, 1659, 29898, 4384, 29918, 2080, 29879, 29892, 334, 5085, 29892, 3579, 19290, 29897, 13, 462, 1678, 1583, 3032, 8411, 29918, 10072, 29918, 15227, 2133, 29898, 2080, 29879, 29892, 14391, 29897, 13, 462, 1678, 1583, 3032, 842, 29918, 13168, 29918, 19635, 29898, 2080, 29879, 29892, 14391, 29892, 1881, 29918, 13168, 29879, 29897, 13, 13, 4706, 736, 14391, 13, 13, 1678, 822, 903, 262, 1659, 29898, 1311, 29892, 10970, 29892, 334, 5085, 29892, 3579, 19290, 1125, 13, 4706, 12020, 2216, 1888, 2037, 287, 2392, 13, 13, 1678, 732, 11294, 519, 29889, 1217, 29918, 17405, 2454, 29918, 10836, 29918, 11294, 292, 13, 1678, 822, 903, 2344, 29918, 4262, 29918, 11618, 29898, 1311, 29892, 10970, 29892, 14391, 29892, 1024, 29922, 8516, 29892, 3579, 19290, 1125, 13, 4706, 10035, 29918, 13239, 29889, 15480, 29918, 19290, 29898, 13, 18884, 9049, 5085, 29892, 11117, 14968, 519, 16675, 13, 18884, 525, 6678, 284, 4733, 1122, 871, 6084, 421, 978, 29952, 322, 421, 14968, 519, 29952, 13553, 525, 13, 18884, 525, 25699, 2645, 17865, 29889, 15992, 385, 15668, 2980, 29901, 1495, 13, 4706, 396, 21981, 675, 322, 731, 1583, 29889, 2080, 29879, 29892, 1583, 29889, 4905, 29879, 29889, 13, 4706, 565, 338, 8758, 29898, 2080, 29879, 29892, 1051, 29897, 322, 7431, 29898, 17510, 29889, 1579, 8606, 29898, 2080, 29879, 876, 1275, 29871, 29896, 29901, 13, 9651, 10970, 353, 10970, 29961, 29900, 29962, 13, 4706, 565, 338, 8758, 29898, 4905, 29879, 29892, 1051, 29897, 322, 7431, 29898, 17510, 29889, 1579, 8606, 29898, 4905, 29879, 876, 1275, 29871, 29896, 29901, 13, 9651, 14391, 353, 14391, 29961, 29900, 29962, 13, 4706, 1583, 3032, 27420, 29918, 4905, 29879, 353, 14391, 13, 4706, 1583, 3032, 27420, 29918, 2080, 29879, 353, 10970, 13, 4706, 1583, 29889, 2080, 29879, 353, 17763, 29889, 1579, 8606, 29898, 2080, 29879, 29897, 13, 4706, 1583, 29889, 4905, 29879, 353, 17763, 29889, 1579, 8606, 29898, 4905, 29879, 29897, 13, 13, 4706, 565, 738, 29898, 1333, 756, 5552, 29898, 20158, 29892, 22868, 3946, 294, 29918, 18434, 1495, 363, 12489, 297, 1583, 29889, 4905, 29879, 1125, 13, 9651, 2967, 29918, 13148, 29918, 13239, 29889, 3258, 29918, 3946, 294, 29918, 18434, 29898, 1311, 3032, 27420, 29918, 4905, 29879, 29897, 13, 13, 4706, 1583, 3032, 3188, 29918, 2344, 29898, 978, 29922, 978, 29892, 3579, 19290, 29897, 13, 4706, 1583, 3032, 15480, 29918, 4262, 29918, 2080, 29879, 29918, 392, 29918, 4905, 29879, 580, 13, 13, 4706, 396, 319, 8527, 947, 451, 1653, 18177, 310, 967, 1914, 29892, 4550, 372, 338, 2307, 13, 4706, 396, 4240, 29889, 13, 4706, 1583, 29889, 16145, 353, 5852, 13, 4706, 1583, 3032, 26017, 29918, 4905, 29918, 392, 29918, 13168, 29918, 12090, 368, 353, 5852, 13, 4706, 1583, 3032, 275, 29918, 4262, 29918, 11618, 353, 5852, 13, 4706, 396, 19392, 17854, 29879, 29918, 26495, 29918, 1191, 29952, 338, 5852, 1951, 278, 421, 26495, 29952, 2980, 338, 2337, 13, 4706, 396, 2198, 297, 278, 12608, 310, 278, 421, 4804, 29952, 1158, 310, 263, 3983, 3564, 29889, 13, 4706, 1583, 3032, 17854, 29879, 29918, 26495, 29918, 1191, 353, 5852, 13, 4706, 1583, 3032, 17854, 29879, 29918, 13168, 29918, 1191, 353, 5852, 13, 4706, 396, 319, 3983, 3564, 947, 451, 1120, 542, 579, 10970, 29892, 408, 967, 15359, 674, 4320, 963, 13, 4706, 396, 2012, 29889, 13, 4706, 1583, 3032, 1300, 542, 579, 353, 7700, 13, 13, 4706, 1583, 3032, 2080, 29918, 29277, 353, 5159, 13, 4706, 1583, 3032, 4905, 29918, 29277, 353, 5159, 13, 4706, 1583, 3032, 2080, 29918, 1111, 24266, 353, 5159, 13, 4706, 1583, 3032, 4905, 29918, 1111, 24266, 353, 5159, 13, 13, 4706, 1583, 3032, 5924, 29879, 29918, 1431, 3192, 29918, 2080, 29879, 353, 6213, 13, 13, 4706, 396, 910, 338, 363, 4180, 13883, 746, 5432, 278, 8527, 373, 716, 13, 4706, 396, 10970, 29889, 7569, 931, 278, 8527, 338, 2000, 373, 263, 731, 373, 1881, 25187, 943, 29892, 13, 4706, 396, 591, 10272, 278, 1962, 25187, 943, 29892, 1962, 11105, 29879, 322, 1962, 25834, 297, 697, 1209, 29892, 13, 4706, 396, 769, 7090, 963, 1244, 29889, 1932, 738, 310, 1438, 14391, 338, 22320, 1000, 2678, 29892, 591, 13, 4706, 396, 10563, 372, 515, 727, 2012, 310, 337, 12097, 292, 372, 29889, 13, 4706, 1583, 3032, 4905, 29918, 13168, 29918, 8173, 353, 6571, 13, 4706, 1583, 3032, 4905, 29918, 20158, 29918, 8173, 353, 6571, 13, 4706, 1583, 3032, 4905, 29918, 12181, 29918, 8173, 353, 6571, 13, 13, 4706, 396, 8878, 1583, 3032, 4905, 29918, 29277, 29901, 13, 4706, 363, 921, 297, 1583, 29889, 4905, 29879, 29901, 13, 9651, 7546, 29892, 2943, 29918, 2248, 29892, 12489, 29918, 2248, 353, 921, 3032, 3946, 294, 29918, 18434, 1678, 396, 282, 2904, 524, 29901, 11262, 29922, 24681, 29899, 5943, 13, 9651, 1583, 3032, 4905, 29918, 29277, 29889, 4397, 29898, 13148, 29897, 13, 9651, 1583, 3032, 4905, 29918, 1111, 24266, 29889, 4397, 3552, 13148, 29892, 2943, 29918, 2248, 29892, 12489, 29918, 2248, 876, 13, 13, 4706, 396, 8878, 1583, 3032, 2080, 29918, 29277, 29901, 13, 4706, 363, 921, 297, 1583, 29889, 2080, 29879, 29901, 13, 9651, 7546, 29892, 2943, 29918, 2248, 29892, 12489, 29918, 2248, 353, 921, 3032, 3946, 294, 29918, 18434, 1678, 396, 282, 2904, 524, 29901, 11262, 29922, 24681, 29899, 5943, 13, 9651, 396, 739, 29915, 29879, 7424, 304, 367, 385, 1881, 7546, 29892, 577, 871, 697, 2943, 13, 9651, 396, 322, 697, 12489, 1962, 29889, 13, 9651, 4974, 2943, 29918, 2248, 1275, 29871, 29900, 13, 9651, 4974, 12489, 29918, 2248, 1275, 29871, 29900, 13, 9651, 1583, 3032, 2080, 29918, 29277, 29889, 4397, 29898, 13148, 29897, 13, 9651, 1583, 3032, 2080, 29918, 1111, 24266, 29889, 4397, 3552, 13148, 29892, 2943, 29918, 2248, 29892, 12489, 29918, 2248, 876, 13, 13, 4706, 396, 19152, 5702, 310, 278, 3564, 29915, 29879, 7573, 322, 15359, 29889, 13, 4706, 7573, 29892, 7573, 29918, 1609, 29918, 19488, 29892, 15359, 29892, 903, 353, 903, 1958, 29918, 4262, 29918, 11618, 29898, 13, 18884, 1583, 29889, 2080, 29879, 29892, 1583, 29889, 4905, 29879, 29897, 13, 4706, 1583, 3032, 11618, 29918, 18010, 353, 7573, 13, 4706, 1583, 3032, 18010, 29918, 1609, 29918, 19488, 353, 7573, 29918, 1609, 29918, 19488, 13, 4706, 1583, 3032, 29277, 353, 15359, 13, 4706, 1583, 3032, 13148, 29918, 4804, 29918, 5085, 412, 2395, 353, 6571, 13, 4706, 363, 7546, 297, 1583, 3032, 29277, 29901, 13, 9651, 1583, 3032, 13148, 29918, 4804, 29918, 5085, 412, 2395, 29961, 13148, 29962, 353, 15886, 29918, 1144, 1103, 29889, 657, 8159, 5085, 3135, 29898, 13148, 29889, 4804, 29897, 13, 9651, 7546, 3032, 12715, 29918, 29879, 15440, 295, 29889, 1202, 29918, 3560, 29898, 1311, 3032, 12715, 29918, 29879, 15440, 295, 29897, 13, 13, 4706, 1583, 3032, 11294, 29918, 29277, 29898, 29277, 29897, 13, 13, 4706, 396, 6204, 278, 2943, 25236, 7463, 10970, 304, 7463, 14391, 29889, 13, 4706, 2943, 29918, 5453, 29889, 4247, 29898, 13, 18884, 714, 9917, 29918, 13148, 29922, 1311, 29892, 13, 18884, 297, 9917, 29918, 29277, 11759, 1402, 13, 18884, 2943, 29918, 513, 1575, 11759, 1402, 13, 18884, 12489, 29918, 513, 1575, 11759, 1402, 13, 18884, 1881, 29918, 29873, 575, 943, 29922, 1311, 3032, 27420, 29918, 2080, 29879, 29892, 13, 18884, 1962, 29918, 29873, 575, 943, 29922, 1311, 3032, 27420, 29918, 4905, 29879, 29897, 13, 13, 4706, 396, 8878, 1583, 29889, 2080, 29918, 7039, 322, 1583, 29889, 4905, 29918, 7039, 29889, 13, 4706, 1583, 3032, 842, 29918, 4905, 29918, 7039, 580, 13, 4706, 1583, 29889, 2080, 29918, 7039, 353, 5159, 13, 4706, 1583, 3032, 18798, 29918, 2080, 29918, 7039, 353, 5159, 13, 4706, 1583, 3032, 18798, 29918, 2080, 29879, 353, 5159, 13, 4706, 1583, 3032, 18798, 29918, 2080, 29918, 845, 11603, 353, 5159, 13, 4706, 363, 7546, 297, 1583, 3032, 2080, 29918, 29277, 29901, 13, 9651, 1583, 29889, 2080, 29918, 7039, 29889, 4397, 29898, 13148, 29889, 978, 29897, 13, 9651, 565, 7546, 29889, 275, 29918, 27074, 29901, 13, 18884, 1583, 3032, 18798, 29918, 2080, 29918, 7039, 29889, 4397, 29898, 13148, 29889, 978, 29897, 13, 18884, 396, 4803, 9853, 29918, 2080, 29918, 12181, 1244, 1363, 1661, 29899, 29872, 1875, 20842, 25187, 943, 1122, 451, 13, 18884, 396, 505, 263, 8267, 5352, 393, 29915, 29879, 6593, 1319, 313, 29879, 5510, 29892, 363, 2777, 29892, 756, 13, 18884, 396, 263, 12489, 393, 29915, 29879, 1661, 29899, 23362, 322, 4225, 304, 367, 21242, 467, 910, 2794, 393, 13, 18884, 396, 1881, 15359, 393, 1653, 2058, 8948, 414, 674, 817, 304, 505, 278, 13, 18884, 396, 9853, 29918, 2080, 29918, 12181, 12421, 304, 2758, 363, 1881, 8267, 8845, 29889, 13, 18884, 1583, 3032, 18798, 29918, 2080, 29918, 845, 11603, 29889, 4397, 29898, 13148, 3032, 16175, 29918, 2080, 29918, 12181, 29897, 13, 18884, 1583, 3032, 18798, 29918, 2080, 29879, 29889, 4397, 29898, 13148, 29889, 2080, 29897, 2 ]
experiments/_pytorch/_grpc_server/protofiles/imagedata_pb2.py
RedisAI/benchmarks
6
4468
<gh_stars>1-10 # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: imagedata.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='imagedata.proto', package='', syntax='proto3', serialized_options=None, serialized_pb=_b('\n\x0fimagedata.proto\"H\n\tImageData\x12\r\n\x05image\x18\x01 \x01(\x0c\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\r\n\x05\x64type\x18\x04 \x01(\t\"!\n\x0fPredictionClass\x12\x0e\n\x06output\x18\x01 \x03(\x02\x32<\n\tPredictor\x12/\n\rGetPrediction\x12\n.ImageData\x1a\x10.PredictionClass\"\x00\x62\x06proto3') ) _IMAGEDATA = _descriptor.Descriptor( name='ImageData', full_name='ImageData', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='image', full_name='ImageData.image', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='height', full_name='ImageData.height', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='width', full_name='ImageData.width', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dtype', full_name='ImageData.dtype', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=19, serialized_end=91, ) _PREDICTIONCLASS = _descriptor.Descriptor( name='PredictionClass', full_name='PredictionClass', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='output', full_name='PredictionClass.output', index=0, number=1, type=2, cpp_type=6, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=93, serialized_end=126, ) DESCRIPTOR.message_types_by_name['ImageData'] = _IMAGEDATA DESCRIPTOR.message_types_by_name['PredictionClass'] = _PREDICTIONCLASS _sym_db.RegisterFileDescriptor(DESCRIPTOR) ImageData = _reflection.GeneratedProtocolMessageType('ImageData', (_message.Message,), dict( DESCRIPTOR = _IMAGEDATA, __module__ = 'imagedata_pb2' # @@protoc_insertion_point(class_scope:ImageData) )) _sym_db.RegisterMessage(ImageData) PredictionClass = _reflection.GeneratedProtocolMessageType('PredictionClass', (_message.Message,), dict( DESCRIPTOR = _PREDICTIONCLASS, __module__ = 'imagedata_pb2' # @@protoc_insertion_point(class_scope:PredictionClass) )) _sym_db.RegisterMessage(PredictionClass) _PREDICTOR = _descriptor.ServiceDescriptor( name='Predictor', full_name='Predictor', file=DESCRIPTOR, index=0, serialized_options=None, serialized_start=128, serialized_end=188, methods=[ _descriptor.MethodDescriptor( name='GetPrediction', full_name='Predictor.GetPrediction', index=0, containing_service=None, input_type=_IMAGEDATA, output_type=_PREDICTIONCLASS, serialized_options=None, ), ]) _sym_db.RegisterServiceDescriptor(_PREDICTOR) DESCRIPTOR.services_by_name['Predictor'] = _PREDICTOR # @@protoc_insertion_point(module_scope)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 278, 9608, 6835, 6516, 29889, 29871, 11662, 6058, 11488, 29991, 13, 29937, 2752, 29901, 527, 4063, 532, 29889, 17529, 13, 13, 5215, 10876, 13, 29918, 29890, 29922, 9675, 29889, 3259, 29918, 3888, 29961, 29900, 29962, 29966, 29941, 322, 313, 2892, 921, 29901, 29916, 29897, 470, 313, 2892, 921, 29901, 29916, 29889, 12508, 877, 5066, 262, 29896, 8785, 13, 3166, 5386, 29889, 17529, 9721, 1053, 553, 11709, 408, 903, 2783, 11709, 13, 3166, 5386, 29889, 17529, 9721, 1053, 2643, 408, 903, 4906, 13, 3166, 5386, 29889, 17529, 9721, 1053, 17842, 408, 903, 999, 1464, 13, 3166, 5386, 29889, 17529, 9721, 1053, 5829, 29918, 9803, 408, 903, 18098, 29918, 9803, 13, 29937, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 326, 4011, 29897, 13, 13, 29918, 11967, 29918, 2585, 353, 903, 18098, 29918, 9803, 29889, 4592, 580, 13, 13, 13, 13, 13, 2287, 7187, 24290, 1955, 353, 903, 2783, 11709, 29889, 2283, 19124, 29898, 13, 29871, 1024, 2433, 326, 4063, 532, 29889, 17529, 742, 13, 29871, 3577, 2433, 742, 13, 29871, 5877, 2433, 17529, 29941, 742, 13, 29871, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 13, 29871, 7797, 1891, 29918, 24381, 29922, 29918, 29890, 28909, 29876, 29905, 29916, 29900, 29888, 326, 4063, 532, 29889, 17529, 5931, 29950, 29905, 29876, 29905, 29873, 2940, 1469, 29905, 29916, 29896, 29906, 29905, 29878, 29905, 29876, 29905, 29916, 29900, 29945, 3027, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29896, 320, 29916, 29900, 29896, 1194, 29916, 29900, 29883, 29905, 29916, 29896, 29906, 29905, 29916, 29900, 29872, 29905, 29876, 29905, 29916, 29900, 29953, 3545, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29906, 320, 29916, 29900, 29896, 1194, 29916, 29900, 29945, 29905, 29916, 29896, 29906, 29905, 29878, 29905, 29876, 29905, 29916, 29900, 29945, 2103, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29941, 320, 29916, 29900, 29896, 1194, 29916, 29900, 29945, 29905, 29916, 29896, 29906, 29905, 29878, 29905, 29876, 29905, 29916, 29900, 29945, 29905, 29916, 29953, 29946, 1853, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29946, 320, 29916, 29900, 29896, 1194, 29873, 5931, 9903, 29876, 29905, 29916, 29900, 29888, 23084, 2463, 2385, 29905, 29916, 29896, 29906, 29905, 29916, 29900, 29872, 29905, 29876, 29905, 29916, 29900, 29953, 4905, 29905, 29916, 29896, 29947, 29905, 29916, 29900, 29896, 320, 29916, 29900, 29941, 1194, 29916, 29900, 29906, 29905, 29916, 29941, 29906, 13505, 29876, 29905, 29873, 23084, 919, 272, 29905, 29916, 29896, 29906, 7998, 29876, 29905, 29878, 2577, 23084, 2463, 29905, 29916, 29896, 29906, 29905, 29876, 29889, 2940, 1469, 29905, 29916, 29896, 29874, 29905, 29916, 29896, 29900, 29889, 23084, 2463, 2385, 5931, 29905, 29916, 29900, 29900, 29905, 29916, 29953, 29906, 29905, 29916, 29900, 29953, 17529, 29941, 1495, 13, 29897, 13, 13, 13, 13, 13, 29918, 2382, 14573, 353, 903, 2783, 11709, 29889, 19124, 29898, 13, 29871, 1024, 2433, 2940, 1469, 742, 13, 29871, 2989, 29918, 978, 2433, 2940, 1469, 742, 13, 29871, 10422, 29922, 8516, 29892, 13, 29871, 934, 29922, 2287, 7187, 24290, 1955, 29892, 13, 29871, 6943, 29918, 1853, 29922, 8516, 29892, 13, 29871, 4235, 11759, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 3027, 742, 2989, 29918, 978, 2433, 2940, 1469, 29889, 3027, 742, 2380, 29922, 29900, 29892, 13, 418, 1353, 29922, 29896, 29892, 1134, 29922, 29896, 29906, 29892, 274, 407, 29918, 1853, 29922, 29929, 29892, 3858, 29922, 29896, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 29922, 29918, 29890, 703, 4968, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 3545, 742, 2989, 29918, 978, 2433, 2940, 1469, 29889, 3545, 742, 2380, 29922, 29896, 29892, 13, 418, 1353, 29922, 29906, 29892, 1134, 29922, 29945, 29892, 274, 407, 29918, 1853, 29922, 29896, 29892, 3858, 29922, 29896, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 29922, 29900, 29892, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 2103, 742, 2989, 29918, 978, 2433, 2940, 1469, 29889, 2103, 742, 2380, 29922, 29906, 29892, 13, 418, 1353, 29922, 29941, 29892, 1134, 29922, 29945, 29892, 274, 407, 29918, 1853, 29922, 29896, 29892, 3858, 29922, 29896, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 29922, 29900, 29892, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 29881, 1853, 742, 2989, 29918, 978, 2433, 2940, 1469, 29889, 29881, 1853, 742, 2380, 29922, 29941, 29892, 13, 418, 1353, 29922, 29946, 29892, 1134, 29922, 29929, 29892, 274, 407, 29918, 1853, 29922, 29929, 29892, 3858, 29922, 29896, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 29922, 29918, 29890, 703, 2564, 13808, 877, 9420, 29899, 29947, 5477, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 29871, 21251, 13, 29871, 17752, 11759, 13, 29871, 21251, 13, 29871, 9322, 29918, 8768, 11759, 1402, 13, 29871, 14115, 29918, 8768, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 13, 29871, 338, 29918, 21843, 519, 29922, 8824, 29892, 13, 29871, 5877, 2433, 17529, 29941, 742, 13, 29871, 6081, 29918, 29878, 6916, 11759, 1402, 13, 29871, 697, 974, 29879, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 2962, 29922, 29896, 29929, 29892, 13, 29871, 7797, 1891, 29918, 355, 29922, 29929, 29896, 29892, 13, 29897, 13, 13, 13, 29918, 15094, 4571, 9838, 13875, 1799, 353, 903, 2783, 11709, 29889, 19124, 29898, 13, 29871, 1024, 2433, 23084, 2463, 2385, 742, 13, 29871, 2989, 29918, 978, 2433, 23084, 2463, 2385, 742, 13, 29871, 10422, 29922, 8516, 29892, 13, 29871, 934, 29922, 2287, 7187, 24290, 1955, 29892, 13, 29871, 6943, 29918, 1853, 29922, 8516, 29892, 13, 29871, 4235, 11759, 13, 1678, 903, 2783, 11709, 29889, 3073, 19124, 29898, 13, 418, 1024, 2433, 4905, 742, 2989, 29918, 978, 2433, 23084, 2463, 2385, 29889, 4905, 742, 2380, 29922, 29900, 29892, 13, 418, 1353, 29922, 29896, 29892, 1134, 29922, 29906, 29892, 274, 407, 29918, 1853, 29922, 29953, 29892, 3858, 29922, 29941, 29892, 13, 418, 756, 29918, 4381, 29918, 1767, 29922, 8824, 29892, 2322, 29918, 1767, 11759, 1402, 13, 418, 2643, 29918, 1853, 29922, 8516, 29892, 14115, 29918, 1853, 29922, 8516, 29892, 6943, 29918, 1853, 29922, 8516, 29892, 13, 418, 338, 29918, 17588, 29922, 8824, 29892, 6081, 29918, 6078, 29922, 8516, 29892, 13, 418, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 934, 29922, 2287, 7187, 24290, 1955, 511, 13, 29871, 21251, 13, 29871, 17752, 11759, 13, 29871, 21251, 13, 29871, 9322, 29918, 8768, 11759, 1402, 13, 29871, 14115, 29918, 8768, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 13, 29871, 338, 29918, 21843, 519, 29922, 8824, 29892, 13, 29871, 5877, 2433, 17529, 29941, 742, 13, 29871, 6081, 29918, 29878, 6916, 11759, 1402, 13, 29871, 697, 974, 29879, 11759, 13, 29871, 21251, 13, 29871, 7797, 1891, 29918, 2962, 29922, 29929, 29941, 29892, 13, 29871, 7797, 1891, 29918, 355, 29922, 29896, 29906, 29953, 29892, 13, 29897, 13, 13, 2287, 7187, 24290, 1955, 29889, 4906, 29918, 8768, 29918, 1609, 29918, 978, 1839, 2940, 1469, 2033, 353, 903, 2382, 14573, 13, 2287, 7187, 24290, 1955, 29889, 4906, 29918, 8768, 29918, 1609, 29918, 978, 1839, 23084, 2463, 2385, 2033, 353, 903, 15094, 4571, 9838, 13875, 1799, 13, 29918, 11967, 29918, 2585, 29889, 15213, 2283, 19124, 29898, 2287, 7187, 24290, 1955, 29897, 13, 13, 2940, 1469, 353, 903, 999, 1464, 29889, 24565, 17830, 3728, 1542, 877, 2940, 1469, 742, 9423, 4906, 29889, 3728, 29892, 511, 9657, 29898, 13, 29871, 23050, 24290, 1955, 353, 903, 2382, 14573, 29892, 13, 29871, 4770, 5453, 1649, 353, 525, 326, 4063, 532, 29918, 24381, 29906, 29915, 13, 29871, 396, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 1990, 29918, 6078, 29901, 2940, 1469, 29897, 13, 259, 876, 13, 29918, 11967, 29918, 2585, 29889, 15213, 3728, 29898, 2940, 1469, 29897, 13, 13, 23084, 2463, 2385, 353, 903, 999, 1464, 29889, 24565, 17830, 3728, 1542, 877, 23084, 2463, 2385, 742, 9423, 4906, 29889, 3728, 29892, 511, 9657, 29898, 13, 29871, 23050, 24290, 1955, 353, 903, 15094, 4571, 9838, 13875, 1799, 29892, 13, 29871, 4770, 5453, 1649, 353, 525, 326, 4063, 532, 29918, 24381, 29906, 29915, 13, 29871, 396, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 1990, 29918, 6078, 29901, 23084, 2463, 2385, 29897, 13, 259, 876, 13, 29918, 11967, 29918, 2585, 29889, 15213, 3728, 29898, 23084, 2463, 2385, 29897, 13, 13, 13, 13, 29918, 15094, 4571, 1783, 1955, 353, 903, 2783, 11709, 29889, 3170, 19124, 29898, 13, 29871, 1024, 2433, 23084, 919, 272, 742, 13, 29871, 2989, 29918, 978, 2433, 23084, 919, 272, 742, 13, 29871, 934, 29922, 2287, 7187, 24290, 1955, 29892, 13, 29871, 2380, 29922, 29900, 29892, 13, 29871, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 13, 29871, 7797, 1891, 29918, 2962, 29922, 29896, 29906, 29947, 29892, 13, 29871, 7797, 1891, 29918, 355, 29922, 29896, 29947, 29947, 29892, 13, 29871, 3519, 11759, 13, 29871, 903, 2783, 11709, 29889, 4062, 19124, 29898, 13, 1678, 1024, 2433, 2577, 23084, 2463, 742, 13, 1678, 2989, 29918, 978, 2433, 23084, 919, 272, 29889, 2577, 23084, 2463, 742, 13, 1678, 2380, 29922, 29900, 29892, 13, 1678, 6943, 29918, 5509, 29922, 8516, 29892, 13, 1678, 1881, 29918, 1853, 29922, 29918, 2382, 14573, 29892, 13, 1678, 1962, 29918, 1853, 29922, 29918, 15094, 4571, 9838, 13875, 1799, 29892, 13, 1678, 7797, 1891, 29918, 6768, 29922, 8516, 29892, 13, 29871, 10353, 13, 2314, 13, 29918, 11967, 29918, 2585, 29889, 15213, 3170, 19124, 7373, 15094, 4571, 1783, 1955, 29897, 13, 13, 2287, 7187, 24290, 1955, 29889, 9916, 29918, 1609, 29918, 978, 1839, 23084, 919, 272, 2033, 353, 903, 15094, 4571, 1783, 1955, 13, 13, 29937, 732, 29992, 17529, 29883, 29918, 7851, 291, 29918, 3149, 29898, 5453, 29918, 6078, 29897, 13, 2 ]
orangery/cli/cutfill.py
mrahnis/orangery
2
6682
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import logging import time import json import click import matplotlib.pyplot as plt import orangery as o from orangery.cli import defaults, util from orangery.tools.plotting import get_scale_factor @click.command(options_metavar='<options>') @click.argument('file1', nargs=1, type=click.Path(exists=True), metavar='<file_t0>') # help="survey representing the initial condition" @click.argument('file2', nargs=1, type=click.Path(exists=True), metavar='<file_t1>') # help="survey representing the final condition" @click.argument('fields', nargs=1, metavar='<fields>') # help="character string identifying the columns" @click.argument('xs_name', nargs=1, metavar='<name>') # help="name of the cross-section to plot" @click.option('--codes', 'codes_f', nargs=1, type=click.Path(exists=True), metavar='<codes_file>', help="JSON file representing the usage intent of a set of survey codes") @click.option('--show/--save', is_flag=True, default=True, help="Show the plot or save to files; --show is the default") @click.option('--summary/--no-summary', default=True, help="Print summary information; --summary is the default") @click.option('--units', type=click.Choice(['m','sft','ft']), default='m', help="Unit to show in axis labels") @click.option('--labels', nargs=2, metavar='<text text>', help="Labels to display in the legend") @click.option('--exaggeration', metavar='<int>', default=3, help="Vertical exaggeration of plot") @click.option('--scale', nargs=2, metavar='<float int>', type=click.Tuple([float, int]), default=(10, 300), help="Scale where first argument is units per-inch on the horizontal axis and second argument is output DPI") @click.option('--close/--no-close', default=True, help="Close the line ends; --close is the default") @click.option('--reverse', type=click.Choice(['t0','t1','tx']), help="Reverse a line or lines of section (t0=initial, t1=final, tx=both)") @click.option('--exclude', nargs=2, type=click.Tuple([str, click.Choice(['t0','t1','tx'])]), multiple=True, metavar='<str choice>', help="Exclude a survey code from a line or lines of section (t0=initial, t1=final, tx=both)") @click.option('--overlay', nargs=1, type=click.Path(exists=True)) @click.option('-v', '--verbose', is_flag=True, help="Enables verbose mode") def cutfill(file1, file2, fields, xs_name, codes_f, show, summary, units, labels, exaggeration, scale, close, reverse, exclude, overlay, verbose): """Displays a plot of a repeat survey with cut and fill. \b The cutfill subcommand takes four arguments: <file_t0> : survey data representing the initial condition in csv format <file_t1> : survey data representing the final condition in csv format <fields> : series of characters describing the data columns <name> : name of cross-section to plot Options allow to set various properties of the plot. The default is to --show the plot. With the --save option the plot will be saved as an image along with a csv file containing data about cross-sectional cut-and-fill areas along the line of secion. \b Example: orangery cutfill file_2004.csv file_2010.csv pxyzctr XS-7 --reverse t0 """ if verbose is True: loglevel = 2 else: loglevel = 0 logging.basicConfig(stream=sys.stderr, level=loglevel or logging.INFO) # load the configuration codes = defaults.codes.copy() if codes_f: user_codes = util.load_config(codes_f) codes.update(user_codes) # load the survey data s1 = o.Survey(file1, fields, codes, 0) s2 = o.Survey(file2, fields, codes, 0) if overlay: s3 = o.Survey(overlay, fields, codes, 0) exclude_t0 = [] exclude_t1 = [] for code in exclude: if code[1] in ('t0', 'tx'): exclude_t0.append(code[0]) if code[1] in ('t1', 'tx'): exclude_t1.append(code[0]) # select a group of points, in this case a cross section xs_pts1 = o.group(s1.data, s1.code_table, group=xs_name, exclude=exclude_t0) xs_pts2 = o.group(s2.data, s2.code_table, group=xs_name, exclude=exclude_t1) # xs_pts_overlay = o.group(s3.data, s3.code_table, group=xs_name) # get the endpoints of the group p1, p2 = o.endpoints(xs_pts1, reverse=reverse in ('t0','tx')) # make the sections xs1 = o.Section(xs_pts1, p1, p2, reverse=reverse in ('t0','tx')) xs2 = o.Section(xs_pts2, p1, p2, reverse=reverse in ('t1','tx')) # xs_overlay = o.Section(xs_pts_overlay, p1, p2) if labels: label_t0 = labels[0] label_t1 = labels[1] label_overlay = labels[3] elif 't' in fields: label_t0 = (xs1.data.iloc[0]['t']).split('T')[0] label_t1 = (xs2.data.iloc[0]['t']).split('T')[0] # label_overlay = (xs_overlay.data.iloc[0]['t']).split('T')[0] else: label_t0 = 't0' label_t1 = 't1' # label_overlay = 'pre-restoration' # calculate the change chg = o.Change(xs1, xs2, close_ends=close) if summary: chg.summarize() import matplotlib font = {'family':'normal','weight':'normal','size':16} matplotlib.rc('font', **font) # plot the change between two cross-sections fig = plt.figure() ax = fig.add_subplot(111) ax.set_aspect(exaggeration) # xs_overlay.plot(ax=ax, marker='None', linestyle='-', linewidth=3, color='tab:red', label=label_overlay) xs1.plot(ax=ax, marker='o', markersize=4, markerfacecolor='white', markeredgecolor='black', linestyle='-', color='gray', label=label_t0) xs2.plot(ax=ax, marker='o', markersize=4, markerfacecolor='black', markeredgecolor='black', linestyle='-', color='black', label=label_t1) chg.polygon_plot(ax=ax, fill_label='Fill', cut_label='Cut') chg.annotate_plot(ax=ax) ax.set_xlabel('Distance ({0})'.format(units)) ax.set_ylabel('Elevation ({0}), {1}x exaggeration'.format(units, exaggeration)) plt.legend(loc='best') plt.title('Cross-section {0}'.format(xs_name)) if show: plt.show() else: fname = xs_name + '-' + label_t0.replace('-', '') + '-' + label_t1.replace('-', '') scale_factor = get_scale_factor(fig, ax, scale[0]) dims = fig.get_size_inches() fig.set_size_inches(dims[0]*scale_factor, dims[1]*scale_factor) fig.savefig(fname+'.png', dpi=scale[1]) click.echo('Figure saved to: {}'.format(fname+'.png')) chg.save(fname+'.csv') click.echo('Data saved to: {}'.format(fname+'.csv'))
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 10876, 13, 5215, 12183, 13, 5215, 931, 13, 13, 5215, 4390, 13, 5215, 2828, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 5215, 470, 574, 708, 408, 288, 13, 3166, 470, 574, 708, 29889, 11303, 1053, 21274, 29892, 3667, 13, 3166, 470, 574, 708, 29889, 8504, 29889, 5317, 1259, 1053, 679, 29918, 7052, 29918, 19790, 13, 13, 13, 29992, 3808, 29889, 6519, 29898, 6768, 29918, 2527, 485, 279, 2433, 29966, 6768, 29958, 1495, 13, 29992, 3808, 29889, 23516, 877, 1445, 29896, 742, 302, 5085, 29922, 29896, 29892, 1134, 29922, 3808, 29889, 2605, 29898, 9933, 29922, 5574, 511, 1539, 485, 279, 2433, 29966, 1445, 29918, 29873, 29900, 29958, 1495, 396, 1371, 543, 7610, 6950, 15783, 278, 2847, 4195, 29908, 13, 29992, 3808, 29889, 23516, 877, 1445, 29906, 742, 302, 5085, 29922, 29896, 29892, 1134, 29922, 3808, 29889, 2605, 29898, 9933, 29922, 5574, 511, 1539, 485, 279, 2433, 29966, 1445, 29918, 29873, 29896, 29958, 1495, 396, 1371, 543, 7610, 6950, 15783, 278, 2186, 4195, 29908, 13, 29992, 3808, 29889, 23516, 877, 9621, 742, 302, 5085, 29922, 29896, 29892, 1539, 485, 279, 2433, 29966, 9621, 29958, 1495, 396, 1371, 543, 18609, 1347, 2893, 9215, 278, 4341, 29908, 13, 29992, 3808, 29889, 23516, 877, 10351, 29918, 978, 742, 302, 5085, 29922, 29896, 29892, 1539, 485, 279, 2433, 29966, 978, 29958, 1495, 396, 1371, 543, 978, 310, 278, 4891, 29899, 2042, 304, 6492, 29908, 13, 29992, 3808, 29889, 3385, 877, 489, 18137, 742, 525, 18137, 29918, 29888, 742, 302, 5085, 29922, 29896, 29892, 1134, 29922, 3808, 29889, 2605, 29898, 9933, 29922, 5574, 511, 1539, 485, 279, 2433, 29966, 18137, 29918, 1445, 29958, 742, 1371, 543, 7249, 934, 15783, 278, 8744, 7609, 310, 263, 731, 310, 18994, 11561, 1159, 13, 29992, 3808, 29889, 3385, 877, 489, 4294, 29914, 489, 7620, 742, 338, 29918, 15581, 29922, 5574, 29892, 2322, 29922, 5574, 29892, 1371, 543, 8964, 278, 6492, 470, 4078, 304, 2066, 29936, 1192, 4294, 338, 278, 2322, 1159, 13, 29992, 3808, 29889, 3385, 877, 489, 7727, 29914, 489, 1217, 29899, 7727, 742, 2322, 29922, 5574, 29892, 1371, 543, 11816, 15837, 2472, 29936, 1192, 7727, 338, 278, 2322, 1159, 13, 29992, 3808, 29889, 3385, 877, 489, 348, 1169, 742, 1134, 29922, 3808, 29889, 29620, 18959, 29885, 3788, 29879, 615, 3788, 615, 2033, 511, 2322, 2433, 29885, 742, 1371, 543, 8325, 304, 1510, 297, 9685, 11073, 1159, 13, 29992, 3808, 29889, 3385, 877, 489, 21134, 742, 302, 5085, 29922, 29906, 29892, 1539, 485, 279, 2433, 29966, 726, 1426, 29958, 742, 1371, 543, 4775, 29879, 304, 2479, 297, 278, 15983, 1159, 13, 29992, 3808, 29889, 3385, 877, 489, 735, 9921, 362, 742, 1539, 485, 279, 2433, 29966, 524, 29958, 742, 2322, 29922, 29941, 29892, 1371, 543, 29270, 429, 9921, 362, 310, 6492, 1159, 13, 29992, 3808, 29889, 3385, 877, 489, 7052, 742, 302, 5085, 29922, 29906, 29892, 1539, 485, 279, 2433, 29966, 7411, 938, 29958, 742, 1134, 29922, 3808, 29889, 23215, 552, 4197, 7411, 29892, 938, 11724, 2322, 7607, 29896, 29900, 29892, 29871, 29941, 29900, 29900, 511, 1371, 543, 17185, 988, 937, 2980, 338, 10340, 639, 29899, 22466, 373, 278, 14698, 9685, 322, 1473, 2980, 338, 1962, 360, 2227, 1159, 13, 29992, 3808, 29889, 3385, 877, 489, 5358, 29914, 489, 1217, 29899, 5358, 742, 2322, 29922, 5574, 29892, 1371, 543, 11123, 278, 1196, 10614, 29936, 1192, 5358, 338, 278, 2322, 1159, 13, 29992, 3808, 29889, 3385, 877, 489, 24244, 742, 1134, 29922, 3808, 29889, 29620, 18959, 29873, 29900, 3788, 29873, 29896, 3788, 7508, 2033, 511, 1371, 543, 1123, 3901, 263, 1196, 470, 3454, 310, 4004, 313, 29873, 29900, 29922, 11228, 29892, 260, 29896, 29922, 8394, 29892, 25568, 29922, 20313, 25760, 13, 29992, 3808, 29889, 3385, 877, 489, 735, 2325, 742, 302, 5085, 29922, 29906, 29892, 1134, 29922, 3808, 29889, 23215, 552, 4197, 710, 29892, 2828, 29889, 29620, 18959, 29873, 29900, 3788, 29873, 29896, 3788, 7508, 2033, 4638, 511, 2999, 29922, 5574, 29892, 1539, 485, 279, 2433, 29966, 710, 7348, 29958, 742, 1371, 543, 1252, 2325, 263, 18994, 775, 515, 263, 1196, 470, 3454, 310, 4004, 313, 29873, 29900, 29922, 11228, 29892, 260, 29896, 29922, 8394, 29892, 25568, 29922, 20313, 25760, 13, 29992, 3808, 29889, 3385, 877, 489, 957, 8387, 742, 302, 5085, 29922, 29896, 29892, 1134, 29922, 3808, 29889, 2605, 29898, 9933, 29922, 5574, 876, 13, 29992, 3808, 29889, 3385, 877, 29899, 29894, 742, 525, 489, 369, 15828, 742, 338, 29918, 15581, 29922, 5574, 29892, 1371, 543, 2369, 1849, 26952, 4464, 1159, 13, 1753, 5700, 5589, 29898, 1445, 29896, 29892, 934, 29906, 29892, 4235, 29892, 14492, 29918, 978, 29892, 11561, 29918, 29888, 29892, 1510, 29892, 15837, 29892, 10340, 29892, 11073, 29892, 429, 9921, 362, 29892, 6287, 29892, 3802, 29892, 11837, 29892, 19060, 29892, 27292, 29892, 26952, 1125, 13, 1678, 9995, 4205, 12922, 263, 6492, 310, 263, 12312, 18994, 411, 5700, 322, 5445, 29889, 13, 13, 1678, 320, 29890, 13, 1678, 450, 5700, 5589, 1014, 6519, 4893, 3023, 6273, 29901, 13, 1678, 529, 1445, 29918, 29873, 29900, 29958, 584, 18994, 848, 15783, 278, 2847, 4195, 297, 11799, 3402, 13, 1678, 529, 1445, 29918, 29873, 29896, 29958, 584, 18994, 848, 15783, 278, 2186, 4195, 297, 11799, 3402, 13, 1678, 529, 9621, 29958, 584, 3652, 310, 4890, 20766, 278, 848, 4341, 13, 1678, 529, 978, 29958, 584, 1024, 310, 4891, 29899, 2042, 304, 6492, 13, 13, 1678, 25186, 2758, 304, 731, 5164, 4426, 310, 278, 6492, 29889, 450, 2322, 338, 304, 1192, 4294, 278, 6492, 29889, 13, 1678, 2973, 278, 1192, 7620, 2984, 278, 6492, 674, 367, 7160, 408, 385, 1967, 3412, 411, 263, 11799, 934, 6943, 13, 1678, 848, 1048, 4891, 29899, 2042, 284, 5700, 29899, 392, 29899, 5589, 10161, 3412, 278, 1196, 310, 5226, 291, 29889, 13, 13, 1678, 320, 29890, 13, 1678, 8741, 29901, 13, 1678, 470, 574, 708, 5700, 5589, 934, 29918, 29906, 29900, 29900, 29946, 29889, 7638, 934, 29918, 29906, 29900, 29896, 29900, 29889, 7638, 282, 20230, 9988, 1060, 29903, 29899, 29955, 1192, 24244, 260, 29900, 13, 13, 1678, 9995, 13, 1678, 565, 26952, 338, 5852, 29901, 13, 4706, 1480, 5563, 353, 29871, 29906, 13, 1678, 1683, 29901, 13, 4706, 1480, 5563, 353, 29871, 29900, 13, 13, 1678, 12183, 29889, 16121, 3991, 29898, 5461, 29922, 9675, 29889, 303, 20405, 29892, 3233, 29922, 1188, 5563, 470, 12183, 29889, 11690, 29897, 13, 13, 1678, 396, 2254, 278, 5285, 13, 1678, 11561, 353, 21274, 29889, 18137, 29889, 8552, 580, 13, 1678, 565, 11561, 29918, 29888, 29901, 13, 4706, 1404, 29918, 18137, 353, 3667, 29889, 1359, 29918, 2917, 29898, 18137, 29918, 29888, 29897, 13, 4706, 11561, 29889, 5504, 29898, 1792, 29918, 18137, 29897, 13, 13, 1678, 396, 2254, 278, 18994, 848, 13, 1678, 269, 29896, 353, 288, 29889, 18498, 6950, 29898, 1445, 29896, 29892, 4235, 29892, 11561, 29892, 29871, 29900, 29897, 13, 1678, 269, 29906, 353, 288, 29889, 18498, 6950, 29898, 1445, 29906, 29892, 4235, 29892, 11561, 29892, 29871, 29900, 29897, 13, 13, 1678, 565, 27292, 29901, 13, 4706, 269, 29941, 353, 288, 29889, 18498, 6950, 29898, 957, 8387, 29892, 4235, 29892, 11561, 29892, 29871, 29900, 29897, 13, 13, 1678, 19060, 29918, 29873, 29900, 353, 5159, 13, 1678, 19060, 29918, 29873, 29896, 353, 5159, 13, 1678, 363, 775, 297, 19060, 29901, 13, 4706, 565, 775, 29961, 29896, 29962, 297, 6702, 29873, 29900, 742, 525, 7508, 29374, 13, 9651, 19060, 29918, 29873, 29900, 29889, 4397, 29898, 401, 29961, 29900, 2314, 13, 4706, 565, 775, 29961, 29896, 29962, 297, 6702, 29873, 29896, 742, 525, 7508, 29374, 13, 9651, 19060, 29918, 29873, 29896, 29889, 4397, 29898, 401, 29961, 29900, 2314, 13, 13, 1678, 396, 1831, 263, 2318, 310, 3291, 29892, 297, 445, 1206, 263, 4891, 4004, 13, 1678, 14492, 29918, 16485, 29896, 353, 288, 29889, 2972, 29898, 29879, 29896, 29889, 1272, 29892, 269, 29896, 29889, 401, 29918, 2371, 29892, 2318, 29922, 10351, 29918, 978, 29892, 19060, 29922, 735, 2325, 29918, 29873, 29900, 29897, 13, 1678, 14492, 29918, 16485, 29906, 353, 288, 29889, 2972, 29898, 29879, 29906, 29889, 1272, 29892, 269, 29906, 29889, 401, 29918, 2371, 29892, 2318, 29922, 10351, 29918, 978, 29892, 19060, 29922, 735, 2325, 29918, 29873, 29896, 29897, 13, 13, 1678, 396, 14492, 29918, 16485, 29918, 957, 8387, 353, 288, 29889, 2972, 29898, 29879, 29941, 29889, 1272, 29892, 269, 29941, 29889, 401, 29918, 2371, 29892, 2318, 29922, 10351, 29918, 978, 29897, 13, 13, 1678, 396, 679, 278, 1095, 9748, 310, 278, 2318, 13, 1678, 282, 29896, 29892, 282, 29906, 353, 288, 29889, 355, 9748, 29898, 10351, 29918, 16485, 29896, 29892, 11837, 29922, 24244, 297, 6702, 29873, 29900, 3788, 7508, 8785, 13, 13, 1678, 396, 1207, 278, 13926, 13, 1678, 14492, 29896, 353, 288, 29889, 13438, 29898, 10351, 29918, 16485, 29896, 29892, 282, 29896, 29892, 282, 29906, 29892, 11837, 29922, 24244, 297, 6702, 29873, 29900, 3788, 7508, 8785, 13, 1678, 14492, 29906, 353, 288, 29889, 13438, 29898, 10351, 29918, 16485, 29906, 29892, 282, 29896, 29892, 282, 29906, 29892, 11837, 29922, 24244, 297, 6702, 29873, 29896, 3788, 7508, 8785, 13, 13, 1678, 396, 14492, 29918, 957, 8387, 353, 288, 29889, 13438, 29898, 10351, 29918, 16485, 29918, 957, 8387, 29892, 282, 29896, 29892, 282, 29906, 29897, 13, 13, 1678, 565, 11073, 29901, 13, 4706, 3858, 29918, 29873, 29900, 353, 11073, 29961, 29900, 29962, 13, 4706, 3858, 29918, 29873, 29896, 353, 11073, 29961, 29896, 29962, 13, 4706, 3858, 29918, 957, 8387, 353, 11073, 29961, 29941, 29962, 13, 1678, 25342, 525, 29873, 29915, 297, 4235, 29901, 13, 4706, 3858, 29918, 29873, 29900, 353, 313, 10351, 29896, 29889, 1272, 29889, 309, 542, 29961, 29900, 22322, 29873, 2033, 467, 5451, 877, 29911, 29861, 29900, 29962, 13, 4706, 3858, 29918, 29873, 29896, 353, 313, 10351, 29906, 29889, 1272, 29889, 309, 542, 29961, 29900, 22322, 29873, 2033, 467, 5451, 877, 29911, 29861, 29900, 29962, 13, 4706, 396, 3858, 29918, 957, 8387, 353, 313, 10351, 29918, 957, 8387, 29889, 1272, 29889, 309, 542, 29961, 29900, 22322, 29873, 2033, 467, 5451, 877, 29911, 29861, 29900, 29962, 13, 1678, 1683, 29901, 13, 4706, 3858, 29918, 29873, 29900, 353, 525, 29873, 29900, 29915, 13, 4706, 3858, 29918, 29873, 29896, 353, 525, 29873, 29896, 29915, 13, 4706, 396, 3858, 29918, 957, 8387, 353, 525, 1457, 29899, 5060, 12418, 29915, 13, 13, 1678, 396, 8147, 278, 1735, 13, 1678, 521, 29887, 353, 288, 29889, 7277, 29898, 10351, 29896, 29892, 14492, 29906, 29892, 3802, 29918, 1975, 29922, 5358, 29897, 13, 1678, 565, 15837, 29901, 13, 4706, 521, 29887, 29889, 2083, 3034, 675, 580, 13, 13, 1678, 1053, 22889, 13, 1678, 4079, 353, 11117, 11922, 22099, 8945, 3788, 7915, 22099, 8945, 3788, 2311, 2396, 29896, 29953, 29913, 13, 1678, 22889, 29889, 2214, 877, 5657, 742, 3579, 5657, 29897, 13, 1678, 396, 6492, 278, 1735, 1546, 1023, 4891, 29899, 27117, 13, 1678, 2537, 353, 14770, 29889, 4532, 580, 13, 1678, 4853, 353, 2537, 29889, 1202, 29918, 1491, 5317, 29898, 29896, 29896, 29896, 29897, 13, 1678, 4853, 29889, 842, 29918, 294, 1103, 29898, 735, 9921, 362, 29897, 13, 13, 1678, 396, 14492, 29918, 957, 8387, 29889, 5317, 29898, 1165, 29922, 1165, 29892, 17456, 2433, 8516, 742, 6276, 342, 1508, 2433, 29899, 742, 1196, 2103, 29922, 29941, 29892, 2927, 2433, 3891, 29901, 1127, 742, 3858, 29922, 1643, 29918, 957, 8387, 29897, 13, 1678, 14492, 29896, 29889, 5317, 29898, 1165, 29922, 1165, 29892, 17456, 2433, 29877, 742, 29320, 675, 29922, 29946, 29892, 17456, 2161, 2780, 2433, 10921, 742, 17456, 12864, 2780, 2433, 8517, 742, 6276, 342, 1508, 2433, 29899, 742, 2927, 2433, 21012, 742, 3858, 29922, 1643, 29918, 29873, 29900, 29897, 13, 1678, 14492, 29906, 29889, 5317, 29898, 1165, 29922, 1165, 29892, 17456, 2433, 29877, 742, 29320, 675, 29922, 29946, 29892, 17456, 2161, 2780, 2433, 8517, 742, 17456, 12864, 2780, 2433, 8517, 742, 6276, 342, 1508, 2433, 29899, 742, 2927, 2433, 8517, 742, 3858, 29922, 1643, 29918, 29873, 29896, 29897, 13, 1678, 521, 29887, 29889, 3733, 17125, 29918, 5317, 29898, 1165, 29922, 1165, 29892, 5445, 29918, 1643, 2433, 20876, 742, 5700, 29918, 1643, 2433, 29907, 329, 1495, 13, 1678, 521, 29887, 29889, 6735, 403, 29918, 5317, 29898, 1165, 29922, 1165, 29897, 13, 1678, 4853, 29889, 842, 29918, 29916, 1643, 877, 27469, 21313, 29900, 1800, 4286, 4830, 29898, 348, 1169, 876, 13, 1678, 4853, 29889, 842, 29918, 29891, 1643, 877, 29923, 2608, 362, 21313, 29900, 9594, 426, 29896, 29913, 29916, 429, 9921, 362, 4286, 4830, 29898, 348, 1169, 29892, 429, 9921, 362, 876, 13, 1678, 14770, 29889, 26172, 29898, 2029, 2433, 13318, 1495, 13, 1678, 14770, 29889, 3257, 877, 29907, 2124, 29899, 2042, 426, 29900, 29913, 4286, 4830, 29898, 10351, 29918, 978, 876, 13, 13, 1678, 565, 1510, 29901, 13, 4706, 14770, 29889, 4294, 580, 13, 1678, 1683, 29901, 13, 4706, 285, 978, 353, 14492, 29918, 978, 718, 17411, 29915, 718, 3858, 29918, 29873, 29900, 29889, 6506, 877, 29899, 742, 27255, 718, 17411, 29915, 718, 3858, 29918, 29873, 29896, 29889, 6506, 877, 29899, 742, 27255, 13, 13, 4706, 6287, 29918, 19790, 353, 679, 29918, 7052, 29918, 19790, 29898, 1003, 29892, 4853, 29892, 6287, 29961, 29900, 2314, 13, 4706, 3964, 29879, 353, 2537, 29889, 657, 29918, 2311, 29918, 262, 6609, 580, 13, 4706, 2537, 29889, 842, 29918, 2311, 29918, 262, 6609, 29898, 6229, 29879, 29961, 29900, 14178, 7052, 29918, 19790, 29892, 3964, 29879, 29961, 29896, 14178, 7052, 29918, 19790, 29897, 13, 4706, 2537, 29889, 7620, 1003, 29898, 29888, 978, 29974, 4286, 2732, 742, 270, 1631, 29922, 7052, 29961, 29896, 2314, 13, 4706, 2828, 29889, 8057, 877, 13080, 545, 7160, 304, 29901, 6571, 4286, 4830, 29898, 29888, 978, 29974, 4286, 2732, 8785, 13, 13, 4706, 521, 29887, 29889, 7620, 29898, 29888, 978, 29974, 4286, 7638, 1495, 13, 4706, 2828, 29889, 8057, 877, 1469, 7160, 304, 29901, 6571, 4286, 4830, 29898, 29888, 978, 29974, 4286, 7638, 8785, 13, 2 ]
src/evolvepy/integrations/__init__.py
EltonCN/evolvepy
1
21132
<filename>src/evolvepy/integrations/__init__.py ''' EvolvePy's integrations with other modules. '''
[ 1, 529, 9507, 29958, 4351, 29914, 29872, 1555, 345, 2272, 29914, 14146, 800, 29914, 1649, 2344, 26914, 2272, 13, 12008, 13, 1678, 382, 1555, 345, 19737, 29915, 29879, 3990, 800, 411, 916, 10585, 29889, 13, 12008, 2 ]
blog/articles/views.py
dotHashemi/django-practice
1
118399
<filename>blog/articles/views.py from django.shortcuts import render from .models import Article def index(request): articles = Article.objects.order_by("-published")[:10] return render(request, 'index.html', { 'title': 'Articles Page', 'articles': articles }) def show(request, id): article = Article.objects.get(id=id) return render(request, 'show.html', { 'title': article.title, 'article': article })
[ 1, 529, 9507, 29958, 7312, 29914, 18569, 29914, 7406, 29889, 2272, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 13, 3166, 869, 9794, 1053, 21746, 13, 13, 13, 1753, 2380, 29898, 3827, 1125, 13, 1678, 7456, 353, 21746, 29889, 12650, 29889, 2098, 29918, 1609, 703, 29899, 5467, 3726, 1159, 7503, 29896, 29900, 29962, 13, 268, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 2248, 29889, 1420, 742, 426, 13, 4706, 525, 3257, 2396, 525, 9986, 4027, 9305, 742, 13, 4706, 525, 18569, 2396, 7456, 13, 1678, 5615, 13, 13, 13, 1753, 1510, 29898, 3827, 29892, 1178, 1125, 13, 1678, 4274, 353, 21746, 29889, 12650, 29889, 657, 29898, 333, 29922, 333, 29897, 13, 13, 1678, 736, 4050, 29898, 3827, 29892, 525, 4294, 29889, 1420, 742, 426, 13, 4706, 525, 3257, 2396, 4274, 29889, 3257, 29892, 13, 4706, 525, 7914, 2396, 4274, 13, 1678, 5615, 13, 2 ]
recommender/main.py
TxConvergentAdmin/f20-bt-impact-local-business
0
189390
<gh_stars>0 from script import get_rec def main(request): """Responds to any HTTP request. Args: request (flask.Request): HTTP request object. Returns: The response text or any set of values that can be turned into a Response object using `make_response <http://flask.pocoo.org/docs/1.0/api/#flask.Flask.make_response>`. """ request_json = request.get_json() if request.args and 'user_id' and 'user_friends' in request.args: return get_rec(request.args.get('user_id'), request.args.get('user_friends')) elif 'user_id' in request_json: return get_rec(request_json['user_id']) else: return f'Incorrect Data'
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 2471, 1053, 679, 29918, 3757, 30004, 13, 1753, 1667, 29898, 3827, 1125, 30004, 13, 1678, 9995, 1666, 2818, 29879, 304, 738, 7331, 2009, 22993, 13, 1678, 826, 3174, 29901, 30004, 13, 4706, 2009, 313, 1579, 1278, 29889, 3089, 1125, 7331, 2009, 1203, 22993, 13, 1678, 16969, 29901, 30004, 13, 4706, 450, 2933, 1426, 470, 738, 731, 310, 1819, 393, 508, 367, 6077, 964, 263, 30004, 13, 4706, 13291, 1203, 773, 30004, 13, 4706, 421, 5675, 29918, 5327, 529, 1124, 597, 1579, 1278, 29889, 29886, 542, 3634, 29889, 990, 29914, 2640, 29914, 29896, 29889, 29900, 29914, 2754, 8484, 1579, 1278, 29889, 8754, 1278, 29889, 5675, 29918, 5327, 29958, 1412, 30004, 13, 1678, 9995, 30004, 13, 1678, 2009, 29918, 3126, 353, 2009, 29889, 657, 29918, 3126, 26471, 13, 1678, 565, 2009, 29889, 5085, 322, 525, 1792, 29918, 333, 29915, 322, 525, 1792, 29918, 7932, 1975, 29915, 297, 2009, 29889, 5085, 29901, 30004, 13, 4706, 736, 679, 29918, 3757, 29898, 3827, 29889, 5085, 29889, 657, 877, 1792, 29918, 333, 5477, 2009, 29889, 5085, 29889, 657, 877, 1792, 29918, 7932, 1975, 8785, 30004, 13, 1678, 25342, 525, 1792, 29918, 333, 29915, 297, 2009, 29918, 3126, 29901, 30004, 13, 4706, 736, 679, 29918, 3757, 29898, 3827, 29918, 3126, 1839, 1792, 29918, 333, 2033, 8443, 13, 1678, 1683, 29901, 30004, 13, 4706, 736, 285, 29915, 797, 15728, 3630, 29915, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 2 ]
tests/utils_tests/test_glob.py
MikeAmy/django
5,079
92046
<reponame>MikeAmy/django from __future__ import unicode_literals from django.test import SimpleTestCase from django.utils.glob import glob_escape class TestUtilsGlob(SimpleTestCase): def test_glob_escape(self): filename = '/my/file?/name[with special chars*' expected = '/my/file[?]/name[[]with special chars[*]' filename_b = b'/my/file?/name[with special chars*' expected_b = b'/my/file[?]/name[[]with special chars[*]' self.assertEqual(glob_escape(filename), expected) self.assertEqual(glob_escape(filename_b), expected_b)
[ 1, 529, 276, 1112, 420, 29958, 29924, 9345, 29909, 1357, 29914, 14095, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 1688, 1053, 12545, 3057, 8259, 13, 3166, 9557, 29889, 13239, 29889, 23705, 1053, 13149, 29918, 21587, 13, 13, 13, 1990, 4321, 12177, 29954, 2127, 29898, 15427, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 23705, 29918, 21587, 29898, 1311, 1125, 13, 4706, 10422, 353, 8207, 1357, 29914, 1445, 29973, 29914, 978, 29961, 2541, 4266, 22524, 29930, 29915, 13, 4706, 3806, 353, 8207, 1357, 29914, 1445, 29961, 29973, 16261, 978, 29961, 2636, 2541, 4266, 22524, 29961, 29930, 29962, 29915, 13, 4706, 10422, 29918, 29890, 353, 289, 29915, 29914, 1357, 29914, 1445, 29973, 29914, 978, 29961, 2541, 4266, 22524, 29930, 29915, 13, 4706, 3806, 29918, 29890, 353, 289, 29915, 29914, 1357, 29914, 1445, 29961, 29973, 16261, 978, 29961, 2636, 2541, 4266, 22524, 29961, 29930, 29962, 29915, 13, 13, 4706, 1583, 29889, 9294, 9843, 29898, 23705, 29918, 21587, 29898, 9507, 511, 3806, 29897, 13, 4706, 1583, 29889, 9294, 9843, 29898, 23705, 29918, 21587, 29898, 9507, 29918, 29890, 511, 3806, 29918, 29890, 29897, 13, 2 ]
gcloud/datastores/tests/STUB_test_bigquery.py
pantheon-ci-bot/etl-framework
2
10542
<filename>gcloud/datastores/tests/STUB_test_bigquery.py """tests bigquery client""" import unittest from gcloud.datastores.bigquery import BigqueryClient class BigqueryClientTestCases(unittest.TestCase): """stuff""" @classmethod def setUpClass(cls): cls.project_id = 'test' cls.dataset_id = 'etl_test' cls.table_id = 'etl_test' cls.table_schema = { "fields": [ { "type": "STRING", "name": "a_key", "mode": "REQUIRED", } ] } cls.rows = [ { "insertId": "some_uuid", "json": { "a_key": "a_value" }, }, ] cls.query = "SELECT a_key FROM [{}:{}.{}]".format( cls.project_id, cls.dataset_id, cls.table_id, ) cls.client = BigqueryClient( project_name=cls.project_id, dataset_id=cls.dataset_id ) # Create a dataset and table (this indirectly tests create and delete) cls.client.insert_dataset(cls.dataset_id) cls.client.insert_table( table_id=cls.table_id, schema=cls.table_schema ) @classmethod def tearDownClass(cls): # Remove table and dataset (this indirectly tests create and delete) cls.client.delete_table(cls.table_id) cls.client.delete_dataset(cls.dataset_id) def test_get_dataset(self): self.client.get_dataset(self.dataset_id) def test_get_table(self): self.client.get_table(self.table_id) def test_insert_data(self): self.client.insert_data( table_id=self.table_id, rows=self.rows ) def test_list_data(self): self.client.list_data( table_id=self.table_id ) def test_list_datasets(self): self.client.list_datasets() def test_list_tables(self): self.client.list_tables( dataset_id=self.dataset_id ) def test_patch_table(self): self.client.patch_table( table_id=self.table_id, schema=self.table_schema, ) def test_query(self): self.client.query( query=self.query, ) def test_update_table(self): self.client.update_table( table_id=self.table_id, schema=self.table_schema, )
[ 1, 529, 9507, 29958, 29887, 9274, 29914, 4130, 579, 2361, 29914, 21150, 29914, 1254, 7466, 29918, 1688, 29918, 3752, 1972, 29889, 2272, 13, 15945, 29908, 21150, 4802, 1972, 3132, 15945, 29908, 13, 13, 5215, 443, 27958, 13, 13, 3166, 330, 9274, 29889, 4130, 579, 2361, 29889, 3752, 1972, 1053, 7997, 1972, 4032, 13, 13, 1990, 7997, 1972, 4032, 3057, 29907, 2129, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 9995, 303, 3096, 15945, 29908, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 731, 3373, 2385, 29898, 25932, 1125, 13, 13, 4706, 1067, 29879, 29889, 4836, 29918, 333, 353, 525, 1688, 29915, 13, 4706, 1067, 29879, 29889, 24713, 29918, 333, 353, 525, 300, 29880, 29918, 1688, 29915, 13, 4706, 1067, 29879, 29889, 2371, 29918, 333, 353, 525, 300, 29880, 29918, 1688, 29915, 13, 4706, 1067, 29879, 29889, 2371, 29918, 11010, 353, 426, 13, 9651, 376, 9621, 1115, 518, 13, 18884, 426, 13, 462, 1678, 376, 1853, 1115, 376, 20785, 613, 13, 462, 1678, 376, 978, 1115, 376, 29874, 29918, 1989, 613, 13, 462, 1678, 376, 8513, 1115, 376, 1525, 29984, 3120, 19386, 613, 13, 18884, 500, 13, 9651, 4514, 13, 4706, 500, 13, 13, 4706, 1067, 29879, 29889, 5727, 353, 518, 13, 9651, 426, 13, 18884, 376, 7851, 1204, 1115, 376, 5372, 29918, 25118, 613, 13, 18884, 376, 3126, 1115, 426, 13, 462, 1678, 376, 29874, 29918, 1989, 1115, 376, 29874, 29918, 1767, 29908, 13, 18884, 2981, 13, 9651, 2981, 13, 4706, 4514, 13, 13, 4706, 1067, 29879, 29889, 1972, 353, 376, 6404, 263, 29918, 1989, 3895, 15974, 6177, 29912, 1836, 29912, 6525, 1642, 4830, 29898, 13, 9651, 1067, 29879, 29889, 4836, 29918, 333, 29892, 13, 9651, 1067, 29879, 29889, 24713, 29918, 333, 29892, 13, 9651, 1067, 29879, 29889, 2371, 29918, 333, 29892, 13, 4706, 1723, 13, 13, 4706, 1067, 29879, 29889, 4645, 353, 7997, 1972, 4032, 29898, 13, 9651, 2060, 29918, 978, 29922, 25932, 29889, 4836, 29918, 333, 29892, 13, 9651, 8783, 29918, 333, 29922, 25932, 29889, 24713, 29918, 333, 13, 4706, 1723, 13, 13, 4706, 396, 6204, 263, 8783, 322, 1591, 313, 1366, 26377, 368, 6987, 1653, 322, 5217, 29897, 13, 4706, 1067, 29879, 29889, 4645, 29889, 7851, 29918, 24713, 29898, 25932, 29889, 24713, 29918, 333, 29897, 13, 4706, 1067, 29879, 29889, 4645, 29889, 7851, 29918, 2371, 29898, 13, 9651, 1591, 29918, 333, 29922, 25932, 29889, 2371, 29918, 333, 29892, 13, 9651, 10938, 29922, 25932, 29889, 2371, 29918, 11010, 13, 4706, 1723, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 734, 279, 6767, 2385, 29898, 25932, 1125, 13, 13, 4706, 396, 15154, 1591, 322, 8783, 313, 1366, 26377, 368, 6987, 1653, 322, 5217, 29897, 13, 4706, 1067, 29879, 29889, 4645, 29889, 8143, 29918, 2371, 29898, 25932, 29889, 2371, 29918, 333, 29897, 13, 4706, 1067, 29879, 29889, 4645, 29889, 8143, 29918, 24713, 29898, 25932, 29889, 24713, 29918, 333, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 24713, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 4645, 29889, 657, 29918, 24713, 29898, 1311, 29889, 24713, 29918, 333, 29897, 13, 13, 1678, 822, 1243, 29918, 657, 29918, 2371, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 4645, 29889, 657, 29918, 2371, 29898, 1311, 29889, 2371, 29918, 333, 29897, 13, 13, 1678, 822, 1243, 29918, 7851, 29918, 1272, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 4645, 29889, 7851, 29918, 1272, 29898, 13, 9651, 1591, 29918, 333, 29922, 1311, 29889, 2371, 29918, 333, 29892, 13, 9651, 4206, 29922, 1311, 29889, 5727, 13, 4706, 1723, 13, 13, 1678, 822, 1243, 29918, 1761, 29918, 1272, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 4645, 29889, 1761, 29918, 1272, 29898, 13, 9651, 1591, 29918, 333, 29922, 1311, 29889, 2371, 29918, 333, 13, 4706, 1723, 13, 13, 1678, 822, 1243, 29918, 1761, 29918, 14538, 1691, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 4645, 29889, 1761, 29918, 14538, 1691, 580, 13, 13, 1678, 822, 1243, 29918, 1761, 29918, 24051, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 4645, 29889, 1761, 29918, 24051, 29898, 13, 9651, 8783, 29918, 333, 29922, 1311, 29889, 24713, 29918, 333, 13, 4706, 1723, 13, 13, 1678, 822, 1243, 29918, 5041, 29918, 2371, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 4645, 29889, 5041, 29918, 2371, 29898, 13, 9651, 1591, 29918, 333, 29922, 1311, 29889, 2371, 29918, 333, 29892, 13, 9651, 10938, 29922, 1311, 29889, 2371, 29918, 11010, 29892, 13, 4706, 1723, 13, 13, 1678, 822, 1243, 29918, 1972, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 4645, 29889, 1972, 29898, 13, 9651, 2346, 29922, 1311, 29889, 1972, 29892, 13, 4706, 1723, 13, 13, 1678, 822, 1243, 29918, 5504, 29918, 2371, 29898, 1311, 1125, 13, 13, 4706, 1583, 29889, 4645, 29889, 5504, 29918, 2371, 29898, 13, 9651, 1591, 29918, 333, 29922, 1311, 29889, 2371, 29918, 333, 29892, 13, 9651, 10938, 29922, 1311, 29889, 2371, 29918, 11010, 29892, 13, 4706, 1723, 13, 2 ]
ppo/train.py
esthergu/pytorch-a2c-ppo-acktr
0
183829
import os, sys, time, copy, glob from collections import deque import gym from gym import spaces import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from ppo.a2c_ppo_acktr import algo from ppo.a2c_ppo_acktr.arguments import get_args from ppo.a2c_ppo_acktr.envs import make_vec_envs from ppo.a2c_ppo_acktr.model import Policy from ppo.a2c_ppo_acktr.storage import RolloutStorage from ppo.a2c_ppo_acktr.utils import get_vec_normalize, update_linear_schedule from ppo.a2c_ppo_acktr.visualize import visdom_plot args = get_args() assert args.algo in ['a2c', 'ppo', 'acktr'] if args.recurrent_policy: assert args.algo in ['a2c', 'ppo'], \ 'Recurrent policy is not implemented for ACKTR' if args.num_rollouts > 0: assert args.num_rollouts % args.num_processes == 0, 'num_rollouts must be divisable by num_processes' num_updates = int(args.num_env_steps) // args.num_steps // args.num_processes torch.manual_seed(args.seed) torch.cuda.manual_seed_all(args.seed) if args.cuda and torch.cuda.is_available() and args.cuda_deterministic: torch.backends.cudnn.benchmark = False torch.backends.cudnn.deterministic = True try: os.makedirs(args.log_dir) except OSError: files = glob.glob(os.path.join(args.log_dir, '*.monitor.csv')) try: for f in files: os.remove(f) except PermissionError as e: pass eval_log_dir = args.log_dir + "_eval" try: os.makedirs(eval_log_dir) except OSError: files = glob.glob(os.path.join(eval_log_dir, '*.monitor.csv')) try: for f in files: os.remove(f) except PermissionError as e: pass def main(): torch.set_num_threads(1) device = torch.device("cuda:0" if args.cuda else "cpu") if args.vis: from visdom import Visdom viz = Visdom(port=args.port) win = None envs = make_vec_envs(args.env_name, args.seed, 1, args.gamma, args.log_dir, args.add_timestep, device, False) # Determine if this is a dual robot (multi agent) environment. obs = envs.reset() action = torch.tensor([envs.action_space.sample()]) _, _, _, info = envs.step(action) dual_robots = 'dual_robots' in info[0] if dual_robots: obs_robot_len = info[0]['obs_robot_len'] // 2 action_robot_len = info[0]['action_robot_len'] // 2 obs_robot1 = obs[:, :obs_robot_len] obs_robot2 = obs[:, obs_robot_len:] if len(obs_robot1[0]) != obs_robot_len or len(obs_robot2[0]) != obs_robot_len: print('robot 1 obs shape:', len(obs_robot1[0]), 'obs space robot shape:', (obs_robot_len,)) print('robot 2 obs shape:', len(obs_robot2[0]), 'obs space robot shape:', (obs_robot_len,)) exit() envs = make_vec_envs(args.env_name, args.seed, args.num_processes, args.gamma, args.log_dir, args.add_timestep, device, False) if dual_robots: # Reset environment obs = envs.reset() obs_robot1 = obs[:, :obs_robot_len] obs_robot2 = obs[:, obs_robot_len:] action_space_robot1 = spaces.Box(low=np.array([-1.0]*action_robot_len), high=np.array([1.0]*action_robot_len), dtype=np.float32) action_space_robot2 = spaces.Box(low=np.array([-1.0]*action_robot_len), high=np.array([1.0]*action_robot_len), dtype=np.float32) if args.load_policy is not None: if dual_robots: actor_critic_robot1, actor_critic_robot2, ob_rms = torch.load(args.load_policy) else: actor_critic, ob_rms = torch.load(args.load_policy) vec_norm = get_vec_normalize(envs) if vec_norm is not None: vec_norm.ob_rms = ob_rms else: if dual_robots: actor_critic_robot1 = Policy([obs_robot_len], action_space_robot1, base_kwargs={'recurrent': args.recurrent_policy}) actor_critic_robot2 = Policy([obs_robot_len], action_space_robot2, base_kwargs={'recurrent': args.recurrent_policy}) else: actor_critic = Policy(envs.observation_space.shape, envs.action_space, base_kwargs={'recurrent': args.recurrent_policy, 'hidden_size': args.hidden_size}) if dual_robots: actor_critic_robot1.to(device) actor_critic_robot2.to(device) else: actor_critic.to(device) if args.algo == 'a2c': agent = algo.A2C_ACKTR(actor_critic, args.value_loss_coef, args.entropy_coef, lr=args.lr, eps=args.eps, alpha=args.alpha, max_grad_norm=args.max_grad_norm) elif args.algo == 'ppo': if dual_robots: agent_robot1 = algo.PPO(actor_critic_robot1, args.clip_param, args.ppo_epoch, args.num_mini_batch, args.value_loss_coef, args.entropy_coef, lr=args.lr, eps=args.eps, max_grad_norm=args.max_grad_norm) agent_robot2 = algo.PPO(actor_critic_robot2, args.clip_param, args.ppo_epoch, args.num_mini_batch, args.value_loss_coef, args.entropy_coef, lr=args.lr, eps=args.eps, max_grad_norm=args.max_grad_norm) else: agent = algo.PPO(actor_critic, args.clip_param, args.ppo_epoch, args.num_mini_batch, args.value_loss_coef, args.entropy_coef, lr=args.lr, eps=args.eps, max_grad_norm=args.max_grad_norm) elif args.algo == 'acktr': agent = algo.A2C_ACKTR(actor_critic, args.value_loss_coef, args.entropy_coef, acktr=True) if dual_robots: rollouts_robot1 = RolloutStorage(args.num_steps, args.num_rollouts if args.num_rollouts > 0 else args.num_processes, [obs_robot_len], action_space_robot1, actor_critic_robot1.recurrent_hidden_state_size) rollouts_robot2 = RolloutStorage(args.num_steps, args.num_rollouts if args.num_rollouts > 0 else args.num_processes, [obs_robot_len], action_space_robot2, actor_critic_robot2.recurrent_hidden_state_size) if args.num_rollouts > 0: rollouts_robot1.obs[0].copy_(torch.cat([obs_robot1 for _ in range(args.num_rollouts // args.num_processes)] + [obs_robot1[:(args.num_rollouts % args.num_processes)]], dim=0)) rollouts_robot2.obs[0].copy_(torch.cat([obs_robot2 for _ in range(args.num_rollouts // args.num_processes)] + [obs_robot2[:(args.num_rollouts % args.num_processes)]], dim=0)) else: rollouts_robot1.obs[0].copy_(obs_robot1) rollouts_robot2.obs[0].copy_(obs_robot2) rollouts_robot1.to(device) rollouts_robot2.to(device) else: rollouts = RolloutStorage(args.num_steps, args.num_rollouts if args.num_rollouts > 0 else args.num_processes, envs.observation_space.shape, envs.action_space, actor_critic.recurrent_hidden_state_size) obs = envs.reset() if args.num_rollouts > 0: rollouts.obs[0].copy_(torch.cat([obs for _ in range(args.num_rollouts // args.num_processes)] + [obs[:(args.num_rollouts % args.num_processes)]], dim=0)) else: rollouts.obs[0].copy_(obs) rollouts.to(device) deque_len = args.num_rollouts if args.num_rollouts > 0 else (args.num_processes if args.num_processes > 10 else 10) if dual_robots: episode_rewards_robot1 = deque(maxlen=deque_len) episode_rewards_robot2 = deque(maxlen=deque_len) else: episode_rewards = deque(maxlen=deque_len) start = time.time() for j in range(num_updates): if args.use_linear_lr_decay: # decrease learning rate linearly if args.algo == "acktr": # use optimizer's learning rate since it's hard-coded in kfac.py update_linear_schedule(agent.optimizer, j, num_updates, agent.optimizer.lr) else: if dual_robots: update_linear_schedule(agent_robot1.optimizer, j, num_updates, args.lr) update_linear_schedule(agent_robot2.optimizer, j, num_updates, args.lr) else: update_linear_schedule(agent.optimizer, j, num_updates, args.lr) if args.algo == 'ppo' and args.use_linear_clip_decay: if dual_robots: agent_robot1.clip_param = args.clip_param * (1 - j / float(num_updates)) agent_robot2.clip_param = args.clip_param * (1 - j / float(num_updates)) else: agent.clip_param = args.clip_param * (1 - j / float(num_updates)) reward_list_robot1 = [[] for _ in range(args.num_processes)] reward_list_robot2 = [[] for _ in range(args.num_processes)] for step in range(args.num_steps): # Sample actions # obs = self.apply_attack(obs, args.phi, args.epsilon) with torch.no_grad(): if dual_robots: value_robot1, action_robot1, action_log_prob_robot1, recurrent_hidden_states_robot1 = actor_critic_robot1.act( rollouts_robot1.obs[step, :args.num_processes], rollouts_robot1.recurrent_hidden_states[step, :args.num_processes], rollouts_robot1.masks[step, :args.num_processes]) value_robot2, action_robot2, action_log_prob_robot2, recurrent_hidden_states_robot2 = actor_critic_robot2.act( rollouts_robot2.obs[step, :args.num_processes], rollouts_robot2.recurrent_hidden_states[step, :args.num_processes], rollouts_robot2.masks[step, :args.num_processes]) else: value, action, action_log_prob, recurrent_hidden_states = actor_critic.act( rollouts.obs[step, :args.num_processes], rollouts.recurrent_hidden_states[step, :args.num_processes], rollouts.masks[step, :args.num_processes]) # Obser reward and next obs if dual_robots: action = torch.cat((action_robot1, action_robot2), dim=-1) obs, reward, done, infos = envs.step(action) obs_robot1 = obs[:, :obs_robot_len] obs_robot2 = obs[:, obs_robot_len:] for i, info in enumerate(infos): reward_list_robot1[i].append(info['reward_robot1']) reward_list_robot2[i].append(info['reward_robot2']) reward_robot1 = torch.tensor([[info['reward_robot1']] for info in infos]) reward_robot2 = torch.tensor([[info['reward_robot2']] for info in infos]) else: obs, reward, done, infos = envs.step(action) for i, info in enumerate(infos): if 'episode' in info.keys(): if dual_robots: episode_rewards_robot1.append(np.sum(reward_list_robot1[i])) episode_rewards_robot2.append(np.sum(reward_list_robot2[i])) else: episode_rewards.append(info['episode']['r']) # If done then clean the history of observations. masks = torch.FloatTensor([[0.0] if done_ else [1.0] for done_ in done]) if dual_robots: rollouts_robot1.insert(obs_robot1, recurrent_hidden_states_robot1, action_robot1, action_log_prob_robot1, value_robot1, reward_robot1, masks) rollouts_robot2.insert(obs_robot2, recurrent_hidden_states_robot2, action_robot2, action_log_prob_robot2, value_robot2, reward_robot2, masks) else: rollouts.insert(obs, recurrent_hidden_states, action, action_log_prob, value, reward, masks) if args.num_rollouts > 0 and (j % (args.num_rollouts // args.num_processes) != 0): # Only update the policies when we have performed num_rollouts simulations continue with torch.no_grad(): if dual_robots: next_value_robot1 = actor_critic_robot1.get_value(rollouts_robot1.obs[-1], rollouts_robot1.recurrent_hidden_states[-1], rollouts_robot1.masks[-1]).detach() next_value_robot2 = actor_critic_robot2.get_value(rollouts_robot2.obs[-1], rollouts_robot2.recurrent_hidden_states[-1], rollouts_robot2.masks[-1]).detach() else: next_value = actor_critic.get_value(rollouts.obs[-1], rollouts.recurrent_hidden_states[-1], rollouts.masks[-1]).detach() if dual_robots: rollouts_robot1.compute_returns(next_value_robot1, args.use_gae, args.gamma, args.tau) rollouts_robot2.compute_returns(next_value_robot2, args.use_gae, args.gamma, args.tau) value_loss_robot1, action_loss_robot1, dist_entropy_robot1 = agent_robot1.update(rollouts_robot1) value_loss_robot2, action_loss_robot2, dist_entropy_robot2 = agent_robot2.update(rollouts_robot2) rollouts_robot1.after_update() rollouts_robot2.after_update() else: rollouts.compute_returns(next_value, args.use_gae, args.gamma, args.tau) value_loss, action_loss, dist_entropy = agent.update(rollouts) rollouts.after_update() # save for every interval-th episode or for the last epoch if (j % args.save_interval == 0 or j == num_updates - 1) and args.save_dir != "": save_path = os.path.join(args.save_dir, args.algo) try: os.makedirs(save_path) except OSError: pass # A really ugly way to save a model to CPU if dual_robots: save_model_robot1 = actor_critic_robot1 save_model_robot2 = actor_critic_robot2 if args.cuda: save_model_robot1 = copy.deepcopy(actor_critic_robot1).cpu() save_model_robot2 = copy.deepcopy(actor_critic_robot2).cpu() save_model = [save_model_robot1, save_model_robot2, getattr(get_vec_normalize(envs), 'ob_rms', None)] else: save_model = actor_critic if args.cuda: save_model = copy.deepcopy(actor_critic).cpu() save_model = [save_model, getattr(get_vec_normalize(envs), 'ob_rms', None)] torch.save(save_model, os.path.join(save_path, args.env_name + ".pt")) total_num_steps = (j + 1) * args.num_processes * args.num_steps if j % args.log_interval == 0 and (len(episode_rewards_robot1) > 1 if dual_robots else len(episode_rewards) > 1): end = time.time() if dual_robots: print("Robot1 updates {}, num timesteps {}, FPS {} \n Last {} training episodes: mean/median reward {:.1f}/{:.1f}, min/max reward {:.1f}/{:.1f}". format(j, total_num_steps, int(total_num_steps / (end - start)), len(episode_rewards_robot1), np.mean(episode_rewards_robot1), np.median(episode_rewards_robot1), np.min(episode_rewards_robot1), np.max(episode_rewards_robot1), dist_entropy_robot1, value_loss_robot1, action_loss_robot1)) print("Robot2 updates {}, Last {} training episodes: mean/median reward {:.1f}/{:.1f}, min/max reward {:.1f}/{:.1f}\n". format(j, len(episode_rewards_robot2), np.mean(episode_rewards_robot2), np.median(episode_rewards_robot2), np.min(episode_rewards_robot2), np.max(episode_rewards_robot2), dist_entropy_robot2, value_loss_robot2, action_loss_robot2)) else: print("Updates {}, num timesteps {}, FPS {} \n Last {} training episodes: mean/median reward {:.1f}/{:.1f}, min/max reward {:.1f}/{:.1f}\n". format(j, total_num_steps, int(total_num_steps / (end - start)), len(episode_rewards), np.mean(episode_rewards), np.median(episode_rewards), np.min(episode_rewards), np.max(episode_rewards), dist_entropy, value_loss, action_loss)) sys.stdout.flush() if (args.eval_interval is not None and len(episode_rewards) > 1 and j % args.eval_interval == 0): eval_envs = make_vec_envs( args.env_name, args.seed + args.num_processes, args.num_processes, args.gamma, eval_log_dir, args.add_timestep, device, True) vec_norm = get_vec_normalize(eval_envs) if vec_norm is not None: vec_norm.eval() vec_norm.ob_rms = get_vec_normalize(envs).ob_rms if dual_robots: eval_episode_rewards_robot1 = [] eval_episode_rewards_robot2 = [] else: eval_episode_rewards = [] obs = eval_envs.reset() if dual_robots: obs_robot1 = obs[:, :obs_robot_len] obs_robot2 = obs[:, obs_robot_len:] eval_recurrent_hidden_states_robot1 = torch.zeros(args.num_processes, actor_critic_robot1.recurrent_hidden_state_size, device=device) eval_recurrent_hidden_states_robot2 = torch.zeros(args.num_processes, actor_critic_robot2.recurrent_hidden_state_size, device=device) else: eval_recurrent_hidden_states = torch.zeros(args.num_processes, actor_critic.recurrent_hidden_state_size, device=device) eval_masks = torch.zeros(args.num_processes, 1, device=device) eval_reward_list_robot1 = [[] for _ in range(args.num_processes)] eval_reward_list_robot2 = [[] for _ in range(args.num_processes)] while (len(eval_episode_rewards_robot1) < 10 if dual_robots else len(eval_episode_rewards) < 10): with torch.no_grad(): if dual_robots: _, action_robot1, _, eval_recurrent_hidden_states_robot1 = actor_critic_robot1.act( obs_robot1, eval_recurrent_hidden_states_robot1, eval_masks, deterministic=True) _, action_robot2, _, eval_recurrent_hidden_states_robot2 = actor_critic_robot2.act( obs_robot2, eval_recurrent_hidden_states_robot2, eval_masks, deterministic=True) else: _, action, _, eval_recurrent_hidden_states = actor_critic.act( obs, eval_recurrent_hidden_states, eval_masks, deterministic=True) # Obser reward and next obs if dual_robots: action = torch.cat((action_robot1, action_robot2), dim=-1) obs, reward, done, infos = eval_envs.step(action) obs_robot1 = obs[:, :obs_robot_len] obs_robot2 = obs[:, obs_robot_len:] for i, info in enumerate(infos): eval_reward_list_robot1[i].append(info['reward_robot1']) eval_reward_list_robot2[i].append(info['reward_robot2']) else: obs, reward, done, infos = eval_envs.step(action) eval_masks = torch.FloatTensor([[0.0] if done_ else [1.0] for done_ in done]) reset_rewards = False for info in infos: if 'episode' in info.keys(): if dual_robots: reset_rewards = True eval_episode_rewards_robot1.append(np.sum(eval_reward_list_robot1[i])) eval_episode_rewards_robot2.append(np.sum(eval_reward_list_robot2[i])) else: eval_episode_rewards.append(info['episode']['r']) if reset_rewards: eval_reward_list_robot1 = [[] for _ in range(args.num_processes)] eval_reward_list_robot2 = [[] for _ in range(args.num_processes)] eval_envs.close() if dual_robots: print(" Evaluation using {} episodes: robot1 mean reward {:.5f}, robot2 mean reward {:.5f}\n". format(len(eval_episode_rewards_robot1), np.mean(eval_episode_rewards_robot1), np.mean(eval_episode_rewards_robot2))) else: print(" Evaluation using {} episodes: mean reward {:.5f}\n". format(len(eval_episode_rewards), np.mean(eval_episode_rewards))) sys.stdout.flush() if args.vis and j % args.vis_interval == 0: try: # Sometimes monitor doesn't properly flush the outputs win = visdom_plot(viz, win, args.log_dir, args.env_name, args.algo, args.num_env_steps) except IOError: pass if __name__ == "__main__": main()
[ 1, 1053, 2897, 29892, 10876, 29892, 931, 29892, 3509, 29892, 13149, 13, 3166, 16250, 1053, 316, 802, 13, 13, 5215, 330, 962, 13, 3166, 330, 962, 1053, 8162, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 5215, 4842, 305, 29889, 20640, 408, 5994, 13, 13, 3166, 282, 1129, 29889, 29874, 29906, 29883, 29918, 9759, 29918, 547, 509, 1053, 24673, 13, 3166, 282, 1129, 29889, 29874, 29906, 29883, 29918, 9759, 29918, 547, 509, 29889, 25699, 1053, 679, 29918, 5085, 13, 3166, 282, 1129, 29889, 29874, 29906, 29883, 29918, 9759, 29918, 547, 509, 29889, 264, 4270, 1053, 1207, 29918, 2003, 29918, 264, 4270, 13, 3166, 282, 1129, 29889, 29874, 29906, 29883, 29918, 9759, 29918, 547, 509, 29889, 4299, 1053, 25219, 13, 3166, 282, 1129, 29889, 29874, 29906, 29883, 29918, 9759, 29918, 547, 509, 29889, 12925, 1053, 21809, 449, 10486, 13, 3166, 282, 1129, 29889, 29874, 29906, 29883, 29918, 9759, 29918, 547, 509, 29889, 13239, 1053, 679, 29918, 2003, 29918, 8945, 675, 29892, 2767, 29918, 10660, 29918, 816, 11272, 13, 3166, 282, 1129, 29889, 29874, 29906, 29883, 29918, 9759, 29918, 547, 509, 29889, 20119, 675, 1053, 1998, 3129, 29918, 5317, 13, 13, 13, 5085, 353, 679, 29918, 5085, 580, 13, 13, 9294, 6389, 29889, 284, 1484, 297, 6024, 29874, 29906, 29883, 742, 525, 9759, 742, 525, 547, 509, 2033, 13, 361, 6389, 29889, 3757, 1264, 29918, 22197, 29901, 13, 1678, 4974, 6389, 29889, 284, 1484, 297, 6024, 29874, 29906, 29883, 742, 525, 9759, 7464, 320, 13, 4706, 525, 4789, 1264, 8898, 338, 451, 8762, 363, 319, 7077, 5659, 29915, 13, 13, 361, 6389, 29889, 1949, 29918, 1245, 17718, 1405, 29871, 29900, 29901, 13, 1678, 4974, 6389, 29889, 1949, 29918, 1245, 17718, 1273, 6389, 29889, 1949, 29918, 5014, 267, 1275, 29871, 29900, 29892, 525, 1949, 29918, 1245, 17718, 1818, 367, 8572, 519, 491, 954, 29918, 5014, 267, 29915, 13, 13, 1949, 29918, 786, 15190, 353, 938, 29898, 5085, 29889, 1949, 29918, 6272, 29918, 24530, 29897, 849, 6389, 29889, 1949, 29918, 24530, 849, 6389, 29889, 1949, 29918, 5014, 267, 13, 13, 7345, 305, 29889, 11288, 29918, 26776, 29898, 5085, 29889, 26776, 29897, 13, 7345, 305, 29889, 29883, 6191, 29889, 11288, 29918, 26776, 29918, 497, 29898, 5085, 29889, 26776, 29897, 13, 13, 361, 6389, 29889, 29883, 6191, 322, 4842, 305, 29889, 29883, 6191, 29889, 275, 29918, 16515, 580, 322, 6389, 29889, 29883, 6191, 29918, 4801, 837, 262, 4695, 29901, 13, 1678, 4842, 305, 29889, 1627, 1975, 29889, 29883, 566, 15755, 29889, 1785, 16580, 353, 7700, 13, 1678, 4842, 305, 29889, 1627, 1975, 29889, 29883, 566, 15755, 29889, 4801, 837, 262, 4695, 353, 5852, 13, 13, 2202, 29901, 13, 1678, 2897, 29889, 29885, 12535, 12935, 29898, 5085, 29889, 1188, 29918, 3972, 29897, 13, 19499, 438, 29173, 29901, 13, 1678, 2066, 353, 13149, 29889, 23705, 29898, 359, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 1188, 29918, 3972, 29892, 525, 10521, 3712, 2105, 29889, 7638, 8785, 13, 1678, 1018, 29901, 13, 4706, 363, 285, 297, 2066, 29901, 13, 9651, 2897, 29889, 5992, 29898, 29888, 29897, 13, 1678, 5174, 20894, 2333, 2392, 408, 321, 29901, 13, 4706, 1209, 13, 13, 14513, 29918, 1188, 29918, 3972, 353, 6389, 29889, 1188, 29918, 3972, 718, 11119, 14513, 29908, 13, 13, 2202, 29901, 13, 1678, 2897, 29889, 29885, 12535, 12935, 29898, 14513, 29918, 1188, 29918, 3972, 29897, 13, 19499, 438, 29173, 29901, 13, 1678, 2066, 353, 13149, 29889, 23705, 29898, 359, 29889, 2084, 29889, 7122, 29898, 14513, 29918, 1188, 29918, 3972, 29892, 525, 10521, 3712, 2105, 29889, 7638, 8785, 13, 1678, 1018, 29901, 13, 4706, 363, 285, 297, 2066, 29901, 13, 9651, 2897, 29889, 5992, 29898, 29888, 29897, 13, 1678, 5174, 20894, 2333, 2392, 408, 321, 29901, 13, 4706, 1209, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 4842, 305, 29889, 842, 29918, 1949, 29918, 28993, 29898, 29896, 29897, 13, 1678, 4742, 353, 4842, 305, 29889, 10141, 703, 29883, 6191, 29901, 29900, 29908, 565, 6389, 29889, 29883, 6191, 1683, 376, 21970, 1159, 13, 13, 1678, 565, 6389, 29889, 1730, 29901, 13, 4706, 515, 1998, 3129, 1053, 5741, 3129, 13, 4706, 25294, 353, 5741, 3129, 29898, 637, 29922, 5085, 29889, 637, 29897, 13, 4706, 5401, 353, 6213, 13, 13, 1678, 427, 4270, 353, 1207, 29918, 2003, 29918, 264, 4270, 29898, 5085, 29889, 6272, 29918, 978, 29892, 6389, 29889, 26776, 29892, 29871, 29896, 29892, 13, 462, 4706, 6389, 29889, 4283, 29892, 6389, 29889, 1188, 29918, 3972, 29892, 6389, 29889, 1202, 29918, 9346, 342, 1022, 29892, 4742, 29892, 7700, 29897, 13, 13, 1678, 396, 5953, 837, 457, 565, 445, 338, 263, 14581, 19964, 313, 9910, 10823, 29897, 5177, 29889, 13, 1678, 20881, 353, 427, 4270, 29889, 12071, 580, 13, 1678, 3158, 353, 4842, 305, 29889, 20158, 4197, 264, 4270, 29889, 2467, 29918, 3493, 29889, 11249, 580, 2314, 13, 1678, 17117, 17117, 17117, 5235, 353, 427, 4270, 29889, 10568, 29898, 2467, 29897, 13, 1678, 14581, 29918, 13716, 1862, 353, 525, 700, 284, 29918, 13716, 1862, 29915, 297, 5235, 29961, 29900, 29962, 13, 1678, 565, 14581, 29918, 13716, 1862, 29901, 13, 4706, 20881, 29918, 307, 7451, 29918, 2435, 353, 5235, 29961, 29900, 22322, 26290, 29918, 307, 7451, 29918, 2435, 2033, 849, 29871, 29906, 13, 4706, 3158, 29918, 307, 7451, 29918, 2435, 353, 5235, 29961, 29900, 22322, 2467, 29918, 307, 7451, 29918, 2435, 2033, 849, 29871, 29906, 13, 4706, 20881, 29918, 307, 7451, 29896, 353, 20881, 7503, 29892, 584, 26290, 29918, 307, 7451, 29918, 2435, 29962, 13, 4706, 20881, 29918, 307, 7451, 29906, 353, 20881, 7503, 29892, 20881, 29918, 307, 7451, 29918, 2435, 17531, 13, 4706, 565, 7431, 29898, 26290, 29918, 307, 7451, 29896, 29961, 29900, 2314, 2804, 20881, 29918, 307, 7451, 29918, 2435, 470, 7431, 29898, 26290, 29918, 307, 7451, 29906, 29961, 29900, 2314, 2804, 20881, 29918, 307, 7451, 29918, 2435, 29901, 13, 9651, 1596, 877, 307, 7451, 29871, 29896, 20881, 8267, 29901, 742, 7431, 29898, 26290, 29918, 307, 7451, 29896, 29961, 29900, 11724, 525, 26290, 2913, 19964, 8267, 29901, 742, 313, 26290, 29918, 307, 7451, 29918, 2435, 29892, 876, 13, 9651, 1596, 877, 307, 7451, 29871, 29906, 20881, 8267, 29901, 742, 7431, 29898, 26290, 29918, 307, 7451, 29906, 29961, 29900, 11724, 525, 26290, 2913, 19964, 8267, 29901, 742, 313, 26290, 29918, 307, 7451, 29918, 2435, 29892, 876, 13, 9651, 6876, 580, 13, 13, 1678, 427, 4270, 353, 1207, 29918, 2003, 29918, 264, 4270, 29898, 5085, 29889, 6272, 29918, 978, 29892, 6389, 29889, 26776, 29892, 6389, 29889, 1949, 29918, 5014, 267, 29892, 13, 462, 4706, 6389, 29889, 4283, 29892, 6389, 29889, 1188, 29918, 3972, 29892, 6389, 29889, 1202, 29918, 9346, 342, 1022, 29892, 4742, 29892, 7700, 29897, 13, 13, 1678, 565, 14581, 29918, 13716, 1862, 29901, 13, 4706, 396, 2538, 300, 5177, 13, 4706, 20881, 353, 427, 4270, 29889, 12071, 580, 13, 4706, 20881, 29918, 307, 7451, 29896, 353, 20881, 7503, 29892, 584, 26290, 29918, 307, 7451, 29918, 2435, 29962, 13, 4706, 20881, 29918, 307, 7451, 29906, 353, 20881, 7503, 29892, 20881, 29918, 307, 7451, 29918, 2435, 17531, 13, 4706, 3158, 29918, 3493, 29918, 307, 7451, 29896, 353, 8162, 29889, 3313, 29898, 677, 29922, 9302, 29889, 2378, 4197, 29899, 29896, 29889, 29900, 14178, 2467, 29918, 307, 7451, 29918, 2435, 511, 1880, 29922, 9302, 29889, 2378, 4197, 29896, 29889, 29900, 14178, 2467, 29918, 307, 7451, 29918, 2435, 511, 26688, 29922, 9302, 29889, 7411, 29941, 29906, 29897, 13, 4706, 3158, 29918, 3493, 29918, 307, 7451, 29906, 353, 8162, 29889, 3313, 29898, 677, 29922, 9302, 29889, 2378, 4197, 29899, 29896, 29889, 29900, 14178, 2467, 29918, 307, 7451, 29918, 2435, 511, 1880, 29922, 9302, 29889, 2378, 4197, 29896, 29889, 29900, 14178, 2467, 29918, 307, 7451, 29918, 2435, 511, 26688, 29922, 9302, 29889, 7411, 29941, 29906, 29897, 13, 13, 1678, 565, 6389, 29889, 1359, 29918, 22197, 338, 451, 6213, 29901, 13, 4706, 565, 14581, 29918, 13716, 1862, 29901, 13, 9651, 11339, 29918, 9695, 293, 29918, 307, 7451, 29896, 29892, 11339, 29918, 9695, 293, 29918, 307, 7451, 29906, 29892, 704, 29918, 29878, 1516, 353, 4842, 305, 29889, 1359, 29898, 5085, 29889, 1359, 29918, 22197, 29897, 13, 4706, 1683, 29901, 13, 9651, 11339, 29918, 9695, 293, 29892, 704, 29918, 29878, 1516, 353, 4842, 305, 29889, 1359, 29898, 5085, 29889, 1359, 29918, 22197, 29897, 13, 4706, 9649, 29918, 12324, 353, 679, 29918, 2003, 29918, 8945, 675, 29898, 264, 4270, 29897, 13, 4706, 565, 9649, 29918, 12324, 338, 451, 6213, 29901, 13, 9651, 9649, 29918, 12324, 29889, 711, 29918, 29878, 1516, 353, 704, 29918, 29878, 1516, 13, 1678, 1683, 29901, 13, 4706, 565, 14581, 29918, 13716, 1862, 29901, 13, 9651, 11339, 29918, 9695, 293, 29918, 307, 7451, 29896, 353, 25219, 4197, 26290, 29918, 307, 7451, 29918, 2435, 1402, 3158, 29918, 3493, 29918, 307, 7451, 29896, 29892, 13, 18884, 2967, 29918, 19290, 3790, 29915, 3757, 1264, 2396, 6389, 29889, 3757, 1264, 29918, 22197, 1800, 13, 9651, 11339, 29918, 9695, 293, 29918, 307, 7451, 29906, 353, 25219, 4197, 26290, 29918, 307, 7451, 29918, 2435, 1402, 3158, 29918, 3493, 29918, 307, 7451, 29906, 29892, 13, 18884, 2967, 29918, 19290, 3790, 29915, 3757, 1264, 2396, 6389, 29889, 3757, 1264, 29918, 22197, 1800, 13, 4706, 1683, 29901, 13, 9651, 11339, 29918, 9695, 293, 353, 25219, 29898, 264, 4270, 29889, 26739, 362, 29918, 3493, 29889, 12181, 29892, 427, 4270, 29889, 2467, 29918, 3493, 29892, 13, 18884, 2967, 29918, 19290, 3790, 29915, 3757, 1264, 2396, 6389, 29889, 3757, 1264, 29918, 22197, 29892, 525, 10892, 29918, 2311, 2396, 6389, 29889, 10892, 29918, 2311, 1800, 13, 1678, 565, 14581, 29918, 13716, 1862, 29901, 13, 4706, 11339, 29918, 9695, 293, 29918, 307, 7451, 29896, 29889, 517, 29898, 10141, 29897, 13, 4706, 11339, 29918, 9695, 293, 29918, 307, 7451, 29906, 29889, 517, 29898, 10141, 29897, 13, 1678, 1683, 29901, 13, 4706, 11339, 29918, 9695, 293, 29889, 517, 29898, 10141, 29897, 13, 13, 1678, 565, 6389, 29889, 284, 1484, 1275, 525, 29874, 29906, 29883, 2396, 13, 4706, 10823, 353, 24673, 29889, 29909, 29906, 29907, 29918, 11375, 5659, 29898, 7168, 29918, 9695, 293, 29892, 6389, 29889, 1767, 29918, 6758, 29918, 1111, 1389, 29892, 13, 462, 1669, 6389, 29889, 296, 14441, 29918, 1111, 1389, 29892, 301, 29878, 29922, 5085, 29889, 29212, 29892, 13, 462, 1669, 321, 567, 29922, 5085, 29889, 8961, 29892, 15595, 29922, 5085, 29889, 2312, 29892, 13, 462, 1669, 4236, 29918, 5105, 29918, 12324, 29922, 5085, 29889, 3317, 29918, 5105, 29918, 12324, 29897, 13, 1678, 25342, 6389, 29889, 284, 1484, 1275, 525, 9759, 2396, 13, 4706, 565, 14581, 29918, 13716, 1862, 29901, 13, 9651, 10823, 29918, 307, 7451, 29896, 353, 24673, 29889, 29925, 13152, 29898, 7168, 29918, 9695, 293, 29918, 307, 7451, 29896, 29892, 6389, 29889, 24049, 29918, 3207, 29892, 6389, 29889, 9759, 29918, 1022, 2878, 29892, 6389, 29889, 1949, 29918, 1195, 29875, 29918, 16175, 29892, 13, 462, 632, 6389, 29889, 1767, 29918, 6758, 29918, 1111, 1389, 29892, 6389, 29889, 296, 14441, 29918, 1111, 1389, 29892, 301, 29878, 29922, 5085, 29889, 29212, 29892, 13, 462, 462, 259, 321, 567, 29922, 5085, 29889, 8961, 29892, 13, 462, 462, 259, 4236, 29918, 5105, 29918, 12324, 29922, 5085, 29889, 3317, 29918, 5105, 29918, 12324, 29897, 13, 9651, 10823, 29918, 307, 7451, 29906, 353, 24673, 29889, 29925, 13152, 29898, 7168, 29918, 9695, 293, 29918, 307, 7451, 29906, 29892, 6389, 29889, 24049, 29918, 3207, 29892, 6389, 29889, 9759, 29918, 1022, 2878, 29892, 6389, 29889, 1949, 29918, 1195, 29875, 29918, 16175, 29892, 13, 462, 632, 6389, 29889, 1767, 29918, 6758, 29918, 1111, 1389, 29892, 6389, 29889, 296, 14441, 29918, 1111, 1389, 29892, 301, 29878, 29922, 5085, 29889, 29212, 29892, 13, 462, 462, 259, 321, 567, 29922, 5085, 29889, 8961, 29892, 13, 462, 462, 259, 4236, 29918, 5105, 29918, 12324, 29922, 5085, 29889, 3317, 29918, 5105, 29918, 12324, 29897, 13, 4706, 1683, 29901, 13, 9651, 10823, 353, 24673, 29889, 29925, 13152, 29898, 7168, 29918, 9695, 293, 29892, 6389, 29889, 24049, 29918, 3207, 29892, 6389, 29889, 9759, 29918, 1022, 2878, 29892, 6389, 29889, 1949, 29918, 1195, 29875, 29918, 16175, 29892, 13, 462, 632, 6389, 29889, 1767, 29918, 6758, 29918, 1111, 1389, 29892, 6389, 29889, 296, 14441, 29918, 1111, 1389, 29892, 301, 29878, 29922, 5085, 29889, 29212, 29892, 13, 462, 462, 259, 321, 567, 29922, 5085, 29889, 8961, 29892, 13, 462, 462, 259, 4236, 29918, 5105, 29918, 12324, 29922, 5085, 29889, 3317, 29918, 5105, 29918, 12324, 29897, 13, 1678, 25342, 6389, 29889, 284, 1484, 1275, 525, 547, 509, 2396, 13, 4706, 10823, 353, 24673, 29889, 29909, 29906, 29907, 29918, 11375, 5659, 29898, 7168, 29918, 9695, 293, 29892, 6389, 29889, 1767, 29918, 6758, 29918, 1111, 1389, 29892, 13, 462, 1669, 6389, 29889, 296, 14441, 29918, 1111, 1389, 29892, 263, 384, 509, 29922, 5574, 29897, 13, 13, 1678, 565, 14581, 29918, 13716, 1862, 29901, 13, 4706, 9679, 17718, 29918, 307, 7451, 29896, 353, 21809, 449, 10486, 29898, 5085, 29889, 1949, 29918, 24530, 29892, 6389, 29889, 1949, 29918, 1245, 17718, 565, 6389, 29889, 1949, 29918, 1245, 17718, 1405, 29871, 29900, 1683, 6389, 29889, 1949, 29918, 5014, 267, 29892, 13, 462, 9651, 518, 26290, 29918, 307, 7451, 29918, 2435, 1402, 3158, 29918, 3493, 29918, 307, 7451, 29896, 29892, 13, 462, 9651, 11339, 29918, 9695, 293, 29918, 307, 7451, 29896, 29889, 3757, 1264, 29918, 10892, 29918, 3859, 29918, 2311, 29897, 13, 4706, 9679, 17718, 29918, 307, 7451, 29906, 353, 21809, 449, 10486, 29898, 5085, 29889, 1949, 29918, 24530, 29892, 6389, 29889, 1949, 29918, 1245, 17718, 565, 6389, 29889, 1949, 29918, 1245, 17718, 1405, 29871, 29900, 1683, 6389, 29889, 1949, 29918, 5014, 267, 29892, 13, 462, 9651, 518, 26290, 29918, 307, 7451, 29918, 2435, 1402, 3158, 29918, 3493, 29918, 307, 7451, 29906, 29892, 13, 462, 9651, 11339, 29918, 9695, 293, 29918, 307, 7451, 29906, 29889, 3757, 1264, 29918, 10892, 29918, 3859, 29918, 2311, 29897, 13, 4706, 565, 6389, 29889, 1949, 29918, 1245, 17718, 1405, 29871, 29900, 29901, 13, 9651, 9679, 17718, 29918, 307, 7451, 29896, 29889, 26290, 29961, 29900, 1822, 8552, 23538, 7345, 305, 29889, 4117, 4197, 26290, 29918, 307, 7451, 29896, 363, 903, 297, 3464, 29898, 5085, 29889, 1949, 29918, 1245, 17718, 849, 6389, 29889, 1949, 29918, 5014, 267, 4638, 718, 518, 26290, 29918, 307, 7451, 29896, 29961, 5919, 5085, 29889, 1949, 29918, 1245, 17718, 1273, 6389, 29889, 1949, 29918, 5014, 267, 4638, 1402, 3964, 29922, 29900, 876, 13, 9651, 9679, 17718, 29918, 307, 7451, 29906, 29889, 26290, 29961, 29900, 1822, 8552, 23538, 7345, 305, 29889, 4117, 4197, 26290, 29918, 307, 7451, 29906, 363, 903, 297, 3464, 29898, 5085, 29889, 1949, 29918, 1245, 17718, 849, 6389, 29889, 1949, 29918, 5014, 267, 4638, 718, 518, 26290, 29918, 307, 7451, 29906, 29961, 5919, 5085, 29889, 1949, 29918, 1245, 17718, 1273, 6389, 29889, 1949, 29918, 5014, 267, 4638, 1402, 3964, 29922, 29900, 876, 13, 4706, 1683, 29901, 13, 9651, 9679, 17718, 29918, 307, 7451, 29896, 29889, 26290, 29961, 29900, 1822, 8552, 23538, 26290, 29918, 307, 7451, 29896, 29897, 13, 9651, 9679, 17718, 29918, 307, 7451, 29906, 29889, 26290, 29961, 29900, 1822, 8552, 23538, 26290, 29918, 307, 7451, 29906, 29897, 13, 4706, 9679, 17718, 29918, 307, 7451, 29896, 29889, 517, 29898, 10141, 29897, 13, 4706, 9679, 17718, 29918, 307, 7451, 29906, 29889, 517, 29898, 10141, 29897, 13, 1678, 1683, 29901, 13, 4706, 9679, 17718, 353, 21809, 449, 10486, 29898, 5085, 29889, 1949, 29918, 24530, 29892, 6389, 29889, 1949, 29918, 1245, 17718, 565, 6389, 29889, 1949, 29918, 1245, 17718, 1405, 29871, 29900, 1683, 6389, 29889, 1949, 29918, 5014, 267, 29892, 13, 462, 9651, 427, 4270, 29889, 26739, 362, 29918, 3493, 29889, 12181, 29892, 427, 4270, 29889, 2467, 29918, 3493, 29892, 13, 462, 9651, 11339, 29918, 9695, 293, 29889, 3757, 1264, 29918, 10892, 29918, 3859, 29918, 2311, 29897, 13, 4706, 20881, 353, 427, 4270, 29889, 12071, 580, 13, 4706, 565, 6389, 29889, 1949, 29918, 1245, 17718, 1405, 29871, 29900, 29901, 13, 9651, 9679, 17718, 29889, 26290, 29961, 29900, 1822, 8552, 23538, 7345, 305, 29889, 4117, 4197, 26290, 363, 903, 297, 3464, 29898, 5085, 29889, 1949, 29918, 1245, 17718, 849, 6389, 29889, 1949, 29918, 5014, 267, 4638, 718, 518, 26290, 29961, 5919, 5085, 29889, 1949, 29918, 1245, 17718, 1273, 6389, 29889, 1949, 29918, 5014, 267, 4638, 1402, 3964, 29922, 29900, 876, 13, 4706, 1683, 29901, 13, 9651, 9679, 17718, 29889, 26290, 29961, 29900, 1822, 8552, 23538, 26290, 29897, 13, 4706, 9679, 17718, 29889, 517, 29898, 10141, 29897, 13, 13, 1678, 316, 802, 29918, 2435, 353, 6389, 29889, 1949, 29918, 1245, 17718, 565, 6389, 29889, 1949, 29918, 1245, 17718, 1405, 29871, 29900, 1683, 313, 5085, 29889, 1949, 29918, 5014, 267, 565, 6389, 29889, 1949, 29918, 5014, 267, 1405, 29871, 29896, 29900, 1683, 29871, 29896, 29900, 29897, 13, 1678, 565, 14581, 29918, 13716, 1862, 29901, 13, 4706, 12720, 29918, 276, 2935, 29918, 307, 7451, 29896, 353, 316, 802, 29898, 3317, 2435, 29922, 311, 802, 29918, 2435, 29897, 13, 4706, 12720, 29918, 276, 2935, 29918, 307, 7451, 29906, 353, 316, 802, 29898, 3317, 2435, 29922, 311, 802, 29918, 2435, 29897, 13, 1678, 1683, 29901, 13, 4706, 12720, 29918, 276, 2935, 353, 316, 802, 29898, 3317, 2435, 29922, 311, 802, 29918, 2435, 29897, 13, 13, 1678, 1369, 353, 931, 29889, 2230, 580, 13, 1678, 363, 432, 297, 3464, 29898, 1949, 29918, 786, 15190, 1125, 13, 13, 4706, 565, 6389, 29889, 1509, 29918, 10660, 29918, 29212, 29918, 7099, 388, 29901, 13, 9651, 396, 23806, 6509, 6554, 5608, 368, 13, 9651, 565, 6389, 29889, 284, 1484, 1275, 376, 547, 509, 1115, 13, 18884, 396, 671, 5994, 3950, 29915, 29879, 6509, 6554, 1951, 372, 29915, 29879, 2898, 29899, 29659, 297, 413, 17470, 29889, 2272, 13, 18884, 2767, 29918, 10660, 29918, 816, 11272, 29898, 14748, 29889, 20640, 3950, 29892, 432, 29892, 954, 29918, 786, 15190, 29892, 10823, 29889, 20640, 3950, 29889, 29212, 29897, 13, 9651, 1683, 29901, 13, 18884, 565, 14581, 29918, 13716, 1862, 29901, 13, 462, 1678, 2767, 29918, 10660, 29918, 816, 11272, 29898, 14748, 29918, 307, 7451, 29896, 29889, 20640, 3950, 29892, 432, 29892, 954, 29918, 786, 15190, 29892, 6389, 29889, 29212, 29897, 13, 462, 1678, 2767, 29918, 10660, 29918, 816, 11272, 29898, 14748, 29918, 307, 7451, 29906, 29889, 20640, 3950, 29892, 432, 29892, 954, 29918, 786, 15190, 29892, 6389, 29889, 29212, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 2767, 29918, 10660, 29918, 816, 11272, 29898, 14748, 29889, 20640, 3950, 29892, 432, 29892, 954, 29918, 786, 15190, 29892, 6389, 29889, 29212, 29897, 13, 13, 4706, 565, 6389, 29889, 284, 1484, 1275, 525, 9759, 29915, 322, 6389, 29889, 1509, 29918, 10660, 29918, 24049, 29918, 7099, 388, 29901, 13, 9651, 565, 14581, 29918, 13716, 1862, 29901, 13, 18884, 10823, 29918, 307, 7451, 29896, 29889, 24049, 29918, 3207, 353, 6389, 29889, 24049, 29918, 3207, 29871, 334, 313, 29896, 448, 432, 847, 5785, 29898, 1949, 29918, 786, 15190, 876, 13, 18884, 10823, 29918, 307, 7451, 29906, 29889, 24049, 29918, 3207, 353, 6389, 29889, 24049, 29918, 3207, 29871, 334, 313, 29896, 448, 432, 847, 5785, 29898, 1949, 29918, 786, 15190, 876, 13, 9651, 1683, 29901, 13, 18884, 10823, 29889, 24049, 29918, 3207, 353, 6389, 29889, 24049, 29918, 3207, 29871, 334, 313, 29896, 448, 432, 847, 5785, 29898, 1949, 29918, 786, 15190, 876, 13, 13, 4706, 20751, 29918, 1761, 29918, 307, 7451, 29896, 353, 518, 2636, 363, 903, 297, 3464, 29898, 5085, 29889, 1949, 29918, 5014, 267, 4638, 13, 4706, 20751, 29918, 1761, 29918, 307, 7451, 29906, 353, 518, 2636, 363, 903, 297, 3464, 29898, 5085, 29889, 1949, 29918, 5014, 267, 4638, 13, 4706, 363, 4331, 297, 3464, 29898, 5085, 29889, 1949, 29918, 24530, 1125, 13, 9651, 396, 21029, 8820, 13, 9651, 396, 20881, 353, 1583, 29889, 7302, 29918, 1131, 547, 29898, 26290, 29892, 6389, 29889, 2876, 29892, 6389, 29889, 5463, 29897, 13, 13, 9651, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 18884, 565, 14581, 29918, 13716, 1862, 29901, 13, 462, 1678, 995, 29918, 307, 7451, 29896, 29892, 3158, 29918, 307, 7451, 29896, 29892, 3158, 29918, 1188, 29918, 22795, 29918, 307, 7451, 29896, 29892, 1162, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29896, 353, 11339, 29918, 9695, 293, 29918, 307, 7451, 29896, 29889, 627, 29898, 13, 462, 9651, 9679, 17718, 29918, 307, 7451, 29896, 29889, 26290, 29961, 10568, 29892, 584, 5085, 29889, 1949, 29918, 5014, 267, 1402, 13, 462, 9651, 9679, 17718, 29918, 307, 7451, 29896, 29889, 3757, 1264, 29918, 10892, 29918, 28631, 29961, 10568, 29892, 584, 5085, 29889, 1949, 29918, 5014, 267, 1402, 13, 462, 9651, 9679, 17718, 29918, 307, 7451, 29896, 29889, 13168, 29879, 29961, 10568, 29892, 584, 5085, 29889, 1949, 29918, 5014, 267, 2314, 13, 462, 1678, 995, 29918, 307, 7451, 29906, 29892, 3158, 29918, 307, 7451, 29906, 29892, 3158, 29918, 1188, 29918, 22795, 29918, 307, 7451, 29906, 29892, 1162, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29906, 353, 11339, 29918, 9695, 293, 29918, 307, 7451, 29906, 29889, 627, 29898, 13, 462, 9651, 9679, 17718, 29918, 307, 7451, 29906, 29889, 26290, 29961, 10568, 29892, 584, 5085, 29889, 1949, 29918, 5014, 267, 1402, 13, 462, 9651, 9679, 17718, 29918, 307, 7451, 29906, 29889, 3757, 1264, 29918, 10892, 29918, 28631, 29961, 10568, 29892, 584, 5085, 29889, 1949, 29918, 5014, 267, 1402, 13, 462, 9651, 9679, 17718, 29918, 307, 7451, 29906, 29889, 13168, 29879, 29961, 10568, 29892, 584, 5085, 29889, 1949, 29918, 5014, 267, 2314, 13, 18884, 1683, 29901, 13, 462, 1678, 995, 29892, 3158, 29892, 3158, 29918, 1188, 29918, 22795, 29892, 1162, 1264, 29918, 10892, 29918, 28631, 353, 11339, 29918, 9695, 293, 29889, 627, 29898, 13, 462, 9651, 9679, 17718, 29889, 26290, 29961, 10568, 29892, 584, 5085, 29889, 1949, 29918, 5014, 267, 1402, 13, 462, 9651, 9679, 17718, 29889, 3757, 1264, 29918, 10892, 29918, 28631, 29961, 10568, 29892, 584, 5085, 29889, 1949, 29918, 5014, 267, 1402, 13, 462, 9651, 9679, 17718, 29889, 13168, 29879, 29961, 10568, 29892, 584, 5085, 29889, 1949, 29918, 5014, 267, 2314, 13, 13, 9651, 396, 4250, 643, 20751, 322, 2446, 20881, 13, 9651, 565, 14581, 29918, 13716, 1862, 29901, 13, 18884, 3158, 353, 4842, 305, 29889, 4117, 3552, 2467, 29918, 307, 7451, 29896, 29892, 3158, 29918, 307, 7451, 29906, 511, 3964, 10457, 29896, 29897, 13, 18884, 20881, 29892, 20751, 29892, 2309, 29892, 3041, 359, 353, 427, 4270, 29889, 10568, 29898, 2467, 29897, 13, 18884, 20881, 29918, 307, 7451, 29896, 353, 20881, 7503, 29892, 584, 26290, 29918, 307, 7451, 29918, 2435, 29962, 13, 18884, 20881, 29918, 307, 7451, 29906, 353, 20881, 7503, 29892, 20881, 29918, 307, 7451, 29918, 2435, 17531, 13, 18884, 363, 474, 29892, 5235, 297, 26985, 29898, 7192, 359, 1125, 13, 462, 1678, 20751, 29918, 1761, 29918, 307, 7451, 29896, 29961, 29875, 1822, 4397, 29898, 3888, 1839, 276, 1328, 29918, 307, 7451, 29896, 11287, 13, 462, 1678, 20751, 29918, 1761, 29918, 307, 7451, 29906, 29961, 29875, 1822, 4397, 29898, 3888, 1839, 276, 1328, 29918, 307, 7451, 29906, 11287, 13, 18884, 20751, 29918, 307, 7451, 29896, 353, 4842, 305, 29889, 20158, 4197, 29961, 3888, 1839, 276, 1328, 29918, 307, 7451, 29896, 2033, 29962, 363, 5235, 297, 3041, 359, 2314, 13, 18884, 20751, 29918, 307, 7451, 29906, 353, 4842, 305, 29889, 20158, 4197, 29961, 3888, 1839, 276, 1328, 29918, 307, 7451, 29906, 2033, 29962, 363, 5235, 297, 3041, 359, 2314, 13, 9651, 1683, 29901, 13, 18884, 20881, 29892, 20751, 29892, 2309, 29892, 3041, 359, 353, 427, 4270, 29889, 10568, 29898, 2467, 29897, 13, 13, 9651, 363, 474, 29892, 5235, 297, 26985, 29898, 7192, 359, 1125, 13, 18884, 565, 525, 1022, 275, 356, 29915, 297, 5235, 29889, 8149, 7295, 13, 462, 1678, 565, 14581, 29918, 13716, 1862, 29901, 13, 462, 4706, 12720, 29918, 276, 2935, 29918, 307, 7451, 29896, 29889, 4397, 29898, 9302, 29889, 2083, 29898, 276, 1328, 29918, 1761, 29918, 307, 7451, 29896, 29961, 29875, 12622, 13, 462, 4706, 12720, 29918, 276, 2935, 29918, 307, 7451, 29906, 29889, 4397, 29898, 9302, 29889, 2083, 29898, 276, 1328, 29918, 1761, 29918, 307, 7451, 29906, 29961, 29875, 12622, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 12720, 29918, 276, 2935, 29889, 4397, 29898, 3888, 1839, 1022, 275, 356, 16215, 29878, 11287, 13, 13, 9651, 396, 960, 2309, 769, 5941, 278, 4955, 310, 13917, 29889, 13, 9651, 11105, 29879, 353, 4842, 305, 29889, 11031, 29911, 6073, 4197, 29961, 29900, 29889, 29900, 29962, 565, 2309, 29918, 1683, 518, 29896, 29889, 29900, 29962, 13, 462, 462, 539, 363, 2309, 29918, 297, 2309, 2314, 13, 13, 9651, 565, 14581, 29918, 13716, 1862, 29901, 13, 18884, 9679, 17718, 29918, 307, 7451, 29896, 29889, 7851, 29898, 26290, 29918, 307, 7451, 29896, 29892, 1162, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29896, 29892, 3158, 29918, 307, 7451, 29896, 29892, 3158, 29918, 1188, 29918, 22795, 29918, 307, 7451, 29896, 29892, 995, 29918, 307, 7451, 29896, 29892, 20751, 29918, 307, 7451, 29896, 29892, 11105, 29879, 29897, 13, 18884, 9679, 17718, 29918, 307, 7451, 29906, 29889, 7851, 29898, 26290, 29918, 307, 7451, 29906, 29892, 1162, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29906, 29892, 3158, 29918, 307, 7451, 29906, 29892, 3158, 29918, 1188, 29918, 22795, 29918, 307, 7451, 29906, 29892, 995, 29918, 307, 7451, 29906, 29892, 20751, 29918, 307, 7451, 29906, 29892, 11105, 29879, 29897, 13, 9651, 1683, 29901, 13, 18884, 9679, 17718, 29889, 7851, 29898, 26290, 29892, 1162, 1264, 29918, 10892, 29918, 28631, 29892, 3158, 29892, 3158, 29918, 1188, 29918, 22795, 29892, 995, 29892, 20751, 29892, 11105, 29879, 29897, 13, 13, 13, 4706, 565, 6389, 29889, 1949, 29918, 1245, 17718, 1405, 29871, 29900, 322, 313, 29926, 1273, 313, 5085, 29889, 1949, 29918, 1245, 17718, 849, 6389, 29889, 1949, 29918, 5014, 267, 29897, 2804, 29871, 29900, 1125, 13, 9651, 396, 9333, 2767, 278, 24833, 746, 591, 505, 8560, 954, 29918, 1245, 17718, 23876, 13, 9651, 6773, 13, 13, 4706, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 9651, 565, 14581, 29918, 13716, 1862, 29901, 13, 18884, 2446, 29918, 1767, 29918, 307, 7451, 29896, 353, 11339, 29918, 9695, 293, 29918, 307, 7451, 29896, 29889, 657, 29918, 1767, 29898, 1245, 17718, 29918, 307, 7451, 29896, 29889, 26290, 14352, 29896, 1402, 13, 462, 462, 462, 1678, 9679, 17718, 29918, 307, 7451, 29896, 29889, 3757, 1264, 29918, 10892, 29918, 28631, 14352, 29896, 1402, 13, 462, 462, 462, 1678, 9679, 17718, 29918, 307, 7451, 29896, 29889, 13168, 29879, 14352, 29896, 14664, 4801, 496, 580, 13, 18884, 2446, 29918, 1767, 29918, 307, 7451, 29906, 353, 11339, 29918, 9695, 293, 29918, 307, 7451, 29906, 29889, 657, 29918, 1767, 29898, 1245, 17718, 29918, 307, 7451, 29906, 29889, 26290, 14352, 29896, 1402, 13, 462, 462, 462, 1678, 9679, 17718, 29918, 307, 7451, 29906, 29889, 3757, 1264, 29918, 10892, 29918, 28631, 14352, 29896, 1402, 13, 462, 462, 462, 1678, 9679, 17718, 29918, 307, 7451, 29906, 29889, 13168, 29879, 14352, 29896, 14664, 4801, 496, 580, 13, 9651, 1683, 29901, 13, 18884, 2446, 29918, 1767, 353, 11339, 29918, 9695, 293, 29889, 657, 29918, 1767, 29898, 1245, 17718, 29889, 26290, 14352, 29896, 1402, 13, 462, 462, 462, 1678, 9679, 17718, 29889, 3757, 1264, 29918, 10892, 29918, 28631, 14352, 29896, 1402, 13, 462, 462, 462, 1678, 9679, 17718, 29889, 13168, 29879, 14352, 29896, 14664, 4801, 496, 580, 13, 13, 4706, 565, 14581, 29918, 13716, 1862, 29901, 13, 9651, 9679, 17718, 29918, 307, 7451, 29896, 29889, 26017, 29918, 18280, 29898, 4622, 29918, 1767, 29918, 307, 7451, 29896, 29892, 6389, 29889, 1509, 29918, 3249, 29872, 29892, 6389, 29889, 4283, 29892, 6389, 29889, 4722, 29897, 13, 9651, 9679, 17718, 29918, 307, 7451, 29906, 29889, 26017, 29918, 18280, 29898, 4622, 29918, 1767, 29918, 307, 7451, 29906, 29892, 6389, 29889, 1509, 29918, 3249, 29872, 29892, 6389, 29889, 4283, 29892, 6389, 29889, 4722, 29897, 13, 9651, 995, 29918, 6758, 29918, 307, 7451, 29896, 29892, 3158, 29918, 6758, 29918, 307, 7451, 29896, 29892, 1320, 29918, 296, 14441, 29918, 307, 7451, 29896, 353, 10823, 29918, 307, 7451, 29896, 29889, 5504, 29898, 1245, 17718, 29918, 307, 7451, 29896, 29897, 13, 9651, 995, 29918, 6758, 29918, 307, 7451, 29906, 29892, 3158, 29918, 6758, 29918, 307, 7451, 29906, 29892, 1320, 29918, 296, 14441, 29918, 307, 7451, 29906, 353, 10823, 29918, 307, 7451, 29906, 29889, 5504, 29898, 1245, 17718, 29918, 307, 7451, 29906, 29897, 13, 9651, 9679, 17718, 29918, 307, 7451, 29896, 29889, 7045, 29918, 5504, 580, 13, 9651, 9679, 17718, 29918, 307, 7451, 29906, 29889, 7045, 29918, 5504, 580, 13, 4706, 1683, 29901, 13, 9651, 9679, 17718, 29889, 26017, 29918, 18280, 29898, 4622, 29918, 1767, 29892, 6389, 29889, 1509, 29918, 3249, 29872, 29892, 6389, 29889, 4283, 29892, 6389, 29889, 4722, 29897, 13, 9651, 995, 29918, 6758, 29892, 3158, 29918, 6758, 29892, 1320, 29918, 296, 14441, 353, 10823, 29889, 5504, 29898, 1245, 17718, 29897, 13, 9651, 9679, 17718, 29889, 7045, 29918, 5504, 580, 13, 13, 4706, 396, 4078, 363, 1432, 7292, 29899, 386, 12720, 470, 363, 278, 1833, 21502, 305, 13, 4706, 565, 313, 29926, 1273, 6389, 29889, 7620, 29918, 19207, 1275, 29871, 29900, 470, 432, 1275, 954, 29918, 786, 15190, 448, 29871, 29896, 29897, 322, 6389, 29889, 7620, 29918, 3972, 2804, 376, 1115, 13, 9651, 4078, 29918, 2084, 353, 2897, 29889, 2084, 29889, 7122, 29898, 5085, 29889, 7620, 29918, 3972, 29892, 6389, 29889, 284, 1484, 29897, 13, 9651, 1018, 29901, 13, 18884, 2897, 29889, 29885, 12535, 12935, 29898, 7620, 29918, 2084, 29897, 13, 9651, 5174, 438, 29173, 29901, 13, 18884, 1209, 13, 13, 9651, 396, 319, 2289, 22769, 982, 304, 4078, 263, 1904, 304, 10808, 13, 9651, 565, 14581, 29918, 13716, 1862, 29901, 13, 18884, 4078, 29918, 4299, 29918, 307, 7451, 29896, 353, 11339, 29918, 9695, 293, 29918, 307, 7451, 29896, 13, 18884, 4078, 29918, 4299, 29918, 307, 7451, 29906, 353, 11339, 29918, 9695, 293, 29918, 307, 7451, 29906, 13, 18884, 565, 6389, 29889, 29883, 6191, 29901, 13, 462, 1678, 4078, 29918, 4299, 29918, 307, 7451, 29896, 353, 3509, 29889, 24535, 8552, 29898, 7168, 29918, 9695, 293, 29918, 307, 7451, 29896, 467, 21970, 580, 13, 462, 1678, 4078, 29918, 4299, 29918, 307, 7451, 29906, 353, 3509, 29889, 24535, 8552, 29898, 7168, 29918, 9695, 293, 29918, 307, 7451, 29906, 467, 21970, 580, 13, 18884, 4078, 29918, 4299, 353, 518, 7620, 29918, 4299, 29918, 307, 7451, 29896, 29892, 4078, 29918, 4299, 29918, 307, 7451, 29906, 29892, 13, 462, 795, 679, 5552, 29898, 657, 29918, 2003, 29918, 8945, 675, 29898, 264, 4270, 511, 525, 711, 29918, 29878, 1516, 742, 6213, 4638, 13, 9651, 1683, 29901, 13, 18884, 4078, 29918, 4299, 353, 11339, 29918, 9695, 293, 13, 18884, 565, 6389, 29889, 29883, 6191, 29901, 13, 462, 1678, 4078, 29918, 4299, 353, 3509, 29889, 24535, 8552, 29898, 7168, 29918, 9695, 293, 467, 21970, 580, 13, 18884, 4078, 29918, 4299, 353, 518, 7620, 29918, 4299, 29892, 13, 462, 795, 679, 5552, 29898, 657, 29918, 2003, 29918, 8945, 675, 29898, 264, 4270, 511, 525, 711, 29918, 29878, 1516, 742, 6213, 4638, 13, 9651, 4842, 305, 29889, 7620, 29898, 7620, 29918, 4299, 29892, 2897, 29889, 2084, 29889, 7122, 29898, 7620, 29918, 2084, 29892, 6389, 29889, 6272, 29918, 978, 718, 11393, 415, 5783, 13, 13, 4706, 3001, 29918, 1949, 29918, 24530, 353, 313, 29926, 718, 29871, 29896, 29897, 334, 6389, 29889, 1949, 29918, 5014, 267, 334, 6389, 29889, 1949, 29918, 24530, 13, 13, 4706, 565, 432, 1273, 6389, 29889, 1188, 29918, 19207, 1275, 29871, 29900, 322, 313, 2435, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 29897, 1405, 29871, 29896, 565, 14581, 29918, 13716, 1862, 1683, 7431, 29898, 1022, 275, 356, 29918, 276, 2935, 29897, 1405, 29871, 29896, 1125, 13, 9651, 1095, 353, 931, 29889, 2230, 580, 13, 9651, 565, 14581, 29918, 13716, 1862, 29901, 13, 18884, 1596, 703, 21860, 327, 29896, 11217, 24335, 954, 5335, 4196, 567, 24335, 383, 7024, 6571, 320, 29876, 9208, 6571, 6694, 23238, 29901, 2099, 29914, 2168, 713, 20751, 12365, 29889, 29896, 29888, 6822, 25641, 29889, 29896, 29888, 1118, 1375, 29914, 3317, 20751, 12365, 29889, 29896, 29888, 6822, 25641, 29889, 29896, 29888, 29913, 1642, 13, 462, 1678, 3402, 29898, 29926, 29892, 3001, 29918, 1949, 29918, 24530, 29892, 13, 462, 965, 938, 29898, 7827, 29918, 1949, 29918, 24530, 847, 313, 355, 448, 1369, 8243, 13, 462, 965, 7431, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 511, 13, 462, 965, 7442, 29889, 12676, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 511, 13, 462, 965, 7442, 29889, 2168, 713, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 511, 13, 462, 965, 7442, 29889, 1195, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 511, 13, 462, 965, 7442, 29889, 3317, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 511, 1320, 29918, 296, 14441, 29918, 307, 7451, 29896, 29892, 13, 462, 965, 995, 29918, 6758, 29918, 307, 7451, 29896, 29892, 3158, 29918, 6758, 29918, 307, 7451, 29896, 876, 13, 18884, 1596, 703, 21860, 327, 29906, 11217, 24335, 9208, 6571, 6694, 23238, 29901, 2099, 29914, 2168, 713, 20751, 12365, 29889, 29896, 29888, 6822, 25641, 29889, 29896, 29888, 1118, 1375, 29914, 3317, 20751, 12365, 29889, 29896, 29888, 6822, 25641, 29889, 29896, 29888, 1012, 29876, 1642, 13, 462, 1678, 3402, 29898, 29926, 29892, 7431, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29906, 511, 13, 462, 965, 7442, 29889, 12676, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29906, 511, 13, 462, 965, 7442, 29889, 2168, 713, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29906, 511, 13, 462, 965, 7442, 29889, 1195, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29906, 511, 13, 462, 965, 7442, 29889, 3317, 29898, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29906, 511, 1320, 29918, 296, 14441, 29918, 307, 7451, 29906, 29892, 13, 462, 965, 995, 29918, 6758, 29918, 307, 7451, 29906, 29892, 3158, 29918, 6758, 29918, 307, 7451, 29906, 876, 13, 9651, 1683, 29901, 13, 18884, 1596, 703, 3373, 15190, 24335, 954, 5335, 4196, 567, 24335, 383, 7024, 6571, 320, 29876, 9208, 6571, 6694, 23238, 29901, 2099, 29914, 2168, 713, 20751, 12365, 29889, 29896, 29888, 6822, 25641, 29889, 29896, 29888, 1118, 1375, 29914, 3317, 20751, 12365, 29889, 29896, 29888, 6822, 25641, 29889, 29896, 29888, 1012, 29876, 1642, 13, 462, 1678, 3402, 29898, 29926, 29892, 3001, 29918, 1949, 29918, 24530, 29892, 13, 462, 965, 938, 29898, 7827, 29918, 1949, 29918, 24530, 847, 313, 355, 448, 1369, 8243, 13, 462, 965, 7431, 29898, 1022, 275, 356, 29918, 276, 2935, 511, 13, 462, 965, 7442, 29889, 12676, 29898, 1022, 275, 356, 29918, 276, 2935, 511, 13, 462, 965, 7442, 29889, 2168, 713, 29898, 1022, 275, 356, 29918, 276, 2935, 511, 13, 462, 965, 7442, 29889, 1195, 29898, 1022, 275, 356, 29918, 276, 2935, 511, 13, 462, 965, 7442, 29889, 3317, 29898, 1022, 275, 356, 29918, 276, 2935, 511, 1320, 29918, 296, 14441, 29892, 13, 462, 965, 995, 29918, 6758, 29892, 3158, 29918, 6758, 876, 13, 9651, 10876, 29889, 25393, 29889, 23126, 580, 13, 13, 4706, 565, 313, 5085, 29889, 14513, 29918, 19207, 338, 451, 6213, 13, 18884, 322, 7431, 29898, 1022, 275, 356, 29918, 276, 2935, 29897, 1405, 29871, 29896, 13, 18884, 322, 432, 1273, 6389, 29889, 14513, 29918, 19207, 1275, 29871, 29900, 1125, 13, 9651, 19745, 29918, 264, 4270, 353, 1207, 29918, 2003, 29918, 264, 4270, 29898, 13, 18884, 6389, 29889, 6272, 29918, 978, 29892, 6389, 29889, 26776, 718, 6389, 29889, 1949, 29918, 5014, 267, 29892, 6389, 29889, 1949, 29918, 5014, 267, 29892, 13, 18884, 6389, 29889, 4283, 29892, 19745, 29918, 1188, 29918, 3972, 29892, 6389, 29889, 1202, 29918, 9346, 342, 1022, 29892, 4742, 29892, 5852, 29897, 13, 13, 9651, 9649, 29918, 12324, 353, 679, 29918, 2003, 29918, 8945, 675, 29898, 14513, 29918, 264, 4270, 29897, 13, 9651, 565, 9649, 29918, 12324, 338, 451, 6213, 29901, 13, 18884, 9649, 29918, 12324, 29889, 14513, 580, 13, 18884, 9649, 29918, 12324, 29889, 711, 29918, 29878, 1516, 353, 679, 29918, 2003, 29918, 8945, 675, 29898, 264, 4270, 467, 711, 29918, 29878, 1516, 13, 13, 9651, 565, 14581, 29918, 13716, 1862, 29901, 13, 18884, 19745, 29918, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 353, 5159, 13, 18884, 19745, 29918, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29906, 353, 5159, 13, 9651, 1683, 29901, 13, 18884, 19745, 29918, 1022, 275, 356, 29918, 276, 2935, 353, 5159, 13, 13, 9651, 20881, 353, 19745, 29918, 264, 4270, 29889, 12071, 580, 13, 9651, 565, 14581, 29918, 13716, 1862, 29901, 13, 18884, 20881, 29918, 307, 7451, 29896, 353, 20881, 7503, 29892, 584, 26290, 29918, 307, 7451, 29918, 2435, 29962, 13, 18884, 20881, 29918, 307, 7451, 29906, 353, 20881, 7503, 29892, 20881, 29918, 307, 7451, 29918, 2435, 17531, 13, 18884, 19745, 29918, 3757, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29896, 353, 4842, 305, 29889, 3298, 359, 29898, 5085, 29889, 1949, 29918, 5014, 267, 29892, 13, 462, 18884, 11339, 29918, 9695, 293, 29918, 307, 7451, 29896, 29889, 3757, 1264, 29918, 10892, 29918, 3859, 29918, 2311, 29892, 4742, 29922, 10141, 29897, 13, 18884, 19745, 29918, 3757, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29906, 353, 4842, 305, 29889, 3298, 359, 29898, 5085, 29889, 1949, 29918, 5014, 267, 29892, 13, 462, 18884, 11339, 29918, 9695, 293, 29918, 307, 7451, 29906, 29889, 3757, 1264, 29918, 10892, 29918, 3859, 29918, 2311, 29892, 4742, 29922, 10141, 29897, 13, 9651, 1683, 29901, 13, 18884, 19745, 29918, 3757, 1264, 29918, 10892, 29918, 28631, 353, 4842, 305, 29889, 3298, 359, 29898, 5085, 29889, 1949, 29918, 5014, 267, 29892, 13, 462, 18884, 11339, 29918, 9695, 293, 29889, 3757, 1264, 29918, 10892, 29918, 3859, 29918, 2311, 29892, 4742, 29922, 10141, 29897, 13, 9651, 19745, 29918, 13168, 29879, 353, 4842, 305, 29889, 3298, 359, 29898, 5085, 29889, 1949, 29918, 5014, 267, 29892, 29871, 29896, 29892, 4742, 29922, 10141, 29897, 13, 13, 9651, 19745, 29918, 276, 1328, 29918, 1761, 29918, 307, 7451, 29896, 353, 518, 2636, 363, 903, 297, 3464, 29898, 5085, 29889, 1949, 29918, 5014, 267, 4638, 13, 9651, 19745, 29918, 276, 1328, 29918, 1761, 29918, 307, 7451, 29906, 353, 518, 2636, 363, 903, 297, 3464, 29898, 5085, 29889, 1949, 29918, 5014, 267, 4638, 13, 9651, 1550, 313, 2435, 29898, 14513, 29918, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 29897, 529, 29871, 29896, 29900, 565, 14581, 29918, 13716, 1862, 1683, 7431, 29898, 14513, 29918, 1022, 275, 356, 29918, 276, 2935, 29897, 529, 29871, 29896, 29900, 1125, 13, 18884, 411, 4842, 305, 29889, 1217, 29918, 5105, 7295, 13, 462, 1678, 565, 14581, 29918, 13716, 1862, 29901, 13, 462, 4706, 17117, 3158, 29918, 307, 7451, 29896, 29892, 17117, 19745, 29918, 3757, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29896, 353, 11339, 29918, 9695, 293, 29918, 307, 7451, 29896, 29889, 627, 29898, 13, 462, 9651, 20881, 29918, 307, 7451, 29896, 29892, 19745, 29918, 3757, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29896, 29892, 19745, 29918, 13168, 29879, 29892, 11806, 4695, 29922, 5574, 29897, 13, 462, 4706, 17117, 3158, 29918, 307, 7451, 29906, 29892, 17117, 19745, 29918, 3757, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29906, 353, 11339, 29918, 9695, 293, 29918, 307, 7451, 29906, 29889, 627, 29898, 13, 462, 9651, 20881, 29918, 307, 7451, 29906, 29892, 19745, 29918, 3757, 1264, 29918, 10892, 29918, 28631, 29918, 307, 7451, 29906, 29892, 19745, 29918, 13168, 29879, 29892, 11806, 4695, 29922, 5574, 29897, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 17117, 3158, 29892, 17117, 19745, 29918, 3757, 1264, 29918, 10892, 29918, 28631, 353, 11339, 29918, 9695, 293, 29889, 627, 29898, 13, 462, 9651, 20881, 29892, 19745, 29918, 3757, 1264, 29918, 10892, 29918, 28631, 29892, 19745, 29918, 13168, 29879, 29892, 11806, 4695, 29922, 5574, 29897, 13, 13, 18884, 396, 4250, 643, 20751, 322, 2446, 20881, 13, 18884, 565, 14581, 29918, 13716, 1862, 29901, 13, 462, 1678, 3158, 353, 4842, 305, 29889, 4117, 3552, 2467, 29918, 307, 7451, 29896, 29892, 3158, 29918, 307, 7451, 29906, 511, 3964, 10457, 29896, 29897, 13, 462, 1678, 20881, 29892, 20751, 29892, 2309, 29892, 3041, 359, 353, 19745, 29918, 264, 4270, 29889, 10568, 29898, 2467, 29897, 13, 462, 1678, 20881, 29918, 307, 7451, 29896, 353, 20881, 7503, 29892, 584, 26290, 29918, 307, 7451, 29918, 2435, 29962, 13, 462, 1678, 20881, 29918, 307, 7451, 29906, 353, 20881, 7503, 29892, 20881, 29918, 307, 7451, 29918, 2435, 17531, 13, 462, 1678, 363, 474, 29892, 5235, 297, 26985, 29898, 7192, 359, 1125, 13, 462, 4706, 19745, 29918, 276, 1328, 29918, 1761, 29918, 307, 7451, 29896, 29961, 29875, 1822, 4397, 29898, 3888, 1839, 276, 1328, 29918, 307, 7451, 29896, 11287, 13, 462, 4706, 19745, 29918, 276, 1328, 29918, 1761, 29918, 307, 7451, 29906, 29961, 29875, 1822, 4397, 29898, 3888, 1839, 276, 1328, 29918, 307, 7451, 29906, 11287, 13, 18884, 1683, 29901, 13, 462, 1678, 20881, 29892, 20751, 29892, 2309, 29892, 3041, 359, 353, 19745, 29918, 264, 4270, 29889, 10568, 29898, 2467, 29897, 13, 13, 13, 18884, 19745, 29918, 13168, 29879, 353, 4842, 305, 29889, 11031, 29911, 6073, 4197, 29961, 29900, 29889, 29900, 29962, 565, 2309, 29918, 1683, 518, 29896, 29889, 29900, 29962, 13, 462, 462, 18884, 363, 2309, 29918, 297, 2309, 2314, 13, 13, 18884, 10092, 29918, 276, 2935, 353, 7700, 13, 18884, 363, 5235, 297, 3041, 359, 29901, 13, 462, 1678, 565, 525, 1022, 275, 356, 29915, 297, 5235, 29889, 8149, 7295, 13, 462, 4706, 565, 14581, 29918, 13716, 1862, 29901, 13, 462, 9651, 10092, 29918, 276, 2935, 353, 5852, 13, 462, 9651, 19745, 29918, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 29889, 4397, 29898, 9302, 29889, 2083, 29898, 14513, 29918, 276, 1328, 29918, 1761, 29918, 307, 7451, 29896, 29961, 29875, 12622, 13, 462, 9651, 19745, 29918, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29906, 29889, 4397, 29898, 9302, 29889, 2083, 29898, 14513, 29918, 276, 1328, 29918, 1761, 29918, 307, 7451, 29906, 29961, 29875, 12622, 13, 462, 4706, 1683, 29901, 13, 462, 9651, 19745, 29918, 1022, 275, 356, 29918, 276, 2935, 29889, 4397, 29898, 3888, 1839, 1022, 275, 356, 16215, 29878, 11287, 13, 18884, 565, 10092, 29918, 276, 2935, 29901, 13, 462, 1678, 19745, 29918, 276, 1328, 29918, 1761, 29918, 307, 7451, 29896, 353, 518, 2636, 363, 903, 297, 3464, 29898, 5085, 29889, 1949, 29918, 5014, 267, 4638, 13, 462, 1678, 19745, 29918, 276, 1328, 29918, 1761, 29918, 307, 7451, 29906, 353, 518, 2636, 363, 903, 297, 3464, 29898, 5085, 29889, 1949, 29918, 5014, 267, 4638, 13, 13, 9651, 19745, 29918, 264, 4270, 29889, 5358, 580, 13, 13, 9651, 565, 14581, 29918, 13716, 1862, 29901, 13, 18884, 1596, 703, 382, 4387, 362, 773, 6571, 23238, 29901, 19964, 29896, 2099, 20751, 12365, 29889, 29945, 29888, 1118, 19964, 29906, 2099, 20751, 12365, 29889, 29945, 29888, 1012, 29876, 1642, 13, 462, 268, 3402, 29898, 2435, 29898, 14513, 29918, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 511, 13, 462, 9651, 7442, 29889, 12676, 29898, 14513, 29918, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29896, 511, 7442, 29889, 12676, 29898, 14513, 29918, 1022, 275, 356, 29918, 276, 2935, 29918, 307, 7451, 29906, 4961, 13, 9651, 1683, 29901, 13, 18884, 1596, 703, 382, 4387, 362, 773, 6571, 23238, 29901, 2099, 20751, 12365, 29889, 29945, 29888, 1012, 29876, 1642, 13, 462, 1678, 3402, 29898, 2435, 29898, 14513, 29918, 1022, 275, 356, 29918, 276, 2935, 511, 13, 462, 965, 7442, 29889, 12676, 29898, 14513, 29918, 1022, 275, 356, 29918, 276, 2935, 4961, 13, 9651, 10876, 29889, 25393, 29889, 23126, 580, 13, 13, 4706, 565, 6389, 29889, 1730, 322, 432, 1273, 6389, 29889, 1730, 29918, 19207, 1275, 29871, 29900, 29901, 13, 9651, 1018, 29901, 13, 18884, 396, 18512, 11819, 1838, 29915, 29873, 6284, 28371, 278, 14391, 13, 18884, 5401, 353, 1998, 3129, 29918, 5317, 29898, 29894, 466, 29892, 5401, 29892, 6389, 29889, 1188, 29918, 3972, 29892, 6389, 29889, 6272, 29918, 978, 29892, 13, 462, 462, 29871, 6389, 29889, 284, 1484, 29892, 6389, 29889, 1949, 29918, 6272, 29918, 24530, 29897, 13, 9651, 5174, 10663, 2392, 29901, 13, 18884, 1209, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 1667, 580, 13, 2 ]
Project--Make-Sense-of-Census/code.py
sahil-mehta/ga-learner-dsmp-repo
0
184583
<filename>Project--Make-Sense-of-Census/code.py # -------------- # Importing header files import numpy as np # Path of the file has been stored in variable called 'path' dfile='path' data=np.genfromtxt(path,delimiter=",", skip_header=1) data #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] census=np.concatenate([new_record,data]) # -------------- #Code starts here age = census[:,0] max_age=age.max() max_age min_age=age.min() min_age age_mean=age.mean() age_mean age_std=age.std() age_std # -------------- #Code starts here race_0=census[census[:,2]==0] race_1=census[census[:,2]==1] race_2=census[census[:,2]==2] race_3=census[census[:,2]==3] race_4=census[census[:,2]==4] len_0=len(race_0) len_1=len(race_1) len_2=len(race_2) len_3=len(race_3) len_4=len(race_4) listmin=(len_0,len_1,len_2,len_3,len_4) minority_race=listmin.index(min(listmin)) # -------------- #Code starts here senior_citizens=census[census[:,0]>60] #Calculating the sum of all the values of array working_hours_sum=senior_citizens.sum(axis=0)[6] #Finding the length of the array senior_citizens_len=len(senior_citizens) #Finding the average working hours avg_working_hours=working_hours_sum/senior_citizens_len #Printing the average working hours print((avg_working_hours)) # -------------- #Code starts here high=census[census[:,1]>10] low=census[census[:,1]<=10] avg_pay_high=high[:,7].mean() avg_pay_low=low[:,7].mean() avg_pay_high,avg_pay_low
[ 1, 529, 9507, 29958, 7653, 489, 9984, 29899, 29903, 1947, 29899, 974, 29899, 29907, 8841, 29914, 401, 29889, 2272, 13, 29937, 448, 9072, 29899, 13, 29937, 16032, 292, 4839, 2066, 30004, 13, 5215, 12655, 408, 7442, 30004, 13, 30004, 13, 29937, 10802, 310, 278, 934, 756, 1063, 6087, 297, 2286, 2000, 525, 2084, 29915, 30004, 13, 29881, 1445, 2433, 2084, 29915, 30004, 13, 1272, 29922, 9302, 29889, 1885, 3166, 3945, 29898, 2084, 29892, 6144, 19657, 543, 29892, 613, 14383, 29918, 6672, 29922, 29896, 8443, 13, 1272, 30004, 13, 29937, 4373, 2407, 30004, 13, 1482, 29918, 11651, 29922, 8999, 29945, 29900, 29892, 259, 29929, 29892, 259, 29946, 29892, 259, 29896, 29892, 259, 29900, 29892, 259, 29900, 29892, 29871, 29946, 29900, 29892, 259, 29900, 5262, 30004, 13, 29883, 8841, 29922, 9302, 29889, 535, 29883, 2579, 403, 4197, 1482, 29918, 11651, 29892, 1272, 2314, 30004, 13, 13, 13, 13, 29937, 448, 9072, 29899, 13, 29937, 3399, 8665, 1244, 30004, 13, 482, 353, 16411, 7503, 29892, 29900, 29962, 30004, 13, 3317, 29918, 482, 29922, 482, 29889, 3317, 26471, 13, 3317, 29918, 482, 30004, 13, 1195, 29918, 482, 29922, 482, 29889, 1195, 26471, 13, 1195, 29918, 482, 30004, 13, 482, 29918, 12676, 29922, 482, 29889, 12676, 26471, 13, 482, 29918, 12676, 30004, 13, 482, 29918, 4172, 29922, 482, 29889, 4172, 26471, 13, 482, 29918, 4172, 13, 13, 13, 29937, 448, 9072, 29899, 13, 29937, 3399, 8665, 1244, 30004, 13, 25525, 29918, 29900, 29922, 29883, 8841, 29961, 29883, 8841, 7503, 29892, 29906, 29962, 1360, 29900, 29962, 30004, 13, 25525, 29918, 29896, 29922, 29883, 8841, 29961, 29883, 8841, 7503, 29892, 29906, 29962, 1360, 29896, 29962, 30004, 13, 25525, 29918, 29906, 29922, 29883, 8841, 29961, 29883, 8841, 7503, 29892, 29906, 29962, 1360, 29906, 29962, 30004, 13, 25525, 29918, 29941, 29922, 29883, 8841, 29961, 29883, 8841, 7503, 29892, 29906, 29962, 1360, 29941, 29962, 30004, 13, 25525, 29918, 29946, 29922, 29883, 8841, 29961, 29883, 8841, 7503, 29892, 29906, 29962, 1360, 29946, 29962, 30004, 13, 2435, 29918, 29900, 29922, 2435, 29898, 25525, 29918, 29900, 8443, 13, 2435, 29918, 29896, 29922, 2435, 29898, 25525, 29918, 29896, 8443, 13, 2435, 29918, 29906, 29922, 2435, 29898, 25525, 29918, 29906, 8443, 13, 2435, 29918, 29941, 29922, 2435, 29898, 25525, 29918, 29941, 8443, 13, 2435, 29918, 29946, 29922, 2435, 29898, 25525, 29918, 29946, 8443, 13, 1761, 1195, 7607, 2435, 29918, 29900, 29892, 2435, 29918, 29896, 29892, 2435, 29918, 29906, 29892, 2435, 29918, 29941, 29892, 2435, 29918, 29946, 8443, 13, 1195, 272, 537, 29918, 25525, 29922, 1761, 1195, 29889, 2248, 29898, 1195, 29898, 1761, 1195, 876, 13, 13, 13, 29937, 448, 9072, 29899, 13, 29937, 3399, 8665, 1244, 30004, 13, 4881, 1611, 29918, 20752, 466, 575, 29922, 29883, 8841, 29961, 29883, 8841, 7503, 29892, 29900, 29962, 29958, 29953, 29900, 29962, 30004, 13, 30004, 13, 29937, 27065, 1218, 278, 2533, 310, 599, 278, 1819, 310, 1409, 30004, 13, 22899, 29918, 29882, 2470, 29918, 2083, 29922, 4881, 1611, 29918, 20752, 466, 575, 29889, 2083, 29898, 8990, 29922, 29900, 9601, 29953, 29962, 30004, 13, 30004, 13, 29937, 29943, 4015, 278, 3309, 310, 278, 1409, 30004, 13, 4881, 1611, 29918, 20752, 466, 575, 29918, 2435, 29922, 2435, 29898, 4881, 1611, 29918, 20752, 466, 575, 8443, 13, 30004, 13, 29937, 29943, 4015, 278, 6588, 1985, 6199, 30004, 13, 485, 29887, 29918, 22899, 29918, 29882, 2470, 29922, 22899, 29918, 29882, 2470, 29918, 2083, 29914, 4881, 1611, 29918, 20752, 466, 575, 29918, 2435, 30004, 13, 30004, 13, 29937, 11816, 292, 278, 6588, 1985, 6199, 30004, 13, 2158, 3552, 485, 29887, 29918, 22899, 29918, 29882, 2470, 876, 13, 13, 13, 29937, 448, 9072, 29899, 13, 29937, 3399, 8665, 1244, 30004, 13, 9812, 29922, 29883, 8841, 29961, 29883, 8841, 7503, 29892, 29896, 29962, 29958, 29896, 29900, 29962, 30004, 13, 677, 29922, 29883, 8841, 29961, 29883, 8841, 7503, 29892, 29896, 29962, 14065, 29896, 29900, 29962, 30004, 13, 485, 29887, 29918, 10472, 29918, 9812, 29922, 9812, 7503, 29892, 29955, 1822, 12676, 26471, 13, 485, 29887, 29918, 10472, 29918, 677, 29922, 677, 7503, 29892, 29955, 1822, 12676, 26471, 13, 485, 29887, 29918, 10472, 29918, 9812, 29892, 485, 29887, 29918, 10472, 29918, 677, 13, 13, 13, 2 ]
scripts/data/topple_dataset.py
davrempe/predicting-physical-dynamics
16
2956
import numpy as np import pickle from os.path import exists, realpath import sys import math from topple_data_loader import ToppleData, ToppleDataLoader import transforms3d class ToppleNormalizationInfo(): ''' Structure to hold all the normalization information for a dataset. ''' def __init__(self): # max element of any linear vel vector self.max_lin_vel = None # max element of any angular vel vector self.max_ang_vel = None # max distance between positions in two contiguous timesteps self.max_pos = None # max change in rotation around any axis between two contiguous timesteps (for euler rot) self.max_rot = None # max angle of rotation between two steps for axis-angle representation self.max_delta_rot = None # max 2-norm of applied impulse vector self.force_vec_max = None # max 2-norm of a point in an object point cloud (used for point cloud and force pos) self.pc_max = None # normalization values for shape-related stuff self.density_offset = None self.density_max = None self.mass_offset = None self.mass_max = None self.inertia_offset = None self.inertia_max = None self.friction_offset = None self.friction_max = None def print_out(self): print({'max_lin_vel' : self.max_lin_vel, 'max_ang_vel' : self.max_ang_vel, 'max_pos' : self.max_pos, \ 'max_rot' : self.max_rot, 'max_delta_rot' : self.max_delta_rot, 'force_vec_max' : self.force_vec_max, 'pc_max' : self.pc_max, \ 'density_off' : self.density_offset, 'density_max' : self.density_max, 'mass_off' : self.mass_offset, \ 'mass_max' : self.mass_max, 'inertia_off' : self.inertia_offset, 'inertia_max' : self.inertia_max, \ 'friction_off' : self.friction_offset, 'friction_max' : self.friction_max }) def save(self, pkl_file): ''' Saves normalization info object to a specified .pkl file. ''' with open(pkl_file, 'wb') as f: pickle.dump(self, f) def load_from(self, pkl_file): ''' Load normalization info into this object from a specified .pkl file. ''' with open(pkl_file, 'rb') as f: norm_info = pickle.load(f) self.copy_from(norm_info) def copy_from(self, norm_info): ''' Takes values from the given normalization info object and copies them to this one ''' self.max_lin_vel = norm_info.max_lin_vel self.max_ang_vel = norm_info.max_ang_vel self.max_pos = norm_info.max_pos self.max_rot = norm_info.max_rot try: self.max_delta_rot = norm_info.max_delta_rot except: # old versions of data doesn't have max delta rot pass self.force_vec_max = norm_info.force_vec_max self.pc_max = norm_info.pc_max self.density_offset = norm_info.density_offset self.density_max = norm_info.density_max self.mass_offset = norm_info.mass_offset self.mass_max = norm_info.mass_max self.inertia_offset = norm_info.inertia_offset self.inertia_max = norm_info.inertia_max try: self.friction_offset = norm_info.friction_offset self.friction_max = norm_info.friction_max except: # old version doesn't have this pass class ToppleBatch(object): ''' Structure to hold a single batch of data. ''' def __init__(self, size, seq_len, num_pts): self.size = size self.num_steps = seq_len self.num_pts = num_pts self.point_cloud = np.zeros((self.size, self.num_pts, 3)) self.lin_vel = np.zeros((self.size, self.num_steps, 3)) self.ang_vel = np.zeros((self.size, self.num_steps, 3)) self.pos = np.zeros((self.size, self.num_steps, 3)) # cummulative euler angles self.rot = np.zeros((self.size, self.num_steps, 3)) # change in rotation in quaternion rep (w, x, y, z) self.delta_quat = np.zeros((self.size, self.num_steps, 4)) # change in rotation between steps in axis-angle rep (scaled 3 vec) self.delta_rot = np.zeros((self.size, self.num_steps, 3)) # change in rotation between steps in split axis-angle rep (4-vec) self.delta_rot_split = np.zeros((self.size, self.num_steps, 4)) # 0 if before topple idx, 1 if after self.topple_label = np.zeros((self.size, self.num_steps), dtype=int) # other meta-data not directly used in network self.toppled = [] self.shape_name = [] self.body_friction = np.zeros((self.size)) self.mass = np.zeros((self.size)) self.scale = np.zeros((self.size, 3)) self.rot_euler = np.zeros((self.size, self.num_steps, 3)) class ToppleDataset(object): ''' Loads toppling data and provides batches for training and model evaluation. ''' def __init__(self, roots, norm_info_file, batch_size=32, num_steps=15, shuffle=False, num_pts=None, perturb_pts=0.0): ''' - roots : list of directories containing data to load for this dataset - norm_info_file : .pkl file containing normalization information - batch_size : number of sequences to return in each batch - num_steps : number of timesteps to return in each sequence - shuffle : randomly shuffles the returned sequence ordering - num_pts : the number of points to use in the returned point cloud. If None uses all points in the data. - perturb_pts : the stdev to randomly perturb point clouds with. If None no perturbation is performed. - ''' # settings self.batch_size = batch_size self.steps_per_seq = num_steps self.shuffle = shuffle self.perturb_std = perturb_pts self.num_pts = num_pts # load in data for root in roots: if not exists(root): print('Could not find dataset at ' + root) return data_loader = ToppleDataLoader() self.data = data_loader.load_data(roots) if num_pts is None: # use all the points in the point cloud self.num_pts = self.data.point_cloud.shape[1] # load in normalization info if not exists(norm_info_file): print('Could not find normalization info at ' + norm_info_file) return self.norm_info = ToppleNormalizationInfo() self.norm_info.load_from(norm_info_file) print('Loaded normalization info!') # see if we have axis-angle info (for backwards compat) self.use_aa = False self.use_aa_split = False self.use_topple_idx = False self.use_delta_quat = False if len(self.data.delta_rot) > 0: self.use_aa = True if len(self.data.delta_rot_split) > 0: self.use_aa_split = True if len(self.data.topple_idx) > 0: self.use_topple_idx = True if len(self.data.body_friction) > 0: self.use_body_friction = True if len(self.data.delta_quat) > 0: self.use_delta_quat = True # normalize the data print('Normalizing data...') self.normalize_data(self.data, self.norm_info) print('Finished normalizing!') # order to iterate through data when returning batches (in order by default) self.iter_inds = range(0, self.data.size) # prepare to iterate through self.reset() def normalize_data(self, data, norm_info): ''' Normalizes (in place) the given ToppleData using the ToppleNormalizationInfo. ''' # point clouds -> [-1, 1] data.point_cloud /= norm_info.pc_max # force pos -> [-1, 1] data.force_pos /= norm_info.pc_max # force vec -> [-1, 1] data.force_vec /= norm_info.force_vec_max # density -> [0, 1] data.density = (data.density - norm_info.density_offset) / norm_info.density_max # mass -> [0, 1] data.mass = (data.mass - norm_info.mass_offset) / norm_info.mass_max # inertia -> [0, 1] data.inertia = (data.inertia - norm_info.inertia_offset) / norm_info.inertia_max # friction -> [0, 1] if norm_info.friction_offset is not None: data.body_friction = (data.body_friction - norm_info.friction_offset) / norm_info.friction_max # now time sequence data # velocities -> [-1, 1] for i, lin_vel_steps in enumerate(data.lin_vel): data.lin_vel[i] = [(x / norm_info.max_lin_vel) for x in lin_vel_steps] for i, ang_vel_steps in enumerate(data.ang_vel): data.ang_vel[i] = [(x / norm_info.max_ang_vel) for x in ang_vel_steps] # delta position -> [-1, 1] for i, pos_steps in enumerate(data.pos): data.pos[i] = [(x / norm_info.max_pos) for x in pos_steps] # delta rotation -> [-1, 1] for i, rot_steps in enumerate(data.total_rot): data.total_rot[i] = [(x / norm_info.max_rot) for x in rot_steps] # delta rot axis-angle -> [-1, 1] norm if self.use_aa: for i, delta_rot_steps in enumerate(data.delta_rot): data.delta_rot[i] = [(x / norm_info.max_delta_rot) for x in delta_rot_steps] # make axes unit and and normalize angle -> [-1, 1] if self.use_aa_split: for i, delta_rot_split_steps in enumerate(data.delta_rot_split): data.delta_rot_split[i] = [np.append(x[:3] / np.linalg.norm(x[:3]), x[3] / norm_info.max_delta_rot) for x in delta_rot_split_steps] def reset(self): ''' Prepares to iterate through dataset. ''' if self.shuffle: np.random.shuffle(self.iter_inds) # we consider an epoch as returning one sequence from every single simulation # ( though if the sequence length is shorter than sim length the unique sequences contained # in the dataset will be much more than an epoch length ) self.num_batches = (self.data.size + self.batch_size - 1) // self.batch_size self.batch_idx = 0 def has_next_batch(self): ''' Returns false if done with the current "epoch" (seen each sim once). ''' return self.batch_idx < self.num_batches def next_batch(self, random_window=True, focus_toppling=False): ''' Returns the next batch of data. if random_window=True will get a random sequence of correct length (otherwise starts at 0). If focus_toppling=True, will make sure this sequence includes the part of the sequence where toppling occurs. ''' # size is either batch_size, or shorter if we're at the end of the data start_idx = self.batch_idx * self.batch_size end_idx = min((self.batch_idx + 1) * self.batch_size, self.data.size) batch_size = end_idx - start_idx # get batch data batch = ToppleBatch(self.batch_size, self.steps_per_seq, self.num_pts) for i in range(batch_size): pc, lin_vel, ang_vel, pos, rot, delta_quat, delta_rot, delta_rot_split, topple_label, meta_info = \ self.get_seq(self.iter_inds[start_idx + i], self.steps_per_seq, random_window, focus_toppling) batch.point_cloud[i] = pc batch.lin_vel[i] = lin_vel batch.ang_vel[i] = ang_vel batch.pos[i] = pos batch.rot[i] = rot if self.use_delta_quat: batch.delta_quat[i] = delta_quat if self.use_aa: batch.delta_rot[i] = delta_rot if self.use_aa_split: batch.delta_rot_split[i] = delta_rot_split if self.use_topple_idx: batch.topple_label[i] = topple_label batch.toppled.append(meta_info[0]) batch.shape_name.append(meta_info[1]) batch.scale[i] = meta_info[2] batch.rot_euler[i] = meta_info[3] if self.use_body_friction: batch.body_friction[i] = meta_info[4] batch.mass[i] = meta_info[5] if batch_size != self.batch_size: # need to pad the end with repeat of data for i in range(self.batch_size - batch_size): batch.point_cloud[batch_size + i] = batch.point_cloud[i] batch.lin_vel[batch_size + i] = batch.lin_vel[i] batch.ang_vel[batch_size + i] = batch.ang_vel[i] batch.pos[batch_size + i] = batch.pos[i] batch.rot[batch_size + i] = batch.rot[i] if self.use_delta_quat: batch.delta_quat[batch_size + i] = batch.delta_quat[i] batch.toppled.append(batch.toppled[i]) batch.shape_name.append(batch.shape_name[i]) batch.scale[batch_size + i] = batch.scale[i] batch.rot_euler[batch_size + i] = batch.rot_euler[i] batch.mass[batch_size + i] = batch.mass[i] if self.use_aa: batch.delta_rot[batch_size + i] = batch.delta_rot[i] if self.use_aa_split: batch.delta_rot_split[batch_size + i] = batch.delta_rot_split[i] if self.use_topple_idx: batch.topple_label[batch_size + i] = batch.topple_label[i] if self.use_body_friction: batch.body_friction[batch_size + i] = batch.body_friction[i] self.batch_idx += 1 return batch def get_seq(self, idx, num_steps, random_window=True, focus_toppling=False): ''' Returns a random contiguous sequence from the simulation at the given idx and length num_steps. If num_steps > sim_length the final (sim_length-num_steps) steps are padded with the value at sim[sim_length]. ''' # get the normalized canonical point cloud for this simulation pc = np.copy(self.data.point_cloud[self.data.shape_idx[idx]]) scale = self.data.scale[idx] # scale accordingly pc *= np.reshape(scale, (1, -1)) # randomly perturb point cloud pc += np.random.normal(0.0, self.perturb_std, pc.shape) # randomly draw a subset of points if desired if self.num_pts < pc.shape[0]: pc_inds = np.random.choice(pc.shape[0], self.num_pts, replace=False) pc = pc[pc_inds, :] # randomly choose a size num_steps sequence from the simulation to return time-series data total_steps = len(self.data.lin_vel[idx]) max_start_step = total_steps - num_steps start_step = 0 if max_start_step < 0: # simulation is shorter than desired sequence length pad_len = abs(max_start_step) lin_vel_list = self.data.lin_vel[idx] lin_vel_out = np.array(lin_vel_list + [lin_vel_list[-1]]*pad_len) ang_vel_list = self.data.ang_vel[idx] ang_vel_out = np.array(ang_vel_list + [ang_vel_list[-1]]*pad_len) pos_list = self.data.pos[idx] pos_out = np.array(pos_list + [pos_list[-1]]*pad_len) rot_list = self.data.total_rot[idx] rot_out = np.array(rot_list + [rot_list[-1]]*pad_len) if self.use_delta_quat: delta_quat_list = self.data.delta_quat[idx] delta_quat_out = np.array(delta_quat_list + [delta_quat_list[-1]]*pad_len) euler_rot_list = self.data.rot_euler[idx] euler_rot_out = np.array(euler_rot_list + [euler_rot_list[-1]]*pad_len) if self.use_aa: delta_rot_list = self.data.delta_rot[idx] delta_rot_out = np.array(delta_rot_list + [delta_rot_list[-1]]*pad_len) if self.use_aa_split: delta_rot_split_list = self.data.delta_rot_split[idx] delta_rot_split_out = np.array(delta_rot_split_list + [delta_rot_split_list[-1]]*pad_len) if self.use_topple_idx: topple_label_out = np.zeros((total_steps + pad_len), dtype=int) seq_topple_idx = self.data.topple_idx[idx] if seq_topple_idx > 0: topple_label_out[seq_topple_idx:] = 1 else: start_step = 0 if random_window: if focus_toppling and self.data.toppled[idx]: # choose window around the index where it topples topple_idx = self.data.topple_idx[idx] min_idx = max([topple_idx - num_steps + 1, 0]) if min_idx >= max_start_step: # just pick the max index start_step = max_start_step else: # our window is guaranteed to see some part of toppling start_step = np.random.randint(min_idx, max_start_step+1) else: start_step = np.random.randint(0, max_start_step+1) end_step = start_step + num_steps # print('Range: %d, %d' % (start_step, end_step)) lin_vel_out = np.array(self.data.lin_vel[idx][start_step:end_step]) ang_vel_out = np.array(self.data.ang_vel[idx][start_step:end_step]) pos_out = np.array(self.data.pos[idx][start_step:end_step]) rot_out = np.array(self.data.total_rot[idx][start_step:end_step]) if self.use_delta_quat: delta_quat_out = np.array(self.data.delta_quat[idx][start_step:end_step]) euler_rot_out = np.array(self.data.rot_euler[idx][start_step:end_step]) if self.use_aa: delta_rot_out = np.array(self.data.delta_rot[idx][start_step:end_step]) if self.use_aa_split: delta_rot_split_out = np.array(self.data.delta_rot_split[idx][start_step:end_step]) if self.use_topple_idx: topple_label_out = np.zeros((num_steps), dtype=int) seq_topple_idx = self.data.topple_idx[idx] if seq_topple_idx > 0: if seq_topple_idx <= start_step: topple_label_out[:] = 1 elif seq_topple_idx < end_step: topple_label_out[seq_topple_idx-start_step:] = 1 # rotate point cloud to align with first frame of sequence init_rot = self.data.rot_euler[idx][start_step] xrot, yrot, zrot = np.radians(init_rot) R = transforms3d.euler.euler2mat(zrot, xrot, yrot, axes='szxy') # unity applies euler angles in z, x, y ordering pc = np.dot(pc, R.T) toppled = self.data.toppled[idx] shape_name = self.data.shape_name[idx] mass = self.data.mass[idx] body_fric = -1.0 if self.use_body_friction: body_fric = self.data.body_friction[idx] meta_info = (toppled, shape_name, scale, euler_rot_out, body_fric, mass) if not self.use_aa: delta_rot_out = None if not self.use_aa_split: delta_rot_split_out = None if not self.use_topple_idx: topple_label_out = None if not self.use_delta_quat: delta_quat_out = None return pc, lin_vel_out, ang_vel_out, pos_out, rot_out, delta_quat_out, delta_rot_out, delta_rot_split_out, topple_label_out, meta_info def get_norm_info(self): return self.norm_info if __name__=='__main__': # norm_info = ToppleNormalizationInfo() # norm_info.load_from('../../data/sim/normalization_info/cube_train.pkl') # norm_info.print_out() topple_data = ToppleDataset(roots=['./data/sim/Cube/Cube30k_ObjSplit/Cube30kVal'], norm_info_file='./data/sim/normalization_info/cube_30k.pkl', \ batch_size=5, num_steps=10, shuffle=True, num_pts=None, perturb_pts=0.01) count = 0 while topple_data.has_next_batch(): batch = topple_data.next_batch(random_window=True, focus_toppling=False) count += 1 # print(batch.lin_vel[0]) # print(batch.toppled[0]) # print(batch.delta_rot_split[0]) # print(batch.delta_rot[0]) # print(batch.topple_label[0]) # print(batch.pos) # print(batch.body_friction) # print(batch.delta_quat[0]) # print(np.degrees(2*np.arccos(batch.delta_quat[0, :, 0]))) print('Total num batches: ' + str(count)) topple_data.reset() count = 0 while topple_data.has_next_batch(): batch = topple_data.next_batch() count += 1 print(batch.size) print('Total num batches: ' + str(count))
[ 1, 1053, 12655, 408, 7442, 13, 5215, 5839, 280, 13, 3166, 2897, 29889, 2084, 1053, 4864, 29892, 1855, 2084, 13, 5215, 10876, 13, 5215, 5844, 13, 3166, 304, 407, 280, 29918, 1272, 29918, 12657, 1053, 1763, 407, 280, 1469, 29892, 1763, 407, 280, 1469, 10036, 13, 5215, 4327, 29879, 29941, 29881, 13, 13, 1990, 1763, 407, 280, 19077, 2133, 3401, 7295, 13, 1678, 14550, 13, 4706, 3767, 12425, 304, 4808, 599, 278, 4226, 2133, 2472, 363, 263, 8783, 29889, 13, 1678, 14550, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 396, 4236, 1543, 310, 738, 5608, 5343, 4608, 13, 4706, 1583, 29889, 3317, 29918, 1915, 29918, 955, 353, 6213, 13, 4706, 396, 4236, 1543, 310, 738, 6401, 5343, 4608, 13, 4706, 1583, 29889, 3317, 29918, 574, 29918, 955, 353, 6213, 13, 4706, 396, 4236, 5418, 1546, 11909, 297, 1023, 640, 5526, 681, 5335, 4196, 567, 13, 4706, 1583, 29889, 3317, 29918, 1066, 353, 6213, 13, 4706, 396, 4236, 1735, 297, 13733, 2820, 738, 9685, 1546, 1023, 640, 5526, 681, 5335, 4196, 567, 313, 1454, 321, 8584, 5731, 29897, 13, 4706, 1583, 29889, 3317, 29918, 5450, 353, 6213, 13, 4706, 396, 4236, 10696, 310, 13733, 1546, 1023, 6576, 363, 9685, 29899, 2521, 8954, 13, 4706, 1583, 29889, 3317, 29918, 4181, 29918, 5450, 353, 6213, 13, 4706, 396, 4236, 29871, 29906, 29899, 12324, 310, 7436, 2411, 19994, 4608, 13, 4706, 1583, 29889, 10118, 29918, 2003, 29918, 3317, 353, 6213, 13, 4706, 396, 4236, 29871, 29906, 29899, 12324, 310, 263, 1298, 297, 385, 1203, 1298, 9570, 313, 3880, 363, 1298, 9570, 322, 4889, 926, 29897, 13, 4706, 1583, 29889, 6739, 29918, 3317, 353, 6213, 13, 4706, 396, 4226, 2133, 1819, 363, 8267, 29899, 12817, 6433, 13, 4706, 1583, 29889, 21518, 537, 29918, 10289, 353, 6213, 13, 4706, 1583, 29889, 21518, 537, 29918, 3317, 353, 6213, 13, 4706, 1583, 29889, 25379, 29918, 10289, 353, 6213, 13, 4706, 1583, 29889, 25379, 29918, 3317, 353, 6213, 13, 4706, 1583, 29889, 262, 814, 423, 29918, 10289, 353, 6213, 13, 4706, 1583, 29889, 262, 814, 423, 29918, 3317, 353, 6213, 13, 4706, 1583, 29889, 1341, 2463, 29918, 10289, 353, 6213, 13, 4706, 1583, 29889, 1341, 2463, 29918, 3317, 353, 6213, 13, 13, 1678, 822, 1596, 29918, 449, 29898, 1311, 1125, 13, 4706, 1596, 3319, 29915, 3317, 29918, 1915, 29918, 955, 29915, 584, 1583, 29889, 3317, 29918, 1915, 29918, 955, 29892, 525, 3317, 29918, 574, 29918, 955, 29915, 584, 1583, 29889, 3317, 29918, 574, 29918, 955, 29892, 525, 3317, 29918, 1066, 29915, 584, 1583, 29889, 3317, 29918, 1066, 29892, 320, 13, 1669, 525, 3317, 29918, 5450, 29915, 584, 1583, 29889, 3317, 29918, 5450, 29892, 525, 3317, 29918, 4181, 29918, 5450, 29915, 584, 1583, 29889, 3317, 29918, 4181, 29918, 5450, 29892, 525, 10118, 29918, 2003, 29918, 3317, 29915, 584, 1583, 29889, 10118, 29918, 2003, 29918, 3317, 29892, 525, 6739, 29918, 3317, 29915, 584, 1583, 29889, 6739, 29918, 3317, 29892, 320, 13, 1669, 525, 21518, 537, 29918, 2696, 29915, 584, 1583, 29889, 21518, 537, 29918, 10289, 29892, 525, 21518, 537, 29918, 3317, 29915, 584, 1583, 29889, 21518, 537, 29918, 3317, 29892, 525, 25379, 29918, 2696, 29915, 584, 1583, 29889, 25379, 29918, 10289, 29892, 320, 13, 1669, 525, 25379, 29918, 3317, 29915, 584, 1583, 29889, 25379, 29918, 3317, 29892, 525, 262, 814, 423, 29918, 2696, 29915, 584, 1583, 29889, 262, 814, 423, 29918, 10289, 29892, 525, 262, 814, 423, 29918, 3317, 29915, 584, 1583, 29889, 262, 814, 423, 29918, 3317, 29892, 320, 13, 18884, 525, 1341, 2463, 29918, 2696, 29915, 584, 1583, 29889, 1341, 2463, 29918, 10289, 29892, 525, 1341, 2463, 29918, 3317, 29915, 584, 1583, 29889, 1341, 2463, 29918, 3317, 13, 795, 5615, 13, 13, 1678, 822, 4078, 29898, 1311, 29892, 282, 6321, 29918, 1445, 1125, 13, 4706, 14550, 317, 5989, 4226, 2133, 5235, 1203, 304, 263, 6790, 869, 29886, 6321, 934, 29889, 14550, 13, 4706, 411, 1722, 29898, 29886, 6321, 29918, 1445, 29892, 525, 29893, 29890, 1495, 408, 285, 29901, 13, 9651, 5839, 280, 29889, 15070, 29898, 1311, 29892, 285, 29897, 13, 13, 1678, 822, 2254, 29918, 3166, 29898, 1311, 29892, 282, 6321, 29918, 1445, 1125, 13, 4706, 14550, 16012, 4226, 2133, 5235, 964, 445, 1203, 515, 263, 6790, 869, 29886, 6321, 934, 29889, 14550, 13, 4706, 411, 1722, 29898, 29886, 6321, 29918, 1445, 29892, 525, 6050, 1495, 408, 285, 29901, 13, 9651, 6056, 29918, 3888, 353, 5839, 280, 29889, 1359, 29898, 29888, 29897, 13, 9651, 1583, 29889, 8552, 29918, 3166, 29898, 12324, 29918, 3888, 29897, 13, 13, 1678, 822, 3509, 29918, 3166, 29898, 1311, 29892, 6056, 29918, 3888, 1125, 13, 4706, 14550, 13, 4706, 323, 6926, 1819, 515, 278, 2183, 4226, 2133, 5235, 1203, 322, 14591, 963, 304, 445, 697, 13, 4706, 14550, 13, 4706, 1583, 29889, 3317, 29918, 1915, 29918, 955, 353, 6056, 29918, 3888, 29889, 3317, 29918, 1915, 29918, 955, 13, 4706, 1583, 29889, 3317, 29918, 574, 29918, 955, 353, 6056, 29918, 3888, 29889, 3317, 29918, 574, 29918, 955, 13, 4706, 1583, 29889, 3317, 29918, 1066, 353, 6056, 29918, 3888, 29889, 3317, 29918, 1066, 13, 4706, 1583, 29889, 3317, 29918, 5450, 353, 6056, 29918, 3888, 29889, 3317, 29918, 5450, 13, 4706, 1018, 29901, 13, 9651, 1583, 29889, 3317, 29918, 4181, 29918, 5450, 353, 6056, 29918, 3888, 29889, 3317, 29918, 4181, 29918, 5450, 13, 4706, 5174, 29901, 13, 9651, 396, 2030, 6910, 310, 848, 1838, 29915, 29873, 505, 4236, 19471, 5731, 13, 9651, 1209, 13, 4706, 1583, 29889, 10118, 29918, 2003, 29918, 3317, 353, 6056, 29918, 3888, 29889, 10118, 29918, 2003, 29918, 3317, 13, 4706, 1583, 29889, 6739, 29918, 3317, 353, 6056, 29918, 3888, 29889, 6739, 29918, 3317, 13, 4706, 1583, 29889, 21518, 537, 29918, 10289, 353, 6056, 29918, 3888, 29889, 21518, 537, 29918, 10289, 13, 4706, 1583, 29889, 21518, 537, 29918, 3317, 353, 6056, 29918, 3888, 29889, 21518, 537, 29918, 3317, 13, 4706, 1583, 29889, 25379, 29918, 10289, 353, 6056, 29918, 3888, 29889, 25379, 29918, 10289, 13, 4706, 1583, 29889, 25379, 29918, 3317, 353, 6056, 29918, 3888, 29889, 25379, 29918, 3317, 13, 4706, 1583, 29889, 262, 814, 423, 29918, 10289, 353, 6056, 29918, 3888, 29889, 262, 814, 423, 29918, 10289, 13, 4706, 1583, 29889, 262, 814, 423, 29918, 3317, 353, 6056, 29918, 3888, 29889, 262, 814, 423, 29918, 3317, 13, 4706, 1018, 29901, 13, 9651, 1583, 29889, 1341, 2463, 29918, 10289, 353, 6056, 29918, 3888, 29889, 1341, 2463, 29918, 10289, 13, 9651, 1583, 29889, 1341, 2463, 29918, 3317, 353, 6056, 29918, 3888, 29889, 1341, 2463, 29918, 3317, 13, 4706, 5174, 29901, 13, 9651, 396, 2030, 1873, 1838, 29915, 29873, 505, 445, 13, 9651, 1209, 13, 13, 1990, 1763, 407, 280, 23145, 29898, 3318, 1125, 13, 1678, 14550, 13, 1678, 3767, 12425, 304, 4808, 263, 2323, 9853, 310, 848, 29889, 13, 1678, 14550, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 2159, 29892, 19359, 29918, 2435, 29892, 954, 29918, 16485, 1125, 13, 4706, 1583, 29889, 2311, 353, 2159, 13, 4706, 1583, 29889, 1949, 29918, 24530, 353, 19359, 29918, 2435, 13, 4706, 1583, 29889, 1949, 29918, 16485, 353, 954, 29918, 16485, 13, 13, 4706, 1583, 29889, 3149, 29918, 9274, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 16485, 29892, 29871, 29941, 876, 13, 4706, 1583, 29889, 1915, 29918, 955, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 24530, 29892, 29871, 29941, 876, 13, 4706, 1583, 29889, 574, 29918, 955, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 24530, 29892, 29871, 29941, 876, 13, 4706, 1583, 29889, 1066, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 24530, 29892, 29871, 29941, 876, 13, 4706, 396, 13299, 16109, 1230, 321, 8584, 23619, 13, 4706, 1583, 29889, 5450, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 24530, 29892, 29871, 29941, 876, 13, 4706, 396, 1735, 297, 13733, 297, 439, 25744, 291, 1634, 313, 29893, 29892, 921, 29892, 343, 29892, 503, 29897, 13, 4706, 1583, 29889, 4181, 29918, 339, 271, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 24530, 29892, 29871, 29946, 876, 13, 4706, 396, 1735, 297, 13733, 1546, 6576, 297, 9685, 29899, 2521, 1634, 313, 7052, 29881, 29871, 29941, 9649, 29897, 13, 4706, 1583, 29889, 4181, 29918, 5450, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 24530, 29892, 29871, 29941, 876, 13, 4706, 396, 1735, 297, 13733, 1546, 6576, 297, 6219, 9685, 29899, 2521, 1634, 313, 29946, 29899, 2003, 29897, 13, 4706, 1583, 29889, 4181, 29918, 5450, 29918, 5451, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 24530, 29892, 29871, 29946, 876, 13, 13, 4706, 396, 29871, 29900, 565, 1434, 304, 407, 280, 22645, 29892, 29871, 29896, 565, 1156, 13, 4706, 1583, 29889, 517, 407, 280, 29918, 1643, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 24530, 511, 26688, 29922, 524, 29897, 13, 13, 4706, 396, 916, 12700, 29899, 1272, 451, 4153, 1304, 297, 3564, 13, 4706, 1583, 29889, 517, 407, 839, 353, 5159, 13, 4706, 1583, 29889, 12181, 29918, 978, 353, 5159, 13, 4706, 1583, 29889, 2587, 29918, 1341, 2463, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 876, 13, 4706, 1583, 29889, 25379, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 876, 13, 4706, 1583, 29889, 7052, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 29871, 29941, 876, 13, 4706, 1583, 29889, 5450, 29918, 29872, 8584, 353, 7442, 29889, 3298, 359, 3552, 1311, 29889, 2311, 29892, 1583, 29889, 1949, 29918, 24530, 29892, 29871, 29941, 876, 13, 13, 1990, 1763, 407, 280, 16390, 24541, 29898, 3318, 1125, 13, 1678, 14550, 13, 1678, 4309, 7925, 304, 407, 1847, 848, 322, 8128, 9853, 267, 363, 6694, 322, 1904, 17983, 29889, 13, 1678, 14550, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 16778, 29892, 6056, 29918, 3888, 29918, 1445, 29892, 9853, 29918, 2311, 29922, 29941, 29906, 29892, 954, 29918, 24530, 29922, 29896, 29945, 29892, 528, 21897, 29922, 8824, 29892, 954, 29918, 16485, 29922, 8516, 29892, 22786, 29918, 16485, 29922, 29900, 29889, 29900, 1125, 13, 4706, 14550, 13, 4706, 448, 16778, 584, 1051, 310, 17525, 6943, 848, 304, 2254, 363, 445, 8783, 13, 4706, 448, 6056, 29918, 3888, 29918, 1445, 584, 869, 29886, 6321, 934, 6943, 4226, 2133, 2472, 13, 4706, 448, 9853, 29918, 2311, 584, 1353, 310, 15602, 304, 736, 297, 1269, 9853, 13, 4706, 448, 954, 29918, 24530, 584, 1353, 310, 5335, 4196, 567, 304, 736, 297, 1269, 5665, 13, 4706, 448, 528, 21897, 584, 20459, 528, 3096, 793, 278, 4133, 5665, 20520, 13, 4706, 448, 954, 29918, 16485, 584, 278, 1353, 310, 3291, 304, 671, 297, 278, 4133, 1298, 9570, 29889, 960, 6213, 3913, 599, 3291, 297, 278, 848, 29889, 13, 4706, 448, 22786, 29918, 16485, 584, 278, 380, 3359, 304, 20459, 22786, 1298, 27091, 411, 29889, 960, 6213, 694, 22786, 362, 338, 8560, 29889, 13, 4706, 448, 29871, 13, 4706, 14550, 13, 4706, 396, 6055, 13, 4706, 1583, 29889, 16175, 29918, 2311, 353, 9853, 29918, 2311, 13, 4706, 1583, 29889, 24530, 29918, 546, 29918, 11762, 353, 954, 29918, 24530, 13, 4706, 1583, 29889, 845, 21897, 353, 528, 21897, 13, 4706, 1583, 29889, 10700, 9265, 29918, 4172, 353, 22786, 29918, 16485, 13, 4706, 1583, 29889, 1949, 29918, 16485, 353, 954, 29918, 16485, 13, 13, 4706, 396, 2254, 297, 848, 13, 4706, 363, 3876, 297, 16778, 29901, 13, 9651, 565, 451, 4864, 29898, 4632, 1125, 13, 18884, 1596, 877, 23323, 451, 1284, 8783, 472, 525, 718, 3876, 29897, 13, 18884, 736, 13, 4706, 848, 29918, 12657, 353, 1763, 407, 280, 1469, 10036, 580, 13, 4706, 1583, 29889, 1272, 353, 848, 29918, 12657, 29889, 1359, 29918, 1272, 29898, 307, 1862, 29897, 13, 13, 4706, 565, 954, 29918, 16485, 338, 6213, 29901, 13, 9651, 396, 671, 599, 278, 3291, 297, 278, 1298, 9570, 13, 9651, 1583, 29889, 1949, 29918, 16485, 353, 1583, 29889, 1272, 29889, 3149, 29918, 9274, 29889, 12181, 29961, 29896, 29962, 13, 13, 4706, 396, 2254, 297, 4226, 2133, 5235, 13, 4706, 565, 451, 4864, 29898, 12324, 29918, 3888, 29918, 1445, 1125, 13, 9651, 1596, 877, 23323, 451, 1284, 4226, 2133, 5235, 472, 525, 718, 6056, 29918, 3888, 29918, 1445, 29897, 13, 9651, 736, 13, 4706, 1583, 29889, 12324, 29918, 3888, 353, 1763, 407, 280, 19077, 2133, 3401, 580, 13, 4706, 1583, 29889, 12324, 29918, 3888, 29889, 1359, 29918, 3166, 29898, 12324, 29918, 3888, 29918, 1445, 29897, 13, 4706, 1596, 877, 29147, 4226, 2133, 5235, 29991, 1495, 13, 13, 4706, 396, 1074, 565, 591, 505, 9685, 29899, 2521, 5235, 313, 1454, 28953, 10007, 29897, 13, 4706, 1583, 29889, 1509, 29918, 7340, 353, 7700, 13, 4706, 1583, 29889, 1509, 29918, 7340, 29918, 5451, 353, 7700, 13, 4706, 1583, 29889, 1509, 29918, 517, 407, 280, 29918, 13140, 353, 7700, 13, 4706, 1583, 29889, 1509, 29918, 4181, 29918, 339, 271, 353, 7700, 13, 4706, 565, 7431, 29898, 1311, 29889, 1272, 29889, 4181, 29918, 5450, 29897, 1405, 29871, 29900, 29901, 13, 9651, 1583, 29889, 1509, 29918, 7340, 353, 5852, 13, 4706, 565, 7431, 29898, 1311, 29889, 1272, 29889, 4181, 29918, 5450, 29918, 5451, 29897, 1405, 29871, 29900, 29901, 13, 9651, 1583, 29889, 1509, 29918, 7340, 29918, 5451, 353, 5852, 13, 4706, 565, 7431, 29898, 1311, 29889, 1272, 29889, 517, 407, 280, 29918, 13140, 29897, 1405, 29871, 29900, 29901, 13, 9651, 1583, 29889, 1509, 29918, 517, 407, 280, 29918, 13140, 353, 5852, 13, 4706, 565, 7431, 29898, 1311, 29889, 1272, 29889, 2587, 29918, 1341, 2463, 29897, 1405, 29871, 29900, 29901, 13, 9651, 1583, 29889, 1509, 29918, 2587, 29918, 1341, 2463, 353, 5852, 13, 4706, 565, 7431, 29898, 1311, 29889, 1272, 29889, 4181, 29918, 339, 271, 29897, 1405, 29871, 29900, 29901, 13, 9651, 1583, 29889, 1509, 29918, 4181, 29918, 339, 271, 353, 5852, 13, 13, 4706, 396, 4226, 675, 278, 848, 13, 4706, 1596, 877, 19077, 5281, 848, 856, 1495, 13, 4706, 1583, 29889, 8945, 675, 29918, 1272, 29898, 1311, 29889, 1272, 29892, 1583, 29889, 12324, 29918, 3888, 29897, 13, 4706, 1596, 877, 12881, 3276, 4226, 5281, 29991, 1495, 13, 13, 4706, 396, 1797, 304, 13649, 1549, 848, 746, 7863, 9853, 267, 313, 262, 1797, 491, 2322, 29897, 13, 4706, 1583, 29889, 1524, 29918, 12772, 353, 3464, 29898, 29900, 29892, 1583, 29889, 1272, 29889, 2311, 29897, 13, 13, 4706, 396, 19012, 304, 13649, 1549, 13, 4706, 1583, 29889, 12071, 580, 13, 13, 1678, 822, 4226, 675, 29918, 1272, 29898, 1311, 29892, 848, 29892, 6056, 29918, 3888, 1125, 13, 4706, 14550, 13, 4706, 21981, 7093, 313, 262, 2058, 29897, 278, 2183, 1763, 407, 280, 1469, 773, 278, 1763, 407, 280, 19077, 2133, 3401, 29889, 13, 4706, 14550, 13, 4706, 396, 1298, 27091, 1599, 21069, 29896, 29892, 29871, 29896, 29962, 13, 4706, 848, 29889, 3149, 29918, 9274, 847, 29922, 6056, 29918, 3888, 29889, 6739, 29918, 3317, 13, 4706, 396, 4889, 926, 1599, 21069, 29896, 29892, 29871, 29896, 29962, 13, 4706, 848, 29889, 10118, 29918, 1066, 847, 29922, 6056, 29918, 3888, 29889, 6739, 29918, 3317, 13, 4706, 396, 4889, 9649, 1599, 21069, 29896, 29892, 29871, 29896, 29962, 13, 4706, 848, 29889, 10118, 29918, 2003, 847, 29922, 6056, 29918, 3888, 29889, 10118, 29918, 2003, 29918, 3317, 13, 4706, 396, 9027, 1599, 518, 29900, 29892, 29871, 29896, 29962, 13, 4706, 848, 29889, 21518, 537, 353, 313, 1272, 29889, 21518, 537, 448, 6056, 29918, 3888, 29889, 21518, 537, 29918, 10289, 29897, 847, 6056, 29918, 3888, 29889, 21518, 537, 29918, 3317, 13, 4706, 396, 4158, 1599, 518, 29900, 29892, 29871, 29896, 29962, 13, 4706, 848, 29889, 25379, 353, 313, 1272, 29889, 25379, 448, 6056, 29918, 3888, 29889, 25379, 29918, 10289, 29897, 847, 6056, 29918, 3888, 29889, 25379, 29918, 3317, 29871, 13, 4706, 396, 297, 814, 423, 1599, 518, 29900, 29892, 29871, 29896, 29962, 13, 4706, 848, 29889, 262, 814, 423, 353, 313, 1272, 29889, 262, 814, 423, 448, 6056, 29918, 3888, 29889, 262, 814, 423, 29918, 10289, 29897, 847, 6056, 29918, 3888, 29889, 262, 814, 423, 29918, 3317, 13, 4706, 396, 1424, 2463, 1599, 518, 29900, 29892, 29871, 29896, 29962, 13, 4706, 565, 6056, 29918, 3888, 29889, 1341, 2463, 29918, 10289, 338, 451, 6213, 29901, 13, 9651, 848, 29889, 2587, 29918, 1341, 2463, 353, 313, 1272, 29889, 2587, 29918, 1341, 2463, 448, 6056, 29918, 3888, 29889, 1341, 2463, 29918, 10289, 29897, 847, 6056, 29918, 3888, 29889, 1341, 2463, 29918, 3317, 13, 13, 4706, 396, 1286, 931, 5665, 848, 13, 4706, 396, 9110, 1907, 1599, 21069, 29896, 29892, 29871, 29896, 29962, 13, 4706, 363, 474, 29892, 6276, 29918, 955, 29918, 24530, 297, 26985, 29898, 1272, 29889, 1915, 29918, 955, 1125, 13, 9651, 848, 29889, 1915, 29918, 955, 29961, 29875, 29962, 353, 17288, 29916, 847, 6056, 29918, 3888, 29889, 3317, 29918, 1915, 29918, 955, 29897, 363, 921, 297, 6276, 29918, 955, 29918, 24530, 29962, 13, 4706, 363, 474, 29892, 2614, 29918, 955, 29918, 24530, 297, 26985, 29898, 1272, 29889, 574, 29918, 955, 1125, 13, 9651, 848, 29889, 574, 29918, 955, 29961, 29875, 29962, 353, 17288, 29916, 847, 6056, 29918, 3888, 29889, 3317, 29918, 574, 29918, 955, 29897, 363, 921, 297, 2614, 29918, 955, 29918, 24530, 29962, 13, 4706, 396, 19471, 2602, 1599, 21069, 29896, 29892, 29871, 29896, 29962, 13, 4706, 363, 474, 29892, 926, 29918, 24530, 297, 26985, 29898, 1272, 29889, 1066, 1125, 13, 9651, 848, 29889, 1066, 29961, 29875, 29962, 353, 17288, 29916, 847, 6056, 29918, 3888, 29889, 3317, 29918, 1066, 29897, 363, 921, 297, 926, 29918, 24530, 29962, 13, 4706, 396, 19471, 13733, 1599, 21069, 29896, 29892, 29871, 29896, 29962, 13, 4706, 363, 474, 29892, 5731, 29918, 24530, 297, 26985, 29898, 1272, 29889, 7827, 29918, 5450, 1125, 13, 9651, 848, 29889, 7827, 29918, 5450, 29961, 29875, 29962, 353, 17288, 29916, 847, 6056, 29918, 3888, 29889, 3317, 29918, 5450, 29897, 363, 921, 297, 5731, 29918, 24530, 29962, 13, 4706, 396, 19471, 5731, 9685, 29899, 2521, 1599, 21069, 29896, 29892, 29871, 29896, 29962, 6056, 13, 4706, 565, 1583, 29889, 1509, 29918, 7340, 29901, 13, 9651, 363, 474, 29892, 19471, 29918, 5450, 29918, 24530, 297, 26985, 29898, 1272, 29889, 4181, 29918, 5450, 1125, 13, 18884, 848, 29889, 4181, 29918, 5450, 29961, 29875, 29962, 353, 17288, 29916, 847, 6056, 29918, 3888, 29889, 3317, 29918, 4181, 29918, 5450, 29897, 363, 921, 297, 19471, 29918, 5450, 29918, 24530, 29962, 13, 4706, 396, 1207, 27815, 5190, 322, 322, 4226, 675, 10696, 1599, 21069, 29896, 29892, 29871, 29896, 29962, 13, 4706, 565, 1583, 29889, 1509, 29918, 7340, 29918, 5451, 29901, 13, 9651, 363, 474, 29892, 19471, 29918, 5450, 29918, 5451, 29918, 24530, 297, 26985, 29898, 1272, 29889, 4181, 29918, 5450, 29918, 5451, 1125, 13, 18884, 848, 29889, 4181, 29918, 5450, 29918, 5451, 29961, 29875, 29962, 353, 518, 9302, 29889, 4397, 29898, 29916, 7503, 29941, 29962, 847, 7442, 29889, 29880, 979, 29887, 29889, 12324, 29898, 29916, 7503, 29941, 11724, 921, 29961, 29941, 29962, 847, 6056, 29918, 3888, 29889, 3317, 29918, 4181, 29918, 5450, 29897, 363, 921, 297, 19471, 29918, 5450, 29918, 5451, 29918, 24530, 29962, 13, 462, 13, 1678, 822, 10092, 29898, 1311, 1125, 13, 4706, 14550, 13, 4706, 4721, 862, 267, 304, 13649, 1549, 8783, 29889, 13, 4706, 14550, 13, 4706, 565, 1583, 29889, 845, 21897, 29901, 13, 9651, 7442, 29889, 8172, 29889, 845, 21897, 29898, 1311, 29889, 1524, 29918, 12772, 29897, 13, 4706, 396, 591, 2050, 385, 21502, 305, 408, 7863, 697, 5665, 515, 1432, 2323, 17402, 13, 4706, 396, 313, 2466, 565, 278, 5665, 3309, 338, 20511, 1135, 1027, 3309, 278, 5412, 15602, 11122, 13, 4706, 396, 29871, 297, 278, 8783, 674, 367, 1568, 901, 1135, 385, 21502, 305, 3309, 1723, 13, 4706, 1583, 29889, 1949, 29918, 16175, 267, 353, 313, 1311, 29889, 1272, 29889, 2311, 718, 1583, 29889, 16175, 29918, 2311, 448, 29871, 29896, 29897, 849, 1583, 29889, 16175, 29918, 2311, 13, 4706, 1583, 29889, 16175, 29918, 13140, 353, 29871, 29900, 13, 13, 1678, 822, 756, 29918, 4622, 29918, 16175, 29898, 1311, 1125, 13, 4706, 14550, 13, 4706, 16969, 2089, 565, 2309, 411, 278, 1857, 376, 1022, 2878, 29908, 313, 28026, 1269, 1027, 2748, 467, 13, 4706, 14550, 13, 4706, 736, 1583, 29889, 16175, 29918, 13140, 529, 1583, 29889, 1949, 29918, 16175, 267, 13, 13, 1678, 822, 2446, 29918, 16175, 29898, 1311, 29892, 4036, 29918, 7165, 29922, 5574, 29892, 8569, 29918, 517, 407, 1847, 29922, 8824, 1125, 13, 4706, 14550, 13, 4706, 16969, 278, 2446, 9853, 310, 848, 29889, 565, 4036, 29918, 7165, 29922, 5574, 674, 679, 263, 4036, 5665, 310, 1959, 3309, 313, 1228, 3538, 13, 4706, 8665, 472, 29871, 29900, 467, 960, 8569, 29918, 517, 407, 1847, 29922, 5574, 29892, 674, 1207, 1854, 445, 5665, 7805, 278, 760, 310, 278, 5665, 988, 304, 407, 1847, 10008, 29889, 13, 4706, 14550, 13, 4706, 396, 2159, 338, 2845, 9853, 29918, 2311, 29892, 470, 20511, 565, 591, 29915, 276, 472, 278, 1095, 310, 278, 848, 13, 4706, 1369, 29918, 13140, 353, 1583, 29889, 16175, 29918, 13140, 334, 1583, 29889, 16175, 29918, 2311, 13, 4706, 1095, 29918, 13140, 353, 1375, 3552, 1311, 29889, 16175, 29918, 13140, 718, 29871, 29896, 29897, 334, 1583, 29889, 16175, 29918, 2311, 29892, 1583, 29889, 1272, 29889, 2311, 29897, 13, 4706, 9853, 29918, 2311, 353, 1095, 29918, 13140, 448, 1369, 29918, 13140, 13, 13, 4706, 396, 679, 9853, 848, 13, 4706, 9853, 353, 1763, 407, 280, 23145, 29898, 1311, 29889, 16175, 29918, 2311, 29892, 1583, 29889, 24530, 29918, 546, 29918, 11762, 29892, 1583, 29889, 1949, 29918, 16485, 29897, 13, 4706, 363, 474, 297, 3464, 29898, 16175, 29918, 2311, 1125, 13, 9651, 22844, 29892, 6276, 29918, 955, 29892, 2614, 29918, 955, 29892, 926, 29892, 5731, 29892, 19471, 29918, 339, 271, 29892, 19471, 29918, 5450, 29892, 19471, 29918, 5450, 29918, 5451, 29892, 304, 407, 280, 29918, 1643, 29892, 12700, 29918, 3888, 353, 320, 13, 462, 9651, 1583, 29889, 657, 29918, 11762, 29898, 1311, 29889, 1524, 29918, 12772, 29961, 2962, 29918, 13140, 718, 474, 1402, 1583, 29889, 24530, 29918, 546, 29918, 11762, 29892, 4036, 29918, 7165, 29892, 8569, 29918, 517, 407, 1847, 29897, 13, 9651, 9853, 29889, 3149, 29918, 9274, 29961, 29875, 29962, 353, 22844, 13, 9651, 9853, 29889, 1915, 29918, 955, 29961, 29875, 29962, 353, 6276, 29918, 955, 13, 9651, 9853, 29889, 574, 29918, 955, 29961, 29875, 29962, 353, 2614, 29918, 955, 13, 9651, 9853, 29889, 1066, 29961, 29875, 29962, 353, 926, 13, 9651, 9853, 29889, 5450, 29961, 29875, 29962, 353, 5731, 13, 9651, 565, 1583, 29889, 1509, 29918, 4181, 29918, 339, 271, 29901, 13, 18884, 9853, 29889, 4181, 29918, 339, 271, 29961, 29875, 29962, 353, 19471, 29918, 339, 271, 13, 9651, 565, 1583, 29889, 1509, 29918, 7340, 29901, 13, 18884, 9853, 29889, 4181, 29918, 5450, 29961, 29875, 29962, 353, 19471, 29918, 5450, 13, 9651, 565, 1583, 29889, 1509, 29918, 7340, 29918, 5451, 29901, 13, 18884, 9853, 29889, 4181, 29918, 5450, 29918, 5451, 29961, 29875, 29962, 353, 19471, 29918, 5450, 29918, 5451, 13, 9651, 565, 1583, 29889, 1509, 29918, 517, 407, 280, 29918, 13140, 29901, 13, 18884, 9853, 29889, 517, 407, 280, 29918, 1643, 29961, 29875, 29962, 353, 304, 407, 280, 29918, 1643, 13, 9651, 9853, 29889, 517, 407, 839, 29889, 4397, 29898, 7299, 29918, 3888, 29961, 29900, 2314, 13, 9651, 9853, 29889, 12181, 29918, 978, 29889, 4397, 29898, 7299, 29918, 3888, 29961, 29896, 2314, 13, 9651, 9853, 29889, 7052, 29961, 29875, 29962, 353, 12700, 29918, 3888, 29961, 29906, 29962, 13, 9651, 9853, 29889, 5450, 29918, 29872, 8584, 29961, 29875, 29962, 353, 12700, 29918, 3888, 29961, 29941, 29962, 13, 9651, 565, 1583, 29889, 1509, 29918, 2587, 29918, 1341, 2463, 29901, 13, 18884, 9853, 29889, 2587, 29918, 1341, 2463, 29961, 29875, 29962, 353, 12700, 29918, 3888, 29961, 29946, 29962, 13, 9651, 9853, 29889, 25379, 29961, 29875, 29962, 353, 12700, 29918, 3888, 29961, 29945, 29962, 13, 13, 4706, 565, 9853, 29918, 2311, 2804, 1583, 29889, 16175, 29918, 2311, 29901, 13, 9651, 396, 817, 304, 17132, 278, 1095, 411, 12312, 310, 848, 13, 9651, 363, 474, 297, 3464, 29898, 1311, 29889, 16175, 29918, 2311, 448, 9853, 29918, 2311, 1125, 13, 18884, 9853, 29889, 3149, 29918, 9274, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 3149, 29918, 9274, 29961, 29875, 29962, 13, 18884, 9853, 29889, 1915, 29918, 955, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 1915, 29918, 955, 29961, 29875, 29962, 13, 18884, 9853, 29889, 574, 29918, 955, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 574, 29918, 955, 29961, 29875, 29962, 13, 18884, 9853, 29889, 1066, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 1066, 29961, 29875, 29962, 13, 18884, 9853, 29889, 5450, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 5450, 29961, 29875, 29962, 13, 18884, 565, 1583, 29889, 1509, 29918, 4181, 29918, 339, 271, 29901, 13, 462, 1678, 9853, 29889, 4181, 29918, 339, 271, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 4181, 29918, 339, 271, 29961, 29875, 29962, 13, 18884, 9853, 29889, 517, 407, 839, 29889, 4397, 29898, 16175, 29889, 517, 407, 839, 29961, 29875, 2314, 13, 18884, 9853, 29889, 12181, 29918, 978, 29889, 4397, 29898, 16175, 29889, 12181, 29918, 978, 29961, 29875, 2314, 13, 18884, 9853, 29889, 7052, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 7052, 29961, 29875, 29962, 13, 18884, 9853, 29889, 5450, 29918, 29872, 8584, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 5450, 29918, 29872, 8584, 29961, 29875, 29962, 13, 18884, 9853, 29889, 25379, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 25379, 29961, 29875, 29962, 13, 18884, 565, 1583, 29889, 1509, 29918, 7340, 29901, 13, 462, 1678, 9853, 29889, 4181, 29918, 5450, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 4181, 29918, 5450, 29961, 29875, 29962, 13, 18884, 565, 1583, 29889, 1509, 29918, 7340, 29918, 5451, 29901, 13, 462, 1678, 9853, 29889, 4181, 29918, 5450, 29918, 5451, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 4181, 29918, 5450, 29918, 5451, 29961, 29875, 29962, 13, 18884, 565, 1583, 29889, 1509, 29918, 517, 407, 280, 29918, 13140, 29901, 13, 462, 1678, 9853, 29889, 517, 407, 280, 29918, 1643, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 517, 407, 280, 29918, 1643, 29961, 29875, 29962, 13, 18884, 565, 1583, 29889, 1509, 29918, 2587, 29918, 1341, 2463, 29901, 13, 462, 1678, 9853, 29889, 2587, 29918, 1341, 2463, 29961, 16175, 29918, 2311, 718, 474, 29962, 353, 9853, 29889, 2587, 29918, 1341, 2463, 29961, 29875, 29962, 13, 13, 4706, 1583, 29889, 16175, 29918, 13140, 4619, 29871, 29896, 13, 13, 4706, 736, 9853, 13, 13, 1678, 822, 679, 29918, 11762, 29898, 1311, 29892, 22645, 29892, 954, 29918, 24530, 29892, 4036, 29918, 7165, 29922, 5574, 29892, 8569, 29918, 517, 407, 1847, 29922, 8824, 1125, 13, 4706, 14550, 13, 4706, 16969, 263, 4036, 640, 5526, 681, 5665, 515, 278, 17402, 472, 278, 2183, 22645, 322, 3309, 954, 29918, 24530, 29889, 13, 4706, 960, 954, 29918, 24530, 1405, 1027, 29918, 2848, 278, 2186, 313, 3601, 29918, 2848, 29899, 1949, 29918, 24530, 29897, 6576, 526, 282, 23959, 411, 278, 995, 472, 13, 4706, 1027, 29961, 3601, 29918, 2848, 1822, 29871, 13, 4706, 14550, 13, 4706, 396, 679, 278, 4226, 1891, 24420, 1298, 9570, 363, 445, 17402, 13, 4706, 22844, 353, 7442, 29889, 8552, 29898, 1311, 29889, 1272, 29889, 3149, 29918, 9274, 29961, 1311, 29889, 1272, 29889, 12181, 29918, 13140, 29961, 13140, 24960, 13, 4706, 6287, 353, 1583, 29889, 1272, 29889, 7052, 29961, 13140, 29962, 13, 4706, 396, 6287, 16205, 13, 4706, 22844, 334, 29922, 7442, 29889, 690, 14443, 29898, 7052, 29892, 313, 29896, 29892, 448, 29896, 876, 13, 4706, 396, 20459, 22786, 1298, 9570, 13, 4706, 22844, 4619, 7442, 29889, 8172, 29889, 8945, 29898, 29900, 29889, 29900, 29892, 1583, 29889, 10700, 9265, 29918, 4172, 29892, 22844, 29889, 12181, 29897, 13, 13, 4706, 396, 20459, 4216, 263, 11306, 310, 3291, 565, 7429, 13, 4706, 565, 1583, 29889, 1949, 29918, 16485, 529, 22844, 29889, 12181, 29961, 29900, 5387, 13, 9651, 22844, 29918, 12772, 353, 7442, 29889, 8172, 29889, 16957, 29898, 6739, 29889, 12181, 29961, 29900, 1402, 1583, 29889, 1949, 29918, 16485, 29892, 5191, 29922, 8824, 29897, 13, 9651, 22844, 353, 22844, 29961, 6739, 29918, 12772, 29892, 584, 29962, 13, 13, 4706, 396, 20459, 6755, 263, 2159, 954, 29918, 24530, 5665, 515, 278, 17402, 304, 736, 931, 29899, 13757, 848, 13, 4706, 3001, 29918, 24530, 353, 7431, 29898, 1311, 29889, 1272, 29889, 1915, 29918, 955, 29961, 13140, 2314, 13, 4706, 4236, 29918, 2962, 29918, 10568, 353, 3001, 29918, 24530, 448, 954, 29918, 24530, 13, 4706, 1369, 29918, 10568, 353, 29871, 29900, 13, 4706, 565, 4236, 29918, 2962, 29918, 10568, 529, 29871, 29900, 29901, 13, 9651, 396, 17402, 338, 20511, 1135, 7429, 5665, 3309, 13, 9651, 17132, 29918, 2435, 353, 6425, 29898, 3317, 29918, 2962, 29918, 10568, 29897, 13, 9651, 6276, 29918, 955, 29918, 1761, 353, 1583, 29889, 1272, 29889, 1915, 29918, 955, 29961, 13140, 29962, 13, 9651, 6276, 29918, 955, 29918, 449, 353, 7442, 29889, 2378, 29898, 1915, 29918, 955, 29918, 1761, 718, 518, 1915, 29918, 955, 29918, 1761, 14352, 29896, 5262, 29930, 8305, 29918, 2435, 29897, 13, 9651, 2614, 29918, 955, 29918, 1761, 353, 1583, 29889, 1272, 29889, 574, 29918, 955, 29961, 13140, 29962, 13, 9651, 2614, 29918, 955, 29918, 449, 353, 7442, 29889, 2378, 29898, 574, 29918, 955, 29918, 1761, 718, 518, 574, 29918, 955, 29918, 1761, 14352, 29896, 5262, 29930, 8305, 29918, 2435, 29897, 13, 9651, 926, 29918, 1761, 353, 1583, 29889, 1272, 29889, 1066, 29961, 13140, 29962, 13, 9651, 926, 29918, 449, 353, 7442, 29889, 2378, 29898, 1066, 29918, 1761, 718, 518, 1066, 29918, 1761, 14352, 29896, 5262, 29930, 8305, 29918, 2435, 29897, 13, 9651, 5731, 29918, 1761, 353, 1583, 29889, 1272, 29889, 7827, 29918, 5450, 29961, 13140, 29962, 13, 9651, 5731, 29918, 449, 353, 7442, 29889, 2378, 29898, 5450, 29918, 1761, 718, 518, 5450, 29918, 1761, 14352, 29896, 5262, 29930, 8305, 29918, 2435, 29897, 13, 9651, 565, 1583, 29889, 1509, 29918, 4181, 29918, 339, 271, 29901, 13, 18884, 19471, 29918, 339, 271, 29918, 1761, 353, 1583, 29889, 1272, 29889, 4181, 29918, 339, 271, 29961, 13140, 29962, 13, 18884, 19471, 29918, 339, 271, 29918, 449, 353, 7442, 29889, 2378, 29898, 4181, 29918, 339, 271, 29918, 1761, 718, 518, 4181, 29918, 339, 271, 29918, 1761, 14352, 29896, 5262, 29930, 8305, 29918, 2435, 29897, 13, 9651, 321, 8584, 29918, 5450, 29918, 1761, 353, 1583, 29889, 1272, 29889, 5450, 29918, 29872, 8584, 29961, 13140, 29962, 13, 9651, 321, 8584, 29918, 5450, 29918, 449, 353, 7442, 29889, 2378, 29898, 29872, 8584, 29918, 5450, 29918, 1761, 718, 518, 29872, 8584, 29918, 5450, 29918, 1761, 14352, 29896, 5262, 29930, 8305, 29918, 2435, 29897, 13, 9651, 565, 1583, 29889, 1509, 29918, 7340, 29901, 13, 18884, 19471, 29918, 5450, 29918, 1761, 353, 1583, 29889, 1272, 29889, 4181, 29918, 5450, 29961, 13140, 29962, 13, 18884, 19471, 29918, 5450, 29918, 449, 353, 7442, 29889, 2378, 29898, 4181, 29918, 5450, 29918, 1761, 718, 518, 4181, 29918, 5450, 29918, 1761, 14352, 29896, 5262, 29930, 8305, 29918, 2435, 29897, 13, 9651, 565, 1583, 29889, 1509, 29918, 7340, 29918, 5451, 29901, 13, 18884, 19471, 29918, 5450, 29918, 5451, 29918, 1761, 353, 1583, 29889, 1272, 29889, 4181, 29918, 5450, 29918, 5451, 29961, 13140, 29962, 13, 18884, 19471, 29918, 5450, 29918, 5451, 29918, 449, 353, 7442, 29889, 2378, 29898, 4181, 29918, 5450, 29918, 5451, 29918, 1761, 718, 518, 4181, 29918, 5450, 29918, 5451, 29918, 1761, 14352, 29896, 5262, 29930, 8305, 29918, 2435, 29897, 13, 9651, 565, 1583, 29889, 1509, 29918, 517, 407, 280, 29918, 13140, 29901, 13, 18884, 304, 407, 280, 29918, 1643, 29918, 449, 353, 7442, 29889, 3298, 359, 3552, 7827, 29918, 24530, 718, 17132, 29918, 2435, 511, 26688, 29922, 524, 29897, 13, 18884, 19359, 29918, 517, 407, 280, 29918, 13140, 353, 1583, 29889, 1272, 29889, 517, 407, 280, 29918, 13140, 29961, 13140, 29962, 13, 18884, 565, 19359, 29918, 517, 407, 280, 29918, 13140, 1405, 29871, 29900, 29901, 13, 462, 1678, 304, 407, 280, 29918, 1643, 29918, 449, 29961, 11762, 29918, 517, 407, 280, 29918, 13140, 17531, 353, 29871, 29896, 13, 4706, 1683, 29901, 13, 9651, 1369, 29918, 10568, 353, 29871, 29900, 13, 9651, 565, 4036, 29918, 7165, 29901, 13, 18884, 565, 8569, 29918, 517, 407, 1847, 322, 1583, 29889, 1272, 29889, 517, 407, 839, 29961, 13140, 5387, 13, 462, 1678, 396, 6755, 3474, 2820, 278, 2380, 988, 372, 304, 407, 793, 13, 462, 1678, 304, 407, 280, 29918, 13140, 353, 1583, 29889, 1272, 29889, 517, 407, 280, 29918, 13140, 29961, 13140, 29962, 13, 462, 1678, 1375, 29918, 13140, 353, 4236, 4197, 517, 407, 280, 29918, 13140, 448, 954, 29918, 24530, 718, 29871, 29896, 29892, 29871, 29900, 2314, 13, 462, 1678, 565, 1375, 29918, 13140, 6736, 4236, 29918, 2962, 29918, 10568, 29901, 13, 462, 4706, 396, 925, 5839, 278, 4236, 2380, 13, 462, 4706, 1369, 29918, 10568, 353, 4236, 29918, 2962, 29918, 10568, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 396, 1749, 3474, 338, 22688, 304, 1074, 777, 760, 310, 304, 407, 1847, 13, 462, 4706, 1369, 29918, 10568, 353, 7442, 29889, 8172, 29889, 9502, 524, 29898, 1195, 29918, 13140, 29892, 4236, 29918, 2962, 29918, 10568, 29974, 29896, 29897, 13, 18884, 1683, 29901, 13, 462, 1678, 1369, 29918, 10568, 353, 7442, 29889, 8172, 29889, 9502, 524, 29898, 29900, 29892, 4236, 29918, 2962, 29918, 10568, 29974, 29896, 29897, 13, 9651, 1095, 29918, 10568, 353, 1369, 29918, 10568, 718, 954, 29918, 24530, 13, 9651, 396, 1596, 877, 6069, 29901, 1273, 29881, 29892, 1273, 29881, 29915, 1273, 313, 2962, 29918, 10568, 29892, 1095, 29918, 10568, 876, 13, 9651, 6276, 29918, 955, 29918, 449, 353, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 29889, 1915, 29918, 955, 29961, 13140, 3816, 2962, 29918, 10568, 29901, 355, 29918, 10568, 2314, 13, 9651, 2614, 29918, 955, 29918, 449, 353, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 29889, 574, 29918, 955, 29961, 13140, 3816, 2962, 29918, 10568, 29901, 355, 29918, 10568, 2314, 13, 9651, 926, 29918, 449, 353, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 29889, 1066, 29961, 13140, 3816, 2962, 29918, 10568, 29901, 355, 29918, 10568, 2314, 13, 9651, 5731, 29918, 449, 353, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 29889, 7827, 29918, 5450, 29961, 13140, 3816, 2962, 29918, 10568, 29901, 355, 29918, 10568, 2314, 13, 9651, 565, 1583, 29889, 1509, 29918, 4181, 29918, 339, 271, 29901, 13, 18884, 19471, 29918, 339, 271, 29918, 449, 353, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 29889, 4181, 29918, 339, 271, 29961, 13140, 3816, 2962, 29918, 10568, 29901, 355, 29918, 10568, 2314, 13, 9651, 321, 8584, 29918, 5450, 29918, 449, 353, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 29889, 5450, 29918, 29872, 8584, 29961, 13140, 3816, 2962, 29918, 10568, 29901, 355, 29918, 10568, 2314, 13, 9651, 565, 1583, 29889, 1509, 29918, 7340, 29901, 13, 18884, 19471, 29918, 5450, 29918, 449, 353, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 29889, 4181, 29918, 5450, 29961, 13140, 3816, 2962, 29918, 10568, 29901, 355, 29918, 10568, 2314, 13, 9651, 565, 1583, 29889, 1509, 29918, 7340, 29918, 5451, 29901, 13, 18884, 19471, 29918, 5450, 29918, 5451, 29918, 449, 353, 7442, 29889, 2378, 29898, 1311, 29889, 1272, 29889, 4181, 29918, 5450, 29918, 5451, 29961, 13140, 3816, 2962, 29918, 10568, 29901, 355, 29918, 10568, 2314, 13, 9651, 565, 1583, 29889, 1509, 29918, 517, 407, 280, 29918, 13140, 29901, 13, 18884, 304, 407, 280, 29918, 1643, 29918, 449, 353, 7442, 29889, 3298, 359, 3552, 1949, 29918, 24530, 511, 26688, 29922, 524, 29897, 13, 18884, 19359, 29918, 517, 407, 280, 29918, 13140, 353, 1583, 29889, 1272, 29889, 517, 407, 280, 29918, 13140, 29961, 13140, 29962, 13, 18884, 565, 19359, 29918, 517, 407, 280, 29918, 13140, 1405, 29871, 29900, 29901, 13, 462, 1678, 565, 19359, 29918, 517, 407, 280, 29918, 13140, 5277, 1369, 29918, 10568, 29901, 13, 462, 4706, 304, 407, 280, 29918, 1643, 29918, 449, 7503, 29962, 353, 29871, 29896, 13, 462, 1678, 25342, 19359, 29918, 517, 407, 280, 29918, 13140, 529, 1095, 29918, 10568, 29901, 13, 462, 4706, 304, 407, 280, 29918, 1643, 29918, 449, 29961, 11762, 29918, 517, 407, 280, 29918, 13140, 29899, 2962, 29918, 10568, 17531, 353, 29871, 29896, 13, 13, 4706, 396, 16734, 1298, 9570, 304, 7595, 411, 937, 3515, 310, 5665, 13, 4706, 2069, 29918, 5450, 353, 1583, 29889, 1272, 29889, 5450, 29918, 29872, 8584, 29961, 13140, 3816, 2962, 29918, 10568, 29962, 13, 4706, 921, 5450, 29892, 343, 5450, 29892, 503, 5450, 353, 7442, 29889, 3665, 5834, 29898, 2344, 29918, 5450, 29897, 13, 4706, 390, 353, 4327, 29879, 29941, 29881, 29889, 29872, 8584, 29889, 29872, 8584, 29906, 2922, 29898, 29920, 5450, 29892, 921, 5450, 29892, 343, 5450, 29892, 27815, 2433, 3616, 3594, 1495, 396, 20107, 16058, 321, 8584, 23619, 297, 503, 29892, 921, 29892, 343, 20520, 13, 4706, 22844, 353, 7442, 29889, 6333, 29898, 6739, 29892, 390, 29889, 29911, 29897, 13, 13, 4706, 304, 407, 839, 353, 1583, 29889, 1272, 29889, 517, 407, 839, 29961, 13140, 29962, 13, 4706, 8267, 29918, 978, 353, 1583, 29889, 1272, 29889, 12181, 29918, 978, 29961, 13140, 29962, 13, 4706, 4158, 353, 1583, 29889, 1272, 29889, 25379, 29961, 13140, 29962, 13, 4706, 3573, 29918, 1341, 293, 353, 448, 29896, 29889, 29900, 13, 4706, 565, 1583, 29889, 1509, 29918, 2587, 29918, 1341, 2463, 29901, 13, 9651, 3573, 29918, 1341, 293, 353, 1583, 29889, 1272, 29889, 2587, 29918, 1341, 2463, 29961, 13140, 29962, 13, 13, 4706, 12700, 29918, 3888, 353, 313, 517, 407, 839, 29892, 8267, 29918, 978, 29892, 6287, 29892, 321, 8584, 29918, 5450, 29918, 449, 29892, 3573, 29918, 1341, 293, 29892, 4158, 29897, 13, 13, 4706, 565, 451, 1583, 29889, 1509, 29918, 7340, 29901, 13, 9651, 19471, 29918, 5450, 29918, 449, 353, 6213, 13, 4706, 565, 451, 1583, 29889, 1509, 29918, 7340, 29918, 5451, 29901, 13, 9651, 19471, 29918, 5450, 29918, 5451, 29918, 449, 353, 6213, 13, 4706, 565, 451, 1583, 29889, 1509, 29918, 517, 407, 280, 29918, 13140, 29901, 13, 9651, 304, 407, 280, 29918, 1643, 29918, 449, 353, 6213, 13, 4706, 565, 451, 1583, 29889, 1509, 29918, 4181, 29918, 339, 271, 29901, 13, 9651, 19471, 29918, 339, 271, 29918, 449, 353, 6213, 13, 308, 13, 4706, 736, 22844, 29892, 6276, 29918, 955, 29918, 449, 29892, 2614, 29918, 955, 29918, 449, 29892, 926, 29918, 449, 29892, 5731, 29918, 449, 29892, 19471, 29918, 339, 271, 29918, 449, 29892, 19471, 29918, 5450, 29918, 449, 29892, 19471, 29918, 5450, 29918, 5451, 29918, 449, 29892, 304, 407, 280, 29918, 1643, 29918, 449, 29892, 12700, 29918, 3888, 13, 308, 13, 13, 1678, 822, 679, 29918, 12324, 29918, 3888, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 12324, 29918, 3888, 13, 13, 13, 361, 4770, 978, 1649, 1360, 29915, 1649, 3396, 1649, 2396, 13, 1678, 396, 6056, 29918, 3888, 353, 1763, 407, 280, 19077, 2133, 3401, 580, 13, 1678, 396, 6056, 29918, 3888, 29889, 1359, 29918, 3166, 877, 21546, 1272, 29914, 3601, 29914, 8945, 2133, 29918, 3888, 29914, 29883, 4003, 29918, 14968, 29889, 29886, 6321, 1495, 13, 1678, 396, 6056, 29918, 3888, 29889, 2158, 29918, 449, 580, 13, 13, 1678, 304, 407, 280, 29918, 1272, 353, 1763, 407, 280, 16390, 24541, 29898, 307, 1862, 29922, 1839, 6904, 1272, 29914, 3601, 29914, 29907, 4003, 29914, 29907, 4003, 29941, 29900, 29895, 29918, 9930, 18772, 29914, 29907, 4003, 29941, 29900, 29895, 1440, 7464, 6056, 29918, 3888, 29918, 1445, 2433, 6904, 1272, 29914, 3601, 29914, 8945, 2133, 29918, 3888, 29914, 29883, 4003, 29918, 29941, 29900, 29895, 29889, 29886, 6321, 742, 320, 13, 462, 18884, 9853, 29918, 2311, 29922, 29945, 29892, 954, 29918, 24530, 29922, 29896, 29900, 29892, 528, 21897, 29922, 5574, 29892, 954, 29918, 16485, 29922, 8516, 29892, 22786, 29918, 16485, 29922, 29900, 29889, 29900, 29896, 29897, 13, 13, 1678, 2302, 353, 29871, 29900, 13, 1678, 1550, 304, 407, 280, 29918, 1272, 29889, 5349, 29918, 4622, 29918, 16175, 7295, 13, 4706, 9853, 353, 304, 407, 280, 29918, 1272, 29889, 4622, 29918, 16175, 29898, 8172, 29918, 7165, 29922, 5574, 29892, 8569, 29918, 517, 407, 1847, 29922, 8824, 29897, 13, 4706, 2302, 4619, 29871, 29896, 13, 4706, 396, 1596, 29898, 16175, 29889, 1915, 29918, 955, 29961, 29900, 2314, 13, 4706, 396, 1596, 29898, 16175, 29889, 517, 407, 839, 29961, 29900, 2314, 13, 4706, 396, 1596, 29898, 16175, 29889, 4181, 29918, 5450, 29918, 5451, 29961, 29900, 2314, 13, 4706, 396, 1596, 29898, 16175, 29889, 4181, 29918, 5450, 29961, 29900, 2314, 13, 4706, 396, 1596, 29898, 16175, 29889, 517, 407, 280, 29918, 1643, 29961, 29900, 2314, 13, 4706, 396, 1596, 29898, 16175, 29889, 1066, 29897, 13, 4706, 396, 1596, 29898, 16175, 29889, 2587, 29918, 1341, 2463, 29897, 13, 4706, 396, 1596, 29898, 16175, 29889, 4181, 29918, 339, 271, 29961, 29900, 2314, 13, 4706, 396, 1596, 29898, 9302, 29889, 311, 7979, 267, 29898, 29906, 29930, 9302, 29889, 279, 617, 359, 29898, 16175, 29889, 4181, 29918, 339, 271, 29961, 29900, 29892, 584, 29892, 29871, 29900, 29962, 4961, 13, 13, 1678, 1596, 877, 11536, 954, 9853, 267, 29901, 525, 718, 851, 29898, 2798, 876, 13, 13, 1678, 304, 407, 280, 29918, 1272, 29889, 12071, 580, 13, 1678, 2302, 353, 29871, 29900, 13, 1678, 1550, 304, 407, 280, 29918, 1272, 29889, 5349, 29918, 4622, 29918, 16175, 7295, 13, 4706, 9853, 353, 304, 407, 280, 29918, 1272, 29889, 4622, 29918, 16175, 580, 13, 4706, 2302, 4619, 29871, 29896, 13, 4706, 1596, 29898, 16175, 29889, 2311, 29897, 13, 13, 1678, 1596, 877, 11536, 954, 9853, 267, 29901, 525, 718, 851, 29898, 2798, 876, 13, 2 ]
Project_Euler/01_mults_3_or_5/find_sum.py
perlygatekeeper/glowing-robot
2
47757
#!/opt/local/bin/python sum_3_5 = 0 for i in range(1,1000): if i % 3 == 0 or i % 5 == 0: print(i) sum_3_5 += i print(sum_3_5)
[ 1, 18787, 3670, 29914, 2997, 29914, 2109, 29914, 4691, 13, 13, 2083, 29918, 29941, 29918, 29945, 353, 29871, 29900, 13, 1454, 474, 297, 3464, 29898, 29896, 29892, 29896, 29900, 29900, 29900, 1125, 13, 1678, 565, 474, 1273, 29871, 29941, 1275, 29871, 29900, 470, 474, 1273, 29871, 29945, 1275, 29871, 29900, 29901, 13, 4706, 1596, 29898, 29875, 29897, 13, 4706, 2533, 29918, 29941, 29918, 29945, 4619, 474, 13, 13, 2158, 29898, 2083, 29918, 29941, 29918, 29945, 29897, 13, 13, 13, 2 ]
load_dataset/custom_datasets.py
propelwise/ct-net-models
6
138900
<filename>load_dataset/custom_datasets.py #custom_datasets.py #Copyright (c) 2020 <NAME> <NAME> #MIT License #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 import os import pickle import numpy as np import pandas as pd import torch from torch.utils.data import Dataset, DataLoader from . import utils #Set seeds np.random.seed(0) torch.manual_seed(0) torch.cuda.manual_seed(0) torch.cuda.manual_seed_all(0) ################################################### # PACE Dataset for Data Stored in 2019-10-BigData #----------------------------- ################################################### class CTDataset_2019_10(Dataset): def __init__(self, setname, label_type_ld, label_meanings, num_channels, pixel_bounds, data_augment, crop_type, selected_note_acc_files): """CT Dataset class that works for preprocessed data in 2019-10-BigData. A single example (for crop_type == 'single') is a 4D CT volume: if num_channels == 3, shape [134,3,420,420] if num_channels == 1, shape [402,420,420] Variables: <setname> is either 'train' or 'valid' or 'test' <label_type_ld> is 'disease_new' <label_meanings>: list of strings indicating which labels should be kept. Alternatively, can be the string 'all' in which case all labels are kept. <num_channels>: number of channels to reshape the image to. == 3 if the model uses a pretrained feature extractor. == 1 if the model uses only 3D convolutions. <pixel_bounds>: list of ints e.g. [-1000,200] Determines the lower bound, upper bound of pixel value clipping and normalization. <data_augment>: if True, perform data augmentation. <crop_type>: is 'single' for an example consisting of one 4D numpy array <selected_note_acc_files>: This should be a dictionary with key equal to setname and value that is a string. If the value is a path to a file, the file must be a CSV. Only note accessions in this file will be used. If the value is not a valid file path, all available note accs will be used, i.e. the model will be trained on the whole dataset.""" self.setname = setname self.define_subsets_list() self.label_type_ld = label_type_ld self.label_meanings = label_meanings self.num_channels = num_channels self.pixel_bounds = pixel_bounds if self.setname == 'train': self.data_augment = data_augment else: self.data_augment = False print('For dataset',self.setname,'data_augment is',self.data_augment) self.crop_type = crop_type assert self.crop_type == 'single' self.selected_note_acc_files = selected_note_acc_files #Define location of the CT volumes self.main_clean_path = './load_dataset/fakedata' self.volume_log_df = pd.read_csv('./load_dataset/fakedata/CT_Scan_Preprocessing_Log_File_FINAL_SMALL.csv',header=0,index_col=0) #Get the example ids self.volume_accessions = self.get_volume_accessions() #Get the ground truth labels self.labels_df = self.get_labels_df() # Pytorch Required Methods #------------------------------------------------ def __len__(self): return len(self.volume_accessions) def __getitem__(self, idx): """Return a single sample at index <idx>. The sample is a Python dictionary with keys 'data' and 'gr_truth' for the image and label, respectively""" return self._get_pace(self.volume_accessions[idx]) # Volume Accession Methods #------------------------------------------------ def get_note_accessions(self): setname_file = self.selected_note_acc_files[self.setname] if os.path.isfile(setname_file): print('\tObtaining note accessions from',setname_file) sel_accs = pd.read_csv(setname_file,header=0) assert sorted(list(set(sel_accs['Subset_Assigned'].values.tolist())))==sorted(self.subsets_list) note_accs = sel_accs.loc[:,'Accession'].values.tolist() print('\tTotal theoretical note accessions in subsets:',len(note_accs)) return note_accs else: print('\tObtaining note accessions from complete identifiers file') #Read in identifiers file, which contains note_accessions #Columns are MRN, Accession, Set_Assigned, Set_Should_Be, Subset_Assigned all_ids = pd.read_csv('./load_dataset/fakedata/all_identifiers.csv',header=0) #Extract the note_accessions note_accs = [] for subset in self.subsets_list: #e.g. ['imgvalid_a','imgvalid_b'] subset_note_accs = all_ids[all_ids['Subset_Assigned']==subset].loc[:,'Accession'].values.tolist() note_accs += subset_note_accs print('\tTotal theoretical note accessions in subsets:',len(note_accs)) return note_accs def get_volume_accessions(self): note_accs = self.get_note_accessions() #Translate note_accessions to volume_accessions based on what data has been #preprocessed successfully. volume_log_df has note accessions as the #index, and the column 'full_filename_npz' for the volume accession. #The column 'status' should equal 'success' if the volume has been #preprocessed correctly. print('\tTotal theoretical volumes in whole dataset:',self.volume_log_df.shape[0]) self.volume_log_df = self.volume_log_df[self.volume_log_df['status']=='success'] print('\tTotal successfully preprocessed volumes in whole dataset:',self.volume_log_df.shape[0]) volume_accs = [] for note_acc in note_accs: if note_acc in self.volume_log_df.index.values.tolist(): volume_accs.append(self.volume_log_df.at[note_acc,'full_filename_npz']) print('\tFinal total successfully preprocessed volumes in requested subsets:',len(volume_accs)) #According to this thread: https://github.com/pytorch/pytorch/issues/13246 #it is better to use a numpy array than a list to reduce memory leaks. return np.array(volume_accs) # Ground Truth Label Methods #---------------------------------------------- def get_labels_df(self): #Get the ground truth labels based on requested label type. labels_df = read_in_labels(self.label_type_ld, self.setname) #Now filter the ground truth labels based on the desired label meanings: if self.label_meanings != 'all': #i.e. if you want to filter labels_df = labels_df[self.label_meanings] return labels_df # Fetch a CT Volume (__getitem__ implementation) #-------------------------- def _get_pace(self, volume_acc): """<volume_acc> is for example RHAA12345_6.npz""" #Load compressed npz file: [slices, square, square] ctvol = np.load(os.path.join(self.main_clean_path, volume_acc))['ct'] #Prepare the CT volume data (already torch Tensors) data = utils.prepare_ctvol_2019_10_dataset(ctvol, self.pixel_bounds, self.data_augment, self.num_channels, self.crop_type) #Get the ground truth: note_acc = self.volume_log_df[self.volume_log_df['full_filename_npz']==volume_acc].index.values.tolist()[0] gr_truth = self.labels_df.loc[note_acc, :].values gr_truth = torch.from_numpy(gr_truth).squeeze().type(torch.float) #When training on only one abnormality you must unsqueeze to prevent #a dimensions error when training the model: if len(self.label_meanings)==1: gr_truth = gr_truth.unsqueeze(0) #Create the sample sample = {'data': data, 'gr_truth': gr_truth, 'volume_acc': volume_acc} return sample # Sanity Check #------------------------------------------------------------ def define_subsets_list(self): assert self.setname in ['train','valid','test'] if self.setname == 'train': self.subsets_list = ['imgtrain'] elif self.setname == 'valid': self.subsets_list = ['imgvalid_a'] elif self.setname == 'test': self.subsets_list = ['imgtest_a','imgtest_b','imgtest_c','imgtest_d'] print('Creating',self.setname,'dataset with subsets',self.subsets_list) ####################### # Ground Truth Labels #--------------------------------------------------------- ####################### def read_in_labels(label_type_ld, setname): """Return a pandas dataframe with the dataset labels. Accession numbers are the index and labels (e.g. "pneumonia") are the columns. <setname> can be 'train', 'valid', or 'test'.""" assert label_type_ld == 'disease_new' labels_file = './load_dataset/fakedata/2019-12-18_duke_disease/img'+setname+'_BinaryLabels.csv' return pd.read_csv(labels_file, header=0, index_col = 0)
[ 1, 529, 9507, 29958, 1359, 29918, 24713, 29914, 6341, 29918, 14538, 1691, 29889, 2272, 13, 29937, 6341, 29918, 14538, 1691, 29889, 2272, 13, 29937, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 529, 5813, 29958, 529, 5813, 29958, 13, 13, 29937, 26349, 19245, 13, 13, 29937, 27293, 338, 1244, 1609, 16896, 29892, 3889, 310, 8323, 29892, 304, 738, 2022, 4017, 292, 263, 3509, 13, 29937, 974, 445, 7047, 322, 6942, 5106, 2066, 313, 1552, 376, 6295, 14093, 4968, 304, 5376, 13, 29937, 262, 278, 18540, 1728, 24345, 29892, 3704, 1728, 29485, 278, 10462, 13, 29937, 517, 671, 29892, 3509, 29892, 6623, 29892, 10366, 29892, 9805, 29892, 1320, 2666, 29892, 269, 803, 1947, 29892, 322, 29914, 272, 19417, 13, 29937, 9708, 583, 310, 278, 18540, 29892, 322, 304, 14257, 12407, 304, 6029, 278, 18540, 338, 13, 29937, 29888, 595, 3276, 304, 437, 577, 29892, 4967, 304, 278, 1494, 5855, 29901, 13, 13, 29937, 1576, 2038, 3509, 1266, 8369, 322, 445, 10751, 8369, 4091, 367, 5134, 297, 599, 13, 29937, 9708, 583, 470, 23228, 2011, 1080, 310, 278, 18540, 29889, 13, 13, 29937, 28350, 7791, 7818, 12982, 1525, 8519, 13756, 13044, 3352, 376, 3289, 8519, 613, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29979, 8079, 13764, 29979, 476, 22255, 29892, 8528, 15094, 1799, 6323, 13, 29937, 29902, 3580, 5265, 3352, 29892, 2672, 6154, 15789, 4214, 350, 2692, 6058, 27848, 3352, 7495, 6093, 399, 1718, 29934, 13566, 29059, 8079, 341, 1001, 3210, 13566, 2882, 6227, 11937, 29892, 13, 29937, 29943, 1806, 8186, 1799, 15842, 319, 349, 8322, 2965, 13309, 1718, 349, 4574, 13152, 1660, 5300, 405, 1164, 1177, 15860, 1177, 1692, 13780, 29889, 2672, 11698, 382, 29963, 3919, 24972, 9818, 6093, 13, 29937, 20656, 29950, 24125, 6323, 315, 4590, 29979, 22789, 3912, 379, 5607, 8032, 29903, 20700, 17705, 6181, 15842, 13764, 29979, 315, 4375, 7833, 29892, 21330, 1529, 1692, 29903, 6323, 438, 29911, 4448, 13, 29937, 5265, 2882, 6227, 11937, 29892, 12317, 2544, 4448, 2672, 13764, 319, 9838, 8079, 8707, 29911, 4717, 1783, 29892, 323, 8476, 6323, 438, 29911, 4448, 22119, 1660, 29892, 9033, 3235, 4214, 3895, 29892, 13, 29937, 12015, 8079, 6323, 2672, 8707, 8186, 9838, 22659, 6093, 7791, 7818, 12982, 1525, 6323, 6093, 501, 1660, 6323, 438, 29911, 4448, 5012, 1964, 4214, 29903, 2672, 6093, 13, 29937, 6156, 7818, 12982, 1525, 13, 13, 5215, 2897, 13, 5215, 5839, 280, 13, 5215, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 29889, 13239, 29889, 1272, 1053, 13373, 24541, 29892, 3630, 10036, 13, 13, 3166, 869, 1053, 3667, 29879, 13, 13, 29937, 2697, 409, 5779, 13, 9302, 29889, 8172, 29889, 26776, 29898, 29900, 29897, 13, 7345, 305, 29889, 11288, 29918, 26776, 29898, 29900, 29897, 13, 7345, 305, 29889, 29883, 6191, 29889, 11288, 29918, 26776, 29898, 29900, 29897, 13, 7345, 305, 29889, 29883, 6191, 29889, 11288, 29918, 26776, 29918, 497, 29898, 29900, 29897, 13, 13, 13383, 13383, 13383, 2277, 29937, 13, 29937, 349, 11538, 13373, 24541, 363, 3630, 624, 4395, 297, 29871, 29906, 29900, 29896, 29929, 29899, 29896, 29900, 29899, 6970, 1469, 396, 2683, 9072, 29899, 13, 13383, 13383, 13383, 2277, 29937, 13, 1990, 26637, 16390, 24541, 29918, 29906, 29900, 29896, 29929, 29918, 29896, 29900, 29898, 16390, 24541, 1125, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 731, 978, 29892, 3858, 29918, 1853, 29918, 430, 29892, 13, 462, 3858, 29918, 12676, 886, 29892, 954, 29918, 305, 12629, 29892, 15526, 29918, 23687, 29892, 13, 462, 848, 29918, 2987, 358, 29892, 274, 1336, 29918, 1853, 29892, 13, 462, 4629, 29918, 6812, 29918, 5753, 29918, 5325, 1125, 13, 4706, 9995, 1783, 13373, 24541, 770, 393, 1736, 363, 758, 5014, 287, 848, 297, 29871, 29906, 29900, 29896, 29929, 29899, 29896, 29900, 29899, 6970, 1469, 29889, 13, 4706, 319, 2323, 1342, 313, 1454, 274, 1336, 29918, 1853, 1275, 525, 14369, 1495, 338, 263, 29871, 29946, 29928, 26637, 7977, 29901, 13, 9651, 565, 954, 29918, 305, 12629, 1275, 29871, 29941, 29892, 8267, 518, 29896, 29941, 29946, 29892, 29941, 29892, 29946, 29906, 29900, 29892, 29946, 29906, 29900, 29962, 13, 9651, 565, 954, 29918, 305, 12629, 1275, 29871, 29896, 29892, 8267, 518, 29946, 29900, 29906, 29892, 29946, 29906, 29900, 29892, 29946, 29906, 29900, 29962, 13, 308, 13, 4706, 9586, 1849, 29901, 13, 4706, 529, 842, 978, 29958, 338, 2845, 525, 14968, 29915, 470, 525, 3084, 29915, 470, 525, 1688, 29915, 13, 4706, 529, 1643, 29918, 1853, 29918, 430, 29958, 338, 525, 29881, 895, 559, 29918, 1482, 29915, 13, 4706, 529, 1643, 29918, 12676, 886, 23917, 1051, 310, 6031, 23941, 607, 11073, 881, 13, 9651, 367, 8126, 29889, 20360, 29892, 508, 367, 278, 1347, 525, 497, 29915, 297, 607, 1206, 13, 9651, 599, 11073, 526, 8126, 29889, 13, 4706, 529, 1949, 29918, 305, 12629, 23917, 1353, 310, 18196, 304, 620, 14443, 278, 1967, 304, 29889, 13, 9651, 1275, 29871, 29941, 565, 278, 1904, 3913, 263, 758, 3018, 1312, 4682, 6597, 272, 29889, 13, 9651, 1275, 29871, 29896, 565, 278, 1904, 3913, 871, 29871, 29941, 29928, 26851, 29879, 29889, 13, 4706, 529, 29886, 15711, 29918, 23687, 23917, 1051, 310, 938, 29879, 321, 29889, 29887, 29889, 21069, 29896, 29900, 29900, 29900, 29892, 29906, 29900, 29900, 29962, 13, 9651, 5953, 837, 1475, 278, 5224, 3216, 29892, 7568, 3216, 310, 15526, 995, 9335, 3262, 13, 9651, 322, 4226, 2133, 29889, 13, 4706, 529, 1272, 29918, 2987, 358, 23917, 565, 5852, 29892, 2189, 848, 18765, 362, 29889, 13, 4706, 529, 29883, 1336, 29918, 1853, 23917, 338, 525, 14369, 29915, 363, 385, 1342, 19849, 310, 697, 29871, 29946, 29928, 12655, 1409, 13, 4706, 529, 8391, 29918, 6812, 29918, 5753, 29918, 5325, 23917, 910, 881, 367, 263, 8600, 13, 9651, 411, 1820, 5186, 304, 731, 978, 322, 995, 393, 338, 263, 1347, 29889, 960, 278, 995, 13, 9651, 338, 263, 2224, 304, 263, 934, 29892, 278, 934, 1818, 367, 263, 16874, 29889, 9333, 4443, 2130, 1080, 13, 9651, 297, 445, 934, 674, 367, 1304, 29889, 960, 278, 995, 338, 451, 263, 2854, 934, 2224, 29892, 13, 9651, 599, 3625, 4443, 1035, 29879, 674, 367, 1304, 29892, 474, 29889, 29872, 29889, 278, 1904, 674, 367, 13, 9651, 16370, 373, 278, 3353, 8783, 1213, 15945, 13, 4706, 1583, 29889, 842, 978, 353, 731, 978, 13, 4706, 1583, 29889, 7922, 29918, 6484, 29879, 29918, 1761, 580, 13, 4706, 1583, 29889, 1643, 29918, 1853, 29918, 430, 353, 3858, 29918, 1853, 29918, 430, 13, 4706, 1583, 29889, 1643, 29918, 12676, 886, 353, 3858, 29918, 12676, 886, 13, 4706, 1583, 29889, 1949, 29918, 305, 12629, 353, 954, 29918, 305, 12629, 13, 4706, 1583, 29889, 29886, 15711, 29918, 23687, 353, 15526, 29918, 23687, 13, 4706, 565, 1583, 29889, 842, 978, 1275, 525, 14968, 2396, 13, 9651, 1583, 29889, 1272, 29918, 2987, 358, 353, 848, 29918, 2987, 358, 13, 4706, 1683, 29901, 13, 9651, 1583, 29889, 1272, 29918, 2987, 358, 353, 7700, 13, 4706, 1596, 877, 2831, 8783, 742, 1311, 29889, 842, 978, 5501, 1272, 29918, 2987, 358, 338, 742, 1311, 29889, 1272, 29918, 2987, 358, 29897, 13, 4706, 1583, 29889, 29883, 1336, 29918, 1853, 353, 274, 1336, 29918, 1853, 13, 4706, 4974, 1583, 29889, 29883, 1336, 29918, 1853, 1275, 525, 14369, 29915, 13, 4706, 1583, 29889, 8391, 29918, 6812, 29918, 5753, 29918, 5325, 353, 4629, 29918, 6812, 29918, 5753, 29918, 5325, 13, 308, 13, 4706, 396, 3206, 457, 4423, 310, 278, 26637, 18167, 13, 4706, 1583, 29889, 3396, 29918, 14941, 29918, 2084, 353, 19283, 1359, 29918, 24713, 29914, 29888, 12535, 532, 29915, 13, 4706, 1583, 29889, 24623, 29918, 1188, 29918, 2176, 353, 10518, 29889, 949, 29918, 7638, 877, 6904, 1359, 29918, 24713, 29914, 29888, 12535, 532, 29914, 1783, 29918, 29083, 29918, 6572, 19170, 29918, 3403, 29918, 2283, 29918, 29943, 1177, 1964, 29918, 29903, 1529, 2208, 29889, 7638, 742, 6672, 29922, 29900, 29892, 2248, 29918, 1054, 29922, 29900, 29897, 13, 308, 13, 4706, 396, 2577, 278, 1342, 18999, 13, 4706, 1583, 29889, 24623, 29918, 5943, 1080, 353, 1583, 29889, 657, 29918, 24623, 29918, 5943, 1080, 580, 13, 462, 308, 13, 4706, 396, 2577, 278, 5962, 8760, 11073, 13, 4706, 1583, 29889, 21134, 29918, 2176, 353, 1583, 29889, 657, 29918, 21134, 29918, 2176, 580, 13, 268, 13, 1678, 396, 349, 3637, 25350, 830, 5958, 8108, 29879, 396, 2683, 2683, 2683, 13, 1678, 822, 4770, 2435, 12035, 1311, 1125, 13, 4706, 736, 7431, 29898, 1311, 29889, 24623, 29918, 5943, 1080, 29897, 13, 308, 13, 1678, 822, 4770, 657, 667, 12035, 1311, 29892, 22645, 1125, 13, 4706, 9995, 11609, 263, 2323, 4559, 472, 2380, 529, 13140, 15513, 450, 4559, 338, 263, 5132, 13, 4706, 8600, 411, 6611, 525, 1272, 29915, 322, 525, 629, 29918, 509, 2806, 29915, 363, 278, 1967, 322, 3858, 29892, 13, 4706, 8307, 15945, 29908, 13, 4706, 736, 1583, 3032, 657, 29918, 3535, 29898, 1311, 29889, 24623, 29918, 5943, 1080, 29961, 13140, 2314, 13, 268, 13, 1678, 396, 16934, 4831, 1211, 8108, 29879, 396, 2683, 2683, 2683, 13, 1678, 822, 679, 29918, 6812, 29918, 5943, 1080, 29898, 1311, 1125, 13, 4706, 731, 978, 29918, 1445, 353, 1583, 29889, 8391, 29918, 6812, 29918, 5753, 29918, 5325, 29961, 1311, 29889, 842, 978, 29962, 13, 4706, 565, 2897, 29889, 2084, 29889, 275, 1445, 29898, 842, 978, 29918, 1445, 1125, 13, 9651, 1596, 28909, 29873, 6039, 2408, 292, 4443, 2130, 1080, 515, 742, 842, 978, 29918, 1445, 29897, 13, 9651, 5535, 29918, 562, 2395, 353, 10518, 29889, 949, 29918, 7638, 29898, 842, 978, 29918, 1445, 29892, 6672, 29922, 29900, 29897, 632, 13, 9651, 4974, 12705, 29898, 1761, 29898, 842, 29898, 2838, 29918, 562, 2395, 1839, 4035, 842, 29918, 7900, 12961, 13359, 5975, 29889, 25027, 391, 580, 4961, 1360, 24582, 29898, 1311, 29889, 6484, 29879, 29918, 1761, 29897, 13, 9651, 4443, 29918, 562, 2395, 353, 5535, 29918, 562, 2395, 29889, 2029, 7503, 5501, 7504, 1211, 13359, 5975, 29889, 25027, 391, 580, 13, 9651, 1596, 28909, 29873, 11536, 23399, 4443, 2130, 1080, 297, 27639, 29901, 742, 2435, 29898, 6812, 29918, 562, 2395, 876, 13, 9651, 736, 4443, 29918, 562, 2395, 13, 4706, 1683, 29901, 29871, 13, 9651, 1596, 28909, 29873, 6039, 2408, 292, 4443, 2130, 1080, 515, 4866, 2893, 14903, 934, 1495, 13, 9651, 396, 6359, 297, 2893, 14903, 934, 29892, 607, 3743, 4443, 29918, 5943, 1080, 13, 9651, 396, 14289, 526, 29751, 29940, 29892, 4831, 1211, 29892, 3789, 29918, 7900, 12961, 29892, 3789, 29918, 26857, 29918, 3629, 29892, 3323, 842, 29918, 7900, 12961, 13, 9651, 599, 29918, 4841, 353, 10518, 29889, 949, 29918, 7638, 877, 6904, 1359, 29918, 24713, 29914, 29888, 12535, 532, 29914, 497, 29918, 1693, 14903, 29889, 7638, 742, 6672, 29922, 29900, 29897, 13, 9651, 13, 9651, 396, 5647, 1461, 278, 4443, 29918, 5943, 1080, 13, 9651, 4443, 29918, 562, 2395, 353, 5159, 13, 9651, 363, 11306, 297, 1583, 29889, 6484, 29879, 29918, 1761, 29901, 396, 29872, 29889, 29887, 29889, 6024, 2492, 3084, 29918, 29874, 3788, 2492, 3084, 29918, 29890, 2033, 13, 18884, 11306, 29918, 6812, 29918, 562, 2395, 353, 599, 29918, 4841, 29961, 497, 29918, 4841, 1839, 4035, 842, 29918, 7900, 12961, 2033, 1360, 6484, 1822, 2029, 7503, 5501, 7504, 1211, 13359, 5975, 29889, 25027, 391, 580, 13, 18884, 4443, 29918, 562, 2395, 4619, 11306, 29918, 6812, 29918, 562, 2395, 13, 9651, 1596, 28909, 29873, 11536, 23399, 4443, 2130, 1080, 297, 27639, 29901, 742, 2435, 29898, 6812, 29918, 562, 2395, 876, 13, 9651, 736, 4443, 29918, 562, 2395, 13, 268, 13, 1678, 822, 679, 29918, 24623, 29918, 5943, 1080, 29898, 1311, 1125, 13, 4706, 4443, 29918, 562, 2395, 353, 1583, 29889, 657, 29918, 6812, 29918, 5943, 1080, 580, 13, 4706, 396, 4300, 9632, 4443, 29918, 5943, 1080, 304, 7977, 29918, 5943, 1080, 2729, 373, 825, 848, 756, 1063, 13, 4706, 396, 1457, 5014, 287, 8472, 29889, 7977, 29918, 1188, 29918, 2176, 756, 4443, 2130, 1080, 408, 278, 13, 4706, 396, 2248, 29892, 322, 278, 1897, 525, 8159, 29918, 9507, 29918, 9302, 29920, 29915, 363, 278, 7977, 1035, 1211, 29889, 13, 4706, 396, 1576, 1897, 525, 4882, 29915, 881, 5186, 525, 8698, 29915, 565, 278, 7977, 756, 1063, 13, 4706, 396, 1457, 5014, 287, 5149, 29889, 13, 4706, 1596, 28909, 29873, 11536, 23399, 18167, 297, 3353, 8783, 29901, 742, 1311, 29889, 24623, 29918, 1188, 29918, 2176, 29889, 12181, 29961, 29900, 2314, 13, 4706, 1583, 29889, 24623, 29918, 1188, 29918, 2176, 353, 1583, 29889, 24623, 29918, 1188, 29918, 2176, 29961, 1311, 29889, 24623, 29918, 1188, 29918, 2176, 1839, 4882, 2033, 1360, 29915, 8698, 2033, 13, 4706, 1596, 28909, 29873, 11536, 8472, 758, 5014, 287, 18167, 297, 3353, 8783, 29901, 742, 1311, 29889, 24623, 29918, 1188, 29918, 2176, 29889, 12181, 29961, 29900, 2314, 13, 4706, 7977, 29918, 562, 2395, 353, 5159, 13, 4706, 363, 4443, 29918, 5753, 297, 4443, 29918, 562, 2395, 29901, 13, 9651, 565, 4443, 29918, 5753, 297, 1583, 29889, 24623, 29918, 1188, 29918, 2176, 29889, 2248, 29889, 5975, 29889, 25027, 391, 7295, 13, 18884, 7977, 29918, 562, 2395, 29889, 4397, 29898, 1311, 29889, 24623, 29918, 1188, 29918, 2176, 29889, 271, 29961, 6812, 29918, 5753, 5501, 8159, 29918, 9507, 29918, 9302, 29920, 11287, 13, 4706, 1596, 28909, 29873, 15790, 3001, 8472, 758, 5014, 287, 18167, 297, 13877, 27639, 29901, 742, 2435, 29898, 24623, 29918, 562, 2395, 876, 13, 4706, 396, 7504, 3278, 304, 445, 3244, 29901, 2045, 597, 3292, 29889, 510, 29914, 2272, 7345, 305, 29914, 2272, 7345, 305, 29914, 12175, 29914, 29896, 29941, 29906, 29946, 29953, 13, 4706, 396, 277, 338, 2253, 304, 671, 263, 12655, 1409, 1135, 263, 1051, 304, 10032, 3370, 454, 10327, 29889, 13, 4706, 736, 7442, 29889, 2378, 29898, 24623, 29918, 562, 2395, 29897, 13, 268, 13, 1678, 396, 1632, 618, 1605, 2806, 15796, 8108, 29879, 396, 2683, 2683, 9072, 489, 13, 1678, 822, 679, 29918, 21134, 29918, 2176, 29898, 1311, 1125, 13, 4706, 396, 2577, 278, 5962, 8760, 11073, 2729, 373, 13877, 3858, 1134, 29889, 13, 4706, 11073, 29918, 2176, 353, 1303, 29918, 262, 29918, 21134, 29898, 1311, 29889, 1643, 29918, 1853, 29918, 430, 29892, 1583, 29889, 842, 978, 29897, 13, 308, 13, 4706, 396, 10454, 4175, 278, 5962, 8760, 11073, 2729, 373, 278, 7429, 3858, 2099, 886, 29901, 13, 4706, 565, 1583, 29889, 1643, 29918, 12676, 886, 2804, 525, 497, 2396, 396, 29875, 29889, 29872, 29889, 565, 366, 864, 304, 4175, 13, 9651, 11073, 29918, 2176, 353, 11073, 29918, 2176, 29961, 1311, 29889, 1643, 29918, 12676, 886, 29962, 13, 4706, 736, 11073, 29918, 2176, 13, 268, 13, 1678, 396, 383, 3486, 263, 26637, 16934, 313, 1649, 657, 667, 1649, 5314, 29897, 396, 2683, 28400, 13, 1678, 822, 903, 657, 29918, 3535, 29898, 1311, 29892, 7977, 29918, 5753, 1125, 13, 4706, 9995, 29966, 24623, 29918, 5753, 29958, 338, 363, 1342, 390, 29950, 6344, 29896, 29906, 29941, 29946, 29945, 29918, 29953, 29889, 9302, 29920, 15945, 29908, 13, 4706, 396, 5896, 419, 13120, 7442, 29920, 934, 29901, 518, 29879, 29399, 29892, 6862, 29892, 6862, 29962, 13, 4706, 274, 29873, 1555, 353, 7442, 29889, 1359, 29898, 359, 29889, 2084, 29889, 7122, 29898, 1311, 29889, 3396, 29918, 14941, 29918, 2084, 29892, 7977, 29918, 5753, 876, 1839, 312, 2033, 13, 308, 13, 4706, 396, 29925, 3445, 598, 278, 26637, 7977, 848, 313, 284, 2040, 4842, 305, 323, 575, 943, 29897, 13, 4706, 848, 353, 3667, 29879, 29889, 19125, 29918, 312, 1555, 29918, 29906, 29900, 29896, 29929, 29918, 29896, 29900, 29918, 24713, 29898, 312, 1555, 29892, 1583, 29889, 29886, 15711, 29918, 23687, 29892, 1583, 29889, 1272, 29918, 2987, 358, 29892, 1583, 29889, 1949, 29918, 305, 12629, 29892, 1583, 29889, 29883, 1336, 29918, 1853, 29897, 13, 308, 13, 4706, 396, 2577, 278, 5962, 8760, 29901, 13, 4706, 4443, 29918, 5753, 353, 1583, 29889, 24623, 29918, 1188, 29918, 2176, 29961, 1311, 29889, 24623, 29918, 1188, 29918, 2176, 1839, 8159, 29918, 9507, 29918, 9302, 29920, 2033, 1360, 24623, 29918, 5753, 1822, 2248, 29889, 5975, 29889, 25027, 391, 580, 29961, 29900, 29962, 13, 4706, 867, 29918, 509, 2806, 353, 1583, 29889, 21134, 29918, 2176, 29889, 2029, 29961, 6812, 29918, 5753, 29892, 584, 1822, 5975, 13, 4706, 867, 29918, 509, 2806, 353, 4842, 305, 29889, 3166, 29918, 23749, 29898, 629, 29918, 509, 2806, 467, 29879, 802, 29872, 911, 2141, 1853, 29898, 7345, 305, 29889, 7411, 29897, 13, 308, 13, 4706, 396, 10401, 6694, 373, 871, 697, 633, 8945, 537, 366, 1818, 9644, 802, 29872, 911, 304, 5557, 13, 4706, 396, 29874, 13391, 1059, 746, 6694, 278, 1904, 29901, 13, 4706, 565, 7431, 29898, 1311, 29889, 1643, 29918, 12676, 886, 29897, 1360, 29896, 29901, 13, 9651, 867, 29918, 509, 2806, 353, 867, 29918, 509, 2806, 29889, 6948, 802, 29872, 911, 29898, 29900, 29897, 13, 308, 13, 4706, 396, 4391, 278, 4559, 13, 4706, 4559, 353, 11117, 1272, 2396, 848, 29892, 525, 629, 29918, 509, 2806, 2396, 867, 29918, 509, 2806, 29892, 525, 24623, 29918, 5753, 2396, 7977, 29918, 5753, 29913, 13, 4706, 736, 4559, 13, 268, 13, 1678, 396, 3087, 537, 5399, 396, 2683, 2683, 2683, 9072, 13, 1678, 822, 4529, 29918, 6484, 29879, 29918, 1761, 29898, 1311, 1125, 13, 4706, 4974, 1583, 29889, 842, 978, 297, 6024, 14968, 3788, 3084, 3788, 1688, 2033, 13, 4706, 565, 1583, 29889, 842, 978, 1275, 525, 14968, 2396, 13, 9651, 1583, 29889, 6484, 29879, 29918, 1761, 353, 6024, 2492, 14968, 2033, 13, 4706, 25342, 1583, 29889, 842, 978, 1275, 525, 3084, 2396, 13, 9651, 1583, 29889, 6484, 29879, 29918, 1761, 353, 6024, 2492, 3084, 29918, 29874, 2033, 13, 4706, 25342, 1583, 29889, 842, 978, 1275, 525, 1688, 2396, 13, 9651, 1583, 29889, 6484, 29879, 29918, 1761, 353, 6024, 2492, 1688, 29918, 29874, 3788, 2492, 1688, 29918, 29890, 3788, 2492, 1688, 29918, 29883, 3788, 2492, 1688, 29918, 29881, 2033, 13, 4706, 1596, 877, 9832, 1218, 742, 1311, 29889, 842, 978, 5501, 24713, 411, 27639, 742, 1311, 29889, 6484, 29879, 29918, 1761, 29897, 13, 13, 13383, 4136, 2277, 29937, 13, 29937, 1632, 618, 1605, 2806, 15796, 29879, 396, 2683, 2683, 2683, 1378, 29899, 13, 13383, 4136, 2277, 29937, 13, 13, 1753, 1303, 29918, 262, 29918, 21134, 29898, 1643, 29918, 1853, 29918, 430, 29892, 731, 978, 1125, 13, 1678, 9995, 11609, 263, 11701, 12205, 411, 278, 8783, 11073, 29889, 13, 1678, 4831, 1211, 3694, 526, 278, 2380, 322, 11073, 313, 29872, 29889, 29887, 29889, 376, 29886, 29765, 6405, 1159, 526, 278, 4341, 29889, 13, 1678, 529, 842, 978, 29958, 508, 367, 525, 14968, 742, 525, 3084, 742, 470, 525, 1688, 29915, 1213, 15945, 13, 1678, 4974, 3858, 29918, 1853, 29918, 430, 1275, 525, 29881, 895, 559, 29918, 1482, 29915, 13, 1678, 11073, 29918, 1445, 353, 19283, 1359, 29918, 24713, 29914, 29888, 12535, 532, 29914, 29906, 29900, 29896, 29929, 29899, 29896, 29906, 29899, 29896, 29947, 29918, 700, 446, 29918, 29881, 895, 559, 29914, 2492, 18717, 842, 978, 29974, 15972, 25196, 4775, 29879, 29889, 7638, 29915, 13, 1678, 736, 10518, 29889, 949, 29918, 7638, 29898, 21134, 29918, 1445, 29892, 4839, 29922, 29900, 29892, 2380, 29918, 1054, 353, 29871, 29900, 29897, 13, 268, 2 ]
applications/structural_application/test_examples/balken.gid/balken_include.py
jiaqiwang969/Kratos-test
0
144207
<reponame>jiaqiwang969/Kratos-test ################################################################## ######################## include.py ############################ ################################################################## ##### ekate - Enhanced KRATOS for Advanced Tunnel Enineering ##### ##### copyright by CIMNE, Barcelona, Spain ##### ##### and <NAME> for TUNCONSTRUCT ##### ##### all rights reserved ##### ################################################################## ##### note: KRATOS is released under LGPL ##### ################################################################## ################################################################## ################################################################## ## ATTENTION: here the order is important ##### ################################################################## ## including kratos path ##### ## ATTENTION: the following lines have to be adapted to ##### ## match your acrtual configuration ##### ################################################################## kratos_libs_path = '/home/hurga/kratos_local/kratos/libs/' ##kratos_root/libs #kratos_libs_path = '/home/hurga/kratosR1/libs/' ##kratos_root/libs kratos_applications_path = '/home/hurga/kratos_local/kratos/applications/' ##kratos_root/applications #kratos_applications_path = '/home/hurga/kratosR1/applications/' ##kratos_root/applications ekate_auxiliary_path = '/home/hurga/kratos_local/kratos/applications/ekate_auxiliary_application/python_scripts' #ekate_auxiliary_path = '/home/hurga/kratosR1/applications/ekate_auxiliary_application/python_scripts' ################################################################## ################################################################## import sys sys.path.append(kratos_libs_path) sys.path.append(kratos_applications_path) sys.path.append(ekate_auxiliary_path) #importing Kratos main library from Kratos import * kernel = Kernel() #defining kernel #importing applications import applications_interface applications_interface.Import_StructuralApplication = True applications_interface.Import_EkateAuxiliaryApplication = True applications_interface.Import_ExternalConstitutiveLawsApplication = True applications_interface.ImportApplications(kernel, kratos_applications_path) from KratosStructuralApplication import * from KratosExternalSolversApplication import * from KratosEkateAuxiliaryApplication import * from KratosExternalConstitutiveLawsApplication import * ################################################################## ################################################################## class Model: def __init__( self, problem_name, path ): #setting the domain size for the problem to be solved self.domain_size = 3 ################################################################## ## DEFINE MODELPART ############################################## ################################################################## self.model_part = ModelPart("ekate_simulation") self.path = path self.problem_name = problem_name ################################################################## ## DEFINE SOLVER ################################################# ################################################################## # reading simulation parameters number_of_time_steps = 1 self.analysis_parameters = [] # content of analysis_parameters: # perform_contact_analysis_flag # penalty value for normal contact # maximum number of uzawa iterations # friction coefficient # penalty value for frictional contact # contact_double_check_flag # contact_ramp_penalties_flag # maximum penalty value for normal contact # ramp criterion for normal contact # ramp factor for normal contact # maximum penalty value for frictional contact # ramp criterion for frictional contact # ramp factor for frictional contact perform_contact_analysis_flag = True # performing contact analysis: reading contact parameters penalty = 1e+10 maxuzawa = 25 friction = 0 frictionpenalty = 1e+05 contact_double_check_flag = False contact_ramp_penalties_flag = False maxpenalty = penalty rampcriterion = 0.0 rampfactor = 0.0 fricmaxpenalty = penalty fricrampcriterion = 0.0 fricrampfactor = 0.0 self.analysis_parameters.append(perform_contact_analysis_flag) self.analysis_parameters.append(penalty) self.analysis_parameters.append(maxuzawa) self.analysis_parameters.append(friction) self.analysis_parameters.append(frictionpenalty) self.analysis_parameters.append(contact_double_check_flag) self.analysis_parameters.append(contact_ramp_penalties_flag) self.analysis_parameters.append(maxpenalty) self.analysis_parameters.append(rampcriterion) self.analysis_parameters.append(rampfactor) self.analysis_parameters.append(fricmaxpenalty) self.analysis_parameters.append(fricrampcriterion) self.analysis_parameters.append(fricrampfactor) abs_tol = 1e-06 rel_tol = 0.0001 ## generating solver import ekate_solver self.solver = ekate_solver.EkateSolver( self.model_part, self.domain_size, number_of_time_steps, self.analysis_parameters, abs_tol, rel_tol ) ekate_solver.AddVariables( self.model_part ) ################################################################## ## READ MODELPART ################################################ ################################################################## #reading a model write_deformed_flag = WriteDeformedMeshFlag.WriteUndeformed write_elements = WriteConditionsFlag.WriteElementsOnly post_mode = GiDPostMode.GiD_PostBinary multi_file_flag = MultiFileFlag.SingleFile self.gid_io = StructuralGidIO( self.path+self.problem_name, post_mode, multi_file_flag, write_deformed_flag, write_elements ) self.gid_io.ReadModelPart(self.model_part) self.meshWritten = False ## READ DEACTIVATION FILE ######################################## self.deac_file = open(self.path+self.problem_name+".deac",'r' ) self.activation_flags = [0] for line in self.deac_file: val_set = line.split(' ') elem_num = int(val_set[0]) act_level = int(val_set[1]) self.activation_flags.append(act_level) print "input data read OK" #print "+++++++++++++++++++++++++++++++++++++++" #for node in self.model_part.Nodes: # print node #print "+++++++++++++++++++++++++++++++++++++++" #the buffer size should be set up here after the mesh is read for the first time self.model_part.SetBufferSize(2) ################################################################## ## ADD DOFS ###################################################### ################################################################## ekate_solver.AddDofs( self.model_part ) ################################################################## ## INITIALISE SOLVER FOR PARTICULAR SOLUTION ##################### ################################################################## #defining linear solver plinear_solver = SkylineLUFactorizationSolver() self.solver.structure_linear_solver = plinear_solver self.solver.Initialize() (self.solver.solver).SetEchoLevel(2); ################################################################## ## INITIALISE RESTART UTILITY #################################### ################################################################## #restart_utility= RestartUtility( self.problem_name ) def SetUpActivationLevels( self, model_part, activation_list ): for element in self.model_part.Elements: element.SetValue(ACTIVATION_LEVEL, activation_list[element.Id]) # def write_restart_file( self, time ): # print("------------> restart file written for time step: "+str(time)) # self.restart_utility.ChangeFileName(problem_name+str(time)) # self.restart_utility.StoreNodalVariables(model_part) # self.restart_utility.StoreInSituStress(model_part) # self.restart_utility.StoreConstitutiveLawVariables(model_part) # # def restart_time_step( self, time, Dt ): # print("############ time step solution has to be restarted ############") # time = time-Dt # model_part.CloneTimeStep(time) # for step in range(1,11): # time = time+ Dt/10.0 # model_part.CloneTimeStep(time) # ##################################################################################################### # model_part.ProcessInfo.SetValue( QUASI_STATIC_ANALYSIS, True ) # model_part.ProcessInfo.SetValue( FIRST_TIME_STEP, False ) # ##################################################################################################### # solver.Solve() # print("~~~~~~~~~~~~~~ RESTARTED STEP ( DT= "+str(Dt/10.0)+" / Step= "+str(step)+" ) ~~~~~~~~~~~~~~") # print("############ restart finished ############") # # def write_to_file( self, time ): # for i in range(0, len(self.layer_nodes_sets['top'])): # settlements.write(str(time)+"/"+str(model_part.Nodes[layer_nodes_sets['top'][i]].GetZ())+"/"+str(model_part.Nodes[layer_nodes_sets['top'][i]].GetSolutionStepValue(DISPLACEMENT_Z))+"\n") # for i in range(0, len(layer_nodes_sets['side'])): # pressure_air.write(str(time)+"/"+str(model_part.Nodes[layer_nodes_sets['side'][i]].GetZ())+"/"+str(model_part.Nodes[layer_nodes_sets['side'][i]].GetSolutionStepValue(AIR_PRESSURE))+"\n") # pressure_water.write(str(time)+"/"+str(model_part.Nodes[layer_nodes_sets['side'][i]].GetZ())+"/"+str(model_part.Nodes[layer_nodes_sets['side'][i]].GetSolutionStepValue(WATER_PRESSURE))+"\n") # def ApplyInsituWaterPressure( self, free_node_list_water, free_node_list_air, z_zero): gravity_z = -50; water_density= 1000.0; for i in range(1, len(self.model_part.Nodes)+1): if self.model_part.Nodes[i].HasDofFor(WATER_PRESSURE): if (self.model_part.Nodes[i].IsFixed(WATER_PRESSURE)==0): water_pressure= 0.0 self.model_part.Nodes[i].SetSolutionStepValue(WATER_PRESSURE, water_pressure) self.model_part.Nodes[i].SetSolutionStepValue(WATER_PRESSURE_EINS, water_pressure) self.model_part.Nodes[i].SetSolutionStepValue(WATER_PRESSURE_NULL, water_pressure) self.model_part.Nodes[i].Fix(WATER_PRESSURE) free_node_list_water.append(i) if self.model_part.Nodes[i].HasDofFor(AIR_PRESSURE): if (self.model_part.Nodes[i].IsFixed(AIR_PRESSURE)==0): self.model_part.Nodes[i].SetSolutionStepValue(AIR_PRESSURE, 0.0) self.model_part.Nodes[i].SetSolutionStepValue(AIR_PRESSURE_EINS, 0.0) self.model_part.Nodes[i].SetSolutionStepValue(AIR_PRESSURE_NULL, 0.0) self.model_part.Nodes[i].Fix(AIR_PRESSURE) free_node_list_air.append(i) def FreePressureNodes(self,free_node_list_water, free_node_list_air): for item in free_node_list_water: self.model_part.Nodes[item].Free(WATER_PRESSURE) for item in free_node_list_air: self.model_part.Nodes[item].Free(AIR_PRESSURE) def WriteMaterialParameters( self, time, indices ): self.gid_io.OpenResultFile( self.path+self.problem_name, GiDPostMode.GiD_PostBinary) for index in indices: self.gid_io.SuperPrintOnGaussPoints(MATERIAL_PARAMETERS, self.model_part, time, index) self.gid_io.CloseResultFile() def WriteOutput( self, time ): if( self.meshWritten == False ): self.gid_io.InitializeMesh( 0.0 ) mesh = self.model_part.GetMesh() self.gid_io.WriteMesh( mesh ) self.meshWritten = True self.gid_io.FinalizeMesh() self.gid_io.InitializeResults( 0.0, self.model_part.GetMesh() ) print("write nodal displacements") self.gid_io.WriteNodalResults(DISPLACEMENT, self.model_part.Nodes, time, 0) self.gid_io.FinalizeResults() def InitializeModel( self ): ################################################################## ## INITIALISE CONSTITUTIVE LAWS ################################## ################################################################## #set material parameters params1 = Vector(7) params1[0] = 2.1e+11 #Young's Modulus params1[1] = 0.3 #Poisson Ratio params1[2] = 0.0 #Internal Friction Angle params1[3] = 0.0 #Cohesion params1[4] = 0.0 #Compressive Strength params1[5] = 0.0 #Tensile Strength params1[6] = 0.0 #RMR Variance self.model_part.Properties[1].SetValue(MATERIAL_PARAMETERS, params1 ) params2 = Vector(7) params2[0] = 3e+10 #Young's Modulus params2[1] = 0.3 #Poisson Ratio params2[2] = 0.0 #Internal Friction Angle params2[3] = 0.0 #Cohesion params2[4] = 0.0 #Compressive Strength params2[5] = 0.0 #Tensile Strength params2[6] = 0.0 #RMR Variance self.model_part.Properties[2].SetValue(MATERIAL_PARAMETERS, params2 ) self.model_part.Properties[1].SetValue(CONSTITUTIVE_LAW, Isotropic3D() ) print "Linear elastic model selected" self.model_part.Properties[2].SetValue(CONSTITUTIVE_LAW, Isotropic3D() ) print "Linear elastic model selected" ################################################################## ## STORE LAYER SETS ############################################## ################################################################## ## ELEMENTS on layers ############################################ self.layer_sets = {} layer_elements_list = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , ] self.layer_sets['Layer0'] = layer_elements_list ## ELEMENTS on inner boundaries ################################## self.inner_boundary_elements = [ ] ## NODES on layers ############################################### self.layer_nodes_sets = {} layer_nodes_list = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , 64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , 80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 91 , 92 , 93 , 94 , 95 , 96 , 97 , 98 , 99 , 100 , 101 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 , 112 , 113 , 114 , 115 , 116 , 117 , 118 , 119 , 120 , 121 , 122 , 123 , 124 , 125 , 126 , 127 , 128 , 129 , 130 , 131 , 132 , 133 , 134 , 135 , 136 , 137 , 138 , 139 , 140 , 141 , 142 , 143 , 144 , 145 , 146 , 147 , 148 , 149 , 150 , 151 , 152 , 153 , 154 , 155 , 156 , 157 , 158 , 159 , 160 , 161 , 162 , 163 , 164 , 165 , 166 , 167 , 168 , 169 , 170 , 171 , 172 , 173 , 174 , 175 , 176 , 177 , 178 , 179 , 180 , 181 , 182 , 183 , 184 , 185 , 186 , 187 , 188 , 189 , 190 , 191 , 192 , 193 , 194 , 195 , 196 , 197 , 198 , 199 , 200 , 201 , 202 , 203 , 204 , 205 , 206 , 207 , 208 , 209 , 210 , 211 , 212 , 213 , 214 , 215 , 216 , 217 , 218 , 219 , 220 , 221 , 222 , 223 , 224 , 225 , 226 , 227 , 228 , 229 , 230 , 231 , 232 , 233 , 234 , 235 , 236 , 237 , 238 , 239 , 240 , 241 , 242 , 243 , 244 , 245 , 246 , 247 , 248 , 249 , 250 , 251 , 252 , 253 , 254 , 255 , 256 , 257 , 258 , 259 , 260 , 261 , 262 , 263 , 264 , 265 , 266 , 267 , 268 , 269 , 270 , 271 , 272 , 273 , 274 , 275 , 276 , 277 , 278 , 279 , 280 , 281 , 282 , 283 , 284 , 285 , 286 , 287 , 288 , 289 , 290 , 291 , 292 , 293 , 294 , 295 , 296 , 297 , 298 , 299 , 300 , 301 , 302 , 303 , 304 , 305 , 306 , 307 , 308 , 309 , 310 , 311 , 312 , 313 , 314 , 315 , 316 , 317 , 318 , 319 , 320 , 321 , 322 , 323 , 324 , 325 , 326 , 327 , 328 , 329 , 330 , 331 , 332 , 333 , 334 , 335 , 336 , 337 , 338 , 339 , 340 , 341 , 342 , 343 , 344 , 345 , 346 , 347 , 348 , 349 , 350 , 351 , 352 , 353 , 354 , 355 , 356 , 357 , 358 , 359 , 360 , 361 , 362 , 363 , 364 , 365 , 366 , 367 , 368 , 369 , 370 , 371 , 372 , 373 , 374 , 375 , 376 , 377 , 378 , 379 , 380 , 381 , 382 , 383 , 384 , 385 , 386 , 387 , 388 , 389 , 390 , 391 , 392 , 393 , 394 , 395 , 396 , 397 , 398 , 399 , 400 , 401 , 402 , 403 , 404 , 405 , 406 , 407 , 408 , 409 , 410 , 411 , 412 , 413 , 414 , 415 , 416 , 417 , 418 , 419 , 420 , 421 , 422 , 423 , 424 , 425 , 426 , 427 , 428 , 429 , 430 , 431 , 432 , 433 , 434 , 435 , 436 , 437 , 438 , 439 , 440 , 441 , 442 , 443 , 444 , 445 , 446 , 447 , 448 , 449 , 450 , 451 , 452 , 453 , 454 , 455 , 456 , 457 , 458 , 459 , 460 , 461 , 462 , 463 , 464 , 465 , 466 , 467 , 468 , ] self.layer_nodes_sets['Layer0'] = layer_nodes_list ## CONTACT MASTER NODES ########################################## self.contact_master_nodes = [ 6 , 8 , 15 , 22 , 25 , 33 , 37 , 41 , 49 , 55 , 56 , 67 , 73 , 74 , 79 , 91 , 92 , 97 , 109 , 110 , 115 , 127 , 128 , 133 , 145 , 146 , 151 , 163 , 164 , 169 , 181 , 182 , 187 , 199 , 200 , 205 , 217 , 218 , 223 , 231 , 233 , 241 , 244 , 245 , 250 , 262 , 263 , 268 , 280 , 281 , 286 , 298 , 299 , 304 , 316 , 317 , 322 , 334 , 335 , 340 , 352 , 353 , 358 , 370 , 371 , 376 , 388 , 389 , 394 , 406 , 407 , 412 , 424 , 425 , 430 , 442 , 443 , 448 , 456 , 458 , 466 , ] ## CONTACT SLAVE NODES ########################################### self.contact_slave_nodes = [ 3 , 7 , 12 , 20 , 21 , 32 , 40 , 45 , 52 , 62 , 66 , 72 , 83 , 87 , 90 , 102 , 105 , 108 , 120 , 123 , 126 , 138 , 141 , 144 , 156 , 159 , 162 , 174 , 177 , 180 , 192 , 195 , 198 , 210 , 213 , 216 , 228 , 232 , 239 , 253 , 257 , 261 , 273 , 276 , 279 , 291 , 294 , 297 , 309 , 312 , 315 , 327 , 330 , 333 , 345 , 348 , 351 , 363 , 366 , 369 , 381 , 384 , 387 , 399 , 402 , 405 , 417 , 420 , 423 , 435 , 438 , 441 , 453 , 457 , 464 , ] ## INNER BOUNDARY NODES ########################################## self.inner_boundary_nodes = [ ] ################################################################## print "layer sets stored" ################################################################## ## STORE NODES ON GROUND SURFACE ################################# ################################################################## self.top_surface_nodes = [] print "nodes on ground surface stored" ################################################################## ## ACTIVATION #################################################### ################################################################## self.deac = DeactivationUtility() self.SetUpActivationLevels( self.model_part, self.activation_flags ) self.deac.Initialize( self.model_part ) print "activation utility initialized" ################################################################## ## MESH TYING #################################################### ################################################################## self.mesh_tying_utility= MeshTyingUtility() self.mesh_tying_utility.InitializeMeshTyingUtility(self.model_part) print "mesh-tying utility successfully initialized" print "model successfully initialized" self.SetCalculateInSituStress( False ) def FinalizeModel( self ): self.gid_io.CloseResultFile() def SetCalculateInSituStress( self, calculation_flag ): self.insitu_stress_flag = calculation_flag def Solve( self, time, from_deac, to_deac, from_reac, to_reac ): self.deac.Reactivate( self.model_part, from_reac, to_reac ) self.deac.Deactivate( self.model_part, from_deac, to_deac ) self.model_part.CloneTimeStep(time) self.model_part.ProcessInfo.SetValue( CALCULATE_INSITU_STRESS, self.insitu_stress_flag ) self.solver.Solve() ##################################################################
[ 1, 529, 276, 1112, 420, 29958, 29926, 423, 29939, 9429, 574, 29929, 29953, 29929, 29914, 29968, 3605, 359, 29899, 1688, 13, 13383, 13383, 13383, 13383, 2277, 13, 13383, 7346, 3160, 29889, 2272, 259, 835, 13383, 7346, 29937, 13, 13383, 13383, 13383, 13383, 2277, 13, 4136, 29937, 14921, 403, 448, 1174, 29308, 476, 29934, 1299, 3267, 363, 29287, 323, 16163, 1174, 457, 3241, 16101, 13, 4136, 29937, 3509, 1266, 491, 315, 7833, 8186, 29892, 12408, 29892, 13616, 462, 259, 16101, 13, 4136, 29937, 3986, 322, 529, 5813, 29958, 363, 323, 3904, 6007, 10810, 29965, 1783, 4706, 16101, 13, 4136, 29937, 599, 10462, 21676, 462, 462, 1678, 16101, 13, 13383, 13383, 13383, 13383, 2277, 13, 4136, 29937, 4443, 29901, 476, 29934, 1299, 3267, 338, 5492, 1090, 365, 29954, 7390, 462, 1678, 16101, 13, 13383, 13383, 13383, 13383, 2277, 13, 13383, 13383, 13383, 13383, 2277, 13, 13383, 13383, 13383, 13383, 2277, 13, 2277, 15531, 29911, 3919, 2725, 29901, 1244, 278, 1797, 338, 4100, 462, 1678, 16101, 13, 13383, 13383, 13383, 13383, 2277, 13, 2277, 3704, 413, 3605, 359, 2224, 462, 462, 268, 16101, 13, 2277, 15531, 29911, 3919, 2725, 29901, 278, 1494, 3454, 505, 304, 367, 23430, 304, 418, 16101, 13, 2277, 9651, 1993, 596, 1274, 2273, 950, 5285, 1669, 16101, 13, 13383, 13383, 13383, 13383, 2277, 13, 29895, 3605, 359, 29918, 10254, 29918, 2084, 353, 8207, 5184, 29914, 29882, 2007, 29874, 29914, 29895, 3605, 359, 29918, 2997, 29914, 29895, 3605, 359, 29914, 10254, 22208, 444, 29895, 3605, 359, 29918, 4632, 29914, 10254, 13, 29937, 29895, 3605, 359, 29918, 10254, 29918, 2084, 353, 8207, 5184, 29914, 29882, 2007, 29874, 29914, 29895, 3605, 359, 29934, 29896, 29914, 10254, 22208, 444, 29895, 3605, 359, 29918, 4632, 29914, 10254, 13, 29895, 3605, 359, 29918, 932, 5795, 29918, 2084, 353, 8207, 5184, 29914, 29882, 2007, 29874, 29914, 29895, 3605, 359, 29918, 2997, 29914, 29895, 3605, 359, 29914, 932, 5795, 22208, 444, 29895, 3605, 359, 29918, 4632, 29914, 932, 5795, 13, 29937, 29895, 3605, 359, 29918, 932, 5795, 29918, 2084, 353, 8207, 5184, 29914, 29882, 2007, 29874, 29914, 29895, 3605, 359, 29934, 29896, 29914, 932, 5795, 22208, 444, 29895, 3605, 359, 29918, 4632, 29914, 932, 5795, 13, 1416, 403, 29918, 2993, 2638, 653, 29918, 2084, 353, 8207, 5184, 29914, 29882, 2007, 29874, 29914, 29895, 3605, 359, 29918, 2997, 29914, 29895, 3605, 359, 29914, 932, 5795, 29914, 1416, 403, 29918, 2993, 2638, 653, 29918, 6214, 29914, 4691, 29918, 16713, 29915, 13, 29937, 1416, 403, 29918, 2993, 2638, 653, 29918, 2084, 353, 8207, 5184, 29914, 29882, 2007, 29874, 29914, 29895, 3605, 359, 29934, 29896, 29914, 932, 5795, 29914, 1416, 403, 29918, 2993, 2638, 653, 29918, 6214, 29914, 4691, 29918, 16713, 29915, 13, 13383, 13383, 13383, 13383, 2277, 13, 13383, 13383, 13383, 13383, 2277, 13, 5215, 10876, 13, 9675, 29889, 2084, 29889, 4397, 29898, 29895, 3605, 359, 29918, 10254, 29918, 2084, 29897, 13, 9675, 29889, 2084, 29889, 4397, 29898, 29895, 3605, 359, 29918, 932, 5795, 29918, 2084, 29897, 13, 9675, 29889, 2084, 29889, 4397, 29898, 1416, 403, 29918, 2993, 2638, 653, 29918, 2084, 29897, 13, 13, 29937, 5215, 292, 476, 3605, 359, 1667, 3489, 13, 3166, 476, 3605, 359, 1053, 334, 13, 17460, 353, 476, 5851, 580, 259, 396, 1753, 2827, 8466, 13, 13, 29937, 5215, 292, 8324, 13, 5215, 8324, 29918, 13248, 13, 932, 5795, 29918, 13248, 29889, 17518, 29918, 19560, 3631, 4873, 353, 5852, 13, 932, 5795, 29918, 13248, 29889, 17518, 29918, 29923, 29895, 403, 29909, 1314, 2638, 653, 4873, 353, 5852, 13, 932, 5795, 29918, 13248, 29889, 17518, 29918, 25865, 12075, 277, 11067, 29931, 10467, 4873, 353, 5852, 13, 932, 5795, 29918, 13248, 29889, 17518, 2052, 5795, 29898, 17460, 29892, 413, 3605, 359, 29918, 932, 5795, 29918, 2084, 29897, 13, 3166, 476, 3605, 359, 19560, 3631, 4873, 1053, 334, 13, 3166, 476, 3605, 359, 25865, 13296, 874, 4873, 1053, 334, 13, 3166, 476, 3605, 359, 29923, 29895, 403, 29909, 1314, 2638, 653, 4873, 1053, 334, 13, 3166, 476, 3605, 359, 25865, 12075, 277, 11067, 29931, 10467, 4873, 1053, 334, 13, 13383, 13383, 13383, 13383, 2277, 13, 13383, 13383, 13383, 13383, 2277, 13, 1990, 8125, 29901, 13, 4706, 822, 4770, 2344, 12035, 1583, 29892, 1108, 29918, 978, 29892, 2224, 29871, 1125, 13, 18884, 396, 26740, 278, 5354, 2159, 363, 278, 1108, 304, 367, 7484, 13, 18884, 1583, 29889, 7247, 29918, 2311, 353, 29871, 29941, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 5012, 29943, 8895, 16999, 2287, 13208, 8322, 835, 13383, 13383, 7346, 2277, 29937, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 1583, 29889, 4299, 29918, 1595, 353, 8125, 7439, 703, 1416, 403, 29918, 3601, 2785, 1159, 13, 18884, 1583, 29889, 2084, 353, 2224, 13, 18884, 1583, 29889, 17199, 29918, 978, 353, 1108, 29918, 978, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 5012, 29943, 8895, 317, 5607, 5348, 835, 13383, 13383, 7346, 4136, 2277, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 396, 5183, 17402, 4128, 13, 18884, 1353, 29918, 974, 29918, 2230, 29918, 24530, 353, 29871, 29896, 13, 18884, 1583, 29889, 15916, 29918, 16744, 353, 5159, 13, 18884, 396, 2793, 310, 7418, 29918, 16744, 29901, 13, 18884, 396, 2189, 29918, 12346, 29918, 15916, 29918, 15581, 13, 18884, 396, 27368, 995, 363, 4226, 6958, 13, 18884, 396, 7472, 1353, 310, 318, 1362, 2766, 24372, 13, 18884, 396, 1424, 2463, 10825, 13, 18884, 396, 27368, 995, 363, 1424, 919, 1848, 6958, 13, 18884, 396, 6958, 29918, 8896, 29918, 3198, 29918, 15581, 13, 18884, 396, 6958, 29918, 29878, 1160, 29918, 2238, 1997, 583, 29918, 15581, 13, 18884, 396, 7472, 27368, 995, 363, 4226, 6958, 13, 18884, 396, 364, 1160, 28770, 291, 363, 4226, 6958, 13, 18884, 396, 364, 1160, 7329, 363, 4226, 6958, 13, 18884, 396, 7472, 27368, 995, 363, 1424, 919, 1848, 6958, 13, 18884, 396, 364, 1160, 28770, 291, 363, 1424, 919, 1848, 6958, 13, 18884, 396, 364, 1160, 7329, 363, 1424, 919, 1848, 6958, 13, 18884, 2189, 29918, 12346, 29918, 15916, 29918, 15581, 353, 5852, 13, 18884, 396, 15859, 6958, 7418, 29901, 5183, 6958, 4128, 13, 18884, 27368, 353, 308, 29896, 29872, 29974, 29896, 29900, 13, 18884, 4236, 29884, 1362, 2766, 353, 29871, 29906, 29945, 13, 18884, 1424, 2463, 353, 632, 29900, 13, 18884, 1424, 2463, 2238, 18745, 353, 308, 29896, 29872, 29974, 29900, 29945, 13, 18884, 6958, 29918, 8896, 29918, 3198, 29918, 15581, 353, 7700, 13, 18884, 6958, 29918, 29878, 1160, 29918, 2238, 1997, 583, 29918, 15581, 353, 7700, 13, 18884, 4236, 2238, 18745, 353, 27368, 13, 18884, 364, 1160, 29883, 5385, 291, 353, 29871, 29900, 29889, 29900, 13, 18884, 364, 16817, 7168, 353, 29871, 29900, 29889, 29900, 13, 18884, 1424, 293, 3317, 2238, 18745, 353, 27368, 13, 18884, 1424, 293, 29878, 1160, 29883, 5385, 291, 353, 29871, 29900, 29889, 29900, 13, 18884, 1424, 293, 29878, 16817, 7168, 353, 29871, 29900, 29889, 29900, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 19826, 29918, 12346, 29918, 15916, 29918, 15581, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 2238, 18745, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 3317, 29884, 1362, 2766, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 1341, 2463, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 1341, 2463, 2238, 18745, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 12346, 29918, 8896, 29918, 3198, 29918, 15581, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 12346, 29918, 29878, 1160, 29918, 2238, 1997, 583, 29918, 15581, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 3317, 2238, 18745, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 29878, 1160, 29883, 5385, 291, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 29878, 16817, 7168, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 1341, 293, 3317, 2238, 18745, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 1341, 293, 29878, 1160, 29883, 5385, 291, 29897, 13, 18884, 1583, 29889, 15916, 29918, 16744, 29889, 4397, 29898, 1341, 293, 29878, 16817, 7168, 29897, 13, 462, 13, 18884, 6425, 29918, 25027, 353, 308, 29896, 29872, 29899, 29900, 29953, 13, 18884, 1104, 29918, 25027, 353, 4706, 29900, 29889, 29900, 29900, 29900, 29896, 13, 462, 13, 18884, 444, 14655, 899, 369, 13, 18884, 1053, 14921, 403, 29918, 2929, 369, 13, 18884, 1583, 29889, 2929, 369, 353, 14921, 403, 29918, 2929, 369, 29889, 29923, 29895, 403, 13296, 369, 29898, 1583, 29889, 4299, 29918, 1595, 29892, 1583, 29889, 7247, 29918, 2311, 29892, 1353, 29918, 974, 29918, 2230, 29918, 24530, 29892, 1583, 29889, 15916, 29918, 16744, 29892, 6425, 29918, 25027, 29892, 1104, 29918, 25027, 1723, 13, 18884, 14921, 403, 29918, 2929, 369, 29889, 2528, 10444, 1849, 29898, 1583, 29889, 4299, 29918, 1595, 1723, 13, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 5195, 3035, 16999, 2287, 13208, 8322, 835, 13383, 13383, 7346, 4136, 29937, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 396, 19715, 263, 1904, 13, 18884, 2436, 29918, 311, 15628, 29918, 15581, 353, 14350, 2772, 15628, 29924, 12094, 21979, 29889, 6113, 29965, 17720, 15628, 13, 18884, 2436, 29918, 17664, 353, 14350, 10983, 2187, 21979, 29889, 6113, 18868, 11730, 13, 18884, 1400, 29918, 8513, 353, 4406, 29928, 6747, 6818, 29889, 26074, 29928, 29918, 6747, 25196, 13, 18884, 2473, 29918, 1445, 29918, 15581, 353, 14974, 2283, 21979, 29889, 15771, 2283, 13, 18884, 1583, 29889, 29887, 333, 29918, 601, 353, 28771, 3631, 29954, 333, 5971, 29898, 1583, 29889, 2084, 29974, 1311, 29889, 17199, 29918, 978, 29892, 1400, 29918, 8513, 29892, 2473, 29918, 1445, 29918, 15581, 29892, 2436, 29918, 311, 15628, 29918, 15581, 29892, 2436, 29918, 17664, 1723, 13, 18884, 1583, 29889, 29887, 333, 29918, 601, 29889, 6359, 3195, 7439, 29898, 1311, 29889, 4299, 29918, 1595, 29897, 13, 18884, 1583, 29889, 4467, 29882, 29956, 20833, 353, 7700, 13, 18884, 444, 5195, 3035, 5012, 17923, 5667, 8098, 24080, 835, 13383, 13383, 4136, 29937, 13, 18884, 1583, 29889, 311, 562, 29918, 1445, 353, 1722, 29898, 1311, 29889, 2084, 29974, 1311, 29889, 17199, 29918, 978, 29974, 1642, 311, 562, 613, 29915, 29878, 29915, 1723, 13, 18884, 1583, 29889, 11236, 362, 29918, 15764, 353, 518, 29900, 29962, 13, 18884, 363, 1196, 297, 1583, 29889, 311, 562, 29918, 1445, 29901, 13, 462, 4706, 659, 29918, 842, 353, 1196, 29889, 5451, 877, 25710, 13, 462, 4706, 21268, 29918, 1949, 353, 938, 29898, 791, 29918, 842, 29961, 29900, 2314, 13, 462, 4706, 1044, 29918, 5563, 353, 938, 29898, 791, 29918, 842, 29961, 29896, 2314, 13, 462, 4706, 1583, 29889, 11236, 362, 29918, 15764, 29889, 4397, 29898, 627, 29918, 5563, 29897, 13, 18884, 1596, 376, 2080, 848, 1303, 9280, 29908, 13, 18884, 396, 2158, 376, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 13578, 13, 18884, 396, 1454, 2943, 297, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29901, 13, 18884, 396, 4706, 1596, 2943, 13, 18884, 396, 2158, 376, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 1817, 13578, 13, 462, 13, 18884, 396, 1552, 6835, 2159, 881, 367, 731, 701, 1244, 1156, 278, 27716, 338, 1303, 363, 278, 937, 931, 13, 18884, 1583, 29889, 4299, 29918, 1595, 29889, 2697, 7701, 3505, 29898, 29906, 29897, 13, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 27827, 360, 9800, 29903, 835, 13383, 13383, 13383, 2277, 29937, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 462, 13, 18884, 14921, 403, 29918, 2929, 369, 29889, 2528, 29928, 974, 29879, 29898, 1583, 29889, 4299, 29918, 1595, 1723, 13, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 2672, 1806, 25758, 29902, 1660, 317, 5607, 5348, 15842, 349, 8322, 2965, 13309, 1718, 317, 5607, 2692, 2725, 835, 13383, 2277, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 396, 1753, 2827, 5608, 899, 369, 13, 18884, 715, 457, 279, 29918, 2929, 369, 353, 16572, 1220, 29931, 29965, 29943, 7168, 2133, 13296, 369, 580, 13, 18884, 1583, 29889, 2929, 369, 29889, 23905, 29918, 10660, 29918, 2929, 369, 353, 715, 457, 279, 29918, 2929, 369, 13, 18884, 1583, 29889, 2929, 369, 29889, 6644, 6646, 580, 13, 18884, 313, 1311, 29889, 2929, 369, 29889, 2929, 369, 467, 2697, 29923, 1859, 10108, 29898, 29906, 416, 13, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 2672, 1806, 25758, 29902, 1660, 16759, 8322, 501, 29911, 6227, 11937, 835, 13383, 13383, 29937, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 396, 5060, 442, 29918, 329, 1793, 29922, 11654, 442, 7270, 537, 29898, 1583, 29889, 17199, 29918, 978, 1723, 13, 462, 13, 4706, 822, 3789, 3373, 21786, 362, 10108, 29879, 29898, 1583, 29892, 1904, 29918, 1595, 29892, 26229, 29918, 1761, 29871, 1125, 13, 18884, 363, 1543, 297, 1583, 29889, 4299, 29918, 1595, 29889, 18868, 29901, 13, 462, 4706, 1543, 29889, 2697, 1917, 29898, 17923, 5667, 8098, 29918, 1307, 29963, 6670, 29892, 26229, 29918, 1761, 29961, 5029, 29889, 1204, 2314, 13, 13, 29937, 4706, 822, 2436, 29918, 5060, 442, 29918, 1445, 29898, 1583, 29892, 931, 29871, 1125, 13, 29937, 18884, 1596, 703, 9072, 29958, 10715, 934, 3971, 363, 931, 4331, 29901, 15691, 710, 29898, 2230, 876, 13, 29937, 18884, 1583, 29889, 5060, 442, 29918, 329, 1793, 29889, 7277, 17020, 29898, 17199, 29918, 978, 29974, 710, 29898, 2230, 876, 13, 29937, 18884, 1583, 29889, 5060, 442, 29918, 329, 1793, 29889, 9044, 29940, 397, 284, 10444, 1849, 29898, 4299, 29918, 1595, 29897, 13, 29937, 18884, 1583, 29889, 5060, 442, 29918, 329, 1793, 29889, 9044, 797, 29903, 1981, 5015, 404, 29898, 4299, 29918, 1595, 29897, 13, 29937, 18884, 1583, 29889, 5060, 442, 29918, 329, 1793, 29889, 9044, 12075, 277, 11067, 29931, 1450, 10444, 1849, 29898, 4299, 29918, 1595, 29897, 13, 29937, 13, 29937, 4706, 822, 10715, 29918, 2230, 29918, 10568, 29898, 1583, 29892, 931, 29892, 360, 29873, 29871, 1125, 13, 29937, 18884, 1596, 703, 7346, 4136, 931, 4331, 1650, 756, 304, 367, 10715, 287, 835, 7346, 29937, 1159, 13, 29937, 18884, 931, 353, 931, 29899, 29928, 29873, 13, 29937, 18884, 1904, 29918, 1595, 29889, 6821, 650, 2481, 14448, 29898, 2230, 29897, 13, 29937, 18884, 363, 4331, 297, 3464, 29898, 29896, 29892, 29896, 29896, 1125, 13, 29937, 462, 4706, 931, 353, 931, 29974, 360, 29873, 29914, 29896, 29900, 29889, 29900, 13, 29937, 462, 4706, 1904, 29918, 1595, 29889, 6821, 650, 2481, 14448, 29898, 2230, 29897, 13, 29937, 462, 4706, 835, 13383, 13383, 13383, 13383, 13383, 13383, 2277, 13, 29937, 462, 4706, 1904, 29918, 1595, 29889, 7032, 3401, 29889, 2697, 1917, 29898, 660, 29965, 3289, 29902, 29918, 17816, 2965, 29918, 2190, 1964, 21554, 3235, 29892, 5852, 1723, 13, 29937, 462, 4706, 1904, 29918, 1595, 29889, 7032, 3401, 29889, 2697, 1917, 29898, 383, 8193, 1254, 29918, 15307, 29918, 1254, 15488, 29892, 7700, 1723, 13, 29937, 462, 4706, 835, 13383, 13383, 13383, 13383, 13383, 13383, 2277, 13, 29937, 462, 4706, 899, 369, 29889, 13296, 345, 580, 13, 29937, 462, 4706, 1596, 703, 26594, 14087, 7377, 16759, 8322, 3352, 317, 4330, 29925, 313, 360, 29911, 29922, 15691, 710, 29898, 29928, 29873, 29914, 29896, 29900, 29889, 29900, 7240, 29908, 847, 16696, 29922, 15691, 710, 29898, 10568, 7240, 29908, 1723, 3695, 26594, 14087, 30022, 1159, 13, 29937, 18884, 1596, 703, 7346, 4136, 10715, 7743, 835, 7346, 29937, 1159, 13, 29937, 13, 29937, 4706, 822, 2436, 29918, 517, 29918, 1445, 29898, 1583, 29892, 931, 29871, 1125, 13, 29937, 18884, 363, 474, 297, 3464, 29898, 29900, 29892, 7431, 29898, 1311, 29889, 13148, 29918, 18010, 29918, 7224, 1839, 3332, 2033, 22164, 13, 29937, 462, 4706, 16493, 29879, 29889, 3539, 29898, 710, 29898, 2230, 7240, 29908, 12975, 29974, 710, 29898, 4299, 29918, 1595, 29889, 20284, 29961, 13148, 29918, 18010, 29918, 7224, 1839, 3332, 2033, 29961, 29875, 29962, 1822, 2577, 29999, 3101, 13578, 12975, 29974, 710, 29898, 4299, 29918, 1595, 29889, 20284, 29961, 13148, 29918, 18010, 29918, 7224, 1839, 3332, 2033, 29961, 29875, 29962, 1822, 2577, 13296, 918, 14448, 1917, 29898, 23711, 7390, 11538, 13780, 29918, 29999, 876, 13578, 29905, 29876, 1159, 13, 29937, 4706, 363, 474, 297, 3464, 29898, 29900, 29892, 7431, 29898, 13148, 29918, 18010, 29918, 7224, 1839, 2975, 2033, 22164, 13, 29937, 18884, 12959, 29918, 1466, 29889, 3539, 29898, 710, 29898, 2230, 7240, 29908, 12975, 29974, 710, 29898, 4299, 29918, 1595, 29889, 20284, 29961, 13148, 29918, 18010, 29918, 7224, 1839, 2975, 2033, 29961, 29875, 29962, 1822, 2577, 29999, 3101, 13578, 12975, 29974, 710, 29898, 4299, 29918, 1595, 29889, 20284, 29961, 13148, 29918, 18010, 29918, 7224, 1839, 2975, 2033, 29961, 29875, 29962, 1822, 2577, 13296, 918, 14448, 1917, 29898, 29909, 8193, 29918, 15094, 1799, 11499, 876, 13578, 29905, 29876, 1159, 13, 29937, 18884, 12959, 29918, 13405, 29889, 3539, 29898, 710, 29898, 2230, 7240, 29908, 12975, 29974, 710, 29898, 4299, 29918, 1595, 29889, 20284, 29961, 13148, 29918, 18010, 29918, 7224, 1839, 2975, 2033, 29961, 29875, 29962, 1822, 2577, 29999, 3101, 13578, 12975, 29974, 710, 29898, 4299, 29918, 1595, 29889, 20284, 29961, 13148, 29918, 18010, 29918, 7224, 1839, 2975, 2033, 29961, 29875, 29962, 1822, 2577, 13296, 918, 14448, 1917, 29898, 29956, 1299, 1001, 29918, 15094, 1799, 11499, 876, 13578, 29905, 29876, 1159, 13, 29937, 13, 13, 4706, 822, 2401, 368, 797, 29879, 1981, 29956, 1008, 10923, 545, 29898, 1583, 29892, 3889, 29918, 3177, 29918, 1761, 29918, 13405, 29892, 3889, 29918, 3177, 29918, 1761, 29918, 1466, 29892, 503, 29918, 9171, 1125, 13, 18884, 20953, 29918, 29920, 353, 3986, 448, 29945, 29900, 29936, 13, 18884, 4094, 29918, 21518, 537, 29922, 29871, 29896, 29900, 29900, 29900, 29889, 29900, 29936, 13, 18884, 363, 474, 297, 3464, 29898, 29896, 29892, 7431, 29898, 1311, 29889, 4299, 29918, 1595, 29889, 20284, 7240, 29896, 1125, 13, 462, 4706, 565, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 14510, 29928, 974, 2831, 29898, 29956, 1299, 1001, 29918, 15094, 1799, 11499, 1125, 13, 462, 18884, 565, 313, 1311, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 3624, 26262, 29898, 29956, 1299, 1001, 29918, 15094, 1799, 11499, 29897, 1360, 29900, 1125, 462, 13, 462, 462, 4706, 4094, 29918, 2139, 545, 29922, 29871, 29900, 29889, 29900, 13, 462, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 2697, 13296, 918, 14448, 1917, 29898, 29956, 1299, 1001, 29918, 15094, 1799, 11499, 29892, 4094, 29918, 2139, 545, 29897, 13, 462, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 2697, 13296, 918, 14448, 1917, 29898, 29956, 1299, 1001, 29918, 15094, 1799, 11499, 29918, 29923, 1177, 29903, 29892, 4094, 29918, 2139, 545, 29897, 13, 462, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 2697, 13296, 918, 14448, 1917, 29898, 29956, 1299, 1001, 29918, 15094, 1799, 11499, 29918, 10074, 29892, 4094, 29918, 2139, 545, 29897, 13, 462, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 29943, 861, 29898, 29956, 1299, 1001, 29918, 15094, 1799, 11499, 29897, 13, 462, 462, 4706, 3889, 29918, 3177, 29918, 1761, 29918, 13405, 29889, 4397, 29898, 29875, 29897, 13, 462, 4706, 565, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 14510, 29928, 974, 2831, 29898, 29909, 8193, 29918, 15094, 1799, 11499, 1125, 13, 462, 18884, 565, 313, 1311, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 3624, 26262, 29898, 29909, 8193, 29918, 15094, 1799, 11499, 29897, 1360, 29900, 1125, 13, 462, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 2697, 13296, 918, 14448, 1917, 29898, 29909, 8193, 29918, 15094, 1799, 11499, 29892, 29871, 29900, 29889, 29900, 29897, 13, 462, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 2697, 13296, 918, 14448, 1917, 29898, 29909, 8193, 29918, 15094, 1799, 11499, 29918, 29923, 1177, 29903, 29892, 29871, 29900, 29889, 29900, 29897, 13, 462, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 2697, 13296, 918, 14448, 1917, 29898, 29909, 8193, 29918, 15094, 1799, 11499, 29918, 10074, 29892, 29871, 29900, 29889, 29900, 29897, 13, 462, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 29875, 1822, 29943, 861, 29898, 29909, 8193, 29918, 15094, 1799, 11499, 29897, 13, 462, 462, 4706, 3889, 29918, 3177, 29918, 1761, 29918, 1466, 29889, 4397, 29898, 29875, 29897, 13, 13, 4706, 822, 12362, 10923, 545, 20284, 29898, 1311, 29892, 9021, 29918, 3177, 29918, 1761, 29918, 13405, 29892, 3889, 29918, 3177, 29918, 1761, 29918, 1466, 1125, 13, 18884, 363, 2944, 297, 3889, 29918, 3177, 29918, 1761, 29918, 13405, 29901, 13, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 667, 1822, 20475, 29898, 29956, 1299, 1001, 29918, 15094, 1799, 11499, 29897, 13, 18884, 363, 2944, 297, 3889, 29918, 3177, 29918, 1761, 29918, 1466, 29901, 13, 462, 4706, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29961, 667, 1822, 20475, 29898, 29909, 8193, 29918, 15094, 1799, 11499, 29897, 13, 462, 308, 13, 4706, 822, 14350, 24095, 11507, 29898, 1583, 29892, 931, 29892, 16285, 29871, 1125, 13, 18884, 1583, 29889, 29887, 333, 29918, 601, 29889, 6585, 3591, 2283, 29898, 1583, 29889, 2084, 29974, 1311, 29889, 17199, 29918, 978, 29892, 4406, 29928, 6747, 6818, 29889, 26074, 29928, 29918, 6747, 25196, 29897, 13, 18884, 363, 2380, 297, 16285, 29901, 13, 462, 4706, 1583, 29889, 29887, 333, 29918, 601, 29889, 19111, 11816, 2951, 29954, 11214, 20325, 29898, 29924, 1299, 1001, 25758, 29918, 16320, 25797, 4945, 29903, 29892, 1583, 29889, 4299, 29918, 1595, 29892, 931, 29892, 2380, 29897, 13, 18884, 1583, 29889, 29887, 333, 29918, 601, 29889, 11123, 3591, 2283, 580, 13, 462, 13, 4706, 822, 14350, 6466, 29898, 1583, 29892, 931, 29871, 1125, 13, 18884, 565, 29898, 1583, 29889, 4467, 29882, 29956, 20833, 1275, 7700, 29871, 1125, 13, 462, 4706, 1583, 29889, 29887, 333, 29918, 601, 29889, 6644, 6646, 29924, 12094, 29898, 29871, 29900, 29889, 29900, 1723, 13, 462, 4706, 27716, 353, 1583, 29889, 4299, 29918, 1595, 29889, 2577, 29924, 12094, 580, 13, 462, 4706, 1583, 29889, 29887, 333, 29918, 601, 29889, 6113, 29924, 12094, 29898, 27716, 1723, 13, 462, 4706, 1583, 29889, 4467, 29882, 29956, 20833, 353, 5852, 13, 462, 4706, 1583, 29889, 29887, 333, 29918, 601, 29889, 15790, 675, 29924, 12094, 580, 13, 18884, 1583, 29889, 29887, 333, 29918, 601, 29889, 6644, 6646, 12191, 29898, 29871, 29900, 29889, 29900, 29892, 1583, 29889, 4299, 29918, 1595, 29889, 2577, 29924, 12094, 580, 1723, 13, 18884, 1596, 703, 3539, 18778, 284, 12272, 4620, 4110, 1159, 13, 18884, 1583, 29889, 29887, 333, 29918, 601, 29889, 6113, 29940, 397, 284, 12191, 29898, 23711, 7390, 11538, 13780, 29892, 1583, 29889, 4299, 29918, 1595, 29889, 20284, 29892, 931, 29892, 29871, 29900, 29897, 13, 18884, 1583, 29889, 29887, 333, 29918, 601, 29889, 15790, 675, 12191, 580, 13, 462, 462, 13, 4706, 822, 25455, 3195, 29898, 1583, 29871, 1125, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 2672, 1806, 25758, 29902, 1660, 8707, 1254, 1806, 2692, 18474, 17900, 7811, 835, 13383, 7346, 4136, 2277, 29937, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 396, 842, 5518, 4128, 13, 18884, 8636, 29896, 353, 16510, 29898, 29955, 29897, 13, 18884, 8636, 29896, 29961, 29900, 29962, 353, 539, 29906, 29889, 29896, 29872, 29974, 29896, 29896, 396, 3492, 865, 29915, 29879, 3382, 14999, 13, 18884, 8636, 29896, 29961, 29896, 29962, 353, 965, 29900, 29889, 29941, 396, 9837, 17387, 17450, 601, 13, 18884, 8636, 29896, 29961, 29906, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 16491, 4693, 2463, 3218, 280, 13, 18884, 8636, 29896, 29961, 29941, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 29907, 1148, 267, 291, 13, 18884, 8636, 29896, 29961, 29946, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 1523, 2139, 573, 3767, 1477, 29871, 13, 18884, 8636, 29896, 29961, 29945, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 29911, 575, 488, 3767, 1477, 13, 18884, 8636, 29896, 29961, 29953, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 29934, 21055, 11681, 8837, 13, 18884, 1583, 29889, 4299, 29918, 1595, 29889, 11857, 29961, 29896, 1822, 2697, 1917, 29898, 29924, 1299, 1001, 25758, 29918, 16320, 25797, 4945, 29903, 29892, 8636, 29896, 1723, 13, 18884, 8636, 29906, 353, 16510, 29898, 29955, 29897, 13, 18884, 8636, 29906, 29961, 29900, 29962, 353, 308, 29941, 29872, 29974, 29896, 29900, 396, 3492, 865, 29915, 29879, 3382, 14999, 13, 18884, 8636, 29906, 29961, 29896, 29962, 353, 965, 29900, 29889, 29941, 396, 9837, 17387, 17450, 601, 13, 18884, 8636, 29906, 29961, 29906, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 16491, 4693, 2463, 3218, 280, 13, 18884, 8636, 29906, 29961, 29941, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 29907, 1148, 267, 291, 13, 18884, 8636, 29906, 29961, 29946, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 1523, 2139, 573, 3767, 1477, 29871, 13, 18884, 8636, 29906, 29961, 29945, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 29911, 575, 488, 3767, 1477, 13, 18884, 8636, 29906, 29961, 29953, 29962, 353, 29871, 29900, 29889, 29900, 462, 3986, 396, 29934, 21055, 11681, 8837, 13, 18884, 1583, 29889, 4299, 29918, 1595, 29889, 11857, 29961, 29906, 1822, 2697, 1917, 29898, 29924, 1299, 1001, 25758, 29918, 16320, 25797, 4945, 29903, 29892, 8636, 29906, 1723, 13, 18884, 1583, 29889, 4299, 29918, 1595, 29889, 11857, 29961, 29896, 1822, 2697, 1917, 29898, 6007, 1254, 1806, 2692, 18474, 29918, 4375, 29956, 29892, 1317, 28467, 293, 29941, 29928, 580, 1723, 13, 18884, 1596, 376, 12697, 560, 6288, 1904, 4629, 29908, 13, 18884, 1583, 29889, 4299, 29918, 1595, 29889, 11857, 29961, 29906, 1822, 2697, 1917, 29898, 6007, 1254, 1806, 2692, 18474, 29918, 4375, 29956, 29892, 1317, 28467, 293, 29941, 29928, 580, 1723, 13, 18884, 1596, 376, 12697, 560, 6288, 1904, 4629, 29908, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 317, 4986, 1525, 17900, 29979, 1001, 11368, 29903, 835, 13383, 13383, 7346, 2277, 29937, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 382, 1307, 13780, 29903, 373, 15359, 835, 13383, 13383, 7346, 29937, 13, 18884, 1583, 29889, 13148, 29918, 7224, 353, 6571, 13, 18884, 7546, 29918, 17664, 29918, 1761, 353, 518, 13, 462, 29896, 1919, 13, 462, 29906, 1919, 13, 462, 29941, 1919, 13, 462, 29946, 1919, 13, 462, 29945, 1919, 13, 462, 29953, 1919, 13, 462, 29955, 1919, 13, 462, 29947, 1919, 13, 462, 29929, 1919, 13, 462, 29896, 29900, 1919, 13, 462, 29896, 29896, 1919, 13, 462, 29896, 29906, 1919, 13, 462, 29896, 29941, 1919, 13, 462, 29896, 29946, 1919, 13, 462, 29896, 29945, 1919, 13, 462, 29896, 29953, 1919, 13, 462, 29896, 29955, 1919, 13, 462, 29896, 29947, 1919, 13, 462, 29896, 29929, 1919, 13, 462, 29906, 29900, 1919, 13, 462, 29906, 29896, 1919, 13, 462, 29906, 29906, 1919, 13, 462, 29906, 29941, 1919, 13, 462, 29906, 29946, 1919, 13, 462, 29906, 29945, 1919, 13, 18884, 4514, 13, 18884, 1583, 29889, 13148, 29918, 7224, 1839, 14420, 29900, 2033, 353, 7546, 29918, 17664, 29918, 1761, 13, 18884, 444, 382, 1307, 13780, 29903, 373, 6426, 24371, 835, 13383, 7346, 4136, 2277, 29937, 13, 18884, 1583, 29889, 3993, 29918, 9917, 653, 29918, 17664, 353, 518, 13, 18884, 4514, 13, 18884, 444, 11698, 2287, 29903, 373, 15359, 835, 13383, 13383, 7346, 4136, 13, 18884, 1583, 29889, 13148, 29918, 18010, 29918, 7224, 353, 6571, 13, 18884, 7546, 29918, 18010, 29918, 1761, 353, 518, 13, 632, 29896, 1919, 13, 632, 29906, 1919, 13, 632, 29941, 1919, 13, 632, 29946, 1919, 13, 632, 29945, 1919, 13, 632, 29953, 1919, 13, 632, 29955, 1919, 13, 632, 29947, 1919, 13, 632, 29929, 1919, 13, 632, 29896, 29900, 1919, 13, 632, 29896, 29896, 1919, 13, 632, 29896, 29906, 1919, 13, 632, 29896, 29941, 1919, 13, 632, 29896, 29946, 1919, 13, 632, 29896, 29945, 1919, 13, 632, 29896, 29953, 1919, 13, 632, 29896, 29955, 1919, 13, 632, 29896, 29947, 1919, 13, 632, 29896, 29929, 1919, 13, 632, 29906, 29900, 1919, 13, 632, 29906, 29896, 1919, 13, 632, 29906, 29906, 1919, 13, 632, 29906, 29941, 1919, 13, 632, 29906, 29946, 1919, 13, 632, 29906, 29945, 1919, 13, 632, 29906, 29953, 1919, 13, 632, 29906, 29955, 1919, 13, 632, 29906, 29947, 1919, 13, 632, 29906, 29929, 1919, 13, 632, 29941, 29900, 1919, 13, 632, 29941, 29896, 1919, 13, 632, 29941, 29906, 1919, 13, 632, 29941, 29941, 1919, 13, 632, 29941, 29946, 1919, 13, 632, 29941, 29945, 1919, 13, 632, 29941, 29953, 1919, 13, 632, 29941, 29955, 1919, 13, 632, 29941, 29947, 1919, 13, 632, 29941, 29929, 1919, 13, 632, 29946, 29900, 1919, 13, 632, 29946, 29896, 1919, 13, 632, 29946, 29906, 1919, 13, 632, 29946, 29941, 1919, 13, 632, 29946, 29946, 1919, 13, 632, 29946, 29945, 1919, 13, 632, 29946, 29953, 1919, 13, 632, 29946, 29955, 1919, 13, 632, 29946, 29947, 1919, 13, 632, 29946, 29929, 1919, 13, 632, 29945, 29900, 1919, 13, 632, 29945, 29896, 1919, 13, 632, 29945, 29906, 1919, 13, 632, 29945, 29941, 1919, 13, 632, 29945, 29946, 1919, 13, 632, 29945, 29945, 1919, 13, 632, 29945, 29953, 1919, 13, 632, 29945, 29955, 1919, 13, 632, 29945, 29947, 1919, 13, 632, 29945, 29929, 1919, 13, 632, 29953, 29900, 1919, 13, 632, 29953, 29896, 1919, 13, 632, 29953, 29906, 1919, 13, 632, 29953, 29941, 1919, 13, 632, 29953, 29946, 1919, 13, 632, 29953, 29945, 1919, 13, 632, 29953, 29953, 1919, 13, 632, 29953, 29955, 1919, 13, 632, 29953, 29947, 1919, 13, 632, 29953, 29929, 1919, 13, 632, 29955, 29900, 1919, 13, 632, 29955, 29896, 1919, 13, 632, 29955, 29906, 1919, 13, 632, 29955, 29941, 1919, 13, 632, 29955, 29946, 1919, 13, 632, 29955, 29945, 1919, 13, 632, 29955, 29953, 1919, 13, 632, 29955, 29955, 1919, 13, 632, 29955, 29947, 1919, 13, 632, 29955, 29929, 1919, 13, 632, 29947, 29900, 1919, 13, 632, 29947, 29896, 1919, 13, 632, 29947, 29906, 1919, 13, 632, 29947, 29941, 1919, 13, 632, 29947, 29946, 1919, 13, 632, 29947, 29945, 1919, 13, 632, 29947, 29953, 1919, 13, 632, 29947, 29955, 1919, 13, 632, 29947, 29947, 1919, 13, 632, 29947, 29929, 1919, 13, 632, 29929, 29900, 1919, 13, 632, 29929, 29896, 1919, 13, 632, 29929, 29906, 1919, 13, 632, 29929, 29941, 1919, 13, 632, 29929, 29946, 1919, 13, 632, 29929, 29945, 1919, 13, 632, 29929, 29953, 1919, 13, 632, 29929, 29955, 1919, 13, 632, 29929, 29947, 1919, 13, 632, 29929, 29929, 1919, 13, 632, 29896, 29900, 29900, 1919, 13, 632, 29896, 29900, 29896, 1919, 13, 632, 29896, 29900, 29906, 1919, 13, 632, 29896, 29900, 29941, 1919, 13, 632, 29896, 29900, 29946, 1919, 13, 632, 29896, 29900, 29945, 1919, 13, 632, 29896, 29900, 29953, 1919, 13, 632, 29896, 29900, 29955, 1919, 13, 632, 29896, 29900, 29947, 1919, 13, 632, 29896, 29900, 29929, 1919, 13, 632, 29896, 29896, 29900, 1919, 13, 632, 29896, 29896, 29896, 1919, 13, 632, 29896, 29896, 29906, 1919, 13, 632, 29896, 29896, 29941, 1919, 13, 632, 29896, 29896, 29946, 1919, 13, 632, 29896, 29896, 29945, 1919, 13, 632, 29896, 29896, 29953, 1919, 13, 632, 29896, 29896, 29955, 1919, 13, 632, 29896, 29896, 29947, 1919, 13, 632, 29896, 29896, 29929, 1919, 13, 632, 29896, 29906, 29900, 1919, 13, 632, 29896, 29906, 29896, 1919, 13, 632, 29896, 29906, 29906, 1919, 13, 632, 29896, 29906, 29941, 1919, 13, 632, 29896, 29906, 29946, 1919, 13, 632, 29896, 29906, 29945, 1919, 13, 632, 29896, 29906, 29953, 1919, 13, 632, 29896, 29906, 29955, 1919, 13, 632, 29896, 29906, 29947, 1919, 13, 632, 29896, 29906, 29929, 1919, 13, 632, 29896, 29941, 29900, 1919, 13, 632, 29896, 29941, 29896, 1919, 13, 632, 29896, 29941, 29906, 1919, 13, 632, 29896, 29941, 29941, 1919, 13, 632, 29896, 29941, 29946, 1919, 13, 632, 29896, 29941, 29945, 1919, 13, 632, 29896, 29941, 29953, 1919, 13, 632, 29896, 29941, 29955, 1919, 13, 632, 29896, 29941, 29947, 1919, 13, 632, 29896, 29941, 29929, 1919, 13, 632, 29896, 29946, 29900, 1919, 13, 632, 29896, 29946, 29896, 1919, 13, 632, 29896, 29946, 29906, 1919, 13, 632, 29896, 29946, 29941, 1919, 13, 632, 29896, 29946, 29946, 1919, 13, 632, 29896, 29946, 29945, 1919, 13, 632, 29896, 29946, 29953, 1919, 13, 632, 29896, 29946, 29955, 1919, 13, 632, 29896, 29946, 29947, 1919, 13, 632, 29896, 29946, 29929, 1919, 13, 632, 29896, 29945, 29900, 1919, 13, 632, 29896, 29945, 29896, 1919, 13, 632, 29896, 29945, 29906, 1919, 13, 632, 29896, 29945, 29941, 1919, 13, 632, 29896, 29945, 29946, 1919, 13, 632, 29896, 29945, 29945, 1919, 13, 632, 29896, 29945, 29953, 1919, 13, 632, 29896, 29945, 29955, 1919, 13, 632, 29896, 29945, 29947, 1919, 13, 632, 29896, 29945, 29929, 1919, 13, 632, 29896, 29953, 29900, 1919, 13, 632, 29896, 29953, 29896, 1919, 13, 632, 29896, 29953, 29906, 1919, 13, 632, 29896, 29953, 29941, 1919, 13, 632, 29896, 29953, 29946, 1919, 13, 632, 29896, 29953, 29945, 1919, 13, 632, 29896, 29953, 29953, 1919, 13, 632, 29896, 29953, 29955, 1919, 13, 632, 29896, 29953, 29947, 1919, 13, 632, 29896, 29953, 29929, 1919, 13, 632, 29896, 29955, 29900, 1919, 13, 632, 29896, 29955, 29896, 1919, 13, 632, 29896, 29955, 29906, 1919, 13, 632, 29896, 29955, 29941, 1919, 13, 632, 29896, 29955, 29946, 1919, 13, 632, 29896, 29955, 29945, 1919, 13, 632, 29896, 29955, 29953, 1919, 13, 632, 29896, 29955, 29955, 1919, 13, 632, 29896, 29955, 29947, 1919, 13, 632, 29896, 29955, 29929, 1919, 13, 632, 29896, 29947, 29900, 1919, 13, 632, 29896, 29947, 29896, 1919, 13, 632, 29896, 29947, 29906, 1919, 13, 632, 29896, 29947, 29941, 1919, 13, 632, 29896, 29947, 29946, 1919, 13, 632, 29896, 29947, 29945, 1919, 13, 632, 29896, 29947, 29953, 1919, 13, 632, 29896, 29947, 29955, 1919, 13, 632, 29896, 29947, 29947, 1919, 13, 632, 29896, 29947, 29929, 1919, 13, 632, 29896, 29929, 29900, 1919, 13, 632, 29896, 29929, 29896, 1919, 13, 632, 29896, 29929, 29906, 1919, 13, 632, 29896, 29929, 29941, 1919, 13, 632, 29896, 29929, 29946, 1919, 13, 632, 29896, 29929, 29945, 1919, 13, 632, 29896, 29929, 29953, 1919, 13, 632, 29896, 29929, 29955, 1919, 13, 632, 29896, 29929, 29947, 1919, 13, 632, 29896, 29929, 29929, 1919, 13, 632, 29906, 29900, 29900, 1919, 13, 632, 29906, 29900, 29896, 1919, 13, 632, 29906, 29900, 29906, 1919, 13, 632, 29906, 29900, 29941, 1919, 13, 632, 29906, 29900, 29946, 1919, 13, 632, 29906, 29900, 29945, 1919, 13, 632, 29906, 29900, 29953, 1919, 13, 632, 29906, 29900, 29955, 1919, 13, 632, 29906, 29900, 29947, 1919, 13, 632, 29906, 29900, 29929, 1919, 13, 632, 29906, 29896, 29900, 1919, 13, 632, 29906, 29896, 29896, 1919, 13, 632, 29906, 29896, 29906, 1919, 13, 632, 29906, 29896, 29941, 1919, 13, 632, 29906, 29896, 29946, 1919, 13, 632, 29906, 29896, 29945, 1919, 13, 632, 29906, 29896, 29953, 1919, 13, 632, 29906, 29896, 29955, 1919, 13, 632, 29906, 29896, 29947, 1919, 13, 632, 29906, 29896, 29929, 1919, 13, 632, 29906, 29906, 29900, 1919, 13, 632, 29906, 29906, 29896, 1919, 13, 632, 29906, 29906, 29906, 1919, 13, 632, 29906, 29906, 29941, 1919, 13, 632, 29906, 29906, 29946, 1919, 13, 632, 29906, 29906, 29945, 1919, 13, 632, 29906, 29906, 29953, 1919, 13, 632, 29906, 29906, 29955, 1919, 13, 632, 29906, 29906, 29947, 1919, 13, 632, 29906, 29906, 29929, 1919, 13, 632, 29906, 29941, 29900, 1919, 13, 632, 29906, 29941, 29896, 1919, 13, 632, 29906, 29941, 29906, 1919, 13, 632, 29906, 29941, 29941, 1919, 13, 632, 29906, 29941, 29946, 1919, 13, 632, 29906, 29941, 29945, 1919, 13, 632, 29906, 29941, 29953, 1919, 13, 632, 29906, 29941, 29955, 1919, 13, 632, 29906, 29941, 29947, 1919, 13, 632, 29906, 29941, 29929, 1919, 13, 632, 29906, 29946, 29900, 1919, 13, 632, 29906, 29946, 29896, 1919, 13, 632, 29906, 29946, 29906, 1919, 13, 632, 29906, 29946, 29941, 1919, 13, 632, 29906, 29946, 29946, 1919, 13, 632, 29906, 29946, 29945, 1919, 13, 632, 29906, 29946, 29953, 1919, 13, 632, 29906, 29946, 29955, 1919, 13, 632, 29906, 29946, 29947, 1919, 13, 632, 29906, 29946, 29929, 1919, 13, 632, 29906, 29945, 29900, 1919, 13, 632, 29906, 29945, 29896, 1919, 13, 632, 29906, 29945, 29906, 1919, 13, 632, 29906, 29945, 29941, 1919, 13, 632, 29906, 29945, 29946, 1919, 13, 632, 29906, 29945, 29945, 1919, 13, 632, 29906, 29945, 29953, 1919, 13, 632, 29906, 29945, 29955, 1919, 13, 632, 29906, 29945, 29947, 1919, 13, 632, 29906, 29945, 29929, 1919, 13, 632, 29906, 29953, 29900, 1919, 13, 632, 29906, 29953, 29896, 1919, 13, 632, 29906, 29953, 29906, 1919, 13, 632, 29906, 29953, 29941, 1919, 13, 632, 29906, 29953, 29946, 1919, 13, 632, 29906, 29953, 29945, 1919, 13, 632, 29906, 29953, 29953, 1919, 13, 632, 29906, 29953, 29955, 1919, 13, 632, 29906, 29953, 29947, 1919, 13, 632, 29906, 29953, 29929, 1919, 13, 632, 29906, 29955, 29900, 1919, 13, 632, 29906, 29955, 29896, 1919, 13, 632, 29906, 29955, 29906, 1919, 13, 632, 29906, 29955, 29941, 1919, 13, 632, 29906, 29955, 29946, 1919, 13, 632, 29906, 29955, 29945, 1919, 13, 632, 29906, 29955, 29953, 1919, 13, 632, 29906, 29955, 29955, 1919, 13, 632, 29906, 29955, 29947, 1919, 13, 632, 29906, 29955, 29929, 1919, 13, 632, 29906, 29947, 29900, 1919, 13, 632, 29906, 29947, 29896, 1919, 13, 632, 29906, 29947, 29906, 1919, 13, 632, 29906, 29947, 29941, 1919, 13, 632, 29906, 29947, 29946, 1919, 13, 632, 29906, 29947, 29945, 1919, 13, 632, 29906, 29947, 29953, 1919, 13, 632, 29906, 29947, 29955, 1919, 13, 632, 29906, 29947, 29947, 1919, 13, 632, 29906, 29947, 29929, 1919, 13, 632, 29906, 29929, 29900, 1919, 13, 632, 29906, 29929, 29896, 1919, 13, 632, 29906, 29929, 29906, 1919, 13, 632, 29906, 29929, 29941, 1919, 13, 632, 29906, 29929, 29946, 1919, 13, 632, 29906, 29929, 29945, 1919, 13, 632, 29906, 29929, 29953, 1919, 13, 632, 29906, 29929, 29955, 1919, 13, 632, 29906, 29929, 29947, 1919, 13, 632, 29906, 29929, 29929, 1919, 13, 632, 29941, 29900, 29900, 1919, 13, 632, 29941, 29900, 29896, 1919, 13, 632, 29941, 29900, 29906, 1919, 13, 632, 29941, 29900, 29941, 1919, 13, 632, 29941, 29900, 29946, 1919, 13, 632, 29941, 29900, 29945, 1919, 13, 632, 29941, 29900, 29953, 1919, 13, 632, 29941, 29900, 29955, 1919, 13, 632, 29941, 29900, 29947, 1919, 13, 632, 29941, 29900, 29929, 1919, 13, 632, 29941, 29896, 29900, 1919, 13, 632, 29941, 29896, 29896, 1919, 13, 632, 29941, 29896, 29906, 1919, 13, 632, 29941, 29896, 29941, 1919, 13, 632, 29941, 29896, 29946, 1919, 13, 632, 29941, 29896, 29945, 1919, 13, 632, 29941, 29896, 29953, 1919, 13, 632, 29941, 29896, 29955, 1919, 13, 632, 29941, 29896, 29947, 1919, 13, 632, 29941, 29896, 29929, 1919, 13, 632, 29941, 29906, 29900, 1919, 13, 632, 29941, 29906, 29896, 1919, 13, 632, 29941, 29906, 29906, 1919, 13, 632, 29941, 29906, 29941, 1919, 13, 632, 29941, 29906, 29946, 1919, 13, 632, 29941, 29906, 29945, 1919, 13, 632, 29941, 29906, 29953, 1919, 13, 632, 29941, 29906, 29955, 1919, 13, 632, 29941, 29906, 29947, 1919, 13, 632, 29941, 29906, 29929, 1919, 13, 632, 29941, 29941, 29900, 1919, 13, 632, 29941, 29941, 29896, 1919, 13, 632, 29941, 29941, 29906, 1919, 13, 632, 29941, 29941, 29941, 1919, 13, 632, 29941, 29941, 29946, 1919, 13, 632, 29941, 29941, 29945, 1919, 13, 632, 29941, 29941, 29953, 1919, 13, 632, 29941, 29941, 29955, 1919, 13, 632, 29941, 29941, 29947, 1919, 13, 632, 29941, 29941, 29929, 1919, 13, 632, 29941, 29946, 29900, 1919, 13, 632, 29941, 29946, 29896, 1919, 13, 632, 29941, 29946, 29906, 1919, 13, 632, 29941, 29946, 29941, 1919, 13, 632, 29941, 29946, 29946, 1919, 13, 632, 29941, 29946, 29945, 1919, 13, 632, 29941, 29946, 29953, 1919, 13, 632, 29941, 29946, 29955, 1919, 13, 632, 29941, 29946, 29947, 1919, 13, 632, 29941, 29946, 29929, 1919, 13, 632, 29941, 29945, 29900, 1919, 13, 632, 29941, 29945, 29896, 1919, 13, 632, 29941, 29945, 29906, 1919, 13, 632, 29941, 29945, 29941, 1919, 13, 632, 29941, 29945, 29946, 1919, 13, 632, 29941, 29945, 29945, 1919, 13, 632, 29941, 29945, 29953, 1919, 13, 632, 29941, 29945, 29955, 1919, 13, 632, 29941, 29945, 29947, 1919, 13, 632, 29941, 29945, 29929, 1919, 13, 632, 29941, 29953, 29900, 1919, 13, 632, 29941, 29953, 29896, 1919, 13, 632, 29941, 29953, 29906, 1919, 13, 632, 29941, 29953, 29941, 1919, 13, 632, 29941, 29953, 29946, 1919, 13, 632, 29941, 29953, 29945, 1919, 13, 632, 29941, 29953, 29953, 1919, 13, 632, 29941, 29953, 29955, 1919, 13, 632, 29941, 29953, 29947, 1919, 13, 632, 29941, 29953, 29929, 1919, 13, 632, 29941, 29955, 29900, 1919, 13, 632, 29941, 29955, 29896, 1919, 13, 632, 29941, 29955, 29906, 1919, 13, 632, 29941, 29955, 29941, 1919, 13, 632, 29941, 29955, 29946, 1919, 13, 632, 29941, 29955, 29945, 1919, 13, 632, 29941, 29955, 29953, 1919, 13, 632, 29941, 29955, 29955, 1919, 13, 632, 29941, 29955, 29947, 1919, 13, 632, 29941, 29955, 29929, 1919, 13, 632, 29941, 29947, 29900, 1919, 13, 632, 29941, 29947, 29896, 1919, 13, 632, 29941, 29947, 29906, 1919, 13, 632, 29941, 29947, 29941, 1919, 13, 632, 29941, 29947, 29946, 1919, 13, 632, 29941, 29947, 29945, 1919, 13, 632, 29941, 29947, 29953, 1919, 13, 632, 29941, 29947, 29955, 1919, 13, 632, 29941, 29947, 29947, 1919, 13, 632, 29941, 29947, 29929, 1919, 13, 632, 29941, 29929, 29900, 1919, 13, 632, 29941, 29929, 29896, 1919, 13, 632, 29941, 29929, 29906, 1919, 13, 632, 29941, 29929, 29941, 1919, 13, 632, 29941, 29929, 29946, 1919, 13, 632, 29941, 29929, 29945, 1919, 13, 632, 29941, 29929, 29953, 1919, 13, 632, 29941, 29929, 29955, 1919, 13, 632, 29941, 29929, 29947, 1919, 13, 632, 29941, 29929, 29929, 1919, 13, 632, 29946, 29900, 29900, 1919, 13, 632, 29946, 29900, 29896, 1919, 13, 632, 29946, 29900, 29906, 1919, 13, 632, 29946, 29900, 29941, 1919, 13, 632, 29946, 29900, 29946, 1919, 13, 632, 29946, 29900, 29945, 1919, 13, 632, 29946, 29900, 29953, 1919, 13, 632, 29946, 29900, 29955, 1919, 13, 632, 29946, 29900, 29947, 1919, 13, 632, 29946, 29900, 29929, 1919, 13, 632, 29946, 29896, 29900, 1919, 13, 632, 29946, 29896, 29896, 1919, 13, 632, 29946, 29896, 29906, 1919, 13, 632, 29946, 29896, 29941, 1919, 13, 632, 29946, 29896, 29946, 1919, 13, 632, 29946, 29896, 29945, 1919, 13, 632, 29946, 29896, 29953, 1919, 13, 632, 29946, 29896, 29955, 1919, 13, 632, 29946, 29896, 29947, 1919, 13, 632, 29946, 29896, 29929, 1919, 13, 632, 29946, 29906, 29900, 1919, 13, 632, 29946, 29906, 29896, 1919, 13, 632, 29946, 29906, 29906, 1919, 13, 632, 29946, 29906, 29941, 1919, 13, 632, 29946, 29906, 29946, 1919, 13, 632, 29946, 29906, 29945, 1919, 13, 632, 29946, 29906, 29953, 1919, 13, 632, 29946, 29906, 29955, 1919, 13, 632, 29946, 29906, 29947, 1919, 13, 632, 29946, 29906, 29929, 1919, 13, 632, 29946, 29941, 29900, 1919, 13, 632, 29946, 29941, 29896, 1919, 13, 632, 29946, 29941, 29906, 1919, 13, 632, 29946, 29941, 29941, 1919, 13, 632, 29946, 29941, 29946, 1919, 13, 632, 29946, 29941, 29945, 1919, 13, 632, 29946, 29941, 29953, 1919, 13, 632, 29946, 29941, 29955, 1919, 13, 632, 29946, 29941, 29947, 1919, 13, 632, 29946, 29941, 29929, 1919, 13, 632, 29946, 29946, 29900, 1919, 13, 632, 29946, 29946, 29896, 1919, 13, 632, 29946, 29946, 29906, 1919, 13, 632, 29946, 29946, 29941, 1919, 13, 632, 29946, 29946, 29946, 1919, 13, 632, 29946, 29946, 29945, 1919, 13, 632, 29946, 29946, 29953, 1919, 13, 632, 29946, 29946, 29955, 1919, 13, 632, 29946, 29946, 29947, 1919, 13, 632, 29946, 29946, 29929, 1919, 13, 632, 29946, 29945, 29900, 1919, 13, 632, 29946, 29945, 29896, 1919, 13, 632, 29946, 29945, 29906, 1919, 13, 632, 29946, 29945, 29941, 1919, 13, 632, 29946, 29945, 29946, 1919, 13, 632, 29946, 29945, 29945, 1919, 13, 632, 29946, 29945, 29953, 1919, 13, 632, 29946, 29945, 29955, 1919, 13, 632, 29946, 29945, 29947, 1919, 13, 632, 29946, 29945, 29929, 1919, 13, 632, 29946, 29953, 29900, 1919, 13, 632, 29946, 29953, 29896, 1919, 13, 632, 29946, 29953, 29906, 1919, 13, 632, 29946, 29953, 29941, 1919, 13, 632, 29946, 29953, 29946, 1919, 13, 632, 29946, 29953, 29945, 1919, 13, 632, 29946, 29953, 29953, 1919, 13, 632, 29946, 29953, 29955, 1919, 13, 632, 29946, 29953, 29947, 1919, 13, 18884, 4514, 13, 18884, 1583, 29889, 13148, 29918, 18010, 29918, 7224, 1839, 14420, 29900, 2033, 353, 7546, 29918, 18010, 29918, 1761, 13, 18884, 444, 8707, 6040, 1783, 14861, 1254, 1001, 11698, 2287, 29903, 835, 13383, 13383, 4136, 2277, 29937, 13, 18884, 1583, 29889, 12346, 29918, 6207, 29918, 18010, 353, 518, 13, 462, 29953, 1919, 13, 462, 29947, 1919, 13, 462, 29896, 29945, 1919, 13, 462, 29906, 29906, 1919, 13, 462, 29906, 29945, 1919, 13, 462, 29941, 29941, 1919, 13, 462, 29941, 29955, 1919, 13, 462, 29946, 29896, 1919, 13, 462, 29946, 29929, 1919, 13, 462, 29945, 29945, 1919, 13, 462, 29945, 29953, 1919, 13, 462, 29953, 29955, 1919, 13, 462, 29955, 29941, 1919, 13, 462, 29955, 29946, 1919, 13, 462, 29955, 29929, 1919, 13, 462, 29929, 29896, 1919, 13, 462, 29929, 29906, 1919, 13, 462, 29929, 29955, 1919, 13, 462, 29896, 29900, 29929, 1919, 13, 462, 29896, 29896, 29900, 1919, 13, 462, 29896, 29896, 29945, 1919, 13, 462, 29896, 29906, 29955, 1919, 13, 462, 29896, 29906, 29947, 1919, 13, 462, 29896, 29941, 29941, 1919, 13, 462, 29896, 29946, 29945, 1919, 13, 462, 29896, 29946, 29953, 1919, 13, 462, 29896, 29945, 29896, 1919, 13, 462, 29896, 29953, 29941, 1919, 13, 462, 29896, 29953, 29946, 1919, 13, 462, 29896, 29953, 29929, 1919, 13, 462, 29896, 29947, 29896, 1919, 13, 462, 29896, 29947, 29906, 1919, 13, 462, 29896, 29947, 29955, 1919, 13, 462, 29896, 29929, 29929, 1919, 13, 462, 29906, 29900, 29900, 1919, 13, 462, 29906, 29900, 29945, 1919, 13, 462, 29906, 29896, 29955, 1919, 13, 462, 29906, 29896, 29947, 1919, 13, 462, 29906, 29906, 29941, 1919, 13, 462, 29906, 29941, 29896, 1919, 13, 462, 29906, 29941, 29941, 1919, 13, 462, 29906, 29946, 29896, 1919, 13, 462, 29906, 29946, 29946, 1919, 13, 462, 29906, 29946, 29945, 1919, 13, 462, 29906, 29945, 29900, 1919, 13, 462, 29906, 29953, 29906, 1919, 13, 462, 29906, 29953, 29941, 1919, 13, 462, 29906, 29953, 29947, 1919, 13, 462, 29906, 29947, 29900, 1919, 13, 462, 29906, 29947, 29896, 1919, 13, 462, 29906, 29947, 29953, 1919, 13, 462, 29906, 29929, 29947, 1919, 13, 462, 29906, 29929, 29929, 1919, 13, 462, 29941, 29900, 29946, 1919, 13, 462, 29941, 29896, 29953, 1919, 13, 462, 29941, 29896, 29955, 1919, 13, 462, 29941, 29906, 29906, 1919, 13, 462, 29941, 29941, 29946, 1919, 13, 462, 29941, 29941, 29945, 1919, 13, 462, 29941, 29946, 29900, 1919, 13, 462, 29941, 29945, 29906, 1919, 13, 462, 29941, 29945, 29941, 1919, 13, 462, 29941, 29945, 29947, 1919, 13, 462, 29941, 29955, 29900, 1919, 13, 462, 29941, 29955, 29896, 1919, 13, 462, 29941, 29955, 29953, 1919, 13, 462, 29941, 29947, 29947, 1919, 13, 462, 29941, 29947, 29929, 1919, 13, 462, 29941, 29929, 29946, 1919, 13, 462, 29946, 29900, 29953, 1919, 13, 462, 29946, 29900, 29955, 1919, 13, 462, 29946, 29896, 29906, 1919, 13, 462, 29946, 29906, 29946, 1919, 13, 462, 29946, 29906, 29945, 1919, 13, 462, 29946, 29941, 29900, 1919, 13, 462, 29946, 29946, 29906, 1919, 13, 462, 29946, 29946, 29941, 1919, 13, 462, 29946, 29946, 29947, 1919, 13, 462, 29946, 29945, 29953, 1919, 13, 462, 29946, 29945, 29947, 1919, 13, 462, 29946, 29953, 29953, 1919, 13, 18884, 4514, 13, 18884, 444, 8707, 6040, 1783, 317, 4375, 12064, 11698, 2287, 29903, 835, 13383, 13383, 7346, 13, 18884, 1583, 29889, 12346, 29918, 29879, 18398, 29918, 18010, 353, 518, 13, 462, 29941, 1919, 13, 462, 29955, 1919, 13, 462, 29896, 29906, 1919, 13, 462, 29906, 29900, 1919, 13, 462, 29906, 29896, 1919, 13, 462, 29941, 29906, 1919, 13, 462, 29946, 29900, 1919, 13, 462, 29946, 29945, 1919, 13, 462, 29945, 29906, 1919, 13, 462, 29953, 29906, 1919, 13, 462, 29953, 29953, 1919, 13, 462, 29955, 29906, 1919, 13, 462, 29947, 29941, 1919, 13, 462, 29947, 29955, 1919, 13, 462, 29929, 29900, 1919, 13, 462, 29896, 29900, 29906, 1919, 13, 462, 29896, 29900, 29945, 1919, 13, 462, 29896, 29900, 29947, 1919, 13, 462, 29896, 29906, 29900, 1919, 13, 462, 29896, 29906, 29941, 1919, 13, 462, 29896, 29906, 29953, 1919, 13, 462, 29896, 29941, 29947, 1919, 13, 462, 29896, 29946, 29896, 1919, 13, 462, 29896, 29946, 29946, 1919, 13, 462, 29896, 29945, 29953, 1919, 13, 462, 29896, 29945, 29929, 1919, 13, 462, 29896, 29953, 29906, 1919, 13, 462, 29896, 29955, 29946, 1919, 13, 462, 29896, 29955, 29955, 1919, 13, 462, 29896, 29947, 29900, 1919, 13, 462, 29896, 29929, 29906, 1919, 13, 462, 29896, 29929, 29945, 1919, 13, 462, 29896, 29929, 29947, 1919, 13, 462, 29906, 29896, 29900, 1919, 13, 462, 29906, 29896, 29941, 1919, 13, 462, 29906, 29896, 29953, 1919, 13, 462, 29906, 29906, 29947, 1919, 13, 462, 29906, 29941, 29906, 1919, 13, 462, 29906, 29941, 29929, 1919, 13, 462, 29906, 29945, 29941, 1919, 13, 462, 29906, 29945, 29955, 1919, 13, 462, 29906, 29953, 29896, 1919, 13, 462, 29906, 29955, 29941, 1919, 13, 462, 29906, 29955, 29953, 1919, 13, 462, 29906, 29955, 29929, 1919, 13, 462, 29906, 29929, 29896, 1919, 13, 462, 29906, 29929, 29946, 1919, 13, 462, 29906, 29929, 29955, 1919, 13, 462, 29941, 29900, 29929, 1919, 13, 462, 29941, 29896, 29906, 1919, 13, 462, 29941, 29896, 29945, 1919, 13, 462, 29941, 29906, 29955, 1919, 13, 462, 29941, 29941, 29900, 1919, 13, 462, 29941, 29941, 29941, 1919, 13, 462, 29941, 29946, 29945, 1919, 13, 462, 29941, 29946, 29947, 1919, 13, 462, 29941, 29945, 29896, 1919, 13, 462, 29941, 29953, 29941, 1919, 13, 462, 29941, 29953, 29953, 1919, 13, 462, 29941, 29953, 29929, 1919, 13, 462, 29941, 29947, 29896, 1919, 13, 462, 29941, 29947, 29946, 1919, 13, 462, 29941, 29947, 29955, 1919, 13, 462, 29941, 29929, 29929, 1919, 13, 462, 29946, 29900, 29906, 1919, 13, 462, 29946, 29900, 29945, 1919, 13, 462, 29946, 29896, 29955, 1919, 13, 462, 29946, 29906, 29900, 1919, 13, 462, 29946, 29906, 29941, 1919, 13, 462, 29946, 29941, 29945, 1919, 13, 462, 29946, 29941, 29947, 1919, 13, 462, 29946, 29946, 29896, 1919, 13, 462, 29946, 29945, 29941, 1919, 13, 462, 29946, 29945, 29955, 1919, 13, 462, 29946, 29953, 29946, 1919, 13, 18884, 4514, 13, 18884, 444, 20735, 16437, 18783, 19926, 11698, 2287, 29903, 835, 13383, 13383, 4136, 2277, 29937, 13, 18884, 1583, 29889, 3993, 29918, 9917, 653, 29918, 18010, 353, 518, 13, 18884, 4514, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 1596, 376, 13148, 6166, 6087, 29908, 462, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 317, 4986, 1525, 11698, 2287, 29903, 6732, 402, 1672, 18783, 317, 4574, 29943, 11538, 835, 13383, 7346, 4136, 2277, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 1583, 29889, 3332, 29918, 7610, 2161, 29918, 18010, 353, 5159, 13, 18884, 1596, 376, 18010, 373, 5962, 7101, 6087, 29908, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 319, 1783, 5667, 8098, 835, 13383, 13383, 13383, 29937, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 1583, 29889, 311, 562, 353, 897, 11236, 362, 7270, 537, 580, 13, 18884, 1583, 29889, 2697, 3373, 21786, 362, 10108, 29879, 29898, 1583, 29889, 4299, 29918, 1595, 29892, 1583, 29889, 11236, 362, 29918, 15764, 1723, 13, 18884, 1583, 29889, 311, 562, 29889, 6644, 6646, 29898, 1583, 29889, 4299, 29918, 1595, 1723, 13, 18884, 1596, 376, 11236, 362, 19725, 16601, 29908, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 444, 341, 2890, 29950, 323, 29979, 4214, 835, 13383, 13383, 13383, 29937, 13, 18884, 835, 13383, 13383, 13383, 7346, 4136, 2277, 29937, 13, 18884, 1583, 29889, 4467, 29882, 29918, 1017, 292, 29918, 329, 1793, 29922, 341, 12094, 29911, 5414, 7270, 537, 580, 13, 18884, 1583, 29889, 4467, 29882, 29918, 1017, 292, 29918, 329, 1793, 29889, 6644, 6646, 29924, 12094, 29911, 5414, 7270, 537, 29898, 1311, 29889, 4299, 29918, 1595, 29897, 13, 18884, 1596, 376, 4467, 29882, 29899, 1017, 292, 19725, 8472, 16601, 29908, 13, 18884, 1596, 376, 4299, 8472, 16601, 29908, 13, 18884, 1583, 29889, 2697, 27065, 403, 797, 29903, 1981, 5015, 404, 29898, 7700, 1723, 13, 462, 13, 4706, 822, 9550, 675, 3195, 29898, 1583, 29871, 1125, 13, 18884, 1583, 29889, 29887, 333, 29918, 601, 29889, 11123, 3591, 2283, 580, 13, 462, 13, 4706, 822, 3789, 27065, 403, 797, 29903, 1981, 5015, 404, 29898, 1583, 29892, 13944, 29918, 15581, 29871, 1125, 13, 18884, 1583, 29889, 1144, 1981, 29918, 710, 404, 29918, 15581, 353, 13944, 29918, 15581, 13, 13, 4706, 822, 4956, 345, 29898, 1583, 29892, 931, 29892, 515, 29918, 311, 562, 29892, 304, 29918, 311, 562, 29892, 515, 29918, 276, 562, 29892, 304, 29918, 276, 562, 29871, 1125, 13, 18884, 1583, 29889, 311, 562, 29889, 1123, 11236, 403, 29898, 1583, 29889, 4299, 29918, 1595, 29892, 515, 29918, 276, 562, 29892, 304, 29918, 276, 562, 1723, 13, 18884, 1583, 29889, 311, 562, 29889, 2772, 11236, 403, 29898, 1583, 29889, 4299, 29918, 1595, 29892, 515, 29918, 311, 562, 29892, 304, 29918, 311, 562, 1723, 13, 18884, 1583, 29889, 4299, 29918, 1595, 29889, 6821, 650, 2481, 14448, 29898, 2230, 29897, 13, 18884, 1583, 29889, 4299, 29918, 1595, 29889, 7032, 3401, 29889, 2697, 1917, 29898, 315, 1964, 29907, 13309, 3040, 29918, 1177, 29903, 1806, 29965, 29918, 1254, 26785, 29892, 1583, 29889, 1144, 1981, 29918, 710, 404, 29918, 15581, 1723, 13, 18884, 1583, 29889, 2929, 369, 29889, 13296, 345, 580, 13, 13383, 13383, 13383, 13383, 2277, 13, 2 ]
setup.py
davidrpugh/solowPy
31
24481
<reponame>davidrpugh/solowPy import os from distutils.core import setup def read(*paths): """Build a file path from *paths* and return the contents.""" with open(os.path.join(*paths), 'r') as f: return f.read() DESCRIPTION = ("Library for solving, simulating, and estimating the " + "Solow (1956) model of economic growth.") CLASSIFIERS = ['Development Status :: 3 - Alpha', 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ] setup( name="solowpy", packages=['solowpy', 'solowpy.tests'], version='0.2.0-alpha', license="MIT License", author="davidrpugh", author_email="<EMAIL>", url='https://github.com/solowPy/solowPy', description=DESCRIPTION, long_description=read('README.rst'), classifiers=CLASSIFIERS, )
[ 1, 529, 276, 1112, 420, 29958, 29881, 16093, 19080, 6129, 29914, 2929, 340, 19737, 13, 5215, 2897, 13, 13, 3166, 1320, 13239, 29889, 3221, 1053, 6230, 13, 13, 13, 1753, 1303, 10456, 24772, 1125, 13, 1678, 9995, 8893, 263, 934, 2224, 515, 334, 24772, 29930, 322, 736, 278, 8118, 1213, 15945, 13, 1678, 411, 1722, 29898, 359, 29889, 2084, 29889, 7122, 10456, 24772, 511, 525, 29878, 1495, 408, 285, 29901, 13, 4706, 736, 285, 29889, 949, 580, 13, 13, 2287, 7187, 24290, 2725, 353, 4852, 12284, 363, 17069, 29892, 1027, 18099, 29892, 322, 4844, 1218, 278, 376, 718, 13, 1669, 376, 13296, 340, 313, 29896, 29929, 29945, 29953, 29897, 1904, 310, 17407, 14321, 23157, 13, 13, 13875, 1799, 29902, 3738, 23598, 353, 6024, 21956, 358, 16034, 4761, 29871, 29941, 448, 838, 2026, 742, 13, 1669, 525, 2928, 2760, 319, 4749, 663, 4761, 13151, 742, 13, 1669, 525, 2928, 2760, 319, 4749, 663, 4761, 9327, 29914, 1666, 2842, 742, 13, 1669, 525, 29931, 293, 1947, 4761, 438, 5425, 28268, 1490, 4761, 341, 1806, 19245, 742, 13, 1669, 525, 7094, 1218, 2184, 4761, 6570, 25266, 742, 13, 1669, 525, 9283, 4056, 17088, 4761, 5132, 742, 13, 1669, 525, 9283, 4056, 17088, 4761, 5132, 4761, 29871, 29906, 742, 13, 1669, 525, 9283, 4056, 17088, 4761, 5132, 4761, 29871, 29941, 742, 13, 1669, 525, 9283, 4056, 17088, 4761, 5132, 4761, 29871, 29906, 29889, 29955, 742, 13, 1669, 525, 9283, 4056, 17088, 4761, 5132, 4761, 29871, 29941, 29889, 29941, 742, 13, 1669, 525, 9283, 4056, 17088, 4761, 5132, 4761, 29871, 29941, 29889, 29946, 742, 13, 1669, 4514, 13, 13, 14669, 29898, 13, 418, 1024, 543, 2929, 340, 2272, 613, 13, 418, 9741, 29922, 1839, 2929, 340, 2272, 742, 13, 18884, 525, 2929, 340, 2272, 29889, 21150, 7464, 13, 418, 1873, 2433, 29900, 29889, 29906, 29889, 29900, 29899, 2312, 742, 13, 418, 19405, 543, 26349, 19245, 613, 13, 418, 4148, 543, 29881, 16093, 19080, 6129, 613, 13, 418, 4148, 29918, 5269, 543, 29966, 26862, 6227, 28341, 13, 418, 3142, 2433, 991, 597, 3292, 29889, 510, 29914, 2929, 340, 19737, 29914, 2929, 340, 19737, 742, 13, 418, 6139, 29922, 2287, 7187, 24290, 2725, 29892, 13, 418, 1472, 29918, 8216, 29922, 949, 877, 16310, 2303, 29889, 29878, 303, 5477, 13, 418, 770, 14903, 29922, 13875, 1799, 29902, 3738, 23598, 29892, 13, 418, 1723, 13, 2 ]
wow.py
aswinmurali-io/magiclist
1
175799
<gh_stars>1-10 import sqlite3 import time import os print('\nsqlite3') file = 'example.db' if os.path.exists(file): os.remove(file) conn = sqlite3.connect(file) c = conn.cursor() # Create table start = time.time() c.execute('''CREATE TABLE stocks (date text, trans text, symbol text, qty real, price real)''') e = time.time() - start print(f'Creating table {e}s') # Insert a row of data start = time.time() c.execute("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)") e2 = time.time() - start print(f'Inserting table {e2}s') # Save (commit) the changes start = time.time() conn.commit() e3 = time.time() - start print(f'Saving table {e3}s') print(f'Creating & Inserting table combined {e + e2 + e3}s') from magiclist import Magic magic = Magic('example') print('\nMagiclist') start = time.time() magic['stock'] = { 'date': ['2006-01-05'], 'trans': ['BUY'], 'symbol': ['RHAT'], 'qty': [100], 'price': [35.14], } print(f'Creating & Inserting table combined {time.time() - start}s')
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 21120, 29941, 13, 5215, 931, 13, 5215, 2897, 13, 13, 2158, 28909, 1983, 1519, 568, 29941, 1495, 13, 13, 1445, 353, 525, 4773, 29889, 2585, 29915, 13, 361, 2897, 29889, 2084, 29889, 9933, 29898, 1445, 1125, 13, 1678, 2897, 29889, 5992, 29898, 1445, 29897, 13, 13082, 353, 21120, 29941, 29889, 6915, 29898, 1445, 29897, 13, 13, 29883, 353, 11009, 29889, 18127, 580, 13, 13, 29937, 6204, 1591, 13, 2962, 353, 931, 29889, 2230, 580, 13, 29883, 29889, 7978, 877, 4907, 27045, 10911, 10961, 29879, 13, 632, 313, 1256, 1426, 29892, 1301, 1426, 29892, 5829, 1426, 29892, 3855, 1017, 1855, 29892, 8666, 1855, 29897, 4907, 1495, 13, 29872, 353, 931, 29889, 2230, 580, 448, 1369, 13, 2158, 29898, 29888, 29915, 9832, 1218, 1591, 426, 29872, 29913, 29879, 1495, 13, 13, 29937, 24505, 263, 1948, 310, 848, 13, 2962, 353, 931, 29889, 2230, 580, 13, 29883, 29889, 7978, 703, 19460, 11646, 10961, 29879, 15673, 6702, 29906, 29900, 29900, 29953, 29899, 29900, 29896, 29899, 29900, 29945, 3788, 7838, 29979, 3788, 29934, 29950, 1299, 742, 29896, 29900, 29900, 29892, 29941, 29945, 29889, 29896, 29946, 25760, 13, 29872, 29906, 353, 931, 29889, 2230, 580, 448, 1369, 13, 2158, 29898, 29888, 29915, 797, 643, 1259, 1591, 426, 29872, 29906, 29913, 29879, 1495, 13, 13, 29937, 16913, 313, 15060, 29897, 278, 3620, 13, 2962, 353, 931, 29889, 2230, 580, 13, 13082, 29889, 15060, 580, 13, 29872, 29941, 353, 931, 29889, 2230, 580, 448, 1369, 13, 2158, 29898, 29888, 29915, 29903, 5555, 1591, 426, 29872, 29941, 29913, 29879, 1495, 13, 13, 2158, 29898, 29888, 29915, 9832, 1218, 669, 512, 643, 1259, 1591, 12420, 426, 29872, 718, 321, 29906, 718, 321, 29941, 29913, 29879, 1495, 13, 13, 3166, 15709, 1761, 1053, 26494, 13, 13, 11082, 293, 353, 26494, 877, 4773, 1495, 13, 13, 2158, 28909, 29876, 19095, 293, 1761, 1495, 13, 13, 2962, 353, 931, 29889, 2230, 580, 13, 11082, 293, 1839, 17712, 2033, 353, 426, 13, 1678, 525, 1256, 2396, 6024, 29906, 29900, 29900, 29953, 29899, 29900, 29896, 29899, 29900, 29945, 7464, 13, 1678, 525, 3286, 2396, 6024, 7838, 29979, 7464, 13, 1678, 525, 18098, 2396, 6024, 29934, 29950, 1299, 7464, 13, 1678, 525, 29939, 1017, 2396, 518, 29896, 29900, 29900, 1402, 13, 1678, 525, 9175, 2396, 518, 29941, 29945, 29889, 29896, 29946, 1402, 13, 29913, 13, 2158, 29898, 29888, 29915, 9832, 1218, 669, 512, 643, 1259, 1591, 12420, 426, 2230, 29889, 2230, 580, 448, 1369, 29913, 29879, 1495, 13, 2 ]
Code/binarytree.py
siko408/CS-1.3-Core-Data-Structures
0
187192
#!python from collections import deque class User(object): def __init__(self, age, testscore): self.age = age self.testscore = testscore def getAge(self): return self.age def getTestScore(self): return self.testscore class BinaryTreeNode(object): def __init__(self, data): """Initialize this binary tree node with the given data.""" self.data = data self.left = None self.right = None def __repr__(self): """Return a string representation of this binary tree node.""" return 'BinaryTreeNode({!r})'.format(self.data) def is_leaf(self): """Return True if this node is a leaf (has no children).""" # TODO: Check if both left child and right child have no value if self.right is None and self.left is None: return True return False def is_branch(self): """Return True if this node is a branch (has at least one child).""" # TODO: Check if either left child or right child has a value if self.right is not None or self.left is not None: return True return False def height(self): """Return the height of this node (the number of edges on the longest downward path from this node to a descendant leaf node). TODO: Best and worst case running time: ??? under what conditions?""" # Best Case running Time O(1) if parent is None/Root # Worst Case Running Time O(n) If have to search through each node # TODO: Check if left child has a value and if so calculate its height # TODO: Check if right child has a value and if so calculate its height # Return one more than the greater of the left height and right height left_height = 0 right_height = 0 node = self node_List = [] while True: if node.left is not None and node.right is not None: node_List.append((node, "right")) if node.left is not None: if node.right is None: left_height += 1 node = node.left else: left_height += 1 node = node.left if node.right is not None: if node.left is None: right_height += 1 node = node.right else: right_height += 1 node = node.right if node.right is None and node.left is None: if len(node_List) == 0: """ Only break if there is no more top nodes to redirect""" print("left", left_height, "right", right_height) if left_height >= right_height: return left_height else: return right_height else: """ Give the node of the first tuple of nodes""" if node_List[0][1] == "right": node = node_List[0][0].right node_List.pop() class BinarySearchTree(object): def __init__(self, items=None): """Initialize this binary search tree and insert the given items.""" self.root = None self.size = 0 if items is not None: for item in items: self.insert(item) def __repr__(self): """Return a string representation of this binary search tree.""" return 'BinarySearchTree({} nodes)'.format(self.size) def is_empty(self): """Return True if this binary search tree is empty (has no nodes).""" return self.root is None def height(self): """Return the height of this tree (the number of edges on the longest downward path from this tree's root node to a descendant leaf node). TODO: Best and worst case running time: ??? under what conditions?""" # Best Case running Time O(1) if there is only the root # Worst Case Running Time O(n) Have to search through each node return self.root.height() def contains(self, item): """Return True if this binary search tree contains the given item. TODO: Best case running time: ??? under what conditions? TODO: Worst case running time: ??? under what conditions?""" # Best Case running Time O(1) if parent is None/Root # Worst Case Running Time O(n) If have to search through each node # Find a node with the given item, if any node = self._find_node_iterative(item) # Return True if a node as found, or False if node is not None: return True return False def search(self, item): """Return an item in this binary search tree matching the given item, or None if the given item is not found. TODO: Best case running time: ??? under what conditions? TODO: Worst case running time: ??? under what conditions?""" # Best Case running Time O(1) if parent is None/Root # Worst Case Running Time O(n) If have to search through each node # Find a node with the given item, if any node = self._find_node_recursive(item, self.root) # TODO: Return the node's data if found, or None if node is not None: return node.data return None def insert(self, item): # Best Case running Time O(1) if parent is None/Root # Worst Case Running Time O(n) If have to search through each node in parent_node method # Handle the case where the tree is empty if self.is_empty(): # TODO: Create a new root node self.root = BinaryTreeNode(item) # TODO: Increase the tree size self.size += 1 return # Find the parent node of where the given item should be inserted parent = self._find_parent_node_iterative(item) if parent.is_branch(): if parent.left is not None: parent.right = BinaryTreeNode(item) else: parent.left = BinaryTreeNode(item) if parent.is_leaf(): if item > parent.data: parent.right = BinaryTreeNode(item) else: parent.left = BinaryTreeNode(item) self.size += 1 return def _find_node_iterative(self, item): """Return the node containing the given item in this binary search tree, or None if the given item is not found. Search is performed iteratively starting from the root node.""" node = self.root while node is not None: if node.data == item: return node elif item < node.data: node = node.left elif item > node.data: node = node.right # Not found return None def _find_node_recursive(self, item, node): """Return the node containing the given item in this binary search tree, or None if the given item is not found. Search is performed recursively starting from the given node (give the root node to start recursion). TODO: Best case running time: ??? under what conditions? TODO: Worst case running time: ??? under what conditions?""" # Best Case running Time O(1) if parent is None/Root # Worst Case Running Time O(n) If have to search through each node # node = self._find_parent_node_recursive(item, node) if node is None: return None if node.data == item: return node elif node.data < item: return self._find_node_recursive(item, node.right) else: return self._find_node_recursive(item, node.left) def _find_parent_node_iterative(self, item): """Return the parent node of the node containing the given item (or the parent node of where the given item would be if inserted) in this tree, or None if this tree is empty or has only a root node. Search is performed iteratively starting from the root node. TODO: Best case running time: ??? under what conditions? TODO: Worst case running time: ??? under what conditions?""" # Best Case running Time O(1) if parent is None/Root # Worst Case Running Time O(n) If have to search through each node # Start with the root node and keep track of its parent node = self.root parent = node if self.is_empty() is True or self.root is None: return parent while node is not None: parent_Full = True if node.data == item: return parent if node.left is None and node.right is not None or node.right is None and node.left is not None: parent_Full = False if node.is_leaf() is True or parent_Full is False: """ If there are no branches or only has a single branch""" return parent if item < node.data: """ Parent will be left node""" parent = node.left node = node.left else: parent = node.right node = node.right def _find_parent_node_recursive(self, item, node, parent=None): """Return the parent node of the node containing the given item (or the parent node of where the given item would be if inserted) in this tree, or None if this tree is empty or has only a root node. Search is performed recursively starting from the given node (give the root node to start recursion).""" if node is None: return parent if item == node.data: return parent elif item < node.data: return self._find_parent_node_recursive(item, node.left, node) elif item > node.data: return self._find_parent_node_recursive(item, node.right, node) def delete(self, item): """Remove given item from this tree, if present, or raise ValueError. TODO: Best case running time: ??? under what conditions? TODO: Worst case running time: ??? under what conditions?""" # TODO: Use helper methods and break this algorithm down into 3 cases # based on how many children the node containing the given item has and # implement new helper methods for subtasks of the more complex cases parent_node = self._find_parent_node_iterative(item) node = self._find_node_iterative(item) if parent_node is None: """ Tree is empty""" return None if parent_node.data == item: print("Parent node deletion") """ Must be root node """ if node.left is None: self.root = node.right node.right = None elif node.right is None: self.root = node.left node.left = None elif node.right is None and node.left is None: self.root = None return None else: # First step is to detach root to left side self.root = node.left if self.root.right is None: self.root.right = node.right else: lost_data = self.root.right self.root.right = node.right self.insert(lost_data.data) return # Second step is to reorganize if node.is_leaf() is True: """ If node has no children But has parent""" print("Leaf deletion") if parent_node.data > node.data: parent_node.left = None else: parent_node.right = None return """ Best case scenerio, node has a parent and children""" if node.left is not None: if parent_node.data > node.left.data: parent_node.left = node.left else: parent_node.right = node.left if node.right is not None: if node.right.data > node.left.data: node.left.right = node.right else: node.left.left = node.right return def items_in_order(self): """Return an in-order list of all items in this binary search tree.""" items = [] if not self.is_empty(): # Traverse tree in-order from root, appending each node's item self._traverse_in_order_recursive(self.root, items.append) # Return in-order list of all items in tree return items def _traverse_in_order_recursive(self, node, visit): """Traverse this binary tree with recursive in-order traversal (DFS). Start at the given node and visit each node with the given function. TODO: Running time: ??? Why and under what conditions? TODO: Memory usage: ??? Why and under what conditions?""" # Running Time 0(n) # Space Complexity O(h) if node is not None: # TODO: Traverse left subtree, if it exists self._traverse_in_order_recursive(node.left, visit) # TODO: Visit this node's data with given function visit(node.data) # TODO: Traverse right subtree, if it exists self._traverse_in_order_recursive(node.right, visit) def _traverse_in_order_iterative(self, node, visit): """Traverse this binary tree with iterative in-order traversal (DFS). Start at the given node and visit each node with the given function. TODO: Running time: ??? Why and under what conditions? TODO: Memory usage: ??? Why and under what conditions?""" # TODO: Traverse in-order without using recursion (stretch challenge) def items_pre_order(self): """Return a pre-order list of all items in this binary search tree.""" items = [] if not self.is_empty(): # Traverse tree pre-order from root, appending each node's item self._traverse_pre_order_recursive(self.root, items.append) # Return pre-order list of all items in tree return items def _traverse_pre_order_recursive(self, node, visit): """Traverse this binary tree with recursive pre-order traversal (DFS). Start at the given node and visit each node with the given function. TODO: Running time: ??? Why and under what conditions? TODO: Memory usage: ??? Why and under what conditions?""" # Running Time 0(n) # Space Complexity O(h) # TODO: Visit this node's data with given function if node is not None: visit(node.data) # TODO: Traverse left subtree, if it exists self._traverse_pre_order_recursive(node.left, visit) # TODO: Traverse right subtree, if it exists self._traverse_pre_order_recursive(node.right, visit) def _traverse_pre_order_iterative(self, node, visit): """Traverse this binary tree with iterative pre-order traversal (DFS). Start at the given node and visit each node with the given function. TODO: Running time: ??? Why and under what conditions? TODO: Memory usage: ??? Why and under what conditions?""" # TODO: Traverse pre-order without using recursion (stretch challenge) def items_post_order(self): """Return a post-order list of all items in this binary search tree.""" items = [] if not self.is_empty(): # Traverse tree post-order from root, appending each node's item self._traverse_post_order_recursive(self.root, items.append) # Return post-order list of all items in tree return items def _traverse_post_order_recursive(self, node, visit): """Traverse this binary tree with recursive post-order traversal (DFS). Start at the given node and visit each node with the given function. TODO: Running time: ??? Why and under what conditions? TODO: Memory usage: ??? Why and under what conditions?""" # Running Time O(n) # Time complexity O(h) if node is not None: # TODO: Traverse left subtree, if it exists self._traverse_post_order_recursive(node.left, visit) # TODO: Traverse right subtree, if it exists self._traverse_post_order_recursive(node.right, visit) # TODO: Visit this node's data with given function visit(node.data) def _traverse_post_order_iterative(self, node, visit): """Traverse this binary tree with iterative post-order traversal (DFS). Start at the given node and visit each node with the given function. TODO: Running time: ??? Why and under what conditions? TODO: Memory usage: ??? Why and under what conditions?""" # TODO: Traverse post-order without using recursion (stretch challenge) def items_level_order(self): """Return a level-order list of all items in this binary search tree.""" items = [] if not self.is_empty(): # Traverse tree level-order from root, appending each node's item self._traverse_level_order_iterative(self.root, items.append) # Return level-order list of all items in tree return items def _traverse_level_order_iterative(self, start_node, visit): """Traverse this binary tree with iterative level-order traversal (BFS). Start at the given node and visit each node with the given function. TODO: Running time: ??? Why and under what conditions? TODO: Memory usage: ??? Why and under what conditions?""" # Running Time O(n) # Space Complexity O(n) # TODO: Create queue to store nodes not yet traversed in level-order queue = deque() # TODO: Enqueue given starting node queue.append(start_node) # TODO: Loop until queue is empty while len(queue) > 0: # TODO: Dequeue node at front of queue node = queue.popleft() # TODO: Visit this node's data with given function visit(node.data) # TODO: Enqueue this node's left child, if it exists if node.left is not None: queue.append(node.left) # TODO: Enqueue this node's right child, if it exists if node.right is not None: queue.append(node.right) def test_binary_search_tree(): # Create a complete binary search tree of 3, 7, or 15 items in level-order # items = [2, 1, 3] items = [4, 2, 6, 1, 3, 5, 7] # items = [8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15] print('items: {}'.format(items)) tree = BinarySearchTree() print('tree: {}'.format(tree)) print('root: {}'.format(tree.root)) print('\nInserting items:') for item in items: tree.insert(item) print('insert({}), size: {}'.format(item, tree.size)) print('root: {}'.format(tree.root)) print('\nSearching for items:') for item in items: result = tree.search(item) print('search({}): {}'.format(item, result)) item = 123 result = tree.search(item) print('search({}): {}'.format(item, result)) print('\nTraversing items:') print('items in-order: {}'.format(tree.items_in_order())) print('items pre-order: {}'.format(tree.items_pre_order())) print('items post-order: {}'.format(tree.items_post_order())) print('items level-order: {}'.format(tree.items_level_order())) def articleExample(): userTree = BinarySearchTree() # Empty tree users = [User(18, 0), User(12, 34), User(13, 24), User(50, 100), User(34, 4), User(20, 90)] # List of users for user in users: userTree.insert(user.age) return userTree.items_in_order() if __name__ == '__main__': # test_binary_search_tree() print(articleExample())
[ 1, 396, 29991, 4691, 13, 3166, 16250, 1053, 316, 802, 13, 13, 13, 1990, 4911, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 5046, 29892, 1243, 13628, 1125, 13, 4706, 1583, 29889, 482, 353, 5046, 13, 4706, 1583, 29889, 1688, 13628, 353, 1243, 13628, 13, 13, 1678, 822, 679, 22406, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 482, 13, 13, 1678, 822, 679, 3057, 20097, 29898, 1311, 1125, 13, 4706, 736, 1583, 29889, 1688, 13628, 13, 13, 13, 1990, 29479, 9643, 4247, 29898, 3318, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 848, 1125, 13, 4706, 9995, 6644, 6646, 445, 7581, 5447, 2943, 411, 278, 2183, 848, 1213, 15945, 13, 4706, 1583, 29889, 1272, 353, 848, 13, 4706, 1583, 29889, 1563, 353, 6213, 13, 4706, 1583, 29889, 1266, 353, 6213, 13, 13, 1678, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 4706, 9995, 11609, 263, 1347, 8954, 310, 445, 7581, 5447, 2943, 1213, 15945, 13, 4706, 736, 525, 25196, 9643, 4247, 3319, 29991, 29878, 1800, 4286, 4830, 29898, 1311, 29889, 1272, 29897, 13, 13, 1678, 822, 338, 29918, 29500, 29898, 1311, 1125, 13, 4706, 9995, 11609, 5852, 565, 445, 2943, 338, 263, 20447, 313, 5349, 694, 4344, 467, 15945, 29908, 13, 4706, 396, 14402, 29901, 5399, 565, 1716, 2175, 2278, 322, 1492, 2278, 505, 694, 995, 13, 4706, 565, 1583, 29889, 1266, 338, 6213, 322, 1583, 29889, 1563, 338, 6213, 29901, 13, 9651, 736, 5852, 13, 4706, 736, 7700, 13, 13, 1678, 822, 338, 29918, 17519, 29898, 1311, 1125, 13, 4706, 9995, 11609, 5852, 565, 445, 2943, 338, 263, 5443, 313, 5349, 472, 3203, 697, 2278, 467, 15945, 29908, 13, 4706, 396, 14402, 29901, 5399, 565, 2845, 2175, 2278, 470, 1492, 2278, 756, 263, 995, 13, 4706, 565, 1583, 29889, 1266, 338, 451, 6213, 470, 1583, 29889, 1563, 338, 451, 6213, 29901, 13, 9651, 736, 5852, 13, 4706, 736, 7700, 13, 13, 1678, 822, 3171, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 3171, 310, 445, 2943, 313, 1552, 1353, 310, 12770, 373, 278, 27217, 13, 4706, 1623, 1328, 2224, 515, 445, 2943, 304, 263, 5153, 5818, 20447, 2943, 467, 13, 4706, 14402, 29901, 6407, 322, 17322, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 29871, 6407, 11733, 29871, 2734, 5974, 438, 29898, 29896, 29897, 565, 3847, 338, 6213, 29914, 10303, 13, 4706, 396, 29871, 19662, 303, 11733, 19509, 5974, 438, 29898, 29876, 29897, 960, 505, 304, 2740, 1549, 1269, 2943, 13, 4706, 396, 14402, 29901, 5399, 565, 2175, 2278, 756, 263, 995, 322, 565, 577, 8147, 967, 3171, 13, 4706, 396, 14402, 29901, 5399, 565, 1492, 2278, 756, 263, 995, 322, 565, 577, 8147, 967, 3171, 13, 4706, 396, 7106, 697, 901, 1135, 278, 7621, 310, 278, 2175, 3171, 322, 1492, 3171, 13, 4706, 2175, 29918, 3545, 353, 29871, 29900, 13, 4706, 1492, 29918, 3545, 353, 29871, 29900, 13, 4706, 2943, 353, 1583, 13, 4706, 2943, 29918, 1293, 353, 5159, 13, 4706, 1550, 5852, 29901, 13, 9651, 565, 2943, 29889, 1563, 338, 451, 6213, 322, 2943, 29889, 1266, 338, 451, 6213, 29901, 13, 18884, 2943, 29918, 1293, 29889, 4397, 3552, 3177, 29892, 376, 1266, 5783, 13, 9651, 565, 2943, 29889, 1563, 338, 451, 6213, 29901, 13, 18884, 565, 2943, 29889, 1266, 338, 6213, 29901, 13, 462, 1678, 2175, 29918, 3545, 4619, 29871, 29896, 13, 462, 1678, 2943, 353, 2943, 29889, 1563, 13, 18884, 1683, 29901, 13, 462, 1678, 2175, 29918, 3545, 4619, 29871, 29896, 13, 462, 1678, 2943, 353, 2943, 29889, 1563, 13, 9651, 565, 2943, 29889, 1266, 338, 451, 6213, 29901, 13, 18884, 565, 2943, 29889, 1563, 338, 6213, 29901, 13, 462, 1678, 1492, 29918, 3545, 4619, 29871, 29896, 13, 462, 1678, 2943, 353, 2943, 29889, 1266, 13, 18884, 1683, 29901, 13, 462, 1678, 1492, 29918, 3545, 4619, 29871, 29896, 13, 462, 1678, 2943, 353, 2943, 29889, 1266, 13, 9651, 565, 2943, 29889, 1266, 338, 6213, 322, 2943, 29889, 1563, 338, 6213, 29901, 13, 18884, 565, 7431, 29898, 3177, 29918, 1293, 29897, 1275, 29871, 29900, 29901, 13, 462, 1678, 9995, 9333, 2867, 565, 727, 338, 694, 901, 2246, 7573, 304, 6684, 15945, 29908, 13, 462, 1678, 1596, 703, 1563, 613, 2175, 29918, 3545, 29892, 376, 1266, 613, 1492, 29918, 3545, 29897, 13, 462, 1678, 565, 2175, 29918, 3545, 6736, 1492, 29918, 3545, 29901, 13, 462, 4706, 736, 2175, 29918, 3545, 13, 462, 1678, 1683, 29901, 13, 462, 4706, 736, 1492, 29918, 3545, 13, 18884, 1683, 29901, 13, 462, 1678, 9995, 25538, 278, 2943, 310, 278, 937, 18761, 310, 7573, 15945, 29908, 13, 462, 1678, 565, 2943, 29918, 1293, 29961, 29900, 3816, 29896, 29962, 1275, 376, 1266, 1115, 13, 462, 4706, 2943, 353, 2943, 29918, 1293, 29961, 29900, 3816, 29900, 1822, 1266, 13, 462, 1678, 2943, 29918, 1293, 29889, 7323, 580, 13, 13, 13, 1990, 29479, 7974, 9643, 29898, 3318, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4452, 29922, 8516, 1125, 13, 4706, 9995, 6644, 6646, 445, 7581, 2740, 5447, 322, 4635, 278, 2183, 4452, 1213, 15945, 13, 4706, 1583, 29889, 4632, 353, 6213, 13, 4706, 1583, 29889, 2311, 353, 29871, 29900, 13, 4706, 565, 4452, 338, 451, 6213, 29901, 13, 9651, 363, 2944, 297, 4452, 29901, 13, 18884, 1583, 29889, 7851, 29898, 667, 29897, 13, 13, 1678, 822, 4770, 276, 558, 12035, 1311, 1125, 13, 4706, 9995, 11609, 263, 1347, 8954, 310, 445, 7581, 2740, 5447, 1213, 15945, 13, 4706, 736, 525, 25196, 7974, 9643, 3319, 29913, 7573, 29897, 4286, 4830, 29898, 1311, 29889, 2311, 29897, 13, 13, 1678, 822, 338, 29918, 6310, 29898, 1311, 1125, 13, 4706, 9995, 11609, 5852, 565, 445, 7581, 2740, 5447, 338, 4069, 313, 5349, 694, 7573, 467, 15945, 29908, 13, 4706, 736, 1583, 29889, 4632, 338, 6213, 13, 13, 1678, 822, 3171, 29898, 1311, 1125, 13, 4706, 9995, 11609, 278, 3171, 310, 445, 5447, 313, 1552, 1353, 310, 12770, 373, 278, 27217, 13, 4706, 1623, 1328, 2224, 515, 445, 5447, 29915, 29879, 3876, 2943, 304, 263, 5153, 5818, 20447, 2943, 467, 13, 4706, 14402, 29901, 6407, 322, 17322, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 29871, 6407, 11733, 29871, 2734, 5974, 438, 29898, 29896, 29897, 565, 727, 338, 871, 278, 3876, 13, 4706, 396, 29871, 19662, 303, 11733, 19509, 5974, 438, 29898, 29876, 29897, 6975, 304, 2740, 1549, 1269, 2943, 13, 4706, 736, 1583, 29889, 4632, 29889, 3545, 580, 13, 13, 1678, 822, 3743, 29898, 1311, 29892, 2944, 1125, 13, 4706, 9995, 11609, 5852, 565, 445, 7581, 2740, 5447, 3743, 278, 2183, 2944, 29889, 13, 4706, 14402, 29901, 6407, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 19662, 303, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 29871, 6407, 11733, 29871, 2734, 5974, 438, 29898, 29896, 29897, 565, 3847, 338, 6213, 29914, 10303, 13, 4706, 396, 29871, 19662, 303, 11733, 19509, 5974, 438, 29898, 29876, 29897, 960, 505, 304, 2740, 1549, 1269, 2943, 13, 4706, 396, 10987, 263, 2943, 411, 278, 2183, 2944, 29892, 565, 738, 13, 4706, 2943, 353, 1583, 3032, 2886, 29918, 3177, 29918, 1524, 1230, 29898, 667, 29897, 13, 13, 4706, 396, 7106, 5852, 565, 263, 2943, 408, 1476, 29892, 470, 7700, 13, 4706, 565, 2943, 338, 451, 6213, 29901, 13, 9651, 736, 5852, 13, 4706, 736, 7700, 13, 13, 1678, 822, 2740, 29898, 1311, 29892, 2944, 1125, 13, 4706, 9995, 11609, 385, 2944, 297, 445, 7581, 2740, 5447, 9686, 278, 2183, 2944, 29892, 13, 4706, 470, 6213, 565, 278, 2183, 2944, 338, 451, 1476, 29889, 13, 4706, 14402, 29901, 6407, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 19662, 303, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 29871, 6407, 11733, 29871, 2734, 5974, 438, 29898, 29896, 29897, 565, 3847, 338, 6213, 29914, 10303, 13, 4706, 396, 29871, 19662, 303, 11733, 19509, 5974, 438, 29898, 29876, 29897, 960, 505, 304, 2740, 1549, 1269, 2943, 13, 4706, 396, 10987, 263, 2943, 411, 278, 2183, 2944, 29892, 565, 738, 13, 4706, 2943, 353, 1583, 3032, 2886, 29918, 3177, 29918, 3757, 25397, 29898, 667, 29892, 1583, 29889, 4632, 29897, 13, 4706, 396, 14402, 29901, 7106, 278, 2943, 29915, 29879, 848, 565, 1476, 29892, 470, 6213, 13, 4706, 565, 2943, 338, 451, 6213, 29901, 13, 9651, 736, 2943, 29889, 1272, 13, 4706, 736, 6213, 13, 13, 1678, 822, 4635, 29898, 1311, 29892, 2944, 1125, 13, 4706, 396, 29871, 6407, 11733, 29871, 2734, 5974, 438, 29898, 29896, 29897, 565, 3847, 338, 6213, 29914, 10303, 13, 4706, 396, 29871, 19662, 303, 11733, 19509, 5974, 438, 29898, 29876, 29897, 960, 505, 304, 2740, 1549, 1269, 2943, 297, 3847, 29918, 3177, 1158, 13, 4706, 396, 29273, 278, 1206, 988, 278, 5447, 338, 4069, 13, 4706, 565, 1583, 29889, 275, 29918, 6310, 7295, 13, 9651, 396, 14402, 29901, 6204, 263, 716, 3876, 2943, 13, 9651, 1583, 29889, 4632, 353, 29479, 9643, 4247, 29898, 667, 29897, 13, 9651, 396, 14402, 29901, 512, 1037, 559, 278, 5447, 2159, 13, 9651, 1583, 29889, 2311, 4619, 29871, 29896, 13, 9651, 736, 13, 4706, 396, 10987, 278, 3847, 2943, 310, 988, 278, 2183, 2944, 881, 367, 15478, 13, 4706, 3847, 353, 1583, 3032, 2886, 29918, 3560, 29918, 3177, 29918, 1524, 1230, 29898, 667, 29897, 13, 4706, 565, 3847, 29889, 275, 29918, 17519, 7295, 13, 9651, 565, 3847, 29889, 1563, 338, 451, 6213, 29901, 13, 18884, 3847, 29889, 1266, 353, 29479, 9643, 4247, 29898, 667, 29897, 13, 9651, 1683, 29901, 13, 18884, 3847, 29889, 1563, 353, 29479, 9643, 4247, 29898, 667, 29897, 13, 4706, 565, 3847, 29889, 275, 29918, 29500, 7295, 13, 9651, 565, 2944, 1405, 3847, 29889, 1272, 29901, 13, 18884, 3847, 29889, 1266, 353, 29479, 9643, 4247, 29898, 667, 29897, 13, 9651, 1683, 29901, 13, 18884, 3847, 29889, 1563, 353, 29479, 9643, 4247, 29898, 667, 29897, 13, 4706, 1583, 29889, 2311, 4619, 29871, 29896, 13, 4706, 736, 13, 13, 1678, 822, 903, 2886, 29918, 3177, 29918, 1524, 1230, 29898, 1311, 29892, 2944, 1125, 13, 4706, 9995, 11609, 278, 2943, 6943, 278, 2183, 2944, 297, 445, 7581, 2740, 5447, 29892, 13, 4706, 470, 6213, 565, 278, 2183, 2944, 338, 451, 1476, 29889, 11856, 338, 8560, 4256, 6703, 13, 4706, 6257, 515, 278, 3876, 2943, 1213, 15945, 13, 4706, 2943, 353, 1583, 29889, 4632, 13, 4706, 1550, 2943, 338, 451, 6213, 29901, 13, 9651, 565, 2943, 29889, 1272, 1275, 2944, 29901, 13, 18884, 736, 2943, 13, 9651, 25342, 2944, 529, 2943, 29889, 1272, 29901, 13, 18884, 2943, 353, 2943, 29889, 1563, 13, 9651, 25342, 2944, 1405, 2943, 29889, 1272, 29901, 13, 18884, 2943, 353, 2943, 29889, 1266, 13, 4706, 396, 2216, 1476, 13, 4706, 736, 6213, 13, 13, 1678, 822, 903, 2886, 29918, 3177, 29918, 3757, 25397, 29898, 1311, 29892, 2944, 29892, 2943, 1125, 13, 4706, 9995, 11609, 278, 2943, 6943, 278, 2183, 2944, 297, 445, 7581, 2740, 5447, 29892, 13, 4706, 470, 6213, 565, 278, 2183, 2944, 338, 451, 1476, 29889, 11856, 338, 8560, 8304, 3598, 13, 4706, 6257, 515, 278, 2183, 2943, 313, 29887, 573, 278, 3876, 2943, 304, 1369, 20437, 467, 13, 4706, 14402, 29901, 6407, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 19662, 303, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 29871, 6407, 11733, 29871, 2734, 5974, 438, 29898, 29896, 29897, 565, 3847, 338, 6213, 29914, 10303, 13, 4706, 396, 29871, 19662, 303, 11733, 19509, 5974, 438, 29898, 29876, 29897, 960, 505, 304, 2740, 1549, 1269, 2943, 13, 4706, 396, 2943, 353, 1583, 3032, 2886, 29918, 3560, 29918, 3177, 29918, 3757, 25397, 29898, 667, 29892, 2943, 29897, 13, 13, 4706, 565, 2943, 338, 6213, 29901, 13, 9651, 736, 6213, 13, 4706, 565, 2943, 29889, 1272, 1275, 2944, 29901, 13, 9651, 736, 2943, 13, 4706, 25342, 2943, 29889, 1272, 529, 2944, 29901, 13, 9651, 736, 1583, 3032, 2886, 29918, 3177, 29918, 3757, 25397, 29898, 667, 29892, 2943, 29889, 1266, 29897, 13, 4706, 1683, 29901, 13, 9651, 736, 1583, 3032, 2886, 29918, 3177, 29918, 3757, 25397, 29898, 667, 29892, 2943, 29889, 1563, 29897, 13, 13, 1678, 822, 903, 2886, 29918, 3560, 29918, 3177, 29918, 1524, 1230, 29898, 1311, 29892, 2944, 1125, 13, 4706, 9995, 11609, 278, 3847, 2943, 310, 278, 2943, 6943, 278, 2183, 2944, 13, 4706, 313, 272, 278, 3847, 2943, 310, 988, 278, 2183, 2944, 723, 367, 565, 15478, 29897, 13, 4706, 297, 445, 5447, 29892, 470, 6213, 565, 445, 5447, 338, 4069, 470, 756, 871, 263, 3876, 2943, 29889, 13, 4706, 11856, 338, 8560, 4256, 6703, 6257, 515, 278, 3876, 2943, 29889, 13, 4706, 14402, 29901, 6407, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 19662, 303, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 29871, 6407, 11733, 29871, 2734, 5974, 438, 29898, 29896, 29897, 565, 3847, 338, 6213, 29914, 10303, 13, 4706, 396, 29871, 19662, 303, 11733, 19509, 5974, 438, 29898, 29876, 29897, 960, 505, 304, 2740, 1549, 1269, 2943, 13, 4706, 396, 7370, 411, 278, 3876, 2943, 322, 3013, 5702, 310, 967, 3847, 13, 4706, 2943, 353, 1583, 29889, 4632, 13, 4706, 3847, 353, 2943, 13, 4706, 565, 1583, 29889, 275, 29918, 6310, 580, 338, 5852, 470, 1583, 29889, 4632, 338, 6213, 29901, 13, 9651, 736, 3847, 13, 4706, 1550, 2943, 338, 451, 6213, 29901, 13, 9651, 3847, 29918, 13658, 353, 5852, 13, 9651, 565, 2943, 29889, 1272, 1275, 2944, 29901, 13, 18884, 736, 3847, 13, 9651, 565, 2943, 29889, 1563, 338, 6213, 322, 2943, 29889, 1266, 338, 451, 6213, 470, 2943, 29889, 1266, 338, 6213, 322, 2943, 29889, 1563, 338, 451, 6213, 29901, 13, 18884, 3847, 29918, 13658, 353, 7700, 13, 9651, 565, 2943, 29889, 275, 29918, 29500, 580, 338, 5852, 470, 3847, 29918, 13658, 338, 7700, 29901, 13, 18884, 9995, 29871, 960, 727, 526, 694, 14202, 470, 871, 756, 263, 2323, 5443, 15945, 29908, 13, 18884, 736, 3847, 13, 9651, 565, 2944, 529, 2943, 29889, 1272, 29901, 13, 18884, 9995, 22280, 674, 367, 2175, 2943, 15945, 29908, 13, 18884, 3847, 353, 2943, 29889, 1563, 13, 18884, 2943, 353, 2943, 29889, 1563, 13, 9651, 1683, 29901, 13, 18884, 3847, 353, 2943, 29889, 1266, 13, 18884, 2943, 353, 2943, 29889, 1266, 13, 13, 1678, 822, 903, 2886, 29918, 3560, 29918, 3177, 29918, 3757, 25397, 29898, 1311, 29892, 2944, 29892, 2943, 29892, 3847, 29922, 8516, 1125, 13, 4706, 9995, 11609, 278, 3847, 2943, 310, 278, 2943, 6943, 278, 2183, 2944, 13, 4706, 313, 272, 278, 3847, 2943, 310, 988, 278, 2183, 2944, 723, 367, 565, 15478, 29897, 13, 4706, 297, 445, 5447, 29892, 470, 6213, 565, 445, 5447, 338, 4069, 470, 756, 871, 263, 3876, 2943, 29889, 13, 4706, 11856, 338, 8560, 8304, 3598, 6257, 515, 278, 2183, 2943, 13, 4706, 313, 29887, 573, 278, 3876, 2943, 304, 1369, 20437, 467, 15945, 29908, 13, 4706, 565, 2943, 338, 6213, 29901, 13, 9651, 736, 3847, 13, 4706, 565, 2944, 1275, 2943, 29889, 1272, 29901, 13, 9651, 736, 3847, 13, 4706, 25342, 2944, 529, 2943, 29889, 1272, 29901, 13, 9651, 736, 1583, 3032, 2886, 29918, 3560, 29918, 3177, 29918, 3757, 25397, 29898, 667, 29892, 2943, 29889, 1563, 29892, 2943, 29897, 13, 4706, 25342, 2944, 1405, 2943, 29889, 1272, 29901, 13, 9651, 736, 1583, 3032, 2886, 29918, 3560, 29918, 3177, 29918, 3757, 25397, 29898, 667, 29892, 2943, 29889, 1266, 29892, 2943, 29897, 13, 13, 1678, 822, 5217, 29898, 1311, 29892, 2944, 1125, 13, 4706, 9995, 15941, 2183, 2944, 515, 445, 5447, 29892, 565, 2198, 29892, 470, 12020, 7865, 2392, 29889, 13, 4706, 14402, 29901, 6407, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 19662, 303, 1206, 2734, 931, 29901, 1577, 8773, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 14402, 29901, 4803, 16876, 3519, 322, 2867, 445, 5687, 1623, 964, 29871, 29941, 4251, 13, 4706, 396, 2729, 373, 920, 1784, 4344, 278, 2943, 6943, 278, 2183, 2944, 756, 322, 13, 4706, 396, 2334, 716, 16876, 3519, 363, 1014, 20673, 310, 278, 901, 4280, 4251, 13, 13, 4706, 3847, 29918, 3177, 353, 1583, 3032, 2886, 29918, 3560, 29918, 3177, 29918, 1524, 1230, 29898, 667, 29897, 13, 4706, 2943, 353, 1583, 3032, 2886, 29918, 3177, 29918, 1524, 1230, 29898, 667, 29897, 13, 4706, 565, 3847, 29918, 3177, 338, 6213, 29901, 13, 9651, 9995, 15472, 338, 4069, 15945, 29908, 13, 9651, 736, 6213, 13, 4706, 565, 3847, 29918, 3177, 29889, 1272, 1275, 2944, 29901, 13, 9651, 1596, 703, 9780, 2943, 7374, 291, 1159, 13, 9651, 9995, 19928, 367, 3876, 2943, 9995, 13, 9651, 565, 2943, 29889, 1563, 338, 6213, 29901, 13, 18884, 1583, 29889, 4632, 353, 2943, 29889, 1266, 13, 18884, 2943, 29889, 1266, 353, 6213, 13, 9651, 25342, 2943, 29889, 1266, 338, 6213, 29901, 13, 18884, 1583, 29889, 4632, 353, 2943, 29889, 1563, 13, 18884, 2943, 29889, 1563, 353, 6213, 13, 9651, 25342, 2943, 29889, 1266, 338, 6213, 322, 2943, 29889, 1563, 338, 6213, 29901, 13, 18884, 1583, 29889, 4632, 353, 6213, 13, 18884, 736, 6213, 13, 9651, 1683, 29901, 13, 18884, 396, 29871, 3824, 4331, 338, 304, 1439, 496, 3876, 304, 2175, 2625, 13, 18884, 1583, 29889, 4632, 353, 2943, 29889, 1563, 13, 18884, 565, 1583, 29889, 4632, 29889, 1266, 338, 6213, 29901, 13, 462, 1678, 1583, 29889, 4632, 29889, 1266, 353, 2943, 29889, 1266, 13, 18884, 1683, 29901, 13, 462, 1678, 5714, 29918, 1272, 353, 1583, 29889, 4632, 29889, 1266, 13, 462, 1678, 1583, 29889, 4632, 29889, 1266, 353, 2943, 29889, 1266, 13, 462, 1678, 1583, 29889, 7851, 29898, 18767, 29918, 1272, 29889, 1272, 29897, 13, 18884, 736, 13, 18884, 396, 6440, 4331, 338, 304, 337, 6388, 675, 13, 4706, 565, 2943, 29889, 275, 29918, 29500, 580, 338, 5852, 29901, 13, 9651, 9995, 960, 2943, 756, 694, 4344, 1205, 756, 3847, 15945, 29908, 13, 9651, 1596, 703, 3226, 2142, 7374, 291, 1159, 13, 9651, 565, 3847, 29918, 3177, 29889, 1272, 1405, 2943, 29889, 1272, 29901, 13, 18884, 3847, 29918, 3177, 29889, 1563, 353, 6213, 13, 9651, 1683, 29901, 13, 18884, 3847, 29918, 3177, 29889, 1266, 353, 6213, 13, 9651, 736, 13, 4706, 9995, 6407, 1206, 885, 759, 601, 29892, 2943, 756, 263, 3847, 322, 4344, 15945, 29908, 13, 4706, 565, 2943, 29889, 1563, 338, 451, 6213, 29901, 13, 9651, 565, 3847, 29918, 3177, 29889, 1272, 1405, 2943, 29889, 1563, 29889, 1272, 29901, 13, 18884, 3847, 29918, 3177, 29889, 1563, 353, 2943, 29889, 1563, 13, 9651, 1683, 29901, 13, 18884, 3847, 29918, 3177, 29889, 1266, 353, 2943, 29889, 1563, 13, 13, 4706, 565, 2943, 29889, 1266, 338, 451, 6213, 29901, 13, 9651, 565, 2943, 29889, 1266, 29889, 1272, 1405, 2943, 29889, 1563, 29889, 1272, 29901, 13, 18884, 2943, 29889, 1563, 29889, 1266, 353, 2943, 29889, 1266, 13, 9651, 1683, 29901, 13, 18884, 2943, 29889, 1563, 29889, 1563, 353, 2943, 29889, 1266, 13, 4706, 736, 13, 13, 1678, 822, 4452, 29918, 262, 29918, 2098, 29898, 1311, 1125, 13, 4706, 9995, 11609, 385, 297, 29899, 2098, 1051, 310, 599, 4452, 297, 445, 7581, 2740, 5447, 1213, 15945, 13, 4706, 4452, 353, 5159, 13, 4706, 565, 451, 1583, 29889, 275, 29918, 6310, 7295, 13, 9651, 396, 3201, 3901, 5447, 297, 29899, 2098, 515, 3876, 29892, 623, 2548, 1269, 2943, 29915, 29879, 2944, 13, 9651, 1583, 3032, 3018, 3901, 29918, 262, 29918, 2098, 29918, 3757, 25397, 29898, 1311, 29889, 4632, 29892, 4452, 29889, 4397, 29897, 13, 4706, 396, 7106, 297, 29899, 2098, 1051, 310, 599, 4452, 297, 5447, 13, 4706, 736, 4452, 13, 13, 1678, 822, 903, 3018, 3901, 29918, 262, 29918, 2098, 29918, 3757, 25397, 29898, 1311, 29892, 2943, 29892, 6493, 1125, 13, 4706, 9995, 5323, 3901, 445, 7581, 5447, 411, 16732, 297, 29899, 2098, 13310, 284, 313, 4037, 29903, 467, 13, 4706, 7370, 472, 278, 2183, 2943, 322, 6493, 1269, 2943, 411, 278, 2183, 740, 29889, 13, 4706, 14402, 29901, 19509, 931, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 18914, 8744, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 19509, 5974, 259, 29900, 29898, 29876, 29897, 13, 4706, 396, 14121, 26596, 537, 438, 29898, 29882, 29897, 13, 4706, 565, 2943, 338, 451, 6213, 29901, 13, 9651, 396, 14402, 29901, 3201, 3901, 2175, 1014, 8336, 29892, 565, 372, 4864, 13, 9651, 1583, 3032, 3018, 3901, 29918, 262, 29918, 2098, 29918, 3757, 25397, 29898, 3177, 29889, 1563, 29892, 6493, 29897, 13, 9651, 396, 14402, 29901, 5741, 277, 445, 2943, 29915, 29879, 848, 411, 2183, 740, 13, 9651, 6493, 29898, 3177, 29889, 1272, 29897, 13, 9651, 396, 14402, 29901, 3201, 3901, 1492, 1014, 8336, 29892, 565, 372, 4864, 13, 9651, 1583, 3032, 3018, 3901, 29918, 262, 29918, 2098, 29918, 3757, 25397, 29898, 3177, 29889, 1266, 29892, 6493, 29897, 13, 13, 1678, 822, 903, 3018, 3901, 29918, 262, 29918, 2098, 29918, 1524, 1230, 29898, 1311, 29892, 2943, 29892, 6493, 1125, 13, 4706, 9995, 5323, 3901, 445, 7581, 5447, 411, 4256, 1230, 297, 29899, 2098, 13310, 284, 313, 4037, 29903, 467, 13, 4706, 7370, 472, 278, 2183, 2943, 322, 6493, 1269, 2943, 411, 278, 2183, 740, 29889, 13, 4706, 14402, 29901, 19509, 931, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 18914, 8744, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 14402, 29901, 3201, 3901, 297, 29899, 2098, 1728, 773, 20437, 313, 303, 10301, 18766, 29897, 13, 13, 1678, 822, 4452, 29918, 1457, 29918, 2098, 29898, 1311, 1125, 13, 4706, 9995, 11609, 263, 758, 29899, 2098, 1051, 310, 599, 4452, 297, 445, 7581, 2740, 5447, 1213, 15945, 13, 4706, 4452, 353, 5159, 13, 4706, 565, 451, 1583, 29889, 275, 29918, 6310, 7295, 13, 9651, 396, 3201, 3901, 5447, 758, 29899, 2098, 515, 3876, 29892, 623, 2548, 1269, 2943, 29915, 29879, 2944, 13, 9651, 1583, 3032, 3018, 3901, 29918, 1457, 29918, 2098, 29918, 3757, 25397, 29898, 1311, 29889, 4632, 29892, 4452, 29889, 4397, 29897, 13, 4706, 396, 7106, 758, 29899, 2098, 1051, 310, 599, 4452, 297, 5447, 13, 4706, 736, 4452, 13, 13, 1678, 822, 903, 3018, 3901, 29918, 1457, 29918, 2098, 29918, 3757, 25397, 29898, 1311, 29892, 2943, 29892, 6493, 1125, 13, 4706, 9995, 5323, 3901, 445, 7581, 5447, 411, 16732, 758, 29899, 2098, 13310, 284, 313, 4037, 29903, 467, 13, 4706, 7370, 472, 278, 2183, 2943, 322, 6493, 1269, 2943, 411, 278, 2183, 740, 29889, 13, 4706, 14402, 29901, 19509, 931, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 18914, 8744, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 19509, 5974, 259, 29900, 29898, 29876, 29897, 13, 4706, 396, 14121, 26596, 537, 438, 29898, 29882, 29897, 13, 4706, 396, 14402, 29901, 5741, 277, 445, 2943, 29915, 29879, 848, 411, 2183, 740, 13, 4706, 565, 2943, 338, 451, 6213, 29901, 13, 9651, 6493, 29898, 3177, 29889, 1272, 29897, 13, 4706, 396, 14402, 29901, 3201, 3901, 2175, 1014, 8336, 29892, 565, 372, 4864, 13, 9651, 1583, 3032, 3018, 3901, 29918, 1457, 29918, 2098, 29918, 3757, 25397, 29898, 3177, 29889, 1563, 29892, 6493, 29897, 13, 4706, 396, 14402, 29901, 3201, 3901, 1492, 1014, 8336, 29892, 565, 372, 4864, 13, 9651, 1583, 3032, 3018, 3901, 29918, 1457, 29918, 2098, 29918, 3757, 25397, 29898, 3177, 29889, 1266, 29892, 6493, 29897, 13, 13, 1678, 822, 903, 3018, 3901, 29918, 1457, 29918, 2098, 29918, 1524, 1230, 29898, 1311, 29892, 2943, 29892, 6493, 1125, 13, 4706, 9995, 5323, 3901, 445, 7581, 5447, 411, 4256, 1230, 758, 29899, 2098, 13310, 284, 313, 4037, 29903, 467, 13, 4706, 7370, 472, 278, 2183, 2943, 322, 6493, 1269, 2943, 411, 278, 2183, 740, 29889, 13, 4706, 14402, 29901, 19509, 931, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 18914, 8744, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 14402, 29901, 3201, 3901, 758, 29899, 2098, 1728, 773, 20437, 313, 303, 10301, 18766, 29897, 13, 13, 1678, 822, 4452, 29918, 2490, 29918, 2098, 29898, 1311, 1125, 13, 4706, 9995, 11609, 263, 1400, 29899, 2098, 1051, 310, 599, 4452, 297, 445, 7581, 2740, 5447, 1213, 15945, 13, 4706, 4452, 353, 5159, 13, 4706, 565, 451, 1583, 29889, 275, 29918, 6310, 7295, 13, 9651, 396, 3201, 3901, 5447, 1400, 29899, 2098, 515, 3876, 29892, 623, 2548, 1269, 2943, 29915, 29879, 2944, 13, 9651, 1583, 3032, 3018, 3901, 29918, 2490, 29918, 2098, 29918, 3757, 25397, 29898, 1311, 29889, 4632, 29892, 4452, 29889, 4397, 29897, 13, 4706, 396, 7106, 1400, 29899, 2098, 1051, 310, 599, 4452, 297, 5447, 13, 4706, 736, 4452, 13, 13, 1678, 822, 903, 3018, 3901, 29918, 2490, 29918, 2098, 29918, 3757, 25397, 29898, 1311, 29892, 2943, 29892, 6493, 1125, 13, 4706, 9995, 5323, 3901, 445, 7581, 5447, 411, 16732, 1400, 29899, 2098, 13310, 284, 313, 4037, 29903, 467, 13, 4706, 7370, 472, 278, 2183, 2943, 322, 6493, 1269, 2943, 411, 278, 2183, 740, 29889, 13, 4706, 14402, 29901, 19509, 931, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 18914, 8744, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 29871, 19509, 5974, 438, 29898, 29876, 29897, 13, 4706, 396, 29871, 5974, 13644, 438, 29898, 29882, 29897, 13, 4706, 565, 2943, 338, 451, 6213, 29901, 13, 9651, 396, 14402, 29901, 3201, 3901, 2175, 1014, 8336, 29892, 565, 372, 4864, 13, 9651, 1583, 3032, 3018, 3901, 29918, 2490, 29918, 2098, 29918, 3757, 25397, 29898, 3177, 29889, 1563, 29892, 6493, 29897, 13, 9651, 396, 14402, 29901, 3201, 3901, 1492, 1014, 8336, 29892, 565, 372, 4864, 13, 9651, 1583, 3032, 3018, 3901, 29918, 2490, 29918, 2098, 29918, 3757, 25397, 29898, 3177, 29889, 1266, 29892, 6493, 29897, 13, 9651, 396, 14402, 29901, 5741, 277, 445, 2943, 29915, 29879, 848, 411, 2183, 740, 13, 9651, 6493, 29898, 3177, 29889, 1272, 29897, 13, 13, 1678, 822, 903, 3018, 3901, 29918, 2490, 29918, 2098, 29918, 1524, 1230, 29898, 1311, 29892, 2943, 29892, 6493, 1125, 13, 4706, 9995, 5323, 3901, 445, 7581, 5447, 411, 4256, 1230, 1400, 29899, 2098, 13310, 284, 313, 4037, 29903, 467, 13, 4706, 7370, 472, 278, 2183, 2943, 322, 6493, 1269, 2943, 411, 278, 2183, 740, 29889, 13, 4706, 14402, 29901, 19509, 931, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 18914, 8744, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 14402, 29901, 3201, 3901, 1400, 29899, 2098, 1728, 773, 20437, 313, 303, 10301, 18766, 29897, 13, 13, 1678, 822, 4452, 29918, 5563, 29918, 2098, 29898, 1311, 1125, 13, 4706, 9995, 11609, 263, 3233, 29899, 2098, 1051, 310, 599, 4452, 297, 445, 7581, 2740, 5447, 1213, 15945, 13, 4706, 4452, 353, 5159, 13, 4706, 565, 451, 1583, 29889, 275, 29918, 6310, 7295, 13, 9651, 396, 3201, 3901, 5447, 3233, 29899, 2098, 515, 3876, 29892, 623, 2548, 1269, 2943, 29915, 29879, 2944, 13, 9651, 1583, 3032, 3018, 3901, 29918, 5563, 29918, 2098, 29918, 1524, 1230, 29898, 1311, 29889, 4632, 29892, 4452, 29889, 4397, 29897, 13, 4706, 396, 7106, 3233, 29899, 2098, 1051, 310, 599, 4452, 297, 5447, 13, 4706, 736, 4452, 13, 13, 1678, 822, 903, 3018, 3901, 29918, 5563, 29918, 2098, 29918, 1524, 1230, 29898, 1311, 29892, 1369, 29918, 3177, 29892, 6493, 1125, 13, 4706, 9995, 5323, 3901, 445, 7581, 5447, 411, 4256, 1230, 3233, 29899, 2098, 13310, 284, 313, 29933, 9998, 467, 13, 4706, 7370, 472, 278, 2183, 2943, 322, 6493, 1269, 2943, 411, 278, 2183, 740, 29889, 13, 4706, 14402, 29901, 19509, 931, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 29973, 13, 4706, 14402, 29901, 18914, 8744, 29901, 1577, 8773, 3750, 322, 1090, 825, 5855, 3026, 15945, 13, 4706, 396, 29871, 19509, 5974, 438, 29898, 29876, 29897, 13, 4706, 396, 29871, 14121, 26596, 537, 438, 29898, 29876, 29897, 13, 4706, 396, 14402, 29901, 6204, 9521, 304, 3787, 7573, 451, 3447, 13310, 287, 297, 3233, 29899, 2098, 13, 4706, 9521, 353, 316, 802, 580, 13, 4706, 396, 14402, 29901, 1174, 9990, 2183, 6257, 2943, 13, 4706, 9521, 29889, 4397, 29898, 2962, 29918, 3177, 29897, 13, 4706, 396, 14402, 29901, 21493, 2745, 9521, 338, 4069, 13, 4706, 1550, 7431, 29898, 9990, 29897, 1405, 29871, 29900, 29901, 13, 9651, 396, 14402, 29901, 897, 9990, 2943, 472, 4565, 310, 9521, 13, 9651, 2943, 353, 9521, 29889, 7323, 1563, 580, 13, 9651, 396, 14402, 29901, 5741, 277, 445, 2943, 29915, 29879, 848, 411, 2183, 740, 13, 9651, 6493, 29898, 3177, 29889, 1272, 29897, 13, 9651, 396, 14402, 29901, 1174, 9990, 445, 2943, 29915, 29879, 2175, 2278, 29892, 565, 372, 4864, 13, 9651, 565, 2943, 29889, 1563, 338, 451, 6213, 29901, 13, 18884, 9521, 29889, 4397, 29898, 3177, 29889, 1563, 29897, 13, 9651, 396, 14402, 29901, 1174, 9990, 445, 2943, 29915, 29879, 1492, 2278, 29892, 565, 372, 4864, 13, 9651, 565, 2943, 29889, 1266, 338, 451, 6213, 29901, 13, 18884, 9521, 29889, 4397, 29898, 3177, 29889, 1266, 29897, 13, 13, 13, 1753, 1243, 29918, 19541, 29918, 4478, 29918, 8336, 7295, 13, 1678, 396, 6204, 263, 4866, 7581, 2740, 5447, 310, 29871, 29941, 29892, 29871, 29955, 29892, 470, 29871, 29896, 29945, 4452, 297, 3233, 29899, 2098, 13, 1678, 396, 4452, 353, 518, 29906, 29892, 29871, 29896, 29892, 29871, 29941, 29962, 13, 1678, 4452, 353, 518, 29946, 29892, 29871, 29906, 29892, 29871, 29953, 29892, 29871, 29896, 29892, 29871, 29941, 29892, 29871, 29945, 29892, 29871, 29955, 29962, 13, 1678, 396, 4452, 353, 518, 29947, 29892, 29871, 29946, 29892, 29871, 29896, 29906, 29892, 29871, 29906, 29892, 29871, 29953, 29892, 29871, 29896, 29900, 29892, 29871, 29896, 29946, 29892, 29871, 29896, 29892, 29871, 29941, 29892, 29871, 29945, 29892, 29871, 29955, 29892, 29871, 29929, 29892, 29871, 29896, 29896, 29892, 29871, 29896, 29941, 29892, 29871, 29896, 29945, 29962, 13, 1678, 1596, 877, 7076, 29901, 6571, 4286, 4830, 29898, 7076, 876, 13, 13, 1678, 5447, 353, 29479, 7974, 9643, 580, 13, 1678, 1596, 877, 8336, 29901, 6571, 4286, 4830, 29898, 8336, 876, 13, 1678, 1596, 877, 4632, 29901, 6571, 4286, 4830, 29898, 8336, 29889, 4632, 876, 13, 13, 1678, 1596, 28909, 29876, 797, 643, 1259, 4452, 29901, 1495, 13, 1678, 363, 2944, 297, 4452, 29901, 13, 4706, 5447, 29889, 7851, 29898, 667, 29897, 13, 4706, 1596, 877, 7851, 3319, 9594, 2159, 29901, 6571, 4286, 4830, 29898, 667, 29892, 5447, 29889, 2311, 876, 13, 1678, 1596, 877, 4632, 29901, 6571, 4286, 4830, 29898, 8336, 29889, 4632, 876, 13, 13, 1678, 1596, 28909, 29876, 7974, 292, 363, 4452, 29901, 1495, 13, 1678, 363, 2944, 297, 4452, 29901, 13, 4706, 1121, 353, 5447, 29889, 4478, 29898, 667, 29897, 13, 4706, 1596, 877, 4478, 3319, 29913, 1125, 6571, 4286, 4830, 29898, 667, 29892, 1121, 876, 13, 1678, 2944, 353, 29871, 29896, 29906, 29941, 13, 1678, 1121, 353, 5447, 29889, 4478, 29898, 667, 29897, 13, 1678, 1596, 877, 4478, 3319, 29913, 1125, 6571, 4286, 4830, 29898, 667, 29892, 1121, 876, 13, 13, 1678, 1596, 28909, 29876, 5323, 874, 292, 4452, 29901, 1495, 13, 1678, 1596, 877, 7076, 297, 29899, 2098, 29901, 1678, 6571, 4286, 4830, 29898, 8336, 29889, 7076, 29918, 262, 29918, 2098, 22130, 13, 1678, 1596, 877, 7076, 758, 29899, 2098, 29901, 259, 6571, 4286, 4830, 29898, 8336, 29889, 7076, 29918, 1457, 29918, 2098, 22130, 13, 1678, 1596, 877, 7076, 1400, 29899, 2098, 29901, 29871, 6571, 4286, 4830, 29898, 8336, 29889, 7076, 29918, 2490, 29918, 2098, 22130, 13, 1678, 1596, 877, 7076, 3233, 29899, 2098, 29901, 6571, 4286, 4830, 29898, 8336, 29889, 7076, 29918, 5563, 29918, 2098, 22130, 13, 13, 13, 1753, 4274, 14023, 7295, 13, 1678, 1404, 9643, 353, 29479, 7974, 9643, 580, 29871, 396, 2812, 2349, 5447, 13, 1678, 4160, 353, 518, 2659, 29898, 29896, 29947, 29892, 29871, 29900, 511, 4911, 29898, 29896, 29906, 29892, 29871, 29941, 29946, 511, 4911, 29898, 29896, 29941, 29892, 29871, 29906, 29946, 511, 4911, 29898, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 511, 4911, 29898, 29941, 29946, 29892, 29871, 29946, 511, 4911, 29898, 29906, 29900, 29892, 29871, 29929, 29900, 4638, 29871, 396, 2391, 310, 4160, 13, 1678, 363, 1404, 297, 4160, 29901, 13, 4706, 1404, 9643, 29889, 7851, 29898, 1792, 29889, 482, 29897, 13, 1678, 736, 1404, 9643, 29889, 7076, 29918, 262, 29918, 2098, 580, 13, 13, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 396, 1243, 29918, 19541, 29918, 4478, 29918, 8336, 580, 13, 1678, 1596, 29898, 7914, 14023, 3101, 13, 2 ]
Python/add_networks_from_ddi.py
rexyim/netmri-toolkit
17
117932
<gh_stars>10-100 import requests import json requests.packages.urllib3.disable_warnings() gm_user = "admin" gm_pwd = "<PASSWORD>" url = "https://192.168.0.200/wapi/v2.7/" s = requests.Session() s.auth = (gm_user, gm_pwd) mri_url = "192.168.0.201" mri_user = "admin" mri_pwd = "<PASSWORD>" def get_networks_to_add(): # We are going to search an EA called NetMRI and look for any value of ADD querystring = {"_return_fields+": "extattrs", "*NetMRI:": "Add"} # We are using the API Network method url2 = url + "network" response = s.get(url2, params=querystring, verify=False) if response.status_code == 200: return json.loads(response.content.decode('utf-8')) else: return None def add_network_mri(net_new): url3 = "https://" + mri_url + "/api/3.3/discovery_settings/create" payload = "{\n\t\"range_value\" : \"" + net_new + \ "\",\n\t\"range_type\" : \"CIDR\",\n\t\"discovery_status\" : \"INCLUDE\"\n}" headers = {'Content-Type': "application/json"} response = requests.post(url3, data=payload, verify=False, auth=(mri_user, mri_pwd), headers=headers) if response.status_code == 201: return json.loads(response.content.decode('utf-8')) else: return None def update_network_ea(ea): url1 = url + ea payload = "{\"extattrs\": { \"NetMRI\": { \"value\": \"Done\"}} }" headers = {'Content-Type': "application/json"} response = s.put( url1, data=payload, verify=False, auth=(gm_user, gm_pwd), headers=headers) if response.status_code == 200: return json.loads(response.content.decode('utf-8')) else: return None account_info = get_networks_to_add() #print(account_info) if account_info is not None: print("Found the following network(s) will be added to NetMRI: ") for k in account_info: new_net_mri = k['network'] add_netmri = add_network_mri(new_net_mri) if add_netmri is not None: print("[+] Added network " + new_net_mri + " for discovery") ea = k['_ref'] done = update_network_ea(ea) if done is not None: print("[+] Updated EA for " + k['network']) else: print('[-] EA Update Request Failed' ) else: print('[-] Update to NetMRI Failed' + k['network']) else: print('[-] Request Failed')
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 7274, 13, 5215, 4390, 13, 13, 24830, 29889, 8318, 29889, 2271, 1982, 29941, 29889, 20472, 29918, 25442, 886, 580, 13, 13, 29887, 29885, 29918, 1792, 353, 376, 6406, 29908, 13, 29887, 29885, 29918, 29886, 9970, 353, 9872, 25711, 17013, 11903, 13, 2271, 353, 376, 991, 597, 29896, 29929, 29906, 29889, 29896, 29953, 29947, 29889, 29900, 29889, 29906, 29900, 29900, 29914, 29893, 2754, 29914, 29894, 29906, 29889, 29955, 12975, 13, 29879, 353, 7274, 29889, 7317, 580, 13, 29879, 29889, 5150, 353, 313, 29887, 29885, 29918, 1792, 29892, 330, 29885, 29918, 29886, 9970, 29897, 13, 29885, 374, 29918, 2271, 353, 376, 29896, 29929, 29906, 29889, 29896, 29953, 29947, 29889, 29900, 29889, 29906, 29900, 29896, 29908, 13, 29885, 374, 29918, 1792, 353, 376, 6406, 29908, 13, 29885, 374, 29918, 29886, 9970, 353, 9872, 25711, 17013, 11903, 13, 13, 1753, 679, 29918, 11618, 29879, 29918, 517, 29918, 1202, 7295, 13, 1678, 396, 1334, 526, 2675, 304, 2740, 385, 382, 29909, 2000, 12670, 29924, 3960, 322, 1106, 363, 738, 995, 310, 27827, 13, 1678, 2346, 1807, 353, 8853, 29918, 2457, 29918, 9621, 29974, 1115, 376, 1062, 5552, 29879, 613, 26345, 6779, 29924, 3960, 29901, 1115, 376, 2528, 9092, 13, 1678, 396, 1334, 526, 773, 278, 3450, 8527, 1158, 13, 1678, 3142, 29906, 353, 3142, 718, 376, 11618, 29908, 13, 1678, 2933, 353, 269, 29889, 657, 29898, 2271, 29906, 29892, 29871, 8636, 29922, 1972, 1807, 29892, 11539, 29922, 8824, 29897, 13, 13, 1678, 565, 2933, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 29901, 13, 4706, 736, 4390, 29889, 18132, 29898, 5327, 29889, 3051, 29889, 13808, 877, 9420, 29899, 29947, 8785, 13, 1678, 1683, 29901, 13, 4706, 736, 6213, 13, 13, 13, 1753, 788, 29918, 11618, 29918, 29885, 374, 29898, 1212, 29918, 1482, 1125, 13, 1678, 3142, 29941, 353, 376, 991, 597, 29908, 718, 286, 374, 29918, 2271, 718, 5591, 2754, 29914, 29941, 29889, 29941, 29914, 2218, 11911, 29891, 29918, 11027, 29914, 3258, 29908, 13, 1678, 20092, 353, 376, 741, 29876, 29905, 29873, 5931, 3881, 29918, 1767, 5931, 584, 13218, 29908, 718, 7787, 29918, 1482, 718, 320, 13, 4706, 6634, 613, 29905, 29876, 29905, 29873, 5931, 3881, 29918, 1853, 5931, 584, 13218, 29907, 1367, 29934, 23370, 29905, 29876, 29905, 29873, 5931, 2218, 11911, 29891, 29918, 4882, 5931, 584, 13218, 1177, 6154, 29965, 2287, 5931, 29905, 29876, 5038, 13, 1678, 9066, 353, 11117, 3916, 29899, 1542, 2396, 376, 6214, 29914, 3126, 9092, 13, 1678, 2933, 353, 7274, 29889, 2490, 29898, 2271, 29941, 29892, 29871, 848, 29922, 23813, 29892, 11539, 29922, 8824, 29892, 13, 462, 268, 4817, 7607, 29885, 374, 29918, 1792, 29892, 286, 374, 29918, 29886, 9970, 511, 9066, 29922, 13662, 29897, 13, 1678, 565, 2933, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29896, 29901, 13, 4706, 736, 4390, 29889, 18132, 29898, 5327, 29889, 3051, 29889, 13808, 877, 9420, 29899, 29947, 8785, 13, 1678, 1683, 29901, 13, 4706, 736, 6213, 13, 13, 1753, 2767, 29918, 11618, 29918, 11248, 29898, 11248, 1125, 13, 1678, 3142, 29896, 353, 3142, 718, 321, 29874, 13, 1678, 20092, 353, 376, 741, 29908, 1062, 5552, 29879, 16203, 426, 13218, 6779, 29924, 3960, 16203, 426, 13218, 1767, 16203, 13218, 25632, 5931, 930, 500, 29908, 13, 1678, 9066, 353, 11117, 3916, 29899, 1542, 2396, 376, 6214, 29914, 3126, 9092, 13, 1678, 2933, 353, 269, 29889, 649, 29898, 3142, 29896, 29892, 29871, 848, 29922, 23813, 29892, 11539, 29922, 8824, 29892, 4817, 7607, 29887, 29885, 29918, 1792, 29892, 330, 29885, 29918, 29886, 9970, 511, 9066, 29922, 13662, 29897, 13, 13, 1678, 565, 2933, 29889, 4882, 29918, 401, 1275, 29871, 29906, 29900, 29900, 29901, 13, 4706, 736, 4390, 29889, 18132, 29898, 5327, 29889, 3051, 29889, 13808, 877, 9420, 29899, 29947, 8785, 13, 1678, 1683, 29901, 13, 4706, 736, 6213, 13, 13, 13, 10149, 29918, 3888, 353, 679, 29918, 11618, 29879, 29918, 517, 29918, 1202, 580, 13, 29937, 2158, 29898, 10149, 29918, 3888, 29897, 13, 361, 3633, 29918, 3888, 338, 451, 6213, 29901, 13, 1678, 1596, 703, 9692, 278, 1494, 3564, 29898, 29879, 29897, 674, 367, 2715, 304, 12670, 29924, 3960, 29901, 16521, 13, 1678, 363, 413, 297, 3633, 29918, 3888, 29901, 13, 4706, 716, 29918, 1212, 29918, 29885, 374, 353, 413, 1839, 11618, 2033, 13, 4706, 788, 29918, 1212, 29885, 374, 353, 788, 29918, 11618, 29918, 29885, 374, 29898, 1482, 29918, 1212, 29918, 29885, 374, 29897, 13, 4706, 565, 788, 29918, 1212, 29885, 374, 338, 451, 6213, 29901, 13, 9651, 1596, 703, 29961, 29974, 29962, 25601, 3564, 376, 718, 716, 29918, 1212, 29918, 29885, 374, 718, 376, 363, 20699, 1159, 13, 9651, 321, 29874, 353, 413, 1839, 29918, 999, 2033, 29871, 13, 9651, 2309, 353, 2767, 29918, 11618, 29918, 11248, 29898, 11248, 29897, 13, 9651, 565, 2309, 338, 451, 6213, 29901, 13, 18884, 1596, 703, 29961, 29974, 29962, 25723, 382, 29909, 363, 376, 718, 413, 1839, 11618, 11287, 13, 9651, 1683, 29901, 13, 18884, 1596, 877, 14352, 29962, 382, 29909, 10318, 10729, 18390, 29915, 1723, 13, 4706, 1683, 29901, 13, 18884, 1596, 877, 14352, 29962, 10318, 304, 12670, 29924, 3960, 18390, 29915, 718, 413, 1839, 11618, 11287, 13, 13, 13, 2870, 29901, 13, 1678, 1596, 877, 14352, 29962, 10729, 18390, 1495, 13, 13, 2 ]
transfer_model/losses/losses.py
ribeiro-hugo/smplx
776
94920
<filename>transfer_model/losses/losses.py # -*- coding: utf-8 -*- # Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is # holder of all proprietary rights on this computer program. # You can only use this computer program if you have closed # a license agreement with MPG or you get the right to use the computer # program from someone who is authorized to grant you that right. # Any use of the computer program without a valid license is prohibited and # liable to prosecution. # # Copyright©2020 Max-Planck-Gesellschaft zur Förderung # der Wissenschaften e.V. (MPG). acting on behalf of its Max Planck Institute # for Intelligent Systems. All rights reserved. # # Contact: <NAME>, <EMAIL> from __future__ import print_function from __future__ import absolute_import from __future__ import division import sys import time from typing import Callable, Iterator, Union, Optional, List import os.path as osp import yaml from loguru import logger import pickle import numpy as np import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F from .utils import get_reduction_method __all__ = [ 'VertexEdgeLoss', 'build_loss', ] def build_loss(type='l2', reduction='mean', **kwargs) -> nn.Module: logger.debug(f'Building loss: {type}') if type == 'l2': return WeightedMSELoss(reduction=reduction, **kwargs) elif type == 'vertex-edge': return VertexEdgeLoss(reduction=reduction, **kwargs) elif type == 'l1': return nn.L1Loss() else: raise ValueError(f'Unknown loss type: {type}') class WeightedMSELoss(nn.Module): def __init__(self, reduction='mean', **kwargs): super(WeightedMSELoss, self).__init__() self.reduce_str = reduction self.reduce = get_reduction_method(reduction) def forward(self, input, target, weights=None): diff = input - target if weights is None: return diff.pow(2).sum() / diff.shape[0] else: return ( weights.unsqueeze(dim=-1) * diff.pow(2)).sum() / diff.shape[0] class VertexEdgeLoss(nn.Module): def __init__(self, norm_type='l2', gt_edges=None, gt_edge_path='', est_edges=None, est_edge_path='', robustifier=None, edge_thresh=0.0, epsilon=1e-8, reduction='sum', **kwargs): super(VertexEdgeLoss, self).__init__() assert norm_type in ['l1', 'l2'], 'Norm type must be [l1, l2]' self.norm_type = norm_type self.epsilon = epsilon self.reduction = reduction assert self.reduction in ['sum', 'mean'] logger.info(f'Building edge loss with' f' norm_type={norm_type},' f' reduction={reduction},' ) gt_edge_path = osp.expandvars(gt_edge_path) est_edge_path = osp.expandvars(est_edge_path) assert osp.exists(gt_edge_path) or gt_edges is not None, ( 'gt_edges must not be None or gt_edge_path must exist' ) assert osp.exists(est_edge_path) or est_edges is not None, ( 'est_edges must not be None or est_edge_path must exist' ) if osp.exists(gt_edge_path) and gt_edges is None: gt_edges = np.load(gt_edge_path) if osp.exists(est_edge_path) and est_edges is None: est_edges = np.load(est_edge_path) self.register_buffer( 'gt_connections', torch.tensor(gt_edges, dtype=torch.long)) self.register_buffer( 'est_connections', torch.tensor(est_edges, dtype=torch.long)) def extra_repr(self): msg = [ f'Norm type: {self.norm_type}', ] if self.has_connections: msg.append( f'GT Connections shape: {self.gt_connections.shape}' ) msg.append( f'Est Connections shape: {self.est_connections.shape}' ) return '\n'.join(msg) def compute_edges(self, points, connections): edge_points = torch.index_select( points, 1, connections.view(-1)).reshape(points.shape[0], -1, 2, 3) return edge_points[:, :, 1] - edge_points[:, :, 0] def forward(self, gt_vertices, est_vertices, weights=None): gt_edges = self.compute_edges( gt_vertices, connections=self.gt_connections) est_edges = self.compute_edges( est_vertices, connections=self.est_connections) raw_edge_diff = (gt_edges - est_edges) batch_size = gt_vertices.shape[0] if self.norm_type == 'l2': edge_diff = raw_edge_diff.pow(2) elif self.norm_type == 'l1': edge_diff = raw_edge_diff.abs() else: raise NotImplementedError( f'Loss type not implemented: {self.loss_type}') if self.reduction == 'sum': return edge_diff.sum() elif self.reduction == 'mean': return edge_diff.sum() / batch_size
[ 1, 529, 9507, 29958, 3286, 571, 29918, 4299, 29914, 6758, 267, 29914, 6758, 267, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 5918, 29899, 20334, 384, 29899, 29954, 267, 10806, 3046, 17555, 672, 686, 589, 18359, 264, 321, 29889, 29963, 29889, 313, 3580, 29954, 29897, 338, 13, 29937, 19464, 310, 599, 24440, 653, 10462, 373, 445, 6601, 1824, 29889, 13, 29937, 887, 508, 871, 671, 445, 6601, 1824, 565, 366, 505, 5764, 13, 29937, 263, 19405, 17327, 411, 16379, 29954, 470, 366, 679, 278, 1492, 304, 671, 278, 6601, 13, 29937, 1824, 515, 4856, 1058, 338, 4148, 1891, 304, 16690, 366, 393, 1492, 29889, 13, 29937, 3139, 671, 310, 278, 6601, 1824, 1728, 263, 2854, 19405, 338, 21460, 1573, 322, 13, 29937, 619, 519, 304, 410, 3471, 918, 29889, 13, 29937, 13, 29937, 14187, 1266, 30211, 29906, 29900, 29906, 29900, 5918, 29899, 20334, 384, 29899, 29954, 267, 10806, 3046, 17555, 672, 686, 13, 29937, 589, 18359, 264, 321, 29889, 29963, 29889, 313, 3580, 29954, 467, 16684, 373, 2306, 3131, 310, 967, 5918, 8402, 384, 8907, 13, 29937, 363, 3159, 9347, 296, 23985, 29889, 2178, 10462, 21676, 29889, 13, 29937, 13, 29937, 22387, 29901, 529, 5813, 10202, 529, 26862, 6227, 29958, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 13, 5215, 10876, 13, 5215, 931, 13, 3166, 19229, 1053, 8251, 519, 29892, 20504, 1061, 29892, 7761, 29892, 28379, 29892, 2391, 13, 13, 5215, 2897, 29889, 2084, 408, 288, 1028, 13, 5215, 343, 8807, 13, 3166, 1480, 20144, 1053, 17927, 13, 13, 5215, 5839, 280, 13, 13, 5215, 12655, 408, 7442, 13, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 1300, 468, 3665, 408, 1120, 468, 3665, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 13, 3166, 869, 13239, 1053, 679, 29918, 9313, 428, 29918, 5696, 13, 13, 1649, 497, 1649, 353, 518, 13, 1678, 525, 22479, 23894, 29931, 2209, 742, 13, 1678, 525, 4282, 29918, 6758, 742, 13, 29962, 13, 13, 13, 1753, 2048, 29918, 6758, 29898, 1853, 2433, 29880, 29906, 742, 20376, 2433, 12676, 742, 3579, 19290, 29897, 1599, 302, 29876, 29889, 7355, 29901, 13, 1678, 17927, 29889, 8382, 29898, 29888, 29915, 8893, 292, 6410, 29901, 426, 1853, 29913, 1495, 13, 1678, 565, 1134, 1275, 525, 29880, 29906, 2396, 13, 4706, 736, 1334, 523, 287, 29924, 1660, 29931, 2209, 29898, 9313, 428, 29922, 9313, 428, 29892, 3579, 19290, 29897, 13, 1678, 25342, 1134, 1275, 525, 369, 4776, 29899, 12864, 2396, 13, 4706, 736, 1798, 4776, 23894, 29931, 2209, 29898, 9313, 428, 29922, 9313, 428, 29892, 3579, 19290, 29897, 13, 1678, 25342, 1134, 1275, 525, 29880, 29896, 2396, 13, 4706, 736, 302, 29876, 29889, 29931, 29896, 29931, 2209, 580, 13, 1678, 1683, 29901, 13, 4706, 12020, 7865, 2392, 29898, 29888, 29915, 14148, 6410, 1134, 29901, 426, 1853, 29913, 1495, 13, 13, 13, 1990, 1334, 523, 287, 29924, 1660, 29931, 2209, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 20376, 2433, 12676, 742, 3579, 19290, 1125, 13, 4706, 2428, 29898, 22676, 287, 29924, 1660, 29931, 2209, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 4706, 1583, 29889, 17469, 29918, 710, 353, 20376, 13, 4706, 1583, 29889, 17469, 353, 679, 29918, 9313, 428, 29918, 5696, 29898, 9313, 428, 29897, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 1881, 29892, 3646, 29892, 18177, 29922, 8516, 1125, 13, 4706, 2923, 353, 1881, 448, 3646, 13, 4706, 565, 18177, 338, 6213, 29901, 13, 9651, 736, 2923, 29889, 12248, 29898, 29906, 467, 2083, 580, 847, 2923, 29889, 12181, 29961, 29900, 29962, 13, 4706, 1683, 29901, 13, 9651, 736, 313, 13, 18884, 18177, 29889, 6948, 802, 29872, 911, 29898, 6229, 10457, 29896, 29897, 334, 2923, 29889, 12248, 29898, 29906, 8106, 2083, 580, 847, 2923, 29889, 12181, 29961, 29900, 29962, 13, 13, 13, 1990, 1798, 4776, 23894, 29931, 2209, 29898, 15755, 29889, 7355, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 6056, 29918, 1853, 2433, 29880, 29906, 742, 13, 462, 330, 29873, 29918, 287, 2710, 29922, 8516, 29892, 13, 462, 330, 29873, 29918, 12864, 29918, 2084, 2433, 742, 13, 462, 707, 29918, 287, 2710, 29922, 8516, 29892, 13, 462, 707, 29918, 12864, 29918, 2084, 2433, 742, 13, 462, 16424, 3709, 29922, 8516, 29892, 13, 462, 7636, 29918, 386, 3781, 29922, 29900, 29889, 29900, 29892, 321, 3232, 29922, 29896, 29872, 29899, 29947, 29892, 13, 462, 20376, 2433, 2083, 742, 13, 462, 3579, 19290, 1125, 13, 4706, 2428, 29898, 22479, 23894, 29931, 2209, 29892, 1583, 467, 1649, 2344, 1649, 580, 13, 13, 4706, 4974, 6056, 29918, 1853, 297, 6024, 29880, 29896, 742, 525, 29880, 29906, 7464, 525, 29940, 555, 1134, 1818, 367, 518, 29880, 29896, 29892, 301, 29906, 29962, 29915, 13, 4706, 1583, 29889, 12324, 29918, 1853, 353, 6056, 29918, 1853, 13, 4706, 1583, 29889, 5463, 353, 321, 3232, 13, 4706, 1583, 29889, 9313, 428, 353, 20376, 13, 4706, 4974, 1583, 29889, 9313, 428, 297, 6024, 2083, 742, 525, 12676, 2033, 13, 4706, 17927, 29889, 3888, 29898, 29888, 29915, 8893, 292, 7636, 6410, 411, 29915, 13, 462, 1678, 285, 29915, 6056, 29918, 1853, 3790, 12324, 29918, 1853, 1118, 29915, 13, 462, 1678, 285, 29915, 20376, 3790, 9313, 428, 1118, 29915, 13, 462, 1678, 1723, 13, 13, 4706, 330, 29873, 29918, 12864, 29918, 2084, 353, 288, 1028, 29889, 18837, 16908, 29898, 4141, 29918, 12864, 29918, 2084, 29897, 13, 4706, 707, 29918, 12864, 29918, 2084, 353, 288, 1028, 29889, 18837, 16908, 29898, 342, 29918, 12864, 29918, 2084, 29897, 13, 4706, 4974, 288, 1028, 29889, 9933, 29898, 4141, 29918, 12864, 29918, 2084, 29897, 470, 330, 29873, 29918, 287, 2710, 338, 451, 6213, 29892, 313, 13, 9651, 525, 4141, 29918, 287, 2710, 1818, 451, 367, 6213, 470, 330, 29873, 29918, 12864, 29918, 2084, 1818, 1863, 29915, 13, 4706, 1723, 13, 4706, 4974, 288, 1028, 29889, 9933, 29898, 342, 29918, 12864, 29918, 2084, 29897, 470, 707, 29918, 287, 2710, 338, 451, 6213, 29892, 313, 13, 9651, 525, 342, 29918, 287, 2710, 1818, 451, 367, 6213, 470, 707, 29918, 12864, 29918, 2084, 1818, 1863, 29915, 13, 4706, 1723, 13, 4706, 565, 288, 1028, 29889, 9933, 29898, 4141, 29918, 12864, 29918, 2084, 29897, 322, 330, 29873, 29918, 287, 2710, 338, 6213, 29901, 13, 9651, 330, 29873, 29918, 287, 2710, 353, 7442, 29889, 1359, 29898, 4141, 29918, 12864, 29918, 2084, 29897, 13, 4706, 565, 288, 1028, 29889, 9933, 29898, 342, 29918, 12864, 29918, 2084, 29897, 322, 707, 29918, 287, 2710, 338, 6213, 29901, 13, 9651, 707, 29918, 287, 2710, 353, 7442, 29889, 1359, 29898, 342, 29918, 12864, 29918, 2084, 29897, 13, 13, 4706, 1583, 29889, 9573, 29918, 9040, 29898, 13, 9651, 525, 4141, 29918, 11958, 1953, 742, 4842, 305, 29889, 20158, 29898, 4141, 29918, 287, 2710, 29892, 26688, 29922, 7345, 305, 29889, 5426, 876, 13, 4706, 1583, 29889, 9573, 29918, 9040, 29898, 13, 9651, 525, 342, 29918, 11958, 1953, 742, 4842, 305, 29889, 20158, 29898, 342, 29918, 287, 2710, 29892, 26688, 29922, 7345, 305, 29889, 5426, 876, 13, 13, 1678, 822, 4805, 29918, 276, 558, 29898, 1311, 1125, 13, 4706, 10191, 353, 518, 13, 9651, 285, 29915, 29940, 555, 1134, 29901, 426, 1311, 29889, 12324, 29918, 1853, 29913, 742, 13, 4706, 4514, 13, 4706, 565, 1583, 29889, 5349, 29918, 11958, 1953, 29901, 13, 9651, 10191, 29889, 4397, 29898, 13, 18884, 285, 29915, 23799, 1281, 484, 1953, 8267, 29901, 426, 1311, 29889, 4141, 29918, 11958, 1953, 29889, 12181, 10162, 13, 9651, 1723, 13, 9651, 10191, 29889, 4397, 29898, 13, 18884, 285, 29915, 12787, 1281, 484, 1953, 8267, 29901, 426, 1311, 29889, 342, 29918, 11958, 1953, 29889, 12181, 10162, 13, 9651, 1723, 13, 4706, 736, 11297, 29876, 4286, 7122, 29898, 7645, 29897, 13, 13, 1678, 822, 10272, 29918, 287, 2710, 29898, 1311, 29892, 3291, 29892, 12368, 1125, 13, 4706, 7636, 29918, 9748, 353, 4842, 305, 29889, 2248, 29918, 2622, 29898, 13, 9651, 3291, 29892, 29871, 29896, 29892, 12368, 29889, 1493, 6278, 29896, 8106, 690, 14443, 29898, 9748, 29889, 12181, 29961, 29900, 1402, 448, 29896, 29892, 29871, 29906, 29892, 29871, 29941, 29897, 13, 4706, 736, 7636, 29918, 9748, 7503, 29892, 584, 29892, 29871, 29896, 29962, 448, 7636, 29918, 9748, 7503, 29892, 584, 29892, 29871, 29900, 29962, 13, 13, 1678, 822, 6375, 29898, 1311, 29892, 330, 29873, 29918, 1765, 1575, 29892, 707, 29918, 1765, 1575, 29892, 18177, 29922, 8516, 1125, 13, 4706, 330, 29873, 29918, 287, 2710, 353, 1583, 29889, 26017, 29918, 287, 2710, 29898, 13, 9651, 330, 29873, 29918, 1765, 1575, 29892, 12368, 29922, 1311, 29889, 4141, 29918, 11958, 1953, 29897, 13, 4706, 707, 29918, 287, 2710, 353, 1583, 29889, 26017, 29918, 287, 2710, 29898, 13, 9651, 707, 29918, 1765, 1575, 29892, 12368, 29922, 1311, 29889, 342, 29918, 11958, 1953, 29897, 13, 13, 4706, 10650, 29918, 12864, 29918, 12765, 353, 313, 4141, 29918, 287, 2710, 448, 707, 29918, 287, 2710, 29897, 13, 13, 4706, 9853, 29918, 2311, 353, 330, 29873, 29918, 1765, 1575, 29889, 12181, 29961, 29900, 29962, 13, 4706, 565, 1583, 29889, 12324, 29918, 1853, 1275, 525, 29880, 29906, 2396, 13, 9651, 7636, 29918, 12765, 353, 10650, 29918, 12864, 29918, 12765, 29889, 12248, 29898, 29906, 29897, 13, 4706, 25342, 1583, 29889, 12324, 29918, 1853, 1275, 525, 29880, 29896, 2396, 13, 9651, 7636, 29918, 12765, 353, 10650, 29918, 12864, 29918, 12765, 29889, 6897, 580, 13, 4706, 1683, 29901, 13, 9651, 12020, 2216, 1888, 2037, 287, 2392, 29898, 13, 18884, 285, 29915, 29931, 2209, 1134, 451, 8762, 29901, 426, 1311, 29889, 6758, 29918, 1853, 29913, 1495, 13, 4706, 565, 1583, 29889, 9313, 428, 1275, 525, 2083, 2396, 13, 9651, 736, 7636, 29918, 12765, 29889, 2083, 580, 13, 4706, 25342, 1583, 29889, 9313, 428, 1275, 525, 12676, 2396, 13, 9651, 736, 7636, 29918, 12765, 29889, 2083, 580, 847, 9853, 29918, 2311, 13, 2 ]
FT_to_prediction/finetune_launch.py
bm2-lab/X-MOL
19
164314
import sys import subprocess import commands import os import six import copy import argparse import time from utils.stream import stream_by_running as get_stream_m from utils.args import ArgumentGroup, print_arguments, inv_arguments from finetune_args import parser as finetuning_parser from extend_pos import extend_word_emb, extend_sent_emb import subprocess # yapf: disable parser = argparse.ArgumentParser(__doc__) multip_g = ArgumentGroup(parser, "multiprocessing", "start paddle training using multi-processing mode.") multip_g.add_arg("node_ips", str, None, "paddle trainer ips") multip_g.add_arg("node_id", int, None, "the trainer id of the node for multi-node distributed training.") multip_g.add_arg("print_config", bool, True, "print the config of multi-processing mode.") multip_g.add_arg("current_node_ip", str, None, "the ip of current node.") multip_g.add_arg("split_log_path", str, "log", "log path for each trainer.") multip_g.add_arg("log_prefix", str, "", "the prefix name of job log.") multip_g.add_arg("nproc_per_node", int, 4, "the number of process to use on each node.") multip_g.add_arg("selected_gpus", str, "0,1,2,3", "the gpus selected to use.") multip_g.add_arg("training_script", str, None, "the program/script to be lauched " "in parallel followed by all the arguments", positional_arg=True) multip_g.add_arg("training_script_args", str, None, "training script args", positional_arg=True, nargs=argparse.REMAINDER) # yapf: enable def start_procs(args): procs = [] log_fns = [] default_env = os.environ.copy() node_id = args.node_id node_ips = [x.strip() for x in args.node_ips.split(',')] current_ip = args.current_node_ip num_nodes = len(node_ips) selected_gpus = [x.strip() for x in args.selected_gpus.split(',')] selected_gpu_num = len(selected_gpus) all_trainer_endpoints = "" if selected_gpu_num < args.nproc_per_node: for ip in node_ips: for i in range(selected_gpu_num): if all_trainer_endpoints != "": all_trainer_endpoints += "," all_trainer_endpoints += "%s:617%d" % (ip, int(selected_gpus[i])) nranks = num_nodes * selected_gpu_num else: for ip in node_ips: for i in range(args.nproc_per_node): if all_trainer_endpoints != "": all_trainer_endpoints += "," all_trainer_endpoints += "%s:617%d" % (ip, i) nranks = num_nodes * args.nproc_per_node gpus_per_proc = args.nproc_per_node % selected_gpu_num if gpus_per_proc == 0: if selected_gpu_num < args.nproc_per_node: gpus_per_proc = 1 else: gpus_per_proc = selected_gpu_num / args.nproc_per_node else: gpus_per_proc = selected_gpu_num / args.nproc_per_node + 1 selected_gpus_per_proc = [selected_gpus[i:i + gpus_per_proc] for i in range(0, len(selected_gpus), gpus_per_proc)] if args.print_config: print("all_trainer_endpoints: ", all_trainer_endpoints, ", node_id: ", node_id, ", current_ip: ", current_ip, ", num_nodes: ", num_nodes, ", node_ips: ", node_ips, ", gpus_per_proc: ", gpus_per_proc, ", selected_gpus_per_proc: ", selected_gpus_per_proc, ", nranks: ", nranks) current_env = copy.copy(default_env) procs = [] cmds = [] log_fns = [] for i in range(0, args.nproc_per_node): trainer_id = node_id * args.nproc_per_node + i current_env.update({ "FLAGS_selected_gpus": "%s" % ",".join([str(s) for s in selected_gpus_per_proc[i]]), "PADDLE_TRAINER_ID" : "%d" % trainer_id, "PADDLE_CURRENT_ENDPOINT": "%s:617%d" % (current_ip, i), "PADDLE_TRAINERS_NUM": "%d" % nranks, "PADDLE_TRAINER_ENDPOINTS": all_trainer_endpoints, "PADDLE_NODES_NUM": "%d" % num_nodes }) cmd = [sys.executable, "-u", args.training_script] + args.training_script_args cmds.append(cmd) if args.split_log_path: fn = open("%s/%sjob.log.%d" % (args.split_log_path, args.log_prefix, trainer_id), "a") log_fns.append(fn) process = subprocess.Popen(cmd, env=current_env, stdout=fn, stderr=fn) else: process = subprocess.Popen(cmd, env=current_env) procs.append(process) for i in range(len(procs)): proc = procs[i] proc.wait() if len(log_fns) > 0: log_fns[i].close() if proc.returncode != 0: raise subprocess.CalledProcessError(returncode=procs[i].returncode, cmd=cmds[i]) else: print("proc %d finsh" % i) def stream(args, lanch_args): #stream model list #stream_m = get_stream_m(args.stream_job, args.stream_cluster) stream_m = get_stream_m(args.stream_job) while len(stream_m) == 0: time.sleep(600) stream_m = get_stream_m(args.stream_job) download, tar, init_path = stream_m[-1] retcode, ret = commands.getstatusoutput(download) if not os.path.exists(init_path): retcode, ret = commands.getstatusoutput(tar) if not args.use_fp16: retcode, ret = commands.getstatusoutput( 'rename .master "" ' + init_path + '/*.master' ) arg_name = '--init_pretraining_params' val_index = -1 if arg_name in lanch_args.training_script_args: val_index = lanch_args.training_script_args.index(arg_name) + 1 lanch_args.training_script_args[val_index] = init_path else: lanch_args.training_script_args += [arg_name, init_path] main(lanch_args) while True: #updated_m = get_stream_m(args.stream_job, args.stream_cluster) updated_m = get_stream_m(args.stream_job) download, tar, init_path = updated_m[-1] if len(updated_m) > len(stream_m): retcode, ret = commands.getstatusoutput(download) if not os.path.exists(init_path): retcode, ret = commands.getstatusoutput(tar) if not args.use_fp16: retcode, ret = commands.getstatusoutput( 'rename .master "" ' + init_path + '/*.master' ) lanch_args.training_script_args[val_index] = init_path main(lanch_args) #update stream_m = updated_m def main(args): extend_vocab = False extend_sent = False if args.print_config: print_arguments(args) """ zs = '*'*20 print(zs+'\n') print(args.training_script_args) print(type(args.training_script_args)) print(zs+'\n') """ def get_param(name): key = "--" + name if key not in args.training_script_args: return None index = args.training_script_args.index(key) + 1 return args.training_script_args[index] if extend_vocab: extend_word_emb(get_param("ernie_config_path"), get_param("init_pretraining_params")) if extend_sent: extend_sent_emb(get_param("ernie_config_path"), get_param("init_pretraining_params")) start_procs(args) if __name__ == "__main__": fine_tune_rep = 0 lanch_args = parser.parse_args() finetuning_args = finetuning_parser.parse_args( lanch_args.training_script_args) if finetuning_args.stream_job and finetuning_args.stream_job != "": stream(finetuning_args, lanch_args) else: init_path = finetuning_args.init_pretraining_params print("init model: %s" % init_path) finetuning_data = os.path.dirname(finetuning_args.train_set) task_name = finetuning_data.split('/')[-1] if not finetuning_args.use_fp16: retcode, ret = commands.getstatusoutput( 'rename .master "" ' + init_path + '/*.master' ) #while True: #""" while fine_tune_rep < 20: with open('finetune_reprec.txt','a') as f: f.write('finetune repeat {0} start @ {1}\n'.format(fine_tune_rep, time.strftime("%Y-%m-%d %X",time.localtime()))) subprocess.call("python3 pt_scaffold_split1.py {0}".format(task_name), shell=True) #file_dir = './package/task_data/clintox_0' #subprocess.call("cp {0}/train_{1}.tsv {2}/train.tsv".format(file_dir, fine_tune_rep, file_dir), shell=True) #subprocess.call("cp {0}/test_{1}.tsv {2}/test.tsv".format(file_dir, fine_tune_rep, file_dir), shell=True) #subprocess.call("cp {0}/dev_{1}.tsv {2}/dev.tsv".format(file_dir, fine_tune_rep, file_dir), shell=True) #subprocess.call("python3 package/task_data/reactAf/reactA_split.py", shell=True) main(lanch_args) with open('finetune_reprec.txt','a') as f: f.write('finetune repeat {0} finished @ {1}\n\n'.format(fine_tune_rep, time.strftime("%Y-%m-%d %X",time.localtime()))) fine_tune_rep += 1 #""" #main(lanch_args)
[ 1, 1053, 10876, 13, 5215, 1014, 5014, 13, 5215, 8260, 13, 5215, 2897, 13, 5215, 4832, 13, 5215, 3509, 13, 5215, 1852, 5510, 13, 5215, 931, 13, 13, 3166, 3667, 29879, 29889, 5461, 1053, 4840, 29918, 1609, 29918, 21094, 408, 679, 29918, 5461, 29918, 29885, 13, 3166, 3667, 29879, 29889, 5085, 1053, 23125, 4782, 29892, 1596, 29918, 25699, 29892, 2437, 29918, 25699, 13, 3166, 1436, 300, 1540, 29918, 5085, 1053, 13812, 408, 1436, 300, 27964, 29918, 16680, 13, 3166, 10985, 29918, 1066, 1053, 10985, 29918, 1742, 29918, 1590, 29892, 10985, 29918, 18616, 29918, 1590, 13, 5215, 1014, 5014, 13, 13, 29937, 343, 481, 29888, 29901, 11262, 13, 16680, 353, 1852, 5510, 29889, 15730, 11726, 22168, 1514, 1649, 29897, 13, 18056, 29918, 29887, 353, 23125, 4782, 29898, 16680, 29892, 376, 18056, 307, 985, 292, 613, 29871, 13, 4706, 376, 2962, 282, 22352, 6694, 773, 2473, 29899, 19170, 4464, 23157, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 3177, 29918, 4512, 613, 851, 29892, 6213, 29892, 29871, 13, 4706, 376, 29886, 22352, 1020, 4983, 474, 567, 1159, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 3177, 29918, 333, 613, 938, 29892, 6213, 29892, 29871, 13, 4706, 376, 1552, 1020, 4983, 1178, 310, 278, 2943, 363, 2473, 29899, 3177, 13235, 6694, 23157, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 2158, 29918, 2917, 613, 6120, 29892, 5852, 29892, 29871, 13, 4706, 376, 2158, 278, 2295, 310, 2473, 29899, 19170, 4464, 23157, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 3784, 29918, 3177, 29918, 666, 613, 851, 29892, 6213, 29892, 29871, 13, 4706, 376, 1552, 10377, 310, 1857, 2943, 23157, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 5451, 29918, 1188, 29918, 2084, 613, 851, 29892, 376, 1188, 613, 13, 4706, 376, 1188, 2224, 363, 1269, 1020, 4983, 23157, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 1188, 29918, 13506, 613, 851, 29892, 12633, 13, 4706, 376, 1552, 10944, 1024, 310, 4982, 1480, 23157, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 29876, 15439, 29918, 546, 29918, 3177, 613, 938, 29892, 29871, 29946, 29892, 29871, 13, 4706, 376, 1552, 1353, 310, 1889, 304, 671, 373, 1269, 2943, 23157, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 8391, 29918, 29887, 13364, 613, 851, 29892, 376, 29900, 29892, 29896, 29892, 29906, 29892, 29941, 613, 29871, 13, 4706, 376, 1552, 330, 13364, 4629, 304, 671, 23157, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 26495, 29918, 2154, 613, 851, 29892, 6213, 29892, 376, 1552, 1824, 29914, 2154, 304, 367, 425, 987, 287, 376, 13, 4706, 376, 262, 8943, 5643, 491, 599, 278, 6273, 613, 2602, 284, 29918, 1191, 29922, 5574, 29897, 13, 18056, 29918, 29887, 29889, 1202, 29918, 1191, 703, 26495, 29918, 2154, 29918, 5085, 613, 851, 29892, 6213, 29892, 13, 4706, 376, 26495, 2471, 6389, 613, 2602, 284, 29918, 1191, 29922, 5574, 29892, 302, 5085, 29922, 1191, 5510, 29889, 1525, 29032, 8032, 29897, 13, 29937, 343, 481, 29888, 29901, 9025, 13, 13, 13, 1753, 1369, 29918, 771, 2395, 29898, 5085, 1125, 13, 1678, 410, 2395, 353, 5159, 13, 1678, 1480, 29918, 29888, 1983, 353, 5159, 13, 13, 1678, 2322, 29918, 6272, 353, 2897, 29889, 21813, 29889, 8552, 580, 13, 13, 1678, 2943, 29918, 333, 353, 6389, 29889, 3177, 29918, 333, 13, 1678, 2943, 29918, 4512, 353, 518, 29916, 29889, 17010, 580, 363, 921, 297, 6389, 29889, 3177, 29918, 4512, 29889, 5451, 29317, 1495, 29962, 13, 1678, 1857, 29918, 666, 353, 6389, 29889, 3784, 29918, 3177, 29918, 666, 13, 1678, 954, 29918, 18010, 353, 7431, 29898, 3177, 29918, 4512, 29897, 13, 1678, 4629, 29918, 29887, 13364, 353, 518, 29916, 29889, 17010, 580, 363, 921, 297, 6389, 29889, 8391, 29918, 29887, 13364, 29889, 5451, 29317, 1495, 29962, 13, 1678, 4629, 29918, 29887, 3746, 29918, 1949, 353, 7431, 29898, 8391, 29918, 29887, 13364, 29897, 13, 13, 1678, 599, 29918, 3018, 4983, 29918, 355, 9748, 353, 5124, 13, 1678, 565, 4629, 29918, 29887, 3746, 29918, 1949, 529, 6389, 29889, 29876, 15439, 29918, 546, 29918, 3177, 29901, 13, 4706, 363, 10377, 297, 2943, 29918, 4512, 29901, 13, 9651, 363, 474, 297, 3464, 29898, 8391, 29918, 29887, 3746, 29918, 1949, 1125, 13, 18884, 565, 599, 29918, 3018, 4983, 29918, 355, 9748, 2804, 376, 1115, 13, 462, 1678, 599, 29918, 3018, 4983, 29918, 355, 9748, 4619, 28796, 13, 18884, 599, 29918, 3018, 4983, 29918, 355, 9748, 4619, 11860, 29879, 29901, 29953, 29896, 29955, 29995, 29881, 29908, 1273, 313, 666, 29892, 938, 29898, 8391, 29918, 29887, 13364, 29961, 29875, 12622, 13, 13, 4706, 302, 661, 2039, 353, 954, 29918, 18010, 334, 4629, 29918, 29887, 3746, 29918, 1949, 13, 1678, 1683, 29901, 13, 4706, 363, 10377, 297, 2943, 29918, 4512, 29901, 13, 9651, 363, 474, 297, 3464, 29898, 5085, 29889, 29876, 15439, 29918, 546, 29918, 3177, 1125, 13, 18884, 565, 599, 29918, 3018, 4983, 29918, 355, 9748, 2804, 376, 1115, 13, 462, 1678, 599, 29918, 3018, 4983, 29918, 355, 9748, 4619, 28796, 13, 18884, 599, 29918, 3018, 4983, 29918, 355, 9748, 4619, 11860, 29879, 29901, 29953, 29896, 29955, 29995, 29881, 29908, 1273, 313, 666, 29892, 474, 29897, 13, 13, 4706, 302, 661, 2039, 353, 954, 29918, 18010, 334, 6389, 29889, 29876, 15439, 29918, 546, 29918, 3177, 13, 268, 13, 1678, 330, 13364, 29918, 546, 29918, 15439, 353, 6389, 29889, 29876, 15439, 29918, 546, 29918, 3177, 1273, 4629, 29918, 29887, 3746, 29918, 1949, 29871, 13, 1678, 565, 330, 13364, 29918, 546, 29918, 15439, 1275, 29871, 29900, 29901, 13, 4706, 565, 4629, 29918, 29887, 3746, 29918, 1949, 529, 6389, 29889, 29876, 15439, 29918, 546, 29918, 3177, 29901, 13, 9651, 330, 13364, 29918, 546, 29918, 15439, 353, 29871, 29896, 13, 4706, 1683, 29901, 13, 9651, 330, 13364, 29918, 546, 29918, 15439, 353, 29871, 4629, 29918, 29887, 3746, 29918, 1949, 847, 6389, 29889, 29876, 15439, 29918, 546, 29918, 3177, 13, 1678, 1683, 29901, 13, 4706, 330, 13364, 29918, 546, 29918, 15439, 353, 29871, 4629, 29918, 29887, 3746, 29918, 1949, 847, 6389, 29889, 29876, 15439, 29918, 546, 29918, 3177, 718, 29871, 29896, 13, 13, 1678, 4629, 29918, 29887, 13364, 29918, 546, 29918, 15439, 353, 518, 8391, 29918, 29887, 13364, 29961, 29875, 29901, 29875, 718, 330, 13364, 29918, 546, 29918, 15439, 29962, 363, 474, 297, 3464, 29898, 29900, 29892, 7431, 29898, 8391, 29918, 29887, 13364, 511, 330, 13364, 29918, 546, 29918, 15439, 4638, 13, 13, 1678, 565, 6389, 29889, 2158, 29918, 2917, 29901, 13, 4706, 1596, 703, 497, 29918, 3018, 4983, 29918, 355, 9748, 29901, 9162, 599, 29918, 3018, 4983, 29918, 355, 9748, 29892, 29871, 13, 795, 9162, 2943, 29918, 333, 29901, 9162, 2943, 29918, 333, 29892, 13, 795, 9162, 1857, 29918, 666, 29901, 9162, 1857, 29918, 666, 29892, 13, 795, 9162, 954, 29918, 18010, 29901, 9162, 954, 29918, 18010, 29892, 13, 795, 9162, 2943, 29918, 4512, 29901, 9162, 2943, 29918, 4512, 29892, 13, 795, 9162, 330, 13364, 29918, 546, 29918, 15439, 29901, 9162, 330, 13364, 29918, 546, 29918, 15439, 29892, 13, 795, 9162, 4629, 29918, 29887, 13364, 29918, 546, 29918, 15439, 29901, 9162, 4629, 29918, 29887, 13364, 29918, 546, 29918, 15439, 29892, 13, 795, 9162, 302, 661, 2039, 29901, 9162, 302, 661, 2039, 29897, 13, 13, 1678, 1857, 29918, 6272, 353, 3509, 29889, 8552, 29898, 4381, 29918, 6272, 29897, 13, 1678, 410, 2395, 353, 5159, 13, 1678, 9920, 29879, 353, 5159, 13, 1678, 1480, 29918, 29888, 1983, 353, 5159, 13, 1678, 363, 474, 297, 3464, 29898, 29900, 29892, 6389, 29889, 29876, 15439, 29918, 546, 29918, 3177, 1125, 13, 4706, 1020, 4983, 29918, 333, 353, 2943, 29918, 333, 334, 6389, 29889, 29876, 15439, 29918, 546, 29918, 3177, 718, 474, 13, 4706, 1857, 29918, 6272, 29889, 5504, 3319, 13, 9651, 376, 18823, 10749, 29918, 8391, 29918, 29887, 13364, 1115, 11860, 29879, 29908, 1273, 9162, 1642, 7122, 4197, 710, 29898, 29879, 29897, 363, 269, 297, 4629, 29918, 29887, 13364, 29918, 546, 29918, 15439, 29961, 29875, 5262, 511, 13, 9651, 376, 29925, 17744, 1307, 29918, 29911, 4717, 1177, 1001, 29918, 1367, 29908, 584, 11860, 29881, 29908, 1273, 1020, 4983, 29918, 333, 29892, 13, 9651, 376, 29925, 17744, 1307, 29918, 22484, 29450, 29918, 1430, 11191, 6992, 29911, 1115, 11860, 29879, 29901, 29953, 29896, 29955, 29995, 29881, 29908, 1273, 313, 3784, 29918, 666, 29892, 474, 511, 13, 9651, 376, 29925, 17744, 1307, 29918, 29911, 4717, 1177, 23598, 29918, 13967, 1115, 11860, 29881, 29908, 1273, 302, 661, 2039, 29892, 13, 9651, 376, 29925, 17744, 1307, 29918, 29911, 4717, 1177, 1001, 29918, 1430, 11191, 6992, 9375, 1115, 599, 29918, 3018, 4983, 29918, 355, 9748, 29892, 13, 9651, 376, 29925, 17744, 1307, 29918, 6632, 2287, 29903, 29918, 13967, 1115, 11860, 29881, 29908, 1273, 954, 29918, 18010, 13, 4706, 5615, 13, 13, 4706, 9920, 353, 518, 9675, 29889, 4258, 9246, 29892, 11663, 29884, 613, 13, 1669, 6389, 29889, 26495, 29918, 2154, 29962, 718, 6389, 29889, 26495, 29918, 2154, 29918, 5085, 13, 4706, 9920, 29879, 29889, 4397, 29898, 9006, 29897, 13, 13, 4706, 565, 6389, 29889, 5451, 29918, 1188, 29918, 2084, 29901, 13, 9651, 7876, 353, 1722, 11702, 29879, 22584, 29879, 9057, 29889, 1188, 29889, 29995, 29881, 29908, 1273, 313, 5085, 29889, 5451, 29918, 1188, 29918, 2084, 29892, 6389, 29889, 1188, 29918, 13506, 29892, 1020, 4983, 29918, 333, 511, 376, 29874, 1159, 13, 9651, 1480, 29918, 29888, 1983, 29889, 4397, 29898, 9144, 29897, 13, 9651, 1889, 353, 1014, 5014, 29889, 29925, 3150, 29898, 9006, 29892, 8829, 29922, 3784, 29918, 6272, 29892, 27591, 29922, 9144, 29892, 380, 20405, 29922, 9144, 29897, 13, 4706, 1683, 29901, 13, 9651, 1889, 353, 1014, 5014, 29889, 29925, 3150, 29898, 9006, 29892, 8829, 29922, 3784, 29918, 6272, 29897, 13, 4706, 410, 2395, 29889, 4397, 29898, 5014, 29897, 13, 13, 1678, 363, 474, 297, 3464, 29898, 2435, 29898, 771, 2395, 22164, 13, 4706, 9580, 353, 410, 2395, 29961, 29875, 29962, 13, 4706, 9580, 29889, 10685, 580, 13, 4706, 565, 7431, 29898, 1188, 29918, 29888, 1983, 29897, 1405, 29871, 29900, 29901, 13, 9651, 1480, 29918, 29888, 1983, 29961, 29875, 1822, 5358, 580, 13, 4706, 565, 9580, 29889, 2457, 401, 2804, 29871, 29900, 29901, 268, 13, 9651, 12020, 1014, 5014, 29889, 29907, 4212, 7032, 2392, 29898, 2457, 401, 29922, 771, 2395, 29961, 29875, 1822, 2457, 401, 29892, 13, 462, 462, 18884, 9920, 29922, 9006, 29879, 29961, 29875, 2314, 13, 4706, 1683, 29901, 13, 9651, 1596, 703, 15439, 1273, 29881, 1436, 845, 29908, 1273, 474, 29897, 13, 13, 13, 1753, 4840, 29898, 5085, 29892, 10906, 305, 29918, 5085, 1125, 13, 1678, 396, 5461, 1904, 1051, 13, 1678, 396, 5461, 29918, 29885, 353, 679, 29918, 5461, 29918, 29885, 29898, 5085, 29889, 5461, 29918, 9057, 29892, 6389, 29889, 5461, 29918, 19594, 29897, 13, 1678, 4840, 29918, 29885, 353, 679, 29918, 5461, 29918, 29885, 29898, 5085, 29889, 5461, 29918, 9057, 29897, 13, 1678, 1550, 7431, 29898, 5461, 29918, 29885, 29897, 1275, 29871, 29900, 29901, 13, 4706, 931, 29889, 17059, 29898, 29953, 29900, 29900, 29897, 13, 4706, 4840, 29918, 29885, 353, 679, 29918, 5461, 29918, 29885, 29898, 5085, 29889, 5461, 29918, 9057, 29897, 13, 268, 13, 1678, 5142, 29892, 9913, 29892, 2069, 29918, 2084, 353, 4840, 29918, 29885, 14352, 29896, 29962, 13, 1678, 3240, 401, 29892, 3240, 353, 8260, 29889, 657, 4882, 4905, 29898, 10382, 29897, 13, 1678, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 2344, 29918, 2084, 1125, 13, 4706, 3240, 401, 29892, 3240, 353, 8260, 29889, 657, 4882, 4905, 29898, 12637, 29897, 13, 1678, 565, 451, 6389, 29889, 1509, 29918, 18091, 29896, 29953, 29901, 13, 4706, 3240, 401, 29892, 3240, 353, 8260, 29889, 657, 4882, 4905, 29898, 13, 18884, 525, 1267, 420, 869, 6207, 5124, 525, 718, 2069, 29918, 2084, 718, 525, 5515, 29889, 6207, 29915, 13, 18884, 1723, 13, 13, 1678, 1852, 29918, 978, 353, 525, 489, 2344, 29918, 1457, 26495, 29918, 7529, 29915, 13, 1678, 659, 29918, 2248, 353, 448, 29896, 13, 1678, 565, 1852, 29918, 978, 297, 10906, 305, 29918, 5085, 29889, 26495, 29918, 2154, 29918, 5085, 29901, 13, 4706, 659, 29918, 2248, 353, 10906, 305, 29918, 5085, 29889, 26495, 29918, 2154, 29918, 5085, 29889, 2248, 29898, 1191, 29918, 978, 29897, 718, 29871, 29896, 13, 4706, 10906, 305, 29918, 5085, 29889, 26495, 29918, 2154, 29918, 5085, 29961, 791, 29918, 2248, 29962, 353, 2069, 29918, 2084, 13, 1678, 1683, 29901, 13, 4706, 10906, 305, 29918, 5085, 29889, 26495, 29918, 2154, 29918, 5085, 4619, 518, 1191, 29918, 978, 29892, 2069, 29918, 2084, 29962, 13, 268, 13, 1678, 1667, 29898, 6468, 305, 29918, 5085, 29897, 13, 13, 1678, 1550, 5852, 29901, 13, 4706, 396, 21402, 29918, 29885, 353, 679, 29918, 5461, 29918, 29885, 29898, 5085, 29889, 5461, 29918, 9057, 29892, 6389, 29889, 5461, 29918, 19594, 29897, 13, 4706, 4784, 29918, 29885, 353, 679, 29918, 5461, 29918, 29885, 29898, 5085, 29889, 5461, 29918, 9057, 29897, 13, 4706, 5142, 29892, 9913, 29892, 2069, 29918, 2084, 353, 4784, 29918, 29885, 14352, 29896, 29962, 13, 4706, 565, 7431, 29898, 21402, 29918, 29885, 29897, 1405, 7431, 29898, 5461, 29918, 29885, 1125, 13, 9651, 3240, 401, 29892, 3240, 353, 8260, 29889, 657, 4882, 4905, 29898, 10382, 29897, 13, 9651, 565, 451, 2897, 29889, 2084, 29889, 9933, 29898, 2344, 29918, 2084, 1125, 13, 18884, 3240, 401, 29892, 3240, 353, 8260, 29889, 657, 4882, 4905, 29898, 12637, 29897, 13, 9651, 565, 451, 6389, 29889, 1509, 29918, 18091, 29896, 29953, 29901, 13, 18884, 3240, 401, 29892, 3240, 353, 8260, 29889, 657, 4882, 4905, 29898, 13, 462, 4706, 525, 1267, 420, 869, 6207, 5124, 525, 718, 2069, 29918, 2084, 718, 525, 5515, 29889, 6207, 29915, 13, 462, 4706, 1723, 13, 308, 13, 4706, 10906, 305, 29918, 5085, 29889, 26495, 29918, 2154, 29918, 5085, 29961, 791, 29918, 2248, 29962, 353, 2069, 29918, 2084, 13, 4706, 1667, 29898, 6468, 305, 29918, 5085, 29897, 13, 4706, 396, 5504, 13, 4706, 4840, 29918, 29885, 353, 4784, 29918, 29885, 13, 13, 13, 1753, 1667, 29898, 5085, 1125, 13, 1678, 10985, 29918, 29894, 542, 370, 353, 7700, 13, 1678, 10985, 29918, 18616, 353, 7700, 13, 1678, 565, 6389, 29889, 2158, 29918, 2917, 29901, 13, 4706, 1596, 29918, 25699, 29898, 5085, 29897, 13, 1678, 9995, 13, 1678, 503, 29879, 353, 525, 29930, 29915, 29930, 29906, 29900, 13, 1678, 1596, 29898, 22381, 29974, 12764, 29876, 1495, 13, 1678, 1596, 29898, 5085, 29889, 26495, 29918, 2154, 29918, 5085, 29897, 13, 1678, 1596, 29898, 1853, 29898, 5085, 29889, 26495, 29918, 2154, 29918, 5085, 876, 13, 1678, 1596, 29898, 22381, 29974, 12764, 29876, 1495, 13, 1678, 9995, 13, 1678, 822, 679, 29918, 3207, 29898, 978, 1125, 13, 4706, 1820, 353, 376, 13869, 718, 1024, 13, 4706, 565, 1820, 451, 297, 6389, 29889, 26495, 29918, 2154, 29918, 5085, 29901, 13, 9651, 736, 6213, 13, 4706, 2380, 353, 6389, 29889, 26495, 29918, 2154, 29918, 5085, 29889, 2248, 29898, 1989, 29897, 718, 29871, 29896, 13, 4706, 736, 6389, 29889, 26495, 29918, 2154, 29918, 5085, 29961, 2248, 29962, 13, 13, 1678, 565, 10985, 29918, 29894, 542, 370, 29901, 13, 4706, 10985, 29918, 1742, 29918, 1590, 29898, 657, 29918, 3207, 703, 824, 347, 29918, 2917, 29918, 2084, 4968, 679, 29918, 3207, 703, 2344, 29918, 1457, 26495, 29918, 7529, 5783, 13, 1678, 565, 10985, 29918, 18616, 29901, 13, 4706, 10985, 29918, 18616, 29918, 1590, 29898, 657, 29918, 3207, 703, 824, 347, 29918, 2917, 29918, 2084, 4968, 679, 29918, 3207, 703, 2344, 29918, 1457, 26495, 29918, 7529, 5783, 13, 1678, 1369, 29918, 771, 2395, 29898, 5085, 29897, 13, 13, 13, 361, 4770, 978, 1649, 1275, 376, 1649, 3396, 1649, 1115, 13, 1678, 2691, 29918, 29873, 1540, 29918, 3445, 353, 29871, 29900, 13, 1678, 10906, 305, 29918, 5085, 353, 13812, 29889, 5510, 29918, 5085, 580, 13, 1678, 1436, 300, 27964, 29918, 5085, 353, 1436, 300, 27964, 29918, 16680, 29889, 5510, 29918, 5085, 29898, 13, 9651, 10906, 305, 29918, 5085, 29889, 26495, 29918, 2154, 29918, 5085, 29897, 13, 268, 13, 1678, 565, 1436, 300, 27964, 29918, 5085, 29889, 5461, 29918, 9057, 322, 1436, 300, 27964, 29918, 5085, 29889, 5461, 29918, 9057, 2804, 376, 1115, 13, 4706, 4840, 29898, 4951, 300, 27964, 29918, 5085, 29892, 10906, 305, 29918, 5085, 29897, 13, 1678, 1683, 29901, 13, 4706, 2069, 29918, 2084, 353, 1436, 300, 27964, 29918, 5085, 29889, 2344, 29918, 1457, 26495, 29918, 7529, 29871, 13, 4706, 1596, 703, 2344, 1904, 29901, 1273, 29879, 29908, 1273, 2069, 29918, 2084, 29897, 13, 4706, 1436, 300, 27964, 29918, 1272, 353, 2897, 29889, 2084, 29889, 25721, 29898, 4951, 300, 27964, 29918, 5085, 29889, 14968, 29918, 842, 29897, 13, 4706, 3414, 29918, 978, 353, 1436, 300, 27964, 29918, 1272, 29889, 5451, 11219, 1495, 14352, 29896, 29962, 13, 4706, 565, 451, 1436, 300, 27964, 29918, 5085, 29889, 1509, 29918, 18091, 29896, 29953, 29901, 13, 9651, 3240, 401, 29892, 3240, 353, 8260, 29889, 657, 4882, 4905, 29898, 13, 462, 1678, 525, 1267, 420, 869, 6207, 5124, 525, 718, 2069, 29918, 2084, 718, 525, 5515, 29889, 6207, 29915, 13, 462, 1678, 1723, 13, 4706, 396, 8000, 5852, 29901, 13, 4706, 396, 15945, 29908, 13, 4706, 1550, 2691, 29918, 29873, 1540, 29918, 3445, 529, 29871, 29906, 29900, 29901, 13, 9651, 411, 1722, 877, 4951, 300, 1540, 29918, 276, 17990, 29889, 3945, 3788, 29874, 1495, 408, 285, 29901, 13, 18884, 285, 29889, 3539, 877, 4951, 300, 1540, 12312, 426, 29900, 29913, 1369, 732, 426, 29896, 1012, 29876, 4286, 4830, 29898, 29888, 457, 29918, 29873, 1540, 29918, 3445, 29892, 931, 29889, 710, 615, 603, 11702, 29979, 19222, 29885, 19222, 29881, 1273, 29990, 613, 2230, 29889, 2997, 2230, 580, 4961, 13, 9651, 1014, 5014, 29889, 4804, 703, 4691, 29941, 19592, 29918, 29879, 1113, 600, 1025, 29918, 5451, 29896, 29889, 2272, 426, 29900, 29913, 1642, 4830, 29898, 7662, 29918, 978, 511, 6473, 29922, 5574, 29897, 13, 9651, 396, 1445, 29918, 3972, 353, 19283, 5113, 29914, 7662, 29918, 1272, 29914, 695, 8941, 29916, 29918, 29900, 29915, 13, 9651, 396, 1491, 5014, 29889, 4804, 703, 6814, 426, 29900, 6822, 14968, 648, 29896, 1836, 1372, 29894, 426, 29906, 6822, 14968, 29889, 1372, 29894, 1642, 4830, 29898, 1445, 29918, 3972, 29892, 2691, 29918, 29873, 1540, 29918, 3445, 29892, 934, 29918, 3972, 511, 6473, 29922, 5574, 29897, 13, 9651, 396, 1491, 5014, 29889, 4804, 703, 6814, 426, 29900, 6822, 1688, 648, 29896, 1836, 1372, 29894, 426, 29906, 6822, 1688, 29889, 1372, 29894, 1642, 4830, 29898, 1445, 29918, 3972, 29892, 2691, 29918, 29873, 1540, 29918, 3445, 29892, 934, 29918, 3972, 511, 6473, 29922, 5574, 29897, 13, 9651, 396, 1491, 5014, 29889, 4804, 703, 6814, 426, 29900, 6822, 3359, 648, 29896, 1836, 1372, 29894, 426, 29906, 6822, 3359, 29889, 1372, 29894, 1642, 4830, 29898, 1445, 29918, 3972, 29892, 2691, 29918, 29873, 1540, 29918, 3445, 29892, 934, 29918, 3972, 511, 6473, 29922, 5574, 29897, 13, 9651, 396, 1491, 5014, 29889, 4804, 703, 4691, 29941, 3577, 29914, 7662, 29918, 1272, 29914, 8423, 29909, 29888, 29914, 8423, 29909, 29918, 5451, 29889, 2272, 613, 6473, 29922, 5574, 29897, 13, 9651, 1667, 29898, 6468, 305, 29918, 5085, 29897, 13, 9651, 411, 1722, 877, 4951, 300, 1540, 29918, 276, 17990, 29889, 3945, 3788, 29874, 1495, 408, 285, 29901, 13, 18884, 285, 29889, 3539, 877, 4951, 300, 1540, 12312, 426, 29900, 29913, 7743, 732, 426, 29896, 1012, 29876, 29905, 29876, 4286, 4830, 29898, 29888, 457, 29918, 29873, 1540, 29918, 3445, 29892, 931, 29889, 710, 615, 603, 11702, 29979, 19222, 29885, 19222, 29881, 1273, 29990, 613, 2230, 29889, 2997, 2230, 580, 4961, 13, 9651, 2691, 29918, 29873, 1540, 29918, 3445, 4619, 29871, 29896, 13, 4706, 396, 15945, 29908, 13, 4706, 396, 3396, 29898, 6468, 305, 29918, 5085, 29897, 13, 2 ]
pyregion/conftest.py
stefanor/pyregion
21
104193
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.version import version as astropy_version if astropy_version < '3.0': # With older versions of Astropy, we actually need to import the pytest # plugins themselves in order to make them discoverable by pytest. from astropy.tests.pytest_plugins import * else: # As of Astropy 3.0, the pytest plugins provided by Astropy are # automatically made available when Astropy is installed. This means it's # not necessary to import them here, but we still need to import global # variables that are used for configuration. from astropy.tests.plugins.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS from astropy.tests.helper import enable_deprecations_as_exceptions # Uncomment the following line to treat all DeprecationWarnings as exceptions enable_deprecations_as_exceptions() PYTEST_HEADER_MODULES.clear() PYTEST_HEADER_MODULES.update([ ('numpy', 'numpy'), ('cython', 'cython'), ('Astropy', 'astropy'), ('pyparsing', 'pyparsing'), ('matplotlib', 'matplotlib'), ]) # This is to figure out the affiliated package version, rather than # using Astropy's try: from .version import version except ImportError: version = 'dev' import os packagename = os.path.basename(os.path.dirname(__file__)) TESTED_VERSIONS[packagename] = version
[ 1, 396, 445, 3743, 24802, 18224, 393, 10822, 11451, 29889, 1688, 363, 8717, 14441, 6987, 29889, 13, 29937, 491, 28348, 963, 1244, 297, 378, 615, 342, 29889, 2272, 896, 526, 6523, 519, 491, 11451, 29889, 1688, 13, 29937, 694, 4383, 920, 372, 338, 22336, 2629, 278, 2752, 5447, 29889, 13, 13, 3166, 8717, 14441, 29889, 3259, 1053, 1873, 408, 8717, 14441, 29918, 3259, 13, 361, 8717, 14441, 29918, 3259, 529, 525, 29941, 29889, 29900, 2396, 13, 1678, 396, 2973, 9642, 6910, 310, 10186, 14441, 29892, 591, 2869, 817, 304, 1053, 278, 11451, 1688, 13, 1678, 396, 18224, 6053, 297, 1797, 304, 1207, 963, 6523, 519, 491, 11451, 1688, 29889, 13, 1678, 515, 8717, 14441, 29889, 21150, 29889, 2272, 1688, 29918, 12800, 1053, 334, 13, 2870, 29901, 13, 1678, 396, 1094, 310, 10186, 14441, 29871, 29941, 29889, 29900, 29892, 278, 11451, 1688, 18224, 4944, 491, 10186, 14441, 526, 13, 1678, 396, 6336, 1754, 3625, 746, 10186, 14441, 338, 5130, 29889, 910, 2794, 372, 29915, 29879, 13, 1678, 396, 451, 5181, 304, 1053, 963, 1244, 29892, 541, 591, 1603, 817, 304, 1053, 5534, 13, 1678, 396, 3651, 393, 526, 1304, 363, 5285, 29889, 13, 1678, 515, 8717, 14441, 29889, 21150, 29889, 12800, 29889, 4990, 1053, 349, 29979, 18267, 29918, 23252, 1001, 29918, 6720, 14849, 17101, 29892, 17067, 1254, 3352, 29918, 16358, 29903, 13, 13, 3166, 8717, 14441, 29889, 21150, 29889, 20907, 1053, 9025, 29918, 311, 17990, 800, 29918, 294, 29918, 11739, 29879, 13, 13, 29937, 853, 9342, 278, 1494, 1196, 304, 7539, 599, 897, 1457, 9252, 29956, 2753, 886, 408, 15283, 13, 12007, 29918, 311, 17990, 800, 29918, 294, 29918, 11739, 29879, 580, 13, 13, 20055, 18267, 29918, 23252, 1001, 29918, 6720, 14849, 17101, 29889, 8551, 580, 13, 20055, 18267, 29918, 23252, 1001, 29918, 6720, 14849, 17101, 29889, 5504, 4197, 13, 1678, 6702, 23749, 742, 525, 23749, 5477, 13, 1678, 6702, 1270, 386, 265, 742, 525, 1270, 386, 265, 5477, 13, 1678, 6702, 29909, 303, 14441, 742, 525, 579, 14441, 5477, 13, 1678, 6702, 2272, 862, 2976, 742, 525, 2272, 862, 2976, 5477, 13, 1678, 6702, 2922, 17357, 742, 525, 2922, 17357, 5477, 13, 2314, 13, 13, 29937, 910, 338, 304, 4377, 714, 278, 23736, 630, 3577, 1873, 29892, 3265, 1135, 13, 29937, 773, 10186, 14441, 29915, 29879, 13, 2202, 29901, 13, 1678, 515, 869, 3259, 1053, 1873, 13, 19499, 16032, 2392, 29901, 13, 1678, 1873, 353, 525, 3359, 29915, 13, 13, 5215, 2897, 13, 4058, 351, 3871, 353, 2897, 29889, 2084, 29889, 6500, 3871, 29898, 359, 29889, 2084, 29889, 25721, 22168, 1445, 1649, 876, 13, 18267, 3352, 29918, 16358, 29903, 29961, 4058, 351, 3871, 29962, 353, 1873, 13, 2 ]
esppy/helper/helpers.py
Mentos05/SAS_AskTheExpert
0
87285
<gh_stars>0 #Helpfer Function: def create_scoring_schema(number_objects): _field = "id*:int64,image:blob,_image_:blob,_nObjects_:double," for obj in range(0,number_objects): _field += "_Object" + str(obj) + "_:string," _field += "_P_Object" + str(obj) + "_:double," _field += "_Object" + str(obj) + "_x:double," _field += "_Object" + str(obj) + "_y:double," _field += "_Object" + str(obj) + "_width:double," _field += "_Object" + str(obj) + "_height:double," return _field[:-1] def create_scoring_schema(number_objects): _field = "id*:int64,image:blob,_image_:blob,_nObjects_:double," for obj in range(0,number_objects): _field += "_Object" + str(obj) + "_:string," _field += "_P_Object" + str(obj) + "_:double," _field += "_Object" + str(obj) + "_x:double," _field += "_Object" + str(obj) + "_y:double," _field += "_Object" + str(obj) + "_width:double," _field += "_Object" + str(obj) + "_height:double," return _field[:-1]
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 29648, 571, 6680, 29901, 13, 1753, 1653, 29918, 1557, 8253, 29918, 11010, 29898, 4537, 29918, 12650, 1125, 13, 1678, 903, 2671, 353, 376, 333, 29930, 29901, 524, 29953, 29946, 29892, 3027, 29901, 10054, 29892, 29918, 3027, 29918, 29901, 10054, 29892, 29918, 29876, 12724, 29918, 29901, 8896, 1699, 13, 1678, 363, 5446, 297, 3464, 29898, 29900, 29892, 4537, 29918, 12650, 1125, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 29901, 1807, 1699, 13, 4706, 903, 2671, 4619, 11119, 29925, 29918, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 29901, 8896, 1699, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 29916, 29901, 8896, 1699, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 29891, 29901, 8896, 1699, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 2103, 29901, 8896, 1699, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 3545, 29901, 8896, 1699, 13, 1678, 736, 903, 2671, 7503, 29899, 29896, 29962, 13, 13, 1753, 1653, 29918, 1557, 8253, 29918, 11010, 29898, 4537, 29918, 12650, 1125, 13, 1678, 903, 2671, 353, 376, 333, 29930, 29901, 524, 29953, 29946, 29892, 3027, 29901, 10054, 29892, 29918, 3027, 29918, 29901, 10054, 29892, 29918, 29876, 12724, 29918, 29901, 8896, 1699, 13, 1678, 363, 5446, 297, 3464, 29898, 29900, 29892, 4537, 29918, 12650, 1125, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 29901, 1807, 1699, 13, 4706, 903, 2671, 4619, 11119, 29925, 29918, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 29901, 8896, 1699, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 29916, 29901, 8896, 1699, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 29891, 29901, 8896, 1699, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 2103, 29901, 8896, 1699, 13, 4706, 903, 2671, 4619, 11119, 2061, 29908, 718, 851, 29898, 5415, 29897, 718, 11119, 3545, 29901, 8896, 1699, 13, 1678, 736, 903, 2671, 7503, 29899, 29896, 29962, 13, 2 ]
python/rikai/pytorch/models/__init__.py
askintution/rikai
1
106302
<filename>python/rikai/pytorch/models/__init__.py # Copyright 2022 Rikai Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Rikai-implemented PyTorch models and executors.""" from abc import ABC from typing import Optional import torch from rikai.spark.sql.model import ModelSpec, ModelType __all__ = ["TorchModelType"] class TorchModelType(ModelType, ABC): """Base ModelType for PyTorch models.""" def __init__(self): self.model: Optional[torch.nn.Module] = None self.spec: Optional[ModelSpec] = None def load_model(self, spec: ModelSpec, **kwargs): self.model = spec.load_model() self.model.eval() if "device" in kwargs: self.model.to(kwargs.get("device")) self.spec = spec # Release GPU memory # https://blog.paperspace.com/pytorch-memory-multi-gpu-debugging/?ref=tfrecipes def release(self): model = self.model.cpu() del model torch.cuda.empty_cache()
[ 1, 529, 9507, 29958, 4691, 29914, 374, 1335, 29875, 29914, 2272, 7345, 305, 29914, 9794, 29914, 1649, 2344, 26914, 2272, 13, 29937, 29871, 14187, 1266, 29871, 29906, 29900, 29906, 29906, 390, 17409, 13189, 943, 13, 29937, 13, 29937, 29871, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 29937, 29871, 366, 1122, 451, 671, 445, 934, 5174, 297, 752, 13036, 411, 278, 19245, 29889, 13, 29937, 29871, 887, 1122, 4017, 263, 3509, 310, 278, 19245, 472, 13, 29937, 13, 29937, 1678, 1732, 597, 1636, 29889, 4288, 29889, 990, 29914, 506, 11259, 29914, 27888, 1430, 1660, 29899, 29906, 29889, 29900, 13, 29937, 13, 29937, 29871, 25870, 3734, 491, 22903, 4307, 470, 15502, 304, 297, 5007, 29892, 7047, 13, 29937, 29871, 13235, 1090, 278, 19245, 338, 13235, 373, 385, 376, 3289, 8519, 29908, 350, 3289, 3235, 29892, 13, 29937, 29871, 399, 1806, 8187, 2692, 399, 1718, 29934, 13566, 29059, 6323, 8707, 29928, 22122, 29903, 8079, 13764, 29979, 476, 22255, 29892, 2845, 4653, 470, 2411, 2957, 29889, 13, 29937, 29871, 2823, 278, 19245, 363, 278, 2702, 4086, 14765, 1076, 11239, 322, 13, 29937, 29871, 27028, 1090, 278, 19245, 29889, 13, 13, 15945, 29908, 29934, 17409, 29899, 326, 2037, 287, 10772, 29911, 25350, 4733, 322, 6704, 943, 1213, 15945, 13, 3166, 25638, 1053, 16417, 13, 3166, 19229, 1053, 28379, 13, 13, 5215, 4842, 305, 13, 13, 3166, 364, 17409, 29889, 12597, 29889, 2850, 29889, 4299, 1053, 8125, 10299, 29892, 8125, 1542, 13, 13, 1649, 497, 1649, 353, 6796, 29911, 25350, 3195, 1542, 3108, 13, 13, 13, 1990, 4794, 305, 3195, 1542, 29898, 3195, 1542, 29892, 16417, 1125, 13, 1678, 9995, 5160, 8125, 1542, 363, 10772, 29911, 25350, 4733, 1213, 15945, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 4299, 29901, 28379, 29961, 7345, 305, 29889, 15755, 29889, 7355, 29962, 353, 6213, 13, 4706, 1583, 29889, 6550, 29901, 28379, 29961, 3195, 10299, 29962, 353, 6213, 13, 13, 1678, 822, 2254, 29918, 4299, 29898, 1311, 29892, 1580, 29901, 8125, 10299, 29892, 3579, 19290, 1125, 13, 4706, 1583, 29889, 4299, 353, 1580, 29889, 1359, 29918, 4299, 580, 13, 4706, 1583, 29889, 4299, 29889, 14513, 580, 13, 4706, 565, 376, 10141, 29908, 297, 9049, 5085, 29901, 13, 9651, 1583, 29889, 4299, 29889, 517, 29898, 19290, 29889, 657, 703, 10141, 5783, 13, 4706, 1583, 29889, 6550, 353, 1580, 13, 13, 1678, 396, 23708, 22796, 3370, 13, 1678, 396, 2045, 597, 7312, 29889, 29886, 21321, 3535, 29889, 510, 29914, 2272, 7345, 305, 29899, 14834, 29899, 9910, 29899, 29887, 3746, 29899, 8382, 3460, 13401, 999, 29922, 13264, 4361, 5547, 13, 1678, 822, 6507, 29898, 1311, 1125, 13, 4706, 1904, 353, 1583, 29889, 4299, 29889, 21970, 580, 13, 4706, 628, 1904, 13, 4706, 4842, 305, 29889, 29883, 6191, 29889, 6310, 29918, 8173, 580, 13, 2 ]
summer-of-code/week-01/Nessa/soc-wk1-cert-nessa-carson.py
supersciencegrl/toolkitten
0
120180
# ### CALC ### print("") print("### CALC ###") print("") print("Hours in a year:") print(24*365) print("Minutes in a decade:") print(60*24*365*10) print("My age in seconds:") print((365*27+6+2+31+30+31+30+16)*24*1440) # Correct to the nearest day at the time of writing! print("Andreea's age:") print(48618000/(365*24*1440)) print("?!") # ### FULL NAME ### print("") print("### WHAT'S YOUR NAME ###") print("") import random first_name = input("What is your first name? ") middle_name = input("What is your middle name? ") last_name = input("What is your surname? ") greeting = ["Hello, ", "Hi, ", "Bonjour, ", "salve, "] print(random.choice(greeting) + first_name + " " + middle_name + " " + last_name + "!") # ### BETTER FAVOURITE NUMBER ### print("") print("### BETTER FAVOURITE NUMBER ###") print("") fave = str(int(float(input("What is your favourite number? ")) + 1)) print("Oh come on, how about " + fave + "... that's bigger and better!") # ### TEN GREEN BOTTLES ### print("") print("### TEN GREEN BOTTLES ###") print("") x = 10 while x > 1: y = str(x) print((y + " green bottles, standing on a wall, ") * 2) print("And if one green bottle should accidentally fall") x = x - 1 y = str(x) if x > 1: print("There'll be " + y + " green bottles, standing on the wall.") print("") else: print("There'll be " + y + " green bottle, standing on the wall.") print("") while x == 1: y = str(x) print((y + " green bottle, standing on a wall, ") * 2) print("And if one green bottle should accidentally fall") print("There'll be no green bottles, standing on the wall.") x = x - 1 print("") print("Fin.") # ### DEAF GRANDMA ### import random year = random.randint(1938, 1950) text = "" utext = " " while utext != text: text = input("WHAT'S UP WITH YOU?! ") utext = text.upper() if utext != text: print("HUH?! SPEAK UP, GIRL! ") print("NO, NOT SINCE " + str(year) + "!") # ### LEAP YEARS ### print("") print("### LEAP YEARS ###") print("") i_year = int(input("First year: ")) f_year = int(input("Last year: ")) c_year = i_year while c_year != f_year + 1: if c_year % 4 == 0: if c_year % 100 != 0: print(c_year) elif c_year % 400 == 0: print(c_year) c_year = c_year + 1 if c_year == f_year + 1: break # ### ALPHABETIZE ### text = " " words = [] while text != "": text = input("Add your word here: ") if text != "": words.append(text) print(sorted(words)) # ### MOO ### print("") print("### MOO ###") print("") n = int(input("How many cows do you have? ")) def moo(n): print("moo " * n) moo(n) # ### EARLY ROMAN NUMERALS ### print("") print("### EARLY ROMAN NUMERALS ###") print("") n = int(input("Input a number. ")) m = n // 1000 n = n - m * 1000 d = n // 500 n = n - d * 500 c = n // 100 n = n - c * 100 l = n // 50 n = n - l * 50 x = n // 10 n = n - x * 10 v = n // 5 n = n - v * 5 print("M" * m + "D" * d + "C" * c + "L" * l + "X" * x + "V" * v + "I" * n) # ### LATE ROMAN NUMERALS ### print("") print("### LATE ROMAN NUMERALS ###") print("") n = int(input("Input a number. ")) m = n // 1000 n = n - m * 1000 n1 = n d = n // 500 n = n - d * 500 c = n // 100 n = n - c * 100 if n1 // 100 == 9: c1 = "CM" else: c1 = "D" * d + "C" * c n1 = n1 l = n // 50 n = n - l * 50 x = n // 10 n = n - x * 10 if n1 // 10 == 9: x1 = "XC" else: x1 = "L" * l + "X" * x n1 = n v = n // 5 n = n - v * 5 if n1 == 9: i1 = "IX" else: i1 = "V" * v + "I" * n print("M" * m + c1 + x1 + i1)
[ 1, 396, 835, 315, 1964, 29907, 835, 13, 13, 2158, 703, 1159, 13, 2158, 703, 2277, 29937, 315, 1964, 29907, 835, 1159, 13, 2158, 703, 1159, 13, 13, 2158, 703, 29950, 2470, 297, 263, 1629, 29901, 1159, 13, 2158, 29898, 29906, 29946, 29930, 29941, 29953, 29945, 29897, 13, 13, 2158, 703, 8140, 2667, 297, 263, 316, 6332, 29901, 1159, 13, 2158, 29898, 29953, 29900, 29930, 29906, 29946, 29930, 29941, 29953, 29945, 29930, 29896, 29900, 29897, 13, 13, 2158, 703, 3421, 5046, 297, 6923, 29901, 1159, 13, 2158, 3552, 29941, 29953, 29945, 29930, 29906, 29955, 29974, 29953, 29974, 29906, 29974, 29941, 29896, 29974, 29941, 29900, 29974, 29941, 29896, 29974, 29941, 29900, 29974, 29896, 29953, 11877, 29906, 29946, 29930, 29896, 29946, 29946, 29900, 29897, 13, 29937, 28518, 304, 278, 20471, 2462, 472, 278, 931, 310, 5007, 29991, 29871, 13, 13, 2158, 703, 2855, 929, 29874, 29915, 29879, 5046, 29901, 1159, 13, 2158, 29898, 29946, 29947, 29953, 29896, 29947, 29900, 29900, 29900, 14571, 29941, 29953, 29945, 29930, 29906, 29946, 29930, 29896, 29946, 29946, 29900, 876, 13, 2158, 703, 29973, 29991, 1159, 13, 13, 29937, 835, 383, 3299, 27085, 835, 13, 13, 2158, 703, 1159, 13, 2158, 703, 2277, 29937, 12317, 1299, 29915, 29903, 612, 22970, 27085, 835, 1159, 13, 2158, 703, 1159, 13, 13, 5215, 4036, 13, 13, 4102, 29918, 978, 353, 1881, 703, 5618, 338, 596, 937, 1024, 29973, 16521, 13, 17662, 29918, 978, 353, 1881, 703, 5618, 338, 596, 7256, 1024, 29973, 16521, 13, 4230, 29918, 978, 353, 1881, 703, 5618, 338, 596, 23403, 29973, 16521, 13, 13, 29887, 4521, 292, 353, 6796, 10994, 29892, 9162, 376, 18567, 29892, 9162, 376, 29933, 265, 29926, 473, 29892, 9162, 376, 19585, 345, 29892, 376, 29962, 13, 13, 2158, 29898, 8172, 29889, 16957, 29898, 29887, 4521, 292, 29897, 718, 937, 29918, 978, 718, 376, 376, 718, 7256, 29918, 978, 718, 376, 376, 718, 1833, 29918, 978, 718, 376, 29991, 1159, 13, 13, 29937, 835, 350, 2544, 4945, 383, 7520, 22970, 9094, 28019, 13635, 835, 13, 13, 2158, 703, 1159, 13, 2158, 703, 2277, 29937, 350, 2544, 4945, 383, 7520, 22970, 9094, 28019, 13635, 835, 1159, 13, 2158, 703, 1159, 13, 13, 29888, 1351, 353, 851, 29898, 524, 29898, 7411, 29898, 2080, 703, 5618, 338, 596, 15381, 568, 1353, 29973, 376, 876, 718, 29871, 29896, 876, 13, 13, 2158, 703, 9048, 2041, 373, 29892, 920, 1048, 376, 718, 285, 1351, 718, 29804, 393, 29915, 29879, 16600, 322, 2253, 29991, 1159, 13, 13, 29937, 835, 323, 1430, 402, 1525, 1430, 350, 2891, 29911, 17101, 835, 13, 13, 2158, 703, 1159, 13, 2158, 703, 2277, 29937, 323, 1430, 402, 1525, 1430, 350, 2891, 29911, 17101, 835, 1159, 13, 2158, 703, 1159, 13, 29916, 353, 29871, 29896, 29900, 13, 8000, 921, 1405, 29871, 29896, 29901, 13, 12, 29891, 353, 851, 29898, 29916, 29897, 13, 12, 2158, 3552, 29891, 718, 376, 7933, 18046, 793, 29892, 13407, 373, 263, 10090, 29892, 16521, 334, 29871, 29906, 29897, 13, 12, 2158, 703, 2855, 565, 697, 7933, 18046, 280, 881, 11423, 635, 6416, 1159, 13, 12, 29916, 353, 921, 448, 29871, 29896, 13, 12, 29891, 353, 851, 29898, 29916, 29897, 13, 12, 361, 921, 1405, 29871, 29896, 29901, 13, 12, 12, 2158, 703, 8439, 29915, 645, 367, 376, 718, 343, 718, 376, 7933, 18046, 793, 29892, 13407, 373, 278, 10090, 23157, 13, 12, 12, 2158, 703, 1159, 13, 12, 2870, 29901, 13, 12, 12, 2158, 703, 8439, 29915, 645, 367, 376, 718, 343, 718, 376, 7933, 18046, 280, 29892, 13407, 373, 278, 10090, 23157, 13, 12, 12, 2158, 703, 1159, 13, 12, 13, 8000, 921, 1275, 29871, 29896, 29901, 13, 12, 29891, 353, 851, 29898, 29916, 29897, 13, 12, 2158, 3552, 29891, 718, 376, 7933, 18046, 280, 29892, 13407, 373, 263, 10090, 29892, 16521, 334, 29871, 29906, 29897, 13, 12, 2158, 703, 2855, 565, 697, 7933, 18046, 280, 881, 11423, 635, 6416, 1159, 13, 12, 2158, 703, 8439, 29915, 645, 367, 694, 7933, 18046, 793, 29892, 13407, 373, 278, 10090, 23157, 13, 12, 29916, 353, 921, 448, 29871, 29896, 13, 12, 13, 2158, 703, 1159, 13, 2158, 703, 12881, 23157, 13, 13, 29937, 835, 5012, 5098, 18016, 9468, 1529, 835, 13, 13, 5215, 4036, 13, 13, 6360, 353, 4036, 29889, 9502, 524, 29898, 29896, 29929, 29941, 29947, 29892, 29871, 29896, 29929, 29945, 29900, 29897, 13, 13, 726, 353, 5124, 13, 329, 1062, 353, 376, 376, 13, 8000, 318, 726, 2804, 1426, 29901, 13, 12, 726, 353, 1881, 703, 25039, 1299, 29915, 29903, 11901, 22659, 612, 27269, 29973, 29991, 16521, 13, 12, 329, 1062, 353, 1426, 29889, 21064, 580, 13, 12, 361, 318, 726, 2804, 1426, 29901, 13, 12, 12, 2158, 703, 29950, 29965, 29950, 29973, 29991, 317, 4162, 22311, 11901, 29892, 402, 29902, 2241, 29991, 16521, 13, 12, 13, 2158, 703, 6632, 29892, 6058, 317, 1177, 4741, 376, 718, 851, 29898, 6360, 29897, 718, 376, 29991, 1159, 13, 13, 29937, 835, 11060, 3301, 612, 26441, 29903, 835, 13, 13, 2158, 703, 1159, 13, 2158, 703, 2277, 29937, 11060, 3301, 612, 26441, 29903, 835, 1159, 13, 2158, 703, 1159, 13, 13, 29875, 29918, 6360, 353, 938, 29898, 2080, 703, 6730, 1629, 29901, 376, 876, 13, 29888, 29918, 6360, 353, 938, 29898, 2080, 703, 8897, 1629, 29901, 376, 876, 13, 13, 29883, 29918, 6360, 353, 474, 29918, 6360, 13, 8000, 274, 29918, 6360, 2804, 285, 29918, 6360, 718, 29871, 29896, 29901, 13, 12, 361, 274, 29918, 6360, 1273, 29871, 29946, 1275, 29871, 29900, 29901, 13, 12, 12, 361, 274, 29918, 6360, 1273, 29871, 29896, 29900, 29900, 2804, 29871, 29900, 29901, 13, 12, 12, 12, 2158, 29898, 29883, 29918, 6360, 29897, 13, 12, 12, 23681, 274, 29918, 6360, 1273, 29871, 29946, 29900, 29900, 1275, 29871, 29900, 29901, 13, 12, 12, 12, 2158, 29898, 29883, 29918, 6360, 29897, 13, 12, 29883, 29918, 6360, 353, 274, 29918, 6360, 718, 29871, 29896, 13, 12, 361, 274, 29918, 6360, 1275, 285, 29918, 6360, 718, 29871, 29896, 29901, 13, 12, 12, 8690, 13, 13, 29937, 835, 319, 13208, 29950, 2882, 2544, 29902, 10721, 835, 13, 13, 726, 353, 376, 376, 13, 9303, 353, 5159, 13, 8000, 1426, 2804, 376, 1115, 13, 12, 726, 353, 1881, 703, 2528, 596, 1734, 1244, 29901, 16521, 13, 12, 361, 1426, 2804, 376, 1115, 13, 12, 12, 9303, 29889, 4397, 29898, 726, 29897, 13, 12, 13, 2158, 29898, 24582, 29898, 9303, 876, 13, 12, 12, 13, 29937, 835, 16999, 29949, 835, 13, 13, 2158, 703, 1159, 13, 2158, 703, 2277, 29937, 16999, 29949, 835, 1159, 13, 2158, 703, 1159, 13, 13, 29876, 353, 938, 29898, 2080, 703, 5328, 1784, 274, 1242, 437, 366, 505, 29973, 376, 876, 13, 13, 1753, 2730, 29877, 29898, 29876, 1125, 13, 12, 2158, 703, 29885, 3634, 376, 334, 302, 29897, 13, 12, 13, 29885, 3634, 29898, 29876, 29897, 13, 12, 13, 29937, 835, 382, 1718, 16786, 16641, 27616, 28019, 1001, 1964, 29903, 835, 13, 13, 2158, 703, 1159, 13, 2158, 703, 2277, 29937, 382, 1718, 16786, 16641, 27616, 28019, 1001, 1964, 29903, 835, 1159, 13, 2158, 703, 1159, 13, 13, 29876, 353, 938, 29898, 2080, 703, 4290, 263, 1353, 29889, 376, 876, 13, 13, 29885, 353, 302, 849, 29871, 29896, 29900, 29900, 29900, 13, 29876, 353, 302, 448, 286, 334, 29871, 29896, 29900, 29900, 29900, 13, 13, 29881, 353, 302, 849, 29871, 29945, 29900, 29900, 13, 29876, 353, 302, 448, 270, 334, 29871, 29945, 29900, 29900, 13, 13, 29883, 353, 302, 849, 29871, 29896, 29900, 29900, 13, 29876, 353, 302, 448, 274, 334, 29871, 29896, 29900, 29900, 13, 13, 29880, 353, 302, 849, 29871, 29945, 29900, 13, 29876, 353, 302, 448, 301, 334, 29871, 29945, 29900, 13, 13, 29916, 353, 302, 849, 29871, 29896, 29900, 13, 29876, 353, 302, 448, 921, 334, 29871, 29896, 29900, 13, 13, 29894, 353, 302, 849, 29871, 29945, 13, 29876, 353, 302, 448, 325, 334, 29871, 29945, 13, 13, 2158, 703, 29924, 29908, 334, 286, 718, 376, 29928, 29908, 334, 270, 718, 376, 29907, 29908, 334, 274, 718, 376, 29931, 29908, 334, 301, 718, 376, 29990, 29908, 334, 921, 718, 376, 29963, 29908, 334, 325, 718, 376, 29902, 29908, 334, 302, 29897, 13, 13, 29937, 835, 365, 3040, 16641, 27616, 28019, 1001, 1964, 29903, 835, 13, 13, 2158, 703, 1159, 13, 2158, 703, 2277, 29937, 365, 3040, 16641, 27616, 28019, 1001, 1964, 29903, 835, 1159, 13, 2158, 703, 1159, 13, 13, 29876, 353, 938, 29898, 2080, 703, 4290, 263, 1353, 29889, 376, 876, 13, 13, 29885, 353, 302, 849, 29871, 29896, 29900, 29900, 29900, 13, 29876, 353, 302, 448, 286, 334, 29871, 29896, 29900, 29900, 29900, 13, 13, 29876, 29896, 353, 302, 13, 29881, 353, 302, 849, 29871, 29945, 29900, 29900, 13, 29876, 353, 302, 448, 270, 334, 29871, 29945, 29900, 29900, 13, 29883, 353, 302, 849, 29871, 29896, 29900, 29900, 13, 29876, 353, 302, 448, 274, 334, 29871, 29896, 29900, 29900, 13, 13, 361, 302, 29896, 849, 29871, 29896, 29900, 29900, 1275, 29871, 29929, 29901, 13, 12, 29883, 29896, 353, 376, 24494, 29908, 13, 2870, 29901, 13, 12, 29883, 29896, 353, 376, 29928, 29908, 334, 270, 718, 376, 29907, 29908, 334, 274, 13, 13, 29876, 29896, 353, 302, 29896, 13, 29880, 353, 302, 849, 29871, 29945, 29900, 13, 29876, 353, 302, 448, 301, 334, 29871, 29945, 29900, 13, 29916, 353, 302, 849, 29871, 29896, 29900, 13, 29876, 353, 302, 448, 921, 334, 29871, 29896, 29900, 13, 13, 361, 302, 29896, 849, 29871, 29896, 29900, 1275, 29871, 29929, 29901, 13, 12, 29916, 29896, 353, 376, 29990, 29907, 29908, 13, 2870, 29901, 13, 12, 29916, 29896, 353, 376, 29931, 29908, 334, 301, 718, 376, 29990, 29908, 334, 921, 13, 13, 29876, 29896, 353, 302, 13, 29894, 353, 302, 849, 29871, 29945, 13, 29876, 353, 302, 448, 325, 334, 29871, 29945, 13, 13, 361, 302, 29896, 1275, 29871, 29929, 29901, 13, 12, 29875, 29896, 353, 376, 6415, 29908, 13, 2870, 29901, 13, 12, 29875, 29896, 353, 376, 29963, 29908, 334, 325, 718, 376, 29902, 29908, 334, 302, 13, 13, 2158, 703, 29924, 29908, 334, 286, 718, 274, 29896, 718, 921, 29896, 718, 474, 29896, 29897, 13, 13, 2 ]
pyyeti/cla/_rptpct1.py
twmacro/pyye
0
38847
# -*- coding: utf-8 -*- """ Low level tool for writing percent difference reports. Typically, this is called via: :func:`cla.DR_Results.rptpct`. """ from io import StringIO from types import SimpleNamespace import warnings import numpy as np import matplotlib.pyplot as plt from pyyeti import ytools, locate, writer from ._utilities import _get_rpt_headers, _get_numform, _proc_filterval from ._magpct import magpct __all__ = ["rptpct1"] # FIXME: We need the str/repr formatting used in Numpy < 1.14. try: np.set_printoptions(legacy="1.13") except TypeError: pass def _apply_pv(value, pv, oldlen): # if value has a len that's > 1, try to partition it down; # otherwise, return it as is: try: n = len(value) except TypeError: return value else: if n == 1: return value # `value` is a vector with len > 1 ... ensure it is a true numpy # array: value = np.atleast_1d(value) # oldlen is either 0 (for `value` vectors that are expected to be # full size ... currently, only the `filterval` and # `magpct_filterval` vectors), or it is the length of the # dimension that the `value` index type of partition vector # (currently, only the `ignorepv` vector) was originally defined # to partition. if oldlen == 0: # `value` is `filterval` or `magpct_filterval` ... these just # need to be partitioned down: newvalue = value[pv] else: # `value` is `ignorepv` ... it needs to be redefined to # correspond to reduced size: truefalse = locate.index2bool(value, oldlen) newvalue = truefalse[pv].nonzero()[0] return newvalue def _align_mxmn(mxmn1, mxmn2, labels2, row_number, infodct): if infodct["labels"] and infodct["labels"] != labels2: n = len(infodct["labels"]) pv1, pv2 = locate.list_intersect(infodct["labels"], labels2) mxmn1 = mxmn1[pv1] mxmn2 = mxmn2[pv2] infodct["labels"] = [infodct["labels"][i] for i in pv1] row_number = row_number[pv1] infodct["filterval"] = _apply_pv(infodct["filterval"], pv1, 0) infodct["magpct_filterval"] = _apply_pv(infodct["magpct_filterval"], pv1, 0) infodct["ignorepv"] = _apply_pv(infodct["ignorepv"], pv1, n) return mxmn1, mxmn2, row_number def _get_filtline(filterval): if len(filterval) > 1: filtline = "Filter: <defined row-by-row>\n" else: filtline = f"Filter: {filterval[0]}\n" return filtline def _get_noteline(use_range, names, prtbads, flagbads): noteline = "Notes: " tab = " " if not use_range: noteline += "% Diff = +/- abs(({0}-{1})/{1})*100\n".format(*names) else: noteline += "% Diff = +/- abs({0}-{1})/max(abs({1}(max,min)))*100\n".format( *names ) noteline += tab + "Sign set such that positive % differences indicate exceedances\n" prtbad, prtbadh, prtbadl = prtbads flagbad, flagbadh, flagbadl = flagbads if prtbad is not None or prtbadh is not None or prtbadl is not None: if prtbad is not None: prtbad = abs(prtbad) noteline += tab + f"Printing rows where abs(% Diff) > {prtbad}%\n" elif prtbadh is not None: noteline += tab + f"Printing rows where % Diff > {prtbadh}%\n" else: noteline += tab + f"Printing rows where % Diff < {prtbadl}%\n" if flagbad is not None or flagbadh is not None or flagbadl is not None: if flagbad is not None: flagbad = abs(flagbad) noteline += tab + f"Flagging (*) rows where abs(% Diff) > {flagbad}%\n" elif flagbadh is not None: noteline += tab + f"Flagging (*) rows where % Diff > {flagbadh}%\n" else: noteline += tab + f"Flagging (*) rows where % Diff < {flagbadl}%\n" return noteline def _get_badpv(pct, pv, bad, badh, badl, defaultpv=False): if bad is not None or badh is not None or badl is not None: badpv = pv.copy() if bad is not None: badpv &= abs(pct) > bad elif badh is not None: badpv &= pct > badh else: badpv &= pct < badl else: badpv = np.empty(len(pct), bool) badpv[:] = defaultpv return badpv def _get_pct_diff(a, b, filt, pv, nastring, mxmn_b=None, ismax=True, flagbads=None): # either can pass filter to be kept: pv &= (abs(a) > filt) | (abs(b) > filt) if mxmn_b is not None: denom = np.nanmax(abs(mxmn_b), axis=1) else: denom = abs(b) # put 1's in for filtered values ... this is temporary a = a.copy() b = b.copy() a[~pv] = 1.0 b[~pv] = 1.0 z = denom == 0.0 denom[z] = 1.0 pct = 100 * abs(a - b) / denom pct[z] = 100.0 # np.inf # make less extreme values negative neg = a < b if ismax else a > b pct[neg] *= -1.0 # put nan's in for the filtered or n/a rows: pct[~pv] = np.nan # make 7 char version: spct = [f"{p:7.2f}" for p in pct] badpv = _get_badpv(pct, pv, *flagbads, False) for j in badpv.nonzero()[0]: spct[j] += "*" for j in (~pv).nonzero()[0]: spct[j] = nastring return pct, spct def _get_histogram_str(desc, hdr, pctinfo): pctcount = pctinfo["hsto"] s = [ (f"\n\n {desc} - {hdr} Comparison Histogram\n\n"), (" % Diff Count Percent\n -------- -------- -------\n"), ] with StringIO() as f: writer.vecwrite(f, " {:8.2f} {:8.0f} {:7.2f}\n", pctcount) s.append(f.getvalue()) s.append("\n") # total_percent_10 will either be 0 or 1000: # - 0 if all % diffs are "n/a" # - 1000 otherwise total_percent_10 = np.round(pctcount[:, 2].sum() * 10) last = -1.0 for pdiff in [1, 2, 5, 10, 15, 20, 25, 50, 100, 500]: pvdiff = abs(pctcount[:, 0]) <= pdiff num = pctcount[pvdiff, 2].sum() if num > last: s.append(f" {num:.1f}% of values are within {pdiff}%\n") if np.round(num * 10) == total_percent_10: break last = num pct = pctinfo["pct"] n = len(pct) if n == 0: s.append( "\n % Diff Statistics: [Min, Max, Mean, StdDev]" " = [n/a, n/a, n/a, n/a]\n" ) else: stddev = 0.0 if n <= 1 else pct.std(ddof=1) s.append( "\n % Diff Statistics: [Min, Max, Mean, StdDev]" f" = [{pct.min():.2f}, {pct.max():.2f}, {pct.mean():.4f}, {stddev:.4f}]\n" ) return "".join(s) def _proc_pct( ext1, ext2, filterval, magpct_filterval, *, names, mxmn1, comppv, mxmn_b, ismax, histogram_inc, prtbads, flagbads, numform, valhdr, maxhdr, minhdr, absmhdr, pdhdr, nastring, doabsmax, shortabsmax, print_info, ): # handle magpct stuff here: mag = ext1[comppv], ext2[comppv] if magpct_filterval is not None and len(magpct_filterval) > 1: magfilt = magpct_filterval[comppv] else: magfilt = magpct_filterval pv = comppv.copy() pct, spct = _get_pct_diff( ext1, ext2, filterval, pv, nastring, mxmn_b=mxmn_b, ismax=ismax, flagbads=flagbads, ) pct_ret = pct[pv] hsto = ytools.histogram(pct_ret, histogram_inc) # for trimming down if prtbad set: prtpv = _get_badpv(pct, pv, *prtbads, True) pctlen = max(len(pdhdr), len(max(spct, key=len))) sformatpd = f"{{:{pctlen}}}" # for writer.formheader: numlen = max(13, len(max(names, key=len)), len(numform.format(np.pi))) if not doabsmax: print_info.headers1.extend([*names, ""]) print_info.headers2.extend([valhdr, valhdr, pdhdr]) print_info.formats.extend([numform, numform, sformatpd]) print_info.printargs.extend([ext1, ext2, spct]) print_info.widths.extend([numlen, numlen, pctlen]) print_info.seps.extend([4, 2, 2]) print_info.justs.extend(["c", "c", "c"]) elif shortabsmax: print_info.headers1.extend([*names, ""]) print_info.headers2.extend([absmhdr, absmhdr, pdhdr]) print_info.formats.extend([numform, numform, sformatpd]) print_info.printargs.extend([ext1, ext2, spct]) print_info.widths.extend([numlen, numlen, pctlen]) print_info.seps.extend([4, 2, 2]) print_info.justs.extend(["c", "c", "c"]) else: print_info.headers1.extend([names[0], names[0], names[0], names[1], ""]) print_info.headers2.extend([maxhdr, minhdr, absmhdr, absmhdr, pdhdr]) print_info.formats.extend([numform, numform, numform, numform, sformatpd]) print_info.printargs.extend([mxmn1[:, 0], mxmn1[:, 1], ext1, ext2, spct]) print_info.widths.extend([numlen, numlen, numlen, numlen, pctlen]) print_info.seps.extend([4, 2, 2, 2, 2]) print_info.justs.extend(["c", "c", "c", "c", "c"]) return dict( pct=pct_ret, spct=spct, hsto=hsto, prtpv=prtpv, mag=mag, magfilt=magfilt ) def _figure_on(name, doabsmax, show_figures): figsize = [8.5, 11.0] if doabsmax: figsize[1] /= 3.0 if show_figures: plt.figure(name, figsize=figsize) plt.clf() else: plt.figure(figsize=figsize) def _figure_off(show_figures): if not show_figures: plt.close() def _prep_subplot(pctinfo, sp): if "mx" in pctinfo: # if not just doing absmax if sp > 311: plt.subplot(sp, sharex=plt.gca()) else: plt.subplot(sp) def _plot_magpct( pctinfo, names, desc, doabsmax, filename, magpct_options, use_range, maxhdr, minhdr, absmhdr, show_figures, tight_layout_args, ): ptitle = f"{desc} - {{}} Comparison vs Magnitude" xl = f"{names[1]} Magnitude" yl = f"% Diff of {names[0]} vs {names[1]}" _figure_on("Magpct - " + desc, doabsmax, show_figures) try: for lbl, hdr, sp, ismax in ( ("mx", maxhdr, 311, True), ("mn", minhdr, 312, False), ("amx", absmhdr, 313, True), ): _prep_subplot(pctinfo, sp) if lbl in pctinfo: if use_range: ref = pctinfo["amx"]["mag"][1] else: ref = None magpct( pctinfo[lbl]["mag"][0], pctinfo[lbl]["mag"][1], Ref=ref, ismax=ismax, filterval=pctinfo[lbl]["magfilt"], **magpct_options, ) plt.title(ptitle.format(hdr)) plt.xlabel(xl) plt.ylabel(yl) plt.grid(True) plt.tight_layout(**tight_layout_args) if isinstance(filename, str): plt.savefig(filename + ".magpct.png") finally: _figure_off(show_figures) def _plot_histogram( pctinfo, names, desc, doabsmax, filename, histogram_inc, maxhdr, minhdr, absmhdr, show_figures, tight_layout_args, ): ptitle = f"{desc} - {{}} Comparison Histogram" xl = f"% Diff of {names[0]} vs {names[1]}" yl = "Percent Occurrence (%)" _figure_on("Histogram - " + desc, doabsmax, show_figures) try: for lbl, hdr, sp in ( ("mx", maxhdr, 311), ("mn", minhdr, 312), ("amx", absmhdr, 313), ): _prep_subplot(pctinfo, sp) if lbl in pctinfo: width = histogram_inc x = pctinfo[lbl]["hsto"][:, 0] y = pctinfo[lbl]["hsto"][:, 2] colors = ["b"] * len(x) ax = abs(x) pv1 = ((ax > 5) & (ax <= 10)).nonzero()[0] pv2 = (ax > 10).nonzero()[0] for pv, c in ((pv1, "m"), (pv2, "r")): for i in pv: colors[i] = c plt.bar(x, y, width=width, color=colors, align="center") plt.title(ptitle.format(hdr)) plt.xlabel(xl) plt.ylabel(yl) x = abs(max(plt.xlim(), key=abs)) if x < 5: plt.xlim(-5, 5) plt.grid(True) plt.tight_layout(**tight_layout_args) if isinstance(filename, str): plt.savefig(filename + ".histogram.png") finally: _figure_off(show_figures) def rptpct1( mxmn1, mxmn2, filename, *, title="PERCENT DIFFERENCE REPORT", names=("Self", "Reference"), desc=None, filterval=None, labels=None, units=None, ignorepv=None, uf_reds=None, use_range=True, numform=None, prtbad=None, prtbadh=None, prtbadl=None, flagbad=None, flagbadh=None, flagbadl=None, dohistogram=True, histogram_inc=1.0, domagpct=True, magpct_options=None, doabsmax=False, shortabsmax=False, roundvals=-1, rowhdr="Row", deschdr="Description", maxhdr="Maximum", minhdr="Minimum", absmhdr="Abs-Max", perpage=-1, tight_layout_args=None, show_figures=False, align_by_label=True, ): """ Write a percent difference report between 2 sets of max/min data Parameters ---------- mxmn1 : 2d array_like or SimpleNamespace The max/min data to compare to the `mxmn2` set. If 2-column array_like, its columns are: [max, min]. If SimpleNamespace, it must be as defined in :class:`DR_Results` and have these members: .. code-block:: none .ext = [max, min] .drminfo = SimpleNamespace which has (at least): .desc = one line description of category .filterval = the filter value; (see `filterval` description below) .labels = a list of descriptions; one per row .ignorepv = these rows will get 'n/a' for % diff .units = string with units .uf_reds = uncertainty factors Note that the inputs `desc`, `labels`, etc, override the values above. mxmn2 : 2d array_like or SimpleNamespace The reference set of max/min data. Format is the same as `mxmn1`. .. note:: If both `mxmn1` and `mxmn2` are SimpleNamespaces and have the ``.drminfo.labels`` attribute, this routine will, by default, use the labels to align the data sets for comparison. To prevent this, set the `align_by_label` parameter to False. filename : string or file_like or 1 or None Either a name of a file, or is a file_like object as returned by :func:`open` or :class:`io.StringIO`. Input as integer 1 to write to stdout. Can also be the name of a directory or None; in these cases, a GUI is opened for file selection. title : string; must be named; optional Title for the report names : list/tuple; must be named; optional Two (short) strings identifying the two sets of data desc : string or None; must be named; optional A one line description of the table. Overrides `mxmn1.drminfo.desc`. If neither are input, 'No description provided' is used. filterval : scalar, 1d array_like or None; must be named; optional Numbers with absolute value <= than `filterval` will get a 'n/a' % diff. If vector, length must match number of rows in `mxmn1` and `mxmn2` data. Overrides `mxmn1.drminfo.filterval`. If neither are input, `filterval` is set to 1.e-6. labels : list or None; must be named; optional A list of strings briefly describing each row. Overrides `mxmn1.drminfo.labels`. If neither are input, ``['Row 1','Row 2',...]`` is used. units : string or None; must be named; optional Specifies the units. Overrides `mxmn1.drminfo.units`. If neither are input, 'Not specified' is used. ignorepv : 1d array or None; must be named; optional 0-offset index vector specifying which rows of `mxmn1` to ignore (they get the 'n/a' % diff). Overrides `mxmn1.drminfo.ignorepv`. If neither are input, no rows are ignored (though `filterval` is still used). .. note:: `ignorepv` applies *before* any alignment by labels is done (when `align_by_label` is True, which is the default). uf_reds : 1d array or None; must be named; optional Uncertainty factors: [rigid, elastic, dynamic, static]. Overrides `mxmn1.drminfo.uf_reds`. If neither is input, 'Not specified' is used. use_range : bool; must be named, optional If True, the denominator of the % diff calc for both the max & min for each row is the absolute maximum of the reference max & min for that row. If False, the denominator is the applicable reference max or min. A quick example shows why ``use_range=True`` might be useful: .. code-block:: none If [max1, min1] = [12345, -10] and [max2, min2] = [12300, 50] Then: % diff = [0.37%, 0.49%] if use_range is True % diff = [0.37%, 120.00%] if use_range is False Note that the sign of the % diff is defined such that a positive % diff means an exceedance: where ``max1 > max2`` or ``min1 < min2``. `use_range` is ignored if `doabsmax` is True. numform : string or None; must be named; optional Format of the max & min numbers. If None, it is set internally to be 13 chars wide and depends on the range of numbers to print: - if range is "small", numform='{:13.xf}' where "x" ranges from 0 to 7 - if range is "large", numform='{:13.6e}' prtbad : scalar or None; must be named; optional Only print rows where ``abs(%diff) > prtbad``. For example, to print rows off by more than 5%, use ``prtbad=5``. `prtbad` takes precedence over `prtbadh` and `prtbadl`. prtbadh : scalar or None; must be named; optional Only print rows where ``%diff > prtbadh``. Handy for showing just the exceedances. `prtbadh` takes precedence over `prtbadl`. prtbadl : scalar or None; must be named; optional Only print rows where ``%diff < prtbadl``. Handy for showing where reference rows are higher. flagbad : scalar or None; must be named; optional Flag % diffs where ``abs(%diff) > flagbad``. Works similar to `prtbad`. The flag is an asterisk (*). flagbadh : scalar or None; must be named; optional Flag % diffs where ``%diff > flagbadh``. Works similar to `prtbadh`. Handy for flagging exceedances. `flagbadh` takes precedence over `flagbadl`. flagbadl : scalar or None; must be named; optional Flag % diffs where ``%diff < flagbadl``. Works similar to `prtbadl`. dohistogram : bool; must be named; optional If True, plot the histograms. Plots will be written to "`filename`.histogram.png". histogram_inc : scalar; must be named; optional The histogram increment; defaults to 1.0 (for 1%). domagpct : bool; must be named; optional If True, plot the percent differences versus magnitude via :func:`magpct`. Plots will be written to "`filename`.magpct.png". Filtering for the "magpct" plot is controlled by the ``magpct_options['filterval']`` and ``magpct_options['symlogy']`` options. By default, all percent differences are shown, but the larger values (according to the `filterval` filter) are emphasized by using a mixed linear/log y-axis. The percent differences for the `ignorepv` rows are not plotted. magpct_options : None or dict; must be named; optional If None, it is internally reset to:: magpct_options = {'filterval': 'filterval'} Use this parameter to provide any options to :func:`magpct` but note that the `filterval` option for :func:`magpct` is treated specially. Here, in addition to any of the values that :func:`magpct` accepts, it can also be set to the string "filterval" as in the default case shown above. In that case, ``magpct_options['filterval']`` gets internally reset to the initial value of `filterval` (which is None by default). .. note:: The call to :func:`magpct` is *after* applying `ignorepv` and doing any data aligning by labels. .. note:: The two filter value options (`filterval` and ``magpct_options['filterval']``) have different defaults: None and 'filterval`, respectively. They also differ on how the ``None`` setting is used: for `filterval`, None is replaced by 1.e-6 while for `magpct_filterval`, None means that the "magpct" plot will not have any filters applied at all. .. note:: The above means that, if you accept the default values for `filterval` and for ``magpct_options['filterval']``, then tables and the histogram plots will use a `filterval` of 1.e-6 while the "magpct" plots will use no filter (it compares everything except perfect zeros). doabsmax : bool; must be named; optional If True, compare only absolute maximums. shortabsmax : bool; must be named; optional If True, set ``doabsmax=True`` and do not print the max1 and min1 columns. roundvals : integer; must be named; optional Round max & min numbers at specified decimal. If negative, no rounding. rowhdr : string; must be named; optional Header for row number column deschdr : string; must be named; optional Header for description column maxhdr : string; must be named; optional Header for the column 1 data minhdr : string; must be named; optional Header for the column 2 data absmhdr : string; must be named; optional Header for abs-max column perpage : integer; must be named; optional The number of lines to write perpage. If < 1, there is no limit (one page). tight_layout_args : dict or None; must be named; optional Arguments for :func:`matplotlib.pyplot.tight_layout`. If None, defaults to ``{'pad': 3.0}``. show_figures : bool; must be named; optional If True, plot figures will be displayed on the screen for interactive viewing. Warning: there may be many figures. align_by_label : bool; must be named; optional If True, use labels to align the two sets of data for comparison. See note above under the `mxmn2` option. Returns ------- pdiff_info : dict Dictionary with 'amx' (abs-max), 'mx' (max), and 'mn' keys: .. code-block:: none <class 'dict'>[n=3] 'amx': <class 'dict'>[n=5] 'hsto' : float64 ndarray 33 elems: (11, 3) 'mag' : [n=2]: (float64 ndarray: (100,), ... 'pct' : float64 ndarray 100 elems: (100,) 'prtpv': bool ndarray 100 elems: (100,) 'spct' : [n=100]: [' -2.46', ' -1.50', ... 'mn' : <class 'dict'>[n=5] 'hsto' : float64 ndarray 33 elems: (11, 3) 'mag' : [n=2]: (float64 ndarray: (100,), ... 'pct' : float64 ndarray 100 elems: (100,) 'prtpv': bool ndarray 100 elems: (100,) 'spct' : [n=100]: [' 1.55', ' 1.53', ... 'mx' : <class 'dict'>[n=5] 'hsto' : float64 ndarray 27 elems: (9, 3) 'mag' : [n=2]: (float64 ndarray: (100,), ... 'pct' : float64 ndarray 100 elems: (100,) 'prtpv': bool ndarray 100 elems: (100,) 'spct' : [n=100]: [' -2.46', ' -1.50', ... Where: .. code-block:: none 'hsto' : output of :func:`histogram`: [center, count, %] 'mag' : inputs to :func:`magpct` 'pct' : percent differences 'prtpv' : rows to print partition vector 'spct' : string version of 'pct' Examples -------- >>> import numpy as np >>> from pyyeti import cla >>> ext1 = [[120.0, -8.0], ... [8.0, -120.0]] >>> ext2 = [[115.0, -5.0], ... [10.0, -125.0]] Run :func:`rptpct1` multiple times to get a more complete picture of all the output (the table is very wide). Also, the plots will be turned off for this example. First, the header: >>> opts = {'domagpct': False, 'dohistogram': False} >>> dct = cla.rptpct1(ext1, ext2, 1, **opts) # doctest: +ELLIPSIS PERCENT DIFFERENCE REPORT <BLANKLINE> Description: No description provided Uncertainty: Not specified Units: Not specified Filter: 1e-06 Notes: % Diff = +/- abs(Self-Reference)/max(abs(Reference... Sign set such that positive % differences indicate... Date: ... ... Then, the max/min/absmax percent difference table in 3 calls: >>> dct = cla.rptpct1(ext1, ext2, 1, **opts) # doctest: +ELLIPSIS PERCENT DIFFERENCE REPORT ... Self Reference ... Row Description Maximum Maximum % Diff ... ------- ----------- ------------- ------------- ------- ... 1 Row 1 120.00000 115.00000 4.35 ... 2 Row 2 8.00000 10.00000 -1.60 ... ... >>> dct = cla.rptpct1(ext1, ext2, 1, **opts) # doctest: +ELLIPSIS PERCENT DIFFERENCE REPORT ... ... Self Reference ... Row Description ... Minimum Minimum % Diff ... ------- ----------- ...------------- ------------- ------- ... 1 Row 1 ... -8.00000 -5.00000 2.61 ... 2 Row 2 ... -120.00000 -125.00000 -4.00 ... ... >>> dct = cla.rptpct1(ext1, ext2, 1, **opts) # doctest: +ELLIPSIS PERCENT DIFFERENCE REPORT ... ... Self Reference Row Description ... Abs-Max Abs-Max % Diff ------- ----------- ...------------- ------------- ------- 1 Row 1 ... 120.00000 115.00000 4.35 2 Row 2 ... 120.00000 125.00000 -4.00 ... Finally, the histogram summaries: >>> dct = cla.rptpct1(ext1, ext2, 1, **opts) # doctest: +ELLIPSIS PERCENT DIFFERENCE REPORT ... No description provided - Maximum Comparison Histogram <BLANKLINE> % Diff Count Percent -------- -------- ------- -2.00 1 50.00 4.00 1 50.00 <BLANKLINE> 0.0% of values are within 1% 50.0% of values are within 2% 100.0% of values are within 5% <BLANKLINE> % Diff Statistics: [Min, Max, Mean, StdDev] = [-1.60, 4.35,... <BLANKLINE> <BLANKLINE> No description provided - Minimum Comparison Histogram <BLANKLINE> % Diff Count Percent -------- -------- ------- -4.00 1 50.00 3.00 1 50.00 <BLANKLINE> 0.0% of values are within 1% 100.0% of values are within 5% <BLANKLINE> % Diff Statistics: [Min, Max, Mean, StdDev] = [-4.00, 2.61,... <BLANKLINE> <BLANKLINE> No description provided - Abs-Max Comparison Histogram <BLANKLINE> % Diff Count Percent -------- -------- ------- -4.00 1 50.00 4.00 1 50.00 <BLANKLINE> 0.0% of values are within 1% 100.0% of values are within 5% <BLANKLINE> % Diff Statistics: [Min, Max, Mean, StdDev] = [-4.00, 4.35,... """ if tight_layout_args is None: tight_layout_args = {"pad": 3.0} if magpct_options is None: magpct_options = {"filterval": "filterval"} else: magpct_options = magpct_options.copy() # magpct_options['filterval'] get special treatment: magpct_filterval = magpct_options["filterval"] del magpct_options["filterval"] if isinstance(magpct_filterval, str): if magpct_filterval != "filterval": raise ValueError( "``magpct_options['filterval']`` is an invalid " f"string: {magpct_filterval!r} (can only " "be 'filterval' if a string)" ) # copy the initial `filterval` setting: magpct_filterval = filterval infovars = ( "desc", "filterval", "magpct_filterval", "labels", "units", "ignorepv", "uf_reds", ) dct = locals() infodct = {n: dct[n] for n in infovars} del dct # check mxmn1: if isinstance(mxmn1, SimpleNamespace): sns = mxmn1.drminfo for key, value in infodct.items(): if value is None: infodct[key] = getattr(sns, key, None) del sns mxmn1 = mxmn1.ext else: mxmn1 = np.atleast_2d(mxmn1) row_number = np.arange(1, mxmn1.shape[0] + 1) # check mxmn2: if isinstance(mxmn2, SimpleNamespace) and getattr(mxmn2, "drminfo", None): labels2 = mxmn2.drminfo.labels mxmn2 = mxmn2.ext if align_by_label: # use labels and labels2 to align data; this is in case # the two sets of results recover some of the same items, # but not all mxmn1, mxmn2, row_number = _align_mxmn( mxmn1, mxmn2, labels2, row_number, infodct ) else: mxmn2 = np.atleast_2d(mxmn2) desc = infodct["desc"] if desc is None: desc = "No description provided" R = mxmn1.shape[0] if R != mxmn2.shape[0]: raise ValueError( f"`mxmn1` and `mxmn2` have a different number of rows: " f"{R} vs {mxmn2.shape[0]} for category with `desc` = {desc}" ) filterval = infodct["filterval"] magpct_filterval = infodct["magpct_filterval"] labels = infodct["labels"] units = infodct["units"] ignorepv = infodct["ignorepv"] uf_reds = infodct["uf_reds"] del infodct if filterval is None: filterval = 1.0e-6 filterval = _proc_filterval(filterval, R, "filterval") magpct_filterval = _proc_filterval( magpct_filterval, R, "magpct_options['filterval']" ) if labels is None: labels = [f"Row {i + 1:6d}" for i in range(R)] elif len(labels) != R: raise ValueError( "length of `labels` does not match number" f" of rows in `mxmn1`: {len(labels)} vs {R} for " f"category with `desc` = {desc}" ) if units is None: units = "Not specified" if numform is None: numform = _get_numform(mxmn1) pdhdr = "% Diff" nastring = "n/a " comppv = np.ones(R, bool) if ignorepv is not None: comppv[ignorepv] = False # for row labels: w = max(11, len(max(labels, key=len))) frm = f"{{:{w}}}" # start preparing for writer.formheader: print_info = SimpleNamespace( headers1=["", ""], headers2=[rowhdr, deschdr], formats=["{:7d}", frm], printargs=[row_number, labels], widths=[7, w], seps=[0, 2], justs=["c", "l"], ) if shortabsmax: doabsmax = True if doabsmax: use_range = False if roundvals > -1: mxmn1 = np.round(mxmn1, roundvals) mxmn2 = np.round(mxmn2, roundvals) prtbads = (prtbad, prtbadh, prtbadl) flagbads = (flagbad, flagbadh, flagbadl) # compute percent differences pctinfo = {} kwargs = dict( names=names, mxmn1=mxmn1, comppv=comppv, histogram_inc=histogram_inc, numform=numform, prtbads=prtbads, flagbads=flagbads, maxhdr=maxhdr, minhdr=minhdr, absmhdr=absmhdr, pdhdr=pdhdr, nastring=nastring, doabsmax=doabsmax, shortabsmax=shortabsmax, print_info=print_info, ) with warnings.catch_warnings(): warnings.filterwarnings("ignore", r"All-NaN (slice|axis) encountered") mx1 = np.nanmax(abs(mxmn1), axis=1) mx2 = np.nanmax(abs(mxmn2), axis=1) if not doabsmax: max1, min1 = mxmn1[:, 0], mxmn1[:, 1] max2, min2 = mxmn2[:, 0], mxmn2[:, 1] mxmn_b = mxmn2 if use_range else None prtpv = np.zeros(R, bool) for i in zip( ("mx", "mn", "amx"), (max1, min1, mx1), (max2, min2, mx2), (True, False, True), (maxhdr, minhdr, absmhdr), ): lbl, ext1, ext2, ismax, valhdr = i pctinfo[lbl] = _proc_pct( ext1, ext2, filterval, magpct_filterval, mxmn_b=mxmn_b, ismax=ismax, valhdr=valhdr, **kwargs, ) prtpv |= pctinfo[lbl]["prtpv"] prtpv &= comppv else: pctinfo["amx"] = _proc_pct( mx1, mx2, filterval, magpct_filterval, mxmn_b=None, ismax=True, valhdr=absmhdr, **kwargs, ) prtpv = pctinfo["amx"]["prtpv"] hu, frm = writer.formheader( [print_info.headers1, print_info.headers2], print_info.widths, print_info.formats, sep=print_info.seps, just=print_info.justs, ) # format page header: misc = _get_filtline(filterval) + _get_noteline(use_range, names, prtbads, flagbads) hdrs = _get_rpt_headers(desc=desc, uf_reds=uf_reds, units=units, misc=misc) header = title + "\n\n" + hdrs + "\n" imode = plt.isinteractive() plt.interactive(show_figures) try: if domagpct: _plot_magpct( pctinfo, names, desc, doabsmax, filename, magpct_options, use_range, maxhdr, minhdr, absmhdr, show_figures, tight_layout_args, ) if dohistogram: _plot_histogram( pctinfo, names, desc, doabsmax, filename, histogram_inc, maxhdr, minhdr, absmhdr, show_figures, tight_layout_args, ) finally: plt.interactive(imode) # write results @ytools.write_text_file def _wtcmp(f, header, hu, frm, printargs, perpage, prtpv, pctinfo, desc): prtpv = prtpv.nonzero()[0] if perpage < 1: # one additional in case size is zero perpage = prtpv.size + 1 pages = (prtpv.size + perpage - 1) // perpage if prtpv.size < len(printargs[0]): for i, item in enumerate(printargs): printargs[i] = [item[j] for j in prtpv] tabhead = header + hu pager = "\n" # + chr(12) for p in range(pages): if p > 0: f.write(pager) f.write(tabhead) b = p * perpage e = b + perpage writer.vecwrite(f, frm, *printargs, so=slice(b, e)) f.write(pager) for lbl, hdr in zip(("mx", "mn", "amx"), (maxhdr, minhdr, absmhdr)): if lbl in pctinfo: f.write(_get_histogram_str(desc, hdr, pctinfo[lbl])) _wtcmp( filename, header, hu, frm, print_info.printargs, perpage, prtpv, pctinfo, desc ) return pctinfo
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 29931, 340, 3233, 5780, 363, 5007, 10151, 4328, 13676, 29889, 14213, 1711, 29892, 445, 13, 275, 2000, 3025, 29901, 584, 9891, 18078, 16398, 29889, 8353, 29918, 12191, 29889, 29878, 415, 29886, 312, 1412, 13, 15945, 29908, 13, 3166, 12013, 1053, 1714, 5971, 13, 3166, 4072, 1053, 12545, 23335, 13, 5215, 18116, 13, 5215, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 3166, 282, 8071, 16577, 1053, 343, 8504, 29892, 26694, 29892, 9227, 13, 3166, 869, 29918, 4422, 1907, 1053, 903, 657, 29918, 29878, 415, 29918, 13662, 29892, 903, 657, 29918, 1949, 689, 29892, 903, 15439, 29918, 4572, 791, 13, 3166, 869, 29918, 11082, 29886, 312, 1053, 2320, 29886, 312, 13, 13, 13, 1649, 497, 1649, 353, 6796, 29878, 415, 29886, 312, 29896, 3108, 13, 13, 13, 29937, 383, 6415, 2303, 29901, 1334, 817, 278, 851, 29914, 276, 558, 15998, 1304, 297, 11848, 2272, 529, 29871, 29896, 29889, 29896, 29946, 29889, 13, 2202, 29901, 13, 1678, 7442, 29889, 842, 29918, 558, 8941, 1980, 29898, 1397, 4135, 543, 29896, 29889, 29896, 29941, 1159, 13, 19499, 20948, 29901, 13, 1678, 1209, 13, 13, 13, 1753, 903, 7302, 29918, 29886, 29894, 29898, 1767, 29892, 282, 29894, 29892, 2030, 2435, 1125, 13, 1678, 396, 565, 995, 756, 263, 7431, 393, 29915, 29879, 1405, 29871, 29896, 29892, 1018, 304, 8877, 372, 1623, 29936, 13, 1678, 396, 6467, 29892, 736, 372, 408, 338, 29901, 13, 1678, 1018, 29901, 13, 4706, 302, 353, 7431, 29898, 1767, 29897, 13, 1678, 5174, 20948, 29901, 13, 4706, 736, 995, 13, 1678, 1683, 29901, 13, 4706, 565, 302, 1275, 29871, 29896, 29901, 13, 9651, 736, 995, 13, 13, 1678, 396, 421, 1767, 29952, 338, 263, 4608, 411, 7431, 1405, 29871, 29896, 2023, 9801, 372, 338, 263, 1565, 12655, 13, 1678, 396, 1409, 29901, 13, 1678, 995, 353, 7442, 29889, 271, 280, 579, 29918, 29896, 29881, 29898, 1767, 29897, 13, 13, 1678, 396, 2030, 2435, 338, 2845, 29871, 29900, 313, 1454, 421, 1767, 29952, 12047, 393, 526, 3806, 304, 367, 13, 1678, 396, 2989, 2159, 2023, 5279, 29892, 871, 278, 421, 4572, 791, 29952, 322, 13, 1678, 396, 421, 11082, 29886, 312, 29918, 4572, 791, 29952, 12047, 511, 470, 372, 338, 278, 3309, 310, 278, 13, 1678, 396, 9927, 393, 278, 421, 1767, 29952, 2380, 1134, 310, 8877, 4608, 13, 1678, 396, 313, 3784, 368, 29892, 871, 278, 421, 17281, 29886, 29894, 29952, 4608, 29897, 471, 10437, 3342, 13, 1678, 396, 304, 8877, 29889, 13, 1678, 565, 2030, 2435, 1275, 29871, 29900, 29901, 13, 4706, 396, 421, 1767, 29952, 338, 421, 4572, 791, 29952, 470, 421, 11082, 29886, 312, 29918, 4572, 791, 29952, 2023, 1438, 925, 13, 4706, 396, 817, 304, 367, 8877, 287, 1623, 29901, 13, 4706, 716, 1767, 353, 995, 29961, 29886, 29894, 29962, 13, 1678, 1683, 29901, 13, 4706, 396, 421, 1767, 29952, 338, 421, 17281, 29886, 29894, 29952, 2023, 372, 4225, 304, 367, 337, 12119, 304, 13, 4706, 396, 3928, 304, 12212, 2159, 29901, 13, 4706, 1565, 4541, 353, 26694, 29889, 2248, 29906, 11227, 29898, 1767, 29892, 2030, 2435, 29897, 13, 4706, 716, 1767, 353, 1565, 4541, 29961, 29886, 29894, 1822, 5464, 9171, 580, 29961, 29900, 29962, 13, 1678, 736, 716, 1767, 13, 13, 13, 1753, 903, 2520, 29918, 16838, 23521, 29898, 16838, 23521, 29896, 29892, 286, 29916, 23521, 29906, 29892, 11073, 29906, 29892, 1948, 29918, 4537, 29892, 3041, 397, 312, 1125, 13, 1678, 565, 3041, 397, 312, 3366, 21134, 3108, 322, 3041, 397, 312, 3366, 21134, 3108, 2804, 11073, 29906, 29901, 13, 4706, 302, 353, 7431, 29898, 7192, 397, 312, 3366, 21134, 20068, 13, 4706, 282, 29894, 29896, 29892, 282, 29894, 29906, 353, 26694, 29889, 1761, 29918, 1639, 8803, 29898, 7192, 397, 312, 3366, 21134, 12436, 11073, 29906, 29897, 13, 4706, 286, 29916, 23521, 29896, 353, 286, 29916, 23521, 29896, 29961, 29886, 29894, 29896, 29962, 13, 4706, 286, 29916, 23521, 29906, 353, 286, 29916, 23521, 29906, 29961, 29886, 29894, 29906, 29962, 13, 4706, 3041, 397, 312, 3366, 21134, 3108, 353, 518, 7192, 397, 312, 3366, 21134, 3108, 29961, 29875, 29962, 363, 474, 297, 282, 29894, 29896, 29962, 13, 4706, 1948, 29918, 4537, 353, 1948, 29918, 4537, 29961, 29886, 29894, 29896, 29962, 13, 4706, 3041, 397, 312, 3366, 4572, 791, 3108, 353, 903, 7302, 29918, 29886, 29894, 29898, 7192, 397, 312, 3366, 4572, 791, 12436, 282, 29894, 29896, 29892, 29871, 29900, 29897, 13, 4706, 3041, 397, 312, 3366, 11082, 29886, 312, 29918, 4572, 791, 3108, 353, 903, 7302, 29918, 29886, 29894, 29898, 7192, 397, 312, 3366, 11082, 29886, 312, 29918, 4572, 791, 12436, 282, 29894, 29896, 29892, 29871, 29900, 29897, 13, 4706, 3041, 397, 312, 3366, 17281, 29886, 29894, 3108, 353, 903, 7302, 29918, 29886, 29894, 29898, 7192, 397, 312, 3366, 17281, 29886, 29894, 12436, 282, 29894, 29896, 29892, 302, 29897, 13, 1678, 736, 286, 29916, 23521, 29896, 29892, 286, 29916, 23521, 29906, 29892, 1948, 29918, 4537, 13, 13, 13, 1753, 903, 657, 29918, 1777, 29873, 1220, 29898, 4572, 791, 1125, 13, 1678, 565, 7431, 29898, 4572, 791, 29897, 1405, 29871, 29896, 29901, 13, 4706, 977, 29873, 1220, 353, 376, 5072, 29901, 418, 529, 12119, 1948, 29899, 1609, 29899, 798, 14247, 29876, 29908, 13, 1678, 1683, 29901, 13, 4706, 977, 29873, 1220, 353, 285, 29908, 5072, 29901, 418, 426, 4572, 791, 29961, 29900, 29962, 1012, 29876, 29908, 13, 1678, 736, 977, 29873, 1220, 13, 13, 13, 1753, 903, 657, 29918, 1333, 5570, 29898, 1509, 29918, 3881, 29892, 2983, 29892, 544, 22625, 7925, 29892, 7353, 29890, 7925, 1125, 13, 1678, 451, 5570, 353, 376, 3664, 267, 29901, 539, 376, 13, 1678, 4434, 353, 376, 632, 376, 13, 1678, 565, 451, 671, 29918, 3881, 29901, 13, 4706, 451, 5570, 4619, 11860, 360, 2593, 353, 718, 24028, 6425, 29898, 3319, 29900, 7402, 29912, 29896, 1800, 19248, 29896, 1800, 29930, 29896, 29900, 29900, 29905, 29876, 1642, 4830, 10456, 7039, 29897, 13, 1678, 1683, 29901, 13, 4706, 451, 5570, 4619, 11860, 360, 2593, 353, 718, 24028, 6425, 3319, 29900, 7402, 29912, 29896, 1800, 29914, 3317, 29898, 6897, 3319, 29896, 2119, 3317, 29892, 1195, 4961, 29930, 29896, 29900, 29900, 29905, 29876, 1642, 4830, 29898, 13, 9651, 334, 7039, 13, 4706, 1723, 13, 13, 1678, 451, 5570, 4619, 4434, 718, 376, 10140, 731, 1316, 393, 6374, 1273, 12651, 12266, 13461, 2925, 29905, 29876, 29908, 13, 1678, 544, 29873, 12313, 29892, 544, 29873, 12313, 29882, 29892, 544, 29873, 12313, 29880, 353, 544, 22625, 7925, 13, 1678, 7353, 12313, 29892, 7353, 12313, 29882, 29892, 7353, 12313, 29880, 353, 7353, 29890, 7925, 13, 1678, 565, 544, 29873, 12313, 338, 451, 6213, 470, 544, 29873, 12313, 29882, 338, 451, 6213, 470, 544, 29873, 12313, 29880, 338, 451, 6213, 29901, 13, 4706, 565, 544, 29873, 12313, 338, 451, 6213, 29901, 13, 9651, 544, 29873, 12313, 353, 6425, 29898, 558, 29873, 12313, 29897, 13, 9651, 451, 5570, 4619, 4434, 718, 285, 29908, 11816, 292, 4206, 988, 6425, 29414, 360, 2593, 29897, 1405, 426, 558, 29873, 12313, 10560, 29905, 29876, 29908, 13, 4706, 25342, 544, 29873, 12313, 29882, 338, 451, 6213, 29901, 13, 9651, 451, 5570, 4619, 4434, 718, 285, 29908, 11816, 292, 4206, 988, 1273, 360, 2593, 1405, 426, 558, 29873, 12313, 29882, 10560, 29905, 29876, 29908, 13, 4706, 1683, 29901, 13, 9651, 451, 5570, 4619, 4434, 718, 285, 29908, 11816, 292, 4206, 988, 1273, 360, 2593, 529, 426, 558, 29873, 12313, 29880, 10560, 29905, 29876, 29908, 13, 13, 1678, 565, 7353, 12313, 338, 451, 6213, 470, 7353, 12313, 29882, 338, 451, 6213, 470, 7353, 12313, 29880, 338, 451, 6213, 29901, 13, 4706, 565, 7353, 12313, 338, 451, 6213, 29901, 13, 9651, 7353, 12313, 353, 6425, 29898, 15581, 12313, 29897, 13, 9651, 451, 5570, 4619, 4434, 718, 285, 29908, 21979, 3460, 3070, 29897, 4206, 988, 6425, 29414, 360, 2593, 29897, 1405, 426, 15581, 12313, 10560, 29905, 29876, 29908, 13, 4706, 25342, 7353, 12313, 29882, 338, 451, 6213, 29901, 13, 9651, 451, 5570, 4619, 4434, 718, 285, 29908, 21979, 3460, 3070, 29897, 4206, 988, 1273, 360, 2593, 1405, 426, 15581, 12313, 29882, 10560, 29905, 29876, 29908, 13, 4706, 1683, 29901, 13, 9651, 451, 5570, 4619, 4434, 718, 285, 29908, 21979, 3460, 3070, 29897, 4206, 988, 1273, 360, 2593, 529, 426, 15581, 12313, 29880, 10560, 29905, 29876, 29908, 13, 1678, 736, 451, 5570, 13, 13, 13, 1753, 903, 657, 29918, 12313, 29886, 29894, 29898, 29886, 312, 29892, 282, 29894, 29892, 4319, 29892, 4319, 29882, 29892, 4319, 29880, 29892, 2322, 29886, 29894, 29922, 8824, 1125, 13, 1678, 565, 4319, 338, 451, 6213, 470, 4319, 29882, 338, 451, 6213, 470, 4319, 29880, 338, 451, 6213, 29901, 13, 4706, 4319, 29886, 29894, 353, 282, 29894, 29889, 8552, 580, 13, 4706, 565, 4319, 338, 451, 6213, 29901, 13, 9651, 4319, 29886, 29894, 7878, 6425, 29898, 29886, 312, 29897, 1405, 4319, 13, 4706, 25342, 4319, 29882, 338, 451, 6213, 29901, 13, 9651, 4319, 29886, 29894, 7878, 282, 312, 1405, 4319, 29882, 13, 4706, 1683, 29901, 13, 9651, 4319, 29886, 29894, 7878, 282, 312, 529, 4319, 29880, 13, 1678, 1683, 29901, 13, 4706, 4319, 29886, 29894, 353, 7442, 29889, 6310, 29898, 2435, 29898, 29886, 312, 511, 6120, 29897, 13, 4706, 4319, 29886, 29894, 7503, 29962, 353, 2322, 29886, 29894, 13, 1678, 736, 4319, 29886, 29894, 13, 13, 13, 1753, 903, 657, 29918, 29886, 312, 29918, 12765, 29898, 29874, 29892, 289, 29892, 977, 29873, 29892, 282, 29894, 29892, 8281, 909, 29892, 286, 29916, 23521, 29918, 29890, 29922, 8516, 29892, 338, 3317, 29922, 5574, 29892, 7353, 29890, 7925, 29922, 8516, 1125, 13, 1678, 396, 2845, 508, 1209, 4175, 304, 367, 8126, 29901, 13, 1678, 282, 29894, 7878, 313, 6897, 29898, 29874, 29897, 1405, 977, 29873, 29897, 891, 313, 6897, 29898, 29890, 29897, 1405, 977, 29873, 29897, 13, 13, 1678, 565, 286, 29916, 23521, 29918, 29890, 338, 451, 6213, 29901, 13, 4706, 972, 290, 353, 7442, 29889, 13707, 3317, 29898, 6897, 29898, 16838, 23521, 29918, 29890, 511, 9685, 29922, 29896, 29897, 13, 1678, 1683, 29901, 13, 4706, 972, 290, 353, 6425, 29898, 29890, 29897, 13, 13, 1678, 396, 1925, 29871, 29896, 29915, 29879, 297, 363, 22289, 1819, 2023, 445, 338, 13201, 13, 1678, 263, 353, 263, 29889, 8552, 580, 13, 1678, 289, 353, 289, 29889, 8552, 580, 13, 1678, 263, 29961, 30022, 29886, 29894, 29962, 353, 29871, 29896, 29889, 29900, 13, 1678, 289, 29961, 30022, 29886, 29894, 29962, 353, 29871, 29896, 29889, 29900, 13, 13, 1678, 503, 353, 972, 290, 1275, 29871, 29900, 29889, 29900, 13, 1678, 972, 290, 29961, 29920, 29962, 353, 29871, 29896, 29889, 29900, 13, 1678, 282, 312, 353, 29871, 29896, 29900, 29900, 334, 6425, 29898, 29874, 448, 289, 29897, 847, 972, 290, 13, 1678, 282, 312, 29961, 29920, 29962, 353, 29871, 29896, 29900, 29900, 29889, 29900, 29871, 396, 7442, 29889, 7192, 13, 13, 1678, 396, 1207, 3109, 18677, 1819, 8178, 13, 1678, 3480, 353, 263, 529, 289, 565, 338, 3317, 1683, 263, 1405, 289, 13, 1678, 282, 312, 29961, 10052, 29962, 334, 29922, 448, 29896, 29889, 29900, 13, 13, 1678, 396, 1925, 23432, 29915, 29879, 297, 363, 278, 22289, 470, 302, 29914, 29874, 4206, 29901, 13, 1678, 282, 312, 29961, 30022, 29886, 29894, 29962, 353, 7442, 29889, 13707, 13, 13, 1678, 396, 1207, 29871, 29955, 1373, 1873, 29901, 13, 1678, 805, 312, 353, 518, 29888, 29908, 29912, 29886, 29901, 29955, 29889, 29906, 29888, 5038, 363, 282, 297, 282, 312, 29962, 13, 1678, 4319, 29886, 29894, 353, 903, 657, 29918, 12313, 29886, 29894, 29898, 29886, 312, 29892, 282, 29894, 29892, 334, 15581, 29890, 7925, 29892, 7700, 29897, 13, 1678, 363, 432, 297, 4319, 29886, 29894, 29889, 5464, 9171, 580, 29961, 29900, 5387, 13, 4706, 805, 312, 29961, 29926, 29962, 4619, 376, 20605, 13, 1678, 363, 432, 297, 313, 30022, 29886, 29894, 467, 5464, 9171, 580, 29961, 29900, 5387, 13, 4706, 805, 312, 29961, 29926, 29962, 353, 8281, 909, 13, 13, 1678, 736, 282, 312, 29892, 805, 312, 13, 13, 13, 1753, 903, 657, 29918, 29882, 391, 13342, 29918, 710, 29898, 14273, 29892, 298, 7707, 29892, 282, 312, 3888, 1125, 13, 1678, 282, 312, 2798, 353, 282, 312, 3888, 3366, 29882, 7864, 3108, 13, 1678, 269, 353, 518, 13, 4706, 313, 29888, 26732, 29876, 29905, 29876, 1678, 426, 14273, 29913, 448, 426, 29882, 7707, 29913, 422, 20941, 15179, 13342, 29905, 29876, 29905, 29876, 4968, 13, 4706, 4852, 418, 1273, 360, 2593, 418, 3917, 1678, 2431, 1760, 29905, 29876, 268, 448, 26589, 259, 448, 26589, 259, 448, 22158, 29905, 29876, 4968, 13, 1678, 4514, 13, 1678, 411, 1714, 5971, 580, 408, 285, 29901, 13, 4706, 9227, 29889, 2003, 3539, 29898, 29888, 29892, 376, 268, 12365, 29947, 29889, 29906, 29888, 29913, 259, 12365, 29947, 29889, 29900, 29888, 29913, 259, 12365, 29955, 29889, 29906, 29888, 1012, 29876, 613, 282, 312, 2798, 29897, 13, 4706, 269, 29889, 4397, 29898, 29888, 29889, 657, 1767, 3101, 13, 4706, 269, 29889, 4397, 14182, 29876, 1159, 13, 13, 1678, 396, 3001, 29918, 25376, 29918, 29896, 29900, 674, 2845, 367, 29871, 29900, 470, 29871, 29896, 29900, 29900, 29900, 29901, 13, 1678, 396, 29871, 448, 29871, 29900, 565, 599, 1273, 2923, 29879, 526, 376, 29876, 29914, 29874, 29908, 13, 1678, 396, 29871, 448, 29871, 29896, 29900, 29900, 29900, 6467, 13, 1678, 3001, 29918, 25376, 29918, 29896, 29900, 353, 7442, 29889, 14486, 29898, 29886, 312, 2798, 7503, 29892, 29871, 29906, 1822, 2083, 580, 334, 29871, 29896, 29900, 29897, 13, 1678, 1833, 353, 448, 29896, 29889, 29900, 13, 1678, 363, 10518, 2593, 297, 518, 29896, 29892, 29871, 29906, 29892, 29871, 29945, 29892, 29871, 29896, 29900, 29892, 29871, 29896, 29945, 29892, 29871, 29906, 29900, 29892, 29871, 29906, 29945, 29892, 29871, 29945, 29900, 29892, 29871, 29896, 29900, 29900, 29892, 29871, 29945, 29900, 29900, 5387, 13, 4706, 282, 29894, 12765, 353, 6425, 29898, 29886, 312, 2798, 7503, 29892, 29871, 29900, 2314, 5277, 10518, 2593, 13, 4706, 954, 353, 282, 312, 2798, 29961, 29886, 29894, 12765, 29892, 29871, 29906, 1822, 2083, 580, 13, 4706, 565, 954, 1405, 1833, 29901, 13, 9651, 269, 29889, 4397, 29898, 29888, 29908, 1678, 426, 1949, 29901, 29889, 29896, 29888, 10560, 310, 1819, 526, 2629, 426, 29886, 12765, 10560, 29905, 29876, 1159, 13, 4706, 565, 7442, 29889, 14486, 29898, 1949, 334, 29871, 29896, 29900, 29897, 1275, 3001, 29918, 25376, 29918, 29896, 29900, 29901, 13, 9651, 2867, 13, 4706, 1833, 353, 954, 13, 13, 1678, 282, 312, 353, 282, 312, 3888, 3366, 29886, 312, 3108, 13, 1678, 302, 353, 7431, 29898, 29886, 312, 29897, 13, 1678, 565, 302, 1275, 29871, 29900, 29901, 13, 4706, 269, 29889, 4397, 29898, 13, 9651, 6634, 29876, 1678, 1273, 360, 2593, 27098, 29901, 518, 8140, 29892, 5918, 29892, 16316, 29892, 624, 29881, 16618, 18017, 13, 9651, 376, 353, 518, 29876, 29914, 29874, 29892, 302, 29914, 29874, 29892, 302, 29914, 29874, 29892, 302, 29914, 29874, 10725, 29876, 29908, 13, 4706, 1723, 13, 1678, 1683, 29901, 13, 4706, 3659, 3359, 353, 29871, 29900, 29889, 29900, 565, 302, 5277, 29871, 29896, 1683, 282, 312, 29889, 4172, 29898, 1289, 974, 29922, 29896, 29897, 13, 4706, 269, 29889, 4397, 29898, 13, 9651, 6634, 29876, 1678, 1273, 360, 2593, 27098, 29901, 518, 8140, 29892, 5918, 29892, 16316, 29892, 624, 29881, 16618, 18017, 13, 9651, 285, 29908, 353, 15974, 29886, 312, 29889, 1195, 7295, 29889, 29906, 29888, 1118, 426, 29886, 312, 29889, 3317, 7295, 29889, 29906, 29888, 1118, 426, 29886, 312, 29889, 12676, 7295, 29889, 29946, 29888, 1118, 426, 4172, 3359, 29901, 29889, 29946, 29888, 6525, 29905, 29876, 29908, 13, 4706, 1723, 13, 1678, 736, 376, 1642, 7122, 29898, 29879, 29897, 13, 13, 13, 1753, 903, 15439, 29918, 29886, 312, 29898, 13, 1678, 1294, 29896, 29892, 13, 1678, 1294, 29906, 29892, 13, 1678, 4175, 791, 29892, 13, 1678, 2320, 29886, 312, 29918, 4572, 791, 29892, 13, 1678, 334, 29892, 13, 1678, 2983, 29892, 13, 1678, 286, 29916, 23521, 29896, 29892, 13, 1678, 419, 407, 29894, 29892, 13, 1678, 286, 29916, 23521, 29918, 29890, 29892, 13, 1678, 338, 3317, 29892, 13, 1678, 9825, 13342, 29918, 3742, 29892, 13, 1678, 544, 22625, 7925, 29892, 13, 1678, 7353, 29890, 7925, 29892, 13, 1678, 954, 689, 29892, 13, 1678, 659, 29882, 7707, 29892, 13, 1678, 4236, 29882, 7707, 29892, 13, 1678, 1375, 29882, 7707, 29892, 13, 1678, 633, 3844, 29882, 7707, 29892, 13, 1678, 10518, 29882, 7707, 29892, 13, 1678, 8281, 909, 29892, 13, 1678, 437, 6897, 3317, 29892, 13, 1678, 3273, 6897, 3317, 29892, 13, 1678, 1596, 29918, 3888, 29892, 13, 1125, 13, 1678, 396, 4386, 2320, 29886, 312, 6433, 1244, 29901, 13, 1678, 2320, 353, 1294, 29896, 29961, 510, 407, 29894, 1402, 1294, 29906, 29961, 510, 407, 29894, 29962, 13, 1678, 565, 2320, 29886, 312, 29918, 4572, 791, 338, 451, 6213, 322, 7431, 29898, 11082, 29886, 312, 29918, 4572, 791, 29897, 1405, 29871, 29896, 29901, 13, 4706, 2320, 1777, 29873, 353, 2320, 29886, 312, 29918, 4572, 791, 29961, 510, 407, 29894, 29962, 13, 1678, 1683, 29901, 13, 4706, 2320, 1777, 29873, 353, 2320, 29886, 312, 29918, 4572, 791, 13, 13, 1678, 282, 29894, 353, 419, 407, 29894, 29889, 8552, 580, 13, 1678, 282, 312, 29892, 805, 312, 353, 903, 657, 29918, 29886, 312, 29918, 12765, 29898, 13, 4706, 1294, 29896, 29892, 13, 4706, 1294, 29906, 29892, 13, 4706, 4175, 791, 29892, 13, 4706, 282, 29894, 29892, 13, 4706, 8281, 909, 29892, 13, 4706, 286, 29916, 23521, 29918, 29890, 29922, 16838, 23521, 29918, 29890, 29892, 13, 4706, 338, 3317, 29922, 275, 3317, 29892, 13, 4706, 7353, 29890, 7925, 29922, 15581, 29890, 7925, 29892, 13, 1678, 1723, 13, 1678, 282, 312, 29918, 2267, 353, 282, 312, 29961, 29886, 29894, 29962, 13, 1678, 298, 7864, 353, 343, 8504, 29889, 29882, 391, 13342, 29898, 29886, 312, 29918, 2267, 29892, 9825, 13342, 29918, 3742, 29897, 13, 13, 1678, 396, 363, 17151, 4056, 1623, 565, 544, 29873, 12313, 731, 29901, 13, 1678, 544, 9392, 29894, 353, 903, 657, 29918, 12313, 29886, 29894, 29898, 29886, 312, 29892, 282, 29894, 29892, 334, 558, 22625, 7925, 29892, 5852, 29897, 13, 1678, 282, 312, 2435, 353, 4236, 29898, 2435, 29898, 29886, 12744, 7707, 511, 7431, 29898, 3317, 29898, 1028, 312, 29892, 1820, 29922, 2435, 4961, 13, 1678, 269, 4830, 15926, 353, 285, 29908, 6224, 26254, 29886, 312, 2435, 930, 5038, 13, 13, 1678, 396, 363, 9227, 29889, 689, 6672, 29901, 13, 1678, 954, 2435, 353, 4236, 29898, 29896, 29941, 29892, 7431, 29898, 3317, 29898, 7039, 29892, 1820, 29922, 2435, 8243, 7431, 29898, 1949, 689, 29889, 4830, 29898, 9302, 29889, 1631, 4961, 13, 1678, 565, 451, 437, 6897, 3317, 29901, 13, 4706, 1596, 29918, 3888, 29889, 13662, 29896, 29889, 21843, 4197, 29930, 7039, 29892, 5124, 2314, 13, 4706, 1596, 29918, 3888, 29889, 13662, 29906, 29889, 21843, 4197, 791, 29882, 7707, 29892, 659, 29882, 7707, 29892, 10518, 29882, 7707, 2314, 13, 4706, 1596, 29918, 3888, 29889, 689, 1446, 29889, 21843, 4197, 1949, 689, 29892, 954, 689, 29892, 269, 4830, 15926, 2314, 13, 4706, 1596, 29918, 3888, 29889, 2158, 5085, 29889, 21843, 4197, 1062, 29896, 29892, 1294, 29906, 29892, 805, 312, 2314, 13, 4706, 1596, 29918, 3888, 29889, 2103, 29879, 29889, 21843, 4197, 1949, 2435, 29892, 954, 2435, 29892, 282, 312, 2435, 2314, 13, 4706, 1596, 29918, 3888, 29889, 344, 567, 29889, 21843, 4197, 29946, 29892, 29871, 29906, 29892, 29871, 29906, 2314, 13, 4706, 1596, 29918, 3888, 29889, 5143, 29879, 29889, 21843, 29898, 3366, 29883, 613, 376, 29883, 613, 376, 29883, 20068, 13, 1678, 25342, 3273, 6897, 3317, 29901, 13, 4706, 1596, 29918, 3888, 29889, 13662, 29896, 29889, 21843, 4197, 29930, 7039, 29892, 5124, 2314, 13, 4706, 1596, 29918, 3888, 29889, 13662, 29906, 29889, 21843, 4197, 370, 3844, 29882, 7707, 29892, 633, 3844, 29882, 7707, 29892, 10518, 29882, 7707, 2314, 13, 4706, 1596, 29918, 3888, 29889, 689, 1446, 29889, 21843, 4197, 1949, 689, 29892, 954, 689, 29892, 269, 4830, 15926, 2314, 13, 4706, 1596, 29918, 3888, 29889, 2158, 5085, 29889, 21843, 4197, 1062, 29896, 29892, 1294, 29906, 29892, 805, 312, 2314, 13, 4706, 1596, 29918, 3888, 29889, 2103, 29879, 29889, 21843, 4197, 1949, 2435, 29892, 954, 2435, 29892, 282, 312, 2435, 2314, 13, 4706, 1596, 29918, 3888, 29889, 344, 567, 29889, 21843, 4197, 29946, 29892, 29871, 29906, 29892, 29871, 29906, 2314, 13, 4706, 1596, 29918, 3888, 29889, 5143, 29879, 29889, 21843, 29898, 3366, 29883, 613, 376, 29883, 613, 376, 29883, 20068, 13, 1678, 1683, 29901, 13, 4706, 1596, 29918, 3888, 29889, 13662, 29896, 29889, 21843, 4197, 7039, 29961, 29900, 1402, 2983, 29961, 29900, 1402, 2983, 29961, 29900, 1402, 2983, 29961, 29896, 1402, 5124, 2314, 13, 4706, 1596, 29918, 3888, 29889, 13662, 29906, 29889, 21843, 4197, 3317, 29882, 7707, 29892, 1375, 29882, 7707, 29892, 633, 3844, 29882, 7707, 29892, 633, 3844, 29882, 7707, 29892, 10518, 29882, 7707, 2314, 13, 4706, 1596, 29918, 3888, 29889, 689, 1446, 29889, 21843, 4197, 1949, 689, 29892, 954, 689, 29892, 954, 689, 29892, 954, 689, 29892, 269, 4830, 15926, 2314, 13, 4706, 1596, 29918, 3888, 29889, 2158, 5085, 29889, 21843, 4197, 16838, 23521, 29896, 7503, 29892, 29871, 29900, 1402, 286, 29916, 23521, 29896, 7503, 29892, 29871, 29896, 1402, 1294, 29896, 29892, 1294, 29906, 29892, 805, 312, 2314, 13, 4706, 1596, 29918, 3888, 29889, 2103, 29879, 29889, 21843, 4197, 1949, 2435, 29892, 954, 2435, 29892, 954, 2435, 29892, 954, 2435, 29892, 282, 312, 2435, 2314, 13, 4706, 1596, 29918, 3888, 29889, 344, 567, 29889, 21843, 4197, 29946, 29892, 29871, 29906, 29892, 29871, 29906, 29892, 29871, 29906, 29892, 29871, 29906, 2314, 13, 4706, 1596, 29918, 3888, 29889, 5143, 29879, 29889, 21843, 29898, 3366, 29883, 613, 376, 29883, 613, 376, 29883, 613, 376, 29883, 613, 376, 29883, 20068, 13, 1678, 736, 9657, 29898, 13, 4706, 282, 312, 29922, 29886, 312, 29918, 2267, 29892, 805, 312, 29922, 1028, 312, 29892, 298, 7864, 29922, 29882, 7864, 29892, 544, 9392, 29894, 29922, 558, 9392, 29894, 29892, 2320, 29922, 11082, 29892, 2320, 1777, 29873, 29922, 11082, 1777, 29873, 13, 1678, 1723, 13, 13, 13, 1753, 903, 4532, 29918, 265, 29898, 978, 29892, 437, 6897, 3317, 29892, 1510, 29918, 1003, 1973, 1125, 13, 1678, 2537, 2311, 353, 518, 29947, 29889, 29945, 29892, 29871, 29896, 29896, 29889, 29900, 29962, 13, 1678, 565, 437, 6897, 3317, 29901, 13, 4706, 2537, 2311, 29961, 29896, 29962, 847, 29922, 29871, 29941, 29889, 29900, 13, 1678, 565, 1510, 29918, 1003, 1973, 29901, 13, 4706, 14770, 29889, 4532, 29898, 978, 29892, 2537, 2311, 29922, 1003, 2311, 29897, 13, 4706, 14770, 29889, 695, 29888, 580, 13, 1678, 1683, 29901, 13, 4706, 14770, 29889, 4532, 29898, 1003, 2311, 29922, 1003, 2311, 29897, 13, 13, 13, 1753, 903, 4532, 29918, 2696, 29898, 4294, 29918, 1003, 1973, 1125, 13, 1678, 565, 451, 1510, 29918, 1003, 1973, 29901, 13, 4706, 14770, 29889, 5358, 580, 13, 13, 13, 1753, 903, 15287, 29918, 1491, 5317, 29898, 29886, 312, 3888, 29892, 805, 1125, 13, 1678, 565, 376, 16838, 29908, 297, 282, 312, 3888, 29901, 13, 4706, 396, 565, 451, 925, 2599, 6425, 3317, 13, 4706, 565, 805, 1405, 29871, 29941, 29896, 29896, 29901, 13, 9651, 14770, 29889, 1491, 5317, 29898, 1028, 29892, 6232, 29916, 29922, 572, 29873, 29889, 29887, 1113, 3101, 13, 4706, 1683, 29901, 13, 9651, 14770, 29889, 1491, 5317, 29898, 1028, 29897, 13, 13, 13, 1753, 903, 5317, 29918, 11082, 29886, 312, 29898, 13, 1678, 282, 312, 3888, 29892, 13, 1678, 2983, 29892, 13, 1678, 5153, 29892, 13, 1678, 437, 6897, 3317, 29892, 13, 1678, 10422, 29892, 13, 1678, 2320, 29886, 312, 29918, 6768, 29892, 13, 1678, 671, 29918, 3881, 29892, 13, 1678, 4236, 29882, 7707, 29892, 13, 1678, 1375, 29882, 7707, 29892, 13, 1678, 633, 3844, 29882, 7707, 29892, 13, 1678, 1510, 29918, 1003, 1973, 29892, 13, 1678, 19932, 29918, 2680, 29918, 5085, 29892, 13, 1125, 13, 1678, 282, 3257, 353, 285, 29908, 29912, 14273, 29913, 448, 8620, 930, 422, 20941, 7186, 19975, 4279, 29908, 13, 1678, 921, 29880, 353, 285, 29908, 29912, 7039, 29961, 29896, 12258, 19975, 4279, 29908, 13, 1678, 343, 29880, 353, 285, 29908, 29995, 360, 2593, 310, 426, 7039, 29961, 29900, 12258, 7186, 426, 7039, 29961, 29896, 29962, 5038, 13, 1678, 903, 4532, 29918, 265, 703, 19095, 29886, 312, 448, 376, 718, 5153, 29892, 437, 6897, 3317, 29892, 1510, 29918, 1003, 1973, 29897, 13, 1678, 1018, 29901, 13, 4706, 363, 301, 2204, 29892, 298, 7707, 29892, 805, 29892, 338, 3317, 297, 313, 13, 9651, 4852, 16838, 613, 4236, 29882, 7707, 29892, 29871, 29941, 29896, 29896, 29892, 5852, 511, 13, 9651, 4852, 23521, 613, 1375, 29882, 7707, 29892, 29871, 29941, 29896, 29906, 29892, 7700, 511, 13, 9651, 4852, 314, 29916, 613, 633, 3844, 29882, 7707, 29892, 29871, 29941, 29896, 29941, 29892, 5852, 511, 13, 308, 1125, 13, 9651, 903, 15287, 29918, 1491, 5317, 29898, 29886, 312, 3888, 29892, 805, 29897, 13, 9651, 565, 301, 2204, 297, 282, 312, 3888, 29901, 13, 18884, 565, 671, 29918, 3881, 29901, 13, 462, 1678, 2143, 353, 282, 312, 3888, 3366, 314, 29916, 3108, 3366, 11082, 3108, 29961, 29896, 29962, 13, 18884, 1683, 29901, 13, 462, 1678, 2143, 353, 6213, 13, 18884, 2320, 29886, 312, 29898, 13, 462, 1678, 282, 312, 3888, 29961, 26648, 29962, 3366, 11082, 3108, 29961, 29900, 1402, 13, 462, 1678, 282, 312, 3888, 29961, 26648, 29962, 3366, 11082, 3108, 29961, 29896, 1402, 13, 462, 1678, 9897, 29922, 999, 29892, 13, 462, 1678, 338, 3317, 29922, 275, 3317, 29892, 13, 462, 1678, 4175, 791, 29922, 29886, 312, 3888, 29961, 26648, 29962, 3366, 11082, 1777, 29873, 12436, 13, 462, 1678, 3579, 11082, 29886, 312, 29918, 6768, 29892, 13, 18884, 1723, 13, 18884, 14770, 29889, 3257, 29898, 415, 1740, 29889, 4830, 29898, 29882, 7707, 876, 13, 18884, 14770, 29889, 29916, 1643, 29898, 15524, 29897, 13, 18884, 14770, 29889, 29891, 1643, 29898, 2904, 29897, 13, 9651, 14770, 29889, 7720, 29898, 5574, 29897, 13, 4706, 14770, 29889, 29873, 523, 29918, 2680, 29898, 1068, 29873, 523, 29918, 2680, 29918, 5085, 29897, 13, 4706, 565, 338, 8758, 29898, 9507, 29892, 851, 1125, 13, 9651, 14770, 29889, 7620, 1003, 29898, 9507, 718, 11393, 11082, 29886, 312, 29889, 2732, 1159, 13, 1678, 7146, 29901, 13, 4706, 903, 4532, 29918, 2696, 29898, 4294, 29918, 1003, 1973, 29897, 13, 13, 13, 1753, 903, 5317, 29918, 29882, 391, 13342, 29898, 13, 1678, 282, 312, 3888, 29892, 13, 1678, 2983, 29892, 13, 1678, 5153, 29892, 13, 1678, 437, 6897, 3317, 29892, 13, 1678, 10422, 29892, 13, 1678, 9825, 13342, 29918, 3742, 29892, 13, 1678, 4236, 29882, 7707, 29892, 13, 1678, 1375, 29882, 7707, 29892, 13, 1678, 633, 3844, 29882, 7707, 29892, 13, 1678, 1510, 29918, 1003, 1973, 29892, 13, 1678, 19932, 29918, 2680, 29918, 5085, 29892, 13, 1125, 13, 1678, 282, 3257, 353, 285, 29908, 29912, 14273, 29913, 448, 8620, 930, 422, 20941, 15179, 13342, 29908, 13, 1678, 921, 29880, 353, 285, 29908, 29995, 360, 2593, 310, 426, 7039, 29961, 29900, 12258, 7186, 426, 7039, 29961, 29896, 29962, 5038, 13, 1678, 343, 29880, 353, 376, 27933, 16117, 26841, 313, 29995, 5513, 13, 1678, 903, 4532, 29918, 265, 703, 29950, 391, 13342, 448, 376, 718, 5153, 29892, 437, 6897, 3317, 29892, 1510, 29918, 1003, 1973, 29897, 13, 1678, 1018, 29901, 13, 4706, 363, 301, 2204, 29892, 298, 7707, 29892, 805, 297, 313, 13, 9651, 4852, 16838, 613, 4236, 29882, 7707, 29892, 29871, 29941, 29896, 29896, 511, 13, 9651, 4852, 23521, 613, 1375, 29882, 7707, 29892, 29871, 29941, 29896, 29906, 511, 13, 9651, 4852, 314, 29916, 613, 633, 3844, 29882, 7707, 29892, 29871, 29941, 29896, 29941, 511, 13, 308, 1125, 13, 9651, 903, 15287, 29918, 1491, 5317, 29898, 29886, 312, 3888, 29892, 805, 29897, 13, 9651, 565, 301, 2204, 297, 282, 312, 3888, 29901, 13, 18884, 2920, 353, 9825, 13342, 29918, 3742, 13, 18884, 921, 353, 282, 312, 3888, 29961, 26648, 29962, 3366, 29882, 7864, 3108, 7503, 29892, 29871, 29900, 29962, 13, 18884, 343, 353, 282, 312, 3888, 29961, 26648, 29962, 3366, 29882, 7864, 3108, 7503, 29892, 29871, 29906, 29962, 13, 18884, 11955, 353, 6796, 29890, 3108, 334, 7431, 29898, 29916, 29897, 13, 18884, 4853, 353, 6425, 29898, 29916, 29897, 13, 18884, 282, 29894, 29896, 353, 5135, 1165, 1405, 29871, 29945, 29897, 669, 313, 1165, 5277, 29871, 29896, 29900, 8106, 5464, 9171, 580, 29961, 29900, 29962, 13, 18884, 282, 29894, 29906, 353, 313, 1165, 1405, 29871, 29896, 29900, 467, 5464, 9171, 580, 29961, 29900, 29962, 13, 18884, 363, 282, 29894, 29892, 274, 297, 5135, 29886, 29894, 29896, 29892, 376, 29885, 4968, 313, 29886, 29894, 29906, 29892, 376, 29878, 5783, 29901, 13, 462, 1678, 363, 474, 297, 282, 29894, 29901, 13, 462, 4706, 11955, 29961, 29875, 29962, 353, 274, 13, 18884, 14770, 29889, 1646, 29898, 29916, 29892, 343, 29892, 2920, 29922, 2103, 29892, 2927, 29922, 27703, 29892, 7595, 543, 5064, 1159, 13, 18884, 14770, 29889, 3257, 29898, 415, 1740, 29889, 4830, 29898, 29882, 7707, 876, 13, 18884, 14770, 29889, 29916, 1643, 29898, 15524, 29897, 13, 18884, 14770, 29889, 29891, 1643, 29898, 2904, 29897, 13, 18884, 921, 353, 6425, 29898, 3317, 29898, 572, 29873, 29889, 29916, 2576, 3285, 1820, 29922, 6897, 876, 13, 18884, 565, 921, 529, 29871, 29945, 29901, 13, 462, 1678, 14770, 29889, 29916, 2576, 6278, 29945, 29892, 29871, 29945, 29897, 13, 9651, 14770, 29889, 7720, 29898, 5574, 29897, 13, 4706, 14770, 29889, 29873, 523, 29918, 2680, 29898, 1068, 29873, 523, 29918, 2680, 29918, 5085, 29897, 13, 4706, 565, 338, 8758, 29898, 9507, 29892, 851, 1125, 13, 9651, 14770, 29889, 7620, 1003, 29898, 9507, 718, 11393, 29882, 391, 13342, 29889, 2732, 1159, 13, 1678, 7146, 29901, 13, 4706, 903, 4532, 29918, 2696, 29898, 4294, 29918, 1003, 1973, 29897, 13, 13, 13, 1753, 364, 415, 29886, 312, 29896, 29898, 13, 1678, 286, 29916, 23521, 29896, 29892, 13, 1678, 286, 29916, 23521, 29906, 29892, 13, 1678, 10422, 29892, 13, 1678, 334, 29892, 13, 1678, 3611, 543, 13171, 29907, 3919, 22471, 28483, 1430, 4741, 5195, 15082, 613, 13, 1678, 2983, 29922, 703, 24313, 613, 376, 7422, 4968, 13, 1678, 5153, 29922, 8516, 29892, 13, 1678, 4175, 791, 29922, 8516, 29892, 13, 1678, 11073, 29922, 8516, 29892, 13, 1678, 10340, 29922, 8516, 29892, 13, 1678, 11455, 29886, 29894, 29922, 8516, 29892, 13, 1678, 318, 29888, 29918, 1127, 29879, 29922, 8516, 29892, 13, 1678, 671, 29918, 3881, 29922, 5574, 29892, 13, 1678, 954, 689, 29922, 8516, 29892, 13, 1678, 544, 29873, 12313, 29922, 8516, 29892, 13, 1678, 544, 29873, 12313, 29882, 29922, 8516, 29892, 13, 1678, 544, 29873, 12313, 29880, 29922, 8516, 29892, 13, 1678, 7353, 12313, 29922, 8516, 29892, 13, 1678, 7353, 12313, 29882, 29922, 8516, 29892, 13, 1678, 7353, 12313, 29880, 29922, 8516, 29892, 13, 1678, 437, 29882, 391, 13342, 29922, 5574, 29892, 13, 1678, 9825, 13342, 29918, 3742, 29922, 29896, 29889, 29900, 29892, 13, 1678, 2432, 351, 29886, 312, 29922, 5574, 29892, 13, 1678, 2320, 29886, 312, 29918, 6768, 29922, 8516, 29892, 13, 1678, 437, 6897, 3317, 29922, 8824, 29892, 13, 1678, 3273, 6897, 3317, 29922, 8824, 29892, 13, 1678, 4513, 791, 29879, 10457, 29896, 29892, 13, 1678, 696, 1332, 7707, 543, 4301, 613, 13, 1678, 553, 305, 7707, 543, 9868, 613, 13, 1678, 4236, 29882, 7707, 543, 7976, 12539, 613, 13, 1678, 1375, 29882, 7707, 543, 8140, 12539, 613, 13, 1678, 633, 3844, 29882, 7707, 543, 4920, 29879, 29899, 7976, 613, 13, 1678, 639, 3488, 10457, 29896, 29892, 13, 1678, 19932, 29918, 2680, 29918, 5085, 29922, 8516, 29892, 13, 1678, 1510, 29918, 1003, 1973, 29922, 8824, 29892, 13, 1678, 7595, 29918, 1609, 29918, 1643, 29922, 5574, 29892, 13, 1125, 13, 1678, 9995, 13, 1678, 14350, 263, 10151, 4328, 3461, 1546, 29871, 29906, 6166, 310, 4236, 29914, 1195, 848, 13, 13, 1678, 12662, 2699, 13, 1678, 448, 1378, 29899, 13, 1678, 286, 29916, 23521, 29896, 584, 29871, 29906, 29881, 1409, 29918, 4561, 470, 12545, 23335, 13, 4706, 450, 4236, 29914, 1195, 848, 304, 7252, 304, 278, 421, 16838, 23521, 29906, 29952, 731, 29889, 960, 29871, 29906, 29899, 4914, 13, 4706, 1409, 29918, 4561, 29892, 967, 4341, 526, 29901, 518, 3317, 29892, 1375, 1822, 960, 12545, 23335, 29892, 13, 4706, 372, 1818, 367, 408, 3342, 297, 584, 1990, 18078, 8353, 29918, 12191, 29952, 322, 505, 1438, 13, 4706, 5144, 29901, 13, 13, 4706, 6317, 775, 29899, 1271, 1057, 5642, 13, 13, 9651, 869, 1062, 353, 518, 3317, 29892, 1375, 29962, 13, 9651, 869, 7707, 1195, 1181, 353, 12545, 23335, 607, 756, 313, 271, 3203, 1125, 13, 1669, 869, 14273, 418, 353, 697, 1196, 6139, 310, 7663, 13, 1669, 869, 4572, 791, 353, 278, 4175, 995, 29936, 313, 4149, 421, 4572, 791, 29952, 13, 462, 9651, 6139, 2400, 29897, 13, 1669, 869, 21134, 1678, 353, 263, 1051, 310, 2342, 1980, 29936, 697, 639, 1948, 13, 1669, 869, 17281, 29886, 29894, 29871, 353, 1438, 4206, 674, 679, 525, 29876, 29914, 29874, 29915, 363, 1273, 2923, 13, 1669, 869, 348, 1169, 268, 353, 1347, 411, 10340, 13, 1669, 869, 1137, 29918, 1127, 29879, 259, 353, 25812, 13879, 13, 13, 4706, 3940, 393, 278, 10970, 421, 14273, 1673, 421, 21134, 1673, 2992, 29892, 5712, 278, 13, 4706, 1819, 2038, 29889, 13, 1678, 286, 29916, 23521, 29906, 584, 29871, 29906, 29881, 1409, 29918, 4561, 470, 12545, 23335, 13, 4706, 450, 3407, 731, 310, 4236, 29914, 1195, 848, 29889, 19191, 338, 278, 1021, 408, 13, 4706, 421, 16838, 23521, 29896, 1412, 13, 13, 4706, 6317, 4443, 1057, 13, 9651, 960, 1716, 421, 16838, 23521, 29896, 29952, 322, 421, 16838, 23521, 29906, 29952, 526, 12545, 8659, 22459, 322, 505, 13, 9651, 278, 421, 1412, 7707, 1195, 1181, 29889, 21134, 16159, 5352, 29892, 445, 26529, 674, 29892, 491, 13, 9651, 2322, 29892, 671, 278, 11073, 304, 7595, 278, 848, 6166, 363, 13, 9651, 10230, 29889, 1763, 5557, 445, 29892, 731, 278, 421, 2520, 29918, 1609, 29918, 1643, 29952, 13, 9651, 3443, 304, 7700, 29889, 13, 13, 1678, 10422, 584, 1347, 470, 934, 29918, 4561, 470, 29871, 29896, 470, 6213, 13, 4706, 20370, 263, 1024, 310, 263, 934, 29892, 470, 338, 263, 934, 29918, 4561, 1203, 408, 4133, 13, 4706, 491, 584, 9891, 18078, 3150, 29952, 470, 584, 1990, 18078, 601, 29889, 1231, 5971, 1412, 10567, 408, 6043, 29871, 29896, 304, 13, 4706, 2436, 304, 27591, 29889, 1815, 884, 367, 278, 1024, 310, 263, 3884, 470, 6213, 29936, 13, 4706, 297, 1438, 4251, 29892, 263, 14839, 338, 6496, 363, 934, 9262, 29889, 13, 1678, 3611, 584, 1347, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 18527, 363, 278, 3461, 13, 1678, 2983, 584, 1051, 29914, 23583, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 7803, 313, 12759, 29897, 6031, 2893, 9215, 278, 1023, 6166, 310, 848, 13, 1678, 5153, 584, 1347, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 319, 697, 1196, 6139, 310, 278, 1591, 29889, 6811, 24040, 13, 4706, 421, 16838, 23521, 29896, 29889, 7707, 1195, 1181, 29889, 14273, 1412, 960, 9561, 526, 1881, 29892, 13, 4706, 525, 3782, 6139, 4944, 29915, 338, 1304, 29889, 13, 1678, 4175, 791, 584, 17336, 29892, 29871, 29896, 29881, 1409, 29918, 4561, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 11848, 2596, 411, 8380, 995, 5277, 1135, 421, 4572, 791, 29952, 674, 679, 263, 13, 4706, 525, 29876, 29914, 29874, 29915, 1273, 2923, 29889, 960, 4608, 29892, 3309, 1818, 1993, 1353, 310, 4206, 297, 13, 4706, 421, 16838, 23521, 29896, 29952, 322, 421, 16838, 23521, 29906, 29952, 848, 29889, 6811, 24040, 421, 16838, 23521, 29896, 29889, 7707, 1195, 1181, 29889, 4572, 791, 1412, 13, 4706, 960, 9561, 526, 1881, 29892, 421, 4572, 791, 29952, 338, 731, 304, 29871, 29896, 29889, 29872, 29899, 29953, 29889, 13, 1678, 11073, 584, 1051, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 319, 1051, 310, 6031, 23359, 20766, 1269, 1948, 29889, 6811, 24040, 13, 4706, 421, 16838, 23521, 29896, 29889, 7707, 1195, 1181, 29889, 21134, 1412, 960, 9561, 526, 1881, 29892, 13, 4706, 4954, 1839, 4301, 29871, 29896, 3788, 4301, 29871, 29906, 742, 856, 7961, 29952, 338, 1304, 29889, 13, 1678, 10340, 584, 1347, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 12048, 11057, 278, 10340, 29889, 6811, 24040, 421, 16838, 23521, 29896, 29889, 7707, 1195, 1181, 29889, 348, 1169, 1412, 960, 13, 4706, 9561, 526, 1881, 29892, 525, 3664, 6790, 29915, 338, 1304, 29889, 13, 1678, 11455, 29886, 29894, 584, 29871, 29896, 29881, 1409, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 308, 29900, 29899, 10289, 2380, 4608, 22146, 607, 4206, 310, 421, 16838, 23521, 29896, 29952, 304, 13, 4706, 11455, 313, 19562, 679, 278, 525, 29876, 29914, 29874, 29915, 1273, 2923, 467, 6811, 24040, 13, 4706, 421, 16838, 23521, 29896, 29889, 7707, 1195, 1181, 29889, 17281, 29886, 29894, 1412, 960, 9561, 526, 1881, 29892, 694, 4206, 526, 13, 4706, 17262, 313, 3592, 421, 4572, 791, 29952, 338, 1603, 1304, 467, 13, 13, 4706, 6317, 4443, 1057, 13, 9651, 421, 17281, 29886, 29894, 29952, 16058, 334, 11083, 29930, 738, 22239, 491, 11073, 338, 13, 9651, 2309, 313, 8256, 421, 2520, 29918, 1609, 29918, 1643, 29952, 338, 5852, 29892, 607, 338, 278, 13, 9651, 2322, 467, 13, 13, 1678, 318, 29888, 29918, 1127, 29879, 584, 29871, 29896, 29881, 1409, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 853, 14082, 1017, 13879, 29901, 518, 8966, 333, 29892, 560, 6288, 29892, 7343, 29892, 2294, 1822, 13, 4706, 6811, 24040, 421, 16838, 23521, 29896, 29889, 7707, 1195, 1181, 29889, 1137, 29918, 1127, 29879, 1412, 960, 9561, 338, 1881, 29892, 13, 4706, 525, 3664, 6790, 29915, 338, 1304, 29889, 13, 1678, 671, 29918, 3881, 584, 6120, 29936, 1818, 367, 4257, 29892, 13136, 13, 4706, 960, 5852, 29892, 278, 14267, 1061, 310, 278, 1273, 2923, 22235, 363, 1716, 278, 4236, 13, 4706, 669, 1375, 363, 1269, 1948, 338, 278, 8380, 7472, 310, 278, 3407, 13, 4706, 4236, 669, 1375, 363, 393, 1948, 29889, 960, 7700, 29892, 278, 14267, 1061, 338, 278, 13, 4706, 22903, 3407, 4236, 470, 1375, 29889, 319, 4996, 1342, 3697, 2020, 13, 4706, 4954, 1509, 29918, 3881, 29922, 5574, 16159, 1795, 367, 5407, 29901, 13, 13, 4706, 6317, 775, 29899, 1271, 1057, 5642, 13, 13, 9651, 960, 518, 3317, 29896, 29892, 1375, 29896, 29962, 353, 518, 29896, 29906, 29941, 29946, 29945, 29892, 448, 29896, 29900, 29962, 322, 13, 1669, 518, 3317, 29906, 29892, 1375, 29906, 29962, 353, 518, 29896, 29906, 29941, 29900, 29900, 29892, 259, 29945, 29900, 29962, 13, 9651, 1987, 29901, 13, 1669, 1273, 2923, 353, 518, 29900, 29889, 29941, 29955, 13667, 1678, 29900, 29889, 29946, 29929, 29995, 29962, 29871, 565, 671, 29918, 3881, 338, 5852, 13, 1669, 1273, 2923, 353, 518, 29900, 29889, 29941, 29955, 13667, 29871, 29896, 29906, 29900, 29889, 29900, 29900, 29995, 29962, 29871, 565, 671, 29918, 3881, 338, 7700, 13, 13, 4706, 3940, 393, 278, 1804, 310, 278, 1273, 2923, 338, 3342, 1316, 393, 263, 13, 4706, 6374, 1273, 2923, 2794, 385, 13461, 749, 29901, 988, 4954, 3317, 29896, 1405, 4236, 29906, 16159, 470, 13, 4706, 4954, 1195, 29896, 529, 1375, 29906, 29952, 1412, 13, 13, 4706, 421, 1509, 29918, 3881, 29952, 338, 17262, 565, 421, 1867, 6897, 3317, 29952, 338, 5852, 29889, 13, 13, 1678, 954, 689, 584, 1347, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 19191, 310, 278, 4236, 669, 1375, 3694, 29889, 960, 6213, 29892, 372, 338, 731, 25106, 13, 4706, 304, 367, 29871, 29896, 29941, 22524, 9377, 322, 7111, 373, 278, 3464, 310, 3694, 304, 13, 4706, 1596, 29901, 13, 13, 965, 448, 565, 3464, 338, 376, 9278, 613, 954, 689, 2433, 25641, 29896, 29941, 29889, 24660, 10162, 988, 376, 29916, 29908, 20238, 13, 632, 515, 29871, 29900, 304, 29871, 29955, 13, 965, 448, 565, 3464, 338, 376, 16961, 613, 954, 689, 2433, 25641, 29896, 29941, 29889, 29953, 29872, 10162, 13, 13, 1678, 544, 29873, 12313, 584, 17336, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 9333, 1596, 4206, 988, 4954, 6897, 29414, 12765, 29897, 1405, 544, 29873, 12313, 29952, 1412, 1152, 1342, 29892, 304, 13, 4706, 1596, 4206, 1283, 491, 901, 1135, 29871, 29945, 13667, 671, 4954, 558, 29873, 12313, 29922, 29945, 29952, 1412, 421, 558, 29873, 12313, 29952, 13, 4706, 4893, 9399, 663, 975, 421, 558, 29873, 12313, 29882, 29952, 322, 421, 558, 29873, 12313, 29880, 1412, 13, 1678, 544, 29873, 12313, 29882, 584, 17336, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 9333, 1596, 4206, 988, 4954, 29995, 12765, 1405, 544, 29873, 12313, 29882, 29952, 1412, 5166, 29891, 363, 6445, 13, 4706, 925, 278, 13461, 2925, 29889, 421, 558, 29873, 12313, 29882, 29952, 4893, 9399, 663, 975, 13, 4706, 421, 558, 29873, 12313, 29880, 1412, 13, 1678, 544, 29873, 12313, 29880, 584, 17336, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 9333, 1596, 4206, 988, 4954, 29995, 12765, 529, 544, 29873, 12313, 29880, 29952, 1412, 5166, 29891, 363, 6445, 13, 4706, 988, 3407, 4206, 526, 6133, 29889, 13, 1678, 7353, 12313, 584, 17336, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 28697, 1273, 2923, 29879, 988, 4954, 6897, 29414, 12765, 29897, 1405, 7353, 12313, 29952, 1412, 13976, 2788, 304, 13, 4706, 421, 558, 29873, 12313, 1412, 450, 7353, 338, 385, 263, 2475, 3873, 3070, 467, 13, 1678, 7353, 12313, 29882, 584, 17336, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 28697, 1273, 2923, 29879, 988, 4954, 29995, 12765, 1405, 7353, 12313, 29882, 29952, 1412, 13976, 2788, 304, 13, 4706, 421, 558, 29873, 12313, 29882, 1412, 5166, 29891, 363, 7353, 3460, 13461, 2925, 29889, 421, 15581, 12313, 29882, 29952, 4893, 13, 4706, 9399, 663, 975, 421, 15581, 12313, 29880, 1412, 13, 1678, 7353, 12313, 29880, 584, 17336, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 28697, 1273, 2923, 29879, 988, 4954, 29995, 12765, 529, 7353, 12313, 29880, 29952, 1412, 13976, 2788, 304, 13, 4706, 421, 558, 29873, 12313, 29880, 1412, 13, 1678, 437, 29882, 391, 13342, 584, 6120, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 960, 5852, 29892, 6492, 278, 9825, 468, 25402, 29889, 1858, 1862, 674, 367, 3971, 304, 13, 4706, 29724, 9507, 1412, 29882, 391, 13342, 29889, 2732, 1642, 13, 1678, 9825, 13342, 29918, 3742, 584, 17336, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 450, 9825, 13342, 11924, 29936, 21274, 304, 29871, 29896, 29889, 29900, 313, 1454, 29871, 29896, 28003, 13, 1678, 2432, 351, 29886, 312, 584, 6120, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 960, 5852, 29892, 6492, 278, 10151, 12651, 23797, 18497, 3025, 13, 4706, 584, 9891, 18078, 11082, 29886, 312, 1412, 1858, 1862, 674, 367, 3971, 304, 13, 4706, 29724, 9507, 1412, 11082, 29886, 312, 29889, 2732, 1642, 19916, 292, 363, 278, 376, 11082, 29886, 312, 29908, 6492, 338, 13, 4706, 20704, 491, 278, 4954, 11082, 29886, 312, 29918, 6768, 1839, 4572, 791, 2033, 16159, 322, 13, 4706, 4954, 11082, 29886, 312, 29918, 6768, 1839, 11967, 1188, 29891, 2033, 16159, 3987, 29889, 2648, 2322, 29892, 599, 10151, 13, 4706, 12651, 526, 4318, 29892, 541, 278, 7200, 1819, 313, 5753, 3278, 304, 278, 13, 4706, 421, 4572, 791, 29952, 4175, 29897, 526, 19310, 1891, 491, 773, 263, 12849, 5608, 29914, 1188, 13, 4706, 343, 29899, 8990, 29889, 450, 10151, 12651, 363, 278, 421, 17281, 29886, 29894, 29952, 4206, 526, 13, 4706, 451, 715, 15048, 29889, 13, 1678, 2320, 29886, 312, 29918, 6768, 584, 6213, 470, 9657, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 960, 6213, 29892, 372, 338, 25106, 10092, 304, 1057, 13, 13, 9651, 2320, 29886, 312, 29918, 6768, 353, 11117, 4572, 791, 2396, 525, 4572, 791, 10827, 13, 13, 4706, 4803, 445, 3443, 304, 3867, 738, 3987, 304, 584, 9891, 18078, 11082, 29886, 312, 29952, 13, 4706, 541, 4443, 393, 278, 421, 4572, 791, 29952, 2984, 363, 584, 9891, 18078, 11082, 29886, 312, 29952, 338, 13, 4706, 14914, 961, 5584, 29889, 2266, 29892, 297, 6124, 304, 738, 310, 278, 1819, 393, 13, 4706, 584, 9891, 18078, 11082, 29886, 312, 29952, 21486, 29892, 372, 508, 884, 367, 731, 304, 278, 1347, 13, 4706, 376, 4572, 791, 29908, 408, 297, 278, 2322, 1206, 4318, 2038, 29889, 512, 393, 1206, 29892, 13, 4706, 4954, 11082, 29886, 312, 29918, 6768, 1839, 4572, 791, 2033, 16159, 4947, 25106, 10092, 304, 278, 13, 4706, 2847, 995, 310, 421, 4572, 791, 29952, 313, 4716, 338, 6213, 491, 2322, 467, 13, 13, 4706, 6317, 4443, 1057, 13, 9651, 450, 1246, 304, 584, 9891, 18078, 11082, 29886, 312, 29952, 338, 334, 7045, 29930, 15399, 421, 17281, 29886, 29894, 29952, 13, 9651, 322, 2599, 738, 848, 7595, 292, 491, 11073, 29889, 13, 13, 4706, 6317, 4443, 1057, 13, 965, 450, 1023, 4175, 995, 3987, 6695, 4572, 791, 29952, 322, 13, 965, 4954, 11082, 29886, 312, 29918, 6768, 1839, 4572, 791, 2033, 29952, 6348, 505, 1422, 21274, 29901, 13, 965, 6213, 322, 525, 4572, 791, 1673, 8307, 29889, 2688, 884, 1163, 373, 920, 13, 965, 278, 4954, 8516, 16159, 4444, 338, 1304, 29901, 363, 421, 4572, 791, 1673, 6213, 338, 13, 965, 8611, 491, 29871, 29896, 29889, 29872, 29899, 29953, 1550, 363, 421, 11082, 29886, 312, 29918, 4572, 791, 1673, 6213, 2794, 13, 965, 393, 278, 376, 11082, 29886, 312, 29908, 6492, 674, 451, 505, 738, 18094, 7436, 472, 13, 965, 599, 29889, 13, 13, 4706, 6317, 4443, 1057, 13, 9651, 450, 2038, 2794, 393, 29892, 565, 366, 3544, 278, 2322, 1819, 363, 13, 9651, 421, 4572, 791, 29952, 322, 363, 4954, 11082, 29886, 312, 29918, 6768, 1839, 4572, 791, 2033, 29952, 1673, 769, 13, 9651, 6131, 322, 278, 9825, 13342, 24580, 674, 671, 263, 421, 4572, 791, 29952, 310, 13, 632, 29896, 29889, 29872, 29899, 29953, 1550, 278, 376, 11082, 29886, 312, 29908, 24580, 674, 671, 694, 4175, 313, 277, 13, 9651, 752, 5114, 4129, 5174, 4922, 24786, 467, 13, 13, 1678, 437, 6897, 3317, 584, 6120, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 960, 5852, 29892, 7252, 871, 8380, 5256, 6762, 29889, 13, 1678, 3273, 6897, 3317, 584, 6120, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 960, 5852, 29892, 731, 4954, 1867, 6897, 3317, 29922, 5574, 16159, 322, 437, 451, 1596, 278, 4236, 29896, 322, 13, 4706, 1375, 29896, 4341, 29889, 13, 1678, 4513, 791, 29879, 584, 6043, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 21595, 4236, 669, 1375, 3694, 472, 6790, 13677, 29889, 960, 8178, 29892, 694, 13, 4706, 4513, 292, 29889, 13, 1678, 696, 1332, 7707, 584, 1347, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 19345, 363, 1948, 1353, 1897, 13, 1678, 553, 305, 7707, 584, 1347, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 19345, 363, 6139, 1897, 13, 1678, 4236, 29882, 7707, 584, 1347, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 19345, 363, 278, 1897, 29871, 29896, 848, 13, 1678, 1375, 29882, 7707, 584, 1347, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 19345, 363, 278, 1897, 29871, 29906, 848, 13, 1678, 633, 3844, 29882, 7707, 584, 1347, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 19345, 363, 6425, 29899, 3317, 1897, 13, 1678, 639, 3488, 584, 6043, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 450, 1353, 310, 3454, 304, 2436, 639, 3488, 29889, 960, 529, 29871, 29896, 29892, 727, 338, 694, 13, 4706, 4046, 313, 650, 1813, 467, 13, 1678, 19932, 29918, 2680, 29918, 5085, 584, 9657, 470, 6213, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 11842, 9331, 363, 584, 9891, 18078, 2922, 17357, 29889, 2272, 5317, 29889, 29873, 523, 29918, 2680, 1412, 960, 6213, 29892, 13, 4706, 21274, 304, 4954, 10998, 8305, 2396, 29871, 29941, 29889, 29900, 10114, 1412, 13, 1678, 1510, 29918, 1003, 1973, 584, 6120, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 960, 5852, 29892, 6492, 13994, 674, 367, 8833, 373, 278, 4315, 363, 13, 4706, 28923, 1776, 292, 29889, 24412, 29901, 727, 1122, 367, 1784, 13994, 29889, 13, 1678, 7595, 29918, 1609, 29918, 1643, 584, 6120, 29936, 1818, 367, 4257, 29936, 13136, 13, 4706, 960, 5852, 29892, 671, 11073, 304, 7595, 278, 1023, 6166, 310, 848, 363, 13, 4706, 10230, 29889, 2823, 4443, 2038, 1090, 278, 421, 16838, 23521, 29906, 29952, 2984, 29889, 13, 13, 1678, 16969, 13, 1678, 448, 22158, 13, 1678, 10518, 2593, 29918, 3888, 584, 9657, 13, 4706, 13343, 411, 525, 314, 29916, 29915, 313, 6897, 29899, 3317, 511, 525, 16838, 29915, 313, 3317, 511, 322, 525, 23521, 29915, 6611, 29901, 13, 13, 4706, 6317, 775, 29899, 1271, 1057, 5642, 13, 13, 9651, 529, 1990, 525, 8977, 11041, 29961, 29876, 29922, 29941, 29962, 13, 18884, 525, 314, 29916, 2396, 529, 1990, 525, 8977, 11041, 29961, 29876, 29922, 29945, 29962, 13, 462, 1678, 525, 29882, 7864, 29915, 584, 5785, 29953, 29946, 29871, 299, 2378, 29871, 29941, 29941, 4552, 1516, 29901, 313, 29896, 29896, 29892, 29871, 29941, 29897, 13, 462, 1678, 525, 11082, 29915, 29871, 584, 518, 29876, 29922, 29906, 5387, 313, 7411, 29953, 29946, 29871, 299, 2378, 29901, 313, 29896, 29900, 29900, 29892, 511, 2023, 13, 462, 1678, 525, 29886, 312, 29915, 29871, 584, 5785, 29953, 29946, 29871, 299, 2378, 29871, 29896, 29900, 29900, 4552, 1516, 29901, 313, 29896, 29900, 29900, 29892, 29897, 13, 462, 1678, 525, 558, 9392, 29894, 2396, 6120, 29871, 299, 2378, 29871, 29896, 29900, 29900, 4552, 1516, 29901, 313, 29896, 29900, 29900, 29892, 29897, 13, 462, 1678, 525, 1028, 312, 29915, 584, 518, 29876, 29922, 29896, 29900, 29900, 5387, 6024, 29871, 448, 29906, 29889, 29946, 29953, 742, 525, 29871, 448, 29896, 29889, 29945, 29900, 742, 2023, 13, 18884, 525, 23521, 29915, 584, 529, 1990, 525, 8977, 11041, 29961, 29876, 29922, 29945, 29962, 13, 462, 1678, 525, 29882, 7864, 29915, 584, 5785, 29953, 29946, 29871, 299, 2378, 29871, 29941, 29941, 4552, 1516, 29901, 313, 29896, 29896, 29892, 29871, 29941, 29897, 13, 462, 1678, 525, 11082, 29915, 29871, 584, 518, 29876, 29922, 29906, 5387, 313, 7411, 29953, 29946, 29871, 299, 2378, 29901, 313, 29896, 29900, 29900, 29892, 511, 2023, 13, 462, 1678, 525, 29886, 312, 29915, 29871, 584, 5785, 29953, 29946, 29871, 299, 2378, 29871, 29896, 29900, 29900, 4552, 1516, 29901, 313, 29896, 29900, 29900, 29892, 29897, 13, 462, 1678, 525, 558, 9392, 29894, 2396, 6120, 29871, 299, 2378, 29871, 29896, 29900, 29900, 4552, 1516, 29901, 313, 29896, 29900, 29900, 29892, 29897, 13, 462, 1678, 525, 1028, 312, 29915, 584, 518, 29876, 29922, 29896, 29900, 29900, 5387, 6024, 1678, 29896, 29889, 29945, 29945, 742, 525, 1678, 29896, 29889, 29945, 29941, 742, 2023, 13, 18884, 525, 16838, 29915, 584, 529, 1990, 525, 8977, 11041, 29961, 29876, 29922, 29945, 29962, 13, 462, 1678, 525, 29882, 7864, 29915, 584, 5785, 29953, 29946, 29871, 299, 2378, 29871, 29906, 29955, 4552, 1516, 29901, 313, 29929, 29892, 29871, 29941, 29897, 13, 462, 1678, 525, 11082, 29915, 29871, 584, 518, 29876, 29922, 29906, 5387, 313, 7411, 29953, 29946, 29871, 299, 2378, 29901, 313, 29896, 29900, 29900, 29892, 511, 2023, 13, 462, 1678, 525, 29886, 312, 29915, 29871, 584, 5785, 29953, 29946, 29871, 299, 2378, 29871, 29896, 29900, 29900, 4552, 1516, 29901, 313, 29896, 29900, 29900, 29892, 29897, 13, 462, 1678, 525, 558, 9392, 29894, 2396, 6120, 29871, 299, 2378, 29871, 29896, 29900, 29900, 4552, 1516, 29901, 313, 29896, 29900, 29900, 29892, 29897, 13, 462, 1678, 525, 1028, 312, 29915, 584, 518, 29876, 29922, 29896, 29900, 29900, 5387, 6024, 29871, 448, 29906, 29889, 29946, 29953, 742, 525, 29871, 448, 29896, 29889, 29945, 29900, 742, 2023, 13, 13, 4706, 6804, 29901, 13, 13, 4706, 6317, 775, 29899, 1271, 1057, 5642, 13, 13, 9651, 525, 29882, 7864, 29915, 29871, 584, 1962, 310, 584, 9891, 18078, 29882, 391, 13342, 6998, 518, 5064, 29892, 2302, 29892, 1273, 29962, 13, 9651, 525, 11082, 29915, 259, 584, 10970, 304, 584, 9891, 18078, 11082, 29886, 312, 29952, 13, 9651, 525, 29886, 312, 29915, 259, 584, 10151, 12651, 13, 9651, 525, 558, 9392, 29894, 29915, 584, 4206, 304, 1596, 8877, 4608, 13, 9651, 525, 1028, 312, 29915, 29871, 584, 1347, 1873, 310, 525, 29886, 312, 29915, 13, 13, 1678, 1222, 9422, 13, 1678, 448, 26589, 13, 1678, 8653, 1053, 12655, 408, 7442, 13, 1678, 8653, 515, 282, 8071, 16577, 1053, 3711, 13, 1678, 8653, 1294, 29896, 353, 5519, 29896, 29906, 29900, 29889, 29900, 29892, 448, 29947, 29889, 29900, 1402, 13, 1678, 2023, 308, 518, 29947, 29889, 29900, 29892, 448, 29896, 29906, 29900, 29889, 29900, 5262, 13, 1678, 8653, 1294, 29906, 353, 5519, 29896, 29896, 29945, 29889, 29900, 29892, 448, 29945, 29889, 29900, 1402, 13, 1678, 2023, 308, 518, 29896, 29900, 29889, 29900, 29892, 448, 29896, 29906, 29945, 29889, 29900, 5262, 13, 13, 1678, 7525, 584, 9891, 18078, 29878, 415, 29886, 312, 29896, 29952, 2999, 3064, 304, 679, 263, 901, 4866, 7623, 13, 1678, 310, 599, 278, 1962, 313, 1552, 1591, 338, 1407, 9377, 467, 3115, 29892, 278, 24580, 674, 13, 1678, 367, 6077, 1283, 363, 445, 1342, 29889, 13, 13, 1678, 3824, 29892, 278, 4839, 29901, 13, 13, 1678, 8653, 29111, 353, 11117, 3129, 351, 29886, 312, 2396, 7700, 29892, 525, 29881, 1148, 391, 13342, 2396, 7700, 29913, 13, 1678, 8653, 270, 312, 353, 3711, 29889, 29878, 415, 29886, 312, 29896, 29898, 1062, 29896, 29892, 1294, 29906, 29892, 29871, 29896, 29892, 3579, 25707, 29897, 29871, 396, 437, 312, 342, 29901, 718, 29923, 2208, 5690, 29903, 3235, 13, 1678, 349, 1001, 29907, 3919, 22471, 28483, 1430, 4741, 5195, 15082, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 1678, 12953, 29901, 1939, 6139, 4944, 13, 1678, 853, 14082, 1017, 29901, 2216, 6790, 13, 1678, 28386, 29901, 539, 2216, 6790, 13, 1678, 19916, 29901, 539, 29896, 29872, 29899, 29900, 29953, 13, 1678, 8695, 29901, 539, 1273, 360, 2593, 353, 718, 24028, 6425, 29898, 24313, 29899, 7422, 6802, 3317, 29898, 6897, 29898, 7422, 856, 13, 462, 9954, 731, 1316, 393, 6374, 1273, 12651, 12266, 856, 13, 1678, 4712, 29901, 4706, 2023, 13, 1678, 2023, 13, 13, 1678, 1987, 29892, 278, 4236, 29914, 1195, 29914, 6897, 3317, 10151, 4328, 1591, 297, 29871, 29941, 5717, 29901, 13, 13, 1678, 8653, 270, 312, 353, 3711, 29889, 29878, 415, 29886, 312, 29896, 29898, 1062, 29896, 29892, 1294, 29906, 29892, 29871, 29896, 29892, 3579, 25707, 29897, 29871, 396, 437, 312, 342, 29901, 718, 29923, 2208, 5690, 29903, 3235, 13, 1678, 349, 1001, 29907, 3919, 22471, 28483, 1430, 4741, 5195, 15082, 13, 1678, 2023, 13, 462, 462, 21782, 4706, 12105, 632, 2023, 13, 418, 11438, 1678, 12953, 539, 5918, 12539, 4706, 5918, 12539, 418, 1273, 360, 2593, 29871, 2023, 13, 1678, 448, 22158, 29871, 448, 28400, 1678, 448, 9072, 29871, 448, 9072, 29871, 448, 22158, 29871, 2023, 13, 965, 29896, 29871, 11438, 539, 29896, 3986, 29896, 29906, 29900, 29889, 29900, 29900, 29900, 29900, 29900, 539, 29896, 29896, 29945, 29889, 29900, 29900, 29900, 29900, 29900, 418, 29946, 29889, 29941, 29945, 29871, 2023, 13, 965, 29906, 29871, 11438, 539, 29906, 9651, 29947, 29889, 29900, 29900, 29900, 29900, 29900, 4706, 29896, 29900, 29889, 29900, 29900, 29900, 29900, 29900, 1678, 448, 29896, 29889, 29953, 29900, 29871, 2023, 13, 1678, 2023, 13, 1678, 8653, 270, 312, 353, 3711, 29889, 29878, 415, 29886, 312, 29896, 29898, 1062, 29896, 29892, 1294, 29906, 29892, 29871, 29896, 29892, 3579, 25707, 29897, 29871, 396, 437, 312, 342, 29901, 718, 29923, 2208, 5690, 29903, 3235, 13, 1678, 349, 1001, 29907, 3919, 22471, 28483, 1430, 4741, 5195, 15082, 13, 1678, 2023, 13, 462, 308, 2023, 268, 21782, 4706, 12105, 632, 2023, 13, 418, 11438, 1678, 12953, 2023, 259, 3080, 12539, 4706, 3080, 12539, 418, 1273, 360, 2593, 29871, 2023, 13, 1678, 448, 22158, 29871, 448, 28400, 2023, 9072, 29899, 29871, 448, 9072, 29871, 448, 22158, 29871, 2023, 13, 965, 29896, 29871, 11438, 539, 29896, 29871, 2023, 268, 448, 29947, 29889, 29900, 29900, 29900, 29900, 29900, 539, 448, 29945, 29889, 29900, 29900, 29900, 29900, 29900, 418, 29906, 29889, 29953, 29896, 29871, 2023, 13, 965, 29906, 29871, 11438, 539, 29906, 29871, 2023, 259, 448, 29896, 29906, 29900, 29889, 29900, 29900, 29900, 29900, 29900, 268, 448, 29896, 29906, 29945, 29889, 29900, 29900, 29900, 29900, 29900, 1678, 448, 29946, 29889, 29900, 29900, 29871, 2023, 13, 1678, 2023, 13, 1678, 8653, 270, 312, 353, 3711, 29889, 29878, 415, 29886, 312, 29896, 29898, 1062, 29896, 29892, 1294, 29906, 29892, 29871, 29896, 29892, 3579, 25707, 29897, 29871, 396, 437, 312, 342, 29901, 718, 29923, 2208, 5690, 29903, 3235, 13, 1678, 349, 1001, 29907, 3919, 22471, 28483, 1430, 4741, 5195, 15082, 13, 1678, 2023, 13, 462, 308, 2023, 268, 21782, 4706, 12105, 13, 418, 11438, 1678, 12953, 2023, 259, 24650, 29899, 7976, 4706, 24650, 29899, 7976, 418, 1273, 360, 2593, 13, 1678, 448, 22158, 29871, 448, 28400, 2023, 9072, 29899, 29871, 448, 9072, 29871, 448, 22158, 13, 965, 29896, 29871, 11438, 539, 29896, 29871, 2023, 268, 29896, 29906, 29900, 29889, 29900, 29900, 29900, 29900, 29900, 539, 29896, 29896, 29945, 29889, 29900, 29900, 29900, 29900, 29900, 418, 29946, 29889, 29941, 29945, 13, 965, 29906, 29871, 11438, 539, 29906, 29871, 2023, 268, 29896, 29906, 29900, 29889, 29900, 29900, 29900, 29900, 29900, 539, 29896, 29906, 29945, 29889, 29900, 29900, 29900, 29900, 29900, 1678, 448, 29946, 29889, 29900, 29900, 13, 1678, 2023, 13, 13, 1678, 9788, 29892, 278, 9825, 13342, 19138, 583, 29901, 13, 13, 1678, 8653, 270, 312, 353, 3711, 29889, 29878, 415, 29886, 312, 29896, 29898, 1062, 29896, 29892, 1294, 29906, 29892, 29871, 29896, 29892, 3579, 25707, 29897, 29871, 396, 437, 312, 342, 29901, 718, 29923, 2208, 5690, 29903, 3235, 13, 1678, 349, 1001, 29907, 3919, 22471, 28483, 1430, 4741, 5195, 15082, 13, 1678, 2023, 13, 4706, 1939, 6139, 4944, 448, 5918, 12539, 422, 20941, 15179, 13342, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 3986, 1273, 360, 2593, 418, 3917, 1678, 2431, 1760, 13, 308, 448, 26589, 259, 448, 26589, 259, 448, 22158, 13, 9651, 448, 29906, 29889, 29900, 29900, 965, 29896, 418, 29945, 29900, 29889, 29900, 29900, 13, 795, 29946, 29889, 29900, 29900, 965, 29896, 418, 29945, 29900, 29889, 29900, 29900, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 308, 29900, 29889, 29900, 29995, 310, 1819, 526, 2629, 29871, 29896, 29995, 13, 308, 29945, 29900, 29889, 29900, 29995, 310, 1819, 526, 2629, 29871, 29906, 29995, 13, 308, 29896, 29900, 29900, 29889, 29900, 29995, 310, 1819, 526, 2629, 29871, 29945, 29995, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 4706, 1273, 360, 2593, 27098, 29901, 518, 8140, 29892, 5918, 29892, 16316, 29892, 624, 29881, 16618, 29962, 353, 21069, 29896, 29889, 29953, 29900, 29892, 29871, 29946, 29889, 29941, 29945, 29892, 856, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 4706, 1939, 6139, 4944, 448, 3080, 12539, 422, 20941, 15179, 13342, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 3986, 1273, 360, 2593, 418, 3917, 1678, 2431, 1760, 13, 308, 448, 26589, 259, 448, 26589, 259, 448, 22158, 13, 9651, 448, 29946, 29889, 29900, 29900, 965, 29896, 418, 29945, 29900, 29889, 29900, 29900, 13, 795, 29941, 29889, 29900, 29900, 965, 29896, 418, 29945, 29900, 29889, 29900, 29900, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 308, 29900, 29889, 29900, 29995, 310, 1819, 526, 2629, 29871, 29896, 29995, 13, 308, 29896, 29900, 29900, 29889, 29900, 29995, 310, 1819, 526, 2629, 29871, 29945, 29995, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 4706, 1273, 360, 2593, 27098, 29901, 518, 8140, 29892, 5918, 29892, 16316, 29892, 624, 29881, 16618, 29962, 353, 21069, 29946, 29889, 29900, 29900, 29892, 29871, 29906, 29889, 29953, 29896, 29892, 856, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 4706, 1939, 6139, 4944, 448, 24650, 29899, 7976, 422, 20941, 15179, 13342, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 3986, 1273, 360, 2593, 418, 3917, 1678, 2431, 1760, 13, 308, 448, 26589, 259, 448, 26589, 259, 448, 22158, 13, 9651, 448, 29946, 29889, 29900, 29900, 965, 29896, 418, 29945, 29900, 29889, 29900, 29900, 13, 795, 29946, 29889, 29900, 29900, 965, 29896, 418, 29945, 29900, 29889, 29900, 29900, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 308, 29900, 29889, 29900, 29995, 310, 1819, 526, 2629, 29871, 29896, 29995, 13, 308, 29896, 29900, 29900, 29889, 29900, 29995, 310, 1819, 526, 2629, 29871, 29945, 29995, 13, 1678, 529, 13367, 2190, 29968, 18521, 29958, 13, 4706, 1273, 360, 2593, 27098, 29901, 518, 8140, 29892, 5918, 29892, 16316, 29892, 624, 29881, 16618, 29962, 353, 21069, 29946, 29889, 29900, 29900, 29892, 29871, 29946, 29889, 29941, 29945, 29892, 856, 13, 1678, 9995, 13, 1678, 565, 19932, 29918, 2680, 29918, 5085, 338, 6213, 29901, 13, 4706, 19932, 29918, 2680, 29918, 5085, 353, 8853, 8305, 1115, 29871, 29941, 29889, 29900, 29913, 13, 13, 1678, 565, 2320, 29886, 312, 29918, 6768, 338, 6213, 29901, 13, 4706, 2320, 29886, 312, 29918, 6768, 353, 8853, 4572, 791, 1115, 376, 4572, 791, 9092, 13, 1678, 1683, 29901, 13, 4706, 2320, 29886, 312, 29918, 6768, 353, 2320, 29886, 312, 29918, 6768, 29889, 8552, 580, 13, 13, 1678, 396, 2320, 29886, 312, 29918, 6768, 1839, 4572, 791, 2033, 679, 4266, 14502, 29901, 13, 1678, 2320, 29886, 312, 29918, 4572, 791, 353, 2320, 29886, 312, 29918, 6768, 3366, 4572, 791, 3108, 13, 1678, 628, 2320, 29886, 312, 29918, 6768, 3366, 4572, 791, 3108, 13, 13, 1678, 565, 338, 8758, 29898, 11082, 29886, 312, 29918, 4572, 791, 29892, 851, 1125, 13, 4706, 565, 2320, 29886, 312, 29918, 4572, 791, 2804, 376, 4572, 791, 1115, 13, 9651, 12020, 7865, 2392, 29898, 13, 18884, 376, 16159, 11082, 29886, 312, 29918, 6768, 1839, 4572, 791, 2033, 16159, 338, 385, 8340, 376, 13, 18884, 285, 29908, 1807, 29901, 426, 11082, 29886, 312, 29918, 4572, 791, 29991, 29878, 29913, 313, 3068, 871, 376, 13, 18884, 376, 915, 525, 4572, 791, 29915, 565, 263, 1347, 5513, 13, 9651, 1723, 13, 4706, 396, 3509, 278, 2847, 421, 4572, 791, 29952, 4444, 29901, 13, 4706, 2320, 29886, 312, 29918, 4572, 791, 353, 4175, 791, 13, 13, 1678, 3041, 586, 1503, 353, 313, 13, 4706, 376, 14273, 613, 13, 4706, 376, 4572, 791, 613, 13, 4706, 376, 11082, 29886, 312, 29918, 4572, 791, 613, 13, 4706, 376, 21134, 613, 13, 4706, 376, 348, 1169, 613, 13, 4706, 376, 17281, 29886, 29894, 613, 13, 4706, 376, 1137, 29918, 1127, 29879, 613, 13, 1678, 1723, 13, 1678, 270, 312, 353, 1180, 1338, 580, 13, 1678, 3041, 397, 312, 353, 426, 29876, 29901, 270, 312, 29961, 29876, 29962, 363, 302, 297, 3041, 586, 1503, 29913, 13, 1678, 628, 270, 312, 13, 13, 1678, 396, 1423, 286, 29916, 23521, 29896, 29901, 13, 1678, 565, 338, 8758, 29898, 16838, 23521, 29896, 29892, 12545, 23335, 1125, 13, 4706, 269, 1983, 353, 286, 29916, 23521, 29896, 29889, 7707, 1195, 1181, 13, 4706, 363, 1820, 29892, 995, 297, 3041, 397, 312, 29889, 7076, 7295, 13, 9651, 565, 995, 338, 6213, 29901, 13, 18884, 3041, 397, 312, 29961, 1989, 29962, 353, 679, 5552, 29898, 29879, 1983, 29892, 1820, 29892, 6213, 29897, 13, 4706, 628, 269, 1983, 13, 4706, 286, 29916, 23521, 29896, 353, 286, 29916, 23521, 29896, 29889, 1062, 13, 1678, 1683, 29901, 13, 4706, 286, 29916, 23521, 29896, 353, 7442, 29889, 271, 280, 579, 29918, 29906, 29881, 29898, 16838, 23521, 29896, 29897, 13, 1678, 1948, 29918, 4537, 353, 7442, 29889, 279, 927, 29898, 29896, 29892, 286, 29916, 23521, 29896, 29889, 12181, 29961, 29900, 29962, 718, 29871, 29896, 29897, 13, 13, 1678, 396, 1423, 286, 29916, 23521, 29906, 29901, 13, 1678, 565, 338, 8758, 29898, 16838, 23521, 29906, 29892, 12545, 23335, 29897, 322, 679, 5552, 29898, 16838, 23521, 29906, 29892, 376, 7707, 1195, 1181, 613, 6213, 1125, 13, 4706, 11073, 29906, 353, 286, 29916, 23521, 29906, 29889, 7707, 1195, 1181, 29889, 21134, 13, 4706, 286, 29916, 23521, 29906, 353, 286, 29916, 23521, 29906, 29889, 1062, 13, 4706, 565, 7595, 29918, 1609, 29918, 1643, 29901, 13, 9651, 396, 671, 11073, 322, 11073, 29906, 304, 7595, 848, 29936, 445, 338, 297, 1206, 13, 9651, 396, 278, 1023, 6166, 310, 2582, 9792, 777, 310, 278, 1021, 4452, 29892, 13, 9651, 396, 541, 451, 599, 13, 9651, 286, 29916, 23521, 29896, 29892, 286, 29916, 23521, 29906, 29892, 1948, 29918, 4537, 353, 903, 2520, 29918, 16838, 23521, 29898, 13, 18884, 286, 29916, 23521, 29896, 29892, 286, 29916, 23521, 29906, 29892, 11073, 29906, 29892, 1948, 29918, 4537, 29892, 3041, 397, 312, 13, 9651, 1723, 13, 1678, 1683, 29901, 13, 4706, 286, 29916, 23521, 29906, 353, 7442, 29889, 271, 280, 579, 29918, 29906, 29881, 29898, 16838, 23521, 29906, 29897, 13, 13, 1678, 5153, 353, 3041, 397, 312, 3366, 14273, 3108, 13, 1678, 565, 5153, 338, 6213, 29901, 13, 4706, 5153, 353, 376, 3782, 6139, 4944, 29908, 13, 13, 1678, 390, 353, 286, 29916, 23521, 29896, 29889, 12181, 29961, 29900, 29962, 13, 1678, 565, 390, 2804, 286, 29916, 23521, 29906, 29889, 12181, 29961, 29900, 5387, 13, 4706, 12020, 7865, 2392, 29898, 13, 9651, 285, 6937, 16838, 23521, 29896, 29952, 322, 421, 16838, 23521, 29906, 29952, 505, 263, 1422, 1353, 310, 4206, 29901, 376, 13, 9651, 285, 29908, 29912, 29934, 29913, 7186, 426, 16838, 23521, 29906, 29889, 12181, 29961, 29900, 12258, 363, 7663, 411, 421, 14273, 29952, 353, 426, 14273, 5038, 13, 4706, 1723, 13, 13, 1678, 4175, 791, 353, 3041, 397, 312, 3366, 4572, 791, 3108, 13, 1678, 2320, 29886, 312, 29918, 4572, 791, 353, 3041, 397, 312, 3366, 11082, 29886, 312, 29918, 4572, 791, 3108, 13, 1678, 11073, 353, 3041, 397, 312, 3366, 21134, 3108, 13, 1678, 10340, 353, 3041, 397, 312, 3366, 348, 1169, 3108, 13, 1678, 11455, 29886, 29894, 353, 3041, 397, 312, 3366, 17281, 29886, 29894, 3108, 13, 1678, 318, 29888, 29918, 1127, 29879, 353, 3041, 397, 312, 3366, 1137, 29918, 1127, 29879, 3108, 13, 1678, 628, 3041, 397, 312, 13, 13, 1678, 565, 4175, 791, 338, 6213, 29901, 13, 4706, 4175, 791, 353, 29871, 29896, 29889, 29900, 29872, 29899, 29953, 13, 1678, 4175, 791, 353, 903, 15439, 29918, 4572, 791, 29898, 4572, 791, 29892, 390, 29892, 376, 4572, 791, 1159, 13, 1678, 2320, 29886, 312, 29918, 4572, 791, 353, 903, 15439, 29918, 4572, 791, 29898, 13, 4706, 2320, 29886, 312, 29918, 4572, 791, 29892, 390, 29892, 376, 11082, 29886, 312, 29918, 6768, 1839, 4572, 791, 2033, 29908, 13, 1678, 1723, 13, 13, 1678, 565, 11073, 338, 6213, 29901, 13, 4706, 11073, 353, 518, 29888, 29908, 4301, 426, 29875, 718, 29871, 29896, 29901, 29953, 29881, 5038, 363, 474, 297, 3464, 29898, 29934, 4638, 13, 1678, 25342, 7431, 29898, 21134, 29897, 2804, 390, 29901, 13, 4706, 12020, 7865, 2392, 29898, 13, 9651, 376, 2848, 310, 421, 21134, 29952, 947, 451, 1993, 1353, 29908, 13, 9651, 285, 29908, 310, 4206, 297, 421, 16838, 23521, 29896, 6998, 426, 2435, 29898, 21134, 2915, 7186, 426, 29934, 29913, 363, 376, 13, 9651, 285, 29908, 7320, 411, 421, 14273, 29952, 353, 426, 14273, 5038, 13, 4706, 1723, 13, 1678, 565, 10340, 338, 6213, 29901, 13, 4706, 10340, 353, 376, 3664, 6790, 29908, 13, 1678, 565, 954, 689, 338, 6213, 29901, 13, 4706, 954, 689, 353, 903, 657, 29918, 1949, 689, 29898, 16838, 23521, 29896, 29897, 13, 13, 1678, 10518, 29882, 7707, 353, 11860, 360, 2593, 29908, 13, 1678, 8281, 909, 353, 376, 29876, 29914, 29874, 376, 13, 1678, 419, 407, 29894, 353, 7442, 29889, 2873, 29898, 29934, 29892, 6120, 29897, 13, 1678, 565, 11455, 29886, 29894, 338, 451, 6213, 29901, 13, 4706, 419, 407, 29894, 29961, 17281, 29886, 29894, 29962, 353, 7700, 13, 13, 1678, 396, 363, 1948, 11073, 29901, 13, 1678, 281, 353, 4236, 29898, 29896, 29896, 29892, 7431, 29898, 3317, 29898, 21134, 29892, 1820, 29922, 2435, 4961, 13, 1678, 1424, 29885, 353, 285, 29908, 6224, 26254, 29893, 930, 5038, 13, 13, 1678, 396, 1369, 10223, 292, 363, 9227, 29889, 689, 6672, 29901, 13, 1678, 1596, 29918, 3888, 353, 12545, 23335, 29898, 13, 4706, 9066, 29896, 29922, 3366, 613, 5124, 1402, 13, 4706, 9066, 29906, 11759, 798, 29882, 7707, 29892, 553, 305, 7707, 1402, 13, 4706, 21971, 29922, 3366, 25641, 29955, 29881, 17671, 1424, 29885, 1402, 13, 4706, 1596, 5085, 11759, 798, 29918, 4537, 29892, 11073, 1402, 13, 4706, 2920, 29879, 11759, 29955, 29892, 281, 1402, 13, 4706, 409, 567, 11759, 29900, 29892, 29871, 29906, 1402, 13, 4706, 925, 29879, 29922, 3366, 29883, 613, 376, 29880, 12436, 13, 1678, 1723, 13, 13, 1678, 565, 3273, 6897, 3317, 29901, 13, 4706, 437, 6897, 3317, 353, 5852, 13, 1678, 565, 437, 6897, 3317, 29901, 13, 4706, 671, 29918, 3881, 353, 7700, 13, 1678, 565, 4513, 791, 29879, 1405, 448, 29896, 29901, 13, 4706, 286, 29916, 23521, 29896, 353, 7442, 29889, 14486, 29898, 16838, 23521, 29896, 29892, 4513, 791, 29879, 29897, 13, 4706, 286, 29916, 23521, 29906, 353, 7442, 29889, 14486, 29898, 16838, 23521, 29906, 29892, 4513, 791, 29879, 29897, 13, 13, 1678, 544, 22625, 7925, 353, 313, 558, 29873, 12313, 29892, 544, 29873, 12313, 29882, 29892, 544, 29873, 12313, 29880, 29897, 13, 1678, 7353, 29890, 7925, 353, 313, 15581, 12313, 29892, 7353, 12313, 29882, 29892, 7353, 12313, 29880, 29897, 13, 13, 1678, 396, 10272, 10151, 12651, 13, 1678, 282, 312, 3888, 353, 6571, 13, 1678, 9049, 5085, 353, 9657, 29898, 13, 4706, 2983, 29922, 7039, 29892, 13, 4706, 286, 29916, 23521, 29896, 29922, 16838, 23521, 29896, 29892, 13, 4706, 419, 407, 29894, 29922, 510, 407, 29894, 29892, 13, 4706, 9825, 13342, 29918, 3742, 29922, 29882, 391, 13342, 29918, 3742, 29892, 13, 4706, 954, 689, 29922, 1949, 689, 29892, 13, 4706, 544, 22625, 7925, 29922, 558, 22625, 7925, 29892, 13, 4706, 7353, 29890, 7925, 29922, 15581, 29890, 7925, 29892, 13, 4706, 4236, 29882, 7707, 29922, 3317, 29882, 7707, 29892, 13, 4706, 1375, 29882, 7707, 29922, 1195, 29882, 7707, 29892, 13, 4706, 633, 3844, 29882, 7707, 29922, 370, 3844, 29882, 7707, 29892, 13, 4706, 10518, 29882, 7707, 29922, 29886, 12744, 7707, 29892, 13, 4706, 8281, 909, 29922, 22911, 909, 29892, 13, 4706, 437, 6897, 3317, 29922, 1867, 6897, 3317, 29892, 13, 4706, 3273, 6897, 3317, 29922, 12759, 6897, 3317, 29892, 13, 4706, 1596, 29918, 3888, 29922, 2158, 29918, 3888, 29892, 13, 1678, 1723, 13, 1678, 411, 18116, 29889, 12510, 29918, 25442, 886, 7295, 13, 4706, 18116, 29889, 4572, 25442, 886, 703, 17281, 613, 364, 29908, 3596, 29899, 19377, 313, 18337, 29989, 8990, 29897, 18169, 1159, 13, 4706, 286, 29916, 29896, 353, 7442, 29889, 13707, 3317, 29898, 6897, 29898, 16838, 23521, 29896, 511, 9685, 29922, 29896, 29897, 13, 4706, 286, 29916, 29906, 353, 7442, 29889, 13707, 3317, 29898, 6897, 29898, 16838, 23521, 29906, 511, 9685, 29922, 29896, 29897, 13, 1678, 565, 451, 437, 6897, 3317, 29901, 13, 4706, 4236, 29896, 29892, 1375, 29896, 353, 286, 29916, 23521, 29896, 7503, 29892, 29871, 29900, 1402, 286, 29916, 23521, 29896, 7503, 29892, 29871, 29896, 29962, 13, 4706, 4236, 29906, 29892, 1375, 29906, 353, 286, 29916, 23521, 29906, 7503, 29892, 29871, 29900, 1402, 286, 29916, 23521, 29906, 7503, 29892, 29871, 29896, 29962, 13, 4706, 286, 29916, 23521, 29918, 29890, 353, 286, 29916, 23521, 29906, 565, 671, 29918, 3881, 1683, 6213, 13, 4706, 544, 9392, 29894, 353, 7442, 29889, 3298, 359, 29898, 29934, 29892, 6120, 29897, 13, 4706, 363, 474, 297, 14319, 29898, 13, 9651, 4852, 16838, 613, 376, 23521, 613, 376, 314, 29916, 4968, 13, 9651, 313, 3317, 29896, 29892, 1375, 29896, 29892, 286, 29916, 29896, 511, 13, 9651, 313, 3317, 29906, 29892, 1375, 29906, 29892, 286, 29916, 29906, 511, 13, 9651, 313, 5574, 29892, 7700, 29892, 5852, 511, 13, 9651, 313, 3317, 29882, 7707, 29892, 1375, 29882, 7707, 29892, 633, 3844, 29882, 7707, 511, 13, 308, 1125, 13, 9651, 301, 2204, 29892, 1294, 29896, 29892, 1294, 29906, 29892, 338, 3317, 29892, 659, 29882, 7707, 353, 474, 13, 9651, 282, 312, 3888, 29961, 26648, 29962, 353, 903, 15439, 29918, 29886, 312, 29898, 13, 18884, 1294, 29896, 29892, 13, 18884, 1294, 29906, 29892, 13, 18884, 4175, 791, 29892, 13, 18884, 2320, 29886, 312, 29918, 4572, 791, 29892, 13, 18884, 286, 29916, 23521, 29918, 29890, 29922, 16838, 23521, 29918, 29890, 29892, 13, 18884, 338, 3317, 29922, 275, 3317, 29892, 13, 18884, 659, 29882, 7707, 29922, 791, 29882, 7707, 29892, 13, 18884, 3579, 19290, 29892, 13, 9651, 1723, 13, 9651, 544, 9392, 29894, 891, 29922, 282, 312, 3888, 29961, 26648, 29962, 3366, 558, 9392, 29894, 3108, 13, 4706, 544, 9392, 29894, 7878, 419, 407, 29894, 13, 1678, 1683, 29901, 13, 4706, 282, 312, 3888, 3366, 314, 29916, 3108, 353, 903, 15439, 29918, 29886, 312, 29898, 13, 9651, 286, 29916, 29896, 29892, 13, 9651, 286, 29916, 29906, 29892, 13, 9651, 4175, 791, 29892, 13, 9651, 2320, 29886, 312, 29918, 4572, 791, 29892, 13, 9651, 286, 29916, 23521, 29918, 29890, 29922, 8516, 29892, 13, 9651, 338, 3317, 29922, 5574, 29892, 13, 9651, 659, 29882, 7707, 29922, 370, 3844, 29882, 7707, 29892, 13, 9651, 3579, 19290, 29892, 13, 4706, 1723, 13, 4706, 544, 9392, 29894, 353, 282, 312, 3888, 3366, 314, 29916, 3108, 3366, 558, 9392, 29894, 3108, 13, 1678, 22888, 29892, 1424, 29885, 353, 9227, 29889, 689, 6672, 29898, 13, 4706, 518, 2158, 29918, 3888, 29889, 13662, 29896, 29892, 1596, 29918, 3888, 29889, 13662, 29906, 1402, 13, 4706, 1596, 29918, 3888, 29889, 2103, 29879, 29892, 13, 4706, 1596, 29918, 3888, 29889, 689, 1446, 29892, 13, 4706, 16345, 29922, 2158, 29918, 3888, 29889, 344, 567, 29892, 13, 4706, 925, 29922, 2158, 29918, 3888, 29889, 5143, 29879, 29892, 13, 1678, 1723, 13, 13, 1678, 396, 3402, 1813, 4839, 29901, 13, 1678, 3984, 29883, 353, 903, 657, 29918, 1777, 29873, 1220, 29898, 4572, 791, 29897, 718, 903, 657, 29918, 1333, 5570, 29898, 1509, 29918, 3881, 29892, 2983, 29892, 544, 22625, 7925, 29892, 7353, 29890, 7925, 29897, 13, 1678, 298, 29881, 2288, 353, 903, 657, 29918, 29878, 415, 29918, 13662, 29898, 14273, 29922, 14273, 29892, 318, 29888, 29918, 1127, 29879, 29922, 1137, 29918, 1127, 29879, 29892, 10340, 29922, 348, 1169, 29892, 3984, 29883, 29922, 29885, 10669, 29897, 13, 1678, 4839, 353, 3611, 718, 6634, 29876, 29905, 29876, 29908, 718, 298, 29881, 2288, 718, 6634, 29876, 29908, 13, 13, 1678, 527, 356, 353, 14770, 29889, 275, 1639, 4925, 580, 13, 1678, 14770, 29889, 1639, 4925, 29898, 4294, 29918, 1003, 1973, 29897, 13, 1678, 1018, 29901, 13, 4706, 565, 2432, 351, 29886, 312, 29901, 13, 9651, 903, 5317, 29918, 11082, 29886, 312, 29898, 13, 18884, 282, 312, 3888, 29892, 13, 18884, 2983, 29892, 13, 18884, 5153, 29892, 13, 18884, 437, 6897, 3317, 29892, 13, 18884, 10422, 29892, 13, 18884, 2320, 29886, 312, 29918, 6768, 29892, 13, 18884, 671, 29918, 3881, 29892, 13, 18884, 4236, 29882, 7707, 29892, 13, 18884, 1375, 29882, 7707, 29892, 13, 18884, 633, 3844, 29882, 7707, 29892, 13, 18884, 1510, 29918, 1003, 1973, 29892, 13, 18884, 19932, 29918, 2680, 29918, 5085, 29892, 13, 9651, 1723, 13, 4706, 565, 437, 29882, 391, 13342, 29901, 13, 9651, 903, 5317, 29918, 29882, 391, 13342, 29898, 13, 18884, 282, 312, 3888, 29892, 13, 18884, 2983, 29892, 13, 18884, 5153, 29892, 13, 18884, 437, 6897, 3317, 29892, 13, 18884, 10422, 29892, 13, 18884, 9825, 13342, 29918, 3742, 29892, 13, 18884, 4236, 29882, 7707, 29892, 13, 18884, 1375, 29882, 7707, 29892, 13, 18884, 633, 3844, 29882, 7707, 29892, 13, 18884, 1510, 29918, 1003, 1973, 29892, 13, 18884, 19932, 29918, 2680, 29918, 5085, 29892, 13, 9651, 1723, 13, 1678, 7146, 29901, 13, 4706, 14770, 29889, 1639, 4925, 29898, 326, 356, 29897, 13, 13, 1678, 396, 2436, 2582, 13, 1678, 732, 29891, 8504, 29889, 3539, 29918, 726, 29918, 1445, 13, 1678, 822, 903, 29893, 14246, 1526, 29898, 29888, 29892, 4839, 29892, 22888, 29892, 1424, 29885, 29892, 1596, 5085, 29892, 639, 3488, 29892, 544, 9392, 29894, 29892, 282, 312, 3888, 29892, 5153, 1125, 13, 4706, 544, 9392, 29894, 353, 544, 9392, 29894, 29889, 5464, 9171, 580, 29961, 29900, 29962, 13, 4706, 565, 639, 3488, 529, 29871, 29896, 29901, 13, 9651, 396, 697, 5684, 297, 1206, 2159, 338, 5225, 13, 9651, 639, 3488, 353, 544, 9392, 29894, 29889, 2311, 718, 29871, 29896, 13, 4706, 6515, 353, 313, 558, 9392, 29894, 29889, 2311, 718, 639, 3488, 448, 29871, 29896, 29897, 849, 639, 3488, 13, 4706, 565, 544, 9392, 29894, 29889, 2311, 529, 7431, 29898, 2158, 5085, 29961, 29900, 29962, 1125, 13, 9651, 363, 474, 29892, 2944, 297, 26985, 29898, 2158, 5085, 1125, 13, 18884, 1596, 5085, 29961, 29875, 29962, 353, 518, 667, 29961, 29926, 29962, 363, 432, 297, 544, 9392, 29894, 29962, 13, 4706, 4434, 2813, 353, 4839, 718, 22888, 13, 4706, 282, 1875, 353, 6634, 29876, 29908, 29871, 396, 718, 18460, 29898, 29896, 29906, 29897, 13, 4706, 363, 282, 297, 3464, 29898, 12292, 1125, 13, 9651, 565, 282, 1405, 29871, 29900, 29901, 13, 18884, 285, 29889, 3539, 29898, 29886, 1875, 29897, 13, 9651, 285, 29889, 3539, 29898, 3891, 2813, 29897, 13, 9651, 289, 353, 282, 334, 639, 3488, 13, 9651, 321, 353, 289, 718, 639, 3488, 13, 9651, 9227, 29889, 2003, 3539, 29898, 29888, 29892, 1424, 29885, 29892, 334, 2158, 5085, 29892, 577, 29922, 18337, 29898, 29890, 29892, 321, 876, 13, 4706, 285, 29889, 3539, 29898, 29886, 1875, 29897, 13, 4706, 363, 301, 2204, 29892, 298, 7707, 297, 14319, 29898, 703, 16838, 613, 376, 23521, 613, 376, 314, 29916, 4968, 313, 3317, 29882, 7707, 29892, 1375, 29882, 7707, 29892, 633, 3844, 29882, 7707, 22164, 13, 9651, 565, 301, 2204, 297, 282, 312, 3888, 29901, 13, 18884, 285, 29889, 3539, 7373, 657, 29918, 29882, 391, 13342, 29918, 710, 29898, 14273, 29892, 298, 7707, 29892, 282, 312, 3888, 29961, 26648, 12622, 13, 13, 1678, 903, 29893, 14246, 1526, 29898, 13, 4706, 10422, 29892, 4839, 29892, 22888, 29892, 1424, 29885, 29892, 1596, 29918, 3888, 29889, 2158, 5085, 29892, 639, 3488, 29892, 544, 9392, 29894, 29892, 282, 312, 3888, 29892, 5153, 13, 1678, 1723, 13, 1678, 736, 282, 312, 3888, 13, 2 ]
plugins/matplotlib/komand_matplotlib/actions/create_line_plot/action.py
lukaszlaszuk/insightconnect-plugins
46
1608510
<filename>plugins/matplotlib/komand_matplotlib/actions/create_line_plot/action.py import komand from .schema import CreateLinePlotInput, CreateLinePlotOutput # Custom imports below import base64 import pandas as pd import seaborn as sns from io import BytesIO class CreateLinePlot(komand.Action): def __init__(self): super(self.__class__, self).__init__( name="create_line_plot", description="Create a line plot with an X/Y axis", input=CreateLinePlotInput(), output=CreateLinePlotOutput(), ) def run(self, params={}): # Set styles sns.set_palette(params.get("color_palette")) sns.set(style=params.get("margin_style")) # Process the data and create the plot try: decoded_data = base64.b64decode(params.get("csv_data")) except Exception as e: error = f"Failed to decode base64 encoded CSV data with error: {e}" self.logger.error(error) raise e df = pd.read_csv(BytesIO(decoded_data)) x = params.get("x_value") y = params.get("y_value") hue = params.get("hue") args = {"data": df, "x": x, "y": y} if not x or (x not in df): error = f"Column ({x}) not in data set, cannot create plot..." self.logger.error(error) return Exception(error) elif not y or (y not in df): error = f"Column ({y}) not in data set, cannot create plot..." self.logger.error(error) return Exception(error) if hue and (len(hue) > 0): args["hue"] = hue if hue not in df: error = f"Column for hue ({hue}) not in data set, cannot create plot..." self.logger.error(error) return Exception(error) # AxesSubplots (the plot object returned) don't have the savefig method, get the figure, then save it self.logger.info("Creating plot...") plot = sns.lineplot(**args) fig = plot.get_figure() # bbox_inches is required to ensure that labels are cut off fig.savefig("plot.png", bbox_inches="tight") with open( "plot.png", "rb", ) as f: plot = base64.b64encode(f.read()) return {"csv": params.get("csv_data"), "plot": plot.decode("utf-8")} def test(self): self.logger.info("No connection required, success!") return {"csv": "", "plot": ""}
[ 1, 529, 9507, 29958, 12800, 29914, 2922, 17357, 29914, 7218, 392, 29918, 2922, 17357, 29914, 7387, 29914, 3258, 29918, 1220, 29918, 5317, 29914, 2467, 29889, 2272, 13, 5215, 4677, 392, 13, 3166, 869, 11010, 1053, 6204, 3542, 20867, 4290, 29892, 6204, 3542, 20867, 6466, 13, 13, 29937, 8701, 24802, 2400, 13, 5215, 2967, 29953, 29946, 13, 5215, 11701, 408, 10518, 13, 5215, 409, 370, 1398, 408, 269, 1983, 13, 3166, 12013, 1053, 2648, 2167, 5971, 13, 13, 13, 1990, 6204, 3542, 20867, 29898, 7218, 392, 29889, 4276, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 2428, 29898, 1311, 17255, 1990, 1649, 29892, 1583, 467, 1649, 2344, 12035, 13, 9651, 1024, 543, 3258, 29918, 1220, 29918, 5317, 613, 13, 9651, 6139, 543, 4391, 263, 1196, 6492, 411, 385, 1060, 29914, 29979, 9685, 613, 13, 9651, 1881, 29922, 4391, 3542, 20867, 4290, 3285, 13, 9651, 1962, 29922, 4391, 3542, 20867, 6466, 3285, 13, 4706, 1723, 13, 13, 1678, 822, 1065, 29898, 1311, 29892, 8636, 3790, 29913, 1125, 13, 4706, 396, 3789, 11949, 13, 4706, 269, 1983, 29889, 842, 29918, 29886, 26456, 29898, 7529, 29889, 657, 703, 2780, 29918, 29886, 26456, 5783, 13, 4706, 269, 1983, 29889, 842, 29898, 3293, 29922, 7529, 29889, 657, 703, 9264, 29918, 3293, 5783, 13, 13, 4706, 396, 10554, 278, 848, 322, 1653, 278, 6492, 13, 4706, 1018, 29901, 13, 9651, 1602, 6797, 29918, 1272, 353, 2967, 29953, 29946, 29889, 29890, 29953, 29946, 13808, 29898, 7529, 29889, 657, 703, 7638, 29918, 1272, 5783, 13, 4706, 5174, 8960, 408, 321, 29901, 13, 9651, 1059, 353, 285, 29908, 17776, 304, 21822, 2967, 29953, 29946, 18511, 16874, 848, 411, 1059, 29901, 426, 29872, 5038, 13, 9651, 1583, 29889, 21707, 29889, 2704, 29898, 2704, 29897, 13, 9651, 12020, 321, 13, 13, 4706, 4489, 353, 10518, 29889, 949, 29918, 7638, 29898, 11207, 5971, 29898, 7099, 6797, 29918, 1272, 876, 13, 4706, 921, 353, 8636, 29889, 657, 703, 29916, 29918, 1767, 1159, 13, 4706, 343, 353, 8636, 29889, 657, 703, 29891, 29918, 1767, 1159, 13, 4706, 298, 434, 353, 8636, 29889, 657, 703, 29882, 434, 1159, 13, 13, 4706, 6389, 353, 8853, 1272, 1115, 4489, 29892, 376, 29916, 1115, 921, 29892, 376, 29891, 1115, 343, 29913, 13, 13, 4706, 565, 451, 921, 470, 313, 29916, 451, 297, 4489, 1125, 13, 9651, 1059, 353, 285, 29908, 4409, 21313, 29916, 1800, 451, 297, 848, 731, 29892, 2609, 1653, 6492, 17794, 13, 9651, 1583, 29889, 21707, 29889, 2704, 29898, 2704, 29897, 13, 9651, 736, 8960, 29898, 2704, 29897, 13, 4706, 25342, 451, 343, 470, 313, 29891, 451, 297, 4489, 1125, 13, 9651, 1059, 353, 285, 29908, 4409, 21313, 29891, 1800, 451, 297, 848, 731, 29892, 2609, 1653, 6492, 17794, 13, 9651, 1583, 29889, 21707, 29889, 2704, 29898, 2704, 29897, 13, 9651, 736, 8960, 29898, 2704, 29897, 13, 13, 4706, 565, 298, 434, 322, 313, 2435, 29898, 29882, 434, 29897, 1405, 29871, 29900, 1125, 13, 9651, 6389, 3366, 29882, 434, 3108, 353, 298, 434, 13, 13, 9651, 565, 298, 434, 451, 297, 4489, 29901, 13, 18884, 1059, 353, 285, 29908, 4409, 363, 298, 434, 21313, 29882, 434, 1800, 451, 297, 848, 731, 29892, 2609, 1653, 6492, 17794, 13, 18884, 1583, 29889, 21707, 29889, 2704, 29898, 2704, 29897, 13, 18884, 736, 8960, 29898, 2704, 29897, 13, 13, 4706, 396, 319, 9100, 4035, 26762, 313, 1552, 6492, 1203, 4133, 29897, 1016, 29915, 29873, 505, 278, 4078, 1003, 1158, 29892, 679, 278, 4377, 29892, 769, 4078, 372, 13, 4706, 1583, 29889, 21707, 29889, 3888, 703, 9832, 1218, 6492, 856, 1159, 13, 4706, 6492, 353, 269, 1983, 29889, 1220, 5317, 29898, 1068, 5085, 29897, 13, 4706, 2537, 353, 6492, 29889, 657, 29918, 4532, 580, 13, 13, 4706, 396, 289, 1884, 29918, 262, 6609, 338, 3734, 304, 9801, 393, 11073, 526, 5700, 1283, 13, 4706, 2537, 29889, 7620, 1003, 703, 5317, 29889, 2732, 613, 289, 1884, 29918, 262, 6609, 543, 29873, 523, 1159, 13, 4706, 411, 1722, 29898, 13, 9651, 376, 5317, 29889, 2732, 613, 13, 9651, 376, 6050, 613, 13, 4706, 1723, 408, 285, 29901, 13, 9651, 6492, 353, 2967, 29953, 29946, 29889, 29890, 29953, 29946, 12508, 29898, 29888, 29889, 949, 3101, 13, 13, 4706, 736, 8853, 7638, 1115, 8636, 29889, 657, 703, 7638, 29918, 1272, 4968, 376, 5317, 1115, 6492, 29889, 13808, 703, 9420, 29899, 29947, 1159, 29913, 13, 13, 1678, 822, 1243, 29898, 1311, 1125, 13, 4706, 1583, 29889, 21707, 29889, 3888, 703, 3782, 3957, 3734, 29892, 2551, 29991, 1159, 13, 4706, 736, 8853, 7638, 1115, 12633, 376, 5317, 1115, 5124, 29913, 13, 2 ]
wagtailrelated/utils.py
torchbox/wagtail-related
2
33710
<reponame>torchbox/wagtail-related<gh_stars>1-10 from bs4 import BeautifulSoup from wagtail.core.fields import StreamField def extract_text(obj): """Extracts data, concatenates and removes html tags from fields listed in a obj.related_source_fields list. """ related_source_fields = getattr(obj._meta.model, 'related_source_fields', None) if not related_source_fields: return html_pieces = [] for source_field in related_source_fields: field = source_field.get_field(obj.__class__) field_value = source_field.get_value(obj) if isinstance(field, StreamField): field_value = ' '.join(field_value) html_pieces.append(field_value) text = ' '.join(html_pieces) text = BeautifulSoup(text, 'html5lib').text return text
[ 1, 529, 276, 1112, 420, 29958, 7345, 305, 1884, 29914, 29893, 351, 18237, 29899, 12817, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 3166, 281, 351, 18237, 29889, 3221, 29889, 9621, 1053, 13763, 3073, 13, 13, 13, 1753, 6597, 29918, 726, 29898, 5415, 1125, 13, 1678, 9995, 5647, 1461, 29879, 848, 29892, 16125, 1078, 322, 25388, 3472, 8282, 13, 1678, 515, 4235, 9904, 297, 263, 5446, 29889, 12817, 29918, 4993, 29918, 9621, 1051, 29889, 13, 1678, 9995, 13, 1678, 4475, 29918, 4993, 29918, 9621, 353, 679, 5552, 29898, 5415, 3032, 7299, 29889, 4299, 29892, 525, 12817, 29918, 4993, 29918, 9621, 742, 6213, 29897, 13, 1678, 565, 451, 4475, 29918, 4993, 29918, 9621, 29901, 13, 4706, 736, 13, 13, 1678, 3472, 29918, 12343, 778, 353, 5159, 13, 1678, 363, 2752, 29918, 2671, 297, 4475, 29918, 4993, 29918, 9621, 29901, 13, 4706, 1746, 353, 2752, 29918, 2671, 29889, 657, 29918, 2671, 29898, 5415, 17255, 1990, 1649, 29897, 13, 4706, 1746, 29918, 1767, 353, 2752, 29918, 2671, 29889, 657, 29918, 1767, 29898, 5415, 29897, 13, 4706, 565, 338, 8758, 29898, 2671, 29892, 13763, 3073, 1125, 13, 9651, 1746, 29918, 1767, 353, 525, 15300, 7122, 29898, 2671, 29918, 1767, 29897, 13, 13, 4706, 3472, 29918, 12343, 778, 29889, 4397, 29898, 2671, 29918, 1767, 29897, 13, 13, 1678, 1426, 353, 525, 15300, 7122, 29898, 1420, 29918, 12343, 778, 29897, 13, 13, 1678, 1426, 353, 25685, 29903, 1132, 29898, 726, 29892, 525, 1420, 29945, 1982, 2824, 726, 13, 1678, 736, 1426, 13, 2 ]
python/testData/inspections/PyTypeCheckerInspection/FieldWithNoneInStub/m1.py
truthiswill/intellij-community
2
128524
class C(object): foo = None
[ 1, 770, 315, 29898, 3318, 1125, 13, 1678, 7953, 353, 6213, 13, 2 ]
crosstab/mega_analysis/lateralised_intensities.py
karandahele/Epilepsy-Repository
2
24549
import pandas as pd from crosstab.mega_analysis.pivot_result_to_pixel_intensities import * def lateralisation_to_pixel_intensities(all_combined_gifs, df, semiology_term, quantiles, method='non-linear', scale_factor=10, intensity_label='lateralised intensity', use_semiology_dictionary=False): """ runs pivot_result_to_pixel_intensities when the input has already been mapped to gifs as a result of running QUERY_LATERALISATION. This is the final step in the query_lateralisation pathway. <NAME> 2019 """ # isn't really a pivot_result but let's use consistent notations: pivot_result = all_combined_gifs[['pt #s']].T all_combined_gifs_intensities = pivot_result_to_pixel_intensities(pivot_result, df, method=method, scale_factor=scale_factor, quantiles=quantiles, use_main_df_calibration=False) # now we just need to transpose it and add the other columns back a2 = all_combined_gifs[['Gif Parcellations']].T a3 = all_combined_gifs[['Semiology Term']].T all_combined_gifs_intensities.index = [intensity_label] all_lateralised_gifs = pd.concat([a3, a2, pivot_result, all_combined_gifs_intensities], sort=False).T all_lateralised_gifs.loc[0, 'Semiology Term'] = str(semiology_term) all_lateralised_gifs.loc[1, 'Semiology Term'] = 'use_semiology_dictionary='+str(use_semiology_dictionary) return all_lateralised_gifs
[ 1, 1053, 11701, 408, 10518, 13, 3166, 274, 1883, 29256, 29889, 29885, 2442, 29918, 15916, 29889, 29886, 11002, 29918, 2914, 29918, 517, 29918, 29886, 15711, 29918, 524, 575, 1907, 1053, 334, 13, 13, 1753, 2678, 284, 4371, 29918, 517, 29918, 29886, 15711, 29918, 524, 575, 1907, 29898, 497, 29918, 17743, 1312, 29918, 29887, 10270, 29892, 4489, 29892, 29871, 13, 462, 462, 4706, 12647, 3002, 29918, 8489, 29892, 29871, 13, 462, 462, 4706, 4323, 5475, 29892, 1158, 2433, 5464, 29899, 10660, 742, 6287, 29918, 19790, 29922, 29896, 29900, 29892, 13, 462, 462, 4706, 26171, 29918, 1643, 2433, 29880, 1008, 284, 3368, 26171, 742, 13, 462, 462, 4706, 671, 29918, 12846, 29875, 3002, 29918, 27126, 29922, 8824, 1125, 13, 1678, 9995, 13, 1678, 6057, 24438, 29918, 2914, 29918, 517, 29918, 29886, 15711, 29918, 524, 575, 1907, 746, 278, 1881, 756, 2307, 1063, 20545, 304, 330, 10270, 408, 263, 1121, 310, 29871, 13, 1678, 2734, 660, 29965, 24422, 29918, 29931, 1299, 1001, 1964, 3235, 8098, 29889, 29871, 13, 1678, 910, 338, 278, 2186, 4331, 297, 278, 2346, 29918, 29880, 1008, 284, 4371, 2224, 1582, 29889, 13, 13, 1678, 529, 5813, 29958, 29871, 29906, 29900, 29896, 29929, 13, 1678, 9995, 13, 1678, 396, 3508, 29915, 29873, 2289, 263, 24438, 29918, 2914, 541, 1235, 29915, 29879, 671, 13747, 451, 800, 29901, 13, 1678, 24438, 29918, 2914, 353, 599, 29918, 17743, 1312, 29918, 29887, 10270, 29961, 1839, 415, 396, 29879, 2033, 1822, 29911, 13, 1678, 599, 29918, 17743, 1312, 29918, 29887, 10270, 29918, 524, 575, 1907, 353, 24438, 29918, 2914, 29918, 517, 29918, 29886, 15711, 29918, 524, 575, 1907, 29898, 29886, 11002, 29918, 2914, 29892, 4489, 29892, 29871, 13, 462, 462, 418, 1158, 29922, 5696, 29892, 6287, 29918, 19790, 29922, 7052, 29918, 19790, 29892, 4323, 5475, 29922, 12150, 5475, 29892, 13, 462, 462, 418, 671, 29918, 3396, 29918, 2176, 29918, 1052, 26218, 29922, 8824, 29897, 13, 268, 13, 1678, 396, 1286, 591, 925, 817, 304, 1301, 4220, 372, 322, 788, 278, 916, 4341, 1250, 29871, 13, 1678, 263, 29906, 353, 599, 29918, 17743, 1312, 29918, 29887, 10270, 29961, 1839, 29954, 361, 1459, 3729, 800, 2033, 1822, 29911, 29871, 13, 1678, 263, 29941, 353, 599, 29918, 17743, 1312, 29918, 29887, 10270, 29961, 1839, 29903, 14208, 3002, 11814, 2033, 1822, 29911, 29871, 13, 1678, 599, 29918, 17743, 1312, 29918, 29887, 10270, 29918, 524, 575, 1907, 29889, 2248, 353, 518, 524, 575, 537, 29918, 1643, 29962, 13, 268, 13, 1678, 599, 29918, 29880, 1008, 284, 3368, 29918, 29887, 10270, 353, 10518, 29889, 17685, 4197, 29874, 29941, 29892, 263, 29906, 29892, 24438, 29918, 2914, 29892, 599, 29918, 17743, 1312, 29918, 29887, 10270, 29918, 524, 575, 1907, 1402, 2656, 29922, 8824, 467, 29911, 13, 268, 13, 1678, 599, 29918, 29880, 1008, 284, 3368, 29918, 29887, 10270, 29889, 2029, 29961, 29900, 29892, 525, 29903, 14208, 3002, 11814, 2033, 353, 851, 29898, 12846, 29875, 3002, 29918, 8489, 29897, 13, 1678, 599, 29918, 29880, 1008, 284, 3368, 29918, 29887, 10270, 29889, 2029, 29961, 29896, 29892, 525, 29903, 14208, 3002, 11814, 2033, 353, 525, 1509, 29918, 12846, 29875, 3002, 29918, 27126, 2433, 29974, 710, 29898, 1509, 29918, 12846, 29875, 3002, 29918, 27126, 29897, 13, 13, 13, 1678, 736, 599, 29918, 29880, 1008, 284, 3368, 29918, 29887, 10270, 2 ]
models/discriminator_net.py
hbin0701/c3vqg-official
13
166396
from torch import nn class Discriminator(nn.Module): def __init__(self, hidden_size=512): super(Discriminator,self).__init__() self.model = nn.Sequential( nn.Linear(hidden_size, hidden_size//2), nn.LeakyReLU(0.2, inplace=True), nn.Linear(hidden_size//2, 256), nn.LeakyReLU(0.2, inplace=True), nn.Linear(256, 1), # nn.Softmax() nn.Sigmoid() ) def forward(self, vqg, questions, qlengths): # pass object of vqg encoder_hidden = vqg.encode_questions_discriminator(questions, qlengths) x = encoder_hidden.view(-1, vqg.hidden_size) verdict = self.model(x) return verdict
[ 1, 515, 4842, 305, 1053, 302, 29876, 13, 13, 1990, 8565, 20386, 1061, 29898, 15755, 29889, 7355, 1125, 13, 12, 1753, 4770, 2344, 12035, 1311, 29892, 7934, 29918, 2311, 29922, 29945, 29896, 29906, 1125, 13, 12, 12, 9136, 29898, 4205, 29883, 20386, 1061, 29892, 1311, 467, 1649, 2344, 1649, 580, 13, 13, 12, 12, 1311, 29889, 4299, 353, 302, 29876, 29889, 16941, 2556, 29898, 13, 12, 12, 12, 15755, 29889, 12697, 29898, 10892, 29918, 2311, 29892, 7934, 29918, 2311, 458, 29906, 511, 13, 12, 12, 12, 15755, 29889, 3226, 557, 29891, 1123, 29931, 29965, 29898, 29900, 29889, 29906, 29892, 297, 6689, 29922, 5574, 511, 13, 12, 12, 12, 15755, 29889, 12697, 29898, 10892, 29918, 2311, 458, 29906, 29892, 29871, 29906, 29945, 29953, 511, 13, 12, 12, 12, 15755, 29889, 3226, 557, 29891, 1123, 29931, 29965, 29898, 29900, 29889, 29906, 29892, 297, 6689, 29922, 5574, 511, 13, 12, 12, 12, 15755, 29889, 12697, 29898, 29906, 29945, 29953, 29892, 29871, 29896, 511, 13, 12, 12, 12, 29937, 302, 29876, 29889, 6295, 615, 3317, 580, 13, 12, 12, 12, 15755, 29889, 29903, 335, 29885, 3398, 580, 13, 12, 12, 29897, 13, 13, 12, 1753, 6375, 29898, 1311, 29892, 325, 29939, 29887, 29892, 5155, 29892, 29871, 1519, 1477, 29879, 1125, 308, 396, 1209, 1203, 310, 325, 29939, 29887, 13, 12, 12, 3977, 6119, 29918, 10892, 353, 325, 29939, 29887, 29889, 12508, 29918, 2619, 29918, 2218, 29883, 20386, 1061, 29898, 2619, 29892, 29871, 1519, 1477, 29879, 29897, 13, 12, 12, 29916, 353, 2094, 6119, 29918, 10892, 29889, 1493, 6278, 29896, 29892, 325, 29939, 29887, 29889, 10892, 29918, 2311, 29897, 13, 12, 12, 369, 8977, 353, 1583, 29889, 4299, 29898, 29916, 29897, 13, 12, 12, 2457, 1147, 8977, 2 ]
examples/mmLogin.py
michaelrosejr/pyaos8
2
92102
<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests import pprint as pp import re from requests.packages.urllib3.exceptions import InsecureRequestWarning # requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # MM Login IP and credentials userName = 'admin' passWord = '<PASSWORD>' deviceIP = '10.0.1.33' values = {'username': userName,'password': passWord} baseURL = "https://" + deviceIP + ":4343/v1" loginURL = "https://" + deviceIP + ":4343/v1/api/login" logoutURL = "https://" + deviceIP + ":4343/v1/api/logout" #node_hierarchy = "https://10.3.3.233/v1/configuration/object/node_hierarchy" node_hierarchy = baseURL + "/configuration/object/node_hierarchy" def getCookie(authString): print(authString) cookieString = str(authString) tmpList = cookieString.split(',') #print(tmpList[2]) tmpStr = tmpList[2] tmpStr = tmpStr.replace('{','') tmpStr = tmpStr.replace('}','') tmpStr = tmpStr.replace('\"','') tmpStr = tmpStr.strip() print(tmpStr) tmpList = tmpStr.split(':') print(tmpList[1]) return(tmpList[1]) with requests.Session() as query: #authentication login call requests.packages.urllib3.disable_warnings(InsecureRequestWarning) auth = query.post(loginURL, verify=False, data=values) #print (auth) #print("Request Content") #print(auth.content) #print("Cookie Jar") #print (auth.cookies) #print("Status code") #print(auth.status_code) ## Clean up cookie string and extract the Session ID UIDARUBA = getCookie(auth.content) node_hierarchy = node_hierarchy + '?UIDARUBA=' + UIDARUBA print(node_hierarchy) resp = query.get(node_hierarchy, cookies=auth.cookies,verify=False) # print(resp.content) print(resp.text) print("Logging out of MM") auth = query.post(logoutURL, cookies=auth.cookies,verify=False) #print(auth) #print(auth.content) print(auth.status_code)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 5215, 7274, 13, 5215, 282, 2158, 408, 6499, 13, 5215, 337, 13, 3166, 7274, 29889, 8318, 29889, 2271, 1982, 29941, 29889, 11739, 29879, 1053, 512, 24216, 3089, 22709, 13, 29937, 7274, 29889, 8318, 29889, 2271, 1982, 29941, 29889, 20472, 29918, 25442, 886, 29898, 797, 24216, 3089, 22709, 29897, 13, 13, 29937, 28880, 19130, 5641, 322, 16140, 13, 1792, 1170, 353, 525, 6406, 29915, 13, 3364, 14463, 353, 12801, 25711, 17013, 16299, 13, 10141, 5690, 353, 525, 29896, 29900, 29889, 29900, 29889, 29896, 29889, 29941, 29941, 29915, 13, 13, 13, 5975, 353, 11117, 6786, 2396, 1404, 1170, 5501, 5630, 2396, 1209, 14463, 29913, 13, 3188, 4219, 353, 376, 991, 597, 29908, 718, 4742, 5690, 718, 29242, 29946, 29941, 29946, 29941, 29914, 29894, 29896, 29908, 13, 7507, 4219, 353, 376, 991, 597, 29908, 718, 4742, 5690, 718, 29242, 29946, 29941, 29946, 29941, 29914, 29894, 29896, 29914, 2754, 29914, 7507, 29908, 13, 1188, 449, 4219, 353, 376, 991, 597, 29908, 718, 4742, 5690, 718, 29242, 29946, 29941, 29946, 29941, 29914, 29894, 29896, 29914, 2754, 29914, 1188, 449, 29908, 13, 29937, 3177, 29918, 29882, 631, 12040, 353, 376, 991, 597, 29896, 29900, 29889, 29941, 29889, 29941, 29889, 29906, 29941, 29941, 29914, 29894, 29896, 29914, 13305, 29914, 3318, 29914, 3177, 29918, 29882, 631, 12040, 29908, 13, 3177, 29918, 29882, 631, 12040, 353, 2967, 4219, 718, 5591, 13305, 29914, 3318, 29914, 3177, 29918, 29882, 631, 12040, 29908, 13, 13, 1753, 679, 24914, 29898, 5150, 1231, 1125, 13, 1678, 1596, 29898, 5150, 1231, 29897, 13, 1678, 15327, 1231, 353, 851, 29898, 5150, 1231, 29897, 13, 1678, 13128, 1293, 353, 15327, 1231, 29889, 5451, 29317, 1495, 13, 1678, 396, 2158, 29898, 7050, 1293, 29961, 29906, 2314, 13, 1678, 13128, 5015, 353, 13128, 1293, 29961, 29906, 29962, 13, 1678, 13128, 5015, 353, 13128, 5015, 29889, 6506, 877, 29912, 3788, 1495, 13, 1678, 13128, 5015, 353, 13128, 5015, 29889, 6506, 877, 29913, 3788, 1495, 13, 1678, 13128, 5015, 353, 13128, 5015, 29889, 6506, 877, 5931, 3788, 1495, 13, 1678, 13128, 5015, 353, 13128, 5015, 29889, 17010, 580, 13, 1678, 1596, 29898, 7050, 5015, 29897, 13, 1678, 13128, 1293, 353, 13128, 5015, 29889, 5451, 877, 29901, 1495, 13, 1678, 1596, 29898, 7050, 1293, 29961, 29896, 2314, 13, 1678, 736, 29898, 7050, 1293, 29961, 29896, 2314, 13, 13, 2541, 7274, 29889, 7317, 580, 408, 2346, 29901, 13, 1678, 396, 23055, 6464, 1246, 13, 1678, 7274, 29889, 8318, 29889, 2271, 1982, 29941, 29889, 20472, 29918, 25442, 886, 29898, 797, 24216, 3089, 22709, 29897, 13, 1678, 4817, 353, 2346, 29889, 2490, 29898, 7507, 4219, 29892, 11539, 29922, 8824, 29892, 848, 29922, 5975, 29897, 13, 1678, 396, 2158, 313, 5150, 29897, 13, 1678, 396, 2158, 703, 3089, 10576, 1159, 13, 1678, 396, 2158, 29898, 5150, 29889, 3051, 29897, 13, 1678, 396, 2158, 703, 24914, 15864, 1159, 13, 1678, 396, 2158, 313, 5150, 29889, 15108, 583, 29897, 13, 1678, 396, 2158, 703, 5709, 775, 1159, 13, 1678, 396, 2158, 29898, 5150, 29889, 4882, 29918, 401, 29897, 13, 13, 1678, 444, 315, 14044, 701, 15327, 1347, 322, 6597, 278, 16441, 3553, 13, 1678, 501, 1367, 1718, 29965, 5688, 353, 679, 24914, 29898, 5150, 29889, 3051, 29897, 13, 1678, 2943, 29918, 29882, 631, 12040, 353, 2943, 29918, 29882, 631, 12040, 718, 525, 29973, 11150, 1718, 29965, 5688, 2433, 718, 501, 1367, 1718, 29965, 5688, 13, 1678, 1596, 29898, 3177, 29918, 29882, 631, 12040, 29897, 13, 1678, 4613, 353, 2346, 29889, 657, 29898, 3177, 29918, 29882, 631, 12040, 29892, 21046, 29922, 5150, 29889, 15108, 583, 29892, 27902, 29922, 8824, 29897, 13, 1678, 396, 1596, 29898, 13713, 29889, 3051, 29897, 13, 1678, 1596, 29898, 13713, 29889, 726, 29897, 13, 13, 1678, 1596, 703, 3403, 3460, 714, 310, 28880, 1159, 13, 1678, 4817, 353, 2346, 29889, 2490, 29898, 1188, 449, 4219, 29892, 21046, 29922, 5150, 29889, 15108, 583, 29892, 27902, 29922, 8824, 29897, 13, 1678, 396, 2158, 29898, 5150, 29897, 13, 1678, 396, 2158, 29898, 5150, 29889, 3051, 29897, 13, 1678, 1596, 29898, 5150, 29889, 4882, 29918, 401, 29897, 13, 2 ]
docs/examples/models_abc.py
jasujm/pydantic
25
86099
<filename>docs/examples/models_abc.py import abc from pydantic import BaseModel class FooBarModel(BaseModel, abc.ABC): a: str b: int @abc.abstractmethod def my_abstract_method(self): pass
[ 1, 529, 9507, 29958, 2640, 29914, 19057, 29914, 9794, 29918, 10736, 29889, 2272, 13, 5215, 25638, 13, 3166, 282, 2941, 7716, 1053, 7399, 3195, 13, 13, 13, 1990, 13679, 4297, 3195, 29898, 5160, 3195, 29892, 25638, 29889, 19658, 1125, 13, 1678, 263, 29901, 851, 13, 1678, 289, 29901, 938, 13, 13, 1678, 732, 10736, 29889, 16595, 5696, 13, 1678, 822, 590, 29918, 16595, 29918, 5696, 29898, 1311, 1125, 13, 4706, 1209, 13, 2 ]
core/translator.py
bfu4/mdis
13
23605
from typing import List from parser import parse_bytes, split_bytes_from_lines, get_bytes, parse_instruction_set, wrap_parsed_set from reader import dump_file_hex_with_locs class Translator: """ Class handling file translations from *.mpy to hex dumps and opcodes """ def __init__(self, file: str): """ Create new translator :param file: location of the file """ self.file = file def get_file_hex(self): """ Get a full hex dump of the file :return: """ return dump_file_hex_with_locs(self.file) def get_file_hex_at(self, _from: str, _to: str): """ Get a byte dump at a specified location :param _from: from address :param _to: to address :return: bytes from address {_from} to address {_to} """ return parse_bytes(self.get_file_hex(), _from, _to) def get_file(self): """ Get the file name :return: """ return self.file def get_magic(self) -> str: """ Get the magic number :return: """ return "".join(self.get_all_bytes()[0][:8]) def get_all_bytes(self): """ Get all of the bytes :return: all of the bytes """ return get_bytes(self.get_file_hex().split("\n")) def get_split_bytes(self) -> List[List[str]]: """ Get all of the bytes per line :return: bytes in list form """ split = split_bytes_from_lines(self.get_all_bytes()) split[0] = split[0][4:] return split def get_bytes_at(self, _from: str, _to: str) -> List[List[str]]: """ Get the bytes between the specified locations :param _from: start address :param _to: end address :return: bytes """ return split_bytes_from_lines(self.get_file_hex_at(_from, _to)) def get_instruction_set(self) -> List[str]: """ Get the file's instruction set :return: set """ bl = self.get_split_bytes() # offset of 8, start at first BC_BASE_RESERVED list_with_offset = bl[0][4:] _bytes = self.__flatten([list_with_offset, bl[1]]) _set = parse_instruction_set(_bytes) return wrap_parsed_set(_set) def get_instructions_at(self, _from: str, _to: str) -> List[str]: """ Get the instructions between addresses :param _from: start address :param _to: end address :return: instructions """ _bytes = self.__flatten(self.get_bytes_at(_from, _to)) _set = parse_instruction_set(_bytes) return wrap_parsed_set(_set) def __flatten(self, _list): # Lambda replaced by def flatten due to E731 return [item for sublist in _list for item in sublist]
[ 1, 515, 19229, 1053, 2391, 13, 13, 3166, 13812, 1053, 6088, 29918, 13193, 29892, 6219, 29918, 13193, 29918, 3166, 29918, 9012, 29892, 679, 29918, 13193, 29892, 6088, 29918, 2611, 4080, 29918, 842, 29892, 12244, 29918, 862, 8485, 29918, 842, 13, 3166, 9591, 1053, 16766, 29918, 1445, 29918, 20970, 29918, 2541, 29918, 2029, 29879, 13, 13, 13, 1990, 4103, 29880, 1061, 29901, 13, 1678, 9995, 13, 1678, 4134, 11415, 934, 5578, 800, 515, 20611, 1526, 29891, 304, 15090, 270, 17204, 322, 1015, 18137, 13, 1678, 9995, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 934, 29901, 851, 1125, 13, 4706, 9995, 13, 4706, 6204, 716, 5578, 1061, 13, 4706, 584, 3207, 934, 29901, 4423, 310, 278, 934, 13, 4706, 9995, 13, 4706, 1583, 29889, 1445, 353, 934, 13, 13, 1678, 822, 679, 29918, 1445, 29918, 20970, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 263, 2989, 15090, 16766, 310, 278, 934, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 736, 16766, 29918, 1445, 29918, 20970, 29918, 2541, 29918, 2029, 29879, 29898, 1311, 29889, 1445, 29897, 13, 13, 1678, 822, 679, 29918, 1445, 29918, 20970, 29918, 271, 29898, 1311, 29892, 903, 3166, 29901, 851, 29892, 903, 517, 29901, 851, 1125, 13, 4706, 9995, 13, 4706, 3617, 263, 7023, 16766, 472, 263, 6790, 4423, 13, 4706, 584, 3207, 903, 3166, 29901, 515, 3211, 13, 4706, 584, 3207, 903, 517, 29901, 304, 3211, 13, 4706, 584, 2457, 29901, 6262, 515, 3211, 426, 29918, 3166, 29913, 304, 3211, 426, 29918, 517, 29913, 13, 4706, 9995, 13, 4706, 736, 6088, 29918, 13193, 29898, 1311, 29889, 657, 29918, 1445, 29918, 20970, 3285, 903, 3166, 29892, 903, 517, 29897, 13, 13, 1678, 822, 679, 29918, 1445, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 278, 934, 1024, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 736, 1583, 29889, 1445, 13, 13, 1678, 822, 679, 29918, 11082, 293, 29898, 1311, 29897, 1599, 851, 29901, 13, 4706, 9995, 13, 4706, 3617, 278, 15709, 1353, 13, 4706, 584, 2457, 29901, 13, 4706, 9995, 13, 4706, 736, 376, 1642, 7122, 29898, 1311, 29889, 657, 29918, 497, 29918, 13193, 580, 29961, 29900, 3816, 29901, 29947, 2314, 13, 13, 1678, 822, 679, 29918, 497, 29918, 13193, 29898, 1311, 1125, 13, 4706, 9995, 13, 4706, 3617, 599, 310, 278, 6262, 13, 4706, 584, 2457, 29901, 599, 310, 278, 6262, 13, 4706, 9995, 13, 4706, 736, 679, 29918, 13193, 29898, 1311, 29889, 657, 29918, 1445, 29918, 20970, 2141, 5451, 14182, 29876, 5783, 13, 13, 1678, 822, 679, 29918, 5451, 29918, 13193, 29898, 1311, 29897, 1599, 2391, 29961, 1293, 29961, 710, 5262, 29901, 13, 4706, 9995, 13, 4706, 3617, 599, 310, 278, 6262, 639, 1196, 13, 4706, 584, 2457, 29901, 6262, 297, 1051, 883, 13, 4706, 9995, 13, 4706, 6219, 353, 6219, 29918, 13193, 29918, 3166, 29918, 9012, 29898, 1311, 29889, 657, 29918, 497, 29918, 13193, 3101, 13, 4706, 6219, 29961, 29900, 29962, 353, 6219, 29961, 29900, 3816, 29946, 17531, 13, 4706, 736, 6219, 13, 13, 1678, 822, 679, 29918, 13193, 29918, 271, 29898, 1311, 29892, 903, 3166, 29901, 851, 29892, 903, 517, 29901, 851, 29897, 1599, 2391, 29961, 1293, 29961, 710, 5262, 29901, 13, 4706, 9995, 13, 4706, 3617, 278, 6262, 1546, 278, 6790, 14354, 13, 4706, 584, 3207, 903, 3166, 29901, 1369, 3211, 13, 4706, 584, 3207, 903, 517, 29901, 1095, 3211, 13, 4706, 584, 2457, 29901, 6262, 13, 4706, 9995, 13, 4706, 736, 6219, 29918, 13193, 29918, 3166, 29918, 9012, 29898, 1311, 29889, 657, 29918, 1445, 29918, 20970, 29918, 271, 7373, 3166, 29892, 903, 517, 876, 13, 13, 1678, 822, 679, 29918, 2611, 4080, 29918, 842, 29898, 1311, 29897, 1599, 2391, 29961, 710, 5387, 13, 4706, 9995, 13, 4706, 3617, 278, 934, 29915, 29879, 15278, 731, 13, 4706, 584, 2457, 29901, 731, 13, 4706, 9995, 13, 4706, 1999, 353, 1583, 29889, 657, 29918, 5451, 29918, 13193, 580, 13, 4706, 396, 9210, 310, 29871, 29947, 29892, 1369, 472, 937, 17403, 29918, 25416, 29918, 1525, 6304, 29963, 3352, 13, 4706, 1051, 29918, 2541, 29918, 10289, 353, 1999, 29961, 29900, 3816, 29946, 17531, 13, 4706, 903, 13193, 353, 1583, 17255, 1579, 8606, 4197, 1761, 29918, 2541, 29918, 10289, 29892, 1999, 29961, 29896, 24960, 13, 4706, 903, 842, 353, 6088, 29918, 2611, 4080, 29918, 842, 7373, 13193, 29897, 13, 4706, 736, 12244, 29918, 862, 8485, 29918, 842, 7373, 842, 29897, 13, 13, 1678, 822, 679, 29918, 2611, 582, 1953, 29918, 271, 29898, 1311, 29892, 903, 3166, 29901, 851, 29892, 903, 517, 29901, 851, 29897, 1599, 2391, 29961, 710, 5387, 13, 4706, 9995, 13, 4706, 3617, 278, 11994, 1546, 14157, 13, 4706, 584, 3207, 903, 3166, 29901, 1369, 3211, 13, 4706, 584, 3207, 903, 517, 29901, 1095, 3211, 13, 4706, 584, 2457, 29901, 11994, 13, 4706, 9995, 13, 4706, 903, 13193, 353, 1583, 17255, 1579, 8606, 29898, 1311, 29889, 657, 29918, 13193, 29918, 271, 7373, 3166, 29892, 903, 517, 876, 13, 4706, 903, 842, 353, 6088, 29918, 2611, 4080, 29918, 842, 7373, 13193, 29897, 13, 4706, 736, 12244, 29918, 862, 8485, 29918, 842, 7373, 842, 29897, 13, 13, 1678, 822, 4770, 1579, 8606, 29898, 1311, 29892, 903, 1761, 1125, 13, 4706, 396, 365, 2269, 8611, 491, 822, 1652, 8606, 2861, 304, 382, 29955, 29941, 29896, 13, 4706, 736, 518, 667, 363, 1014, 1761, 297, 903, 1761, 363, 2944, 297, 1014, 1761, 29962, 13, 2 ]
Algo_Ds_Notes-master/Algo_Ds_Notes-master/A_Star_Search_Algorithm/A_Star_Search_Algorithm.py
rajatenzyme/Coding-Journey-
0
21224
class Node: """ A node class used in A* Pathfinding. parent: it is parent of current node position: it is current position of node in the maze. g: cost from start to current Node h: heuristic based estimated cost for current Node to end Node f: total cost of present node i.e. : f = g + h """ def __init__(self , parent=None , poistion=None): self.parent = parent self.position = poistion self.g = 0 self.f = 0 self.h = 0 def __eq__(self , other): return self.position == other.position class FindPath(): def __init__(self , maze , cost , start , end): self.maze = maze self.cost = cost self.start = start self.end = end self.move = [ [-1, 0] , # go up [ 0,-1] , # go left [ 1, 0] , # go down [ 0, 1] , # go right [-1,-1] , # go left-up [-1, 1] , # go left down [ 1,-1] , # go right down [ 1, 1] ] # go right up def return_path(self,curr_node,cost_matrix): path = [] no_rows , no_columns = np.shape(cost_matrix) # here we create the initialized result maze with -1 in every position res = [[-1 for i in range(no_columns)] for j in range(no_rows)] #we will iterate over all parents of node and store in path curr = curr_node while curr is not None: path.append(curr.position) curr = curr.parent path = path[::-1] initial_value = 0 # we will insert the path in matrix for i in range(len(path)): res[path[i][0]][path[i][1]] = initial_value initial_value += 1 return res def search(self): """ Returns a list of tuples as a path from the given start to the given end in the given maze """ # we will create start node and end node # we will initialize g, h and f value zero start_node = Node(None, tuple(self.start)) start_node.g = 0 start_node.h = 0 start_node.f = 0 end_node = Node(None, tuple(self.end)) end_node.g = 0 end_node.h = 0 end_node.f = 0 # we need to initialize both queue and visited list # we will find the lowest cost node to expand next queue = [] # we will store all visited node visited_list = [] # Add the start node queue.append(start_node) # calculate the maximiuim number of steps we can move in the matrix counter = 0 max_steps = (len(self.maze) // 2) ** 10 # Get number of rows and columns no_rows, no_columns = np.shape(self.maze) # Loop until you find the end while len(queue) > 0: # Every time any node is visited increase the counter counter += 1 # Get the current node current_node = queue[0] current_index = 0 for index, item in enumerate(queue): if item.f < current_node.f: current_node = item current_index = index # if we hit this point return the path such as it may be no solution or # computation cost is too high if counter > max_steps: print ("Destination cannot be reached") return self.return_path(current_node , self.maze) # Pop current node out off queue.pop(current_index) # mark it visited visited_list.append(current_node) # check if goal is reached or not if current_node == end_node: return self.return_path(current_node , self.maze) # Generate coordinate from all adjacent coordinates coordinates = [] for move in self.move: # Get node position current_node_position = (current_node.position[0] + move[0] , current_node.position[1] + move[1]) # check if all the moves are in maze limit if (current_node_position[0] > (no_rows - 1) or current_node_position[0] < 0 or current_node_position[1] > (no_columns -1) or current_node_position[1] < 0): continue # Make sure walkable terrain if self.maze[current_node_position[0]][current_node_position[1]] != 0: continue # Create new node new_node = Node(current_node , current_node_position) # Append coordinates.append(new_node) # Loop through children for child in coordinates: # Child is on the visited list (search entire visited list) if len([visited_child for visited_child in visited_list if visited_child == child]) > 0: continue # calculate f, g, and h values child.g = current_node.g + self.cost # calculated Heuristic costs, this is using eucledian distance child.h = (((child.position[0] - end_node.position[0]) ** 2) + ((child.position[1] - end_node.position[1]) ** 2)) child.f = child.g + child.h # Child if already in queue and g cost is already lower if len([i for i in queue if child == i and child.g > i.g]) > 0: continue queue.append(child) class Preprocess: def __init__(self , maze , n , m): self.maze = maze self.n = n self.m = m def check(self , value): data='' for i in range(len(value)): if(value[i] == '[' or value[i] == ']'): continue else: data+=value[i] return data def process_text(self): c=0 matrix = self.maze matrix = matrix.split(',') data = [] for i in range(self.n): l = [] for j in range(self.m): l.append(int(self.check(matrix[c]))) c += 1 data.append(l) return data if __name__ == '__main__': no_rows = int(input("Enter number of rows: ")) no_cols = int(input("Enter number of columns: ")) matrix = Preprocess(str(input("Enter Matrix: ")) , no_rows , no_cols).process_text() start_x = int(input("Enter x coordinate of starting node: ")) start_y = int(input("Enter y coordinate of starting node: ")) end_x = int(input("Enter x coordinate of ending node: ")) end_y = int(input("Enter y coordinate of ending node: ")) cost = int(input("Enter cost: ")) start = [start_x , start_y] end = [end_x , end_y] path = FindPath(matrix , cost , start , end).search() if(path != None): print("Path found: ") for i in range(len(path)): for j in range(len(path[i])): if(path[i][j] == -1): print(0 , end=" ") else: print(path[i][j] , end=" ") print() else: print("No Path found") #input: # Enter number of rows: 5 # Enter number of columns: 6 # Enter Matrix: [[0, 1, 0, 0, 0, 0], # [0, 1, 0, 0, 0, 0], # [0, 1, 0, 1, 0, 0], # [0, 1, 0, 0, 1, 0], # [0, 0, 0, 0, 1, 0]] # Enter x coordinate of starting node: 0 # Enter y coordinate of starting node: 0 # Enter x coordinate of ending node: 4 # Enter y coordinate of ending node: 5 # Enter cost: 1 #Path found: # 0 0 0 0 0 0 # 1 0 0 0 0 0 # 2 0 0 0 7 0 # 3 0 0 6 0 8 # 0 4 5 0 0 9
[ 1, 770, 9071, 29901, 13, 1678, 9995, 13, 4706, 319, 2943, 770, 1304, 297, 319, 29930, 10802, 2886, 292, 29889, 13, 4706, 3847, 29901, 372, 338, 3847, 310, 1857, 2943, 13, 4706, 2602, 29901, 372, 338, 1857, 2602, 310, 2943, 297, 278, 611, 911, 29889, 13, 4706, 330, 29901, 3438, 515, 1369, 304, 1857, 9071, 13, 4706, 298, 29901, 540, 332, 4695, 2729, 15899, 3438, 363, 1857, 9071, 304, 1095, 9071, 13, 4706, 285, 29901, 3001, 3438, 310, 2198, 2943, 474, 29889, 29872, 29889, 584, 29871, 285, 353, 330, 718, 298, 13, 1678, 9995, 13, 268, 13, 1678, 822, 4770, 2344, 12035, 1311, 1919, 3847, 29922, 8516, 1919, 772, 391, 291, 29922, 8516, 1125, 13, 4706, 1583, 29889, 3560, 353, 3847, 13, 4706, 1583, 29889, 3283, 353, 772, 391, 291, 13, 4706, 1583, 29889, 29887, 353, 29871, 29900, 13, 4706, 1583, 29889, 29888, 353, 29871, 29900, 13, 4706, 1583, 29889, 29882, 353, 29871, 29900, 13, 308, 13, 1678, 822, 4770, 1837, 12035, 1311, 1919, 916, 1125, 13, 4706, 736, 1583, 29889, 3283, 1275, 916, 29889, 3283, 13, 13, 1990, 10987, 2605, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 1919, 611, 911, 1919, 3438, 1919, 1369, 1919, 1095, 1125, 13, 4706, 1583, 29889, 655, 911, 353, 611, 911, 13, 4706, 1583, 29889, 18253, 353, 3438, 13, 4706, 1583, 29889, 2962, 353, 1369, 13, 4706, 1583, 29889, 355, 353, 1095, 13, 4706, 1583, 29889, 11631, 353, 518, 21069, 29896, 29892, 29871, 29900, 29962, 1919, 396, 748, 701, 13, 462, 418, 518, 29871, 29900, 6653, 29896, 29962, 1919, 396, 748, 2175, 13, 462, 418, 518, 29871, 29896, 29892, 29871, 29900, 29962, 1919, 396, 748, 1623, 13, 462, 418, 518, 29871, 29900, 29892, 29871, 29896, 29962, 1919, 396, 748, 1492, 13, 462, 418, 21069, 29896, 6653, 29896, 29962, 1919, 396, 748, 2175, 29899, 786, 13, 462, 418, 21069, 29896, 29892, 29871, 29896, 29962, 1919, 396, 748, 2175, 1623, 13, 462, 418, 518, 29871, 29896, 6653, 29896, 29962, 1919, 396, 748, 1492, 1623, 13, 462, 418, 518, 29871, 29896, 29892, 29871, 29896, 29962, 4514, 396, 748, 1492, 701, 13, 308, 13, 1678, 822, 736, 29918, 2084, 29898, 1311, 29892, 21962, 29918, 3177, 29892, 18253, 29918, 5344, 1125, 13, 4706, 2224, 353, 5159, 13, 4706, 694, 29918, 5727, 1919, 694, 29918, 13099, 353, 7442, 29889, 12181, 29898, 18253, 29918, 5344, 29897, 13, 308, 13, 4706, 396, 1244, 591, 1653, 278, 16601, 1121, 611, 911, 411, 448, 29896, 297, 1432, 2602, 13, 4706, 620, 353, 5519, 29899, 29896, 363, 474, 297, 3464, 29898, 1217, 29918, 13099, 4638, 363, 432, 297, 3464, 29898, 1217, 29918, 5727, 4638, 13, 308, 13, 4706, 396, 705, 674, 13649, 975, 599, 11825, 310, 2943, 322, 3787, 297, 2224, 13, 4706, 16256, 353, 16256, 29918, 3177, 13, 4706, 1550, 16256, 338, 451, 6213, 29901, 13, 9651, 2224, 29889, 4397, 29898, 21962, 29889, 3283, 29897, 13, 9651, 16256, 353, 16256, 29889, 3560, 13, 4706, 2224, 353, 2224, 29961, 1057, 29899, 29896, 29962, 13, 4706, 2847, 29918, 1767, 29871, 353, 29871, 29900, 13, 4706, 396, 591, 674, 4635, 278, 2224, 297, 4636, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 2084, 22164, 13, 9651, 620, 29961, 2084, 29961, 29875, 3816, 29900, 29962, 3816, 2084, 29961, 29875, 3816, 29896, 5262, 353, 2847, 29918, 1767, 13, 9651, 2847, 29918, 1767, 4619, 29871, 29896, 13, 4706, 736, 620, 13, 268, 13, 1678, 822, 2740, 29898, 1311, 1125, 13, 4706, 9995, 13, 9651, 16969, 263, 1051, 310, 5291, 2701, 408, 263, 2224, 515, 278, 2183, 1369, 304, 278, 2183, 1095, 297, 278, 2183, 611, 911, 13, 4706, 9995, 13, 268, 13, 4706, 396, 591, 674, 1653, 1369, 2943, 322, 1095, 2943, 13, 4706, 396, 591, 674, 11905, 330, 29892, 298, 322, 285, 995, 5225, 13, 4706, 1369, 29918, 3177, 353, 9071, 29898, 8516, 29892, 18761, 29898, 1311, 29889, 2962, 876, 13, 4706, 1369, 29918, 3177, 29889, 29887, 353, 29871, 29900, 13, 4706, 1369, 29918, 3177, 29889, 29882, 353, 29871, 29900, 13, 4706, 1369, 29918, 3177, 29889, 29888, 353, 29871, 29900, 13, 308, 13, 4706, 1095, 29918, 3177, 353, 9071, 29898, 8516, 29892, 18761, 29898, 1311, 29889, 355, 876, 13, 4706, 1095, 29918, 3177, 29889, 29887, 353, 29871, 29900, 13, 4706, 1095, 29918, 3177, 29889, 29882, 353, 29871, 29900, 13, 4706, 1095, 29918, 3177, 29889, 29888, 353, 29871, 29900, 13, 4706, 396, 591, 817, 304, 11905, 1716, 9521, 322, 16669, 1051, 13, 4706, 396, 591, 674, 1284, 278, 19604, 3438, 2943, 304, 7985, 2446, 13, 4706, 9521, 353, 5159, 259, 13, 4706, 396, 591, 674, 3787, 599, 16669, 2943, 13, 4706, 16669, 29918, 1761, 353, 5159, 29871, 13, 4706, 396, 3462, 278, 1369, 2943, 13, 4706, 9521, 29889, 4397, 29898, 2962, 29918, 3177, 29897, 13, 4706, 396, 8147, 278, 5256, 5871, 326, 1353, 310, 6576, 591, 508, 4337, 297, 278, 4636, 13, 4706, 6795, 353, 29871, 29900, 13, 4706, 4236, 29918, 24530, 353, 313, 2435, 29898, 1311, 29889, 655, 911, 29897, 849, 29871, 29906, 29897, 3579, 29871, 29896, 29900, 13, 4706, 396, 3617, 1353, 310, 4206, 322, 4341, 13, 4706, 694, 29918, 5727, 29892, 694, 29918, 13099, 353, 7442, 29889, 12181, 29898, 1311, 29889, 655, 911, 29897, 13, 4706, 396, 21493, 2745, 366, 1284, 278, 1095, 13, 4706, 1550, 7431, 29898, 9990, 29897, 1405, 29871, 29900, 29901, 13, 9651, 396, 7569, 931, 738, 2943, 338, 16669, 7910, 278, 6795, 13, 9651, 6795, 4619, 29871, 29896, 1678, 13, 9651, 396, 3617, 278, 1857, 2943, 13, 9651, 1857, 29918, 3177, 353, 9521, 29961, 29900, 29962, 13, 9651, 1857, 29918, 2248, 353, 29871, 29900, 13, 9651, 363, 2380, 29892, 2944, 297, 26985, 29898, 9990, 1125, 13, 18884, 565, 2944, 29889, 29888, 529, 1857, 29918, 3177, 29889, 29888, 29901, 13, 462, 1678, 1857, 29918, 3177, 353, 2944, 13, 462, 1678, 1857, 29918, 2248, 353, 2380, 13, 9651, 396, 565, 591, 7124, 445, 1298, 736, 278, 2224, 1316, 408, 372, 1122, 367, 694, 1650, 470, 29871, 13, 9651, 396, 16287, 3438, 338, 2086, 1880, 13, 9651, 565, 6795, 1405, 4236, 29918, 24530, 29901, 13, 18884, 1596, 4852, 14994, 3381, 2609, 367, 7450, 1159, 13, 18884, 736, 1583, 29889, 2457, 29918, 2084, 29898, 3784, 29918, 3177, 1919, 1583, 29889, 655, 911, 29897, 13, 9651, 396, 6977, 1857, 2943, 714, 1283, 13, 9651, 9521, 29889, 7323, 29898, 3784, 29918, 2248, 29897, 13, 9651, 396, 2791, 372, 16669, 13, 9651, 16669, 29918, 1761, 29889, 4397, 29898, 3784, 29918, 3177, 29897, 13, 9651, 396, 1423, 565, 7306, 338, 7450, 470, 451, 13, 9651, 565, 1857, 29918, 3177, 1275, 1095, 29918, 3177, 29901, 13, 18884, 736, 1583, 29889, 2457, 29918, 2084, 29898, 3784, 29918, 3177, 1919, 1583, 29889, 655, 911, 29897, 13, 9651, 396, 3251, 403, 14821, 515, 599, 20114, 10350, 13, 9651, 10350, 353, 5159, 13, 9651, 363, 4337, 297, 1583, 29889, 11631, 29901, 29871, 13, 18884, 396, 3617, 2943, 2602, 13, 18884, 1857, 29918, 3177, 29918, 3283, 353, 313, 3784, 29918, 3177, 29889, 3283, 29961, 29900, 29962, 718, 4337, 29961, 29900, 29962, 1919, 1857, 29918, 3177, 29889, 3283, 29961, 29896, 29962, 718, 4337, 29961, 29896, 2314, 13, 18884, 396, 1423, 565, 599, 278, 16229, 526, 297, 611, 911, 4046, 13, 18884, 565, 313, 3784, 29918, 3177, 29918, 3283, 29961, 29900, 29962, 1405, 313, 1217, 29918, 5727, 448, 29871, 29896, 29897, 470, 1857, 29918, 3177, 29918, 3283, 29961, 29900, 29962, 529, 29871, 29900, 470, 1857, 29918, 3177, 29918, 3283, 29961, 29896, 29962, 1405, 313, 1217, 29918, 13099, 448, 29896, 29897, 470, 1857, 29918, 3177, 29918, 3283, 29961, 29896, 29962, 529, 29871, 29900, 1125, 13, 462, 1678, 6773, 13, 18884, 396, 8561, 1854, 6686, 519, 28439, 13, 18884, 565, 1583, 29889, 655, 911, 29961, 3784, 29918, 3177, 29918, 3283, 29961, 29900, 29962, 3816, 3784, 29918, 3177, 29918, 3283, 29961, 29896, 5262, 2804, 29871, 29900, 29901, 13, 462, 1678, 6773, 13, 18884, 396, 6204, 716, 2943, 13, 18884, 716, 29918, 3177, 353, 9071, 29898, 3784, 29918, 3177, 1919, 1857, 29918, 3177, 29918, 3283, 29897, 13, 18884, 396, 22871, 13, 18884, 10350, 29889, 4397, 29898, 1482, 29918, 3177, 29897, 13, 9651, 396, 21493, 1549, 4344, 13, 9651, 363, 2278, 297, 10350, 29901, 13, 18884, 396, 10517, 338, 373, 278, 16669, 1051, 313, 4478, 4152, 16669, 1051, 29897, 13, 18884, 565, 7431, 4197, 1730, 1573, 29918, 5145, 363, 16669, 29918, 5145, 297, 16669, 29918, 1761, 565, 16669, 29918, 5145, 1275, 2278, 2314, 1405, 29871, 29900, 29901, 13, 462, 1678, 6773, 13, 18884, 396, 8147, 285, 29892, 330, 29892, 322, 298, 1819, 13, 18884, 2278, 29889, 29887, 353, 1857, 29918, 3177, 29889, 29887, 718, 1583, 29889, 18253, 13, 18884, 396, 12833, 940, 332, 4695, 21544, 29892, 445, 338, 773, 321, 1682, 839, 713, 5418, 13, 18884, 2278, 29889, 29882, 353, 313, 3552, 5145, 29889, 3283, 29961, 29900, 29962, 448, 1095, 29918, 3177, 29889, 3283, 29961, 29900, 2314, 3579, 29871, 29906, 29897, 718, 5135, 5145, 29889, 3283, 29961, 29896, 29962, 448, 1095, 29918, 3177, 29889, 3283, 29961, 29896, 2314, 3579, 29871, 29906, 876, 29871, 13, 18884, 2278, 29889, 29888, 353, 2278, 29889, 29887, 718, 2278, 29889, 29882, 13, 18884, 396, 10517, 565, 2307, 297, 9521, 322, 330, 3438, 338, 2307, 5224, 13, 18884, 565, 7431, 4197, 29875, 363, 474, 297, 9521, 565, 2278, 1275, 474, 322, 2278, 29889, 29887, 1405, 474, 29889, 29887, 2314, 1405, 29871, 29900, 29901, 13, 462, 1678, 6773, 13, 18884, 9521, 29889, 4397, 29898, 5145, 29897, 13, 462, 13, 1990, 4721, 5014, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 1919, 611, 911, 1919, 302, 1919, 286, 1125, 13, 4706, 1583, 29889, 655, 911, 353, 611, 911, 13, 4706, 1583, 29889, 29876, 353, 302, 13, 4706, 1583, 29889, 29885, 353, 286, 13, 268, 13, 1678, 822, 1423, 29898, 1311, 1919, 995, 1125, 13, 4706, 848, 2433, 29915, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 1767, 22164, 13, 9651, 565, 29898, 1767, 29961, 29875, 29962, 1275, 525, 1839, 470, 995, 29961, 29875, 29962, 1275, 525, 29962, 29374, 13, 18884, 6773, 13, 9651, 1683, 29901, 13, 18884, 848, 23661, 1767, 29961, 29875, 29962, 13, 4706, 736, 848, 13, 268, 13, 1678, 822, 1889, 29918, 726, 29898, 1311, 1125, 13, 4706, 274, 29922, 29900, 13, 4706, 4636, 353, 1583, 29889, 655, 911, 13, 4706, 4636, 353, 4636, 29889, 5451, 29317, 1495, 13, 4706, 848, 353, 5159, 13, 4706, 363, 474, 297, 3464, 29898, 1311, 29889, 29876, 1125, 13, 9651, 301, 353, 5159, 13, 9651, 363, 432, 297, 3464, 29898, 1311, 29889, 29885, 1125, 13, 462, 13, 18884, 301, 29889, 4397, 29898, 524, 29898, 1311, 29889, 3198, 29898, 5344, 29961, 29883, 29962, 4961, 13, 18884, 274, 4619, 29871, 29896, 13, 9651, 848, 29889, 4397, 29898, 29880, 29897, 13, 4706, 736, 848, 13, 268, 13, 361, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 268, 13, 1678, 694, 29918, 5727, 353, 938, 29898, 2080, 703, 10399, 1353, 310, 4206, 29901, 376, 876, 13, 1678, 694, 29918, 22724, 353, 938, 29898, 2080, 703, 10399, 1353, 310, 4341, 29901, 376, 876, 13, 1678, 4636, 29871, 353, 4721, 5014, 29898, 710, 29898, 2080, 703, 10399, 22513, 29901, 376, 876, 1919, 694, 29918, 5727, 1919, 694, 29918, 22724, 467, 5014, 29918, 726, 580, 13, 1678, 1369, 29918, 29916, 353, 938, 29898, 2080, 703, 10399, 921, 14821, 310, 6257, 2943, 29901, 376, 876, 13, 1678, 1369, 29918, 29891, 353, 938, 29898, 2080, 703, 10399, 343, 14821, 310, 6257, 2943, 29901, 376, 876, 13, 1678, 1095, 29918, 29916, 353, 938, 29898, 2080, 703, 10399, 921, 14821, 310, 17140, 2943, 29901, 376, 876, 13, 1678, 1095, 29918, 29891, 353, 938, 29898, 2080, 703, 10399, 343, 14821, 310, 17140, 2943, 29901, 376, 876, 13, 1678, 3438, 353, 938, 29898, 2080, 703, 10399, 3438, 29901, 376, 876, 13, 1678, 1369, 353, 518, 2962, 29918, 29916, 1919, 1369, 29918, 29891, 29962, 13, 1678, 1095, 353, 518, 355, 29918, 29916, 1919, 1095, 29918, 29891, 29962, 13, 1678, 2224, 353, 10987, 2605, 29898, 5344, 1919, 3438, 1919, 1369, 1919, 1095, 467, 4478, 580, 13, 1678, 565, 29898, 2084, 2804, 6213, 1125, 13, 4706, 1596, 703, 2605, 1476, 29901, 16521, 13, 4706, 363, 474, 297, 3464, 29898, 2435, 29898, 2084, 22164, 13, 9651, 363, 432, 297, 3464, 29898, 2435, 29898, 2084, 29961, 29875, 12622, 29901, 13, 18884, 565, 29898, 2084, 29961, 29875, 3816, 29926, 29962, 1275, 448, 29896, 1125, 13, 462, 1678, 1596, 29898, 29900, 1919, 1095, 543, 16521, 13, 18884, 1683, 29901, 13, 462, 1678, 1596, 29898, 2084, 29961, 29875, 3816, 29926, 29962, 1919, 1095, 543, 16521, 13, 9651, 1596, 580, 13, 1678, 1683, 29901, 13, 4706, 1596, 703, 3782, 10802, 1476, 1159, 13, 13, 29937, 2080, 29901, 13, 29937, 1678, 9041, 1353, 310, 4206, 29901, 29871, 29945, 13, 29937, 1678, 9041, 1353, 310, 4341, 29901, 29871, 29953, 13, 29937, 1678, 9041, 22513, 29901, 5519, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 1402, 13, 29937, 18884, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 1402, 13, 29937, 18884, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 1402, 13, 29937, 18884, 518, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 1402, 13, 29937, 18884, 518, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29900, 29892, 29871, 29896, 29892, 29871, 29900, 5262, 13, 29937, 1678, 9041, 921, 14821, 310, 6257, 2943, 29901, 29871, 29900, 13, 29937, 1678, 9041, 343, 14821, 310, 6257, 2943, 29901, 29871, 29900, 13, 29937, 1678, 9041, 921, 14821, 310, 17140, 2943, 29901, 29871, 29946, 13, 29937, 1678, 9041, 343, 14821, 310, 17140, 2943, 29901, 29871, 29945, 13, 29937, 1678, 9041, 3438, 29901, 29871, 29896, 13, 29937, 2605, 1476, 29901, 29871, 13, 29937, 268, 29900, 29871, 29900, 29871, 29900, 29871, 29900, 29871, 29900, 29871, 29900, 29871, 13, 29937, 268, 29896, 29871, 29900, 29871, 29900, 29871, 29900, 29871, 29900, 29871, 29900, 29871, 13, 29937, 268, 29906, 29871, 29900, 29871, 29900, 29871, 29900, 29871, 29955, 29871, 29900, 29871, 13, 29937, 268, 29941, 29871, 29900, 29871, 29900, 29871, 29953, 29871, 29900, 29871, 29947, 29871, 13, 29937, 268, 29900, 29871, 29946, 29871, 29945, 29871, 29900, 29871, 29900, 29871, 29929, 29871, 13, 2 ]
aws-refresh-ssh-config.py
Eximchain/deployment-scripts
0
84510
import argparse import boto3 import json import time IN_FILE = "initial-servers.json" OUT_FILE = "temp-servers.json" # Network ID for main network, gamma, and beta NETWORK_ID="1" NETWORK_ID_FILTER = {'Name': 'tag:NetworkId', 'Values': [NETWORK_ID]} RUNNING_FILTER={'Name': 'instance-state-name', 'Values': ['running']} ELASTIC_IP_GROUPS = ['bootnode-a', 'bootnode-b', 'observer-a', 'observer-b'] def parse_args(): parser = argparse.ArgumentParser(description='Create config for ssh-to via AWS') parser.add_argument('--ssh-user', dest='ssh_user', default='ubuntu', action='store', help='Username that will be used to ssh instances') parser.add_argument('--refresh-group', dest='refresh_group', required=True, action='store', help='Group from the input that is being replaced') parser.add_argument('--no-elastic-ips', dest='no_elastic_ips', default=False, action='store_true', help='Disable the expectation for elastic IPs on bootnodes and observers') return parser.parse_args() def check_for_replacement(old_exim_node, expect_elastic_ips, replacements_so_far): name_filter = {'Name': 'tag:Name', 'Values': [old_exim_node.name]} conn = boto3.resource('ec2', region_name=old_exim_node.region) # We distinguish 3 cases based on the contents of 'instances' # 1. The old instance is still up and the new one is not up yet # 2. The old instance is down but the new one is not up yet # 3. The new instance is up instances = conn.instances.filter(Filters=[NETWORK_ID_FILTER, RUNNING_FILTER, name_filter]) # In case 2 this loop has no iterations for instance in instances: temp_exim_node = EximNode.from_boto_instance(instance) # Skip this node because it's already in our replacements list if temp_exim_node in replacements_so_far: print(f'Skipping matching node {temp_exim_node.instance_id} because it is already in replacements list') continue # This catches case 1, and case 3 where the old node still exists if old_exim_node.instance_id == temp_exim_node.instance_id: print(f'Old instance {old_exim_node.instance_id} for {old_exim_node.name} not yet replaced') continue # If we expect elastic IPs for this group and we haven't assigned it yet, keep waiting if expect_elastic_ips and (len(instance.network_interfaces) != 1 or instance.network_interfaces[0].association_attribute["IpOwnerId"] == 'amazon'): print(f'New instance {temp_exim_node.instance_id} expected to use elastic IP, but isn\'t associated yet') continue # If the hostname didn't change with the instance id this is probably a bug assert(old_exim_node.hostname != temp_exim_node.hostname) return temp_exim_node return None def wait_for_replacements(nodes_to_replace, expect_elastic_ips): original_to_replacement = {node: None for node in nodes_to_replace} num_unreplaced_nodes = len(original_to_replacement) while num_unreplaced_nodes > 0: for original_node,replacement_node in original_to_replacement.items(): if replacement_node == None: replacements_so_far = [replacement for replacement in original_to_replacement.values() if replacement != None] original_to_replacement[original_node] = check_for_replacement(original_node, expect_elastic_ips, replacements_so_far) num_unreplaced_nodes = len([node for node in original_to_replacement.values() if node == None]) print(f'Still waiting for {num_unreplaced_nodes} unreplaced nodes') if num_unreplaced_nodes > 0: sleep_seconds = 20 print(f'Sleeping for {sleep_seconds} seconds before polling again') time.sleep(sleep_seconds) return original_to_replacement.values() class EximNode: def __init__(self, hostname, name, region, instance_id): self.hostname = hostname self.name = name self.region = region self.instance_id = instance_id def __eq__(self, other): if not isinstance(other, type(self)): return False return (self.hostname, self.name, self.region, self.instance_id) == (other.hostname, other.name, other.region, other.instance_id) def __ne__(self, other): return not(self == other) def __hash__(self): return hash((self.hostname, self.name, self.region, self.instance_id)) @classmethod def from_json_list(cls, json_list): assert(len(json_list) == 3) hostname = json_list[0] name = json_list[1] comment = json_list[2] split_comment = comment.split(':') assert(len(split_comment) == 2) region = split_comment[0] instance_id = split_comment[1] return cls(hostname, name, region, instance_id) @classmethod def from_boto_instance(cls, instance): hostname = instance.public_dns_name name_tag = [tag for tag in instance.tags if tag['Key'] == 'Name'] name = name_tag[0]['Value'] region_tag = [tag for tag in instance.tags if tag['Key'] == 'Region'] region = region_tag[0]['Value'] instance_id = instance.instance_id return cls(hostname, name, region, instance_id) # Serializes to ssh-to input style list def to_json_list(self, args): ssh_hostname = f'{args.ssh_user}@{self.hostname}' comment = f'{self.region}:{self.instance_id}' return [ssh_hostname, self.name, comment] # Main script body args = parse_args() expect_elastic_ips = args.refresh_group in ELASTIC_IP_GROUPS and not args.no_elastic_ips with open(IN_FILE, 'r') as f: input = json.load(f) nodes_to_replace = [EximNode.from_json_list(node) for node in input[args.refresh_group]] replacement_nodes = wait_for_replacements(nodes_to_replace, expect_elastic_ips) replacement_node_json_list = [node.to_json_list(args) for node in replacement_nodes] output = {args.refresh_group: replacement_node_json_list} print(f'Dumping server config with replacement instances for group {args.refresh_group} to {OUT_FILE}') with open(OUT_FILE, 'w') as f: json.dump(output, f, indent=2)
[ 1, 1053, 1852, 5510, 13, 5215, 289, 3747, 29941, 13, 5215, 4390, 13, 5215, 931, 13, 13, 1177, 29918, 7724, 353, 376, 11228, 29899, 643, 874, 29889, 3126, 29908, 13, 12015, 29918, 7724, 353, 376, 7382, 29899, 643, 874, 29889, 3126, 29908, 13, 13, 29937, 8527, 3553, 363, 1667, 3564, 29892, 330, 2735, 29892, 322, 21762, 13, 6006, 11686, 29968, 29918, 1367, 543, 29896, 29908, 13, 6006, 11686, 29968, 29918, 1367, 29918, 3738, 29931, 4945, 353, 11117, 1170, 2396, 525, 4039, 29901, 13724, 1204, 742, 525, 9065, 2396, 518, 6006, 11686, 29968, 29918, 1367, 12258, 13, 29934, 3904, 29940, 4214, 29918, 3738, 29931, 4945, 3790, 29915, 1170, 2396, 525, 8758, 29899, 3859, 29899, 978, 742, 525, 9065, 2396, 6024, 21094, 2033, 29913, 13, 13, 29923, 4375, 1254, 2965, 29918, 5690, 29918, 26284, 29903, 353, 6024, 4777, 3177, 29899, 29874, 742, 525, 4777, 3177, 29899, 29890, 742, 525, 711, 2974, 29899, 29874, 742, 525, 711, 2974, 29899, 29890, 2033, 13, 13, 1753, 6088, 29918, 5085, 7295, 13, 1678, 13812, 353, 1852, 5510, 29889, 15730, 11726, 29898, 8216, 2433, 4391, 2295, 363, 13927, 29899, 517, 3025, 15540, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 15269, 29899, 1792, 742, 2731, 2433, 15269, 29918, 1792, 742, 2322, 2433, 8767, 742, 3158, 2433, 8899, 742, 1371, 2433, 20249, 393, 674, 367, 1304, 304, 13927, 8871, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 22379, 29899, 2972, 742, 2731, 2433, 22379, 29918, 2972, 742, 3734, 29922, 5574, 29892, 3158, 2433, 8899, 742, 1371, 2433, 4782, 515, 278, 1881, 393, 338, 1641, 8611, 1495, 13, 1678, 13812, 29889, 1202, 29918, 23516, 877, 489, 1217, 29899, 295, 6288, 29899, 4512, 742, 2731, 2433, 1217, 29918, 295, 6288, 29918, 4512, 742, 2322, 29922, 8824, 29892, 3158, 2433, 8899, 29918, 3009, 742, 1371, 2433, 4205, 519, 278, 23227, 363, 560, 6288, 5641, 29879, 373, 6579, 18010, 322, 5366, 874, 1495, 13, 1678, 736, 13812, 29889, 5510, 29918, 5085, 580, 13, 13, 1753, 1423, 29918, 1454, 29918, 3445, 9552, 29898, 1025, 29918, 735, 326, 29918, 3177, 29892, 2149, 29918, 295, 6288, 29918, 4512, 29892, 1634, 4620, 4110, 29918, 578, 29918, 15641, 1125, 13, 1678, 1024, 29918, 4572, 353, 11117, 1170, 2396, 525, 4039, 29901, 1170, 742, 525, 9065, 2396, 518, 1025, 29918, 735, 326, 29918, 3177, 29889, 978, 12258, 13, 1678, 11009, 353, 289, 3747, 29941, 29889, 10314, 877, 687, 29906, 742, 5120, 29918, 978, 29922, 1025, 29918, 735, 326, 29918, 3177, 29889, 12803, 29897, 13, 1678, 396, 1334, 20820, 29871, 29941, 4251, 2729, 373, 278, 8118, 310, 525, 2611, 2925, 29915, 13, 1678, 396, 29871, 29896, 29889, 450, 2030, 2777, 338, 1603, 701, 322, 278, 716, 697, 338, 451, 701, 3447, 13, 1678, 396, 29871, 29906, 29889, 450, 2030, 2777, 338, 1623, 541, 278, 716, 697, 338, 451, 701, 3447, 13, 1678, 396, 29871, 29941, 29889, 450, 716, 2777, 338, 701, 13, 1678, 8871, 353, 11009, 29889, 2611, 2925, 29889, 4572, 29898, 3434, 2153, 11759, 6006, 11686, 29968, 29918, 1367, 29918, 3738, 29931, 4945, 29892, 27694, 29940, 4214, 29918, 3738, 29931, 4945, 29892, 1024, 29918, 4572, 2314, 13, 1678, 396, 512, 1206, 29871, 29906, 445, 2425, 756, 694, 24372, 13, 1678, 363, 2777, 297, 8871, 29901, 13, 4706, 5694, 29918, 735, 326, 29918, 3177, 353, 1222, 326, 4247, 29889, 3166, 29918, 29890, 3747, 29918, 8758, 29898, 8758, 29897, 13, 4706, 396, 4971, 666, 445, 2943, 1363, 372, 29915, 29879, 2307, 297, 1749, 1634, 4620, 4110, 1051, 13, 4706, 565, 5694, 29918, 735, 326, 29918, 3177, 297, 1634, 4620, 4110, 29918, 578, 29918, 15641, 29901, 13, 9651, 1596, 29898, 29888, 29915, 29903, 1984, 3262, 9686, 2943, 426, 7382, 29918, 735, 326, 29918, 3177, 29889, 8758, 29918, 333, 29913, 1363, 372, 338, 2307, 297, 1634, 4620, 4110, 1051, 1495, 13, 9651, 6773, 13, 4706, 396, 910, 4380, 267, 1206, 29871, 29896, 29892, 322, 1206, 29871, 29941, 988, 278, 2030, 2943, 1603, 4864, 13, 4706, 565, 2030, 29918, 735, 326, 29918, 3177, 29889, 8758, 29918, 333, 1275, 5694, 29918, 735, 326, 29918, 3177, 29889, 8758, 29918, 333, 29901, 13, 9651, 1596, 29898, 29888, 29915, 21648, 2777, 426, 1025, 29918, 735, 326, 29918, 3177, 29889, 8758, 29918, 333, 29913, 363, 426, 1025, 29918, 735, 326, 29918, 3177, 29889, 978, 29913, 451, 3447, 8611, 1495, 13, 9651, 6773, 13, 4706, 396, 960, 591, 2149, 560, 6288, 5641, 29879, 363, 445, 2318, 322, 591, 7359, 29915, 29873, 9859, 372, 3447, 29892, 3013, 10534, 13, 4706, 565, 2149, 29918, 295, 6288, 29918, 4512, 322, 313, 2435, 29898, 8758, 29889, 11618, 29918, 1639, 8726, 29897, 2804, 29871, 29896, 470, 2777, 29889, 11618, 29918, 1639, 8726, 29961, 29900, 1822, 21264, 362, 29918, 12715, 3366, 29902, 29886, 28213, 1204, 3108, 1275, 525, 17260, 29374, 13, 9651, 1596, 29898, 29888, 29915, 4373, 2777, 426, 7382, 29918, 735, 326, 29918, 3177, 29889, 8758, 29918, 333, 29913, 3806, 304, 671, 560, 6288, 5641, 29892, 541, 3508, 20333, 29873, 6942, 3447, 1495, 13, 9651, 6773, 13, 4706, 396, 960, 278, 3495, 978, 3282, 29915, 29873, 1735, 411, 278, 2777, 1178, 445, 338, 3117, 263, 6494, 13, 4706, 4974, 29898, 1025, 29918, 735, 326, 29918, 3177, 29889, 28988, 2804, 5694, 29918, 735, 326, 29918, 3177, 29889, 28988, 29897, 13, 4706, 736, 5694, 29918, 735, 326, 29918, 3177, 13, 1678, 736, 6213, 13, 13, 1753, 4480, 29918, 1454, 29918, 3445, 4620, 4110, 29898, 18010, 29918, 517, 29918, 6506, 29892, 2149, 29918, 295, 6288, 29918, 4512, 1125, 13, 1678, 2441, 29918, 517, 29918, 3445, 9552, 353, 426, 3177, 29901, 6213, 363, 2943, 297, 7573, 29918, 517, 29918, 6506, 29913, 13, 1678, 954, 29918, 348, 3445, 433, 1133, 29918, 18010, 353, 7431, 29898, 13492, 29918, 517, 29918, 3445, 9552, 29897, 13, 13, 1678, 1550, 954, 29918, 348, 3445, 433, 1133, 29918, 18010, 1405, 29871, 29900, 29901, 13, 4706, 363, 2441, 29918, 3177, 29892, 3445, 9552, 29918, 3177, 297, 2441, 29918, 517, 29918, 3445, 9552, 29889, 7076, 7295, 13, 9651, 565, 16920, 29918, 3177, 1275, 6213, 29901, 13, 18884, 1634, 4620, 4110, 29918, 578, 29918, 15641, 353, 518, 3445, 9552, 363, 16920, 297, 2441, 29918, 517, 29918, 3445, 9552, 29889, 5975, 580, 565, 16920, 2804, 6213, 29962, 13, 18884, 2441, 29918, 517, 29918, 3445, 9552, 29961, 13492, 29918, 3177, 29962, 353, 1423, 29918, 1454, 29918, 3445, 9552, 29898, 13492, 29918, 3177, 29892, 2149, 29918, 295, 6288, 29918, 4512, 29892, 1634, 4620, 4110, 29918, 578, 29918, 15641, 29897, 13, 4706, 954, 29918, 348, 3445, 433, 1133, 29918, 18010, 353, 7431, 4197, 3177, 363, 2943, 297, 2441, 29918, 517, 29918, 3445, 9552, 29889, 5975, 580, 565, 2943, 1275, 6213, 2314, 13, 4706, 1596, 29898, 29888, 29915, 855, 453, 10534, 363, 426, 1949, 29918, 348, 3445, 433, 1133, 29918, 18010, 29913, 443, 3445, 433, 1133, 7573, 1495, 13, 4706, 565, 954, 29918, 348, 3445, 433, 1133, 29918, 18010, 1405, 29871, 29900, 29901, 13, 9651, 8709, 29918, 23128, 353, 29871, 29906, 29900, 13, 9651, 1596, 29898, 29888, 29915, 29903, 5436, 292, 363, 426, 17059, 29918, 23128, 29913, 6923, 1434, 1248, 1847, 1449, 1495, 13, 9651, 931, 29889, 17059, 29898, 17059, 29918, 23128, 29897, 13, 1678, 736, 2441, 29918, 517, 29918, 3445, 9552, 29889, 5975, 580, 13, 13, 13, 1990, 1222, 326, 4247, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3495, 978, 29892, 1024, 29892, 5120, 29892, 2777, 29918, 333, 1125, 13, 4706, 1583, 29889, 28988, 353, 3495, 978, 13, 4706, 1583, 29889, 978, 353, 1024, 13, 4706, 1583, 29889, 12803, 353, 5120, 13, 4706, 1583, 29889, 8758, 29918, 333, 353, 2777, 29918, 333, 13, 268, 13, 1678, 822, 4770, 1837, 12035, 1311, 29892, 916, 1125, 13, 4706, 565, 451, 338, 8758, 29898, 1228, 29892, 1134, 29898, 1311, 22164, 13, 9651, 736, 7700, 13, 4706, 736, 313, 1311, 29889, 28988, 29892, 1583, 29889, 978, 29892, 1583, 29889, 12803, 29892, 1583, 29889, 8758, 29918, 333, 29897, 1275, 313, 1228, 29889, 28988, 29892, 916, 29889, 978, 29892, 916, 29889, 12803, 29892, 916, 29889, 8758, 29918, 333, 29897, 13, 13, 1678, 822, 4770, 484, 12035, 1311, 29892, 916, 1125, 13, 4706, 736, 451, 29898, 1311, 1275, 916, 29897, 13, 268, 13, 1678, 822, 4770, 8568, 12035, 1311, 1125, 13, 4706, 736, 6608, 3552, 1311, 29889, 28988, 29892, 1583, 29889, 978, 29892, 1583, 29889, 12803, 29892, 1583, 29889, 8758, 29918, 333, 876, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 515, 29918, 3126, 29918, 1761, 29898, 25932, 29892, 4390, 29918, 1761, 1125, 13, 4706, 4974, 29898, 2435, 29898, 3126, 29918, 1761, 29897, 1275, 29871, 29941, 29897, 13, 4706, 3495, 978, 353, 4390, 29918, 1761, 29961, 29900, 29962, 13, 4706, 1024, 353, 4390, 29918, 1761, 29961, 29896, 29962, 13, 4706, 3440, 353, 4390, 29918, 1761, 29961, 29906, 29962, 13, 4706, 6219, 29918, 9342, 353, 3440, 29889, 5451, 877, 29901, 1495, 13, 4706, 4974, 29898, 2435, 29898, 5451, 29918, 9342, 29897, 1275, 29871, 29906, 29897, 13, 4706, 5120, 353, 6219, 29918, 9342, 29961, 29900, 29962, 13, 4706, 2777, 29918, 333, 353, 6219, 29918, 9342, 29961, 29896, 29962, 13, 4706, 736, 1067, 29879, 29898, 28988, 29892, 1024, 29892, 5120, 29892, 2777, 29918, 333, 29897, 13, 13, 1678, 732, 1990, 5696, 13, 1678, 822, 515, 29918, 29890, 3747, 29918, 8758, 29898, 25932, 29892, 2777, 1125, 13, 4706, 3495, 978, 353, 2777, 29889, 3597, 29918, 29881, 1983, 29918, 978, 13, 4706, 1024, 29918, 4039, 353, 518, 4039, 363, 4055, 297, 2777, 29889, 11338, 565, 4055, 1839, 2558, 2033, 1275, 525, 1170, 2033, 13, 4706, 1024, 353, 1024, 29918, 4039, 29961, 29900, 22322, 1917, 2033, 13, 4706, 5120, 29918, 4039, 353, 518, 4039, 363, 4055, 297, 2777, 29889, 11338, 565, 4055, 1839, 2558, 2033, 1275, 525, 18457, 2033, 13, 4706, 5120, 353, 5120, 29918, 4039, 29961, 29900, 22322, 1917, 2033, 13, 4706, 2777, 29918, 333, 353, 2777, 29889, 8758, 29918, 333, 13, 4706, 736, 1067, 29879, 29898, 28988, 29892, 1024, 29892, 5120, 29892, 2777, 29918, 333, 29897, 13, 13, 1678, 396, 18896, 7093, 304, 13927, 29899, 517, 1881, 3114, 1051, 13, 1678, 822, 304, 29918, 3126, 29918, 1761, 29898, 1311, 29892, 6389, 1125, 13, 4706, 13927, 29918, 28988, 353, 285, 29915, 29912, 5085, 29889, 15269, 29918, 1792, 29913, 28312, 1311, 29889, 28988, 10162, 13, 4706, 3440, 353, 285, 29915, 29912, 1311, 29889, 12803, 6177, 29912, 1311, 29889, 8758, 29918, 333, 10162, 13, 4706, 736, 518, 15269, 29918, 28988, 29892, 1583, 29889, 978, 29892, 3440, 29962, 13, 13, 29937, 4241, 2471, 3573, 13, 5085, 353, 6088, 29918, 5085, 580, 13, 17854, 29918, 295, 6288, 29918, 4512, 353, 6389, 29889, 22379, 29918, 2972, 297, 382, 4375, 1254, 2965, 29918, 5690, 29918, 26284, 29903, 322, 451, 6389, 29889, 1217, 29918, 295, 6288, 29918, 4512, 13, 13, 2541, 1722, 29898, 1177, 29918, 7724, 29892, 525, 29878, 1495, 408, 285, 29901, 13, 1678, 1881, 353, 4390, 29889, 1359, 29898, 29888, 29897, 13, 13, 18010, 29918, 517, 29918, 6506, 353, 518, 1252, 326, 4247, 29889, 3166, 29918, 3126, 29918, 1761, 29898, 3177, 29897, 363, 2943, 297, 1881, 29961, 5085, 29889, 22379, 29918, 2972, 5262, 13, 3445, 9552, 29918, 18010, 353, 4480, 29918, 1454, 29918, 3445, 4620, 4110, 29898, 18010, 29918, 517, 29918, 6506, 29892, 2149, 29918, 295, 6288, 29918, 4512, 29897, 13, 3445, 9552, 29918, 3177, 29918, 3126, 29918, 1761, 353, 518, 3177, 29889, 517, 29918, 3126, 29918, 1761, 29898, 5085, 29897, 363, 2943, 297, 16920, 29918, 18010, 29962, 13, 13, 4905, 353, 426, 5085, 29889, 22379, 29918, 2972, 29901, 16920, 29918, 3177, 29918, 3126, 29918, 1761, 29913, 13, 13, 2158, 29898, 29888, 29915, 29928, 3427, 292, 1923, 2295, 411, 16920, 8871, 363, 2318, 426, 5085, 29889, 22379, 29918, 2972, 29913, 304, 426, 12015, 29918, 7724, 29913, 1495, 13, 2541, 1722, 29898, 12015, 29918, 7724, 29892, 525, 29893, 1495, 408, 285, 29901, 13, 1678, 4390, 29889, 15070, 29898, 4905, 29892, 285, 29892, 29536, 29922, 29906, 29897, 2 ]
tests/autobahn_test.py
andreasbossard/deutschland
445
141231
from pprint import pprint from deutschland import autobahn from deutschland.autobahn.api import default_api autobahn_api_instance = default_api.DefaultApi() try: # Auflistung aller Autobahnen api_response = autobahn_api_instance.list_autobahnen() pprint(api_response) # Details zu einer Ladestation station_id = "RUxFQ1RSSUNfQ0hBUkdJTkdfU1RBVElPTl9fMTczMzM=" # str | api_response = autobahn_api_instance.get_charging_station(station_id) pprint(api_response) except autobahn.ApiException as e: print("Exception when calling DefaultApi->get_charging_station: %s\n" % e)
[ 1, 515, 282, 2158, 1053, 282, 2158, 13, 13, 3166, 4795, 1049, 1053, 1120, 711, 5422, 13, 3166, 4795, 1049, 29889, 1300, 711, 5422, 29889, 2754, 1053, 2322, 29918, 2754, 13, 13, 1300, 711, 5422, 29918, 2754, 29918, 8758, 353, 2322, 29918, 2754, 29889, 4592, 11713, 580, 13, 13, 2202, 29901, 13, 1678, 396, 4322, 1761, 686, 16454, 5202, 711, 801, 4566, 13, 1678, 7882, 29918, 5327, 353, 1120, 711, 5422, 29918, 2754, 29918, 8758, 29889, 1761, 29918, 1300, 711, 801, 4566, 580, 13, 1678, 282, 2158, 29898, 2754, 29918, 5327, 29897, 13, 13, 1678, 396, 25577, 1729, 3422, 19955, 342, 362, 13, 1678, 5073, 29918, 333, 353, 376, 28283, 29916, 29943, 29984, 29896, 29934, 1799, 3904, 29888, 29984, 29900, 29882, 7838, 29895, 29881, 29967, 29911, 29895, 2176, 29965, 29896, 29934, 29933, 29963, 6489, 7982, 29880, 29929, 29888, 11490, 2067, 29924, 29920, 29924, 543, 29871, 396, 851, 891, 13, 1678, 7882, 29918, 5327, 353, 1120, 711, 5422, 29918, 2754, 29918, 8758, 29889, 657, 29918, 25389, 292, 29918, 19569, 29898, 19569, 29918, 333, 29897, 13, 1678, 282, 2158, 29898, 2754, 29918, 5327, 29897, 13, 13, 19499, 1120, 711, 5422, 29889, 11713, 2451, 408, 321, 29901, 13, 1678, 1596, 703, 2451, 746, 5432, 13109, 11713, 976, 657, 29918, 25389, 292, 29918, 19569, 29901, 1273, 29879, 29905, 29876, 29908, 1273, 321, 29897, 13, 2 ]
server/processes/migrations/0132_auto_20201108_0540.py
CloudReactor/task_manager
0
5448
# Generated by Django 2.2.14 on 2020-11-08 05:40 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('processes', '0131_auto_20201107_2316'), ] operations = [ migrations.RunSQL( "UPDATE processes_workflow SET run_environment_id = scheduling_run_environment_id WHERE run_environment_id IS NULL;", reverse_sql='', ), ]
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29896, 29946, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29896, 29896, 29899, 29900, 29947, 29871, 29900, 29945, 29901, 29946, 29900, 30004, 13, 30004, 13, 3166, 9557, 29889, 2585, 1053, 9725, 800, 30004, 13, 30004, 13, 30004, 13, 1990, 341, 16783, 29898, 26983, 800, 29889, 29924, 16783, 1125, 30004, 13, 30004, 13, 1678, 9962, 353, 518, 30004, 13, 4706, 6702, 5014, 267, 742, 525, 29900, 29896, 29941, 29896, 29918, 6921, 29918, 29906, 29900, 29906, 29900, 29896, 29896, 29900, 29955, 29918, 29906, 29941, 29896, 29953, 5477, 30004, 13, 1678, 4514, 30004, 13, 30004, 13, 1678, 6931, 353, 518, 30004, 13, 4706, 9725, 800, 29889, 6558, 4176, 29898, 30004, 13, 18884, 376, 14474, 10174, 29918, 1287, 1731, 11368, 1065, 29918, 20944, 29918, 333, 353, 28598, 19478, 29918, 3389, 29918, 20944, 29918, 333, 5754, 1065, 29918, 20944, 29918, 333, 8519, 4265, 29936, 15231, 13, 18884, 11837, 29918, 2850, 2433, 23592, 13, 4706, 10353, 30004, 13, 1678, 4514, 30004, 13, 2 ]
test/tool_shed/base/test_db_util.py
thata/galaxy-dist
2
61139
import galaxy.model import galaxy.webapps.community.model as model from galaxy.model.orm import * from galaxy.webapps.community.model.mapping import context as sa_session from galaxy.model.mapping import context as ga_session def delete_obj( obj ): sa_session.delete( obj ) sa_session.flush() def delete_user_roles( user ): for ura in user.roles: sa_session.delete( ura ) sa_session.flush() def flush( obj ): sa_session.add( obj ) sa_session.flush() def get_all_repositories(): return sa_session.query( model.Repository ).all() def get_all_installed_repositories( actually_installed=False ): if actually_installed: return ga_session.query( galaxy.model.ToolShedRepository ) \ .filter( and_( galaxy.model.ToolShedRepository.table.c.deleted == False, galaxy.model.ToolShedRepository.table.c.uninstalled == False, galaxy.model.ToolShedRepository.table.c.status == galaxy.model.ToolShedRepository.installation_status.INSTALLED ) ) \ .all() else: return ga_session.query( galaxy.model.ToolShedRepository ).all() def get_category_by_name( name ): return sa_session.query( model.Category ) \ .filter( model.Category.table.c.name == name ) \ .first() def get_default_user_permissions_by_role( role ): return sa_session.query( model.DefaultUserPermissions ) \ .filter( model.DefaultUserPermissions.table.c.role_id == role.id ) \ .all() def get_default_user_permissions_by_user( user ): return sa_session.query( model.DefaultUserPermissions ) \ .filter( model.DefaultUserPermissions.table.c.user_id==user.id ) \ .all() def get_galaxy_repository_by_name_owner_changeset_revision( repository_name, owner, changeset_revision ): return ga_session.query( galaxy.model.ToolShedRepository ) \ .filter( and_( galaxy.model.ToolShedRepository.table.c.name == repository_name, galaxy.model.ToolShedRepository.table.c.owner == owner, galaxy.model.ToolShedRepository.table.c.changeset_revision == changeset_revision ) ) \ .first() def get_installed_repository_by_id( repository_id ): return ga_session.query( galaxy.model.ToolShedRepository ) \ .filter( galaxy.model.ToolShedRepository.table.c.id == repository_id ) \ .first() def get_installed_repository_by_name_owner( repository_name, owner ): return ga_session.query( galaxy.model.ToolShedRepository ) \ .filter( and_( galaxy.model.ToolShedRepository.table.c.name == repository_name, galaxy.model.ToolShedRepository.table.c.owner == owner ) ) \ .first() def get_private_role( user ): for role in user.all_roles(): if role.name == user.email and role.description == 'Private Role for %s' % user.email: return role raise AssertionError( "Private role not found for user '%s'" % user.email ) def get_repository_by_id( repository_id ): return sa_session.query( model.Repository ) \ .filter( model.Repository.table.c.id == repository_id ) \ .first() def get_repository_review_by_user_id_changeset_revision( user_id, repository_id, changeset_revision ): review = sa_session.query( model.RepositoryReview ) \ .filter( and_( model.RepositoryReview.table.c.user_id == user_id, model.RepositoryReview.table.c.repository_id == repository_id, model.RepositoryReview.table.c.changeset_revision == changeset_revision ) ) \ .first() return review def get_role_by_name( role_name ): return sa_session.query( model.Role ) \ .filter( model.Role.table.c.name == role_name ) \ .first() def get_user( email ): return sa_session.query( model.User ) \ .filter( model.User.table.c.email==email ) \ .first() def get_user_by_name( username ): return sa_session.query( model.User ) \ .filter( model.User.table.c.username==username ) \ .first() def mark_obj_deleted( obj ): obj.deleted = True sa_session.add( obj ) sa_session.flush() def refresh( obj ): sa_session.refresh( obj ) def ga_refresh( obj ): ga_session.refresh( obj ) def get_galaxy_private_role( user ): for role in user.all_roles(): if role.name == user.email and role.description == 'Private Role for %s' % user.email: return role raise AssertionError( "Private role not found for user '%s'" % user.email ) def get_galaxy_user( email ): return ga_session.query( galaxy.model.User ) \ .filter( galaxy.model.User.table.c.email==email ) \ .first() def get_repository_by_name_and_owner( name, owner_username ): owner = get_user_by_name( owner_username ) repository = sa_session.query( model.Repository ) \ .filter( and_( model.Repository.table.c.name == name, model.Repository.table.c.user_id == owner.id ) ) \ .first() return repository def get_repository_metadata_by_repository_id_changeset_revision( repository_id, changeset_revision ): repository_metadata = sa_session.query( model.RepositoryMetadata ) \ .filter( and_( model.RepositoryMetadata.table.c.repository_id == repository_id, model.RepositoryMetadata.table.c.changeset_revision == changeset_revision ) ) \ .first() return repository_metadata
[ 1, 1053, 15400, 29891, 29889, 4299, 13, 5215, 15400, 29891, 29889, 2676, 13371, 29889, 23834, 29889, 4299, 408, 1904, 13, 3166, 15400, 29891, 29889, 4299, 29889, 555, 1053, 334, 13, 3166, 15400, 29891, 29889, 2676, 13371, 29889, 23834, 29889, 4299, 29889, 20698, 1053, 3030, 408, 872, 29918, 7924, 13, 3166, 15400, 29891, 29889, 4299, 29889, 20698, 1053, 3030, 408, 10364, 29918, 7924, 13, 13, 1753, 5217, 29918, 5415, 29898, 5446, 29871, 1125, 13, 1678, 872, 29918, 7924, 29889, 8143, 29898, 5446, 1723, 13, 1678, 872, 29918, 7924, 29889, 23126, 580, 13, 1753, 5217, 29918, 1792, 29918, 307, 793, 29898, 1404, 29871, 1125, 13, 1678, 363, 318, 336, 297, 1404, 29889, 307, 793, 29901, 13, 4706, 872, 29918, 7924, 29889, 8143, 29898, 318, 336, 1723, 13, 1678, 872, 29918, 7924, 29889, 23126, 580, 13, 1753, 28371, 29898, 5446, 29871, 1125, 13, 1678, 872, 29918, 7924, 29889, 1202, 29898, 5446, 1723, 13, 1678, 872, 29918, 7924, 29889, 23126, 580, 13, 1753, 679, 29918, 497, 29918, 276, 1066, 20106, 7295, 13, 1678, 736, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 11481, 13742, 497, 580, 13, 1753, 679, 29918, 497, 29918, 25537, 29918, 276, 1066, 20106, 29898, 2869, 29918, 25537, 29922, 8824, 29871, 1125, 13, 1678, 565, 2869, 29918, 25537, 29901, 13, 4706, 736, 10364, 29918, 7924, 29889, 1972, 29898, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 1723, 320, 13, 462, 308, 869, 4572, 29898, 322, 23538, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 2371, 29889, 29883, 29889, 311, 22742, 1275, 7700, 29892, 13, 462, 462, 4706, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 2371, 29889, 29883, 29889, 348, 25537, 1275, 7700, 29892, 13, 462, 462, 4706, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 2371, 29889, 29883, 29889, 4882, 1275, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 6252, 362, 29918, 4882, 29889, 25580, 1964, 20566, 1723, 1723, 320, 13, 462, 308, 869, 497, 580, 13, 1678, 1683, 29901, 13, 4706, 736, 10364, 29918, 7924, 29889, 1972, 29898, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 13742, 497, 580, 13, 1753, 679, 29918, 7320, 29918, 1609, 29918, 978, 29898, 1024, 29871, 1125, 13, 1678, 736, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 10900, 1723, 320, 13, 462, 268, 869, 4572, 29898, 1904, 29889, 10900, 29889, 2371, 29889, 29883, 29889, 978, 1275, 1024, 1723, 320, 13, 462, 268, 869, 4102, 580, 13, 1753, 679, 29918, 4381, 29918, 1792, 29918, 17858, 6847, 29918, 1609, 29918, 12154, 29898, 6297, 29871, 1125, 13, 1678, 736, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 4592, 2659, 15737, 6847, 1723, 320, 13, 462, 268, 869, 4572, 29898, 1904, 29889, 4592, 2659, 15737, 6847, 29889, 2371, 29889, 29883, 29889, 12154, 29918, 333, 1275, 6297, 29889, 333, 1723, 320, 13, 462, 268, 869, 497, 580, 13, 1753, 679, 29918, 4381, 29918, 1792, 29918, 17858, 6847, 29918, 1609, 29918, 1792, 29898, 1404, 29871, 1125, 13, 1678, 736, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 4592, 2659, 15737, 6847, 1723, 320, 13, 462, 268, 869, 4572, 29898, 1904, 29889, 4592, 2659, 15737, 6847, 29889, 2371, 29889, 29883, 29889, 1792, 29918, 333, 1360, 1792, 29889, 333, 1723, 320, 13, 462, 268, 869, 497, 580, 13, 1753, 679, 29918, 23014, 26825, 29918, 19033, 29918, 1609, 29918, 978, 29918, 20348, 29918, 25990, 300, 29918, 276, 4924, 29898, 9810, 29918, 978, 29892, 12271, 29892, 3620, 300, 29918, 276, 4924, 29871, 1125, 13, 1678, 736, 10364, 29918, 7924, 29889, 1972, 29898, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 1723, 320, 13, 462, 268, 869, 4572, 29898, 322, 23538, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 2371, 29889, 29883, 29889, 978, 1275, 9810, 29918, 978, 29892, 13, 462, 462, 1678, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 2371, 29889, 29883, 29889, 20348, 1275, 12271, 29892, 13, 462, 462, 1678, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 2371, 29889, 29883, 29889, 25990, 300, 29918, 276, 4924, 1275, 3620, 300, 29918, 276, 4924, 1723, 1723, 320, 13, 462, 268, 869, 4102, 580, 13, 1753, 679, 29918, 25537, 29918, 19033, 29918, 1609, 29918, 333, 29898, 9810, 29918, 333, 29871, 1125, 13, 1678, 736, 10364, 29918, 7924, 29889, 1972, 29898, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 1723, 320, 13, 462, 268, 869, 4572, 29898, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 2371, 29889, 29883, 29889, 333, 1275, 9810, 29918, 333, 1723, 320, 13, 462, 268, 869, 4102, 580, 13, 1753, 679, 29918, 25537, 29918, 19033, 29918, 1609, 29918, 978, 29918, 20348, 29898, 9810, 29918, 978, 29892, 12271, 29871, 1125, 13, 1678, 736, 10364, 29918, 7924, 29889, 1972, 29898, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 1723, 320, 13, 462, 268, 869, 4572, 29898, 322, 23538, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 2371, 29889, 29883, 29889, 978, 1275, 9810, 29918, 978, 29892, 13, 462, 462, 1678, 15400, 29891, 29889, 4299, 29889, 12229, 2713, 287, 11481, 29889, 2371, 29889, 29883, 29889, 20348, 1275, 12271, 1723, 1723, 320, 13, 462, 268, 869, 4102, 580, 13, 1753, 679, 29918, 9053, 29918, 12154, 29898, 1404, 29871, 1125, 13, 1678, 363, 6297, 297, 1404, 29889, 497, 29918, 307, 793, 7295, 13, 4706, 565, 6297, 29889, 978, 1275, 1404, 29889, 5269, 322, 6297, 29889, 8216, 1275, 525, 25207, 1528, 280, 363, 1273, 29879, 29915, 1273, 1404, 29889, 5269, 29901, 13, 9651, 736, 6297, 13, 1678, 12020, 16499, 291, 2392, 29898, 376, 25207, 6297, 451, 1476, 363, 1404, 14210, 29879, 11838, 1273, 1404, 29889, 5269, 1723, 13, 1753, 679, 29918, 19033, 29918, 1609, 29918, 333, 29898, 9810, 29918, 333, 29871, 1125, 13, 1678, 736, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 11481, 1723, 320, 13, 462, 268, 869, 4572, 29898, 1904, 29889, 11481, 29889, 2371, 29889, 29883, 29889, 333, 1275, 9810, 29918, 333, 1723, 320, 13, 462, 268, 869, 4102, 580, 13, 1753, 679, 29918, 19033, 29918, 27828, 29918, 1609, 29918, 1792, 29918, 333, 29918, 25990, 300, 29918, 276, 4924, 29898, 1404, 29918, 333, 29892, 9810, 29918, 333, 29892, 3620, 300, 29918, 276, 4924, 29871, 1125, 13, 1678, 9076, 353, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 11481, 1123, 1493, 1723, 320, 13, 462, 539, 869, 4572, 29898, 322, 23538, 1904, 29889, 11481, 1123, 1493, 29889, 2371, 29889, 29883, 29889, 1792, 29918, 333, 1275, 1404, 29918, 333, 29892, 13, 462, 462, 418, 1904, 29889, 11481, 1123, 1493, 29889, 2371, 29889, 29883, 29889, 19033, 29918, 333, 1275, 9810, 29918, 333, 29892, 13, 462, 462, 418, 1904, 29889, 11481, 1123, 1493, 29889, 2371, 29889, 29883, 29889, 25990, 300, 29918, 276, 4924, 1275, 3620, 300, 29918, 276, 4924, 1723, 1723, 320, 13, 462, 539, 869, 4102, 580, 13, 1678, 736, 9076, 13, 1753, 679, 29918, 12154, 29918, 1609, 29918, 978, 29898, 6297, 29918, 978, 29871, 1125, 13, 1678, 736, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 16727, 1723, 320, 13, 462, 268, 869, 4572, 29898, 1904, 29889, 16727, 29889, 2371, 29889, 29883, 29889, 978, 1275, 6297, 29918, 978, 1723, 320, 13, 462, 268, 869, 4102, 580, 13, 1753, 679, 29918, 1792, 29898, 4876, 29871, 1125, 13, 1678, 736, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 2659, 1723, 320, 13, 462, 268, 869, 4572, 29898, 1904, 29889, 2659, 29889, 2371, 29889, 29883, 29889, 5269, 1360, 5269, 1723, 320, 13, 462, 268, 869, 4102, 580, 13, 1753, 679, 29918, 1792, 29918, 1609, 29918, 978, 29898, 8952, 29871, 1125, 13, 1678, 736, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 2659, 1723, 320, 13, 462, 268, 869, 4572, 29898, 1904, 29889, 2659, 29889, 2371, 29889, 29883, 29889, 6786, 1360, 6786, 1723, 320, 13, 462, 268, 869, 4102, 580, 13, 1753, 2791, 29918, 5415, 29918, 311, 22742, 29898, 5446, 29871, 1125, 13, 1678, 5446, 29889, 311, 22742, 353, 5852, 13, 1678, 872, 29918, 7924, 29889, 1202, 29898, 5446, 1723, 13, 1678, 872, 29918, 7924, 29889, 23126, 580, 13, 1753, 11086, 29898, 5446, 29871, 1125, 13, 1678, 872, 29918, 7924, 29889, 22379, 29898, 5446, 1723, 13, 1753, 10364, 29918, 22379, 29898, 5446, 29871, 1125, 13, 1678, 10364, 29918, 7924, 29889, 22379, 29898, 5446, 1723, 13, 1753, 679, 29918, 23014, 26825, 29918, 9053, 29918, 12154, 29898, 1404, 29871, 1125, 13, 1678, 363, 6297, 297, 1404, 29889, 497, 29918, 307, 793, 7295, 13, 4706, 565, 6297, 29889, 978, 1275, 1404, 29889, 5269, 322, 6297, 29889, 8216, 1275, 525, 25207, 1528, 280, 363, 1273, 29879, 29915, 1273, 1404, 29889, 5269, 29901, 13, 9651, 736, 6297, 13, 1678, 12020, 16499, 291, 2392, 29898, 376, 25207, 6297, 451, 1476, 363, 1404, 14210, 29879, 11838, 1273, 1404, 29889, 5269, 1723, 13, 1753, 679, 29918, 23014, 26825, 29918, 1792, 29898, 4876, 29871, 1125, 13, 1678, 736, 10364, 29918, 7924, 29889, 1972, 29898, 15400, 29891, 29889, 4299, 29889, 2659, 1723, 320, 13, 462, 268, 869, 4572, 29898, 15400, 29891, 29889, 4299, 29889, 2659, 29889, 2371, 29889, 29883, 29889, 5269, 1360, 5269, 1723, 320, 13, 462, 268, 869, 4102, 580, 13, 1753, 679, 29918, 19033, 29918, 1609, 29918, 978, 29918, 392, 29918, 20348, 29898, 1024, 29892, 12271, 29918, 6786, 29871, 1125, 13, 1678, 12271, 353, 679, 29918, 1792, 29918, 1609, 29918, 978, 29898, 12271, 29918, 6786, 1723, 13, 1678, 9810, 353, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 11481, 1723, 320, 13, 462, 965, 869, 4572, 29898, 322, 23538, 1904, 29889, 11481, 29889, 2371, 29889, 29883, 29889, 978, 1275, 1024, 29892, 13, 462, 462, 3986, 1904, 29889, 11481, 29889, 2371, 29889, 29883, 29889, 1792, 29918, 333, 1275, 12271, 29889, 333, 1723, 1723, 320, 13, 462, 965, 869, 4102, 580, 13, 1678, 736, 9810, 13, 1753, 679, 29918, 19033, 29918, 19635, 29918, 1609, 29918, 19033, 29918, 333, 29918, 25990, 300, 29918, 276, 4924, 29898, 9810, 29918, 333, 29892, 3620, 300, 29918, 276, 4924, 29871, 1125, 13, 1678, 9810, 29918, 19635, 353, 872, 29918, 7924, 29889, 1972, 29898, 1904, 29889, 11481, 18417, 1723, 320, 13, 462, 462, 1678, 869, 4572, 29898, 322, 23538, 1904, 29889, 11481, 18417, 29889, 2371, 29889, 29883, 29889, 19033, 29918, 333, 1275, 9810, 29918, 333, 29892, 13, 462, 462, 462, 259, 1904, 29889, 11481, 18417, 29889, 2371, 29889, 29883, 29889, 25990, 300, 29918, 276, 4924, 1275, 3620, 300, 29918, 276, 4924, 1723, 1723, 320, 13, 462, 462, 1678, 869, 4102, 580, 13, 1678, 736, 9810, 29918, 19635, 13, 2 ]
backstack/__init__.py
pixlie/platform
2
21837
<reponame>pixlie/platform from .models import SystemModel, BaseModel from .errors import ServerError, Errors from .config import settings from .db import db, Base from .commands import Commands name = "platform" __all__ = [ "name", "SystemModel", "BaseModel", "ServerError", "Errors", "settings", "db", "Base", "Commands", ]
[ 1, 529, 276, 1112, 420, 29958, 29886, 861, 3197, 29914, 12120, 13, 3166, 869, 9794, 1053, 2184, 3195, 29892, 7399, 3195, 13, 3166, 869, 12523, 1053, 5656, 2392, 29892, 4829, 29879, 13, 3166, 869, 2917, 1053, 6055, 13, 3166, 869, 2585, 1053, 4833, 29892, 7399, 13, 3166, 869, 26381, 1053, 1876, 4167, 13, 13, 13, 978, 353, 376, 12120, 29908, 13, 13, 13, 1649, 497, 1649, 353, 518, 13, 1678, 376, 978, 613, 13, 1678, 376, 3924, 3195, 613, 13, 1678, 376, 5160, 3195, 613, 13, 1678, 376, 6004, 2392, 613, 13, 1678, 376, 22463, 613, 13, 1678, 376, 11027, 613, 13, 1678, 376, 2585, 613, 13, 1678, 376, 5160, 613, 13, 1678, 376, 5261, 4167, 613, 13, 29962, 13, 2 ]
backend/security/migrations/8036f244db77_create_user_and_role.py
anu-act-health-covid19-support/hospital-demand-webapp-backup
558
143754
""" create user and role Revision ID: 8036f244db77 Revises: Create Date: 2017-10-11 17:22:00.467780 """ from alembic import op import sqlalchemy as sa import backend # revision identifiers, used by Alembic. revision = '8036f244db77' down_revision = None branch_labels = ('security',) depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('role', sa.Column('id', sa.BigInteger(), nullable=False), sa.Column('created_at', backend.database.types.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False), sa.Column('updated_at', backend.database.types.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False), sa.Column('name', sa.String(length=50), nullable=False), sa.Column('description', sa.String(length=255), nullable=True), sa.PrimaryKeyConstraint('id', name=op.f('pk_role')) ) op.create_index(op.f('ix_role_name'), 'role', ['name'], unique=True) op.create_table('user', sa.Column('id', sa.BigInteger(), nullable=False), sa.Column('created_at', backend.database.types.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False), sa.Column('updated_at', backend.database.types.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False), sa.Column('username', sa.String(length=50), nullable=False), sa.Column('email', sa.String(length=50), nullable=False), sa.Column('first_name', sa.String(length=32), nullable=False), sa.Column('last_name', sa.String(length=64), nullable=False), sa.Column('password', sa.String(), nullable=True), sa.Column('active', sa.Boolean(name='active'), nullable=False), sa.Column('confirmed_at', backend.database.types.DateTime(timezone=True), nullable=True), sa.PrimaryKeyConstraint('id', name=op.f('pk_user')) ) op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=True) op.create_index(op.f('ix_user_username'), 'user', ['username'], unique=True) op.create_table('user_role', sa.Column('user_id', sa.BigInteger(), nullable=False), sa.Column('role_id', sa.BigInteger(), nullable=False), sa.ForeignKeyConstraint(['role_id'], ['role.id'], name=op.f('fk_user_role_role_id_role')), sa.ForeignKeyConstraint(['user_id'], ['user.id'], name=op.f('fk_user_role_user_id_user')), sa.PrimaryKeyConstraint('user_id', 'role_id', name=op.f('pk_user_role')) ) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_table('user_role') op.drop_index(op.f('ix_user_username'), table_name='user') op.drop_index(op.f('ix_user_email'), table_name='user') op.drop_table('user') op.drop_index(op.f('ix_role_name'), table_name='role') op.drop_table('role') # ### end Alembic commands ###
[ 1, 9995, 13, 3258, 1404, 322, 6297, 13, 13, 1123, 4924, 3553, 29901, 29871, 29947, 29900, 29941, 29953, 29888, 29906, 29946, 29946, 2585, 29955, 29955, 13, 1123, 1730, 267, 29901, 29871, 13, 4391, 4712, 29901, 29871, 29906, 29900, 29896, 29955, 29899, 29896, 29900, 29899, 29896, 29896, 29871, 29896, 29955, 29901, 29906, 29906, 29901, 29900, 29900, 29889, 29946, 29953, 29955, 29955, 29947, 29900, 13, 15945, 29908, 13, 13, 3166, 20712, 29890, 293, 1053, 1015, 13, 5215, 4576, 284, 305, 6764, 408, 872, 13, 13, 13, 5215, 14998, 13, 13, 29937, 26554, 2893, 14903, 29892, 1304, 491, 319, 2409, 29890, 293, 29889, 13, 276, 4924, 353, 525, 29947, 29900, 29941, 29953, 29888, 29906, 29946, 29946, 2585, 29955, 29955, 29915, 13, 3204, 29918, 276, 4924, 353, 6213, 13, 17519, 29918, 21134, 353, 6702, 8926, 742, 29897, 13, 2716, 1975, 29918, 265, 353, 6213, 13, 13, 13, 1753, 14955, 7295, 13, 1678, 396, 835, 8260, 4469, 5759, 491, 319, 2409, 29890, 293, 448, 3113, 10365, 29991, 835, 13, 1678, 1015, 29889, 3258, 29918, 2371, 877, 12154, 742, 13, 1678, 872, 29889, 4409, 877, 333, 742, 872, 29889, 6970, 7798, 3285, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 11600, 29918, 271, 742, 14998, 29889, 9803, 29889, 8768, 29889, 11384, 29898, 2230, 8028, 29922, 5574, 511, 1923, 29918, 4381, 29922, 4977, 29889, 726, 877, 3707, 580, 5477, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 21402, 29918, 271, 742, 14998, 29889, 9803, 29889, 8768, 29889, 11384, 29898, 2230, 8028, 29922, 5574, 511, 1923, 29918, 4381, 29922, 4977, 29889, 726, 877, 3707, 580, 5477, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 978, 742, 872, 29889, 1231, 29898, 2848, 29922, 29945, 29900, 511, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 8216, 742, 872, 29889, 1231, 29898, 2848, 29922, 29906, 29945, 29945, 511, 1870, 519, 29922, 5574, 511, 13, 1678, 872, 29889, 26666, 2558, 21529, 877, 333, 742, 1024, 29922, 459, 29889, 29888, 877, 20571, 29918, 12154, 8785, 13, 1678, 1723, 13, 1678, 1015, 29889, 3258, 29918, 2248, 29898, 459, 29889, 29888, 877, 861, 29918, 12154, 29918, 978, 5477, 525, 12154, 742, 6024, 978, 7464, 5412, 29922, 5574, 29897, 13, 1678, 1015, 29889, 3258, 29918, 2371, 877, 1792, 742, 13, 1678, 872, 29889, 4409, 877, 333, 742, 872, 29889, 6970, 7798, 3285, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 11600, 29918, 271, 742, 14998, 29889, 9803, 29889, 8768, 29889, 11384, 29898, 2230, 8028, 29922, 5574, 511, 1923, 29918, 4381, 29922, 4977, 29889, 726, 877, 3707, 580, 5477, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 21402, 29918, 271, 742, 14998, 29889, 9803, 29889, 8768, 29889, 11384, 29898, 2230, 8028, 29922, 5574, 511, 1923, 29918, 4381, 29922, 4977, 29889, 726, 877, 3707, 580, 5477, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 6786, 742, 872, 29889, 1231, 29898, 2848, 29922, 29945, 29900, 511, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 5269, 742, 872, 29889, 1231, 29898, 2848, 29922, 29945, 29900, 511, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 4102, 29918, 978, 742, 872, 29889, 1231, 29898, 2848, 29922, 29941, 29906, 511, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 4230, 29918, 978, 742, 872, 29889, 1231, 29898, 2848, 29922, 29953, 29946, 511, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 5630, 742, 872, 29889, 1231, 3285, 1870, 519, 29922, 5574, 511, 13, 1678, 872, 29889, 4409, 877, 4925, 742, 872, 29889, 18146, 29898, 978, 2433, 4925, 5477, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 5527, 381, 2168, 29918, 271, 742, 14998, 29889, 9803, 29889, 8768, 29889, 11384, 29898, 2230, 8028, 29922, 5574, 511, 1870, 519, 29922, 5574, 511, 13, 1678, 872, 29889, 26666, 2558, 21529, 877, 333, 742, 1024, 29922, 459, 29889, 29888, 877, 20571, 29918, 1792, 8785, 13, 1678, 1723, 13, 1678, 1015, 29889, 3258, 29918, 2248, 29898, 459, 29889, 29888, 877, 861, 29918, 1792, 29918, 5269, 5477, 525, 1792, 742, 6024, 5269, 7464, 5412, 29922, 5574, 29897, 13, 1678, 1015, 29889, 3258, 29918, 2248, 29898, 459, 29889, 29888, 877, 861, 29918, 1792, 29918, 6786, 5477, 525, 1792, 742, 6024, 6786, 7464, 5412, 29922, 5574, 29897, 13, 1678, 1015, 29889, 3258, 29918, 2371, 877, 1792, 29918, 12154, 742, 13, 1678, 872, 29889, 4409, 877, 1792, 29918, 333, 742, 872, 29889, 6970, 7798, 3285, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 4409, 877, 12154, 29918, 333, 742, 872, 29889, 6970, 7798, 3285, 1870, 519, 29922, 8824, 511, 13, 1678, 872, 29889, 27755, 2558, 21529, 18959, 12154, 29918, 333, 7464, 6024, 12154, 29889, 333, 7464, 1024, 29922, 459, 29889, 29888, 877, 29888, 29895, 29918, 1792, 29918, 12154, 29918, 12154, 29918, 333, 29918, 12154, 1495, 511, 13, 1678, 872, 29889, 27755, 2558, 21529, 18959, 1792, 29918, 333, 7464, 6024, 1792, 29889, 333, 7464, 1024, 29922, 459, 29889, 29888, 877, 29888, 29895, 29918, 1792, 29918, 12154, 29918, 1792, 29918, 333, 29918, 1792, 1495, 511, 13, 1678, 872, 29889, 26666, 2558, 21529, 877, 1792, 29918, 333, 742, 525, 12154, 29918, 333, 742, 1024, 29922, 459, 29889, 29888, 877, 20571, 29918, 1792, 29918, 12154, 8785, 13, 1678, 1723, 13, 1678, 396, 835, 1095, 319, 2409, 29890, 293, 8260, 835, 13, 13, 13, 1753, 1623, 8228, 7295, 13, 1678, 396, 835, 8260, 4469, 5759, 491, 319, 2409, 29890, 293, 448, 3113, 10365, 29991, 835, 13, 1678, 1015, 29889, 8865, 29918, 2371, 877, 1792, 29918, 12154, 1495, 13, 1678, 1015, 29889, 8865, 29918, 2248, 29898, 459, 29889, 29888, 877, 861, 29918, 1792, 29918, 6786, 5477, 1591, 29918, 978, 2433, 1792, 1495, 13, 1678, 1015, 29889, 8865, 29918, 2248, 29898, 459, 29889, 29888, 877, 861, 29918, 1792, 29918, 5269, 5477, 1591, 29918, 978, 2433, 1792, 1495, 13, 1678, 1015, 29889, 8865, 29918, 2371, 877, 1792, 1495, 13, 1678, 1015, 29889, 8865, 29918, 2248, 29898, 459, 29889, 29888, 877, 861, 29918, 12154, 29918, 978, 5477, 1591, 29918, 978, 2433, 12154, 1495, 13, 1678, 1015, 29889, 8865, 29918, 2371, 877, 12154, 1495, 13, 1678, 396, 835, 1095, 319, 2409, 29890, 293, 8260, 835, 13, 2 ]